SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I typically use slackbuilds for most my apps, so things are kept tidy. But I have recently started using the "Tor-Browser Bundle" which is just a self contained program that runs without install from a few files in its own directory.
Currently I have it just running from my home directory "/home/<username>/tor/", but I would like to put it somewhere where it should go. I know /opt is a common location for "optional software" but when i move it there "/opt/tor/" it fails to run due to permission errors it seems on a config file in its directory.
Do I need to make the "/opt/tor" directory owned by my user? or change the permissions on that folder?
I have been reading alot about this today and I know this is prolly a simple question, but I just want to get in the habit of using the best practices from the get go...
Even if something is installed to /opt it should still be writing user specific stuff into $HOME. and /var/opt/$program is the appropriate place for non user specific application data, so no, your /opt directory should not be writeable by a normal user. To get the programs to do this might require some engineering on your part, either by wrapper scripts that set specific command-line options or environment variable to point the program to the correct places to store it's stuff, or via judicious use of symlinks.
How and what you will need to do will be different for every application, and using /opt tends to work best when something is specifically designed or built to run from it.
Can't really offer anything more on this as I have no experience with this "tor bundle", but hopefully that has given you some insight into what you are aiming for should you wish to try.
If I were you though I'd be inclined to use the tor build from slackbuilds.org and save yourself some effort.
For software which is installed by a package manager: let it store itself as usual.
For a software bundle which is destined to a single particular user: place it in a hidden folder in the user's home.
For a software bundle supposed to be accessed by any user: place it in /opt with extremely carefully designed permissions. /opt is supposed to be there for this kind of cases.
Kernels and kernel modules: track the files by hand (just what I do, even when you can make a package if you want).
$HOME/.local/{bin,lib,share} because this convention is already in use by several distros. You can also find reference to $HOME/.local/share in the XDG Base Directory Specification. For example, if you drop a desktop file in $HOME/.local/share/applications it will be picked up by major desktop environments, as will icons in $HOME/.local/share/icons and $HOME/.local/share/mime for mime files.
P.S. This is also the directory structure that Opera uses by default when installed in single-user mode via the provided install script.
$HOME/.opt would probably be a good option for stuff that doesn't conform to a typical UNIX application layout and is analogous to $HOME/.local but I don't know if this is in common use or standardised at all in the way that $HOME/.local is.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.