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.
This is a tricky one, I had a similar problem, when trying to have only a ncurses based interface on a time tracker pc, the problem for me was that when no window manager is present, normal X Window applications behave oddly. Here's my proposal:
Worked for me, with Ubuntu 12.04 and chromium.
case1
You need to tell chromium what your screen resolution is by rewriting its preferences file (bottom and right values). The link you posted includes that part.
(tested in Ubuntu 12.04)
case2
I would say you have to somehow tell your pyGTK app what the bottom and right values are, respectively what the screen resolution is. Then the fullscreen command should make your app cover all of the screen i.e. not leave any borders.
Edit: it looks like the window.fullscreen() method should in general make it really fullscreen. So no need to define the resolution first. More info here, but I'm sure you already know this: http://www.pygtk.org/docs/pygtk/class-gtkwindow.html#method-gtkwindow--fullscreen
Case 1 in my case this helped me out:
I changed the values according my screen resolution