How to set persistent resolution in xfce on Debian
One of many ways to change settings in a desktop environment is to use tools that are provided with that environment. In this case XFCE is a desktop environment and it offers such tools, some with graphical interface.
And the simplest way to change resolution is to use "Display" that can be found under Application Menu > Settings > Display
or it can be invoked from terminal emulator using xfce4-display-settings
command.
Of course if you do not like a graphical solution, you alway can manually modify the respective file (in this case .config/xfce4/xfconf/xfce-perchannel-xml/displays.xml
)
Two problems I had to solve in my setup (OpenSuse as VMware guest):
- the resolution is not in the dropdown list of xfce4-display-settings (but the name of the monitor is. You'll need it later).
- every logout 'forgets' the manually added resolution (via xrandr)
My procedure for the monitor ('Virtual1'), which I want to set to 1160x1600:
On the target monitor determine the timing parameters
$ cvt 1160 1600
# 1160x1600 59.99 Hz (CVT) hsync: 99.46 kHz; pclk: 156.75 MHz
Modeline "1160x1600_60.00" 156.75 1160 1248 1368 1576 1600 1603 1613 1658 -hsync +vsync
$ _
Activate that modeline using xrandr:
$ xrandr --newmode "1160x1600_60.00" 156.75 1160 1248 1368 1576 1600 1603 1613 1658 -hsync +vsync
$ xrandr --addmode Virtual1 1160x1600_60.00
$ xrandr --output Virtual1 --mode 1160x1600_60.00
$ _
Voila!
In order to get this screen resolution automatically at login, add the above 'xrandr' lines to .bashrc or .profile.
This cludge works for me. Perhaps someone knows where best to change the system configuration to make it permanent, even surviving updates? (All my old *nix know-how seems to be obsolete since systemd...)
"Those who do not understand Unix are condemned to reinvent it, poorly. - Henry Spencer"