Add an application (to favorites) to the Gnome dock

Hi,

I know that this is not really a PuroOS related issue/question, but I came to this because the Tor-Browser in the Pure-OS repo does not work. So I currently use an extracted version directly downloaded from the tor project website.

To start it I always have to browse/navigate to the extracted folder and launch it.

Is there someone who can explain how I can add an application to the dock (add to favorites) which is not really installed (just unpacked and started)? Add to favorites seems to be only possible if the application is installed normally.

I found something like this: https://geekitdown.com/how-to-add-shortcuts-to-favorites-in-gnome-shell-ubuntu/
(but gnome-desktop-item-edit seems to be not available for PureOs)
Or this: https://askubuntu.com/questions/1000171/manually-edit-desktop-files-in-dock-on-ubuntu-17-10

So I already know all (normal installed) applications should be available under /usr/share/applications, but Tor of course isn’t.

This command a least lists Tor as long as it is started:

gsettings get org.gnome.shell favorite-apps
['torbrowser.desktop', ..., ...]

I would appreciate a little hint how to get Tor to the dock favorites.

Thanks and regards,
Martin

Screenshot%20from%202018-07-22%2015-41-45

Screenshot%20from%202018-07-22%2015-47-46!

1 Like

I think you probably just need to create a .desktop file and move/copy it to ~/.local/share/applications/

Then it should at least show up in the “Applications” menu, and right-clicking–>Add to Favorites should successfully add it (as far as I know)

I don’t have Tor, but here’s an ad-hoc modified .desktop file that might work. Just make sure to made Exec and Path appropriate for your installation:

[Desktop Entry]
Type=Application
Name=Tor-Browser
GenericName=Secture Web Browser
Comment=Private Web Browser
Exec=/path/to/tor
Path=/path/to/
Icon=tor.png
Terminal=false
Categories=Web;Privacy;
Keywords=secure;security;privacy;private;web;browser;
StartupNotify=true
1 Like

Thanks @wctaylor.

Even there is no other file in " ~/.local/share/applications/" (I thought the other applications should have a .desktop file there as well) your solution is correct.

My Tor_Browser.desktop file looks like this now (copied the content from a “start-tor-brower.desktop” file which appeared in the extracted browser path after starting Tor ones using the bash script file: “<path_to_extracted_tor>/Browser/start-tor-brower”):

[Desktop Entry]
Type=Application
Name=Tor Browser
GenericName=Web Browser
Comment=Tor Browser is +1 for privacy and -1 for mass surveillance
Categories=Network;WebBrowser;Security;
Exec=sh -c ‘"<path_to_extracted_tor>/Browser/start-tor-browser" --detach || ([ ! -x “<path_to_extracted_tor>/Browser/start-tor-browser” ] && “$(dirname “$*”)”/Browser/start-tor-browser --detach)’ dummy %k
X-TorBrowser-ExecShell=./Browser/start-tor-browser --detach
Icon=<path_to_extracted_tor>/Browser/browser/icons/mozicon128.png
StartupWMClass=Tor Browser

A reboot was necessary in my case otherwise I could not open the menu to click on “Add to Favorites”.

1 Like

Happy to have helped!

~/.local/share/applications/ is generally used for user-installed packages.

System-installed packages are typically found in /usr/share/applications. You should see a large number of .desktop files there