gnu-screen

How do I get out of a screen without typing 'exit'?

最后都变了- 提交于 2019-11-28 13:10:01
问题 I screen -r 'd into a django server that's running and I can't simply Ctrl-C and exit out of it. Are there any alternative ways to get out of screen ? Currently, I manually close the tab on my local PC and ssh back in, but that's becoming tiresome. 回答1: Ctrl-a d or Ctrl-a Ctrl-d . See the screen manual # Detach. 回答2: Ctrl-a + \ - Exit screen and terminate all programs in this screen. It is helpful, for example, if you need to close tty connection. Ctrl-a + d or - Ctrl-a + Ctrl-d - "minimize"

Using the scrollwheel in GNU screen

狂风中的少年 提交于 2019-11-28 13:08:27
问题 How can I setup GNU screen to allow the mouse's scrollwheel to scroll around in the scrollback buffer? I tried to Google about this, but most hits were on how to allow applications inside screen to use the scrollwheel. 回答1: I believe you can just add a line like this to your ~/.screenrc : termcapinfo xterm* ti@:te@ Where "xterm*" is a glob match of your current TERM. To confirm it works, ^A^D to detach from your screen, then screen -d -r to reattach, then ls a few times, and try to scroll

How to assign name for a screen? [closed]

南笙酒味 提交于 2019-11-28 13:07:41
问题 I'm using the screen multiplexer tool on the command shell and open a lot of screens. I then forget which process ID associates with which task. I would like to set a name for a screen but can't find an option in the manpage. Currently, listing the screens looks like this: There are screens on: 5422.pts-1.aws1 (Detached) 5448.pts-1.aws1 (Detached) 5027.pts-1.aws1 (Detached) 3 Sockets in /var/run/screen/S-sb. And I would like to see something like this: There are screens on: 5422

How does bash deal with nested quotes? [duplicate]

和自甴很熟 提交于 2019-11-28 12:34:07
This question already has an answer here: How to escape a double quote inside double quotes? 8 answers I need to run a command with a syntax like this: runuser -l userNameHere -c '/path/to/command arg1 arg2' Unfortunately, I have to nest additional ' characters into the command itself and I can't tell bash to interpret these correctly. The command I would like to run is actually: runuser -l miner -c 'screen -S Mine -p 0 -X eval 'stuff "pwd"\015'' Unfortunately, bash seems to be hitting the second ' and puking. This is the error: -bash: screen -S Mine -p 0 -X eval stuff: No such file or

Unable to have pbcopy -clipboard inside Screen

给你一囗甜甜゛ 提交于 2019-11-28 08:50:21
Problem Not solved although one answer was accepted: We are working to get Jonah's code to work. Problem: to change the code of (1) to (2) I know the thread . I want to be able to run the following code inside Screen Code (1) cat ~/.vimrc | pbcopy (1) Code (2) cat ~/.vimrc > /tmp/pbcopy.pipe (2) My attempt to solve the problem: to put the following code to .zshrc function pbcopy() { "(cat \"$1\")" > /tmp/pbcopy.pipe } I get cat masi | pbcopy pbcopy: command not found: (cat "") cat: masi: No such file or directory How can you use pbcopy inside Screen? Chas. Owens Alright, this is a screwy

run a shell script and immediately background it, however keep the ability to inspect its output

孤街醉人 提交于 2019-11-28 08:23:56
How can I run a shell script and immediately background it, however keep the ability to inspect its output any time by tailing /tmp/output.txt It would be nice if I can foreground the process too later. PS It would be really cool if you can also show me how to "send" the backgrounded process in to a gnu screen that may or may not have been initialized. To 'background' a process when you start it Simply add an ampersand ( & ) after the command. If the program writes to standard out, it will still write to your console/terminal. To foreground the process, simply use the fg command. (You can see

How can I tell whether I'm in a screen?

送分小仙女□ 提交于 2019-11-28 04:03:09
When using screen in linux, how can I tell if I'm in a screen or not? I could do exit and I'll exit a screen if I was in one, but if I wasn't, then I'll end up closing my terminal. When doing screen -r , I could see if I have other screens attached, but how do I know if my current terminal is one of those attached screens? jho Check $STY . If it's null, you're on a "real" terminal. If it contains anything, it's the name of the screen you're in. If you are not in screen: eric@dev ~ $ echo $STY eric@dev ~ $ If you are in screen: eric@dev ~ $ echo $STY 2026.pts-0.ip-10-0-1-71 JJC Another way I've

How to create a screen executing given command?

隐身守侯 提交于 2019-11-28 03:57:59
i'm fairly new in *nix. Is there a way to create a screen, which will immediately execute a given command sequence (with their own arguments)? Two hours of googling yields nothing - perhaps because I can't clearly state the question. I hope for something like screen -dmS new_screen exec "cd /dir && java -version" I am using screen v4.00.03 and CentOS 5.5 (kernel ver. 2.6.18-194.26.1.el5.028stab079.2) The problem is that using the 'exec' screen command does not start a shell. 'cd' is a shell builtin, so you need a shell for it. Also, you need a shell that remains running so that screen does not

Vim background with gnu screen

笑着哭i 提交于 2019-11-28 03:45:41
问题 I am having trouble with my colorscheme in vim . When editing a file using a vim session started in GNU screen, the text background is not rendered correctly. In a session outside screen, the entire background is gray (how it should be). For a vim window inside screen, only the background directly behind the text appears gray. The rest is black. I have TERM set to xterm-256color in both my .cshrc and .screenrc . My .vimrc has set t_Co=256 I am using csh . Edit: I am connecting through cygwin

GNU Screen Survival Guide [closed]

烈酒焚心 提交于 2019-11-28 02:31:10
What do people think are not only the essential things you need to know about the excellent Screen utility but the things that you'd think worthwhile to teach someone, a beginner, from the ground up? I've just introduced a friend to Screen and they're having a hard time getting used to it. So analogies and handy tips for remembering binds etc. would be awesome. Greg Hewgill I've been using screen for over 10 years and probably use less than half the features. So it's definitely not necessary to learn all its features right away (and I wouldn't recommend trying). My day-to-day commands are: ^A