[Testing] X11(simple desktop) + Chromium(web browser) in a simple installer for Stretch

I’ve made a small installer for a simple desktop, that runs fine on a pi2, pi3, vero2 and vero4k with the latest image installed. This in NOT an official desktop installation. The installer takes about 15 mins to install everything, with a few none vital warnings. It installs Xserver, LXDE core, Chromium, OSMC desktop background image and one Icon on the desktop, for a file manager. Finally a starting/launcher addon for kodi.

This installer, also installs a “virtual mouse & keyboard” controlled via the official OMC-remote. The Arrow-keys move the pointer, Play-key is left click, Stop-key is right click and Home-key gives a on-screen keyboard.

Chromium is not accelerated, so streaming isn’t the goal of this installation.

To start the installer, ssh into your OSMC-device and run these commands in osmc-users homedirectory:

wget https://raw.githubusercontent.com/zjoasan/x11-osmc/master/install_x11.sh
sh ./install_x11.sh

After install you must enable the plugin:
Goto Settings->Add-on Browser->My add-ons->Program add-ons->X11 Launcher->Enable

Under Programs, you will now have another icon beside My OSMC


For Vero4k users, you need to install this driver to get X working better, but there is a drawback. You have to reboot your device after running Xwindows, since it wont play HW-accelrated video when changing the alpha channel settings. (will try to work on it):

 sudo apt-get install git build-essential xorg-dev xutils-dev x11proto-dri2-dev
 sudo apt-get install libltdl-dev libtool automake libdrm-dev
 mkdir fbtrurbo
 cd fbtrurbo
 wget https://github.com/zjoasan/x11-osmc/raw/master/aarch64.zip
 unzip aarch64.zip
 cd xf86-video-fbturbo-aarch64/     
 ./autogen.sh
 ./configure --prefix=/usr
 make
 sudo make install 
 sudo cp xorg.conf /etc/X11/

Hope you enjoy it.

Updated 2016-11-22, for Krypton, added splash screen, shortened the sleep commands.
Updated 2016-12-29, Chromium 51
Updated 2017-07-14, Added instruction for accelerated X windows driver on Vero4K
Updated 2017-10-26, Added a UID check for osmc user in the begining of script
Updated 2017-11-24, Updated Vero4k driver instalaltion
Updated 2018-01-08 Updated installation for Stretch, Chromium v.63
Updated 2018-01-11 Updated description, changed x_init.sh to clear VT before startx
Updated 2018-01-23 Fixed addon update in install_x11.sh
Updated 2019-08-20 Work In Progress mouse driver for OSMC-remote, missing left/right click
Updated 2019-08-30 OSMC-remote as mouse, and virtual keyboard.
Updated 2021-05-16 Made a Leia branch (untested), wget link in post 413
Updated 2022-12-18 Updated installer, check for Bullseye or install old chromium(with https issues)

10 Likes

Hi, yes sounds interesting, not the installer actually, more the part bout the launcher. Couldn’t get that to work by myself…

Sent a PM with link and details about the launcher.

@joakim_s, why not put a [Testing] in the title and post the instructions here? Would be more than happy to give it a try on my test system.

Hi @joakim_s, I tried your installer and it is working very well.
Only thing I needed to do was to activate the addon. But that might also caused by the fact that I am using a v17 install.
Switching between Kodi and the Desktop takes a bit of time but works well.

Glad to hear, strange about the addon not updating, gonna check the script for simple spelling misstakes from me. But i thought

xbmc-send -a “UpdateLocalAddons” >/dev/null

should work in v.17, but i haven’t actually tried the command at prompt, with the redirection of output to dev-null.

The time it takes to start it up might be trimmed as much as 10 seconds, but there will always be a delay since it takes awhile to shut down kodi

Maybe miscommunication, it was installed but not enabled

Wow - great work.
Why hasn’t this been done before :slight_smile:

One quick question, when I quit lxde it pops up a menu with lots of options, logout, shutdown, reboot, etc. Can this be removed so we just go straight back to osmc?

Simplest way to fix this is to edit a config file:

nano /home/osmc/.config/lxpanel/LXDE/config

