LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 05-21-2004, 09:21 AM   #1
lappen
Member
 
Registered: Aug 2003
Location: Sweden
Distribution: Slackware 9.1 / Gentoo
Posts: 83

Rep: Reputation: 15
crontab issue


I want irssi to start (as my user not root) everytime as my computer starts up after a crash/reboot whatever so I did this as my user

'crontab -e'
@reboot screen -d -m /usr/local/bin/irssi

Nothing happens after reboot, no new screen and no irssi running, any suggestions?
 
Old 05-24-2004, 01:22 AM   #2
miknight
Member
 
Registered: Oct 2002
Location: Sydney, Australia
Distribution: Gentoo, Ubuntu, Debian
Posts: 184

Rep: Reputation: 30
Instead of using a cron, why not put the test and command in your .bashrc file?
 
Old 05-24-2004, 01:47 PM   #3
lappen
Member
 
Registered: Aug 2003
Location: Sweden
Distribution: Slackware 9.1 / Gentoo
Posts: 83

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by miknight
Instead of using a cron, why not put the test and command in your .bashrc file?
I don't understand how that will help me boot a program as my regular user not root automaticly everytime the computer starts/restars from a reboot or crash??
 
Old 05-24-2004, 02:19 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,965
Blog Entries: 11

Rep: Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865
You don't want cron for this job .... the easiest way to
achieve what you intend is to add something like

/bin/su - <username>-c "path to irssi-daemon"

to your rc.local...



Cheers,
Tink
 
Old 05-24-2004, 02:46 PM   #5
lappen
Member
 
Registered: Aug 2003
Location: Sweden
Distribution: Slackware 9.1 / Gentoo
Posts: 83

Original Poster
Rep: Reputation: 15
Thanks worked like a charm, is it possible to do something similar if I wouldn't have root access to a server as a regular user
 
Old 05-24-2004, 03:42 PM   #6
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,965
Blog Entries: 11

Rep: Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865
Quote:
Originally posted by lappen
Thanks worked like a charm, is it possible to do
something similar if I wouldn't have root access
to a server as a regular user
Not really ... in this case you'd probably want to
go down the alley that miknight suggested ... write
a little shell script that is being initiated from a
.bashrc, checks whether it's already running, and
if it isn't, starts it....

Code:
ps -A | grep irssi
if [ $? != "0" ]; then
<run irssi daemon>
fi



Cheers,
Tink
 
Old 05-24-2004, 05:47 PM   #7
miknight
Member
 
Registered: Oct 2002
Location: Sydney, Australia
Distribution: Gentoo, Ubuntu, Debian
Posts: 184

Rep: Reputation: 30
Quote:
Originally posted by lappen
Thanks worked like a charm, is it possible to do something similar if I wouldn't have root access to a server as a regular user
Unless you do the .bashrc thing there's no real way to do it without seriously undermining the security of your system.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Newby w/crontab or emacs issue vrogers64 Mandriva 3 01-20-2005 04:11 AM
system-wide crontab in /etc/crontab ner Linux - General 2 11-18-2003 12:35 PM
Crontab WiWa Linux - Software 1 10-06-2003 05:20 PM
Crontab Gorbachov Linux - Software 3 09-26-2003 04:40 PM
Crontab Help w0rmh0l3 Linux - General 11 12-11-2001 05:06 PM


All times are GMT -5. The time now is 07:52 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration