LXDE Desktop on Boot

So I decided that I wanted to try and install a desktop environment on osmc. After rebooting the ATV it takes me to an OSMC splash screen where it shows my transmission client has started. I was wondering if it is possible to get it to boot the LXDE desktop that I installed when the ATV boots up.

Thanks in advance,
Andrew

can you login to the console? by pressing ctrl-alt-F2 . login username osmc passwd osmc
and then type startx?

Assuming you did also install an Xserver.

I know nothing about apple tv.

Hope this helps

Ill test it when I get back, if it doesnt work then I will just continue to use it as a torrent/ftp server for storing files.

I managed to bring up the desktop (using the startx command mentioned), but I want the ATV to boot to it straight away, and whenever i leave putty the desktop closes out. Im not sure how to fix this, I am hoping there is a file that I can edit that will allow me to set it to boot from the start.

I did manage to get a desktop to boot from startup. I simply copied the text from inside the mediacenter.service file and created a new file called startx.service and put the code inside there (but instead of mediacenter I replace it with startx). Seems to work, but I cannot see much benefit from using it. Although you can launch kodi from the desktop itself, I dont know if it will affect the performance of the ATV or not by having the desktop running as a background service, some more testing will need to be done.

make a backup of the file you wrote “startx.service” and remove it …
but save it somewhere in your home directory for a rainy day and use these lines instead on the command line:

I would like to know to things :

What you get when you type :
sudo systemctl get-default

And also what happens if you type whats beneeth!
(how ever make sure that you did NOT boot into startx.service!)
sudo systemctl enable mediacenter
sudo reboot.

If what happens what I think will happen it will boot in to osmc-mediacenter,
And then if you press ‘s’ (select exit) enter, and then repetitively esc when you see the osmc screen,
you will be able to login on the command-line and startx

let me know how this goes! :smiley:

Can I see your startx.service?

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.