Tag Info

New answers tagged

1

You have two copies of screen. One of them stores its sessions in /tmp/uscreens and the other stores its sessions in /var/run/screen, so they don't see each other's sessions. Even if you could force them to see each other's sessions there's a chance that the copies of screen are different versions and bad things would happen if the two talked to one ...


4

What you have is a nested screen session (using screen within a screen session). By default, to send commands to the nested session, you hit a second a first: Ctrl + a a command For example, to create a new window in the nested session: Ctrl + a a c From the screen documentation: (C-a a) Send the command character (C-a) to the process in the ...


0

Turns out screen now has a layout facility that will keep track of splits. In order for the pair to see the current layout just save it as the default: ctrl-a:layout save default


0

Sorry, forgot to answer with my own solution to this problem. Turns out CentOS 6 disables this line in its /etc/screenrc script: termcapinfo xterm Z0=\E[?3h:Z1=\E[?3l:is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l I was able to restore the functionality by putting this line into my local ~/.screenrc file. Here is the content of my ~/.screenrc file in its ...


0

Best solution would be to find the problem that avoids server starting from service dropbox start. Check your logs to see what's happened. But in the mean time, you can start your daemon with nohup, that will keep it running after you logout. nohup $HOME/.dropbox-dist/dropboxd &


0

Most probably, you have the PROMPT_COMMAND variable set to something like printf "\033k%s@%s:%s\033\\" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/~}" I have exactly this on a CentOS 7 system. This sets the xterm window title after each command, which screen uses as window title. Just unset PROMPT_COMMAND in your .bashrc or edit /etc/bashrc to not set it.


0

Most likely, init sequence in screen's terminal description includes an explicit request to set 80-column mode -- \033 [ ? 3 l. Check contents of is/is2 sequences in terminfo string when running screen -- either echo $TERMINFO or infocmp should show that.


1

The split is done in the screen client, not in the screen session itself. pair may split his screen any way he wants, independent of your split.


0

Log the Python program's output to a file and give people read permissions on the log file. They can use tail -f to watch it grow.


1

Both have there own + and - : nohup: nohup is good to use for running procs in background when proc don't need any user input like httpd server or any other server proc like that. nohup does create log in dir of proc execution. log file name default is nohup.out It avoids proc getting killed due to mistaken ctrl+C , ctrl+D . Just a safe guard. It's ...


1

Here is a solution which will both unlockpt() a new pty descriptor and write its ptsname() to stdout for you. <<\C cc -xc - -o pts #include <stdio.h> int main(int argc, char *argv[]) { if(unlockpt(0)) return 2; char *ptsname(int fd); printf("%s\n",ptsname(0)); return argc - 1; } C Which just compiles a tiny ...


0

Unfortunately it's not possible to save a GNU screen session. As you can imagine, with the complexity of what gets done in a terminal session, tracking and managing that would be incredibly difficult. What I'd suggest is setting up your screen configuration so that it starts up with your preferred window layout, applications, etc. There's a similar question ...


0

Not sure if you would like KDE, but that has something called activities. These are basically desktop sessions you can save. So for example you could have several terminals open, a few documents, maybe an IDE...whatever you happen to have open. Then before you restart, you can simply save that activity. You can create as many activities as you like. You can ...


0

The short answer would be hibernation because is the best option. However the gnome-session-save functionality was removed, it was buggy and the official tweak to manually re-enable this functionality does not appear to work. Other option would be to use an alternative hibernation after a shutdown with TuxOnIce which is more compatible and reliable right now ...


0

screen supports telnet protocol (like so: screen //telnet destination), so you could implement that in your emulator.


1

You can start programs in screens by using the screen command in your ~/.screenrc and these commands are accepting options. Quoting man 1 screen: Thus, if your ".screenrc" contains the lines # example for .screenrc: screen 1 screen -fn -t foobar -L 2 telnet foobar screen creates a shell window (in window #1) and a window ...


1

Just a hack but you could write a wrapper script like: #!/bin/sh while [ TRUE ] do screen /dev/tty.usbmodemxxxx read -p "connected again?" done and CTRL-c it when you want to stop.


2

You can issue detach before re-attaching from another terminal, e.g.: $ screen -list $ screen -d -r ...


0

Finally, I've managed to figure out "obvious" package which supply screen-256-color-s (got to installed on remote machine): sudo apt install ncurses-term fixed the problem for me: nice 256 colors and no need for ugly workarounds with environment variables. Hooray! :)


0

Use this: text=[your text];echo $text>file;echo $text Example: This: tx=My text;echo $tx>logfile;echo $tx Will result in this standard output: My text and the contents of logfile will be: My text If you want a shorter solution, make this file (copy and paste): #!/bin/sh if [ $# = 3 ];then echo $1>$2 echo $1 else echo You must specify 2 arguments ...


2

GNU screen is setting $TERM locally, and ssh is passing that value to the remote side. There are a few things you can do. Detect the screen-256-color-s on the remote side and set to a more sane. From that you can have case $TERM in screen-256*) TERM=screen;; esac. From the local side, have screen set the terminal. In your ~/.screenrc file have: term ...


3

Just set another TERM, For example TERM="rxvt" or TERM="xterm" or TERM="vt102" Maybe an export TERM helps too. The TERM variable is used by curses and termcap programs, such as mc or dialog, to read the terminal escape codes from the terminfo/termcap databases, where the command is executed, so in your case in the remote system. To support the ...


0

Interesting question. I just skimmed through man screen so I am not absolutely sure whether it is possible to achieve without using external tools. However, one can use a named pipe and a combination of tail and grep to do this: $ mkfifo /tmp/fifo/fifo $ tail -f /tmp/fifo/fifo | grep --line-buffered bar >> /tmp/DONE Inside screen do: logfile ...


3

You use the -X switch. From the man page: -X Send the specified command to a running screen session. You can use the -d or -r option to tell screen to look only for attached or detached screen sessions. Note that this command doesn't work if the session is password protected. To combine this with actually seeing the screen: ...



Top 50 recent answers are included