Score:2

Where do I install portable apps?

us flag

I'm trying to install an app from tar.xz. It is portable, meaning I have only to unpack it to some directory and it should run from there as normal user. But where do I unpack it to?

Google recommends /opt but it is owned by root and I cannot write to it as normal user. If I create a subdirectory there as root and copy the files as root, the apps runs correctly only as root. When run as normal user, it cannot write its own config. Obviously.

So, where should I install it?

ETA The accepted answer in the linked (for some reason) question does not work for me. It suggest /opt which breaks the app due to permissions.

Artur Meinild avatar
vn flag
Does this answer your question? [When installing user applications, where do "best practices" suggest they be located?](https://askubuntu.com/questions/1148/when-installing-user-applications-where-do-best-practices-suggest-they-be-loc)
Artur Meinild avatar
vn flag
From the duplicate, `~/opt/` or `~/bin/` would be good choices. But in the end you decide - and add to your `PATH`.
us flag
@ArturMeinild The accepted answer to use `/opt` does not work for me. I think I saw that one already. Comments there suggest to use my normal user home... Sounds funny but I guess I could go with that. Still funny.
Artur Meinild avatar
vn flag
This is because it isn't an exact science. You can put anything anywhere you want, as long as you're content with it (and have it in your `PATH`). Just because an answer is accepted doesn't mean it's the only true answer - just that it worked for the original poster.
Artur Meinild avatar
vn flag
There is another answer with 42 upvotes that suggest `/home/user/opt/` - why isn't that working for you?
Joepie Es avatar
eg flag
Because it is a portable you don't install it. You just unpack it. If you are going to use more portables you can make a folder 'Portables' in your home directory.
Score:2
cn flag

Google recommends /opt but it is owned by root and I cannot write to it as normal user. If I create a subdirectory there as root and copy the files as root, the apps runs correctly only as root. When run as normal user, it cannot write its own config. Obviously.

No.

You install it in /opt using sudo and then change the owner of the directory of the app to your user. So if the software installs to mysoftware.v1

sudo chown $USER:$USER -r mysoftware.v1

and you can use this software and edit configuration.


Mind though that /opt is for installing software used globally (by more than one user) and it tends to use a script or service to connect to the software.

If this is intended for a single user you should install it in its own directory in your /home/$USER/ (and you could do ~/opt/mysoftware.v1/ (if you intend to install more) or ~/mysoftware.v1) and add the directory to your PATH if you need to start it from anywhere.

Joepie Es avatar
eg flag
You don't install portables. You just unpack them.
cn flag
Unpacking is the basically the same as installing: you download or copy a container holding software and place it somewhere.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.