Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Screen with irssi on startup
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
FrostyX
n00b
n00b


Joined: 13 Mar 2012
Posts: 59
Location: Czech Republic

PostPosted: Sun Oct 14, 2012 11:08 pm    Post subject: Screen with irssi on startup Reply with quote

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
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Mon Oct 15, 2012 3:20 pm    Post subject: Reply with quote

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
View user's profile Send private message
FrostyX
n00b
n00b


Joined: 13 Mar 2012
Posts: 59
Location: Czech Republic

PostPosted: Wed Oct 31, 2012 6:10 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum