Re: automatic change default working directory after graphical login
- From: Nico Kadel-Garcia <nkadel@xxxxxxxxx>
- Date: Sun, 04 May 2008 12:32:59 +0100
geda.mail@xxxxxxxxx wrote:
On May 3, 6:46 pm, Nico Kadel-Garcia <nka...@xxxxxxxxx> wrote:geda.m...@xxxxxxxxx wrote:short description of the problem:OK, *WHY*????
I would like to automagically change the working directory from $HOME
to, for example, /proj/$USER after the $USER logs into the machine via
the graphical (GUI) login (aka gdm). So, when the $USER opens new
terminal, he/she should be in /proj/$USER and __not__ in $HOME
[side note: I am using tsch as my $SHELL]
A) oo: no, putting 'cd /proj/$USER' into .cshrc is _not_ the solution
B) oo: yes, putting 'cd /proj/$USER' into .login works if the user logs
into the machine using CLI login and then starts the desktop with
'startx' OR if he/she logs to the machine via ssh|telnet. It does not
work for gdm (aka graphical login)
Is your "WHY???" related to A) or to B) ???
No, it's related to the first paragraph, wanting to change the operating directory of an X startup to the /proj/$USER.
$CWD, or 'current working directory', is associated with the current-working-directory fo the X sesseion when it starts. This state will be associated with anything else started in that window, but it's not clear to me why you want to do this. It won't change your $HOME, or where your configuration files are kept, etc. So why do you want to do this?
If it is related to A, the explanation is simple:
because the following script will ___not___ work correctly
-------------------------------
#!/bin/tcsh
echo "Hello World" > test_file
exit
--------------------------------
Let suppose, the user will launch the scrip from /aaa/bbb/cccc. The
sript will NOT create the test_file in the current working directory.
The file will be created in /proj/$USER, which does not make sense...
it is not intuitive.
Yes, I know, #!/bin/tcsh -f can solve the problem. My users wrote a
lot of scripts already without a switch -f so, most of them will not
work correctly anymore
If the 'WHY???' is related to B) then I do not know the answer. I
do not know why is .login NOT executed if the $USER login into the
machine via gdm.
Oooff. The vagaries of what .files get executed is a black art. I believe this one has to do with gdm starting up a shell, not a login session, to preserve the various environmental settings of the X session.
SOLUTION:.
click on this link:
http://mail.gnome.org/archives/gdm-list/2008-May/msg00008.html
or/and
http://mail.gnome.org/archives/gdm-list/2008-May/msg00006.html
or/and
http://mail.gnome.org/archives/gdm-list/2008-May/msg00007.html
- Follow-Ups:
- Re: automatic change default working directory after graphical login
- From: geda . mail
- Re: automatic change default working directory after graphical login
- References:
- automatic change default working directory after graphical login
- From: geda . mail
- Re: automatic change default working directory after graphical login
- From: Nico Kadel-Garcia
- Re: automatic change default working directory after graphical login
- From: geda . mail
- automatic change default working directory after graphical login
- Prev by Date: Re: automatic change default working directory after graphical login
- Next by Date: Re: automatic change default working directory after graphical login
- Previous by thread: Re: automatic change default working directory after graphical login
- Next by thread: Re: automatic change default working directory after graphical login
- Index(es):
Relevant Pages
|
|