How to create a start button for Plank dock, or other docks

I use and like Plank dock. I decided that since I go to the dock for favorite apps and for running applications, it would be great to go to the dock for all applications. The goal was to move the xfce Applications Menu to an icon in Plank dock. I was able to achieve this goal, but it was a little tricky. Hopefully this post will save someone a little time and trouble if they want to try this with Plank, or with another dock.

First, there is a command that will open the xfce start menu under the mouse, wherever the mouse is. This definitely works for xfce 4.10, and I think 4.8:

xfce4-popup-applicationsmenu -p

Unfortunately I can't tell Plank to execute this command. I have to make a desktop launcher and tell Plank to start that. When I first tried this there was a glitch, which I found a workaround for. Here are step by step instructions:

1. Create a desktop launcher that will open the Application Menu. Paste the text below into your text editor, and save it as:

~/.local/share/applications/appmenustart.desktop

Once you have saved the file, double click on it. Choose "make executable." After that, double click on it again and you should see the xfce app menu appear under your mouse.

The dock item should appear, but it may not work. I found that it would stop working after I opened the Application Menu on my main panel. When I took the Application Menu out of the panel, nothing worked, not even running the command. So...

3. Make sure the Applications Menu is in a panel, but in a place where it cannot be clicked.

- Remove the Applications Menu from your main panel.- Make a new panel, put the Application Menu and three separators in this panel, and nothing else.- Move the panel to an unused corner of your screen. The icon should be closest to the edge, with the separators towards the middle.- Make the panel transparent (alpha 0), and check "Don't reserve space on borders."- Make the panel 1 percent in width, and uncheck expand if necessary. The start icon should disappear from the screen.

After doing these three things I have a reliable application menu button in Plank.

If you miss a visible start button in the panel, there is a way to get that functionality back.Add a Launcher to the panel.Add a new empty item to the Launcher.Pick a name and an icon. For the command, use the following:

xfce4-popup-applicationsmenu -p

Save and close out. Both the dock button and the new panel button should work without interfering with each other.