You are not logged in.

#1 2007-11-26 22:27:36

Flasher
Member
From: Bavaria / Germany
Registered: 2005-04-24
Posts: 126

Where to place scripts correctly?

Hi!

In the last days I wrote a special login/mount script for my linux-clients, to automatically mount all share for a specific user. It works perfectly smile

But I don't know, where is the right place for this script. It's a global script for all users on the system.

I moved it to /usr/local/bin, correct?

Best regards,

Flasher

Offline

#2 2007-11-26 22:29:54

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Where to place scripts correctly?

Yeah, typically system-wide stuff like that would be placed in /usr/local, and personal scripts go in ~/

For instance, if the script was for more than just me, it'd go to /usr/local/bin/, but if it was for only me, I'd do it in ~/bin/

Offline

#3 2007-11-26 23:55:17

Flasher
Member
From: Bavaria / Germany
Registered: 2005-04-24
Posts: 126

Re: Where to place scripts correctly?

Wow help from the big boss wink Thank you!

Why I don't get help from Bill Gates, when I have windows problems? lol

Greetings,

Flasher

Offline

#4 2007-11-27 00:37:34

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Where to place scripts correctly?

Flasher wrote:

Wow help from the big boss wink Thank you!

Hah, I didn't get that post count doing nothing big_smile

Offline

#5 2007-11-27 10:31:21

ReaphSharc
Member
From: the Netherlands
Registered: 2007-11-05
Posts: 138
Website

Re: Where to place scripts correctly?

Flasher wrote:

Why I don't get help from Bill Gates, when I have windows problems? lol

Because you are currently 759,027,890,875,902,869,057,472,907,858,907,278,976,903,478,690,582,906 in line for help with your oldest windows problem. big_smile:D:D

(horribly off-topic, but sorry; couldn't resist that one...)


Do you want a Bubble Icon? Feel free to submit your requests or personal creations to be included in future releases.
I'm 100% Linux!

Offline

#6 2007-11-28 14:59:45

jacko
Member
Registered: 2007-11-23
Posts: 840

Re: Where to place scripts correctly?

I tried to put my pacman-cage script in /usr/local/bin and I had type out the full path to run the script in terminal.

I put it in /usr/bin where everything else is located and it runs...

pacman-cage

from terminal. So where do script files go again if they are to be used system wide?

Offline

#7 2007-11-28 16:33:12

firecat53
Member
From: Lake Stevens, WA, USA
Registered: 2007-05-14
Posts: 1,542
Website

Re: Where to place scripts correctly?

/usr/local/bin or /usr/local/sbin are still good places.....you just need to update your PATH variable smile

Scott

Offline

#8 2007-11-28 17:39:06

jacko
Member
Registered: 2007-11-23
Posts: 840

Re: Where to place scripts correctly?

firecat53 wrote:

/usr/local/bin or /usr/local/sbin are still good places.....you just need to update your PATH variable smile

Scott

do u wanna expand on your answer a little more?

Offline

#9 2007-11-28 17:47:20

tehanomaly
Member
From: UK
Registered: 2007-11-28
Posts: 12

Re: Where to place scripts correctly?

add the line

export PATH=/usr/local/bin:/usr/local/sbin:$PATH

to your ~/.bashrc file or to make it global, your /etc/rc.local file.

/usr/local/bin is a nice place to keep custom scripts as it isn't generally used by Arch packages (they default to /usr/bin)


'I cannot teach anybody anything, I can only make them think...'

Offline

#10 2007-11-28 18:26:07

fflarex
Member
Registered: 2007-09-15
Posts: 466

Re: Where to place scripts correctly?

Anyone else here feel an irrational need to keep their personal scripts in ~/.bin to hide it from graphical file managers?

Offline

#11 2007-11-28 19:10:22

hybrid
Member
Registered: 2007-02-05
Posts: 261

Re: Where to place scripts correctly?

nope.
Not at all.

Offline

#12 2007-11-28 19:52:43

nogoma
Member
From: Cranston, RI
Registered: 2006-03-01
Posts: 217

Re: Where to place scripts correctly?

fflarex wrote:

Anyone else here feel an irrational need to keep their personal scripts in ~/.bin to hide it from graphical file managers?

Yep, I in fact keep ~/.bin which symlinks to dirs like ~/.scripts (scripts I wrote), ~/.apps (third party apps that didn't warrant an install via pacman), etc. Don't need that clutter when ls'ing or browsing w/ konqueror.


-nogoma
---
Code Happy, Code Ruby!
http://www.last.fm/user/nogoma/

Offline

Board footer

Powered by FluxBB