2

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.

sigil
  • 479

1 Answers1

2

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.

Rinzwind
  • 299,756