Tag Info

Hot answers tagged

2

Using screen -x allows you to connect to a session that it currently attached, without forcing it to detach. For example, if you do this in two separate xterms, you will see input and output of both instances simultaneously. This is useful when logging in from several locations; it avoids having to reattach once you go back to the location where you first ...


2

There are three ways you can solve this. One: just use a function. aliases are for simple text macros, something your second example isn't. sl() { screen -list|grep -v There|grep -v Sockets|awk 'BEGIN { format = " %-35s %-10s %s\n" printf format, "Name", "Active", "Status" printf format, "----", "------", "------" } { printf ...


1

When you type C-a l, this runs ls and displays the output in the current window, regardless of what program is running in the window. If you do this with a shell running in the window and the shell is displaying its prompt, then the output of ls is displayed after the prompt. The shell is not aware of what happened, since ls is executed directly by Screen. ...


1

First, note that the current directory in a crontab is your home directory. You should put the full path to the script in the crontab. However, since your script is being executed, this isn't the problem. The likely problem is that your script requires an environment variable that is set in your normal session. Cron jobs run with a minimal environment, your ...


1

How will you know that the server has started successfully, and is not about to die with an error message? If you want to show the screen session until explicitly killed, it's easy. Run a command that doesn't terminate after the ruby command, for example to run a shell: screen -S server sh -c 'ruby start.rb true 3001; echo "Server terminated with status ...


1

Ah yes. When you start and stop screen it resets the screen display, clearing it in the process. The easiest way to ensure that you can see errors generated by your ruby command is to separate it from the screen command, so that one is no longer dependent on the other: screen -S server ruby start.rb true 3001 ... exit You will presumably already know that ...


1

You sould start the screen session in you .zshrc without exec, just screen. exec replaces the current process with the new one. So, you will never get back to the original process because it doesn't exist anymore. If started without exec, pstree would then look similar to this (I added -p to pstree to show the PIDs for comprehension): ...


1

You can find the screenlog.0 file in screen's current working directory (cwd). This is either the directory that was the cwd when you started screen, or it's a directory you subsequently changed to using the :chdir screen command. The easiest way to find out what this directory is is to open a new window with a shell in it using Ctrl-a c and check the pwd ...


1

I'm not sure if this helps (I don't know how to bind shift key) but I'm using: bindkey ^[[5;5~ eval "copy" "stuff ^U" bindkey ^[[6;5~ eval "copy" "stuff ^D" in my .screenrc to bind Ctrl+Page Up/Page Down to: -entering "copy" mode -pressing Ctrl+U/D (since it's similar to Vim movement)



Only top voted, non community-wiki answers of a minimum length are eligible