Stop OSMC starting automatically on boot and run from command line

Add snd_bcm2835 to /etc/modules or in /etc/modprobe.d

Install alsa-utils

sudo apt-get install alsa-utils

Run alsamixer and set up your audio output

Run sudo alsactl store to make it persistent

That’s what I and @soadzoor tried after the first time you posted it above, so we are running in circles.

What else could we try?

I know this is an old post but I made something for this , Its switches back and forth between Xorg and osmc-mediacenter or am I being redundent?

I have the scripting ready do you want to take a look at it? I can mail you a tar

I already have some work on a desktop and switching between them using systemd. I just toggle the enabled service.

Sam

Yes indeed, but do have that in a script.

Do you do that with or without reboot?

target=sudo systemctl get-default

#if multi-user.target is active then
if [[ “$target” == multi-user.target ]];
then
action1=“sudo systemctl set-default graphical.target”
action2=“sudo systemctl disable mediacenter”
fi

#if graphical.target is active then
if [[ “$target” == graphical.target ]];
then
action1=“sudo systemctl set-default multi-user.target”
action2=“sudo systemctl enable mediacenter”
fi
switch1=$action1
switch2=$action2
reboot=sudo /sbin/reboot

If there’s interest, I can chuck up my desktop-app-osmc package (I realised it is stashed) not committed, and you can work with me on getting it ready for prime time.

S

1 Like

Sure yes :smiley:

I have a lot done I have a working prototype with installer (mostly in bash)

I worked on a Dialog based configuration utility for switching. This means Zenity can be used in the desktop to facilitate graphical changes.

I only tested it briefly on aTV which already had X11 packages. I configured XWrapper.config in FTR on ATV to permit users=anybody, instead of console.

Sam

How ready would you say your stuff is on a scale to ten?
Just to know what I am getting myself into :slight_smile:

Try it out. The groundwork for a package is done. The configuration utility was only half completed, however.

Sam

Mine is not this structured but I will work on this!! :smiley:
I will keep you posted on progress …

The first thing ill change is in the /usr/bin script… Because the way it is it will not stop the lightdm.

:smiley:
Thanks for this!

I really appreciate it !

It should be worked on independent of a window manager. I will not necessarily use lightdm.

lightdm is fully systemctl compliant and very customizable how ever I have experienced bugs with auto login to mediacenter because it can be selected (kodi) in lightdm-greeter before login. I got in to a login loop …

But we would want a some kind of-greeter with a password login right?

Not necessarily…

I’m not convinced there is a need for mult-user support just yet. xinit’ing a window manager is probably sufficient.

Sam

That is true … but when killed, people could get scared of a cold black shell …
And also daddy needs to be able to punish the kid so no OSMC for a week …

:wink:

also it makes life easier because, we could enable autologin, but we would have to remove the option
to select kodi from the lightdm-greeter at login because that would create a loop with autologin on logout.
Or make sure the default always is Lxde

But would they start kodi from within the destop env it will take over frambuffer completely and it will when quit it will got back to the desktop if I remember correctly … how ever there where some issues with the Osmc config screen then ,

I have tested a lot making my version … I will do it all over … this time Ill keep logs

I am of! ttyl
And thanks again :smiley:

Hi Sam,

I have a question:

For testing purposes I changed deskmgr to “enable” a startx.service which will then boot X but only as a root user.

I see that this not a good idea … any other Idea how to approach this to get X and lxde started as user osmc?

In /usr/bin/mediacenter it mentions “chown osmc:osmc” and therefore only user osmc can ever start the mediacenter. (not multi user) The same would apply for a similar script for X and lxde

That’s why I think the way to go is indeed with the original deskmgr script and lightdm.

Any thoughts?

Thanks

There is no need to fall back to a shell on exit.

I plan for the desktop to operate as a single user, ‘osmc’. You can specify the starting user in the service, or even use sudo or su to change user.

I’m not keen on using a window manager as it will consume resources and disk space for a use case that most users won’t use.

Sam

It should therefore never be in the default installation indeed.

About the space issue, will the damage not have already been done, by having installed
“apt-get install desktop-app-osmc”?

It has some pretty big dependencies.
Xorg, LXde, lightdm, zenity,

I feel it is a case of in for a penny in for a pound :smiley:
(probably using the proverb wrong ;-))

The complete installation is about including osmc is about 1.1gb and indeed that is bigger then osmc currently is. Also I am not worried about the resources like memory etc. as it will normally never run on top of each other.

Indeed not every body will use it, thus will not install it if they do not need it keeping osmc nice and small.

And for those that do want to install it apt will warm about the disc space needed.

But I agree osmc should not lose its soul, and options should be plain within the desktop.

I will test write on both tracks and keep you posted! :smiley:

Please has desktop app come to osmc

Managed to install x11 via

apt-get install lxde-core xserver-xorg xinit

it works “good”, have a problem with keyboard not giving the correct keys. “a” gives “a”, but “s” gives “r”, “d” gives “s”, those are the ones i’ve memoriezed.

Googled but didn’t find a solution, to fix it via console/shell. Anyone else had this problem, might be that X installed previusly by an error on my part.

edit:
setkbmap gives error about cant find display, loadkeys is not found so probably not installed. debconf-show keyboard-configuration didn’t change a thing

edit2:
running setkbmap inside X works tho, but now that i tried i dont know what i will use X for =)