5

One can change displays in Xfce (in 14.04) from GUI by choosing between:

Laptop
Mirror Displays
Extend to the Right
Monitor

Is there a command to cycle between these options?

(So that I associate it to a shortkey and then just press that key to cycle displays directly, that is, without GUI, without opening the Display window, selecting, closing, etc.)

3 Answers3

5

I have found here about Disper. See link for details.

It can be installed from Synaptic or the terminal.

The command to cycle between clone, extended, internal and external displays should be like this:

disper --cycle-stages='-e : -c : -S : -s' --cycle

In that case, it would extend to the right. To cycle between the same options but extend to the left:

disper --direction=left --cycle-stages='-e : -c : -S : -s' --cycle

The command can be then associated to a short-key.

enter image description here

The simplest shortkey might be the Display key (XF86Display) if there is one available on the keyboard. (Because of a bug, in my case that involves an interference with the Super key, so that I prefer to use XF86HomePage.)

Disper will detect displays and use the maximal resolutions by default. If no external display is connected, nothing will happen when the short-key is touched.

2

Setting a new keyboard shortcut is possible (in Settings -> Keyboard -> Application shortcuts), but finding the right terminal command...

xrandr can change the resolution, I know it works if you're using one monitor, it's man page could have more info on what you'd like to do, other answers advise using it...? Here's a clip from it's man page:

--left-of, --right-of, --above, --below, --same-as another-output
Use one of these options to position the output relative to the position of another output. This allows convenient tiling of outputs within the screen. The position is always computed relative to the new position of the other output, so it is not valid to say --output a --left-of b --output b --left-of a.

--off Disables the output.

--reflect reflection
Reflection can be one of 'normal' 'x', 'y' or 'xy'. This causes the output contents to be reflected across the specified axes.

Searching for the "display" program, with dpkg -S display then searching that for xfce found the .desktop file /usr/share/applications/xfce-display-settings.desktop, and it's target xfce4-settings: /usr/bin/xfce4-display-settings. It has a very basic man page, but a search on this site found:

Xen2050
  • 8,943
0

enter image description here

You can also use the keyboard arrows left and right to cycle through the options (in screenshot I've selected the right-most option) and then use enter to activate the desired option.

landroni
  • 6,011