Change background color from CLI

The dedicated forum for PCMan File Manager - http://wiki.lxde.org/en/PCManFM
Locked
bobotig
Posts: 1
Joined: Sat Oct 27, 2012 3:12 pm
Contact:

Change background color from CLI

Post by bobotig »

Hello guys!

I am blocking on a pcmanfm option.I explain:
I wrote a script (see bonjour) that changes the background image and color based from http://www.bonjourmadame.fr picture :)
To have a quite portable version, the script detects the Windows Manager and guess the Desktop Environment to use the good commands.

This part that modifies the background image is functional:

Code: Select all

pcmanfm -w "$picture" --wallpaper-mode=$pos
And to change background color I did not found the good operation, so I tried:

Code: Select all

sed -i "s/^desktop_bg=.*/desktop_bg=$color/" $HOME/.config/pcmanfm/LXDE.conf
But this part is non functional.

So my questions are:
Is there is better way to modify the background color (knowing there is a background image)?
If no, with the code I pasted below, how can I reload the configuration to take effect?

Thanks in advance :)
Ah yes, I want only do this from command line.
Locked