2

I'm using a dual monitor setup for my PC. However, since my other display is smaller, I adjusted its DPI/Size using the tutorial below: https://wiki.archlinux.org/index.php/HiDPI#Side_display

I got it working. However, each time I reboot it resets my xrand commands. So I just want to ask where do you suggest to place my xrand command for my displays?

If you're curious the command is given below:

xrandr --output HDMI2 --auto --scale 2x2 --pos 0x0 --output eDP1 --auto --scale 1.5x1.5 --pos 3840x540
1

You can do one of the following:

  • Using the GUI:

    1. Go to System Settings > Applications > Startup
    2. Click the + button
    3. Type in the xrandr command complete with its arguments
  • Creating a .desktop file and adding it to autostart:

    1. You can make a .desktop file containing the command as an Exec key with something like this: [Desktop Entry] Version=1.0 Type=Application Name=XrandrStartup GenericName=XrandrStartup Comment=Xrandr config startup script Icon=preferences-system Categories=Settings; Exec=xrandr --output HDMI2 --auto --scale 2x2 --pos 0x0 --output eDP1 --auto --scale 1.5x1.5 --pos 3840x540 TryExec=xrandr Terminal=false X-GNOME-Autostart-enabled=true

    2. Save it on ~/.config/autostart


Based on this answer

1

You could add it to a file called ~/.bash_profile which fires when you log in. The issue with automating it is that it might misbehave if you aren't always in this setup, and also it'll run every time you open a shell.

I just leave mine in ~/dual.sh and run:

sh ~/dual.sh 

Also, occasionally monitor commands have caused things to crash, so automatically running will potentially make troubleshooting more annoying.

It might be possible to create a system startup script, however then you'll probably want to write a more comprehensive script, and I think you need to run these settings after desktop has loaded.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.