How do you install a program from a tar?

Deadjasper

2[H]4U
Joined
Oct 28, 2001
Messages
2,568
Program in question is Firefox 52.6 ESR. Searching for an answer to this question bring up a shitload of websites and the instruction on each is totally different from the rest. None of the work.

This is the last one I tried -

https://sourcedigit.com/20839-extract-install-tar-gz-files-ubuntu/

Problem is the ./configure command returns a no such file or directory. Googling this returns a multitude of gibberish.

Help a brotha out. :(
 
Well it depends on what is _inside_ the TAR file: uncompiled source code or compiled software binaries.

A) If the TAR contains just source code like C/C++, then it needs to be compiled and running the ./configure script is a way for it to detect the code compilers and tools already installed on the system. And then you proceed down the software compilation path which is usually something like ./configure and then make, followed by make install (you'll need to use sudo or have root level access to install software outside of your $HOME dir)

B) If the TAR contains already compiled software, then the TAR (just like a ZIP or RAR file in Windows) needs to be extracted out to someplace where you (and/or other users) can access it. If it is just for yourself, you can extract it in your own $HOME directory like ~/Downloads. For enabling other users to access it, the /opt directory is a reasonable spot to place extracted TARs of compiled software, and just like above you'll need to use sudo or have root level access to install software outside of your $HOME dir.

I am guessing and hoping you probably download scenario (B) a TAR of pre-compiled Firefox and it just needs to be extracted. Post up the link you downloaded and/or a listing of the extracted TAR to get more insights.
 
Thanks.

I believe it's already compiled. I can run firefox from the enclosed executable and all is well. Problem is i have no default browser and thus cannot click on external links.

File name is - firefox-52.6.0esr.tar.bz2 I believe I downloaded it from Mozilla.

Trying to extract it to /opt I'm getting nothing but errors. Mainly something about gzip ?????
 
Last edited:
Yes, if you can run firefox from the extracted contents then it was a TAR of pre-compiled software.

Hmmmm. A default browser (or any default application) is usually handled by the graphical desktop environment. The desktop environment watches for file types and links and then launches the configured application for that file type/link. So the desktop environment has some sort of list or lookup table for default applications. What Linux distro and version are you running? What graphical desktop environment? GNOME? Cinnamon? MATE? There should be a way to change the default applications for a file type/link and/or add a new application as a default application for a file type/link.
 
If your .tar includes binary files extract it to /opt
The tar probably includes the dir stucture if not add /opt/firefox to keep things tidy.
/opt is the place to install software not included in your distro and not dealt with by your package manager. Its the Linux version of c:/Program Files
Software you build from source in general goes to /usr/local

If you don't have /opt (some distros don't make it by default... then first create it)
sudo mkdir /opt
You can then either untar your files there or copy them from where you have already extracted them. With something like...
sudo mv firefox /opt/firefox

I'm not sure what DE your using but if you want to create launches for firefox you might have to create a .desktop file.

To set it as your default browser
http://manpages.ubuntu.com/manpages/trusty/man8/update-alternatives.8.html
I am not an Ubuntu user but I would guess...
update-alternatives --display x-www-browser
update-alternatives --list x-www-browser
sudo update-alternatives --config x-www-browser

Those should help you change things.... some DEs have more specific solutions to do the same.
 
OS Is Mint Cinnamon 19.3

I managed to move the Firefox folder to /opt so that's a bit of progress.
 
OS Is Mint Cinnamon 19.3

I managed to move the Firefox folder to /opt so that's a bit of progress.

Ok cinnamon... create a desktop launch
sudo gedit /usr/share/applications/FirefoxESR.desktop
(or any other terminal editor you like)

add (make sure the exec and icon are pointing to the right things)

[Desktop Entry]
Encoding=UTF-8
Exec=/opt/firefox/firefox
Icon=/opt/firefox/icon.xpm
Type=Application
Terminal=false
Comment=FireFox ESR
Name=FirefoxESR
GenericName=Firefox 52.6 ESR
StartupNotify=false
Categories=Internet;

Save that and you should have a menu item for the program.

From there you should be able to set it as your default browser from the UI I think... if not use
sudo update-alternatives --config x-www-browser
 
Thanks.

Have no menu item. :(

There is no icon.xpm nor any other .xpm file in the Firefox folder.

But now I can click on an external link and it opens with FF. :)
 
OK, getting close. :)

The Firefox icon is mozicon123.png and it'd buried 3 levels deep in the Firefox folder. I copied it to the root of the Firefox folder and Now I have Firefox in the menu. But it's in a folder called other instead of the Internet folder. Just gotta figure out how to move it.
 
Why install from source? Why not just install from the distro's repo? 'apt-get install firefox -y'
 
Decided that it really doesn't matter where Firefox is in the menu, I never launch it that way. I now have icons on the desktop and taskbar and that's all I need.

Thanks guy for all your help. :)
 
Thanks.

Have no menu item. :(

There is no icon.xpm nor any other .xpm file in the Firefox folder.

But now I can click on an external link and it opens with FF. :)

Once you have a .desktop file you can probably use a UI tool to change the icon. You can also point it to any icon you like... chances are you have a icon set installed that has a firefox icon. ;)
 
OK, getting close. :)

The Firefox icon is mozicon123.png and it'd buried 3 levels deep in the Firefox folder. I copied it to the root of the Firefox folder and Now I have Firefox in the menu. But it's in a folder called other instead of the Internet folder. Just gotta figure out how to move it.

Open one of the other programs in the internet cats .desktop file.... and just copy that bit to your firefox .desktop.

Its probably just something simple like a case of caps or something. ;)
 
Thanks. Learned a lot from this ordeal. Just wish I could remember it the next time. :confused:
 
  • Like
Reactions: ChadD
like this
Back
Top