change the to:

Logout=pkill lxsession

To save the change, use this key combination:
ctrl+x,y,enter

1 Like

Hmm. I’ve been thinking about a solution that opens a Web browser next to osmc, so that Kodi don’t have to be shut down and you could in essence alt-tab between Kodi and the browser. But I don’t have the slightest idea of how to do that…
So far, your solution seems to be okay. It’s not pretty or very efficient, but it gets the job done.

Hi Joakim,

Many thanks for this, I’m not “Linux/RPi fluent” enough to have done all this, and it just worked perfectly :). The only caveat I found from my noob experience was that a sudo reboot was necessary after launching the install :).

BTW I did that on a raspberry pi 3 model B.

@goldug Well it was never meant to be pretty, but it gets the job done until the official solution comes.

@Beignet10 Glad you got it working, strange that you needed to reboot. Was it to get the “launcher” to be visible in Kodi you had to reboot?

@joakim_s : No,Before reboot, launcher extension was visible in Kodi/programs, but launching it led me to a black screen
It was because there was some missing display driver to my TV screen ( at least that’s what I understood from the logs). BTW, I had a look into the scripts (actually, modified them a little in order to only run chromium using xinit) and I was wondering what are the “sleep 30” and “sleep 10” for ?
I’m guessing this is related to the commands that are around

Thanks @joakim_s for this. Ill give it a test. :slight_smile:

@Beignet10 Whats the browsing speed like on chrominum on the rpi3?

Can this be safely unistalled or should i try it on a testing system first.

Cheers

@the_bo browsing speed was fine as far as I could see (but I advise you not to open many tabs ^^).
I browsed some facebook and was pretty satisfied but I’m mainly focused on flash right now, because I wanted to watch some streaming videos without turning my PC on. Flash playback (not in HD) is almost usable even though it is not using hardware acceleration (I am using flash pepper : Howto: Flash support for most browsers (RPi 2/3) - Raspberry Pi Forums )

About uninstallation, no idea. I will let Joakim answer, just did the installation tonight but I did a backup of a lot of things beforehand.

@Beignet10 The sleep command is timing things to not start or stop to quickly, it’s a delicate walk to get it working properly. As I said before in this thread, there is seconds to shave of, but when i’ve been playing with the scripts i’ve taken a few seconds to spare.

@the_bo Uninstall i haven’t really tried, but it’s all deb packagesand a couple of text files files so i think it should be doable. Just never thought much about it. Do it in a test evrioment, it’s a reason why we call it “testing” in thread name.

Please has anyone tried it on the vero2 ?

Just had a quick look at @joakim_s’s script. He uses ARMv7 binaries and everything is grabbed from the repository, so it should work.

You can’t really brick the Vero 2, so I’d say try it if you’re willing to accept the fact that you may need to reinstall OSMC (which can be done from Download - OSMC).

Thank you @joakim_s. Your script solved a problem I was facing in another thread

Hi,

Small update here:

  • I still had some black screens when starting chromium under x11 from the kodi addon. Those black screens never happened right after a pi reboot and their frequency did not seem to be related to the sleep times in the scripts (increasing, decreasing or leaving them at the values you set didn’t seem to change anything)
    After some investigation, I noticed that in these cases the XOrg log shows :
    [ 223.067] (II) FBDEV(0): hardware: BCM2708 FB (video memory: 0kB)
    [ 223.067] (II) FBDEV(0): checking modes against framebuffer device…
    [ 223.067] (II) FBDEV(0): checking modes against monitor…
    [ 223.067] (–) FBDEV(0): Virtual size is 1x1 (pitch 1)
  • From this thread ( Running Xorg on Raspberry Pi through Docker - Add-on Support - LibreELEC Forum ), I understood that kodi when restarted seems to set framebuffer size to 1x1 for some reason (save memory because it’s not really using it ? … ). Therefore I used fbset to ensure the framebuffer parameters are at the wanted values in my chromium starting script. It seems to have made things better. Although this is not the only cause of black screen (as you said, shaving too much on the sleep times is another one), I think this helps with stability. I will let you know if it is better in the long run.