You are not logged in.

#1 2007-10-24 19:39:58

tch
Member
From: Slovakia
Registered: 2007-10-07
Posts: 31

Gnu screen problems

Hello all, I have some weird problem with screen. I can start it, use it, detach, reattach, but cant reattach after reboot which is pretty annoying - i have to start a new sesson, creating and naming windows, etc. Maybe some startup scripts are messing something up ? I haven't changed any of them althrough. Can you help me please ?

Offline

#2 2007-10-24 19:52:37

chimeric
Member
From: Munich, Germany
Registered: 2007-10-07
Posts: 254
Website

Re: Gnu screen problems

screen sessions don't outlast reboots - like everything else ;-).

Offline

#3 2007-10-24 21:00:58

fwojciec
Member
Registered: 2007-05-20
Posts: 1,411

Re: Gnu screen problems

tch wrote:

Hello all, I have some weird problem with screen. I can start it, use it, detach, reattach, but cant reattach after reboot which is pretty annoying - i have to start a new sesson, creating and naming windows, etc. Maybe some startup scripts are messing something up ? I haven't changed any of them althrough. Can you help me please ?

What Chimeric said... But you can define what your initial screen session looks like (apps/windows that are open/started by default, looks, behavior and such) by editing .screenrc file in your home dir.  Just search the web for ".screenrc" to find some examples.

Last edited by fwojciec (2007-10-25 00:44:53)

Offline

#4 2007-10-25 00:26:05

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Gnu screen problems

chimeric is right here. Screen sessions do not survive a reboot. That's pretty much impossible.

Offline

#5 2007-10-25 05:43:36

F
Member
Registered: 2006-10-09
Posts: 322

Re: Gnu screen problems

The only way would to perhaps not completely shut down your computer. Possible alternatives:

1. screen saver
2. turning your monitor off
3. suspending (I have no expertise in these field)
4. don't shut down your computer.
[f|~]% uptime
01:35:12 up 29 days,  3:16,  2 users,  load average: 0.10, 0.17, 0.12

Offline

#6 2007-10-25 06:39:14

tch
Member
From: Slovakia
Registered: 2007-10-07
Posts: 31

Re: Gnu screen problems

Thank you guys. I thought screen can survive reboots smile

Offline

#7 2007-10-25 09:49:12

codemac
Member
From: Cliche Tech Place
Registered: 2005-05-13
Posts: 794
Website

Re: Gnu screen problems

Well, if you always want the same apps running when you open screen, you can always append the following to your screenrc:

screen -t sometitle someapp
screen -t othertitle otherapp
screen -t funtimes funapp

You can also use the "select" command to have it start with the app you want visible.

Offline

#8 2007-10-25 13:34:58

DonVla
Member
From: Bonn, Germany
Registered: 2007-06-07
Posts: 997

Re: Gnu screen problems

perhaps there is a way for screen sessions to survive reboots.
screen puts its session folder in /tmp/Screens/S-$USER. the content of the tmp folder is deleted after reboot. perhaps there is a way to tell screen to put its sessions in another folder, smth like /var/tmp, which isn't deleted after reboot. (/var/tmp has the same permissions as /tmp.)
if it's possible i'm interested myself.

vlad

Last edited by DonVla (2007-10-25 13:51:01)

Offline

#9 2007-10-25 13:55:19

codemac
Member
From: Cliche Tech Place
Registered: 2005-05-13
Posts: 794
Website

Re: Gnu screen problems

DonVla wrote:

perhaps there is a way for screen sessions to survive reboots [...]

No.  When you shut down your machine, your processes will all be killed anyways.  Screen would be killed.  If I have an irc client running in screen and shutdown my machine, there is NO WAY POSSIBLE it can still be connected to the internet, still  be attached in a screen session, still taking up cpu cycles.  You know, because the entire machine is off?

Trust me, don't bark up this tree.  You will get no where very quickly.

Offline

#10 2007-10-25 14:05:03

DonVla
Member
From: Bonn, Germany
Registered: 2007-06-07
Posts: 997

Re: Gnu screen problems

yep, you're right.
that was only an idea. of course running processes would be killed. but the idea was that screen "remembers" the last settings and restarting screen would use the old settings; smth like a session-manager.

Offline

#11 2007-10-27 23:12:36

