View previous topic :: View next topic |
Author |
Message |
FrostyX n00b
Joined: 13 Mar 2012 Posts: 59 Location: Czech Republic
|
Posted: Sun Oct 14, 2012 11:08 pm Post subject: Screen with irssi on startup |
|
|
Hi, I want to run (not as root, but as regular user) GNU/Screen with irssi in it while boot. How can I do that ?
First I have tried write file Code: | /etc/local.d/screen.start | with this content
Code: | #!/bin/bash
su frostyx -c 'screen -t irssi bash -c "irssi"'
|
Set executable flag
Code: | $[FrostyX ~]-> sudo chmod +x /etc/local.d/screen.start
$[FrostyX ~]-> ls -l /etc/local.d/ |grep screen
-rwxr-xr-x 1 root root 60 Oct 15 01:57 screen.start
|
Checked if service local is in default runlevel:
Code: | $[FrostyX ~]-> sudo rc-update | grep local
local | default |
And reboot. But it didnt work. I have also tried
Code: | su frostyx -c 'echo test > somefile' |
but this file didnt create
So now I am confused if problem is in running the script or wrong use of screen or somewhere else.
Please, can u advise me please? |
|
Back to top |
|
|
khayyam Watchman
Joined: 07 Jun 2012 Posts: 6227 Location: Room 101
|
Posted: Mon Oct 15, 2012 3:20 pm Post subject: |
|
|
FrostyX ...
Your screen session will require a tty (screen is a "terminal muliplexer"), when the script runs screen will exit as there is nothing for it to 'attatch' to. You may be able to start in detatched mode, 'screen -d -m' if I remember correctly, and reattatch once logged in.
Generally I'd say 'local.start' isn't for starting user processes, if you really need to log irc then an ircbot is probably a better option.
FrostyX wrote: | Code: | su frostyx -c 'echo test > somefile' |
|
This doesn't work because 'somefile' has no 'path' ... and 'cwd' doesn't exist.
best ... khay |
|
Back to top |
|
|
FrostyX n00b
Joined: 13 Mar 2012 Posts: 59 Location: Czech Republic
|
Posted: Wed Oct 31, 2012 6:10 pm Post subject: |
|
|
Thank you khayyam.
Problem is solved different way now. I got access to school server so I will run screen with irssi on it. |
|
Back to top |
|
|
|