Author Topic: Starting CORE software automatically. Beta1.1  (Read 15751 times)

wsuetholz

  • Regular Poster
  • **
  • Posts: 44
    • View Profile
Starting CORE software automatically. Beta1.1
« on: June 07, 2007, 06:13:50 pm »
Hello,
  When I installed, I chose the option that the machine would be used primarily as a PC (I would have liked primarily as CORE) since I didn't want the orbiter to start automatically, but I'd still like the CORE backend software to start.  I just don't wan't the orbiter starting automatically.  I'll probably also turn off the automatic starting of X/KDE when I get things working smoothly.

  So, what do I need to do to get the CORE to start at system boot, not when the LinuxMCE application is run from a desktop.  I tried putting the shell script that the LinuxMCE application calls to start the core into /etc/rc2.d, but that didn't seem to work.  I don't like having to log in in order to get the CORE running.  I would change it to autologin, but I still need to enter a password for starting LinuxMCE, which kind of defeats the purpose of autologin.

Options I'd like to see at install time:
1) Install as CORE only
2) Install as Hybrid which includes CORE and Orbiter running at boot
3) Install as Hybrid with just CORE running at boot, Orbiter can be started by itself from the desktop.
4) Install as Media Director, with no CORE, Just Orbiter and other Media display functions

Bill
« Last Edit: June 07, 2007, 06:23:51 pm by wsuetholz »

pixelator

  • Veteran
  • ***
  • Posts: 70
    • View Profile
Re: Starting CORE software automatically. Beta1.1
« Reply #1 on: June 07, 2007, 09:26:05 pm »
The two options for the machine's use at start up are
  • Primary PC
  • Primary LMCE Core/Hybrid
They're probably called something else specifically, but I can't remember exactly what the text is.

If you select the primary LMCE Core option, then when the system boots, you will see a LMCE launcher window.
From that window, you can start the Media services and/or Core services.
There are also a couple of checkboxes that let you start the Core and/or media services automatically. I did not check these boxes, but I assume that if you do, the services will be auto started without having to manually start them from the launcher.

wsuetholz

  • Regular Poster
  • **
  • Posts: 44
    • View Profile
Re: Starting CORE software automatically. Beta1.1
« Reply #2 on: June 08, 2007, 05:37:18 pm »
Yes, but I don't want to be running the X server normally on the core, and, now that I've got it installed, I want to have the core software start at boot, but the orbiter to only start when I ask it to.  I do not want to have to log into the machine to get the core to start.  I want the core to start as part of the init process like it would if I chose core rather than hybrid install.

Bill

Cj_MaN

  • Regular Poster
  • **
  • Posts: 39
    • View Profile
Re: Starting CORE software automatically. Beta1.1
« Reply #3 on: June 11, 2007, 05:35:34 pm »
(options of the mce-installer screen)
First Option:
1.Yes, install all the media playback and remote control software and make this computer my first media player
---Selecting this option you will have a Core and an Orbiter on the same machine.(called a Hybrid Installation)---
KDE will also be available.
2.NO, I'll use other computer(s) and DMA device(s) to playback media. Only install the core software on this one.
---Selecting this option you'll have installed only the Core. To be able to view media, listen music or control other devices you'll need to install an other PC as MD.---

Second Option:
1.Primary used as PC -- KDE starts by default
You can start Linux Media Centre from the "K menu -> Multimedia"
2.A dedicated LMCE System - You can start KDE when you need it.
If you have an OnScreen Orbiter by click on the "Advanced -> KDE Desktop" menu,
or if you're installation is only CORE, by opening a console (CTRL+ALT+F2),
login with you're user name and password,
get root by typing               sudo su -          and when asked for password give your account password,
type kdm at the console and KDE desktop will start