codemac
Member
From: Cliche Tech Place
Registered: 2005-05-13
Posts: 794
Website

Re: Gnu screen problems

You may be able to script up something that appends the right screen blah blah commands on your .screenrc every time you detach or something... though I use the same set of apps every day.. so I just do what I recommended above.

Offline

#12 2007-10-27 23:19:31

Ramses de Norre
Member
From: Leuven - Belgium
Registered: 2007-03-27
Posts: 1,289

Re: Gnu screen problems

F wrote:

The only way would to perhaps not completely shut down your computer. Possible alternatives:

1. screen saver
2. turning your monitor off
3. suspending (I have no expertise in these field)
4. don't shut down your computer.
[f|~]% uptime
01:35:12 up 29 days,  3:16,  2 users,  load average: 0.10, 0.17, 0.12

That's not very ecologically friendly if you (like most people) don't use your computer over the night...

Offline

#13 2007-10-27 23:44:54

DonVla
Member
From: Bonn, Germany
Registered: 2007-06-07
Posts: 997

Re: Gnu screen problems

hi,

use suspend. works not only for laptops.
there are three possibilities for that: pm-utils, suspend from AUR and suspend2.
i use suspend.
give it a try.

vlad

Offline

#14 2007-10-28 02:15:28

F
Member
Registered: 2006-10-09
Posts: 322

Re: Gnu screen problems

Ramses de Norre wrote:
F wrote:

The only way would to perhaps not completely shut down your computer. Possible alternatives:

1. screen saver
2. turning your monitor off
3. suspending (I have no expertise in these field)
4. don't shut down your computer.
[f|~]% uptime
01:35:12 up 29 days,  3:16,  2 users,  load average: 0.10, 0.17, 0.12

That's not very ecologically friendly if you (like most people) don't use your computer over the night...

I do use my computer over the night in the form of:
1. file server so my friends/family can access files/photos/etc.
2. music server streaming music to help me sleep
3. torrent server so I can share good things to good people.

Offline

#15 2007-10-28 03:57:48

abhidg
Member
From: City of Kol
Registered: 2006-07-01
Posts: 184
Website

Re: Gnu screen problems

If you want to freeze some programs and on reboot bring them back to the state they were in, there's this program called cryopid (http://cryopid.berlios.de) which does that. But it can't freeze screen sessions yet.

Offline

#16 2008-03-10 10:13:25

leo2501
Member
From: Buenos Aires, Argentina
Registered: 2007-07-07
Posts: 658

Re: Gnu screen problems

i feel sooo silly asking this, but i just install it but i dont understand the meaning of "C-a X" for example keybindings, i press ctrl+a and ctrl+alt+a but i dont think its working...


Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.
-- Antoine de Saint-Exupery

Offline

#17 2008-03-10 10:56:49

dolby
Member
From: 1992
Registered: 2006-08-08
Posts: 1,581

Re: Gnu screen problems

ctrl+a..+X


