gnu-screen

Spawn a screen session from launch daemon

别等时光非礼了梦想. 提交于 2019-12-05 13:57:17
I've written a launchd .plist which should attach a debugger to the WindowServer when it launches. The main part of the script looks like screen -D -m -S "WindowServer Debugger" \ gdb \ -x $GDBSCRIPT \ /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Resources/WindowServer \ $WSPID This starts a detached screen session in which gdb is attached to WindowServer. However, this seems to trigger an error condition in launchd under Snow Leopard, causing it to spout out error messages to the log: com.apple.launchd[1] (0x10011c070

Git branch name in prompt

 ̄綄美尐妖づ 提交于 2019-12-05 03:28:20
I am able to show the git branch name in the shell prompt. But whenever I am using screen I am getting bash: parse_git_branch: command not found and git branch is not shown. Please help me get this in the screen sessions also. I have following in my .bash_profile. parse_git_branch() { git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/ } export PS1="[\W\$(parse_git_branch)]$ " I don't have .git-completion.bash System specs: OS: OSX 10.8.4 Terminal & iTerm2 Screen version: 4.00.03 (FAU) 23-Oct-06 koomie I had the same issue when running under screen and was able to resolve by

Windows equivalent for Linux “screen” or another alternative?

纵饮孤独 提交于 2019-12-04 18:13:12
问题 This question was migrated from Super User because it can be answered on Stack Overflow. Migrated 8 years ago . 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

GNU Screen: Environment variables

此生再无相见时 提交于 2019-12-04 17:51:53
[Updated] The question is related to the questions GNU Screen: Programmers quotes in Readbuf and GNU Screen: files to numbered buffers? . Since they are not solved, the question targets more general concept about environment variables. My belief is that they are the key to make Screen more efficient. 1. How can I use Bash's variables in Screen like: $ export path=`pwd` $ ^a :readbuf `echo $path`/debugging_code.php 2. How can I reuse Screen's buffers like: $ ^a :readreg a `echo $path` $ ^a :readbuf $a/debugging_code.php $ ^a ] 3. How can I use Screen's buffers like environment variables? Chen

Checking if a Screen of the Specified Name Exists

不羁岁月 提交于 2019-12-04 16:16:07
问题 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? 回答1: You can grep the output of screen -list for the name of the session you are checking for: if ! screen -list | grep -q "myscreen";

How to execute a command inside a screen session

爱⌒轻易说出口 提交于 2019-12-04 13:54:19
问题 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. 回答1: 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 " . 回答2: In bash, you can use \n in the

fish shell - Showing the current command in the window title of screen

孤街浪徒 提交于 2019-12-04 09:40:46
I want the current command to be shown in the title of screen (or tmux). I tried following settings but it doesn't work. How can I make it work? .screenrc shelltitle "$ |fish" shell /usr/local/bin/fish .config/fish/config.fish set -x PS1 '\033k\033\\[\u@\h \W]\$ ' For fish version 2.1.0 you only have to edit ~/.config/fish/functions/fish_title.fish function fish_title hostname end For version 1.23.1 this doesn't seem to work. If the directories do not exist, first create them: mkdir -p ~/.config/fish/functions/ I think you're looking for fish_title . See documentation here . You could do

Tmux window title keeps renaming

大城市里の小女人 提交于 2019-12-04 09:01:33
问题 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. 回答1: Check

Persistent use of Jupyter Notebook from remote server

我是研究僧i 提交于 2019-12-03 18:49:56
问题 I connect to a remote server using ssh -L but if I close the laptop lid or the connection is lost, the jupyter notebook is disconnected. After I reconnect to the remote server, the "last" session is lost. What can be done to make it persistent? Could screen help with it? 回答1: On the remote server, you should open your jupyter in a screen session, it will make it persistent if you lose the connection to the server and resume it. On your computer: ssh -L xxxx:localhost:yyyy server . screen .

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

不打扰是莪最后的温柔 提交于 2019-12-03 11:44:52
问题 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