Screen session not created at startup

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

Screen session not created at startup

Postby mark9117 » Nov 16th, '12, 20:53

I am trying to get a screen session started at boot on one of my machines.

I have a cron job setup under my user ID:

Code: Select all
@reboot /usr/bin/screen -d -m -S pvr


I've also tried setting up a script in /etc/rc.d/init.d/screen_start.sh

Code: Select all
#!/bin/bash
# This script starts a detached screen session on boot.
su - <my_user> -c "/usr/bin/screen -dmS pvr"


Neither of these work despite the fact that when I run the command "/usr/bin/screen -d -m -S pvr" as my user in a konsole window it creates the screen session as expected (note that I can stack those options to -dmS and it makes no difference).

I should say that I'm also unable to start that screen session from crontab in Webmin (I assume it uses the run-parts command to do that). I get no error - it just doesn't create the screen session.

Any wisdom?

Thanks.

Mark
Let's just reboot everything all the time.
User avatar
mark9117
 
Posts: 395
Joined: Sep 12th, '11, 20:32
Location: Eastern New Mexico -- Not Hell, but you can see it from here.

Re: Screen session not created at startup

Postby djennings » Nov 17th, '12, 00:04

Mark

Are you still trying to set up MythTV?
If so then you can just use MCC to autologin from boot and make the default desktop MythTV
User avatar
djennings
 
Posts: 613
Joined: Jun 2nd, '11, 23:51
Location: Wokingham, UK

Re: Screen session not created at startup

Postby mark9117 » Nov 17th, '12, 02:13

No, though my M$ remote still barely works, generally I'm pretty happy with the Mythbox as it is now.

No, this is me trying to streamline the stuff I do on my network. I like to have screen sessions running on all my server boxes, including the Mythbox, so that I can remote in from work and do stuff more conveniently. Everything I've seen on screen says my solutions above should work.

They don't.

This is annoying.
Let's just reboot everything all the time.
User avatar
mark9117
 
Posts: 395
Joined: Sep 12th, '11, 20:32
Location: Eastern New Mexico -- Not Hell, but you can see it from here.

Re: Screen session not created at startup

Postby djennings » Nov 17th, '12, 03:17

Have you tried x2go yet?
It works pretty well for me for performing remote access.
User avatar
djennings
 
Posts: 613
Joined: Jun 2nd, '11, 23:51
Location: Wokingham, UK

Re: Screen session not created at startup

Postby mark9117 » Nov 17th, '12, 04:20

X2go looks cool, but access is not really the issue. I use SSH to get into these machines and can do (pretty much) anything I need via a console, but I like screen because I like to keep several pots on simmer at a time. If I could get that screen session started at boot, it would save me a step every time I reboot a box.

Now of course, it's gone beyond that. It's no longer a simple matter of "I want a minor convenience where my remote access is concerned." Oh no. Now it's a challenge. The machines have defied my effort to get them to work as they should.

It is on.

Mark
Let's just reboot everything all the time.
User avatar
mark9117
 
Posts: 395
Joined: Sep 12th, '11, 20:32
Location: Eastern New Mexico -- Not Hell, but you can see it from here.

Re: Screen session not created at startup

Postby oj » Nov 17th, '12, 16:28

It's on? Have they been served? http://www.cucirca.com/2012/04/20/south ... -in-the-a/

Seriously though, I see you don't mention rc.local. That doesn't work either?
oj
 
Posts: 232
Joined: Aug 23rd, '12, 00:22

Re: Screen session not created at startup

Postby KenJackson » Nov 18th, '12, 01:15

Try: screen -d -m

From man screen:
-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.
KenJackson
 
Posts: 4
Joined: Nov 18th, '12, 01:06

Re: Screen session not created at startup

Postby mark9117 » Nov 18th, '12, 02:28

Ken, thanks for the reply, but can you please reread the first message in this thread and take a look at what the command I'm using to try and implement this?

O.J., I did not think of trying rc.local. Thank you for that tip. Regrettably, it didn't work. :(

Keep the ideas coming folks. I do appreciate it.

Mark
Let's just reboot everything all the time.
User avatar
mark9117
 
Posts: 395
Joined: Sep 12th, '11, 20:32
Location: Eastern New Mexico -- Not Hell, but you can see it from here.


Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest