博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
screen使用
阅读量:6238 次
发布时间:2019-06-22

本文共 2887 字,大约阅读时间需要 9 分钟。

centos 7 要想title正常,需修改~/.bashrc

在~/.bashrc 中加入unset PROMPT_COMMAND

为此我还做了一个gif动画:

避免screen在vim,less等程序退出后不清屏

加上altscreen on选项

设置别名

alias scr='screen'

如果提示要密码

如果screen中的进程在消耗CPU,htop就会显示SCREEN进程占用CPU

[root@screen-4.5.0]$ cat ~/.screenrc

hardstatus onhardstatus alwayslastlinehardstatus string "%{.bW}%-w%{.rW}%n %t%{-}%+w %=%{..G} %H %{..Y} %m/%d %C%a "

$HOME/.screenrc如果不生效,可能需要给screen 加-a参数

screen教程

源码

git地址

用make install时,好像etc目录要手动复制??

root@screen-4.5.0$ make install./etc/mkinstalldirs /opt/screen-4.05/bin /opt/screen-4.05/share/screen/utf8encodingsmkdir /opt/screen-4.05mkdir /opt/screen-4.05/binmkdir /opt/screen-4.05/sharemkdir /opt/screen-4.05/share/screenmkdir /opt/screen-4.05/share/screen/utf8encodingscd doc ; make installdirsmake[1]: Entering directory `/root/tmp/screen-4.5.0/doc'./../etc/mkinstalldirs /opt/screen-4.05/share/man/man1 /opt/screen-4.05/share/infomkdir /opt/screen-4.05/share/manmkdir /opt/screen-4.05/share/man/man1mkdir /opt/screen-4.05/share/infomake[1]: Leaving directory `/root/tmp/screen-4.5.0/doc'if [ -f /opt/screen-4.05/bin/screen-4.5.0 ] && [ ! -f /opt/screen-4.05/bin/screen-4.5.0.old ]; \        then mv /opt/screen-4.05/bin/screen-4.5.0 /opt/screen-4.05/bin/screen-4.5.0.old; fi/usr/bin/install -c screen /opt/screen-4.05/bin/screen-4.5.0chown root /opt/screen-4.05/bin/screen-4.5.0 && chmod 4755 /opt/screen-4.05/bin/screen-4.5.0if [ -f /opt/screen-4.05/bin/screen ] && [ ! -f /opt/screen-4.05/bin/screen.old ]; then mv /opt/screen-4.05/bin/screen /opt/screen-4.05/bin/screen.old; firm -f /opt/screen-4.05/bin/screen(cd /opt/screen-4.05/bin && ln -f -s screen-4.5.0 screen)cp ./utf8encodings/?? /opt/screen-4.05/share/screen/utf8encodingscd doc ; make installmake[1]: Entering directory `/root/tmp/screen-4.5.0/doc'./../etc/mkinstalldirs /opt/screen-4.05/share/man/man1 /opt/screen-4.05/share/info/usr/bin/install -c -m 644 ./screen.1 /opt/screen-4.05/share/man/man1/screen.1make screen.infomake[2]: Entering directory `/root/tmp/screen-4.5.0/doc'makeinfo ./screen.texinfo -o screen.infomake[2]: Leaving directory `/root/tmp/screen-4.5.0/doc'if test -f screen.info; then d=.; else d=.; fi; \    if test -f $d/screen.info; then \    for f in $d/screen.info*; do /usr/bin/install -c -m 644 $f /opt/screen-4.05/share/info;done; \    if /bin/sh -c 'install-info --version' >/dev/null 2>&1; then \      install-info --info-dir=/opt/screen-4.05/share/info $d/screen.info; \    else true; fi; \    fimake[1]: Leaving directory `/root/tmp/screen-4.5.0/doc'if [ -d /usr/lib/terminfo ]; then \        PATH="$PATH:/usr/5bin" tic ./terminfo/screeninfo.src; \        chmod 644 /usr/lib/terminfo/s/screen*; \    fitermcap entry (./terminfo/screencap) should be installed manually.You may also want to install ./etc/etcscreenrc in /opt/screen-4.05/etc/screenrc

注意源码编译时,make install之后的提示,要求要手工将screencap,etcscreenrc复制到相关目录。碰到问题时,不要忽略这一点

从此妈妈再也不担心我突然断线工作丢失了……

转载地址:http://zokia.baihongyu.com/

你可能感兴趣的文章
VMDK虚拟硬盘文件丢失,虚拟机无法启动的解决办法
查看>>
S5PV210-arm-裸机-i2c
查看>>
oracle linux 5.8安装oracle 11g rac 第一章:配置实验环境
查看>>
浏览器: Internet Explorer 7 快捷键
查看>>
【Exchange 2019 設置技巧】修改默認附件大小
查看>>
Centos 6.9中 http-2.2 中的一些基本操作和 https 的实现
查看>>
使用QueryTables生成Excel数据时发生错误
查看>>
活动目录实战之十 多台windows 2003 活动目录至win 2008 r2迁移实战
查看>>
我比我的领导差在哪
查看>>
Spring学习笔记二
查看>>
centos自带的日志切割工具 --- logrotate
查看>>
Java中final和static关键字总结
查看>>
一个故障印发的醒悟
查看>>
vim的日常操作方法
查看>>
Windows7系统安装Oracle数据库图文教程详解
查看>>
我的友情链接
查看>>
文本统计命令——wc
查看>>
mina2.0
查看>>
JEESZ简介
查看>>
Linux中通过/proc/stat等文件计算Cpu使用率(一)
查看>>