1

I'm a complete newbie when it comes to Ubuntu and Linux in general so please be gentle.

I've been tasked with creating a web kiosk at work and i'm all but there except from as the title suggests...Google Chrome will not load full screen...it will load half a screen all on the left side and on the right side all black. Its Google Chrome I have installed on an openbox and not chromium. The screen is full HD resolution.

I've been pouring through forums for the past 5 days trying to resolve the issue and can't seem to get there.

I found the below from another question but with me being new to Linux I don't quite understand it and where I have to go/what I need to type..like is it a sudo?

    [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
  },

The bit that really confusing me is where it says:

'open location: ~/.config/google-chrome/Default/ and then open Preferences. Search for "browser": { and modify followings:'

How do I open to that location?

I apologise if my questions seem silly or stupid but i've been thrown in at the deep end.

Any help would be greatly appreciated.

Thanks.

| improve this question | | | | |
  • Which question/answer are you referring to? – muru Sep 16 '14 at 21:07
  • The two bits of code is all I could find for maybe resolving my issue but I don't quite understand it. Is it a sudo or a sudoedit, if so what would be the sudoedit location. – B_Kirk Sep 17 '14 at 8:13
1

This part looks like an entry for a Desktop session:

[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

There's a mistake. google-chrome --start-maximized --kiosk http://google.com should be Exec=google-chrome --start-maximized --kiosk http://google.com. You should create this in /usr/share/xsessions with a .desktop extension:

sudo tee /usr/share/xsessions/chrome-session.desktop <<EOF
[Desktop Entry]
Name=Chrome
Comment=This session logs you into Google Chrome
Exec=google-chrome --start-maximized --kiosk http://google.com
Icon=
Type=Application
Encoding=UTF-8
EOF

Now, in LightDM, at the login prompt, clicking on the Ubuntu icon will list one more session called "Chrome".


The above session has odd issues with Chrome not being properly maximised. One way that worked for me was to run the Compiz window manager and then run Chrome. The desktop session file:

$ cat /usr/share/xsessions/chrome.desktop
[Desktop Entry]
Name=Google Chrome
Comment=Open the Google Chrome browser
Exec=/usr/sbin/chrome-session
TryExec=/usr/sbin/chrome-session
Type=Application

/usr/sbin/chrome-session is a script:

$ cat /usr/sbin/chrome-session 
#!/bin/bash
compiz & 
while true; do google-chrome --start-maxmized http://google.com; done 

(I run Chrome in an infinite loop, so that browser is restarted if accidentally closed. This might be better handled using the --kiosk or --enable-kiosk-mode flags.)

| improve this answer | | | | |
  • I tried the: sudo tee /usr/share/xsessions/chrome-session.desktop << But what I got back was -bash: syntax error near unexpected token 'newline' – B_Kirk Sep 17 '14 at 11:13
  • @B_Kirk, sorry, typo. There was supposed to be an EOF there. updated. – muru Sep 17 '14 at 11:28
  • Thanks muru, but this has put a boarder around the window and the window isn't full screen either. Any suggestions? – B_Kirk Sep 17 '14 at 16:10
  • @B_Kirk I have updated the answer. Try with the modifications. – muru Sep 17 '14 at 16:29

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.