LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-26-2006, 10:18 PM   #1
GuyWhoKilledBear
LQ Newbie
 
Registered: Nov 2006
Distribution: Slackware, Linux from Scratch, Ubuntu
Posts: 24

Rep: Reputation: 16
What script runs when a user logs in?


I'd like to modify the script that runs when a user logs in to replace the fortune cookie program. I have the replacement fortune program all set up, I just need to know what script runs when the user logs in so I can change that.

Thanks for your help.
 
Old 11-26-2006, 10:39 PM   #2
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
Have a look in /etc/profile.d/bsd-games-login-fortune.* - they run the fortune program on login (which one gets run depends on which shell you use).
 
Old 11-26-2006, 10:45 PM   #3
kodon
Member
 
Registered: Jul 2004
Location: [jax][fl][usa]
Distribution: Slackware64-current
Posts: 796

Rep: Reputation: 31
you could always just configure fortune
to use your new custom database file
 
Old 11-27-2006, 04:23 PM   #4
GuyWhoKilledBear
LQ Newbie
 
Registered: Nov 2006
Distribution: Slackware, Linux from Scratch, Ubuntu
Posts: 24

Original Poster
Rep: Reputation: 16
I'm trying to set it to run my custom fortune program (which takes its input from a file without the formatting of the included fortune program) will run for some users but not others. I thought there was a script somewhere for each user that has a list of other scripts/programs to execute when a user logs in. (Fortune is in this list. If the computer is supposed to take the user right into kde, then startx is in this list. That kind of thing.) Am I mistaken?
 
Old 11-27-2006, 07:19 PM   #5
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
I'm assuming that you're using bash as your shell. If so, then ~/.bash_profile will do what you need. It gets sourced when you run a login shell so putting your fortune command in that file for the users who need it should have it run for them.
 
Old 11-27-2006, 08:42 PM   #6
GuyWhoKilledBear
LQ Newbie
 
Registered: Nov 2006
Distribution: Slackware, Linux from Scratch, Ubuntu
Posts: 24

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by gilead
~/.bash_profile will do what you need.
What directory is that in?
 
Old 11-27-2006, 09:58 PM   #7
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
That's in each user's home directory - the '~' is shorthand for /home/username. For example, /home/steve/.bash_profile
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Automaticly run script when user logs in? bigdog0007 Linux - Security 3 06-23-2005 03:14 PM
Firefox logs user out? Where are error logs? case1984 Linux - General 0 10-09-2004 02:22 PM
Games runs slow as normal user, but fast as root user mcore Linux - Software 2 06-07-2004 11:11 PM
creating shell script that executes as root regardless of who runs the script? m3kgt Linux - General 13 06-04-2004 10:23 PM
Program runs when a user logs in mindstormsguy Linux - Software 2 03-31-2004 05:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:58 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration