151

On my dual screen display I have a Unity Launcher on the left hand screen and also on the right hand screen. Both work perfectly fine.

However, I don't want this second launcher present on my right hand screen. How could I remove this? If it matters, I'm using NVIDIA drivers with a TwinView setup.

A dual screen setup where both launchers are visible

Kaz Wolfe
  • 34,122
  • 21
  • 114
  • 172

6 Answers6

221

You can now.

Open up Display preferences, and then you can choose between having the launcher on one display or all of them.

enter image description here

This dialog also allows switching on or off the sticky edges (i.e. the mouse slowdown) between the displays.

jrg
  • 60,611
  • 5
    Note this works only if Unity correctly detects your dual head configuration - which is not currently the case if you use Twinview with the nvidia drivers. – kynan Jun 29 '12 at 13:59
  • 1
    It does now, starting with 302.x, the binary Nvidia driver propetly supports RandR. –  Aug 03 '12 at 20:57
  • 1
    My config is TwinView, and with that, I had to use nvidia-settings to set the monitor I wanted the taskbar on as the "primary display for X screen" – Diederik Oct 02 '12 at 09:12
  • I must have ran that app 50 times today tweaking monitor settings and never saw that! Thanks! – Dave Apr 04 '13 at 02:31
  • Thanks. Simple solution. Do you know how to do the same for the menu bars on top, showing clock and icons twice? – Sigur May 31 '16 at 18:48
  • 1
    @Sigur I am not familiar with any way of doing that. You should feel free to ask a question about it though! – jrg May 31 '16 at 20:04
  • note that this settings is also in Unity tweak tool, BUT seems to do nothing. It started to work only when I set it in this displays dialog. Pretty confusing... – Vitas Nov 22 '16 at 14:04
  • Thanks for this. Unity-Tweak wasn't working for some reason, but this did. – Bryson S. Jul 15 '17 at 18:27
  • 1
    Not every hero wears a cape. thanks mate, saved my life ! – Marcello Grechi Lins Apr 10 '19 at 16:52
  • In Ubuntu 18.04, this is under Settings --> Dock. – Tor Klingberg Oct 19 '20 at 09:27
33

The slowdown is a feature to make it possible to use the launcher when it's set to auto-hide. I think it's a bug that it's used when the launcher is set to always visible. I've reported it on Launchpad.net, where bugs are filed, and you might want to set it to affect you. You can find it here: https://bugs.launchpad.net/ubuntu/+source/unity/+bug/945847

In the meantime, you can configure it yourself by using /apps/compiz-1/plugins/unityshell/screen0/options/overcome_pressure and /apps/compiz-1/plugins/unityshell/screen0/options/stop_velocity in gconf-editor

You can also configure these parameters in CCSM (Compiz Config Settings Manager), in the Unity Plugin, Experimental tab

  • Your answer is clear and articulate. I tried what you said and at least I don't have that slowdown problem any more. Although you haven't answered the original question often in IT a workaround is just as good as a solution and that's why I am marking this question as answered. Thank you very much for helping! – Eugene van der Merwe Mar 05 '12 at 22:16
  • 3
    Nice answer. For the record, I have set the following values: /apps/compiz-1/plugins/unityshell/screen0/options/overcom_pressure=1 to make it possible to pass from one screen to another flawlessly and /apps/compiz-1/plugins/unityshell/screen0/options/stop_velocity=20 to still make it possible to access the hidden launcher on the left screen. – raphink Mar 21 '12 at 08:59
  • 2
    This wasn't a solution for me but pointed me to the right place. @Todd Wallentine below shows that the num_launchers option set to 1 will only display the launcher on the primary screen. – redbmk Nov 16 '12 at 22:37
8

I just found a setting in gconf-editor that will allow you to set the launcher to just your primary desktop: /apps/compiz-1/plugins/unityshell/screen0/options/num_launchers. If you set it to 1, the Unity launcher will only be displayed on the primary desktop. If you set it to 0, the launcher will be available on all desktops.

In addition to this setting, I also set the the overcome pressure (/apps/compiz-1/plugins/unityshell/screen0/options/overcom_pressure=1) and stop velocity (/apps/compiz-1/plugins/unityshell/screen0/options/stop_velocity=20).

Todd Wallentine
  • 101
  • 1
  • 2
  • I noticed this feature is available in ccsm now, under Experimental tab called "Launcher Monitors" in a dropdown. You can choose "All Monitors" or "Primary Desktop" – Nicholi Dec 12 '12 at 00:38
  • Additional note, the above settings in gconf are only for the full Unity interface. If you are using Unity2d you can find them in dconf under com/canonical/unity-2d/launcher/only-one-launcher – Nicholi Mar 13 '14 at 04:41
4

I solved using disper. Type in a terminal:

sudo apt-get install disper

After solving the issue with the method proposed by Paŭlo Ebermann or nvidia-settings or whatever works for you, type in a terminal:

disper --export < /path-to-my-file/my-disper-file.metamode

my-file.metamode is as follows:

backend: nvidia
associated displays: DFP-0, DFP-1
metamode: DFP-0: 1366x768 @1366x768 +1920+312, DFP-1: 1920x1080 @1920x1080 +0+0
scaling: stretched, stretched
xinerama info order: DFP-1, DFP-0

The third row takes into account the particular positioning of two screens with different heights. Your case may be simpler. You could try to create the file that fits your configuration (without using other methods + disper --export). The important point is the order of the screens in the second and in the last rows.

You can use the script and making it run at startup:

#!/bin/sh
#Auto switch single/extend display with disper on Multiple Monitor.
lines=$(disper -l | wc -l)
display_count=$((lines / 2))
if [ $display_count -eq "1" ]; then
   disper -s
else
   disper --import < /path-to-my-file/my-disper-file.metamode
fi

It worked with my nvidia graphics card (both precise and quantal).

Hope it helps.

Peachy
  • 7,117
  • 10
  • 38
  • 46
3

I tried the combined settings from above:

/apps/compiz-1/plugins/unityshell/screen0/options/num_launchers=1
/apps/compiz-1/plugins/unityshell/screen0/options/overcom_pressure=1
/apps/compiz-1/plugins/unityshell/screen0/options/stop_velocity=20

That was mostly successful for me. A launcher appears only on the primary screen, and the mouse moves from one screen to the next without undue hesitation. However, I found that the remaining launcher would not reveal without using the super key. This can be corrected by setting the following:

/apps/compiz-1/plugins/unityshell/screen0/options/reveal_pressure=1

BTW this is with NVidia drivers.

Eliah Kagan
  • 117,780
0

Just changing /apps/compiz-1/plugins/unityshell/screen0/options/stop_velocity to 1 fixed the issue for me... I didn't necessarily want to remove the second taskbar, just didn't like the pause when going from one screen to the other.

Eliah Kagan
  • 117,780
brbcoding
  • 101