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


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


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.

3 Answers 3


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:

  1. Install ratpoison window manager
    sudo apt-get install ratpoison
  2. Unbind keyboards that shows a menu or allows you to execute terminals or commands, putting this in $HOME/.ratpoisonrc the home being the user that will run the kiosk mode
    unbind c
    unbind C-c
    unbind exclam
    unbind C-exclam
    unbind period
  3. Instead of calling directly to google-chrome, put a script like instructables' link you mentioned
[Desktop Entry]
Name=Kiosk Mode
Comment=Chromium Kiosk Mode
  1. On the script put this (remember to make it executable)
ratpoison &
xscreensaver -nosplash &
while true; do chromium-browser --kiosk http://google.com; sleep 5s; done

Worked for me, with Ubuntu 12.04 and chromium.

  • You also have a very good idea. +1
    – nanofarad
    Sep 29, 2012 at 0:25


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.



cat $prefs |\
perl -pe "s/\"bottom.*/\"bottom\": $(xrandr | grep \* | cut -d' ' -f4 | cut -d'x' -f2),/" \
> $prefs

cat $prefs |\
perl -pe "s/\"right.*/\"right\": $(xrandr | grep \* | cut -d' ' -f4 | cut -d'x' -f1),/" \
> $prefs


(tested in Ubuntu 12.04)


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:

sudo nano sudo ~/.config/chrium/Default/Preferences

I changed the values according my screen resolution

"window_placement": { "bottom": 1024, "left": 0, "maximized": true, "right": 1280, "top": 0, "work_area_bottom": 1024, "work_area_left": 0, "work_area_right": 1280, "work_area_top": 0 }

  • I cannot change it manually.
    – Juzer Ali
    Jan 29, 2013 at 19:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.