LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-08-2011, 05:12 AM   #1
FireRaven
Member
 
Registered: Apr 2006
Location: Australia
Distribution: Debian Squeeze
Posts: 135

Rep: Reputation: 18
Using 'at' to open a 'screen' session?


Hi, when I type:
Code:
root@ubuntu:/# at now + 1 minute
warning: commands will be executed using /bin/sh
at> screen
at> <EOT>
job 2 at Tue Mar  8 22:14:00 2011
root@ubuntu:/#
After the command has run (verified with atq) I cannot attach to screen using "screen -r" and ps shows screen is not running:
Code:
root@ubuntu:/# ps ax | grep screen
21490 pts/3    R+     0:00 grep screen
root@ubuntu:/#
Any ideas why the 'at' command can't start screen in the background for me to attach to later?

EDIT: Noticed screen is actually returning "Must be connected to a terminal." to logs. Does 'at' not provide a terminal?

Last edited by FireRaven; 03-08-2011 at 05:24 AM.
 
Old 03-08-2011, 06:09 AM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
Seems it doesn't. Use the following switches to start screen in detached mode (from "man screen"):

Code:
      -d -m   Start  screen in "detached" mode. This creates a new session but doesn’t attach to
               it. This is useful for system startup scripts.
 
Old 03-08-2011, 06:10 AM   #3
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
no, at doesn't provide one, how would it? What would that mean?

http://www.manpagez.com/man/1/screen/
Quote:
-d -m Start screen in "detached" mode. This creates a new session but
doesn't attach to it. This is useful for system startup
scripts.
 
Old 03-08-2011, 02:04 PM   #4
FireRaven
Member
 
Registered: Apr 2006
Location: Australia
Distribution: Debian Squeeze
Posts: 135

Original Poster
Rep: Reputation: 18
Thanks, that worked but screen when I attach to it has a very funny shell (not the usual root shell).
Are there certain startup scripts not being run?

When I say funny I mean it has "#" as a prompt instead of the usual "root@ubuntu:/#" prompt, colors are all black and white when typing ls.
 
  


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
[SOLVED] Slackware 13.1 beta1 "Cannot open ConsoleKit session: Unable to open session..." fl0 Slackware 2 05-13-2010 09:37 AM
Squid: cannot open session manager, cannot open network socket Ratibhan.upadhyay Linux - Server 1 01-27-2010 02:40 AM
Password screen session alfr Linux - Newbie 2 04-17-2008 03:22 AM
Creating a screen session in an existing session Frits of waterplant Linux - Newbie 4 01-18-2007 04:53 AM
running X in a screen session jumanji Linux - General 2 04-22-2004 01:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:24 PM.

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