1

This question already has an answer here:

I followed this tutorial (https://elementaryos.stackexchange.com/a/252/403) to create a folder in Plank for applications.

The folder is created, but I want to know if it's possible to change the icon of the folder to a custom one. Right now, the icon is like this

http://i.stack.imgur.com/byjt6.png

How can I do that?

I tried Alacarte but the folder doesn't appear on the list. Maybe changing the icon directly on Pantheon Files?

marked as duplicate by user170, lemonslice, Lewis Goddard Nov 29 '16 at 11:49

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

0

I am almost certain that is not possible in Plank, but I am answering in order to mention an alternative that would reach the main purpose of getting a proper Plank icon for multiple commands.

Instead of having a folder button in the dock without a real icon, we can have a normal launcher with multiple "Desktop Actions".

The practical difference is that with a no-icon dock folder you left-click to get the list of launchers, while here you will have to right-click the dock icon.

You are probably familiar with desktop actions, as they are present in other dock launchers as right-click options like those of Firefox or Chromium (to start a new window in incognito mode or temporary profile) or of media players like Clementine or Deadbeef (Play, Pause, Stop, Previous, Next).

Right-clicking the Clementine launcher you get this:

enter image description here

The number and type of actions accessible with double-click is set by editing the corresponding desktop file. Usually those actions lack icons, but those can be added once a Icon= line is put under each action as below.

The form of such a file should be like this:

[Desktop Entry]
Icon=
Name=
Actions=FIRST-ACTION;SECOND-ACTION
Type=Application

[Desktop Action FIRST-ACTION]
Name=
Exec=
Icon=

[Desktop Action SECOND-ACTION]
Name=
Exec=
Icon=

The Exec= line under [Desktop Entry] category (to run a program with a single left click like normal dock launchers) is not absolutely necessary, but it is useful and it can also be added, and I would use that for the most important of the programs or commands in this group.

Now, to have a launcher (with icon) for multiple applications/commands I will give an example for what I use (as the programs from your image are not familiar to me).

I will create a launcher for multiple DVD actions and programs. The launcher will start a DVD in mpv player with left click and will have two desktop actions (accessible as a list with right click): playing the DVD in VLC and ejecting the disk.

To create a launcher .desktop file (using gedit text editor):

gedit ~/.local/share/applications/DVD.desktop

With these lines:

[Desktop Entry]
Icon=mpv-dvd
Name=Play DVD
Exec=mpv dvd://
Actions=vlc;eject
Type=Application

[Desktop Action vlc]
Name=Play dvd in VLC
Exec=vlc dvd://
Icon=vlc

[Desktop Action eject]
Name=Eject disk
Exec=eject
Icon=eject

To make the file executable:

chmod +x ~/.local/share/applications/DVD.desktop

To get new icons: find the proper png icon with any name, put the icon in ~/.local/share/icons and edit the file above to have the same name as the icon in the line Icon=. That line under Desktop Entry category will get the main dock icon; those for each desktop action are those in each desktop action group.

For each program that you want to access in this way you can add one or more such actions.

My desktop file above will give this:

enter image description here

enter image description here

Not the answer you're looking for? Browse other questions tagged or ask your own question.