Sunday, May 3, 2020

COVID-19 Work From Home

The current firm I work for has transitioned most tech and ops people from using physical PCs to using LVDI. In the office, I have 4 x 24" monitors with pixel density 1980 x 1080 attached to a thin client that displays my LVDI desktop. Signing-on is easy because the network is internal. There's also a link to sign-on externally in case there's a need to quickly check something.

Both of these methods only require:
  • browser 
  • Citrix
At home, I have a gaming PC with 1 x 27" monitor with density more than 1980 x 1080 (although the graphics card can display 3 x 4k). There's also an extra 1980 x 1080 24" monitor attached to a very old mac mini.

To make employees work comfortably from home, my firm allowed purchasing of peripherals but only for max USD 150 on a monitor. The best I can get with the amount is 1 x 27" monitor with 1980 x 1080. 

I can now at least have dual monitor on my gaming PC to display my LVDI desktop. 

However, due to differences in pixel density, I always have to scale the gaming monitor down to 1980 x 1080 so that Citrix can be displayed on both monitors. Furthermore, since it's a gaming PC, I don't really need the extra graphics power and carbon footprint on electricity usage (which I have to handle as personal expense).

When COVID-19 struck, non-essential people were required to work from home. While the pandemic is going to stay here for a while, it is now very challenging and cumbersome to set-up my PC every time I login.

The thinking light bulb turned on when a colleague mentioned that Raspberry Pi 4 can display 2 x 4k. This set-up will allow me to have dual monitors using the old 24" and the new 27" monitor which have the same pixel density. I can now leave my gaming PC at peace (meaning the wife can use it too by playing World of Warcraft while I am working).

The problems I faced (in sequence):
  1. Citrix ica isn't recognized
  2. Citirx ica doesn't auto launch
  3. digital certificate issues
  4. Citrix can't span both monitors when the app is maximized
  5. middle click doesn't work as expected
None of the solutions are mine to take credit for. These were all gathered from all over the internet but succinctly presented below.

To solve (1):
  • download the debian package "Citrix Workspace app for Linux (ARM HF)"
  • cd /home/pi/Downloads
  • issue command sudo dpkg -i icaclient*.deb
To solve (2):
  • once the ica is downloaded in Chromium, set to "Always Open"
To solve (3):
  • the error dialog will tell you which certificate to download from the issuer (DigiTrust, EnTrust, etc)
  • if the certificate needs some conversion you'll have to install openssl and convert with proper command
  • sudo copy the pem file to /opt/Citrix/ICAClient/keystore/cacerts
  • execute command /opt/Citrix/ICAClient/util/ctx_rehash
To solve (4):
  • install icewm window manager by issuing command sudo apt-get install icewm
  • edit the files /etc/xdg/lxsession/LXDE/desktop.conf and /etc/xdg/lxsession/LXDE-pi/desktop.conf by changing from window_manager=openbox-lxde-pi to window_manager=icewm
  • edit /usr/share/icewm/preferences with ShowTaskBar=0
  • execute command sudo reboot
To solve (5):
  • edit /home/pi/.ICAClient/wfclient.ini with MouseSendsControlV=False
Now, I have an energy efficient very very thin client with 2 monitors that can display my LVDI desktop during the COVID-19 pandemic!