physicmodel

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

solve problem

Q:
when I open screen in my linux Ubuntu, result in output the words Cannot make directory '/run/screen': Permission denied.

A:

he directory /run/screen is the socket directory for screen.

Fortunately, screen reads a environment variable SCREENDIR to get an alternative socket directory.

So to work around it, you can create a directory, such as ~/.screen:

mkdir ~/.screen && chmod 700 ~/.screen

and export the SCREENDIR to point to that directory:

vim ~/.bashrc

export SCREENDIR=$HOME/.screen

You can also put this line into you ~/.bashrc so that it will also take effect afterwards.

source ~/.bashrc

It will work the screen. that is all.

reference

screen enhance

  1. list the screen

screen -ls

  1. make new screen

screen -R hello

and other hand ctrl+a with d to backgroud(后台)

  1. back to screen

screen -r [pid/name] # use -ls to see pid

  1. exit the screen and clear

exit

Linux screen command refer to runood

tmux

听说这个更高级?
参考他人

posted on 2023-03-20 10:43  PhysicModel  阅读(378)  评论(0)    收藏  举报