I do not know how you can see the effects of following lines in your screen
bind ^g screen -t 'Google' links www.google.com
bind G screen -t 'Google' sudo -u insec links www.google.com
I tried unsuccessfully to press Ctrl-g at a word in a scrollback mode.
I also tried to search clickable words unsuccessfully in my manuals by
man man
How can you see the effects of the lines?
To try the bind ^g line, press Ctrl-A Ctrl-G.
To try the bind G line, press Ctrl-A Shift-G.
All those key bindings work inside screen if the bind lines are in $HOME/.screenrc and you have started screen after saving $HOME/.screenrc. To see if you have screen running, press Ctrl-A V (without shift). This will show you (in reverse color) the version number of screen at the bottom row in the window. If you don't get this information, you have to start screen first, by typing screen and pressing Enter.
The get more information about defining custom key bindings in GNU screen, please read the entry for bind in the CUSTOMIZATION section of the man page of screen.
you need to hit Ctrl-A then Ctrl-G.
it should create a new window that executes links (of course you must also have it installed) program to browse google in text mode.
Ctrl-A then G should run as user 'insec' and then run links again.
Related
How to disable scrollback (^A[ESC]) mode in screen and just have it straight up print to the terminal instead (using the builtin scroll of my terminal emulator)?
I am using screen on gnome-terminal across an ssh session
Since the terminal has builtin scroll capabilities, I just want to be able to use the scrollwheel on the mouse to scroll as opposed to using ^A[ESC]
In command mode (^A:), set scrollback 0.
A few notes:
The current length of the scrollback buffer in lines is shown (among other stuff) by the info command (after the plus character).
Using the mouse wheel will not give the same experience that screen can offer
the terminal's scrollback contains exactly data that was actually displayed
data from inactive windows is not available
split windows will show as-is
I am answering an 8 year old question that came up in a web search - the answer was in man screen.
What do I need to put in my .screenrc so that I can create nested sessions (ie: a screen within a screen)?
At the moment, if I run screen again from within an open screen tab, instead of opening a new screen session within that tab, it just opens a new tab (ie: same effect as if I had pressed -C)
I want to get an outer screen session and an inner screen session - How do I do this please?
My .screenrc is empty except for the following single line to show the list of open tabs:
hardstatus alwayslastline "%{=w}%{G} %{b}%w"
This is a very old question, but for reference:
Start a MAIN screen session:
screen -S main
Start a second session (detached):
screen -dmS SomeName
From the tab you want nested session:
screen -r SomeName
Use and extra a for commands to nested screen, i.e. ^a-a-c to create a tab in the nested screen.
Don't know if what you mean is to start some nested sessions from your screenrc or to set something in your screenrc so you can start nested sessions from the colon prompt.
For the first, I use a separate screenrc file, .screenrc.main, which contains
source ~/.screenrc
screen -t <window name> screen -S <nested session name> -e^jj <command>
I think the "new session name" part is necessary to get a new session. I use a different command character for the nested sessions. Also I am using a separate file because I don't want the command to be executed for the nested sessions. Then from command line I do
DISPLAY= screen -S <top session name> -c .screenrc.main
to start the outer session.
For the second, I just type in the screen -t line above in the colon prompt.
From what I read in your question, it seems that you may be confused how to operate the nested session?
CTRL+a c will create a new 'tab' in the outer screen session.
CTRL+a a c will create a new 'tab' in the session 1 deeper than the previous
CTRL+a a a c creates a new tab in the session 1 deeper than the previous
I have had situation with 3 layers, where I SSH into my work box, then from there into a proxy and from there onto the server I want to work on, each time opening a screen session to be able to resume later.
Without a hardstatus showing the full hostname, it is very easy to get lost, very easy indeed!
I don't know about editing your screenrc file, but what works for me is sshing into the same computer then starting a new screen instance. Hackish workaround, but it does work...
screen
ssh 127.0.0.1
screen
I'm trying to use AutoHotkey to do some background clicking and typing while I'm doing other stuff in the foreground.
I've gotten used to Send but I haven't figured out how ControlSend works yet. Can anyone give me an example using something simple like MSPaint in the background and changing the color of paint.
Is this even possible to do? I have a script currently that pulls from daily Excel report, assigns each row a variable and punches it into another program, but I need it to click and type some canned messages as well.
The first question should probably be why use mouse control? Keyboard control is sooo much easier and often more reliable. What is it that you try to do with a mouseclick that can't be done through keyboard commands?
Also mouse clicks normally activate the hidden app.
OK you wanted an example...
+Home:: ;Shift + Home = stop/start radio
SetControlDelay -1
ControlClick, x384 y143, Radioplayer
Return
Here i click on the play/pause button of a streaming radioplayer. The mouse coordinates are found with the aforementioned Windows Spy and the title of the browser (you might have to use SetTitleMatchMode). Why not look at the AutoHotKey Command list and check out the examples there....
Let me know if this is (roughly) what you are looking for....
SendMode Input ; Recommended for new scripts
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
SetTitleMatchMode, 2 ; A window's title can contain the text anywhere
!F1:: ; Press Alt F1 to execute
IfWinExist, Microsoft Excel
{
ControlSend ,, 1000{Enter}{Down}, Microsoft Excel
}
return
Here is some code I used to first record the mouse position (relative mouse position did not work since the window was tiled and the click position could be changed by moving the tiles). Immediately after that I click the mouse at the recorded position (and redo this later on in the code as well).
SplashTextOn, 200, 100, Script Preparations, Please Click on the Person `"Search Term`" link (1) in SAP. ; Show new instructions to the user
WinMove, Script Preparations,, (A_ScreenWidth/2)-150, (A_ScreenHeight/2)-200 ; Move the text instructions window with the name "Script Preparations" 150 pixels right of the center of the screen and 200 pixels up SoundBeep 600, 300 ; Wake up user
; From here on the left mouse button will temporarily be disabled
Hotkey, LButton, on ; Turn Left Mouse Button OFF, to capture the Mouse click
KeyWait, LButton, D ; Wait for LeftMouseButton click Down
MouseGetPos, xposS ,yposS ; Store the position where the mouse was clicked (Search Box)
MouseClick, left, %xposS% ,%yposS% ; Perform the mouse click on the captured mouse location
Hope this helps.
In your situation, I assume that you only need to determine the mouse position with Window Spy.
I need to take snapshot if command prompt window running in full screen mode.
I had tried it using PrintScreen,Ctrl+PrintScreen, Ctrl+Alt+PrintScreen button(s) but nothing seems to work
Also are there any reasons that the print screen button does not work in full screen commandprompt mode? After all, it does for all windows under normal conditions.
Abdul Khaliq
In full screen mode all you have is text. There is no graphical `rendering' as such. If you can capture the text, it is enough ... though you can always reconstruct a png image later from the text (if you really have to get an image out of it).
Why don't you just use an external screen shot software?
There's many, e.g. greenshot, which is free (is in speech and beer :-)).
did you try alt + print screen?
Click any window except the command window and then hit PrtScrn.
First off all open cmd in full screen mode then click on print screen button after that open paint brush and press ctrl+v (past) you can save it in any where, where ever you want (file type should be .png).
I wasn't able to find any of these replies that work, and I can't install unapproved software do to IT policies. Here is what I did:
Right click inside command window. Hit select all. Right click outside of window (on top bar close to the maximize minimize controls. Select edit; select copy. Open a notepad window and paste. The advantage here is you have text that can be copied and pasted back into a command window later. I hope this helps.
press ctrl+a //select all
press ctrl+c // copy all text
write notepad mytext.txt + press entet // open notepad
press ctrl+v //paste in text in notepad
press ctrl+s // Save file
press ctrl+w // Close notepad.
Is there an SSH client that can present a client side GUI interface to the screen* program?
I'm thinking of an SSH program that would hook in with screen's session handling and map client side actions (clicking on a tab, ctrl-tab, scrolling, possibly even allowing several tabs to be seen at the same time) to whatever it takes to make screen at the other end do it's thing.
* The screen program that allow multiple virtual consoles under a single terminal session, for example you can run several apps under a single SSH connection and switch between them as well as other cool things.
An interesting idea, and quite possible (vim7's tabs show as clicky GUI tabs in gnome-terminal), but I don't see the benefit of doing this..
Using the follow ~/.screenrc shows "graphical" tabs:
startup_message off
vbell off
hardstatus alwayslastline
hardstatus string '%{gk}[ %{G}%H %{g}][%= %{wk}%?%-Lw%?%{=b kR}(%{W}%n*%f %t%?(%u)%?%{=b kR})%{= kw}%?%+Lw%?%?%= %{g}]%{=y C}[%d/%m %c]%{W}'
..which look like the following (after renaming the tabs using ctrl+a,a:
x http://img216.imageshack.us/img216/9401/picture4myi.png
You can scroll around in a screen session using "copy mode", by doing ctrl+a,[ and using the cursor keys (press Esc or ctrl+c to exit it)
You can also attach to the same screen session multiple times using the screen -x flag (rather than -r), so you could use any tabbed terminal emulator, and open one tab for each screen-window.
If you really did want to start implementing this - one option would be to look into modifying gnome-terminal, to copy the behaviour with vim's tabs for screen. Or, write your own screen client - you don't need to do anything as fragile sounding as scraping the terminal - there's a FIFO file in (usually) /tmp/uscreens/S-$USER/$PID.sessionname which I think is how screen communicates, and remember screen is open-source!
Interesting idea. I use screen everyday both on my local machine and for SSH sessions. I think your biggest problem is that I suspect most screen users are commandline junkies like me who just won't see the benefit of making a gui for tabs. In fact, I have all my terminals in one gnome-terminal window under different tabs, and having screen's text-based tabs is a nice way not to confuse the two.
I suspect it could be done, but you'd be writing a specialised terminal emulator which analyses screen's output (custom .screenrc) and retrofits the gui.
A lot of work for minimal gain.
ctrl+a shift+'
.. gui front-end to screen? what are you talking about??
also, because my rep is so low, and i cant comment, id like to LOL # geoffc for his comment in the question
I've never seen one, but the following may help you. Add to your .screenrc
To show a row of "tabs" on the bottom
caption always "%{.bW}%-Lw%{.rW}%n %t%{-}%+Lw %=%{..G} %{..Y} %m/%d"
To show the current program as the screen name [assuming you're using bash and your prompt ends with "$ " by default; others shells are the exact same idea]
shelltitle "$ |sh"