LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 09-10-2009, 03:40 PM   #1
th_alton
LQ Newbie
 
Registered: Sep 2009
Posts: 2

Rep: Reputation: 0
Trying to start a GNU screen session at startup


Hi,

I'm relatively new to linux and have a problem that I can't seem to solve. I have searched many hours around the internet but I can't make this work. What I want to do is the following:

At startup/boot I want to start a GNU screen session in detached mode.

What I'have done is the following:
I have added this line to the rc.local file in etc\rc.d

/home/myusername/test.sh


My test.sh file looks like this
cd /
cd home
cd myusername
screen -c screenStUp -dmS screenTest

When I try to run rc.local manually, everything works fine (the screen session starts). But at startup/boot nothing happens.

Any idea why this is not working? I would really appreciate any help!!!

I'm using centos 5 by the way.
 
Old 09-10-2009, 04:20 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Hi, welcome to LQ!

While I don't have a resolution to your problem I think I can
explain why it's not working. I think (I'm not an expert on
screen, really, just a happy casual user) that screen requires
a tty/pty device to attach to, which it won't get from the
scripts run at init. Not sure how to remedy that.

But I doubt that you'd want to have a screen session detached as
the root-user from your users home in the first place?

What are you trying to achieve with that session?



Cheers,
Tink
 
Old 09-10-2009, 04:31 PM   #3
th_alton
LQ Newbie
 
Registered: Sep 2009
Posts: 2

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Tinkster View Post
What are you trying to achieve with that session?
Thanks very much for replying! What I try to achieve is the following: I have made two small server apps that I want to start automatically at startup/boot. I would like to see the output from this apps in a console window.
 
  


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
Faster gnome session startup by delayed programs start catkin Programming 2 06-21-2010 08:19 AM
Faster gnome session startup by delayed programs start catkin Linux - Desktop 0 07-06-2009 01:21 PM
How to set xterm title to gnu screen session name WindAndTiger Linux - Software 5 05-07-2009 12:33 AM
Start programs at startup and get rid of current saved session Shwiing Linux - Software 2 08-04-2005 02:14 AM


All times are GMT -5. The time now is 01:30 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration