[Nottingham] TMPDIR weirdness with X logins

Robert Postill nottingham at mailman.lug.org.uk
Thu Sep 11 09:09:01 2003


Robert,
This is one of those peculiarities that sometimes come along almost with 
the express job of making you look stupid :).  Basically it's a question 
of login shell or not login shell.  When you login to a console, you're 
in a login shell and therefore get the bash_profile settings.  When 
you're using a window manager (and it should be true for all window 
managers) and you kick off konsole or xterm or whatever, that's a 
subshell.  The login shell is designed to be run once, subshells many 
times per session with the machine.  For example your login shell may 
contain a diary/alert daemon, that gets run once and stays resident for 
your session.  You wouldn't want that run every time you kicked off an 
xterm session, you'd just be plundering the machines resources. So you 
get a subshell.

Clear as mud now? :)

There's a good bit in UNIX Power Tools on this if you want more info.
Robert.

Robert Davies wrote:

>Anyone happen to have any ideas on this funny?
>
>TMPDIR is set in .bash_profile, other exports from .bash_profile are 
>respected., and I am sure as I have debug log.
>
>Under KDE login, the value is reset to the system default.
>Under blackbox, the value is unset completely.
>
>Other exports are respected, maybe it's an issue because of way initial login 
>is done, and perhaps somewhere the window manager and X startup code, feel 
>need to censor the user environment.
>
>I can override with .bashrc, but I'd like to know why this happening.
>
>Rob
>
>
>_______________________________________________
>Nottingham mailing list
>Nottingham@mailman.lug.org.uk
>http://mailman.lug.org.uk/mailman/listinfo/nottingham
>
>
>  
>