Igel and idle reboot after 4 hours

2 min read
Igel and idle reboot after 4 hours

Rolling out updates

I’ve given this a good amount of thought. I have come to conclude if Igel thin clients reboot after 4 hours of not being in use they will then check in with the Igel UMS management server and apply updates. No one gets kicked, updates gradually roll out and everything is natural.

How to know an Igel computer is not in use

Were I live we use Igel for connecting to both VMware Horizon and Citrix Workspace provided virtual desktops and virtual applications.

Knowing this let use identify what process is running when the Horizon client or Workspace app is doing its thing. Come to find out these two process are:

  • wfica_orig
  • vmware-remotemk

With this knowledge lets construct a profile to check if either one of these processes are running and if yes then do nothing. If no to either one then mark it down until the time reaches 4 hours or 240 minutes. Then reboot.

Creating an Igel profile

Here’s how to go about putting together the profile in the Igel UMS console.

  1. Right click Profiles and select: New Profile
  2. Give it a name like: Citrix Workspace or VMware Horizon no connect 4 hours reboot
  3. Head over to: System > Firmware Customization > Custom Commands > Desktop
  4. Enable: Before Desktop Start and enter the following code:
#!/bin/bash
for (( ; ; ))
do

sleep 120
RUNNING=$(pgrep -u user "wfica_orig|vmware-remotemk")

if [ $RUNNING -gt 0 ]
then
	echo $(date +"%Y%m%d_%T")\n >> /run/WorkspaceOrHorizon_Yes.log
	rm ./run/WorkspaceOrHorizon_No.log
else
	echo $(date +"%Y%m%d_%T")\n >> /run/WorkspaceOrHorizon_No.log
fi

TIME=$(wc -l < /run/WorkspaceOrHorizon_No.log)
if [ $TIME = 120 ]; then reboot ; else echo $TIME ;fi

done &
#EOF

Click: Save

Assigning the new profile

Now go ahead and attach this profile to a folder where the devices live that connect to VMware Horizon or Citrix Workspace provided things. Remember that the new profile needs to apply and won’t take effect until you ironically reboot.

Keep in mind on my end I also work with Igel computers that are using the Igel Desktop experience and not connecting to either VMware Horizon or Citrix Workspace provided things. Some run Firefox and display full screen for kiosk stations in lobbies. In this case we do not want to apply this new profile to these Igel devices as the result would be a reboot every 4 hours without end.

Check the results live

You can connect to an Igel device running the profile to see what is happening.

Based on the code above if you look in /run you’ll find a file created called WorkspaceOrHorizon_No.log if nothing is running. Every 2 minutes this file will be updated with a time stamp. Once the total count of lines equals 120 or better put 240 minutes then a reboot command is run.

If either Horizon client or Workspace app is found running a file will be created called WorkspaceOrHorizon_Yes.log with a time stamp and the WorkspaceOrHorizon_No.log will be deleted to stop counting idle time.

Simple in what it does, great in accomplishing the desired results.

Virtualize Brief


Follow