How can you run/start dpkg to install a .deb file on Whonix?

Hi. Whonix is based on Debian, right?

I am trying to install a .deb file and I have been googling for hours but I can’t find an answer to this.

It all says I have to use dpkg and type “dpkg -i filename.deb”

But it doesn’t say how I can start dpkg and WHERE I have to type “dpkg -i filename.deb”

Can somebody tell me where I have to type in these command lines?

Which button/icon do I need to click to use dpkg?

Usually the .deb’s documentation on its website or man page explains how to use that tool. But if it doesn’t, see below…

Whonix is based on Debian. Installing debs with “dpkg -i” is correct. .debs can not be started in that sense. They are supposed to be installed, what you already did. The question you’re currently having is how to use the package.

Graphical applications usually install a .desktop file, which you can find in start menu. You can check, if the package you installed contains a .desktop file.

Taken from source.

To see all the files the package installed onto your system, do this:

dpkg-query -L <package_name>

To see the files a .deb file will install

dpkg-query -c <package_name.deb>

If so, you should be able to start it in start menu.

When it doesn’t provide a .desktop file, and if it is a package that provides startable files**, it will most likely have installed that tool into a directory which is included in the $PATH variable.

To see the contents of $PATH, you can use this.

echo $PATH

sudo su echo $PATH

For example, if you had installed a packages called faketime… You’d see by using…

dpkg -L faketime

That it installed /usr/bin/faketime. So from now you can use.

/usr/bin/faketime

Or just.

faketime

(**There are packages that doesn’t provide startable files, but other stuff, such as files used by other packages (extensions), programming libraries, fonts, pictures, etc.)

[quote=“Patrick, post:2, topic:128”]Usually the .deb’s documentation on its website or man page explains how to use that tool. But if it doesn’t, see below…

Whonix is based on Debian. Installing debs with “dpkg -i” is correct. .debs can not be started in that sense. They are supposed to be installed, what you already did. The question you’re currently having is how to use the package.

Graphical applications usually install a .desktop file, which you can find in start menu. You can check, if the package you installed contains a .desktop file.[/quote]

Hi. Thank you for your reply.

I haven’t installed the deb file yet because I don’t know how to start dpkg.

What I want to is to install the Debian version of Opera Browser on Whonix. I downloaded the the .deb file from Opera’s website and I want to install it using dpkg but I don’t know how I can start dpkg.

Where can I find .desktop file on Whonix? I clicked the start button and searched .desktop but nothing showed up.

I’m sorry I don’t know much about Linux.

Whonix isn’t different from Debian in this regard.

You can start dpkg by running “dpkg” in a terminal (Konsole). (You find Konsole in the start menu and in Whonix also on the desktop as a shortcut.) Then “dpkg -i /path/to/filename.deb”.

Note, dpkg is just a vehicle to get .debs installed. The better way to install packages is using apt-get (which internally uses dpkg), because apt-get will also keep the package updated. To do this, you need an apt repository. I don’t know if Opera is still providing one. In past they did. See also Opera - Debian Wiki or Opera’s own Debian [stable, currently: wheezy] specific instructions. Those can be used 1 to 1 in Whonix.

When a .desktop file gets installed, you won’t find a .desktop file in start menu. Most likely, if Opera provides a .desktop file [I explained above how you can check if the package contains a .desktop file], then you most likely will find Opera under start menu → applications → internet → Opera.

As a side note, in case you don’t know already, in context of anonymity, Tor Browser is recommended, other browsers are recommended against. (Tor Browser Essentials)