Linux Format forums Forum Index Linux Format forums
Help, discussion, magazine feedback and more
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Help with PATH
Goto page Previous  1, 2
 
Post new topic   Reply to topic    Linux Format forums Forum Index -> Help!
View previous topic :: View next topic  
Author Message
nelz
Site admin


Joined: Mon Apr 04, 2005 12:52 pm
Posts: 8450
Location: Warrington, UK

PostPosted: Sun Jan 12, 2014 7:15 pm    Post subject: Reply with quote

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)
Back to top
View user's profile Send private message
DavePritchard



Joined: Tue Jan 09, 2007 10:55 pm
Posts: 46
Location: Somerset UK

PostPosted: Mon Jan 13, 2014 11:21 am    Post subject: Help with PATH Reply with quote

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 )
Back to top
View user's profile Send private message
MartyBartfast
LXF regular


Joined: Mon Aug 22, 2005 8:25 am
Posts: 814
Location: Hants, UK

PostPosted: Mon Jan 13, 2014 12:08 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
nelz
Site admin


Joined: Mon Apr 04, 2005 12:52 pm
Posts: 8450
Location: Warrington, UK

PostPosted: Mon Jan 13, 2014 1:04 pm    Post subject: Reply with quote

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)
Back to top
View user's profile Send private message
DavePritchard



Joined: Tue Jan 09, 2007 10:55 pm
Posts: 46
Location: Somerset UK

PostPosted: Mon Jan 13, 2014 10:07 pm    Post subject: Help with PATH Reply with quote

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
Back to top
View user's profile Send private message
DavePritchard



Joined: Tue Jan 09, 2007 10:55 pm
Posts: 46
Location: Somerset UK

PostPosted: Mon Jan 13, 2014 10:14 pm    Post subject: Help with PATH Reply with quote

Confusion abounds, I missed the second page, oops.
Back to top
View user's profile Send private message
View previous topic :: View next topic  
Display posts from previous:   
Post new topic   Reply to topic    Linux Format forums Forum Index -> Help! All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Linux Format forums topic RSS feed 


Powered by phpBB © 2001, 2005 phpBB Group


Copyright 2011 Future Publishing, all rights reserved.


Web hosting by UKFast