LXDE Desktop on Boot

Guide: How to boot OSMC straight into LXDE

I wanted to use my AppleTV for simple Internet tasks and wanted to boot it directly into the LXDE Desktop environment instead of the OSMC. And it works!

I’m using a USB-Flashdrive, from which OSMC completely runs, to leave the original Apple ATV-Install on the internal HDD intact.

First I’ve installed the OSMC-USB-Diskimage from the OSMC Download-section.

I’m using the Terminal on a Mac and unmounted the USB-Flashdrive:

diskutil unmountdisk diskX

Then I wrote the USB-Diskimage to the USB-Flashdrive:

gunzip -c OSMC__TGT__appletv__20xxxxxx-USB.img.gz | sudo dd of=/dev/rdiskX bs=1m

and booted the AppleTV with it. I followed the Standard-Install and performed all the OSMC-settings via the Apple Remote (e.g. changed Language, Keyboard-Layout, turned off Screen-saver, turned off unnecessary settings, etc).

Since the OSMC-Command line sets my Monitor out-of-range, I used SSH from a Mac instead.

I logged in from the Mac’s Terminal via SSH, using the IP-Address of the AppleTV:

ssh osmc@192.168.xxx.xxx

User and Password are: osmc

Preventively I’ve installed the System-Updates via: sudo apt-get update and then: sudo apt-get dist-upgrade

Via SSH I turned then off the OSMC/Kodi-MediaCenter:

sudo systemctl stop mediacenter

as well as:

sudo systemctl disable mediacenter

Preventively I’ve rebooted the AppleTV.

Via SSH I’ve installed then the LXDE Desktop environment:

sudo apt-get install lxde

To boot directly into LXDE you need a systemd-service-file, I called it: xstart.service
Copy these 9 lines into a Text-file and name it xstart.service :

[Unit]
Description=Xserver Autostart

[Service]
User=osmc
ExecStart=/usr/bin/startx

[Install]
WantedBy=multi-user.target

Copy the xstart.service into /lib/systemd/system/ on the USB-Flashdrive.

Via SSH run the command:

sudo systemctl enable xstart

Reboot the AppleTV.

Then it should boot straight into the LXDE Desktop environment … :slight_smile:

.
.
.

PS: There’s currently a minor bug, probably in LXDE - after the boot a window pops up: ‘No session for pid 15xx’ which can also be read as: ‘No session for lxpolkit’. This seems to be a harmless bug, but is obviously not fixed yet. After closing the window the message disappears until the next reboot.