Screen session not created at startup

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:
I've also tried setting up a script in /etc/rc.d/init.d/screen_start.sh
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
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