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

43,330

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
Share:
43,330
alexpotato
Author by

alexpotato

Updated on September 18, 2022

Comments

  • alexpotato
    alexpotato over 1 year

    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.

  • zevero
    zevero over 7 years
    You may even do Exec=~/.screenlayout/dual.sh so you can always change your setup in ARandR ...