Multiple Monitor.

How To Use Multiple Screens In Xfce (Extended Desktop, Not Mirror)

In multi-monitors installs, Xfce clones/mirrors instead of expanding the desktop to the monitors. So here are two ways of getting proper multi-screen support in Xfce:

  1. If you are using Xfce ≤ 4.10, installing ARandR
  2. If you are using Xfce ≥ 4.11, extended desktop mode supported

Previously, we will upgrade our system:

Debian, Devuan and forks

$ su -
# apt-get update
# apt-get upgrade
# exit

Xubuntu and forks

$ sudo -
# apt-get update
# apt-get upgrade
# exit

Arch, Manjaro and forks

$ sudo pacman -Syu

RedHat, CentOS, Fedora

$ sudo yum update

openSUSE

$ sudo zypper up

OpenBSD

$ su -c 'pkg_add -Uu'

Gentoo

$ su -
# emerge --sync
# emerge --update @world
# exit

FreeBSD

$ su -
# freebsd-update fetch
# freebsd-update install
# exit
If $ su - does not work, try $ sudo -i. If $ sudo command does not work, try $ su -c 'command'. And vice versa.

And check what version of Xfce we are using:

$ xfce4-session -V

That will return something like this:

xfce4-session 4.10.1 (Xfce 4.10)

1. If you are using Xfce ≤ 4.10

Install ARandR, a simple GUI for XRandR:

Debian, Devuan and forks

$ su -c 'apt-get install arandr'

Xubuntu and forks

$ sudo apt-get install arandr

Arch, Manjaro and forks

$ sudo pacman -S arandr

RedHat, CentOS and forks

$ sudo yum install arandr

openSUSE

$ sudo zypper install arandr

OpenBSD

$ su -c 'pkg_add -i arandr'

Gentoo

$ su -c 'emerge x11-apps/xrandr'

FreeBSD

$ su -c 'pkg install arandr'
If $ sudo command does not work, try $ su -c 'command'. And vice versa.

Then, open ARandR:

Xfce Applications Menu.
Xfce Applications Menu.

And move the screens to the desired position using ‘drag and drop’:

Screen Layout Editor.
Screen Layout Editor.
By default, the screens might be displayed one above the other, so drag the first one to be able to see both of them.

When you are ready, click on Layout Apply.

The changes are not saved and will be lost once you logout or restart the computer so to make them permanent, from the ARandR menu, click on Layout Save As, enter a name for this layout (like home.sh) and save it. This will create a script under ~/.screenlayout using the name you’ve used above (home.sh).

Now, open Session and Startup:

Xfce Applications Menu.
Xfce Applications Menu.

Click on Applications Autostart tab and click on Add button:

Session and Startup.
Session and Startup.

Under Name and Description, enter whatever you want (Xfce multi-screen) and, under Command, enter the exact path to the script created in previous step (/home/miguel/.screenlayout/home.sh):

Add application.
Add application.

Your Xfce computer’s desktop should now be extended to the all monitors connected, instead of using the default clone/mirror option, each time you log in.

2. If you are using Xfce ≥ 4.11

Xfce 4.11 has implemented support for extended desktop mode so you will get proper multi-monitor support by default.

Header image by torontohackers.com

Miguel Menéndez

SysAdmin, Network & Security Auditor.