There shouldn't be any reason to learn more editor types than emacs or vi -- mg (1)
[You learn that sarcasm does not often work well in international forums.  That is why we avoid it. -- ewaller (arch linux forum moderator)

Offline

#18 2008-03-10 19:28:44

DonVla
Member
From: Bonn, Germany
Registered: 2007-06-07
Posts: 997

Re: Gnu screen problems

ctrl+a then shift+x
it's capital x.

vlad

Last edited by DonVla (2008-03-10 19:29:28)

Offline

#19 2008-03-10 22:00:40

leo2501
Member
From: Buenos Aires, Argentina
Registered: 2007-07-07
Posts: 658

Re: Gnu screen problems

lol... TNX tongue

it's possible to have many terminals all with a different screen subshell? for example i want screen to have in shell 0 say a blank console for pacman/yaourt, in shell 1 have 1 console for elinks, shell 3 moc, shell 4 rtorrent... but have in the desktop 4 different terminals, each with a screen subshell? in one have rtorrent attached, in other moc, etc...?


Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.
-- Antoine de Saint-Exupery

Offline

#20 2008-03-10 23:39:00

DonVla
Member
From: Bonn, Germany
Registered: 2007-06-07
Posts: 997

Re: Gnu screen problems

hi,
you mean you want to run different screen sessions in different terminals?
that's of course possible.
you can start screen with "screen -S <name>". in my bashrc i have a simple function which starts, checks and reattaches running screen sessions:

function s {
if [[ $1 ]]; then
    screen -dRR -S $HOSTNAME.$1
else
    screen -ls
fi
}

typing "s" alone shows what screen sessions are running, typing "s <name>" reattaches a running screen session with that name or starts a new one with given name. the hostname is useful when running screen sessions through ssh or similar.
here's my .screenrc: http://pastebin.com/m3e773d86
really useful are also the screen key-bindings: for example when typing "C-a x" mutt starts in a new screen tab. of course, you have to define them in your screenrc.
anyway, screen has lots of really cool features, rtfm...

vlad

Last edited by DonVla (2008-03-10 23:43:54)

Offline

#21 2008-03-11 09:38:18

leo2501
Member
From: Buenos Aires, Argentina
Registered: 2007-07-07
Posts: 658

Re: Gnu screen problems

GREAT share DonVla! smile

i have another problem now, for example midnight commander and centerim seems garbled (copy&paste from terminal transforms original caracters to lines, but i really see a "ä" and two "squares" as line character)

$ screen -S centerim

 CENTERIM 4.22.1  UNSENT: 0                                               msn:_
│                      ┬                                                                               │
                            │                                                                               │
                                │                                                                               │
                                    │                                                                               │
                                        │                                                                               │
                                            │                                                                               │
                                                │                                                                               │
                                                    │                                                                               │
                                                        │                                             ├─────────────────                        ──────────────────                        ┤                                 │
                        ────────────│───[msn] password:                                                                 
─────────────────────────┘

i read in man page and think it has to do with UTF-8 but running "screen -SU centerim" and "screen -S -U centerim" have the same results


Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.
-- Antoine de Saint-Exupery

Offline

#22 2008-03-11 09:51:15

loosec
Member
Registered: 2007-03-08
Posts: 134

Re: Gnu screen problems

I've bashed my head repeatedly trying to get proper UTF-8 characters using different terminals, screen options and encodings in irssi plus a whole bunch of testsubjects with different systems/encodings. All I ever managed to do was get confused and then start typing everything in english. åäö can produce a freaky amount of diffrent outputs.

Screen is cool thou, especially the copy-paste thingie. smile

Offline

#23 2008-03-11 11:37:20

DonVla
Member
From: Bonn, Germany
Registered: 2007-06-07
Posts: 997

Re: Gnu screen problems

i have another problem now, for example midnight commander and centerim seems garbled (copy&paste from terminal transforms original caracters to lines, but i really see a "ä" and two "squares" as line character)

hmm,
which copy&paste; the screen internal through the buffer or the mouse one?
i've never used centerim or mc, so i cannot figure out what happens.
i think screen uses the characters defined by the terminal you use. i'm using xterm and urxvt and until now i haven't any character problems with screen. with aterm and mrxvt i experienced encoding problems. i use de_DE.utf8.
sometimes screen has problems with refreshing the terminal, that's  why the output is so displaced.

vlad

Offline

#24 2008-03-11 15:55:33

leo2501
Member
From: Buenos Aires, Argentina
Registered: 2007-07-07
Posts: 658

Re: Gnu screen problems

the mouse one i mean, the one that paste with the middle mouse click...

well i think i will try urxvt instead of aterm tongue the thing i love of aterm is that i open it with no wm deco, no displacement bars, fake transparency,etc, ill try to make the same with urxvt, wich one is more fast? or lightweight?


Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.
-- Antoine de Saint-Exupery

Offline

#25 2008-03-11 16:56:25

DonVla
Member
From: Bonn, Germany
Registered: 2007-06-07
Posts: 997

Re: Gnu screen problems

hi leo2501,

that's definetly an aterm issue. aterm cannot dislpay unicode stuff at all.
rxvt-unicode (urxvt) has similar features, but is far better and, as the name says, supports unicode.
try "urxvt -bg black -fg beige -tr -tint White -sh 100". the command-line options are similar to the aterm ones (manuals aren't blakk magic; wow, i see that urxvt has also a faq manual...).
further urxvt has perl support, so one can use perl plugins and do more crazy stuff with it.
however, i recommend xterm for normal and urxvt for (simple) eyecandy use.
xterm is solid reliable standard.
if you have further questions, feel free to ask,

vlad

Offline

Board footer

Powered by FluxBB