Help with PATH

The place to post if you need help or advice

Moderators: ChrisThornett, LXF moderators

Postby nelz » Sun Jan 12, 2014 7:15 pm

That would do it, I have no such command in /etc/X11/xinit so it appear to be either a distro or DE addition.

So my previous point stands, you cannot guarantee ~/.profile being executed on every system.
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
User avatar
nelz
Site admin
 
Posts: 8577
Joined: Mon Apr 04, 2005 11:52 am
Location: Warrington, UK

Help with PATH

Postby DavePritchard » Mon Jan 13, 2014 11:21 am

Thanks for all the replies, unfortunately I got confused and totally lost by it all.
The PATH needs to be changed for just one programme, the XDS M2 Compiler, the system is KDE with just me as the user.

I tried the following, but the result means nothing to me.
CODE
grep profile ~/.bash*
/home/dave/.bash_profile:# .bash_profile

I also tried :-
grep ~/.profile and cat ~/.profile
with no result.

(why why why is Linux so user hostile )
DavePritchard
 
Posts: 52
Joined: Tue Jan 09, 2007 10:55 pm
Location: Somerset UK

Postby MartyBartfast » Mon Jan 13, 2014 12:08 pm

I think what it boils down to is go with my original suggestion (the first reply), everything since has been an interesting diversion, which you don't need to worry about.
I have been touched by his noodly appendage.
User avatar
MartyBartfast
LXF regular
 
Posts: 820
Joined: Mon Aug 22, 2005 7:25 am
Location: Hants, UK

Postby nelz » Mon Jan 13, 2014 1:04 pm

That is the best solution, much of the continuing discussion was about why other suggestion were less reliable.

It's not that Linux is hostile, just that some programs are inconsiderate in going about things their own way when there is already a perfectly acceptable way of doing things, resulting is too many confusing choices. That's the price of freedom.
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
User avatar
nelz
Site admin
 
Posts: 8577
Joined: Mon Apr 04, 2005 11:52 am
Location: Warrington, UK

Help with PATH

Postby DavePritchard » Mon Jan 13, 2014 10:07 pm

Thanks for all the replies,
but I am now totally confused.

The PATH needs to be changed just for one programme, ie the XDS M2 Compiler, the system is KDE with just one user.

~/.profile does not exist.

As suggested I tried the following, the result is meaningless to me.
CODE
grep profile ~/.bash*
/home/dave/.bash_history:grep profile ~./bash*
/home/dave/.bash_history:grep profile ~/.bash*
/home/dave/.bash_history:grep ~/.profile
/home/dave/.bash_profile:# .bash_profile

So perhaps I should try /etc/profile, but where in the following do I insert the
/usr/local/xds/bin statement.

CODE ( /etc/profile ).
# /etc/profile -*- Mode: shell-script -*-
# (c) MandrakeSoft, Chmouel Boudjnah <chmouel@mandrakesoft.com>

loginsh=1

if [ "$UID" -ge 500 ] && ! echo ${PATH} |grep -q /usr/games ; then
PATH=$PATH:/usr/games
fi

umask 022

USER=`id -un`
LOGNAME=$USER
MAIL="/var/spool/mail/$USER"
HISTCONTROL=ignoredups
HOSTNAME=`/bin/hostname`
HISTSIZE=1000

if [ -z "$INPUTRC" -a ! -f "$HOME/.inputrc" ]; then
INPUTRC=/etc/inputrc
fi

# some old programs still use it (eg: "man"), and it is also
# required for level1 compliance for LI18NUX2000
NLSPATH=/usr/share/locale/%l/%N

export PATH PS1 USER LOGNAME MAIL HOSTNAME INPUTRC NLSPATH
export HISTCONTROL HISTSIZE

for i in /etc/profile.d/*.sh ; do
if [ -r $i ]; then
. $i
fi
done

unset i
DavePritchard
 
Posts: 52
Joined: Tue Jan 09, 2007 10:55 pm
Location: Somerset UK

Help with PATH

Postby DavePritchard » Mon Jan 13, 2014 10:14 pm

Confusion abounds, I missed the second page, oops.
DavePritchard
 
Posts: 52
Joined: Tue Jan 09, 2007 10:55 pm
Location: Somerset UK

Previous

Return to Help!

Who is online

Users browsing this forum: No registered users and 2 guests