I have a new 4k monitor. I'd like to zoom its desktop by 25%. After boot or logging in, I usually run this command manually:
xrandr --output HDMI-1 --fb 4992x1728 --mode 3840x2160 --scale 0.8x0.8 --pos 0x0 --primary \
--output HDMI-0 --mode 1920x1080 --scale 1x1 --pos 3072x0
It sets up my GUI, resolutions, and positions of two monitors around a virtual desktop exactly as I expect.
The problem is this command doesn't work if I put it in the ~/.xprofile
. The outcome seems to vary between relogs: sometimes the screen is not scaled at all, sometimes it is but desktop locations around the virtual desktop are not clear. If the ~/.xprofile
is not a correct place to configure the GUI when X session starts, what is the alternative? Is it just the ~/.profile
? I don't know if ~/.profile
is run only once per user session or multiple times. It might be important because when xrandr
is run multiple times, it may also cause problems. In terms of errors regarding the command in the ~/.xprofile
, how can I know what exactly happens when X session starts. Is there any log file?
Thanks