Disable global hotkeys for window - linux

I am making RDP GUI for myself and i would like all key combinations handled by RDP session. I use freerdp for handling RDP stuff, it has handy flag where i specify winId() of qt widged to embed RDP window to. Everything works except for few keys. For example window key still opens menu on host, not start menu in RDP session. Also alt-f2 opens gnome start screen instead of performing bound action in application inside RDP session. Is it possible to somehow make all key combinations to be handled only by embedded RDP window and not xserver?
I have tried following (Xlib/python):
window.change_attributes(do_not_propagate_mask=X.KeyPress | X.KeyRelease)
However that does not seem to change anything. I also tried disabling key events in qt without much luck. Truth to be told i do not know exactly if this has to be done at qt or X level. Any help would be greatly appreciated.

Related

Capture invisible (i.e.locked) virtual desktop

For test automation I'd like to capture a virtual desktop which is not visible. It is not even accessible, as a secure desktop is shown.
I know it is possible to hook into the composite manager ("dwm") to capture each and every window on that desktop. And I kmow it is possible to send events to windows on that desktop. (I know that because otherwise the test tools wouldn't work)
Before I start to re-implement the composite manager: Is it possible to get the DesktopWindow from dwm, and if so how Do I force dwm to do its job even if a secure desktop is shown?
If I have to bite the bullet and need to implemrnt compositing myself, what is the fastest way to order all windows bottom to tom and to render them to some image?
Does the win10 capture api work for invisible desktops?
To answer the last question: No, the new win10 capture API doesnt't help. For example the program
https://github.com/robmikh/SimpleRecorder/tree/master/SimpleRecorder
cannot capture a locked desktop nor can it capture sub windows.
The above is the elaborate version of:
GDI32Util.getScreenshot(handle)
with handle being the desktop window (doent work when locked) or some other window handle (works when locked, but misses the subwindows).
So the only option is to traverse all windows in z order from bottom to top.

Script solution for tabs in bash wanted

i'm in search for a solution for the following situation:
I am working for a customer who only allows accessing the linux servers
by putty (from a Windows Terminal Server).
Unfortunately i need multiple Session to work properly and effective.
Tmux and Screen are not a good option for me, because i need a visual
"tab" to keep track of all the stuff im doing.
Is this even possible or am i lost here?
Best regards.
MremoteNG does tabs and uses Putty (Putty comes with it). If you have RDP or console access to Windows server, you can upload MremoteNG portable.
Perfectly possible in screen: How to open tabs windows in GNU screen – DevSolar
Perfectly solved my problem! Thanks DevSolar!
If you're using PuTTY, you can simply open two sessions at once. Open your first session, then right-click on the PuTTY icon in your taskbar, click "PuTTY" from the context menu, and it'll open a new instance of the program. Unfortunately, this won't result in a second tab, but instead it will result in a second window and you can swap back and forth between windows.
Other SSH clients do have actual tabs as a feature - one example is MobaXTerm, which is free and doesn't require admin privileges to use on your computer, and which is indeed tabbed. It can also import your existing PuTTY configurations, so setting it up is pretty quick.
You can get this application that allows you to have mulptiple tabs in putty. you dont need to "install" it so your lack of permissions wont be an issue :
http://ttyplus.com/multi-tabbed-putty/
Regarding your auth issue, I would recommend read this :
https://www.digitalocean.com/community/tutorials/how-to-set-up-ssh-keys--2
Note - Dont worry about being lost, everybody learns at different speeds.
Regards!

Kiosk Mode - Browser Full Screen - Restrict everything else except the opened window

I am working on asp.net application which is used in one specific machine. On launching this website, the website will be opened in full screen. Now, I should restrict user to use only this window. I should not allow user to open any window, app, anything else by keyboard, mouse.
Please help me in designing this.
Thanks,
Fayaz
Some trial and error helped me. Posting here so that would be helpful for who are looking for same...
Quoting from http://www.pcmag.com/article2/0,2817,1858713,00.asp
You can lock down these subversive key combinations using restrictions in the Registry. Launch RegEdit from the Start menu's Run dialog; navigate to HKEY_LOCAL_MACHINE\SOFTWARE\
Policies\Microsoft Internet Explorer\Restrictions; and find or create each of the following DWORD values, setting its data to 1 to enable the restriction:
NoBrowserClose (disables closing the browser window)
NoBrowserContextMenu (disables right-click context menu)
NoFileOpen (disables use of Ctrl-O or Ctrl-L to launch an arbitrary URL)
NoOpenInNewWnd (disables opening a link in a new window via Ctrl-N or Shift-click)
And below url helps in blocking other functionality
http://blogs.technet.com/b/askpfeplat/archive/2013/10/28/how-to-setup-assigned-access-in-windows-8-1-kiosk-mode.aspx

Disable Chromium Ctrl+T, Ctrl+N, Ctrl+W, Alt+F4, etc on Linux in kiosk mode?

Is there a way to disable Chormium's shortcut keys in Linux? I've tried the --app and --kiosk flags but they don't disable the shortcuts, you can still create a new (though unusable) tab with Ctrl+T and can create a new (fully functional) window with Ctrl+N. Also, Chromium appears to do it's own check for Alt+F4 because even though I have it disabled in the window manager it will close Chromium. How do I disable all the shortcuts within Chromium? Window manager is matchbox, started with xorg + nodm (the default lightdm+openbox system didn't allow me to auto-restart the session or get rid of Alt+Tab).
This is for an embedded system using node.js in the background to handle hardware io, but it will need a network connection to function so I want to ensure users are locked out of the browsers (the various Ctrl+Alt+F* shortcuts have already been removed, Chromium is all that remains in making it a real kiosk system). Alt+F4 isn't a major concern (though it would be really nice to get rid of) because when Chromium crashes nodm will automatically restart it and it handles the Alt+F4 somewhat reasonably (black screen, flashing white, then it's back up - it's not a security concern just a severely ugly "feature" people might stumble accross).
I don't think chromium has an inbuilt interface for disabling os keyboard shortcuts like ALT+F4, but what you could do is intercept those key-presses with javascript and that should be enough to stop the key-presses from working.
To enable such a script on all your pages, you'd need something like greasemonkey, which chromium has a support for out of the box, you can read about it here.
Custom Keyboard Shortcuts - Chromium extensions

Disabling local cursor when using Guacamole VNC

I'm using Guacamole VNC web client viewer and I want to hide the local browser cursor, because otherwise you see two cursors and it is confusing.
I can hide the browser mouse using simple style: cursor:none;
But this is not so good because when some connection exception occurs, I need the browser mouse in order to close the error window etc.
Any solution?
What you want is to hide the remote cursor not the local one. The VNC protocol allows you to hide the remote cursor. Most VNC clients support this. For example, in noVNC (a HTML5 VNC client) there is a "Local Cursor" option to hide the remote cursor so that you only see one cursor.
Unfortunatley, you can't do this right now in Guacamole. There is a long standing bug in Guacamole to add this support: http://guac-dev.org/trac/ticket/33
Update: the option has been fixed in Guacamole.

Resources