Linux MS DOS discussions
 help / color / mirror / Atom feed
From: Victor Warner <vwarner@waitrose.com>
To: linux-msdos@vger.kernel.org
Subject: Re: Running dosemu as a user
Date: Tue, 03 Jan 2006 17:05:23 +0000	[thread overview]
Message-ID: <E1Etpb9-000J00-F5@webm9.global.net.uk> (raw)

Peter, 
 
Thank you for the information. Your very helpful explanation pre-empted a 
question: that if I just add a PATH variable for /usr/local/bin whether I 
would overwrite any PATH variables. It seems clear that this will not 
happen. 
 
Also thank for providing: 
"~/.bash_profile (not .bashrc) file: 
 
        if ! echo "$PATH" | grep "/usr/local/bin"; then 
           PATH="$PATH:/usr/local/bin" 
        fi 
        export PATH" 
 
What you and Mike have written has put a lot of information in context.  
 
I have never heard of Rube Goldberg. But looking at his web site I can see 
the resemblance... 
 
Victor Warner 
 
 
 
 
On Tue, 03 Jan 2006 09:03 , Peter B. Steiger <wyo_wl001@bresnan.net> sent: 
 
>On Tue, 2006-01-03 at 14:42 +0000, Victor Warner wrote: 
>> However, Linspire does not store the PATH for a user in .profile 
or .bashrc  
>> files (where ever they are located).  
> 
>Victor, 
>Linspire can't put PATH anywhere that other Linux distros put it; under 
>all the fancy decorations it's still running the startup (SysV init) and 
>console shell (probably bash) as any other Linux. 
> 
>Adding to what Mike said, the dotted files (.profile and .bashrc) are 
>only used for changes each user might want to make personally to what 
>the system sets up for all users.  For example, the system might decree 
>that only /bin and /usr/bin are in the path, but you might want to 
>add /usr/local/bin to that path.  Fred might want his path to include 
>his personal directory (/home/fred/bin), and so on.  When Mike talks 
>about ~/.profile, the tilde is a shortcut that means "the /home 
>directory for the login you are currently using".  If you are root, ~ 
>is /root.  If you are rumplestiltskin, ~ is /home/rumplestiltskin.  So 
>each ~/.profile is different for each login. 
> 
>Now, when you first log in, three environment setting scripts are run in 
>this order: /etc/security/pam_env.conf (if they use pluggable 
>authentication modules for security, which they probably do), 
>then /etc/profile, then ~/.bash_profile.  The first two are run for 
>every user as soon as you log in, so even if you don't have 
>a .bash_profile or .profile or .bashrc in your home directory, you will 
>have the same basic path set that everyone has. 
> 
>So, if the default path does not include a path to the dosemu binary, 
>add this to your ~/.bash_profile (not .bashrc) file: 
> 
>        if ! echo "$PATH" | grep "/usr/local/bin"; then 
>           PATH="$PATH:/usr/local/bin" 
>        fi 
>        export PATH 
>         
>The "if" line ensures that if /usr/local/bin is already part of the 
>path, it won't get re-added every time the shell invokes another child 
>copy - with the result that your path would include /usr/local/bin 
>numerous times. 
> 
>Clear as mud? {grin} I spent several hours one day tracing through the 
>login and shell startup processes to see which scripts get invoked when, 
>and I finally have a pretty good idea of how it all works.  A flowchart 
>would resemble a Rube Goldberg illustration! 
> 
>Regarding Mike's instructions on how to examine the current PATH value 
>from a console shell:  I've been using DOS in some form for 25 years, so 
>I added aliases to mimic DOS commands: 
>alias path='echo $PATH' 
>alias ver='cat /proc/ver' 
>alias del='rm' 
>alias dir='ls' 
> 
>I also renamed my /etc/rc.d/init.d/functions file to config.sys, 
>and /etc/rc.d/rc.sysinit to autoexec.bat, but that's just because I have 
>a sick sense of humor. 
> 
>--  
>Peter B. Steiger 
>Cheyenne, WY 
> 
> 
 
 

---- Message sent via Waitrose Webmail - http://www.waitrose.com/

             reply	other threads:[~2006-01-03 17:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-03 17:05 Victor Warner [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-01-03 14:42 Running dosemu as a user Victor Warner
2005-12-29 13:47 Victor Warner
2005-12-29 17:58 ` Mike McCarty
2005-12-30  0:16   ` Victor Warner
2005-12-30  1:45     ` Mike McCarty

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1Etpb9-000J00-F5@webm9.global.net.uk \
    --to=vwarner@waitrose.com \
    --cc=linux-msdos@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox