Author Topic: How does a core system start?  (Read 9881 times)

KingCrab

  • Regular Poster
  • **
  • Posts: 45
    • View Profile
How does a core system start?
« on: July 11, 2007, 12:48:12 pm »
I'm still trying to have a core running without the need of a x server. Unfortunately I'm unsure what scripts and program are really needed.

Could anyone please describe which scripts and programs are started, if the launcher start core button is pressed? Where do the logs in the message window come from?

nite_man

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1019
  • Want to work with LinuxMCE
    • View Profile
    • Smart Home Blog
Re: How does a core system start?
« Reply #1 on: August 03, 2007, 10:35:45 pm »
No sure that LinuxMCE allows that because it's integrated with KDE but KDE needs X. Plutohome gives two possibilities: create core/hybrid with GUI and core only (without GUI).
Michael Stepanov,
My setup: http://wiki.linuxmce.org/index.php/User:Nite_man#New_setup
Russian LinuxMCE community: http://linuxmce.ru

Zaerc

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 2256
  • Department of Redundancy Department.
    • View Profile
Re: How does a core system start?
« Reply #2 on: August 04, 2007, 06:19:53 am »
Well only the on-screen orbitter is integrated with KDE I reckon, and that part is still installed for the diskless media directors.  Maybe a fun idea to try and start an on screen orbitter from a chroot environment.  Come to think of it, I wonder if that could avoid some of the hassles with the Kubuntu updates.

Anyway we started a wiki page on this, to share some experience in the things we try.  So far we have just begun messing around to get an idea how things work, but it's looking very reachable already, and not even that hard.  We already managed to get the core running so that it could boot a diskless media director.  Next I hope, will be some simple instructions how one could set it up allowing a painless switch back in case of trouble, and then it will need extensive testing for all kinds of possible breakage.

So... everyone, please feel free to join us on our quest, all additions are welcome (unless you're trying to sell viagra of course ;)).
"Change is inevitable. Progress is optional."
-- Anonymous


Zaerc

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 2256
  • Department of Redundancy Department.
    • View Profile
Re: How does a core system start?
« Reply #3 on: August 05, 2007, 03:51:10 am »
Well I've just had a stab at it again, and stumbeled over an easy way to switch to "Primary used as PC" mode (when you chose to install your hybrid as "A dedicated LMCE System"), and back again  (this should also be possible the other way around but I haven't tried that).

So I've added a few simple steps (that are pretty safe to try) at the end of the wiki page mentioned earlier.  It makes changing this install type option as easy as changing a number in a text file and a reboot.
"Change is inevitable. Progress is optional."
-- Anonymous


Matthew

  • Douchebag
  • Addicted
  • *
  • Posts: 567
    • View Profile
Re: How does a core system start?
« Reply #4 on: January 25, 2008, 04:35:09 pm »
Is the only LMCE Core dependency on KDE (and therefore on X) just the Launch Manager? If so, why go the radical route of experimenting with runlevels, rather than replace the launch manager with commandline executables? Other than the fun of the wizardry, that is.

Most of the Launch Manager is info reporting, and some GUI commands that are replicated elsewhere (like in the Orbiter). There are also some features for switching between Orbiter and KDE contexts which are unnecessary if either or both of the KDE contexts are eliminated. The unique LMCE dependencies on the Launch Manager seem to be only
1. Auto/start/stop Core/MD,
2. MySQL connection configs
3. Video driver/resolution settings
4. Audio driver/passthru settings
5. Opening external editors for config textfiles

#2-5 seem trivially replaced with commandline tools. #1 seems pretty easy, too. Are there really no other LMCE dependencies on KDE/X? If there are some dependencies on KDE/X libraries for processing multimedia, but not for displaying anything on the Core, then even those libraries could be installed without actually running X, and getting all the benefits of cutting X bloat from the LMCE Core.

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2428
    • View Profile
    • ago control
Re: How does a core system start?
« Reply #5 on: January 25, 2008, 05:17:36 pm »
Other than the fun of the wizardry, that is.
thats the way a system V works..

best regards,
Hari
rock your home - http://www.agocontrol.com home automation

Matthew

  • Douchebag
  • Addicted
  • *
  • Posts: 567
    • View Profile
Re: How does a core system start?
« Reply #6 on: January 27, 2008, 05:04:06 am »
Other than the fun of the wizardry, that is.
thats the way a system V works..

Are you saying that Sys V works by people having fun with the wizardry, or that X can't be replaced with commandline tools in the normal runlevel?

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2428
    • View Profile
    • ago control
Re: How does a core system start?
« Reply #7 on: January 27, 2008, 08:51:34 am »
Other than the fun of the wizardry, that is.
thats the way a system V works..

Are you saying that Sys V works by people having fun with the wizardry, or that X can't be replaced with commandline tools in the normal runlevel?
LOL

I'm saying that a System V uses sysv-style init scripts. One should use them if on sysv ;)

best regards,
Hari
rock your home - http://www.agocontrol.com home automation

Matthew

  • Douchebag
  • Addicted
  • *
  • Posts: 567
    • View Profile
Re: How does a core system start?
« Reply #8 on: January 27, 2008, 03:10:48 pm »
Other than the fun of the wizardry, that is.
thats the way a system V works..

Are you saying that Sys V works by people having fun with the wizardry, or that X can't be replaced with commandline tools in the normal runlevel?
LOL

I'm saying that a System V uses sysv-style init scripts. One should use them if on sysv ;)

:) Yes, if we replace the Launch Manager, I'd expect to change the rc scripts to not start X, but rather start up some commandlines that replace it. Why experiment with running all of LMCE under some different runlevels, too?

Zaerc

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 2256
  • Department of Redundancy Department.
    • View Profile
Re: How does a core system start?
« Reply #9 on: January 28, 2008, 07:39:50 pm »
First of all, why not?

You don't have to use runlevels that is just an easy way to experiment with different ways of starting up where you can easily switch back to a working system when things go wrong or turn out not to work.  When you follow the example setup you will get several ways to boot your core and you can make your favorite the default.

Alternatively you could just storm in, mess up the default runlevel and end up reinstalling because everything collapses and you don't know how to get back to a working solution, your choice.

In the end it's just an example of how things could be done, not the only way to do it.  Personally I find switching between "dedicated core" and "mostly pc" a lot more comfortable selecting it from a boot menu then having to completely reinstall everything for example.  But feel free to reinvent the wheel again just because you don't properly understand runlevels.


"Change is inevitable. Progress is optional."
-- Anonymous


kir

  • Guru
  • ****
  • Posts: 183
    • View Profile
Re: How does a core system start?
« Reply #10 on: January 30, 2008, 02:28:33 pm »
Just a comment: this is an interesting thread, I hope one day it will help to make "clean core" option into mainstream LinuxMCE - right now the LM spawns the core services and devices, but it would be interesting to consider detaching this functionality to be done by backend service and LM be only an client UI, so it can be independent.

Matthew

  • Douchebag
  • Addicted
  • *
  • Posts: 567
    • View Profile
Re: How does a core system start?
« Reply #11 on: January 30, 2008, 02:41:26 pm »
Just a comment: this is an interesting thread, I hope one day it will help to make "clean core" option into mainstream LinuxMCE - right now the LM spawns the core services and devices, but it would be interesting to consider detaching this functionality to be done by backend service and LM be only an client UI, so it can be independent.

AFAICT, it would be pretty easy to replace the GUI LM with a handful of scripts, and a tiny Tk or Qt shell that calls them (and a dinky CGI/HTML interface):

Most of the Launch Manager is info reporting, and some GUI commands that are replicated elsewhere (like in the Orbiter). There are also some features for switching between Orbiter and KDE contexts which are unnecessary if either or both of the KDE contexts are eliminated. The unique LMCE dependencies on the Launch Manager seem to be only
1. Auto/start/stop Core/MD,
2. MySQL connection configs
3. Video driver/resolution settings
4. Audio driver/passthru settings
5. Opening external editors for config textfiles

#2-5 seem trivially replaced with commandline tools. #1 seems pretty easy, too. Are there really no other LMCE dependencies on KDE/X? If there are some dependencies on KDE/X libraries for processing multimedia, but not for displaying anything on the Core, then even those libraries could be installed without actually running X, and getting all the benefits of cutting X bloat from the LMCE Core.

Why don't you make a feature request in Mantis? I'd love to watch the resource requirements of the Core go down, by offloading all X/GUI processing to another host on the network (that's running an Orbiter or just an Adminsite).