Next, edit /usr/share/X11//nf and change MboxFile to /dev/char_dev and finally, add the following to /etc/rc.local before X11 is launched (i.e.
Raspberry pi gui startx install#
You don’t need to install this, everything will work just fine without it at the time, we were trying to squeeze every last ounce of performance from the Pi, so it seemed pertinent to install this patch.įirst, download and from Simon J Hall’s latest release on github and extract them to the Pi: sudo tar xfvz -C / UPDATE: Comments have suggested possible problems with newer Rasbian releases. This has worked for us and has been nice and stable. Optional bonus Step 4: Accelerated X11 ServerĬurrently (Sep 2013), the default X11 server isn’t exactly optimised for the Raspberry Pi however, work is afoot and you can install a work-in-progress version fairly easily. Matchbox-window-manager -use_titlebar no -use_cursor no &Īnd that’s all there is to it just (re)boot your Pi and it should boot, detect the screen and optimise for it, start X, launch Chromium and be ready with your chosen web-page in kiosk-mode! # Start the window manager (remove "-use_cursor no" if you actually want mouse interaction) Xwit -root -warp $( cat /sys/module/*fb*/parameters/fbwidth ) $( cat /sys/module/*fb*/parameters/fbheight ) # Hide the cursor (move it to the bottom-right, comment out if you want mouse interaction) Sqlite3 /home/pi/.config/chromium/Default/Web\ Data "CREATE TABLE meta(key LONGVARCHAR NOT NULL UNIQUE PRIMARY KEY, value LONGVARCHAR) INSERT INTO meta VALUES('version','46') CREATE TABLE keywords (foo INTEGER) " įbset -depth $( cat /sys/module/*fb*/parameters/fbdepth ) Mkdir -p /home/pi/.config/chromium/Default # Generate the bare minimum to keep Chromium happy! Killall -9 matchbox-window-manager 2>/dev/null
Killall -TERM matchbox-window-manager 2>/dev/null # Clean up previously running apps, gracefully at first then harshly With that all done, the installation needs to be told to start-up X using a tailored xinitrc (kept on the boot-partition so that it can easily be edited on a non-Linux machine) by adding the following to /etc/rc.local: if thenĪnd the xinitrc file looks like this: #!/bin/sh Printf "=> Resetting frame-buffer to %dx%dx%d.\n" $_XRES $_YRES $_DEPTHįbset -all -geometry $_XRES $_YRES $_XRES $_YRES $_DEPTH -left 0 -right 0 -upper 0 -lower 0 Printf "=> Resetting screen to preferred mode: %s-%d (%dx%dx%d).\n" $_GROUP $_MODE $_XRES $_YRES $_DEPTH Printf "=> Screen is on, extracting preferred mode.\n"Įval $( edidparser /tmp/edid | fgrep 'preferred mode' | tail -1 | sed -Ene 's/^.+(DMT|CEA) \((+)\) (+)x(+)? ) Printf "=> Screen is not connected, off or in an unknown mode, waiting for it to become available.\n" While ! $( tvservice -dumpedid /tmp/edid | fgrep -qv 'Nothing written!' ) do Next, add this to /etc/rc.local it waits for a monitor to be attached to the HDMI socket, probes it for its preferred mode, sets that preferred mode and finally resets the framebuffer ready for X to takeover: # Wait for the TV-screen to be turned on. So, first set the framebuffer up by adding this to /boot/config.txt: # 1900x1200 at 32bit depth, DMT mode If you know exactly what resolution your monitor is, just tweak the config.txt file and skip the rest of this step! After a few days’ tinkering, I came up with this strategy: set the internal framebuffer to as large as it can be, then detect the monitor’s capabilities and adjust. This was the hardest part for us because we have several monitors of slightly different native resolutions and, through net-booting, only wanted to have one filesystem-image presented to all the Pis. Sudo apt-get install matchbox chromium x11-xserver-utils ttf-mscorefonts-installer xwit sqlite3 libnss3
Raspberry pi gui startx update#
To do this, run the commands: sudo apt-get update Although we complicate matters a bit (we net-boot the pis, which requires a few extra tweaks – see our blog post on net-booting raspberry pis), we thought it’d be useful to document what we achieved: automatically running Chromium, full-screen, with a single kiosk-mode web-page.įor the most part, we’ve used a stock Raspbian raw image, updated to the latest versions but we’ve then installed several additional packages:
Here at Watershed we’ve done this, to drive the screens of our digital signage system. It seems there’s some demand for knowledge of setting up a full-screen, browser-based kiosk on the all-singing Raspberry Pi.