EzDevInfo.com

gnu-screen interview questions

Top gnu-screen frequently asked interview questions

How to keep windows split after detaching/reattaching GNU screen

I use screen in a Ubuntu server.

I have my screen splited in four regions each showing a different window.

The problem is when i detach (or maybe reattach) a get the four windows but only one region and i have to make C-a S all over again?

How can i keep my screen splitted when a reattach?


Source: (StackOverflow)

How to scroll up and look at data in GNU screen

I am using a mac (snow leopard). I am a ruby on rails developer and I watched a screencast on GNU screen and am trying it out. So far I like it.

On a window when I start server I get to see the log messages. However I can't seem to scroll up. I do get a scroll bar. However when I use the scroll bar and scroll up I don't see anything.

How do people use GNU screen and scroll up?


Source: (StackOverflow)

Advertisements

What is the best GNU screen "taskbar" you've used/seen? [closed]

As some of you may know, screen offers an ability to have a "taskbar"-like bar that is always present and helps navigating around windows, etc. I find this bar irreplaceable.

What is the best configuration you've seen or one that you think is the most optimal/useful?

Mine is described and explained here: Supercharge Your GNU Screen With A Power "Taskbar" And Never Feel Lost Again

screen powerbar


Source: (StackOverflow)

Screen a running process

Sometimes I forget to run a program under a screen session and can't stop it in the middle, and I know it's going to take long.

Is there a way to screen an already running process without restarting it?


Source: (StackOverflow)

How can I view more of my history in Screen on Linux?

I was running scripts overnight from the command line (inside Screen on a Linux EC2 instance) and some errors that I was not tracking occurred. I want to "scroll up" or view more of the history in Screen, but I cannot seem to find any commands that will work.

I need to see the onscreen output "further up" than I can on my current screen. CTRL + a is supposed to put me into scroll mode inside Screen, but it's not working.


Source: (StackOverflow)

Gnu screen: kill a frozen tab

How to go about closing a stalled screen tab (the machine is no longer reachable) ?


Source: (StackOverflow)

Use GNU screen as login "shell"

What's the best way to have screen automatically run when you open a new shell, whether by login, xterm, or anything else?

I see the most common recommendation is to put exec screen in your regular shell's rc or login/profile file, but for, for example, tcsh, login shells run .login last, while non-login shells read .cshrc last. If I put exec screen in .cshrc, login shells won't source the .login file, and if I put it in .login, non-login shells won't run screen. I assume that there are similar issues with other shells.


Source: (StackOverflow)

GNU screen - Unable to reattach to screen after lost connection

I was using irssi in screen but lost connection. After I ssh'd back in to the server, I can no longer attach to that screen. screen -ls shows that the screen is already attached.

I tried screen -D to force detach it, and it said detach but screen -ls still says it's attached. I tried screen -x and it just hangs there.

[sub@server ~]$ screen -ls 
There are screens on:
 4033.poe (Detached)
 7728.irssi (Attached)
2 Sockets in /var/run/screen/S-sub.

What can I do now?


Source: (StackOverflow)

Problem with GNU Screen when using Emacs C-x C-s (save-buffer)

When I am using emacs under GNU Screen, if I call C-x C-s screen hangs and does not respond to any keyboard input.

I can't reproduce this, but at least one time per day I have to kill my screen session and restart it.

How can I solve this?

Thanks


Source: (StackOverflow)

how to include screen's session name in hardstatus?

I use different screen sessions for different projects. Starting screen like screen -S project1. Now, I'd like to mention 'project1' in hardstatus line.

Session name can be obtained from environment variable STY: STY=13539.project1.
But how to get this into screen? I've tried backtick command and %` in hardstatus, but I can't seem to get it right.

What I did:

.screenrc:

hardstatus string '%H:%`'
backtick 0 30 30 echo $STY

no luck, empty %`.

backtick 0 30 30 sessionname

still no luck, sessionname: Not found


Source: (StackOverflow)

Prevent gnu screen from resizing display size

Every time I start screen (screen -A) or try to connect to an already running screen session (screen -Ax) my terminal is resized to 80 columns. I want to prevent screen from resizing my terminal.

I am using iTerm on Snow Leopard and my screen sessions are on a centos machine (I use bash as my shell).


Source: (StackOverflow)

Move a program started in GNU screen out to another terminal

I want to terminate an instance of GNU screen whilst preserving the process running inside it.

So I opened my regular terminal emulator program and executed screen. Then I used that instance of screen to execute ./script_x.sh. Now, for whatever reason, I want to quit using screen however script_x.sh hasn't yet completed its task and I'm not willing to forfeit my progress.

Can I keep the active process alive so as to continue working on it inside my regular terminal emulator?


Source: (StackOverflow)

Binding a command in tmux without using the prefix key

Is it possible to bind a tmux command to a key combination and use it directly without first pressing the prefix?

I find C-b + n too cumbersome to switch panes, so I was wondering whether I could bind C-1 for example, to switch to pane #1.

Or perhaps there may be a way to make the shortcut in the terminal emulator to send C-b + 1 when I press C-1?

Thanks!


Source: (StackOverflow)

Make GNU screen survive reboot

I am using GNU screen a lot. I find it very annoying that everytime the server has to be rebooted I lose all my sessions (even if I know in advance, I need to set-up everything again).

I've searched the web for possibilities how to make screen survive a reboot, but found nothing that works for me. Some of the methods I found and there flaws:

  • CryoPID: seems to be dead, promising since 2005 to include support for screen
  • DMCTP: has problems with setuid(), didn't work for me (I admit I didn't try very hard)
  • some script trying to recreate the session from scratch; you still lose your history and I think also the environments variables are not correctly set (and when I tried it didn't bring up all sessions)

Maybe somebody knows some better process freezer? This seems to be the most promising way.


Source: (StackOverflow)

Sharing a GNU Screen Session

I have a meeting with a professor coming up shortly, but he won't be at school for a face-to-face meeting. Instead he will meet with me via Skype and an SSH login. I'm a heavy user of GNU Screen, but I've never used its multiuser functionality before. How would I go about setting up multiuser capabilities, and what would be good permissions to give him (i.e. r/w/x)?


Source: (StackOverflow)