Custom session: Window does not capture full screen area by default. 12.04

Posted by juzerali on Ask Ubuntu See other posts from Ask Ubuntu or by juzerali
Published on 2012-09-06T07:07:13Z Indexed on 2012/09/29 3:51 UTC
Read the original article Hit count: 378

Filed under:
|
|

I am trying to create a custom session by creating a custom.desktop file in /usr/share/xesessions folder. Remember this is not a gnome or some other session. I have created my own application for this session, which are simple.

Case 1

Chrome Browser

Contents of custom.desktop file

[Desktop Entry]
Name=Internet Kiosk
Comment=This is an internet kiosk
Exec=google-chrome --kiosk
TryExec=
Icon=
Type=Application

Issue

Chrome browser starts in kiosk mode but does not capture complete screen area. Some area is left at the bottom and right side of the screen.


Case 2

Custom pyGTK app (Quickly)

Contents of custom.desktop file

[Desktop Entry]
Name=Custom Kiosk
Comment=This is a custom kiosk
Exec=~/MyCustomPyGTKApp
TryExec=
Icon=
Type=Application

Issue

My custom pyGTK app has window.fullScreen() in the code. That means it should open in full screen without the window chrome (and it does under the normal session). But that too, leaves lots of space around it.

Need Help

Can anyone tell me whats going on here. I think its some issue with borders as pointed out at http://www.instructables.com/id/Setting-Up-Ubuntu-as-a-Kiosk-Web-Appliance/?ALLSTEPS in Step 8

If by chance, Google Chromium is not stretched to the edges with the --kiosk switch enabled there is a simple fix. To stretch Chromium simply log in as your regular user and edit chromeKiosk.sh to not have the --kiosk switch. Then log in as the restricted user, click the wrench and choose options. Then on the Personal Stuff tab select Hide system title bar and use compact borders. Close the options screen and stretch Chromium to fit the monitor. Then go back into the options window and set it to Use system title bar and borders. After this is done, log out of your restricted user (might need to just reboot) and log into your regular user. Edit chromeKiosk.sh back to include the --kiosk switch again and Chromium should be full screen next time you log into the restricted user.

If I were to use a custom pyGTK or a gtkmm app, how should I get around this issue. window.fullScreen() should occupy the complete screen area. This has to be done programmatically or in some other way that can scale. I have to deploy this on large number of machines located at different geographical areas. Doing it manually on every machine is not possible.

© Ask Ubuntu or respective owner

Related posts about pygtk

Related posts about guest-session