New answers tagged

2

The question (and suggested answer) are a little obscure, but what is being described is mutt's use of the default color feature of ncurses (or slang). If your mutt color scheme uses the word "default" for the foreground or background, then at runtime mutt will ask ncurses/slang to use the terminal's default color. Whether in an application such as mutt or ...


0

There is a Zsh plugin created to do specifically what you request: https://github.com/psprint/ztrace


0

As suggested by Drav Sloan you can use su like: su -l kent-server -c 'cd /home/kent-server/mc/ && screen -d -m -S Minecraft Java -jar -Xmx5120M -Xms5120M spigot.jar' It is also possble to ahcieve a similar result using sudo such as: sudo -u kent-server /home/kent-server/mc/spigot.sh


1

If you want to recreate all the windows you can put in your ~/.screenrc lines with the name, number and command, eg: screen -t root 0 bash screen -t bash 1 bash screen -t alpha 3 bash or you can run from the command line the equivalent commands eg: $ screen -S work -X screen -t samsung 6 bash If you want to name or rename existing windows you can do ...


3

You're probably thinking of the alternate screen feature, which allows full-screen applications such as htop to display in a different view, and on completion returning to the normal view (without the application showing). That is the altscreen setting in your .screenrc, described in the manual: Command: altscreen state If set to on, "alternate ...


1

In the terminal type clear That should do the trick


-2

Normally screen command help to keep our session live irrespective whether you have closed the putty or remote session from your workstation. we can again resume to same screen anytime if we have not detached screen (Ctrl + A and Ctrl + D ). are you using screen in any script?


0

My needs were slightly different so I came up with a slightly different solution. I needed the ability to run an X11 app as another user (who is not root). Running CentOS, so I don't have the sweet gksudo tool the lucky dogs with ubuntu have which does the Xauth magic. I really didn't want to break out some custom scripts just to login, switch user and run ...


2

It's possible for screen to be confused. You can detach your session, run reset outside screen, re-attach to the session and run reset within screen. With any reset, the terminal (or window) would be cleared, but at least you should be able to resume whatever is running in the window(s). Besides reset, I find these useful (they do not make a full reset): ...


1

Try C-a Z (GNU Screen 'reset')


0

I attache to screen with options -rD From manual: -D -r Reattach a session. If necessary detach and logout remotely first.


0

Use screen's log command (!) Since the process is running in a screen session already it's just a matter of telling screen to log the output of that window: Switch to the script's window, C-a H to log. Now you can : $ tail -f screenlog.2 | grep whatever From screen's man page: log [on|off] Start/stop writing output of the current window to a ...


0

In its default configuration, PuTTY sends cursor keys in normal mode, e.g., ^[OA while screen sets the cursor keys to application mode, e.g., ^[[A. That is done by screen's sending the escape sequence to turn on the keypad (in termcap ks, terminfo smkx). That happens to turn on the application mode for both the numeric keypad and the cursor keys, because ...


3

Use emacs, start an inferior shell and issue your command. The output will be available in the shell buffer and can be selected using the usual commands. Alternatively, select file in $(find <whatever>); do vi $file; break; done The emacs approach is more practical if you already know the editor. Emacs can run arbitrary "inferior processes", ie. ...


2

In "Bash Get Time", they describe the arguments to date command. screen uses a similar format, but the arguments are different. Check out the "String Escapes" section of the manual (also available in the man page) for details. As far as I can see, there's no way to achieve what you want. Perhaps seconds (%s) will suffice?


2

It will not make a real difference, in the sense that if you run screen (or tmux) and you disconnnect there will be NOHUP signal sent to your application whether you start it with nohup or not. I suggest you try it out by using screen/tmux and just start the program without nohup. Then forecfully disconnect, login and again and reattach to the previous ...


2

I don't believe you can force screen to overwrite the log. It logs to screenlog.%n by default, where %n is the screen window number (so each window has it's own log). If that file exists, it appends to it. However, you can tell screen to use a different filename, including a timestamp, so you'll get a new log file each time, but you'll then need to manage ...


2

It's more useful as screen -dmS name command args - that will start a screen session called name in the background (i.e. detached), and run command args inside that screen session. Without the command args, it will just start the screen session in the background. In either case, you can attach to that session later with, e.g., screen -d -r name. From ...


1

-dmS just enforces these things: It will start detached. -dm And you can name your session. -S sessioname Running as a daemon indicates that it will execute the specified command in the background until execution finishes. Starting screen, then running the command, then detaching should have the same behavior as using -dmS to run the command. I often ...


2

You would only use -dm if you want to run a command in a screen session and not enter it interactively -S is just to give the session a usable name so you can reconnect to it again easily later If you want to use it interactively and don't want to give it a human readable name, you can omit all of those arguments safely. For example, if you just want to ...


0

The link to script-declutter is not working, but it is shown on a webpage: #!/usr/bin/perl -wp # clean up control characters and other non-text detritus that shows up # when you run the "script" command. BEGIN { # xterm titlebar escape sequence $xtermesc = "\x1b\x5d\x30\x3b"; # the occurence of a backspace event (e.g. cntrl H, cntrol W, or cntrl U) ...


1

Normally, screen accepts a command and arguments, so this might work: screen -m -S 'test' nohup ~/<script-to-be-run>.sh Because it is not expecting a variable assignment, and the variable might otherwise be reset, you would probably have to add env to set the variable: screen -m -S 'test' env DISPLAY=:0 nohup ~/<script-to-be-run>.sh'


0

As you've stated, your status line works fine in my own .screenrc - good lookin', too. From within a new screen session, enter ^a to initiate command mode, then enter source $HOME/.screenrc (I've seen ~ fail to work in some instances). If that doesn't work, again from command mode, enter echo $HOME to see where GNU screen thinks your home directory lies.


0

msgwait 0 is an answer to my question UPD: Well, i need to visual compare output from default more and my implementation. To make it faster i created session with msgwait 0, attached another terminal started new window with msgwait 0. After wait each time i calls at "#" stuff " " Both of them scrolls by one screen. It's all i need Sorry for unclear ...



Top 50 recent answers are included