Multi-Planking in elementary OS

A comment on my original article, combined with a holdiay, created an opportunity for improvement.

While my previous post provided a method to manually specify 2+ docks, this was not ideal for situations where the number of monitors frequently changes. With that in mind I created a small app that automatically starts a new instance of plank for each monitor. It dynamically adds/removes planks as you add/remove monitors.

You can install the app from my PPA:

sudo apt-add-repository ppa:heathbar/multiplank
sudo apt-get update
sudo apt-get install multiplank

Once installed, enable multiplank by issuing the following command:

multiplank -e

And to disable:

multiplank -d

It’s worth noting that this app does not modify or replace plank. It simply configures and starts a new instance of plank for each of the monitors connected to your system.

I opted to create a full-blown compiled app (instead of an arguably simpler shell script) because I wanted an efficient solution. I did not want to have a script running that was wasting cycles by constantly counting the monitors. With this approach, I’m able to register with the OS to be notified whenever the number of monitors changes. Then, I can effectively have the app go to sleep until a monitor change occurs. At that time, the OS wakes up multiplank which re-configures all of the planks and promptly goes back to sleep. If you have a brilliant idea on how to use inotify in a bash script to watch some file and make all of this magic happen, please comment below.

Get the code here:

17 thoughts on “Multi-Planking in elementary OS

  1. John

    This works brilliantly, Thanks.

  2. Lolo

    Great app man!

  3. Supersweet!

  4. Waqas

    I am running Freya 0.3.2 and get the following error on running multiplank -e. It still only shows on the primary monitor.

    ** (multiplank:3688): WARNING **: Couldn’t connect to accessibility bus: Failed to connect to socket /tmp/dbus-oCFXQnj1RH: Connection refused
    ** Message: Multiplank.vala:64: Enabling…

  5. wilcy

    Thnx! works like a charm.
    I only had to fiddle a bit with the display layout (using different sizes monitors) in order to get both planks to show up. In my case setting the non-primary monitor bottom about a px lower than the bottom of the primary did the trick.

  6. Aeolus

    Little problem, it seems to work even after removing… (or maybe I’m doing something wrong?). What is the proper way of getting rid of this?

  7. Michał

    I’m working on elementary 0.4 Loki and it doesn’t work as it should.
    It makes docs on both screens, but docs are really tiny.

    • Michał

      OK, pressing Ctrl and scrolling mouse helps.

  8. Hi, when I tried to use “keep in dock” feature doesn’t work, what is good place to report this? what info do you need?

    • Done, I don’t know but .config/plank was not created the .item for terminal, I created manually and reloaded the multiplank and done

  9. Ziad

    That’s simple and easy It worked so well , thanks for our Efforts !

    • Ziad


  10. Erik

    Is there any way to make it show windows only on current screen? I.e dock on main screen shows/activates only those apps whose windows are on that screen ?

    • Erik

      found it myself: dconf-editor and go to: net>launchpad>plank>docs and mark for each dock “current-workspace-only”.

  11. Abhinav

    I am unable to install multiplank because of following error

    abhinav@abhinav:~$ sudo apt update
    [sudo] password for abhinav:
    Hit:2 bionic InRelease
    Hit:3 bionic InRelease
    Hit:4 bionic InRelease
    Hit:5 bionic InRelease
    Hit:6 bionic-updates InRelease
    Ign:7 bionic InRelease
    Hit:8 bionic-backports InRelease
    Hit:9 bionic-security InRelease
    Hit:10 bionic InRelease
    Ign:1 stable InRelease
    Hit:12 bionic InRelease
    Get:11 stable Release [3,674 B]
    Err:14 bionic Release
    404 Not Found [IP: 80]
    Reading package lists... Done
    E: The repository ' bionic Release' does not have a Release file.
    N: Updating from such a repository can't be done securely, and is therefore disabled by default.
    N: See apt-secure(8) manpage for repository creation and user configuration details.

    I tried few solutions from googling the problem but so still multiplank package is not found using apt on terminal or synaptic package manager.. Any solutions.

    • blessio

      same result for me on latest elementary OS update from today

  12. Still doesn’t work for elementary OS. I switched the apt repo entry to xenial but then it complains about not met dependencies. Had to use the manual approach from the linked post for now.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>