Keyboard shortcut to toggle OUT of a Citrix Workspace Desktop Viewer session - remote-desktop

Background
I'm using the Desktop Viewer functionality in Citrix Workspace (version 20.2.0.25(2002)) to access my work computer from my home computer.
Request
I would like to be able to toggle out of my (full-screen) remote session back to my local desktop more easily.
Currently I can only accomplish this via the control bar at the top of the remote session screen which is starting to feel tedious.
Alt+Tab doesn't work, because it only toggles the applications within the remote session when the session is open.
Whether toggling is accomplished via getting Alt+Tab to work as desired, a hotkey that just minimizes the session window, or some other method doesn't matter to me.
What I've Tried
There are many questions online addressing how to enable Alt+Tab within the remote session, but not disable it. Naturally I've tried to do the reverse of these instructions but no luck. They typically suggest setting TransparentKeyPassthrough=Remote in the registry of the local machine, so I figured mine should have Remote already and I would just need to clear it or replace it with something else, but mine is a null value.
I've gone through all options within Citrix Workspace and the Remote session Preferences but there's nothing about enabling/disabling/setting hotkeys.
I tried the "Disable Hotkeys through the ICACLIENT.ADM Template" of this Citrix Support page, but was unable to locate the icaclient template file they refer to.
I've contacted my company's help desk but they don't know of any solutions.

You can access the citrix menu as described here:
As an accessibility feature of the Desktop Viewer, pressing CTRL+ALT+BREAK
displays the Desktop Viewer toolbar buttons in a pop-up window.
So the shortcut for toggling out of the viewer session would be:
CTRL + ALT + BREAK, CURSOR-DOWN, ENTER

I had the same problem and solved it with an Autohotkey script. Autohotkey can intercept keypresses even when citrix has focus.
This script will allow you to get out of your citrix session with Ctrl-F1.
^F1::
WinMinimize, A
return
If you have not used Autohotkey before: Download Autohotkey, install it, save the code above in a file named citrix.ahk, double-click that file. The hotkey is now active and the script is visible as a H icon in your taskbar.
See here if you want to bind a different key.

Unable to comment on ht13's answer so i'll post my own.
CTRL+ALT+BREAK, h
worked for me.
Thankfully i remembered some keyboards have BREAK, some (like mine) call it PAUSE in case you run into that too.

I have a method for this that involves editing the registry on your local machine.
It definitely counts as 'some other method' - essentially, it sets up a keyboard shortcut that (I think) passes the Win-key keystroke to your local machine.
This opens your local start menu on top of Citrix - and from there you can Alt+Tab locally as normal.
Citrix has multiple entries in different parts of the registry, and also some settings that you can change with the Local Group Policy Editor (gpedit). Unfortunately, the only one I've found that helps is 'Hotkey13', which is only available in the registry.
I've changed multiple things, but I believe the minimal necessary steps are this:
open regedit, and navigate to Computer\HKEY_CURRENT_USER\SOFTWARE\Citrix\ICA Client\Engine\Lockdown Profiles\All Regions\Lockdown\Client Engine\Hot Keys\
ensure the value of AllowHotkey is set to 1
set the value of Hotkey13Shift; I've used Shift, if I recall correctly it accepts Ctrl and Alt and some combinations joined by +
set the value of Hotkey13Char; I've used F1, and think it accepts all Fx keys and possibly some others
restart Citrix, reconnect to your remote desktop, and test your chosen combination
Now, to access my local machine from within a Citrix session I press Shift+F1 to open my local Start menu and give focus to my local machine, and then while it is open Alt+Tab or anything else acts locally.
A screenshot of regedit highlighting Computer\HKEY_CURRENT_USER\SOFTWARE\Citrix\ICA Client\Engine\Lockdown Profiles\All Regions\Lockdown\Client Engine\Hot Keys\Hotkey13Shift

