Ubuntu – How to Configure Launcher Placement in Multi-monitor Setup

launchermultiple-monitorsunity

I use a large monitor as primary and laptop screen as secondary. Is it possible to move the launcher to my big monitor or do I have to turn off my laptop monitor?

  • "Monitor Preferences" (Launcher search -> "Monitors") does not have a way to set the default/primary monitor.
  • nvidia-settings which I just installed says "You do not appear to be using the NVDIA X driver. Please edit your X configuration file (just run nvidia-xconfig as root), and restart the X server.
    • sudo nvidia-xconfig says sudo: nvidia-xconfig: command not found.
  • I guess I don't have an AMD driver because I don't have "AMD Catylist Control Center" in the launcher search.

Best Answer

Launcher placement can be achieved via System Settings -> Displays or via command line.

GUI way

Under System Settings -> Displays find the Launcher placement option

enter image description here

Command line way

The placement is determined by two things:

  1. Which monitor is the primary ?
  2. What value is set in /org/compiz/profiles/unity/plugins/unityshell/num-launchers dconf schema.

The dconf schema is very easy. Value 1 indicates one launcher, value 2 indicates multiple launchers (i.e., place it on all screens) . You can alter that with

dconf write /org/compiz/profiles/unity/plugins/unityshell/num-launchers INT` 

or

gsettings set org.compiz.unityshell:/org/compiz/profiles/unity/plugins/unityshell/ num-launchers INT

where INT is either 0 or 1.

The xrandr command will tell you what monitors are connected and what is your current primary screen. It will also allow setting and unsetting that with --primary flag.

$ xrandr
Screen 0: minimum 8 x 8, current 2390 x 768, maximum 32767 x 32767
eDP1 connected 1366x768+1024+0 (normal left inverted right x axis y axis) 345mm x 194mm
   1366x768       60.0*+
   1360x768       59.8     60.0  
   1024x768       60.0  
   800x600        60.3     56.2  
   640x480        59.9  
DP1 disconnected (normal left inverted right x axis y axis)
HDMI1 disconnected (normal left inverted right x axis y axis)
VGA1 connected primary 1024x768+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
   1024x768       60.0* 
   800x600        60.3     56.2  
   848x480        60.0  
   640x480        59.9  
VIRTUAL1 disconnected (normal left inverted right x axis y axis)

In the output above I have my external VGA1 screen set as primary , hence launcher will show up there.

For instance, if I wanted to use my build-in monitor as primary, then

xrandr --output eDP1 --primary --right-of VGA1   

And the launcher will jump from left screen ( VGA1 ) to my right screen, while preserving the layout.

For more info, read xrandr and dconf man pages.

Related Question