0

I'm trying to setup a kiosk. I've managed to successfully setup something that auto starts on startup using Xinit and matchbox however I'm unsure how to do 2 things:

  1. Is it possible to change the GUI theme so that its not the ugly win95 looking theme?
  2. How do I remove the ugly border around the edge of the screen?

I'd greatly appreciate your help :)

Thanks!

.

Script I used to get a browser to start in kiosk mode...

sudo apt-get update -y;
sudo apt-get install -y matchbox-window-manager epiphany-browser xinit;

I then setup the Xinit file:

cd ~/
nano .xsession

.

#!/bin/bash
while true; do
    epiphany-browser -a --profile ~/.config http://google.com &;
    exec matchbox-window-manager  -use_titlebar no;
    sleep 2s;
done

On restart the raspberryPi now will now auto startup the browser!

3
  • 1
    Epiphany is gtk based, and you can set a per user gtk theme. If you are doing a full screen, single app kiosk, you don't need to bother with any window manager, which will then eliminate the outer border and titlebar (or you could configure matchbox to do so, since it's what's doing that).
    – goldilocks
    Commented Nov 24, 2015 at 1:13
  • Hi @goldilocks, Thanks for your comment! :) Do you mind expanding on how to set the gtk theme and how I could eliminate the outer border by not using / using the matchbox manager? I'm a bit of a noob in these areas. Thanks for your time :)
    – Jammer
    Commented Nov 24, 2015 at 1:26
  • In case you aren't interested in all of my answer, make sure you do at least read the last part about that while true loop -- although it may work to start epiphany and matchbox, it does not do what you think it does since the exec renders it nonsensical.
    – goldilocks
    Commented Nov 24, 2015 at 15:02

1 Answer 1

1

How to change the GUI theme on Xinit / X11 / X display / Xorg?

X doesn't have a theme because it's not responsible for how anything looks. Well -- that's not quite true; cosmetic preferences can be set for very old school X apps using a configuration file, but themes are not a concept there.

Global themes are commonly implemented independently by:

  1. The window manager, which controls the appearance of window frames and titlebars.

  2. The desktop environment (DE) -- if any (you aren't using one) -- which controls things like taskbars, and may provide a unified interface to the window manager.

  3. Widget libraries, which are used by individual applications to provide normal GUI features like menus and other controls. DE's also sometimes provide a unified interface to one or another of these. Since they are are coded into the applications, there may be more than one in use on any given desktop (resulting in a subtle or not so subtle difference between one app and another). The two most significant ones on GNU/linux are Gtk+ (primarily) and Qt, both of which use incompatible major numbering systems, meaning, e.g., an app written for Qt 4 can't use Qt 5 and vice versa.

This last point about versions is significant because the theming for each major version is controlled separately, and you could have contemporary apps using Gtk+ 2, Gtk+ 3, Qt 4, or Qt 5. I know that epiphany uses gtk, but newer versions might use v. 3.

Gtk+ 2 is controlled with a per user file, ~/.gtkrc-2.0. An easy way to set that from the desktop is gtk-chtheme, which is an independent package:

apt-get install gtk-chtheme

Then just run it. There may or may not be many themes installed on the system; there will be more available if you look through:

apt-cache search gtk | grep theme

Installing them will make them available right away in gtk-chtheme.

how I could eliminate the outer border by not using / using the matchbox manager?

If all you are doing is starting one app, there's not much purpose to a window manager unless you want a frame (needed to resize the window).

Note that this:

while true; do
    epiphany-browser -a --profile ~/.config http://google.com &;
    exec matchbox-window-manager  -use_titlebar no;

Finishes right there -- the next line, sleep 2, never happens. This is because exec replaces the current shell with the command. So all you've done here is start epiphany then matchbox. There's no loop.

X exits when the xinit script ends (which is why some people use a loop here), so in this case, when matchbox dies, the whole GUI will shut down. Using matchbox in this keystone position may or may not serve a purpose. If instead you used no window manager, just one line:

exec epiphany-browser -a --profile ~/.config http://google.com

Then X would exit when epiphany does. Notice no & at the end there, or what would happen is epiphany would fork, the script would end, X would die, and epiphany would go with it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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