I'm having issues where when I'm in a regular SSH terminal, with $TERM set to xterm-256color
, and the terminal width is very small (narrow) in Linux Screen. I'm running Arch Linux. When I'm in the default SSH terminal (detached from a screen session), then my terminal width is fine, it goes all the way across. However, when I initiate screen, my terminal width narrows by a lot, and all my files are either wrapped or truncated. It goes from about 1400 columns to 80 columns; it's pretty bad. Any ideas to how to have it work in screen the way it works in the regular terminal? I'm not able to use screen the way I need to until I get this resolved.
I'm not sure what the problem is. I thought I'd let you know about dtach:
I use it all the time. Screen is overkill for me. Sounds like it might work for you as well.
EDIT: usage example
Here is what I do for switching. It might be too much hassle for you. Though maybe you could make some aliases in your bash rc file. dtach works with socket files. So first I:
Then start whatever task in the bash shell. Then leave it that dtach "session"
Start another dtach session:
Using -A rather than -a will create the socket if it does not exist. If it does exist, it will not execute the specified command, just connect.
So if you want a set up with certain tasks that you always do, like you describe, it is possible. Bash aliases will make this convenient. You'll have one key stroke (Ctrl-\) to disconnect, and then an alias to connect. So a few more key strokes than screen.
You could make an alias for
in your .bashrc file and then just punch in 'log' and hit enter. If you dtach, it keeps running.
I just like dtach because it is small and I thought it was so cool how I can connect to the same socket twice. This means I can do "online" nix training for my friends who want to use the "new cool ubuntu thing". :P You can probably do something similar with screen I guess.
As per https://superuser.com/questions/217066/prevent-gnu-screen-from-resizing-display-size
Try adding this (from /etc/screenrc) to your ~/.screenrc:
You may need to change the "xterm" to match your $TERM.