(options of the Launch Manager)
Third Options:
1.Autostart Core
If you have a hybrid installation you must first login in KDE and then Start LMCE from the "K Menu -> Multimedia".
If you have only a Core installation, the CORE will autostart after Kubuntu starts. (I don't need to interact with your PC for LMCE to start)
2.Autostart Media Center
Option Only Available in the Hybrid Installation. This will automatically start an Onscreen Orbiter when LMCE starts.

wortmanb

  • Regular Poster
  • **
  • Posts: 18
    • View Profile
Re: Starting CORE software automatically. Beta1.1
« Reply #4 on: June 12, 2007, 02:03:36 am »
How does one switch between the two modes?  I selected "KDE" when installing, but I get the MCE Launcher regardless....

caiman

  • Veteran
  • ***
  • Posts: 119
    • View Profile
Re: Starting CORE software automatically. Beta1.1
« Reply #5 on: June 12, 2007, 09:47:36 pm »
I have the same problem and would like to rephrase the question as follows:

on an Hybrid installation (1.1 beta2), how can we start the core services from the init scripts ?

thanks!

Cj_MaN

  • Regular Poster
  • **
  • Posts: 39
    • View Profile
Re: Starting CORE software automatically. Beta1.1
« Reply #6 on: June 13, 2007, 06:28:19 pm »
How To Start The Core Software automatically at boot:

First: Ubuntu/Kubuntu doesn't use anymore the System-V init  process, instead it uses upstart, more info on: http://upstart.ubuntu.com/
Second: The LMCE config file is: /etc/pluto.conf . Here you can configure if you what to automatically start the core and/or the orbiter:

            AutostartCore=0 : the CORE will not automatically start after Launch Manager starts
                               =1 : the CORE will automatically start after Launch Manager starts
   equivalent with the "Autostart CORE" check box from the Launch Manager

            AutostartMedia=0 : the Orbiter will not automatically start after Launch Manager starts
                                =1 : the Orbiter will automatically start after Launch Manager starts
   equivalent with the "Autostart Media Station" check box from the Launch Manager

Third:
A.How to change from: "Primary used as PC -- KDE starts by default" to "A dedicated LMCE System - You can start KDE when you need
it"
Step0: Open a console (ALT+CTRL+F2), login, go root (sudo su - and your password when asked)
Step1: modify AutostartCore=1 option in /etc/pluto.conf file
          nano /etc/pluto.conf
Step2: rename /etc/init.d/kdm to /etc/init.d/kdm.saved
          mv /etc/init.d/kdm /etc/init.d/kdm.saved
Step3.1: create pluto file in /etc/event.d
          nano /etc/event.d/pluto
and write this line in it:
         
start on runlevel 2

stop on shutdown
stop on runlevel 3
stop on runlevel 4
stop on runlevel 5

script
/usr/pluto/bin/Startup_Core-Hybrid.sh
end script

Step3.2: Save it and set 644 rights on it
      CTRL+O , Enter, CTRL+X (in nano) ,
      then in console:
      chmod 644 /etc/event.d/pluto

Step4: Reboot your PC

B.How to change from: "A dedicated LMCE System - You can start KDE when you need it" to "Primary used as PC -- KDE starts by default"

Step0: Open a console (ALT+CTRL+F2), login, go root (sudo su - and your password when asked)

Step1: rename /etc/init.d/kdm.saved to /etc/init.d/kdm
          mv /etc/init.d/kdm.saved /etc/init.d/kdm

Step2: delete the pluto file from /etc/event.d
          rm /etc/event.d/pluto

Step3: Reboot your PC

caiman

  • Veteran
  • ***
  • Posts: 119
    • View Profile
Re: Starting CORE software automatically. Beta1.1
« Reply #7 on: June 14, 2007, 06:13:26 pm »
thanks Cj_MaN, that's useful info.

I'm still not clear how to start the core services without user intervention while still running KDM.

Indeed, the dedicated LMCE scenario you mention above uses /usr/pluto/bin/Startup_Core-Hybrid.sh, which starts X and then /usr/pluto/bin/lmce_launch_manager. What I am looking for is a normal KDM start, but have the pluto core services running in the background.

The /etc/pluto.conf autostart options you mention relate to the launch-manager, which is a graphical application that requires the user to enter root credentials when started as a user (e.g. with KDM autologin).

The /etc/event.d/media-center-startup script calls /usr/pluto/bin/startup-script.sh, which seems to leave some services behind (e.g. slimserver)

What's the correct way to do it ?

Cj_MaN

  • Regular Poster
  • **
  • Posts: 39
    • View Profile
Re: Starting CORE software automatically. Beta1.1
« Reply #8 on: June 14, 2007, 11:12:30 pm »
The method above it's functional with beta 2, and it starts only LMCE Core Service (and Orbiter if you put AutostartMedia=1).
The KDE isn't started!!! You have to start it manually if you want too!!!

bobpaul

  • Regular Poster
  • **
  • Posts: 23
    • View Profile
Re: Starting CORE software automatically. Beta1.1
« Reply #9 on: June 23, 2007, 10:59:12 pm »
The method above it's functional with beta 2, and it starts only LMCE Core Service (and Orbiter if you put AutostartMedia=1).
The KDE isn't started!!! You have to start it manually if you want too!!!

Fewer !!! please ;). Is it possible to start the core without starting the Launcher (which is an X app)? Or does the launcher not actually launch the core, and thus could be hacked away from opening through some additional steps? This would allow caiman to start KDM as normal, yet still have the core running in the background, and other to remove X from the core machine entirely.

