Update: this tutorial is still valid for systems that don’t change monitors frequently, but if your system has frequent monitor changes, check out this post: https://heathpaddock.com/?p=854
When using two monitors in elementary OS the dock only shows on one monitor. I prefer to have it shown on both monitors. Here’s how it’s done:
Open the terminal and enter the following commands to create a new dock definition with the same settings as your current dock
cd ~/.config/plank mkdir dock2 cp dock1/settings dock2/ cd dock2
If you’re interested in mirroring the icons (aka launchers) between the two docks, enter the following command
ln -s ../dock1/launchers/ dock2/launchers
If you’d rather see a different set of items in the two docks enter this command
By default, both docks will show on the primary screen and in the same position. To change this we need to modify the settings file in the dock2 folder.
Open the settings file in your favorite text editor. You should see a setting for Monitor.
Most likely you will need to change this to the number 1 to run it on your second monitor. Your first monitor is monitor 0.
Update: you will need to specify the port your monitor is plugged into. To determine the port name run the following commandxrandr | grep " connected"
Which will give you output like this:DVI-I-1 connected primary 2560x1440+1920+0 (normal left inverted right x axis y axis) HDMI-0 connected 1920x1080+0+350 (normal left inverted right x axis y axis)
So my second monitor is named “HDMI-0”. Back in the text editor, add the port name to the Monitor setting like this:Monitor=HDMI-0
There is also a setting for Position if you’d like it to be moved to one of the sides.
You can test your settings for dock2 by entering the following command into the terminal
plank --name dock2
Press Ctrl+C to stop it.
When you’re happy with your settings you need to setup cerbere to launch dock2 at startup. You can use elementary-tweaks or dconf-editor to achieve this (or if you’re really fancy, you can use gsettings).
Here is my monitored processes before and after
['wingpanel', 'plank', 'slingshot-launcher --silent']
['wingpanel', 'plank', 'plank --name dock2', 'slingshot-launcher --silent']
This should work just as well for 3 docks, although I haven’t tested it.