Set defaults from bash script before first run
Posted: Thu Feb 20, 2025 7:06 am
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
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