this bothered me for so long and I finally got a fix: (AHK+Virtualdesktop)
put your citrix desktop viewer in a different virtual desktop
install AutoHotKey and Windows-desktop-switcher
https://github.com/vnavkal/windows-desktop-switcher#:~:text=An%20AutoHotkey%20script%20for%20Windows%20that%20lets%20a,desktops%20by%20hotkey%2C%20etc.%20%28see%20Hotkeys%20section%20below%29.
define whatever hotkey you want to use to toggle between different virtual desktop.
it seems the AHK is able to intercept the hotkey BEFORE it is send to the Desktop Viewer.
my setup:
I use a windows desktop and 2 extra display
I put citrix on virtual desktop2, and fullscreen to all 3 screens
use the hotkey to toggle back to laptop host window virtual desktop 1 without any problem.

FN+F11 toggles out to my windows taskbar. Just need to click on the citrix icon on the task bar to go back again.

Press Ctrl+Alt+Fn+B and then W for switching to window or F to get Citrix in full screen mode. A bit faster then using arrows ...

Using SHIFT + F2 you can resize the Citrix window and access the local machine taskbar so that you can easily switch between the apps.
Refer to this link: CTX232298.

I place citrix workspace on separate windows desktop, and use CTRL + ALT + BREAK and then CTRL + WIN + LEFT/RIGHT to switch from it to another desktop.

Related

Moving window from remote desktop screen to local desktop

I don't know if the title is clear, but I'll explain what I'm trying to do.
I am using Cisco and RDP to be able to access my office computer remotely. When I first used it, I was able to have one one monitor my remote desktop and on my computer, I have my local desktop. I was able to move a window from my local desktop to the monitor and move a window from my remote desktop to the screen of my computer.
However, now, I'm not able to do it anymore. I'm able to move a window from the local desktop to the monitor, but if I try to move a window that I opened in the remote desktop to my computer screen, I'm not able to do it. The window stops at the edge of my monitor and it does as if the monitor was the only screen available.
I tried the display option: "Use all my monitors for the remote session", but what it does is it goes full screen on both my monitor and computer, and I can't see any windows I opened in my local desktop. I have to exit the full screen to be able to see the windows.
So, is there a way to see both desktops, one on my monitor and the other on my computer, and be able to move windows between the screens?
Thank you in advance for your help.

Why is [PrtSc] button not working in Intellij-Idea or Microsoft SQL Server Management Studio?

