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

Thanks to your awesome installer I (X11-firsttimer) managed to get a desktop environment on my Vero 4K (I want to use my old Vero 4K as an RDP-client with Remmina when working in home office, which works quite well so far).

Unfortunately I cannot get it to work in UHD resolution (3840x2160), neither on my 4K Monitor nor on my 4K TV. I am aware of the 4k@60Hz-over-HDMI-problem, but 4k@60Hz works fine when I connect my windows-laptop to the displays with the very same HDMI-cable. My laptop has HDMI 2.0, and so has Vero 4K, so it should work from the hardware-side, shouldn’t it?

What I tried, was to reconfigure /etc/X11/xorg.conf and added a modeline for 4k-resolution, but it seems that the file is not interpreted at all when starting up x-server. Whenever I tried to apply the new mode to xrandr (--newmode, --addmode, --output --mode) it gives me a “screen cannot be larger than 1920x1080”-error.

I am stuck here, as all tutorials either refer to a full-feature-ubuntu (which seems a bit more convenient than the LXDE-solution) or get a really verbose output after running xrandr -q - but in my case this brings up only these lines:
Screen 0: minimum 1920 x 1080, current 1920 x 1080, maximum 1920 x 1080
default connected 1920x1080+0+0 0mm x 0mm
1920x1080 0.00*

Could anyone help me or point me in a promising direction? As far as I understand my new mode added in xorg.conf should be listed when running -q - or am I wrong?

Hello
Just for the case if somebody have same problem with booting to black screen or freezing with strange pictures of X11 directories which I mentioned here:

Here is my way to uninstall @joakim_s X11(simple desktop) until the installer will be fixed for Buster which helped me:

sudo apt-get -y remove lxde-core xserver-xorg xinit fbi libinput-dev xwit xdotool x11-utils xvkbd zenity xterm
sudo apt-get remove lightdm

and just for sure (maybe not needed) rename or delete of directories:
/home/osmc/x11-start
/home/osmc/.config/lxsession
After next reboot the kodi is booting normally.
Jan

Hi Jan

I’ve had limited time to look up this project since the the move to buster, hopefully i can get a stab at it this coming weekend. I will get back with either a working version or a complete removal of the script, i just have to figure out what creates that black screen you are talking about, haven’t even tried it on my own box, since I’ve been busy doing other projects, which now are at a halt, due to lack of knowledge/experience in golang.

Hi Joakim
I made some new test on clean osmc installation
There is some errors during installation (mainly set locales and missing dependencies), but I don´t know if can cause this problem:

Webshare.cz - moderní úložiště pro Vaše data

For repair of kodi booting is enough only Lightdm uninstall:

sudo apt-get remove lightdm

I hope this can help you
Jan

Have you used the latest script before installing, since there is a disable of lightdm in the latest version. All tough I’m not completely sure lightdm has had time to start before the check if it’s running on buster.

But as I said, I will be putting some time into this, this coming weekend.

No problem. I will wait when you will have time. :slight_smile:
I have downloaded the script right before today afternoon test (around 3:30 PM) by your wget command. This is script which I downloaded - is it already updated?

#!/bin/bash
if [ “$(id -u)” != “1000” ]; then
echo
echo “This script must be run as osmc user.” 1>&2
echo
exit 1
fi

#Set UTF-8; e.g. “en_US.UTF-8” or “de_DE.UTF-8”:
export LANGUAGE=“en_US.UTF-8”
export LANG=“en_US.UTF-8”
export LC_ALL=“en_US.UTF-8”
sudo locale-gen en_US.UTF-8

#Tell ncurses to use line characters that work with UTF-8.
export NCURSES_NO_UTF8_ACS=1

sudo apt-get update 2>&1 | dialog --title “Updating package database…” --infobox “\nPlease wait…\n” 11 70

dialog --title “Installing X11, LXDE-core and Chromium” --infobox “\nThise will take some time so please wait…\n” 11 70

