List Info

Thread: include ~/bin in $PATH under kde on debian (sarge)




include ~/bin in $PATH under kde on debian (sarge)
user name
2006-04-26 09:39:43
On kubuntu (and SuSE, IIRC) if I have a ~/bin directory it
gets included
in my $PATH but this doesn't happen under debian. (In all
cases I'm
using kde with kdm as my window manager.)

The ~/.bash_profile of any new users I create has:
""""""""&qu
ot;""""""""
""""""""&quo
t;""""""""&
quot;""""""""
;"""""""
# include .bashrc if it exists
if [ -f ~/.bashrc ]; then
     . ~/.bashrc
fi

# the rest of this file is commented out.

# set PATH so it includes user's private bin if it exists
#if [ -d ~/bin ] ; then
#    PATH=~/bin:"$"
#fi
""""""""&qu
ot;""""""""
""""""""&quo
t;""""""""&
quot;""""""""
;"""""""

In my own .bash_profile I have uncommented the last 4 lines
above but
even after logging out from kde and back in again my $PATH
does not
include ~/bin (although it does work if I log in on a tty
e.g.
Ctrl-Alt-F1). Thus it would seem that .bash_profile is not
run on
startup under kde (nor under gnome, both under kdm).

If I put the code above i.e.

if [ -d ~/bin ] ; then
     PATH=~/bin:"$"
fi

into my .bashrc it does set $PATH for terminals (e.g.
konsole) but 
anything I try to run in ~/bin from K menu->Run Command
is not found
unless I prefix it with ~/bin.

I have also tried putting the code into .xsession.
There seems to be a mechanism in
/etc/X11/Xsession.d/50xfree86-common_determine-startup
for running this file
# If no X session startup program was passed to the Xsession
script as
                                                            
        \ an
# argument (e.g., by the display manager), or if that
program was not
# executable, fall back to looking for a user's custom X
session script,
                                                            
         \if
# allowed by the options file.
if [ -z "$STARTUP" ]; then
   if grep -qs ^allow-user-xsession
"$OPTIONFILE"; then
     for STARTUPFILE in "$USERXSESSION"
"$ALTUSERXSESSION"; do
       if [ -e "$STARTUPFILE" ]; then
         if [ -x "$STARTUPFILE" ]; then
           STARTUP="$STARTUPFILE"
         else
           STARTUP="sh $STARTUPFILE"
         fi
         break
       fi
     done
   fi
fi

The options file:
OPTIONFILE=/etc/X11/Xsession.options
contains the necessary permission, but $STARTUP must be
getting set (I
can't see where or how from looking at Xsession or the
other startup
files in Xsession.d) as .xsession is not being run. (I added
a command
to create a timestamped tag file whenever .xsession is run
and it's not
being run at X session startup.)

I've googled www and usenet and searched debian lists but
not found an
answer to the question of setting the environment for my
whole X
session, not just for console session within X.

I would also like to understand what happens when a gui
session starts
under kdm - what scripts etc get run?

-- 
John Stumbles


-- 
To UNSUBSCRIBE, email to debian-kde-REQUESTlists.debian.org
with a subject of "unsubscribe". Trouble?
Contact listmasterlists.debian.org

include ~/bin in $PATH under kde on debian (sarge)
user name
2006-04-26 10:21:10
On Wednesday 26 April 2006 11:39, John Stumbles wrote:
> On kubuntu (and SuSE, IIRC) if I have a ~/bin directory
it gets included
> in my $PATH but this doesn't happen under debian. (In
all cases I'm
> using kde with kdm as my window manager.)

> I have also tried putting the code into .xsession.
> There seems to be a mechanism in
> /etc/X11/Xsession.d/50xfree86-common_determine-startup
> for running this file
> # If no X session startup program was passed to the
Xsession script as

that requires 'allow-user-xsession' to be set in
/etc/X11/Xsession.options, 
otherwise your .xsession won't be executed.

> I've googled www and usenet and searched debian lists
but not found an
> answer to the question of setting the environment for
my whole X
> session, not just for console session within X.

add a regular shellscript named 
	/etc/X11/Xsession.d/<some-two-digit-number>custom_<
;somedescription> 
that sets the environment the way you want. That should be
run for any full 
x-session regardless of how it is started.

See 'Customizing the startup procedure' in 'man
xsession' for details
-- 
Cheers, cobaco (aka Bart Cornelis)
  
1. Encrypted mail preferred (GPG KeyID: 0x86624ABB)
2. Plain-text mail recommended since I move html and double
    format mails to a low priority folder (they're mainly
spam)
include ~/bin in $PATH under kde on debian (sarge)
user name
2006-04-26 19:37:29
El Miércoles, 26 de Abril de 2006 12:21, cobaco (aka Bart
Cornelis) escribió:
> add a regular shellscript named
>
        /etc/X11/Xsession.d/<some-two-digit-numbe
r>custom_<somedescription>
> that sets the environment the way you want. That should
be run for any full
> x-session regardless of how it is started.

That requires root privileges, and will affect all users.
There is a solution 
which is a little better IMHO.  If you
want to run any script in your KDE 
startup, copy it to a special location, ~/.kde/env/ (if I
recall correctly; 
check the archives if it doesn't work, it was mentioned
here a couple of 
times).

-- 
Alex (a.k.a. suy) - GPG ID 0x0B8B0BC2
http://barnacity.net/ -
Jabber ID: suybulmalug.net

[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )