Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

/usr/local/bin

Programming languages, Coding, Executables, Package Creation, and Scripting.
Post Reply
Message
Author
Lavene
Site admin
Site admin
Posts: 4958
Joined: 2006-01-04 04:26
Location: Oslo, Norway

/usr/local/bin

#1 Post by Lavene »

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

Grifter
Posts: 1554
Joined: 2006-05-04 07:53
Location: Svea Rike

#2 Post by Grifter »

yes, there it will not interfere with apt
Eagles may soar, but weasels don't get sucked into jet engines...

thamarok

#3 Post by thamarok »

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/?

Grifter
Posts: 1554
Joined: 2006-05-04 07:53
Location: Svea Rike

#4 Post by Grifter »

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

thamarok

#5 Post by thamarok »

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

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

#6 Post by Lavene »

Thanks to the Oracle of Sweden :)

Tina

thamarok

#7 Post by thamarok »

Lavene wrote:Thanks to the Oracle of Sweden :)

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

ajdlinux
Posts: 2452
Joined: 2006-04-23 09:37
Location: Port Macquarie, NSW, Australia

#8 Post by ajdlinux »

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

Post Reply