Tip (Update): Runtime display resolution change for IGEL Linux based devices (without UMS and local IGEL Setup)

Hi Folks,

i got a request for a resolution change solution which allows the user a resolution change without contact the helpdesk or using the IGEL Setup via an icon on a desktop or maybe a hotkey.

First of all: This will not have an impact on running session like RDP/ICA or whatever, the user needs to do this before he starts any session!!!

Preparing the solution:

You need to figure out what display types/connector’s you are using for example for the UD2 Multimedia/IZ1 you have VGA and DVI-D. If you are not quite clear what you have to use here go to the client which should get the solutions and open a terminal session, log in as root and execute the command “xrandr -q”. This command will give you all supported resolutions including the available display connector names. Write it down and also the resolutions you want to use (this can be more or less as mentioned in the IGEL Setup depending on the connector/display(!)).

Okay… Now the funny part, open the profile in the UMS and/or the local IGEL Setup; in my sample i will create two add-on sessions to switch between 1280×1024 and 1024×768 for the VGA and the DVI-D port on a IZ1/UD2-Multimedia.

In the profile/igel setup browse to System->Firmware Customization->Custom Commands->Desktop Commands->Custom Command Desktop Final and add the following script.

#Generate 1280×1024 script
echo “#!/bin/sh” > /config/sessions/res0
echo “xrandr –output VGA –mode 1280×1024 –pos 0x0 –rotate normal” >> /config/sessions/res0
echo “xrandr –output DVI-D –mode 1280×1024 –pos 0x0 –rotate normal” >> /config/sessions/res0
chmod 777 /config/sessions/res0
#Generate 1024×768 script
echo “#!/bin/sh” > /config/sessions/res1
echo “xrandr –output VGA –mode 1024×768 –pos 0x0 –rotate normal” >> /config/sessions/res1
echo “xrandr –output DVI-D –mode 1024×768 –pos 0x0 –rotate normal” >> /config/sessions/res1
chmod 777 /config/sessions/res1

Update:

If you want to start the last user display configuration after a thin client restart use this script:

#Generate 1280×1024 script
echo “#!/bin/sh” > /config/sessions/res0
echo “xrandr –output VGA –mode 1280×1024 –pos 0x0 –rotate normal” >> /config/sessions/res0
echo “xrandr –output DVI-D –mode 1280×1024 –pos 0x0 –rotate normal” >> /config/sessions/res0
echo “cp /config/sessions/res0 /wfs/lastres”>>/config/sessions/res0
echo “chmod 777 /wfs/lastres” >> /config/sessions/res0
chmod 777 /config/sessions/res0
#Generate 1024×768 script
echo “#!/bin/sh” > /config/sessions/res1
echo “xrandr –output VGA –mode 1024×768 –pos 0x0 –rotate normal” >> /config/sessions/res1
echo “xrandr –output DVI-D –mode 1024×768 –pos 0x0 –rotate normal” >> /config/sessions/res1
echo “cp /config/sessions/res1 /wfs/lastres”>>/config/sessions/res1
echo “chmod 777 /wfs/lastres” >> /config/sessions/res1
chmod 777 /config/sessions/res1
chmod 777 /wfs
/wfs/lastres

This will copy the last executed script to the /wfs folder and will execute it during the boot up (last line in script), of course you can use also a custom application with the enabled autostart option for this. Attention: in this case we have to make the /wfs folder writable for the user to copy the script in the permanent folder, this could be a security issue depending on other applied configurations like a teminal session that is available for the user. This will also bypass any resolution configuration coming from the UMS!

This will create two scripts in the /config/sessions folder, i’ve added two xrand lines per script to bring both available display connectors to the same resolution (if they are available or not…). You can also add different resolutions to it or configure the rotation, for more options see the xrandr documentation here: http://www.x.org/wiki/Projects/XRandR/

Good.. Now we have the script(s) and need to bring them available for the user… In the same profile browse to custom appliaction which is also located in the System part of the profile/setup. Per script you want to deploy add a custom application and configure it like shown in the screenshot:

 

Configure the session to switch to a resolution

Configure the session to switch to a resolution

You can configure the Desktop Integration Options as you like: A hotkey, where should the session be shown and so on.

Apply the configuration/profile and you are good to go after a thin client reboot…

You can do much more with it (screen rotation and so on), feel free to play around with it but please note: As soon you reboot the client (if script one is used) or apply a new configuration thru the IGEL Setup/UMS the default resolution is applied again! If a script is not working check out that you have configured a valid resolution/display connector like mentioned above.

Update: You can also use xrandr -s 1440×900 (resolution) if you don’t want to configure seperate screens, this will always configure the default screen. See also the xrandr documentation for the exact syntax because wordpress will corrupt some characters in the script syntax.

Have Fun

Michael

P.S.: This is not official supported by IGEL Technology, no warranty or anything else from my side… 🙂