How do I use ARandR to create a permanent monitor layout in Lubuntu 12.10? [duplicate]

So ARandR is great for setting up my monitor layout in Lubuntu 12.10 but even if I save the layout to the

~/.screenlayout

it doesn't seem to save that layout no matter what I call the file.


Solution 1:

Turns out that there is a .desktop file for lxrandr that you can edit with the contents from an ARandR file.

e.g. here is my ARandR file for a laptop with an external monitor attached.

$ cat ~/.screenlayout/dual.sh 
#!/bin/sh
xrandr --output VGA-0 --mode 1920x1080 --pos 0x0 --rotate normal --output LVDS --mode 1280x800 --pos 1920x280 --rotate normal --output HDMI-0 --off

and here is the lxrandr with the xrandr command added and the old command commented out:

$ cat ~/.config/autostart/lxrandr-autostart.desktop 
[Desktop Entry]
Type=Application
Name=LXRandR autostart
Comment=Start xrandr with settings done in LXRandR
Exec=xrandr --output VGA-0 --mode 1920x1080 --pos 0x0 --rotate normal --output LVDS --mode 1280x800 --pos 1920x280 --rotate normal --output HDMI-0 --off
#Exec=xrandr --output LVDS --mode 1280x800 --rate 59.8 --output VGA-0 --mode 1920x1080
OnlyShowIn=LXDE