PDA

View Full Version : [SOLVED] 12.04 / Unity - How to add program to left bar manually (won't pin)



jba3
March 28th, 2012, 06:30 PM
I'm having a strange, possibly semi-unique problem. I can add programs to the side bar fine. However, I can't add "executables" (I guess still programs?) and get it to work.

Specifically, I made a folder called "Apps" in my home folder. I like "Sublime Text 2", which is a text editor. There is no .deb file to install, so it just runs by double-clicking a after unpacking it. When I run the program, it starts and runs fine, and shows up on the sidebar.

However, when I do "lock to launcher", it doesn't work right. If I close the program, it stays "pinned", but the icon doesn't open the program. It just pulses, and never opens. If I reboot, the icon becomes a question mark, and it still won't open the program.

Is there a text/config file I can manually add an entry to? In Debian, I just added a new program and pointed to the path of the executable file. I can't seem to figure this out. Thanks!

MG&TL
March 28th, 2012, 06:36 PM
Unity bar doesn't take executables, it takes .desktop files. You can make your own (technical), or use the "Main menu" entry in Unity dash (alacarte) to make your own.

jba3
March 29th, 2012, 07:15 PM
Unity bar doesn't take executables, it takes .desktop files. You can make your own (technical), or use the "Main menu" entry in Unity dash (alacarte) to make your own.

I forgot to mention I gave the .desktop thing a try, and had no luck. :( Here's my .desktop file (my username as {USER}):

[Desktop Entry]
Version=1.0
Type=Link
Name=Sublime Text 2
Comment=Sublime Text 2 launcher
URL=/home/{USER}/Apps/Sublime Text 2/sublime_text
Icon=/home/{USER}/Apps/Sublime Text 2/Icon/32x32/sublime_text.png
X-Ubuntu-Gettext-Domain=example-content

I can open the program fine by double-clicking that file. Once opened, pinning still doesn't work. It pins, but won't re-open. I used dconf editor and went to:

Desktop > Unity > Launcher

and added the path to my .desktop file from above. It doesn't show up in the launcher, though. Every other app I have pinned to the launcher shows up as a .desktop file there, so I'm sure I'm looking in the right place.

When I reboot, my entry is removed from the dconf setting. I'm guessing I'm not supposed to use an absolute path, since all of the existing ones are just "appname.desktop" without any path info. However, I can't seem to find the .desktop files anywhere so I know where to put the other one; it's not in my home/user/Desktop folder, and I have view hidden files on.

Using the "main menu" app to add an entry manually worked. I was able to see it in the installed programs after adding it, and then pinning it worked!
:guitar:

Thanks!!

thedarryl
May 20th, 2012, 08:17 PM
I found a lot of desktop configuration files in /usr/share/applications, and I was able to drag those to the launch bar.

I even found a way to change the icons that I don't particularly like (in fact, certain system apps created invisible icons on the launcher, in which case the following is necessary):

First I created a new folder (location doesn't seem to matter), and then dragged the desired desktop files to this new folder.

For these new files I right-clicked for Properties and then clicked their icons, which allows me to browse to an alternate image path (hundreds of images under /usr/share/icons/...)

*For .png files it appears at first as though the change didn't take; but, sure enough, when I drag the new file to the launcher, it has the graphic I selected :P