Set defaults from bash script before first run

The dedicated forum for PCMan File Manager - http://wiki.lxde.org/en/PCManFM
Post Reply
petlxde
Posts: 1
Joined: Thu Feb 20, 2025 6:49 am

Set defaults from bash script before first run

Post by petlxde »

I have a config script to run on first boot. I want to switch PCManFM to show hidden files and use list view. The script runs before first use. I changed the defaults in /etc/xdg/pcmanfm/default/pcmanfm.conf but pcmanfm still started with the defaults as if it is built into the code.

I changed view_mode=icon_thumb > view_mode=list and show_hidden=0 > show_hidden=1 in the following files.
/etc/xdg/pcmanfm/default/pcmanfm.conf
/etc/xdg/pcmanfm/LXDE/pcmanfm.conf
/etc/xdg/pcmanfm/LXDE-pi/pcmanfm.conf

I created a default $HOME.config/pcmanfm/LXDE-pi/pcmanfm.conf.

Nothing works. Somehow pcmanfm is ignoring the settings.

If I open PCManFM, change a settings, then exit PCManFM, I can change $HOME.config/pcmanfm/LXDE-pi/pcmanfm.conf and some changes with sometimes work but it is random. PCManFM mostly overrides my changes.

pcmanfm --wallpaper-mode=color works. The ideal would be settings like pcmanfm -hidden=visible and
pcmanfm -view=list
.
Post Reply