I am running Window Maker. I used lxrandr to set the screen size, and settings for when a second monitor is added. The problem is, after restarting the computer, it reverts to the default settings. How to I save and keep those settings, so they are used whenever I start X?
1 Answers
The lxrandr command is best suited to run from the LXDE desktop environment rather than from any arbitrary environment.
It saves its settings in a .desktop entry (compliant with Freedesktop) there:
$HOME/.config/autostart/lxrandr-autostart.desktop
which includes this entry:
OnlyShowIn=LXDE
According to the Fredesktop specifications that means this will autostart only on LXDE.
If Window Maker followed these specifications (I think it doesn't), you could try and remove this entry to have it still autostart.
Else you can just extract the
Exec=entry and have it autostart the WindowMaker way, by (creating or) editing~/GNUstep/Library/WindowMaker/autostartand adding the command above. You'd have to do this manually each time you change a setting withlxrandr.Or you could instead automate this by adding this in
~/GNUstep/Library/WindowMaker/autostart:sed -n 's/^Exec=//p' $HOME/.config/autostart/lxrandr-autostart.desktop | sh
which will execute the Exec= entry from the file saved by lxrandr.
Example of content (grep ^Exec= $HOME/.config/autostart/lxrandr-autostart.desktop)
Exec=sh -c 'xrandr --output HDMI1 --mode 1920x1080 --rate 60.00 --output eDP1 --mode 1920x1080 --rate 60.00 --below HDMI1'
- 31,762
- 2
- 62
- 101