Tag Info

Hot answers tagged

4

The shebang line you've seen may work on some unix variants, but not on Linux. Linux's shebang lines are limited: you can only have one option. The whole string -d -m -S screenName /bin/bash is passed as a single option to screen, instead of being passed as different words. If you want to run a script inside screen and not mess around with multiple files or ...


3

According to the screen man pages: screen -d -m Start screen in detached mode. This creates a new session but doesn't attach to it. This is useful for system startup scripts. -S sessionname Set the name of the new session to sessionname. So when I ran the command you provided: screen -dmS name ./script.sh Screen starts a window called name and ...


2

This is a known problem, if you ssh as root somewhere and then su to become a normal user: $ ssh root@server # su -l anthon $ screen Cannot open your terminal '/dev/pts/3' - please check. It is e.g. described in these posts from 2005 The solution is to directly login as the user you want the screen session to run as.


2

From the bash man page: When an interactive shell that is not a login shell is started, bash reads and executes commands from /etc/bash.bashrc and ~/.bashrc, if these files exist. This may be inhibited by using the --norc option. The --rcfile file option will force bash to read and execute commands from file instead of /etc/bash.bashrc and ...


2

Don't think of it in terms of pressing keys, think of it in terms of accomplishing a task. Pressing keys is a way to do things interactively. The way to accomplish things automatically is to script them. To start a job in screen and detach it immediately, run screen -md ./runMyJob.sh If you want to make your jobs easier to find, you can pass the option ...


2

You can pass commands from one screen sessions to it's sub-screen session with Ctrl+a a (it send Ctrl+a to the sub-screen) For example: To detach the sub-screen: Ctrl+a a-d Go to the next screen: Ctrl+a a-n Go to the previous screen Ctrl+a a-p


2

Yes, you can do it with screen which has multiuser support. First, create a new session: screen -d -m -S multisession Attach to it: screen -r multisession Turn on multiuser support: Press Ctrl-a and type :multiuser on :acladd USER ← use username of user you want to give access to your screen Now, Ctrl-a d and list the sessions: $ screen -ls ...


2

As documented in the man page, screen looks for a null title-escape-sequence. bash sends this sequence via the PROMPT_COMMAND environment variable (for example, mine defaults to printf "\033k%s@%s:%s\033\\" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/~}". To disable this feature for a particular window, I just run unset PROMPT_COMMAND from that window. Of ...


2

You do not have to disconnect, if the connection gets interrupted you can use screen -dr to reattach to a already running screen session that wasn't properly disconnected from first. Simply list out the screen sessions using screen -ls: $ screen -ls There is a screen on: 10266.somesession (Attached) 1 Socket in /var/run/screen/S-slm. Note the ...


1

You could use a pager like less or more: less screenlog.0 Or more screenlog.0 Not sure what terminal escape codes you have but if they are not displayed correctly, use less -R screenlog.0


1

According to SailorCire, you have to kill scareensaver program, your have to insert the following code with a little change in /etc/init.d/rc.local : pid=`ps ax |egrep -v grep |egrep pattern |awk {'print $1'}` kill $pid You have to change pattren to part of screensaver name.Of course uniqueue. May be above code doesn't work you have to call kill command ...


1

Yes, it is possible. One of the commands you can send Screen with its metacharacter (^A) is a literal ^A, which is done with the ^A-a (ctrl-A, lowercase a) sequence. On the help screen (^A-?), you will see one key defined as meta. So, in short, to send a command to a screen within a screen (e. g. to disconnect the nested screen), you would press ^A-a-d, ...


1

You want: escape ^a^a or bind ^a meta (since meta sends the command character, i.e. here ^a). But since ^a is typically more useful than ^z in GNU Screen, you could use ^z as the command character. This is what I do: escape ^z^z


1

For all of you running a Laptop with NVIDIA Card and who are still not able to get the f* function keys for brightness to work, just follow the steps below. It worked very well for my system (Samsung q45, Intel Dualcore T7100 @ 1,8Ghz , Nvidia Geforce 8400M G 512) running Linux Mint 17. In command line, type in: sudo gedit /etc/X11/xorg.conf You will have ...



Only top voted, non community-wiki answers of a minimum length are eligible