Stop OSMC starting automatically on boot and run from command line

:slight_smile: No worries, my google foo fingers are a bit worn down over the last day or so with no real results. Maybe one of the OSMC gods will smile on this poor soul and divulge the magic commands.

Yours hopefully
Spart

Not sur but a FS search for splash* comes up with this /sbin/splash_early

Dilligaf,

Thanks, but blindly hacking around in OSMC is not going to help I don’t think.

Sam’s response is great just lacks the neccessary ‘how’. i.e. How to get OSMC to boot to the command prompt after disabling mediacenter at startup. How to disable x at startup. Installing lxde is the easy bit. sudo apt-get install lxde installs just fine. On reboot it does not however boot into lxde, whatever has control of tty1 also has the display locked. I am really just guessing as I am not a linux expert.

Sam’s post made it sound very simple and I am sure to someone who know the black arts of linux it is :slight_smile:

Cheers
Spart

Disabling the splash involves removing the word quiet from cmdline.txt on the FAT32 file.

Then you could get the Getty on tty1 back with systemctl enable getty1@tty.service. In future versions of OSMC I am thinking of dropping to shell if mediacenter is disabled

I am working on our official OSMC desktop which should be available in a couple of weeks. It will offer a small desktop environment and allow easy switching

S

Sam,

Thanks for the further information. Yes, it would be great to have OSMC drop to the shell if we disable autostarting of mediacenter.

As I said our aim was to have the best of both worlds, a full edu desktop and the best mediacenter. Having a standard command prompt boot for OSMC would be the starting point.

Cheers
Spart

I will keep you posted how the desktop goes.

Sam

1 Like

Sam,

A bit more info. We have been playing around with this for a bit, just yesterday we installed a B+ from scratch.

16GB USB install of Raspbian Jessie. LXDE default desktop.

Then we installed Michael Gorvens build of Kodi for Jessie today. This is a 14.1 build.

It installs automatically into Sound and Video. And launches just fine from the Raspbian desktop. On exit unfortunately it does not exit cleanly and leaves a number of kodi processes in memory. To return to the Raspbian Desktop involves killing the top kodi process from the tree. The desktop is then returned.

I know this is not directly relevant to your efforts but might be useful as OSMC is based on Jessie and uses the same systemd environment.

So we are almost there, we can boot to a full desktop and launch kodi, just not return back to the desktop. At present getting Raspbian to boot to the command prompt is a bit baffling as can be seen from the forums over at Raspberry Pi. Raspi-config does not work on Jessie yet due to the sysvinit vs systemd changes it seems.

This is the command that finally got us to boot into the command prompt:
sudo systemctl set-default multi-user.target

The desktop can then be started with startx and on logout returns back to the tty1. Kodi does not however return back to tty1 when run from the command line, but does exit cleanly from memory leaving behind no kodi processes. Maybe there are some kodi command parameters needed on the command line.

Cheers
Spart

I suspect OSMC is architectured very differently and not as applicable.

We will work out our desktop environment, but we’d rather do it slowly rather than rush things.

Sam

No worries Sam. Good luck with the next stage of OSMC. I hope it is going to include an updating service like RaspBMC to keep OSMC upto date.

Cheers
Spart

The update system in OSMC puts the Raspbmc update mechanism to shame

Indeed, our update system is very robust now (and still improving). I’ll be glad to see the end of broken updates which happened with Raspbmc.

Hi guys,

First of all I just wanted you to know that you’ve been doing an amazing job on OSMC.
Secondly, I got a question for you:

I managed to install a Desktop Environment (lxde) on osmc, and I can start it by using the command line (exit from kodi, then press esc, then log in, then type ‘startx’). It’s working well, except for the sound. It’s actually deaf. But with kodi, it works flawlessly. I tried installing alsamixer, and pulseaudio, but it doesnt seem to make any difference.

Any suggestions?

Try

sudo modprobe snd-bcm2835

And running

sudo alsamixer to change the mixer levels

Should be able to then save it with

sudo alsactl store 0

Sam will the Alpha builds be upgradeable to beta and beyond?

Cheers
Spart

Soadzoor,

Can you share your process to get to a working desktop and OSMC system.

Cheers
Spart

We are doing our best to ensure this is the case, but this is a little tricky until things get implemented. I think once we hit Beta upgrades will be pretty stable

S

Well, try this:

  1. boot up kodi
  2. press ‘s’ and select ‘exit’
  3. press esc (I usually press it several times. just to be sure)
  4. log in (user: osmc, pass: osmc)
  5. type “sudo apt-get install lxde --no-install-recommends”
  6. type “startx”
  7. (it will probably say that startx is not installed, and it suggests something, do it. I can’t remember what that was…)
  8. After that, startx should work I guess.
  9. Let me know if you got stuck

Thanks for your reply.
Unfortunately these commands didn’t make any difference, I still got no sound outside kodi :confused:
One more thing:
I can get to lxde only one time/boot. That means if I exit kodi and startx, it works well (except the sound). But if I start kodi again (it still works), and exit again to start lxde, I got a black screen.

The coolest solution would be if osmc had its own desktop environment (which I read is under development. And that is awesome btw).

Keep up the great work, let me know if I can help you with anything (mainly testing)

you need X to get it working:

apt-get install lxde-core xserver-xorg xinit

see: How to install LXDE on raspbmc? - Raspberry Pi Stack Exchange

did you manage to get sound running under LXDE?

I use a HDMI adapter but my sound is connected to anaogue. maybe that is the problem? (Inside OSMC i can choose the output device)