automatic tasks at login

automatic tasks at login

Post by thoma » Sat, 17 Jan 2004 11:15:49

Is there some kind of initialization file that is executed each time I
login as a user on my Red Hat Linux 9 system?

At the moment, I have to perform a couple of actions each time I start
the computer until I have my devices (a second hard disk) and preferred
programs (e.g. open the konqueror with file tree on the left and shell
at the bottom) available.

I would like to have a shell script file where I can put entries like

mount /dev/hdb1 /mnt/hdb1
konqueror ~/myworkspace

and that starts each time I login.

Does that exist?

automatic tasks at login

Post by James Knot » Sat, 17 Jan 2004 11:27:11

Look for .bashrc in your home directory. That's where you add such things.
Also, the leading "." indicates a hidden file. If you don't know the file
name, use ls -a to show hidden files.

Fundamentalism is fundamentally wrong.

To reply to this message, replace everything to the left of "@" with


automatic tasks at login

Post by scot » Sat, 17 Jan 2004 11:44:10

thomas < XXXX@XXXXX.COM > writes:

There are three scripts that get run at various times:

X initialization script
(~/.xinitrc, ~/.xsession, et. al)

Shell Login script
(~/.profile, ~/.bash_profile, ~/.bash_login)

Personal initialization script

The X initialization script starts your X session and
desktop (kde, gnome or custom with .xsession). It is
here that you would start X clients (such as konquerer)

The Shell login script is executed once, and once only
when the shell process is first created. This will be
executed each time you create a new xterm(1) if the
-ls (loginshell) flag is set or the *VT100.loginShell: true
attribute is set in your X resources (man xrdb, man xterm).
It will be executed if the shell is invoked via /usr/bin/login
(e.g. via ssh, telnet, rsh or rlogin).

The personal initialization script is executed when an
interactive non-login shell is created. If a non-interactive
non-login shell is run and the BASH_ENV environment variable
names a personal intialization script, it is executed.

The above sequence is a bit different if bash is invoked as sh,
man bash for more information.


automatic tasks at login

Post by Skylar Tho » Mon, 19 Jan 2004 02:01:14

.bashrc probably isn't the best place to put programs that require X, as
there will probably be times when you aren't connected to an X server.
.xinitrc is where I would put it.

-- Skylar Thompson ( XXXX@XXXXX.COM )
-- ~skylar/

automatic tasks at login

Post by Jorge Rive » Mon, 19 Jan 2004 04:59:52

Of course there are alos all the scripts that run when you boot the
computer, which in readHat are in rc.d or init.d....