sudo apt-get -y install lxde-core xserver-xorg xinit fbi libinput-dev xwit xdotool x11-utils xvkbd zenity xterm
if (( $(lsb_release -d | grep -v grep | grep “buster” | wc -l) > 0 )); then
sudo apt-get install chromium-common chromium
else
wget http://launchpadlibrarian.net/380369885/chromium-codecs-ffmpeg-extra_68.0.3440.75-0ubuntu0.16.04.1_armhf.deb
wget http://launchpadlibrarian.net/380369879/chromium-browser_68.0.3440.75-0ubuntu0.16.04.1_armhf.deb
sudo dpkg -i chromium-codecs-ffmpeg-extra_68.0.3440.75-0ubuntu0.16.04.1_armhf.deb
sudo dpkg -i chromium-browser_68.0.3440.75-0ubuntu0.16.04.1_armhf.deb
sudo apt --fix-broken install
sudo dpkg -i chromium-browser_68.0.3440.75-0ubuntu0.16.04.1_armhf.deb
if [ $? -gt 0 ]; then
dialog --title “Installing dependencies…” --infobox “\nPlease wait…\n” 11 70
sudo apt-get -f --force-yes --yes install >/dev/null 2>&1
fi
fi
dialog --title “Download and install” --infobox “\nDownloading launcher and installing\n” 11 70

wget -q https://github.com/zjoasan/x11-osmc/raw/master/install_x11.zip 2>&1
unzip -q -o install_x11.zip 2>&1
chmod +x /home/osmc/x11-start/x_init.sh 2>&1
chmod +x /home/osmc/x11-start/xstart.sh 2>&1
chmod +x /home/osmc/x11-start/virtualkeyboard-toogle.sh 2>&1
chmod +x /home/osmc/x11-start/vmkd-switcher.sh 2>&1
dialog --title “Post setup tweaks” --infobox “\nChangeing default background in X11 and updating Kodi addons \nto reflect X11 launcher” 11 70
sudo rm /usr/share/applications/kodi.desktop
sudo rm /usr/share/xsessions/kodi.desktop

sudo ln /usr/splash.png /etc/alternatives/desktop-background 2>&1
sudo chmod 777 /etc/alternatives/desktop-background 2>&1

if (( $(ps -ef | grep -v grep | grep “mediacenter” | wc -l) > 0 )); then
xbmc-send -a “UpdateLocalAddons”
fi

dialog --title “Installation finished!” --msgbox “\nThank you for using my installer\n” 11 70
if (( $(ps -ef | grep -v grep | grep “lightdm” | wc -l) > 0 )); then
sudo systemctl disable lightdm
fi
exit

Thanks for your time
Jan

Well I ran the installation some time ago and got lightdm installed, but I’m unsure if it was last time I ran the installer. Anyway, change the detection and handling of lightdm in the end of the script now.
checks if the lightdm is installed, if so stop the service and disable the service. Don’t want to uninstall the package, since it must be a requirement of some package that installed it and if we uninstall lightdm we might create a new problem.

Redirected error msg and standard output oc locale-gen to /dev/null in hope to quiet it down

Hello @joakim_s
Thanks for your response. I´m not sure if I understand correctly.
You mean, that after last update of your script that if we run to the problem, the second run of your script will stop the service and repair it. Is it correct?
If yes, it is not working.
I made new test on clean installation of OSMC with new download of your script and again run to black screen. Next run of your script after power Off again finished with black screen. Every time when I saw black screen it was not possible reboot by SSH - only power Off help - SSH relation was finished, but RPi not restarted.
Here is my log after second reboot to black screen:
https://paste.osmc.tv/ejaxoziril
If you have some idea and I can help you with some other test or logs, please let me know
Jan

I must have missunderstood you,n since i thought it was a lightdm issue, causing your OSMC device to hang. So i made sure that if lightdm is install it’s stopped and not started at reboot.

But you get a black screen… is it at boot? or is it when you start the addon? And when it blackscreens you lose ssh connection too. as soon as the screen blackens or a bit after?

Yes, the black screen is appear after OSMC booting logo screen. SSH connection working all the time, but there is problem with some commands:
sudo reboot - end SSH connection but did not restart RPi
some errors during installation or uninstall - I do not remember exactly

Sometime (mainly on old - not clean OSMC installation) before black screen I saw for 1 second some login window input box or booting to Kodi main screen with some "windows directory " artecacts on top half of screen and after few seconds Kodi is freezing.

Well this seems to need some further digging, right now I don’t have access to my pi3, since my son has taken up a game development using a book that is based on a certain distro. I got spare sd-cards but problem is when I got time and am awake enough to look into this issue, my son is often at it.

My main system right now is a Vero4k and it seems I can’t reproduce the problem directly. I will talk with my knowledge hungry teenager about getting my pi back for a few nights, but I can’t say when right now. Hope fully I can convince him to play on his Playstation this weekend, leaving me with a pi for at least 8-12 h, which I think I’ll need to do a couple of installs and wipes to test all possibility’s. Like install a clean stretch and my addon, upgrade and examine the result, do a clean install of buster and my addon, examine the result, And hopefully come up with a solution.

