[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

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



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:
""""""""""""""""""""""""""""""""""""""""""""""""""
# 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:"${PATH}"
#fi
""""""""""""""""""""""""""""""""""""""""""""""""""

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:"${PATH}"
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



Reply to: