/usr/local/bin

Need help with C, C++, perl, python, etc?

/usr/local/bin

Postby Lavene » 2007-01-17 09:44

A quick question: In order to make a program as easy as possible to execute, is it regarded OK to put the executable(s) in /usr/local/bin?

Tina
Lavene
Site admin
 
Posts: 5096
Joined: 2006-01-04 04:26
Location: Oslo, Norway

Postby Grifter » 2007-01-17 11:28

yes, there it will not interfere with apt
Eagles may soar, but weasels don't get sucked into jet engines...
Grifter
 
Posts: 1572
Joined: 2006-05-04 07:53
Location: Svea Rike

Postby thamarok » 2007-01-17 12:53

Extending the question: Would it be good practice to make your own made programs install to /usr/local/bin/ and config files and others to /usr/share/?
thamarok
 

Postby Grifter » 2007-01-17 13:01

non-package config files go into /usr/local/etc, but other than that yes

just download a source package and look thru its makefiles and configure scripts, /usr/local exists so that you can put files there without worrying about messing up the package manager
Eagles may soar, but weasels don't get sucked into jet engines...
Grifter
 
Posts: 1572
Joined: 2006-05-04 07:53
Location: Svea Rike

Postby thamarok » 2007-01-17 13:08

I mean, if I install xaralx, it puts the binary to /usr/bin/xaralx and not /usr/local/bin/xaralx.. so if I was the maker of Xara LX, would it be good practice to make the program install the binaries to /usr/local/bin/?

And a lot of programs use /usr/share/ for their configs.. here to list a few (but note that some of these programs use other paths aswell):
XMMS
MPlayer
Firefox/Iceweasel
ALSA
MySQL
thamarok
 

Postby Lavene » 2007-01-17 13:15

Thanks to the Oracle of Sweden :)

Tina
Lavene
Site admin
 
Posts: 5096
Joined: 2006-01-04 04:26
Location: Oslo, Norway

Postby thamarok » 2007-01-17 17:20

Lavene wrote:Thanks to the Oracle of Sweden :)

Tina


Stop day-dreaming of ponies and Oracles of Sweden :wink:
thamarok
 

Postby ajdlinux » 2007-01-17 23:50

thamarok wrote:I mean, if I install xaralx, it puts the binary to /usr/bin/xaralx and not /usr/local/bin/xaralx.. so if I was the maker of Xara LX, would it be good practice to make the program install the binaries to /usr/local/bin/?


If the software can easily be removed it can be installed in /usr rather than /usr/local however if you touch /usr you have to remember that dpkg/apt could overwrite files at any time. For xaralx I think it's OK.

And a lot of programs use /usr/share/ for their configs.. here to list a few (but note that some of these programs use other paths aswell):
XMMS
MPlayer
Firefox/Iceweasel
ALSA
MySQL


Programs that use /usr/share for *configuration* files should have SERIOUS bugs filed. /etc is where configuration files belong, /usr/share is for arch-independent data files, including graphics, documentation (including *sample* configuration files), game levels, etc.

When installing in /usr/local configs go to /usr/local/etc and share files go to /usr/local/share.
Jabber: xmpp:ajdlinux@jabber.org.au
Spammers, email this: ajdspambucket@exemail.com.au
ajdlinux
 
Posts: 2480
Joined: 2006-04-23 09:37
Location: Port Macquarie, NSW, Australia


Return to Programming

Who is online

Users browsing this forum: No registered users and 8 guests

fashionable