Thanks for your time
If I can help with anythink, please let me know.
I found 1 sd card with older installation. After update to buster I can see again artifacts with directories/folders - please see the attached picture

Hi Joakim,

First: Great work! Thank you - After first installation and starting X11 desktop everythings seemed to be fine except Yatse wasn’t working and I needed to connect a mouse to my RP3B+.

But shut down X11 an returign to OSMC leads to froozen system. After re-booting, the system was alive for a couple of seconds and than showed same disturbance as on Jan’s screen. I had to uninstall all packages installed via your script - and because of it’s a live system I had no change to setup a second SD-Card to take some logs - maybe next time.

Did you hear anything simular? I really like you solution and want to use it

Best regards
Michael

By the way - I’m running
Kodi compiled 2020-11-26 by GCC 8.3.0 for Linux ARM (Thumb) 32-bit version 4.19.152 (267160)
on OSMC VERSION_ID=“2020.11-1”

Okey, I might have introduced a few changes for the Vero4k, that might break it for RP3. To be honest, since I’ve almost stopped using this addon myself, i keep forgetting about checking it out. And My 13 year old has stolen the RB3, for his game-development project.

I will try to check it out during the day, I got an idea for a solution for it freezing on RP2-3, but it’s just a hunch.

Edit: Seem’s the code bit i was thinking of was never introduced to distribution on Github, need to have a more intensive look at this to see if i can reproduce on a clean OSMC-install on a RP3. Which wont happen today at least… Got the a kodi.log from the freeze?? should be /home/osmc/.kodi/temp/kodi.old.log when you have restarted the system. If possible create a new freeze with debug settings on?, the direct ater you restarted the system upload logs via MyOSMC or command line (grab-logs -A). and PM me the link.

Hi Joakim,

Thanks for the feedback - Unfortunately, I do not have a log :frowning: I’ll try to get a second SD-Card for a test system and provide it. But I guess this do not become real befor weekend. By the way… my son is also 13 and he uses the Pi very sporadic as a desktop replacement - How do get your son to develop stuff with the Pi - please give me a hint :wink:

Best regards
Michael

THIS POST IS SEVERELY OFF-TOPIC

It started with a “hour of code” in school, back when he was about eleven. He thought that was fun, and as time went by he saw me write some php-code here and js there. He even saw me starting to learn a new language by doing an actual project, in this case i did some python stumblings to get the latest posts in a reddit to be posted on a non-related chat server.

I think python is an goods language to learn, since you “quickly” learn the basics and there is tons of resources out on the interwebs. So when he asked some questions about code, i just said, “Best way to understand the process is to do the work.” Which actually led to me (stupidly) handing over my pi3, with a blank sd-card. Gave him a free ebook on game development on pi with python, like instruction on setting up os, installing needed packages and all.

He started rather enthusiastically , but it has toned down. I had to set up a remote desktop for him, but the network at his school filtered most traffic so he could never access the pi here at home while on break at school(when he planned to do the actual work).

If you want I could search for the ebook i gave him and link it to you. I mean it’s simple games, with freeware graphics, but once you played with the examples you can make your own graphics/music etc. The hardest part for me, and my son agrees, is to break down a huge problem, in the game, to smaller solvable parts. To go from idea/dream of your own game to formulate the problems that you have to solve to have a game in the end. Gamestory/music/graphics comes second hand for me. I want a “working” idea, then start to write the code.

I’ll take a chat with him before the weekend and see if i can replicate your issues…on an actual pi3. Hope you get your son into coding, it’s a learning process for us “old foxes” too.

Don’t work after installing it, so I rebooted with the sorprise that the OSMC SO stop working.
Now I must re install everything.

No you just can uninstall the X Server then everything would work again. Let me know if you need the instructions

I even made an uninstall script, located at github along side the install script. It’s tested on a clean system, but never in a “normal use” environment. It was made before the “buster” optimazations of the script, so it tries to remove the old ubuntu version of chrome-browser, which if you installed on a buster system isn’t installed.

I haven’t touched this uninstall script since i made it, around 1½ year ago. Will see if i get a few mins to make the changes, needed for buster uninstall, this weekend.

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

Hej Joakim,

I’ve shown your reply to my son (so at least it practice his English :wink: ) But he promised me for sure to take more care of his raspberry - So if you’ll find the link for the eBook send it to me :slight_smile:

By the way, did you find some time to have a look into your “X11” script? I’m still looking forward to use it but unfortunately I didn’t find time to have a a deeper look.

Haave a good weekend
Michael