RE: running scripts when logging in (via X)

From: Mark D. Hansen (m.hansen23_at_verizon.net)
Date: 11/30/04

  • Next message: Dave Carrigan: "Re: TV Tuner / Sound Card issues"
    Date: Tue, 30 Nov 2004 12:13:31 -0500
    To: "Sam Watkins" <swatkins@fastmail.fm>
    
    

    When I first log in (after reboot), I'm logging in to an fvwm session.
    /etc/profile and ~/.bash_profile definitely are not being run. Any
    ideas?

    > -----Original Message-----
    > From: Sam Watkins [mailto:swatkins@fastmail.fm]
    > Sent: Tuesday, November 30, 2004 10:26 AM
    > To: Mark D. Hansen
    > Cc: debian-user@lists.debian.org
    > Subject: Re: running scripts when logging in (via X)
    >
    >
    > On Tue, Nov 30, 2004 at 09:04:17AM -0500, Mark D. Hansen wrote:
    > > When I reboot my Debian box, the login comes up in an X
    > environment. I
    > > notice that my login scripts (e.g., /etc/profile,
    > .bash_profile) do not run.
    > >
    > > How to I get these scripts to run when I login via X ??
    >
    >
    >
    > /etc/profile and ~/.bash_profile are only supposed to run
    > when you first login,
    > rather than every time you start a new shell or open a new xterm.
    >
    > ~/.bashrc is run every time you start a new shell.
    >
    >
    >
    > Are you sure that the display managers like "xdm", "gdm",
    > "kdm" don't run
    > /etc/profile or ~/.bash_profile when you login ?
    >
    > I tried with xdm, and apparently it _does_ run both of these.
    > I think it's a
    > bit weird that it runs ~/.bash_profile! apparently this is
    > because the
    > Xsession script is executed using bash.
    >
    > I assume that /etc/profile and ~/.bash_profile get run no
    > matter which display
    > manager you use since Xsession is common to all of them.
    >
    >
    >
    > Perhaps you were expecting the profile scripts to get run
    > every time you open
    > an xterm? they don't. Put stuff you want to be run every
    > time you open an
    > xterm in ~/.bashrc instead.
    >
    > Creating a new "screen" apparently counts as "logging in" -
    > it does run
    > /etc/profile and ~/.bash_profile. That seems a bit bogus.
    >
    > (in case you don't know what screen is, it's a useful program
    > that prevents
    > your terminals / shells dying if X dies, among other things!
    > see "apt-cache
    > show screen")
    >
    >
    >
    > Sam
    >


  • Next message: Dave Carrigan: "Re: TV Tuner / Sound Card issues"

    Relevant Pages

    • Re: My PC just broke down.... :(
      ... Windows just reboots mid-operation. ... All it said was to type exit to reboot. ... >> assumed that this was the common Windows command shell (a'la DOS ...
      (comp.sys.mac.advocacy)
    • Re: Possible dcache BUG
      ... I just had to reboot again. ... done, I hit a q to quit less, and the whole shell went ... I quit the top program to free that shell, ... of meaning to report. ...
      (Linux-Kernel)
    • Re: process /etc/profile Redhat
      ... any need to reboot in relation to /etc/profile. ... as a non-interactive shell with the --login option, ... it first reads and executes commands from the file ...
      (comp.os.linux.misc)
    • Re: [SLE] changing the roots shell
      ... changing the shell field by a direct ... Solaris and SunOS are Unices, ... The only reason for the reboot was try to do the same thing you did. ... I think that SuSE has been very close to the LSB standard. ...
      (SuSE)
    • Re: Media Player 10 Mini toolbar problem
      ... mini-player is turned off before I reboot. ... the shell doesn't necessarily release the taskbar player ... See http://www.zachd.com/pss/pss.html for some helpful WMP info. ...
      (microsoft.public.windowsmedia.player)