I'm using a thrid-party screen capturing application (Screenpresso). It's configured to start screen-capturing when I press PrtSc. And indeed it works except when Intellij has Windows focus. In fact, to screen capture code I have to focus on any other window press PrtSc and then select the area within Intellij.
I've looked through all the settings, and especially the Keymap settings, and I can't see anything else that has been assigned to PrtSc. Of course, I'm not really sure; when I try to find a setting via nothing happens, as pressing PrtSc has no effect.
I know this used to work for me in previous versions of Intellij (though I can't remember what versions). But PrtSc used to work in Intellij just like every other application.
So I guess the question is, why is Intellij eating the PrtSc keypress event? And can I turn it off so that the event gets correctly passed to my dedicated screen capturing application.
Intellij 2019.2.4
Windows 10, 64b
This turned out to be an issue with Screenpresso:
https://www.screenpresso.com/support/hot-keys/
Why shortcut [print screen] key does not always work?
This must be because you run your application with elevated
privileges (with admin rights) (the UAC must have displayed a popup
at startup).
For security reasons, Screenpresso can handle shortcuts
from Windows running with elevated privileges only when it is
installed in Program Files folder.
To fix this, you should install
Screenpresso in Program Files folder which is not the default
behavior:
Uninstall Screenpresso
Run again Screenpresso: Right click Screenpresso.exe and select Run as administrator
Click on the INSTALL on this computer button while holding the Control key or click on the sub-menu Install for all users:
Some users have this problem, first reported 5 years ago: Find here
Crash dumps (java_error_in_*.log in the user's home directory) can help to understand it better.

Wpf application doesn't start at startup

I have developed a wpf app and want it to run whenever the computer starts up.However I have been unable to do so......I have tried editing registry like this answer...
Launch Window on Windows startup
Interesting thing is the app does autostart when there is internet connection.It doesn't when there is no internet. I do need internet connection at some point of time to sync the data to internet application. However this should not have affected the startup of the application.
Any ideas???
I guess you can set up a timer, and after several minutes, check out your internet, if the internet is ok, then run your application continuely. If not, reset the timer, and check again.
Go to the run line (Windows + R). Type "shell:common startup" press "enter". Place a shortcut in that folder and restart your machine (depending on what the *.exe is doing you may need to set its properties to run as administrator).

WPF application freezes when rendering text (wpfgfx issues)

TL;DR:
application is built with WPF, running on .Net 3.5
newest and older versions of the app work properly on many different machines
on one specific machine it malfunctions in a strange way:
either does not start, displays black screen instead of "welcome" screen; can't do anything on that black screen
or does start and works properly, until a TextBox is presented and until the user starts entering the text into it; then application immediatelly hangs
Background:
I have built a WPF application on .Net 3.5. I've checked the application on various machines with different OS, ranging from Windows XP up to Windows 7 - and it runs fine, no bugs, etc. It also works fine on my client's several target machines, XP and W7 included again.
However, on one machine, it suddenly ceased to work. My client sent me the machine so I can investigate. From the files on its drives, I can see there were older versions, and they were used by the client for a few months. I also see that the newest version is not installed yet on this machine. So, I tried running the old versions first, to see what's the problem.
What user sees:
oldest versions (say, v1, v2) of the application does not work at all. When they start up, the only thing the application displays is ... absolutely completely black window. There should be a "welcome" screen, composed of few images and labels and a button. The app is not frozen it is "responsive" (Win7 can communicate with it, the window is not dimmed).
last (but not newest, let's name it v3) application runs fine, everything is clickable, features work OK, except one. When user is asked to provide a password, the user is presented with single TextBox in a popup. When the user enters at least one character in that textbox, the application freezes. It freezes even before having rendered the masked '*' of the password. The freezing is total, the application stops responding (the window is dimmed and the OS wants to close it), CPU goes to 100% (actually 50%, two-core system) and the only way to stop is kill it via task manager.
then I installed and tried running the newest version (v4) - it behaves just like v3 above
I've also tried reinstalling all the versions, just to be ensure the .EXE/.DLL files are not damaged - no changes (v1/2 - black, v3/4 - freeze on text)
Technical bits, just FYI:
The app is very simple, one executable with no shared libraries and no shared configuration. There is just no way the newest version could interact with old versions. Seriously, I intentionally made the app in a way it can be "just copied" and several instances can be safely kept in separate folders.
All versions of the app (v4, v3, v2, v1) work properly on all other machines, with various versions of Windows
The problem can't be related to user files or configuration, I tried copying them from problematic machine to healthy ones, and the problem does not repeat
Related to password box: There are absolutely no event handlers in the code that could produce a deadlock or freezing. The password textbox has no text-changed handlers. My code reads the text only after an "OK" button is pressed. The app freezes immediatelly when user enters first character, the
user does not even get a chance to press "OK"
Related to startup: The app does almost nothing on startup. It merely displays some form of a splash/welcome screen. There is no logic there except for a nice UI and one button. The user has no chance of pressing that button. When the app starts, the screen is black and has no contents, not even the splash/welcome image.
Tracing and observations:
I've focused on the TextBox part, since it's more granular.
I've got the app to freeze again, and checked the threads with ProcessHacker.
Except for typical threads, one thread that was sitting and busy-spinning at:
wpfgfx_v0300.dll MilGlyphRun SetGeometryAtRenderTime
wpfgfx_v0300.dll MilGlyphRun SetGeometryAtRenderTime
...
wpfgfx_v0300.dll MilContent DetachFromHWND
That's certainly problem with the WPF layer itself. The DetachFromHWND tells me close to nothing, but MilGlyphRun is surely about the text rendering. It freezes while trying to render the text. I've checked the black-screens on older versions of the applications, but I couldn't catch it, since the apps were not frozen, just black.
So..
I've applied literally all pending updates (like, 150 of them, ~800 Mb, most of them were to the OS and .Net framework)
I've tried reinstalling all video drivers
No changes, still black screen, still freezing.
So, focusing back to the problem. It failed to render a text. Sounds obvious, since it deadlocked when user entered a character into a textbox, but it's damn not obvious! The user was presented with tons of different TextBoxes until he finally got to the PasswordBox. All TextBoxes worked OK, only this one fails. And why old verions of the app display black screen and the new version displays the "welcome" screen properly? How can be those issues related?
The connection is: Windows Presentation Foundation Font Cache service.
Sources:
http://support.microsoft.com/kb/937135
http://social.msdn.microsoft.com/Forums/vstudio/en-US/7cc032c1-5f4d-4518-adc6-f53afd051e6b/presentationhostexe-running-at-50-cpu?forum=wpf
WPF uses a Font-Cache service, running as a separate process, for, well, caching fonts. Whenever your WPF app needs to draw some text, it might ask the cache service for fonts. Once in a while the font cache might get corrupted and it then will/may randomly impact any WPF application.
Unfortunatelly, restarting the service is not enough. When this happens, you must delete all FontCache files that this service keeps on the disk. Before deleting them, you must stop the "Windows Presentation Foundation Font Cache service (or whatever it's called in your languge, for example Usługa buforowania czcionek platformy Windows Presentation Foundation in Polish..). Then, go to
Win7: %systemdrive%\Windows\ServiceProfiles\LocalService\AppData\Local\
Vista: %systemdrive%\Windows\ServiceProfiles\LocalService\AppData\Local\
WinXP: %systemdrive%\Documents and Settings\LocalService\Local Settings\Application Data
and remove all files looking like FontCache.dat. The source articles mentioned only one file (FontCache3.0.0.0.dat, but in my case there were around 8 files with similar naming convention).
After deleing them and restarting the service, all versions of my application were running properly again. No black screens, no freezing on textbox.

Accessing second monitor in WPF when monitor setup set for "Show Desktop Only On 1"

I'm writing an application that will be run on a windows 7 system with a monitor and a front panel as a dual screen setup. Virtual desktop software will be used to access it most of the time, and the virtualization software should ONLY show what is on the monitor, not the front panel.
When set for "Extend these displays", the virtualization software shows both screens spliced together, and there does not appear to be a way to turn it off. If I set the Multiple Displays setting to be "Show Desktop Only On 1", the virtualization system works correctly, but now in my WPF application it's as if the second monitor does not exist. My Screen.AllScreens array only shows one monitor.
Is there a way I can get my WPF application to show on the second monitor in full screen mode when the desktop is set for "Show Desktop Only On 1"? For purposes of this application, it will ONLY ever be full screen.
You are approaching the problem from the wrong angle. You need to look at the virtual desktop software and not your app or Windows itself.
First off, for Windows to use dual screens, which you want, you must set "Extend these displays". Without this, it is impossible for Windows or any other software to use the second display.
Secondly, under "virtual desktop software" I assume something like Remote Desktop, TeamViewer or VNC. All of those programs should allow you to select whether to show all displays. For instance in Remote Desktop, before connecting you can select Options -> Display -> uncheck "Use all of my monitors for remote sessions".
If on the other hand you are looking for a way to limit the end user, that he/she couldn't in no way access or see the other monitor, then you must find a virtual desktop software that can only show the main display (this might be very hard, because most software can handle multi-display setups). The other solution is to extend your own software to stream it's main screen output to another machine and accept input from it - think of writing your own virtual desktop software.

Resources