I'm having trouble with running uzbl browser under matchbox-window-manager on a raspberry pi. I'm using it with a 22' lcd screen to display some info (temperatures, graphs, VPS server stats...).

What I actually did is: Set up the raspberry pi to start X at startup (raspi-config). Created /home/pi/.xsession with the following contents:

kiosk-browser &
exec matchbox-window-manager -use_cursor no -use_titlebar no

kiosk-browser contents:

#! /bin/bash

while true
do
    if [ $(pidof -x uzbl-core | wc -l | tr -s "\n") -eq 0 ]
    then
        uzbl -u http://localhost/ -n kiosk &
    fi


    memFree=$(grep MemFree /proc/meminfo | awk '{print $2}')

    if [ $memFree -lt 30000 ]
    then
        echo 'reload_ign_cache' > /tmp/uzbl_fifo_kiosk
    fi


    sleep 20
done

So you now see what I'm trying to achieve. I'm updating some divs contents and images using jQuery, and didn't find a better way not to freeze the pi after consuming all available RAM, as each browser I tested does this (after some significant ammount of time).

The problem I'm having with this setup is it sometimes doesn't reload the browser properly, but freezes instead. Sometimes with a black screen (as when the pi starts), sometimes it's white screen (uzbl loading html), and sometimes even sooner, before dismissing the old html contents.

So basically what I'm trying to ask is, is this setup ok? Is this how it's done, or am I missing something? :)

THANK YOU!

migrated from serverfault.com Mar 16 '13 at 12:24

This question came from our site for system and network administrators.

  • Try to break out the portions of your script into named functions, like uzbl_is_running() { ... pidof ...; }, making the purpose of each section easier to guess. – Henk Langeveld Mar 16 '13 at 11:43
  • I'm not sure if this belongs in ServerFault - you're trying to setup a dashboard type system? Is it for home or will you deploy more than just this one? – Henk Langeveld Mar 16 '13 at 11:47
  • I'm using this one for home purposes, as you say ... – Kukosk Mar 16 '13 at 12:08
  • If someone's more familiar with linux, especially X, let me know if the .xsession file is okay, and should work. Thank you :) – Kukosk Mar 16 '13 at 14:41
  • You might want to do without the exec unless there's a reason for that. Note that you don't have to run a window-manager; if all you want is the browser, just leave it at that. – goldilocks Mar 16 '13 at 15:09
up vote 2 down vote accepted

Thank you all for helping me! I managed to probably solved this with just using lightdm (no other window manager).

Contents of kiosk-browser now:

while true
do
    if [ $(pidof -x uzbl-core | wc -l | tr -s "\n") -eq 0 ]
    then
        uzbl -u http://localhost/ -n kiosk -g 1366x768+0+0 &
    fi


    memFree=$(grep MemFree /proc/meminfo | awk '{print $2}')

    if [ $memFree -lt 30000 ]
    then
        echo 'reload_ign_cache' > /tmp/uzbl_fifo_kiosk
    fi


    sleep 10
done

Then I edited /etc/lightdm/lightdm.conf to log in as 'pi' and use the 'kiosk' session:

autologin-user=pi
autologin-session=kiosk

And created a file @ /usr/share/xsessions/kiosk.desktop:

[Desktop Entry]
Encoding=UTF-8
Name=kiosk
Type=Application
Exec=kiosk-browser

to start kiosk-browser when lightdm starts...

  • What changed in kiosk-browser? – nafg Nov 14 '13 at 5:27

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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