3

I did a search and didn't find anything about this but, when I tried to make Gdebi the default package installer in ubuntu 17.10 it did not show up in the list of other applications to "Open with...".

2 Answers2

3

I found my solution and thought I would share that.

This can be used for any application, just correct the name appname.desktop

$ gksudo gedit /usr/share/applications/gdebi.desktop

(Note that the .desktop files should be in /usr/share/applications, but if not will be in ~/.local/share/applications, so change the path accordingly if you need to. Also, if you cannot correctly guess the .desktop file’s name, you can get the correct name by going to the folder and browsing for it).

[Desktop Entry]
Name=GDebi Package Installer
GenericName=Package Installer
Comment=Install and view software packages
Exec=gdebi-gtk
Icon=gnome-mime-application-x-deb
Terminal=false
Type=Application
Categories=System;
MimeType=application/vnd.debian.binary-package;
NotShowIn=KDE;
X-Ubuntu-Gettext-Domain=gdebi
StartupNotify=true
Keywords=package;apt;dpkg;install

Find the Exec= line and you will see the command listed after it. Simply go to the end of the line, hit the spacebar, and add %f, so the line looks like:

Exec=gdebi-gtk %f

Simply save the file when exiting, and you shouldn’t even need to restart Nautilus, let alone log out or totally reboot. You should immediately see the desired program in the list of apps presented in Other Application…, and once you open a file with it, the app should be easily accessible in the list of secondary programs found in Open With.

3

eyesOnfleek provided an excellent answer for this. I would just add that in order for Gdebi to run by clicking on an associated Deb file it needs to have root access. Therefore the command in gdebi.desktop would have to be

Exec=gksudo -k -u root gdebi-gtk %f