gnu-screen

Windows equivalent for Linux “screen” or another alternative?

我是研究僧i 提交于 2019-12-03 10:58:45
This question was migrated from Super User because it can be answered on Stack Overflow. Migrated 8 years ago . Learn more . I'm on the lookout for a method to control programs in a Windows environment. I would prefer it to be a bit similar to the Linux software " screen ". The reason of my search is that I need to start a program (on Windows) with an identifier, so I later would be able to close that specific program, without closing anything else - even though the actual program (.exe file) is running multiple times. So is there anyway I can "name" it? I'm using the following on Linux now: $

Checking if a Screen of the Specified Name Exists

跟風遠走 提交于 2019-12-03 09:26:06
I have made a bash file which launches another bash file in a detached screen with a unique name, I need to ensure that only one instance of that internal bash file is running at any one point in time. To do this, I want to make the parent bash file check to see if the screen by that name exists before attempting to create it. Is there a method to do this? You can grep the output of screen -list for the name of the session you are checking for: if ! screen -list | grep -q "myscreen"; then # run bash script fi You can query the screen 'select' command for a particular session; the shell result

How to execute a command inside a screen session

ぃ、小莉子 提交于 2019-12-03 08:50:56
I would like to know how to execute a command inside a screen session. i searched and I found this : screen -S nameofscreen -X stuff "command" When I type this, the command is typed inside the screen but it is not executed. So my queston is how to press enter using this command. In the bash shell you can use ctrl-V to explicitly put non-printable characters into a string. So try ctrl-V ctrl-L ctrl-V ctrl-M at the end of your command just before the " . In bash, you can use \n in the $'...' construct: screen -S nameofscreen -X stuff $'command\n' I'd do something like this: screen -S sessionName

gnu screen: can you automatically name a window after the last invoked program?

谁说胖子不能爱 提交于 2019-12-03 07:47:53
Is there a way to automatically have each window change its name to the name of the last program you ran from that window? This would be more convenient than having to rename the windows manually. Yes, you can use shelltitle to do this. Assuming you use bash, the following should work. Add this to your .screenrc : shelltitle "$ |bash" where the "$ " should match whatever is at the end of your prompt string ($PS1) and "bash" is the default title. Then add a null title escape sequence to the beginning of your prompt string: export PS1='\[\033k\033\\\]'$PS1 which should go in your .profile or

How do I get the command history in a screen session using Bash?

故事扮演 提交于 2019-12-03 06:53:58
问题 If I start a screen session with screen -dmS name , how would I access the command history of that screen session with a script? Using the ↑ , the last executed command appears, even in screen. 回答1: screen doesn't maintain a history of the commands you type. Your shell may or may not keep a history. Since you appear to use bash , you can use the history command. screen does appear to have a crude approximation of a history search (it merely searches the scrollback buffer for a command line.

How to clear the scrollback in the screen command?

僤鯓⒐⒋嵵緔 提交于 2019-12-03 06:42:04
问题 I use the screen command for command-line multitasking in Linux and I set my scrollback buffer length to a very large value. Is there a key combination to clear the buffer for a certain tab when I don't want it sitting there anymore? 回答1: This thread has the following suggestion: In the window whose scrollback you want to delete, set the scrollback to zero, then return it to its normal value (in your case, 15000). If you want, you can bind this to a key: bind / eval "scrollback 0" "scrollback

vim screen restore

守給你的承諾、 提交于 2019-12-03 06:02:55
问题 i use vim in screen for development and if i quit vim, the current screen-content stays there... outside the screen (xterm), exiting vim will restore the previous buffer (like: [ server1 ]~$ cmd some stuff, some stuff [ server1 ]~$ cmd [ server1 ]~$ cmd ) But not inside screen. I tried to use xterm as terminal inside screen - but not with the wanted effect. Thanks for Help! 回答1: In the file .screenrc in your home directory, add the line: altscreen on That should fix it. According to the man

emacs tramp over an unreliable connection

偶尔善良 提交于 2019-12-03 04:48:06
问题 I want to run R on a remote box under a local Emacs (I do not want to run Emacs on the remote box). I can run R on a remote host using TRAMP: (let ((default-directory "/user@remote:~")) (R)) and everything works fine except that when the connection to remote is lost, R dies. This is no good because this means that I have to re-load all the data into R after restarting it, which takes time. Is it possible to tell TRAMP to use a persistent terminal? (GNU Screen or tmux or Mosh or dtach) See

Tmux window title keeps renaming

喜夏-厌秋 提交于 2019-12-03 02:49:51
Suddenly, both my screen/tmux started changing my windows' names after every command. They keep changing the name to the value of $PROMPT_COMMAND on every single action on the terminal, even after manually renaming them (by Ctrl+A A on screen or Ctrl+B on tmux). On tmux I already tried to change the tmux.conf settings to disable window auto renaming off, but seems that it was ignored. I am using bash without the standard /etc/bashrc configuration file. My distro is Fedora 18. Check whether your PS1 (plus PS2 , PS3 or PS4 if those are set) is changing the title : printf %q "$PS1" | grep -F '\

Unix screen utility error: Cannot find termcap entry for 'xterm-256color'

泄露秘密 提交于 2019-12-03 02:05:41
I work on a NetBSD system through an ssh connection from my Mac and I want to use the screen utility so that I can start processes and come back to them after my terminal connection has been interrupted. When I type screen I get the error message: Cannot find termcap entry for 'xterm-256color' After looking through forum posts, I thought it had something to do with termcap on the remote machine, but that appears not to be the case; I can initiate screen with no errors from an ssh session from another computer, one to which I don't generally have access. This suggests that I need to configure