gnu-screen

Use gdb to debug MPI in multiple screen windows

删除回忆录丶 提交于 2019-12-21 06:16:12
问题 If I have an MPI program that I want to debug with gdb while being able to see all of the separate processes' outputs, I can use: mpirun -n <NP> xterm -hold -e gdb -ex run --args ./program [arg1] [arg2] [...] which is well and good when I have a GUI to play with. But that is not always the case. Is there a similar set up I can use with screen such that each process gets its own window? This would be useful for debugging in a remote environment since it would allow me to flip between outputs

GNU Screen: Changing Global Key-binding

自闭症网瘾萝莉.ら 提交于 2019-12-21 02:34:16
问题 I've recently started using screen in remote sessions. One problem is that emacs doesn't recognize its C-a and I don't want to bind emacs C-a to something else, as I'm very used to it. Google shows ways to change every keybinding individually using ~/.screenrc but not how to change a keybinding globally. I want all C-a to change to something else. Is that possible? What are my options? Thanks for your answers 回答1: You can change the escape combination via escape in .screenrc : # Makes Control

Sending ctrl-c to specific screen session

两盒软妹~` 提交于 2019-12-20 09:47:13
问题 I am designing a script to launch a process inside a named screen session. as_user "screen -p 0 -S **$command** -X eval 'stuff \"wine LFS.exe /cfg=**$command**.cfg\"\015'" So bash myscript.sh start test will create a screen named test and run the test.cfg with the software. Now I want my script to access the specific screen session and do a CTRL + C to stop the running process so i can kill the screen session. Something like this: as_user "screen -p 0 -S **$command** **... kill the process

Kill all detached screen sessions

二次信任 提交于 2019-12-20 07:58:55
问题 When I execute screen -ls , I see the following. How can I kill all the detached sessions? There are screens on: 84918.ttys002.ros-mbp (Detached) 84944.ttys008.ros-mbp (Detached) 84970.ttys013.ros-mbp (Attached) 84998.ttys002.ros-mbp (Detached) 85024.ttys002.ros-mbp (Detached) 5 Sockets in /var/folders/86/062qtcyx2rxbnmn8mtpkyghs0r0r_z/T/.screen. 回答1: screen -ls | grep pts | cut -d. -f1 | awk '{print $1}' | xargs kill Kill only Detached screen sessions (credit @schatten): screen -ls | grep

How can I list screen sessions by name?

眉间皱痕 提交于 2019-12-20 03:33:13
问题 With screen, I know I can name & re-attach to sessions by name: screen -S <name> screen -r <name> When I execute screen -ls I get a list sessions, but the name is not displayed. How do I see the names of my running sessions? 回答1: When you do screen -ls , the session name comes after the TTY number. Here, I have three screen sessions running with the names dev1 , daemons , and dbconns : dev1:~$ screen -ls Your inventory: 16101.pts-1.dev1 (Multi, attached) 30265.daemons (Multi, attached) 1691

screen: how to turn on alternate screen?

三世轮回 提交于 2019-12-18 10:16:31
问题 When I work in terminal, I see the history of the last shell commands execution output. If I run vim, I see the file I open full screen. When I exit vim, I can see the history of the last shell commands again. However, when I use vim from screen. I see the footprint of the file I was just editing on my exit from vim instead of the history of the last shell commands. I'd like to see the shell's history though. How can I achieve this behaviour? I used: terminal.app and iterm2.app tried

Unable to use Screen efficiently in Mac's Terminal

▼魔方 西西 提交于 2019-12-18 10:14:15
问题 The post summarizes problems in using Screen in Mac's terminal when you have the following in your .zshrc if [[ $STY = '' ]] then screen -xR; fi Solution #1 is not working but Solution #2 works: Clipboard programs: pbcopy, pbpaste and xsel do not work at all Bug in Vim when used in Mac: Unable to have no scattered windows in Screen by .Xresources. Solved: Ctrl A stops working in terminal. This suggests me that Screen's keyboard bindings need to be changed slightly. Solved: The scrolling with

Strange behavior of vim color inside screen with 256 colors

廉价感情. 提交于 2019-12-18 10:05:17
问题 I was trying to make the syntax highlighting (with 256 colors) of vim work inside screen , which is running inside gterm . It works quite fine in the beginning. What I mean by "in the beginning" is, after I start screen , and enter vim , the colors look fine, and there are really 256 colors. But after a while (I don't know exactly how long) the colors automatically change back to an appearance as if there are only 8 (or 16?) colors. For example, after this has already occurred, if I enter the

How to start a new process in a new window in an existing GNU screen session, from outside the session

我们两清 提交于 2019-12-18 05:09:12
问题 I asked a similar question here and got pretty close to what I'm looking for How to start a process from another application and then open a terminal to that process in gnu screen ...but, this doesn't quite get to what I'm after, which is starting a process in a new window (not an existing window) in an existing screen session (not a new screen session). If you are at a command prompt in a screen session, you can do this: screen [screen options] command param1 param2 But, how do you do it if

Set screen-title from shellscript

穿精又带淫゛_ 提交于 2019-12-17 22:06:36
问题 Is it possible to set the Screen Title using a shell script? I thought about something like sending the key commands ctrl + A shift - A Name enter I searched for about an hour on how to emulate keystrokes in an shell script, but didn't find the answer. 回答1: You can set the screen / xterm title using the following lines: #!/bin/bash mytitle="Some title" echo -e '\033k'$mytitle'\033\\' [UPDATE] - by request I'm also including the solution proposed by @Espo below: Depending on your xterm version