5

I have set up a Chrome Kiosk using a custom session in X to run Google Chrome.

It generally runs pretty well except except for a screen size issue.

I have a "chrome.desktop" session file saved in /usr/share/xsessions with the following contents.

[Desktop Entry]
Name=Chrome
Comment=This session logs you into Google Chrome
Exec=/usr/share/xsessions/chromeKiosk.sh
Icon=
Type=Application
Encoding=UTF-8

There is also a chromeKiosk.sh file that is used to execute Chrome. It is also in /usr/share/xsessions. The contents are as follows.

#!/bin/bash
while true; do google-chrome http://news.bbc.co.uk --kiosk --start-maximized --disable-restore-background-contents --login-screen-size="1024,768" --disable-translate --disable-new-tab-first-run --enable-vertical-tabs; sleep 5s; done

The problem that I am having is that Google Chrome (or Firefox, or Opera. I have tried various apps), will not maximise to the entire 1024x768 display. It seems to be leaving approximately 1 centimetre of space on the right hand side of the display (I can see the desktop), and also some space at the bottom of the screen.

I have tried this on at least 2 different computers. One had a higher resolution screen. It left an even bigger gap.

It is as if the application that it being run thinks the screen is smaller than it actually is.

Does anybody have any idea what is going on? I am going nuts with this problem.

Here is an image so you can see the border

Google Chrome Kiosk Xsession with odd border

That image is from a screen with a 1280 width.

1
  • I have only tested this on Ubuntu 12.04, so I don't know if it is specific to that version. Apr 23, 2012 at 22:50

2 Answers 2

4

Not sure why Chrome is doing this, but if you have a look at:

/home/{kiosk_user}/.config/google-chrome/Default/Preferences  

-- you will see browser.window_placement and you should see a difference of about 20 pixels between bottom and work_area_bottom, and right and work_area_right.

I edited the values to be the full extents of the display size, and saved Preferences, then chown'd then to root:root and chmod'd them to 644 so that Chrome (running as the kiosk_user) cannot modify the settings.

I restarted the kiosk_user session and tada, Chrome was running full full screen.

Hope this helps you.

2
1

You are just about to done it... see my codes:

[Desktop Entry]
Name=Chrome
Comment=This session logs you into Google Chrome
google-chrome --start-maximized --kiosk http://google.com
Icon=
Type=Application
Encoding=UTF-8

now you need to edit Chrome configuration for user
open location: ~/.config/google-chrome/Default/
and then open Preferences.
Search for "browser": { and modify followings:

   "browser": {
      "check_default_browser": false,
      "clear_lso_data_enabled": true,
      "custom_chrome_frame": true,
      "pepper_flash_settings_enabled": true,
      "window_placement": {
         "bottom": 803,
         "left": 1,
         "maximized": false,
         "right": 1366,
         "top": 35,
         "work_area_bottom": 768,
         "work_area_left": 0,
         "work_area_right": 1366,
         "work_area_top": 37
      },

In my PC I've 1366x768 please adjust as you need.

(you may also add this file in /etc/skel location, this will solve the problem while creating new user you don't need to re-config)

1
  • Sorry to say that, you cant escape or log-out from Chrome kiosk mode then you need to do a simple tricks: ALT+CTRL+F1 then login and now type sudo gdm restart or sudo lightdm restart. I'm still looking for code to RUN TERMIANAL CODE from BROWSER I found something like apt: for firefox, it opens ubuntu software center with specific system call.
    – Subhasom
    Jan 27, 2013 at 19:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .