Laptop Lid Closing Logoff Citrix Storefront


If you install UDC in a Laptop and you close the Lid, maybe you are thinking UDC behaviour will be the same as Windows or Ubuntu, but we are wrong. If you are a Citrix user and you just close the lid, Nothing happens, if you are connected by wifi, your Citrix session is still there, working with the lid closed.

So, what happen if someone open our laptop? Your desktop or aplication is open and everybody can acces to it because there is nothing to lock your laptop or your Citrix session.

So at the end, if you are thinking in Security, you can not allow to use it in your company because it is a big hole.

Then, knowing our loved UDC is an Ubuntu and with some scripting you got it.

We need to create 2 files:

  • (the script file)
  • lm_lid (the event we want to do)

We are going to use ACPI to catch the Lid Closing event and run a script to close Citrix Session.

First we need to upload these two files to the UMS:

We copy to /wfs/bin/ and /wfs/bin/

lm_lid upload

Now, we need to create a new Profile called “Lid_Close” where we create a Firmware Customization with the following custom commands.

We create 2 softlinks:

ln -s /wfs/bin/lm_lid /etc/acpi/events/lm_lid; ln -s /wfs/bin/ /etc/acpi/

With lm_lid, we are catching the Lid Closing event with this content:


And content, closing Citrix Storefront Session.

/usr/bin/icacontrol disconnect; /config/sessions/pnlogoff0; sleep 1; /config/sessions/pnlogin0

Finally, we run the following command in the profile to restart ACPI service, and just apply it.

systemctl restart acpid 

We just closed the ICA session, so noboby can login without entering the password.

Comments (4)

  1. Hi
    I’ve tried setting this up but doesn’t seem to be doing anything. Does anything need to be added to the files and lm_lid, or are they just blank files?

    • Daniel Ugarte

      Hey, the file content is explained in the post, please read it carefully and you will have that info. If after adding the content you dont get it, just tell me it.

  2. Hi
    is it possible to activate the IGEL lockscreen instaed to close the ICA Session, after Lid Close?

  3. Hi, after the lid closing you can run whatever command you want, but you have to know the command. Currently , I don’t know if there is a command to do that.

Comment here