IMHO, it's a server. Servers don't run/install X.

Caiman -- In the meantime, I would suggest running the Launcher (which autostarts the core?) on a separate X server (ex: DISPLAY=:1) and then KDM with it's xserver on the default display.

Cj_MaN -- Upstart is 100% compatible with standard init system scripts, so one can still make init scripts the old fashioned way.

caiman

  • Veteran
  • ***
  • Posts: 119
    • View Profile
Re: Starting CORE software automatically. Beta1.1
« Reply #10 on: June 24, 2007, 09:22:47 am »
Hi Bobpaul,

so far I'm running as you suggested the orbiter on display :1 and KDM on display :0, two separate servers.
This does what I need as I can easily switch from one to the other, though there are still some glitches: alpha blending does not work and the flicker background is not visible. I'll try to swap the displays.

Anyway, the original question of starting the core automatically without X is still very interesting.

bobpaul

  • Regular Poster
  • **
  • Posts: 23
    • View Profile
Re: Starting CORE software automatically. Beta1.1
« Reply #11 on: June 24, 2007, 08:40:49 pm »
you'll find all of the LinuxMCE scripts in /usr/pluto/bin. Two very interesting scripts are Start_X.sh (which I assume you already found?) and StartCoreServices.sh

My guess would be you could disable the Start_X script. This can be done from the web interface and goto Advanced: Software: Boot Sequence. Untick the box for Start_X. Then, manually launch /usr/pluto/bin/StartCoreServices.sh from some init script. I think that should do what you originally asked for, but I haven't tried it myself.

KingCrab

  • Regular Poster
  • **
  • Posts: 45
    • View Profile
Re: Starting CORE software automatically. Beta1.1
« Reply #12 on: July 09, 2007, 05:29:42 pm »
Has anyone a running system without x in the meantime? I've tried it by myself, but I'm unsure if calling "StartcoreServices" did all necessary steps. Does the launcher start anything else?

Zaerc

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 2256
  • Department of Redundancy Department.
    • View Profile
Re: Starting CORE software automatically. Beta1.1
« Reply #13 on: July 10, 2007, 07:32:01 pm »
I was just thinking the other day that it would be nice to run the core as a regular system deamon (or "service").  That way you could have a seperate choice which user interface, LMCE (with or without KDE/other desktop) for a hybrid or KDE/other/none for a core, to run on that machine afterwards.

Unfortunately I'm not that familiar with the Kubuntu bootscripts (yet), let alone the way LMCE (Pluto) does things, so thanks for the pointers.

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


sulin

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Starting CORE software automatically. Beta1.1
« Reply #14 on: July 26, 2007, 10:25:34 pm »
Hello,
       I installed LinuxMCE 1.1 BETA 2 successfully, booting to CORE.


       The problem is: If I check the 'AutoStart CORE' box & save settings
          - the setting doesn't stick, i.e. when I reboot the CORE the setting reverts
        to the un-checked state and the CORE doesn't AutoStart.


        Anybody familiar with this behaviour or have a solution ?

        By the way, this is my fourth install - so far the most successful !