LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 08-09-2012, 06:03 PM   #1
Alstare
Member
 
Registered: Jul 2003
Location: Ontario, Canada
Distribution: Slackware
Posts: 79

Rep: Reputation: 15
Best practice/location for user apps...


Quick question today on best practices...

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...

Thanks in advance for any help!
 
Old 08-09-2012, 07:20 PM   #2
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Rep: Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019
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.
 
1 members found this post helpful.
Old 08-10-2012, 10:46 PM   #3
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,225

Rep: Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320
I put them in ~/Software.
 
1 members found this post helpful.
Old 08-10-2012, 10:52 PM   #4
Alstare
Member
 
Registered: Jul 2003
Location: Ontario, Canada
Distribution: Slackware
Posts: 79

Original Poster
Rep: Reputation: 15
Thumbs up

Thanks for the advice guys...

I think I will give the ~/Software a try since that follws my standard home directory structure I use now for other things.
 
Old 08-12-2012, 11:38 AM   #5
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
I put them in ~/lib and scripts and binaries in ~/bin.
 
1 members found this post helpful.
Old 08-12-2012, 12:37 PM   #6
BlackRider
Member
 
Registered: Aug 2011
Posts: 295

Rep: Reputation: 101Reputation: 101
I use the following rules:

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).
 
1 members found this post helpful.
Old 08-12-2012, 12:56 PM   #7
ruario
Senior Member
 
Registered: Jan 2011
Location: Oslo, Norway
Distribution: Slackware
Posts: 2,557

Rep: Reputation: 1762Reputation: 1762Reputation: 1762Reputation: 1762Reputation: 1762Reputation: 1762Reputation: 1762Reputation: 1762Reputation: 1762Reputation: 1762Reputation: 1762
$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.
 
4 members found this post helpful.
Old 08-12-2012, 01:03 PM   #8
ruario
Senior Member
 
Registered: Jan 2011
Location: Oslo, Norway
Distribution: Slackware
Posts: 2,557

Rep: Reputation: 1762Reputation: 1762Reputation: 1762Reputation: 1762Reputation: 1762Reputation: 1762Reputation: 1762Reputation: 1762Reputation: 1762Reputation: 1762Reputation: 1762
$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.
 
1 members found this post helpful.
Old 08-12-2012, 11:29 PM   #9
Alstare
Member
 
Registered: Jul 2003
Location: Ontario, Canada
Distribution: Slackware
Posts: 79

Original Poster
Rep: Reputation: 15
Thanks again to everyone for the helpful suggestions...

This topic has opened my eyes abit more to refining my home folder structure beyond just my original questions.

Beers all around on me!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ssh best practice: key pairs per user or OS? Other considerations? mrtwice Linux - Security 2 04-20-2010 09:41 PM
Documentation location in kde apps Michael_aust Linux - General 0 08-20-2006 05:44 PM
how to get apps to start in same screen location futz Linux - Newbie 2 07-16-2005 06:05 PM
installing and managing new apps. good practice! bikov_k Linux - Newbie 4 10-02-2004 04:23 PM
best practice for bldg & moving apps cparliament Linux - General 1 06-27-2002 04:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:51 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration