LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Puppy
User Name
Password
Puppy This forum is for the discussion of Puppy Linux.

Notices


Reply
  Search this Thread
Old 12-06-2014, 08:06 PM   #1
Fixit7
Senior Member
 
Registered: Mar 2014
Location: El Lago, Texas
Distribution: Ubuntu_Mate 16.04
Posts: 1,374

Rep: Reputation: 169Reputation: 169
Run scripts from any directory


This is my path.

Can I add my script directory to it so I can run scripts from anywhere ?

Code:
# echo $PATH
/usr/lib/qt/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/X11R7/bin:/root/my-applications/bin:/usr/games:/opt/bin:/opt/sbin:/opt/qt4/bin:/usr/lib/qt/bin
#

Last edited by Fixit7; 12-06-2014 at 08:08 PM.
 
Old 12-06-2014, 09:01 PM   #2
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,340

Rep: Reputation: Disabled
Sure you can.

If you want the change to affect all user accounts, modify the path setting in /etc/profile. If you just want to alter the path for your user account, try editing .bashrc (note the leading dot) in your home directory.
 
1 members found this post helpful.
Old 12-07-2014, 12:17 AM   #3
SAbhi
Member
 
Registered: Aug 2009
Location: Bangaluru, India
Distribution: CentOS 6.5, SuSE SLED/ SLES 10.2 SP2 /11.2, Fedora 11/16
Posts: 665

Rep: Reputation: Disabled
Yes you can , sometimes i use to define "source" directory too.
 
1 members found this post helpful.
Old 12-07-2014, 05:06 AM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by Fixit7 View Post
Code:
# echo $PATH
/usr/lib/qt/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/X11R7/bin:/root/my-applications/bin:/usr/games:/opt/bin:/opt/sbin:/opt/qt4/bin:/usr/lib/qt/bin
#
Not good. Please try to avoid running things as root.
 
2 members found this post helpful.
Old 12-07-2014, 12:31 PM   #5
Fixit7
Senior Member
 
Registered: Mar 2014
Location: El Lago, Texas
Distribution: Ubuntu_Mate 16.04
Posts: 1,374

Original Poster
Rep: Reputation: 169Reputation: 169
thanks unSpawn.

Is adding root/my-applications safer than adding /root/Scripts/ ?

I thought Puppy is designed to run as root ?
 
Old 12-07-2014, 07:45 PM   #6
SAbhi
Member
 
Registered: Aug 2009
Location: Bangaluru, India
Distribution: CentOS 6.5, SuSE SLED/ SLES 10.2 SP2 /11.2, Fedora 11/16
Posts: 665

Rep: Reputation: Disabled
Quote:
Originally Posted by Fixit7 View Post
thanks unSpawn.

Is adding root/my-applications safer than adding /root/Scripts/ ?

I thought Puppy is designed to run as root ?
NO.. he suggested not to run as root means he want you to run as a normal user.
In case you are using puppy "fido" is what i heard of can be used just like a sudo privileged user in other distros though i am not quite sure about it.
 
  


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
[SOLVED] "Options ExecCGI is off in this directory" (unable to run perl scripts in userdir) andreo73 Linux - Server 3 01-17-2014 08:59 AM
Unable to run another command from within shell script, when run from home directory blackray1 Linux - Newbie 7 07-01-2013 09:42 AM
Script to run all the python scripts from particular directory mandar.nandale Linux - General 4 05-08-2012 01:29 AM
How to run fsck during a shutdown sequence, or how to run one-time init scripts? bgoodr Debian 5 11-28-2010 03:08 PM
directory scripts Murdock1979 Programming 15 03-28-2006 11:35 AM

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

All times are GMT -5. The time now is 10:28 AM.

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