Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
I am connecting to a Linux system via PuTTY. I am using GNU screen.
Once I input a command on the screen, I am unable to create a new one or do anything else until this command gets completed. I have a feeling I am going about this all wrong.
When it says Ctrl + A, C, what does this mean? How do I get those keys listed on How To Use Linux Screen?
I am currently having to create multiple sessions of PuTTY.
Once you have executed the command screen you're now in a screen session. You can create new windows (think of them like tabs) and switch between them. To create a window, you use the command Ctrl-a c. This means:
Hold down Ctrl and a simultaneously (this tells screen you'd like to issue it the following command...)
Release the keys
Press c (create new window button)
This should create a new window in the screen session (you now have two).
To switch between windows you, again, use the Ctrl-a command followed by the number of the window you'd like to switch to. E.g., Ctrl-a 0 will take you home.
Ctrl-a " will list the windows you have active.
Ctrl-a k closes the current active window.
Ctrl-a d "Detaches" the screen session, you are moved back to the terminal where you invoked screen. Your screen session is still running in a background process, to return to it use Ctrl-a x.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
I can't seem to find anything specific for windows 10. I can search for the above title and it searches for everything with the word "Make" in it so it returns generic keyboard on/off settings adjustment.
My question is if there's a way to make a singular keyboard key sleep/wake the computer. No mouse, not the whole keyboard, just 1 button. Is that possible?
To put your computer into sleep mode, you can do windows + X, chord into U and then chord into S.
I don't think it would be possible to assign one specific key to wake your computer though, at least not with the default system settings. I guess the reason for that is that when your PC goes to sleep, it is set to react to any input rather than process the input and filter specific keys, most likely for power usage reason (usually why you put your computer to sleep).
It should be possible to write a program to change that behavior, but I don't think anyone has done it yet (or have published it).
Keys can be remapped using
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout.
There are enough guides for this to go around, plus some tools (e.g. SharpKeys) to automate this entirely.
You can prevent devices from being able to wake up the computer by disabling "allow this device to wake the computer" in Device Manager:
SharpKeys lists E0_63 as Fn/Wake button, but I have not tested how this interacts with above option.
With the above combined, computer would go to sleep at a press of a single (remapped) button and wake up only by pressing the Power button.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 years ago.
Improve this question
I'm currently using an extra monitor so I'm running two tmux sessions in two separate terminals (one for each screen). The problem is every time I want to move between screens I have to manually move my cursor and click the other screen before my cursor will move over, this is super annoying. I'm on MacOS 10.12, using v2.7 of Terminal and v2.2 of tmux.
I've currently tried:
cmd + shift + arrow keys, but that only works when the tabs are actually stuck together on the same screen
Using tmux switch -t [] or tmux attach -t [] doesn't manually move the cursor over, it just changes the current screens session, syncing the one session onto both screens.
Just using one session, but there's this annoying quirk where the external monitors dimensions fit to my macbooks smaller screen size. From here it states that tmux "limits the dimensions of a window to the smallest of each dimension across all the sessions to which the window is attached. If it did not do this there would be no sensible way to display the whole window area for all the attached clients." So there's no way to fix that I think.
Is there some easy command to move between the two terminal windows?
Command-backquote (⌘-`) cycles through the open windows in Terminal.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
How to keep the process running on remote server even if the ssh connection is closed?
You can use screen to detach a session. You connect to your ssh server, launch screen and then your computation...
At your next connection, screen -a to attach previous sessions
see : http://www.bangmoney.org/presentations/screen.html
Another idea would be to use tmux which works like screen but it is more flexible and easier to use (in my opinion). To keep a process running you could simply start a tmux session with the command tmux.
This will "open a new terminal" in which to run your programs, if you want you can give a name to the session to easily find it in case you have multiple sessions with the command ctrl+b $ instead of using the default name (e.g. 0).
After running the programs you need in the tmux session, you simply detach from the session with ctrl+b d and go back to the normal terminal from which you can call exit and close your ssh connection.
When you log in again, you simply run tmux attach -t <session_name> to go inside the session where you left your tasks running.
tmux offers a lot of other functionalities too, like screen splitting inside the session with ctrl+b % or ctrl+b " for vertical and horizontal splitting. (you can move between different screens with ctrl+b <arrow in the direction of the screen you want to go to>.
You can run your process/command inside a screen or tmux session,
Or you can do:
yourcmd &
disown
All these Answers are correct but if you are initiating SSH from a code and giving bash commands then they don't work. The best way is to use this command
nohup command > /dev/null 2>&1 &
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I'm a newbie to Linux and am trying to create multiple instances in Linux GNU screen.
Here is what I do from the main terminal,
screen -S screen1
screen -S screen2
And from any terminal, if I list screen -list, it gives me all the available instances of screen.
So, if I want to go to a particular instance of screen I do,
For example:
screen -r screen2
What would be the screen name of my original terminal?
As per the document, Ctrl + A + C - closes an instance of screen, but how can I close the screen session itself?
If I remember correctly, it's (Ctrl + a, d). As in detach.
If you want to close the session, then it probably is
Power-Detach (Ctrl + a, D)
Or
Quit (Ctrl + a, Ctrl + \) to kill everything.
Type exit in the screen instance. That will close the screen instance. Ctrl + A, D will detach from the screen instance you are currently in -> you will return to the terminal where you opened the first screen.
Think of a screen as a virtual terminal.
Your original terminal has no screen name, at it is not a screen, but the "real" terminal.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
I have a dual monitor setup, and I am using Ubuntu 12.04 LTS
I have changed the positioning of the monitors several times, and now for some reason some of the windows open up off-screen (outside of both screens), Update Manager, for instance.
How can I position the windows on one of my screens?
You can get the window back on your screen by using
ALT + spacebar
This would show you the maximize/minimize/ ... options. Click maximize and it would occupy your screen.
You can also hit "move" and then either your mouse or arrow keys to move the window to your current window.
Be sure to have the off-screen window selected (use Alt-Tab or Super-W for example). Then hold Alt+F7 and move the window with the cursor keys until it appears in the viewport.
When this happens to me the hidden window is usually below the screen (I occasionally use two screens with one on top of the other, a setup that agrees well with a laptop on a desk). If you use Super-W to select the window, you can guess where it is by looking at the animations. Holding Alt+F7+Up brings the window into view for me.
I made a little script to fix a similiar bug I have in ubuntu 15.04 with two screens: https://github.com/mezga0153/offscreen-window-restore
The script makes use of the wmctrl command line tool to find the offscreen windows and then uses wmctrl to place each one back into a visible area.