Re: automatic change default working directory after graphical login



geda.mail@xxxxxxxxx wrote:
short description of the problem:
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]

oo: no, putting 'cd /proj/$USER' into .cshrc is _not_ the solution

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)

OK, *WHY*????

That said, perhaps you can look at '.xinitrc' to do the cd first, then start up your X session? The default one is usually called by the 'startx' init script: you can get some hints from that, or from the 'gdmrc' files if you use gdm to provide graphical logins.

oo: no, adding 'cd /proj/$USER' to the file Default or Xsession does
__not__ work.

/etc/gdm/PostLogin/Default
/etc/gdm/PreSession/Default
/etc/gdm/Xsession

oo: no, I do not want to change variable $HOME to point to /proj/$USER

oo: no, I do not want to modify /etc/passwd file

Simply put, I am out of ideas. Any hint, RTFM pointer or solution is
appreciated.
.



Relevant Pages

  • Re: automatic change default working directory after graphical login
    ... the graphical login (aka gdm). ... putting 'cd /proj/$USER' into .login works if the user logs ... $CWD, or 'current working directory', is associated with the current-working-directory fo the X sesseion when it starts. ...
    (linux.redhat.misc)
  • automatic change default working directory after graphical login
    ... 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 login (aka gdm). ...
    (linux.redhat.misc)
  • Re: automatic change default working directory after graphical login
    ... 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 login (aka gdm). ...
    (linux.redhat.misc)
  • Re: Web login problem
    ... Thanks Timo, the problem is that most of the time i do not want the page to ... do anything within the application, but when in the login page ... When user logs out the cookie is disposed. ... Setting this value to zero reloads page every time. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: User Authentication and password protection of several files
    ... I need a login page where user inputs a password and an email address. ... User clicks on one of the l inks in mainpage.php and watches a video ... All pages in this setup a) need to be protected, ... When the user logs in, set a value in the $_SESSION array. ...
    (comp.lang.php)