3

I'd like to install .deb packages I download from the internet, (ie google chrome or discord) from nautilus by just double clicking (the way it works in windows). I used to use gdebi, but it opens a gui panel, which annoys me personally so I removed it. Is there any way to do this by shell script or install some package that does it for me?

To be clear, I have root access on my machine, I can change arbitrary files and can run any scripts as "sudo." I just want to be able to install .deb packages in nautilus by double-clicking, instead of having to open a terminal.

I realize the security implications of this, but I only download packages I trust and have nothing valuable on my computer so I would like a way to save the 30 seconds.

  • I think you should keep in mind one difference between Windows and Ubuntu. With Windows, if you're able to install it "just by double clicking", most likely you have a system administrator's account. With Ubuntu, you have a normal account and you gain administrator's privilege by using sudo with your password. You never log into a Linux system with administrator's access already "on". Thus, with Linux, it's expected you'll need a few more steps compared to Windows. – Ray Feb 13 '23 at 23:52
  • Could I add a shell script with admin privileges that listens for my clicks in nautilus and runs dpkg -i and then sudo apt -f though? – grand aneww Feb 13 '23 at 23:55
  • You're asking to bypass the authentication stage for sudo, but Linux is a multi-user system. Windows originally (and, in a way, still is) a single-user system -- it can assume whoever logs in is an admin, by default. So, I would say "no", but perhaps someone else knows more than me and can help you with this. I think it's better to understand that Linux and Windows are different, instead of trying to force one to "emulate" the other. – Ray Feb 14 '23 at 00:49
  • That's not needed, I can run sudo on the script just fine. Since it's possible for gdebi to do it, I thought there might be someone who'd be able to point me to some documentation for nautilus API or reflecting gdebi methods in python. – grand aneww Feb 14 '23 at 04:58

1 Answers1

0

Apt can do it. Apt will figure out dependencies, too.

sudo apt install /path/to/downloaded.deb

Or dpkg can do it. Dpkg won't figure out dependencies.

sudo dpkg --install /path/to/downloaded.deb
user535733
  • 62,253