LinuxMCE Forums

General => Users => Topic started by: itsmeok on March 15, 2009, 05:14:44 PM

Title: Start something with command line command from linuxmce
Post by: itsmeok on March 15, 2009, 05:14:44 PM
Hi, I am still working on the option to start a process in the background while running Linuxmce. I quess there must different options. I have looked at starting Hellanzb as a daemon at boot. Have not been successful with this. Is there anyone that could point me to the right wikipage if there is one.

If no page available I am looking to create a wiki page on this. This process must be general to any programm you want to start in the background.

Two options I see are:

1) at boot time
2) through a scenario

Anyone that can help me further ?
Title: Re: Start something with command line command from linuxmce
Post by: Murdock on March 15, 2009, 05:19:00 PM
Forgive me if I'm over simplifying the question - though to start a child pid/program in unix you can run the & with the command name, this will start a new pid and allow processing outside the interactive shell.
Title: Re: Start something with command line command from linuxmce
Post by: tkmedia on March 15, 2009, 06:47:59 PM
You may want to look deeper and do it the LMCE way and possibly create a data type and be able to us the entries from the data grid.



Tim
Title: Re: Start something with command line command from linuxmce
Post by: itsmeok on March 16, 2009, 02:26:05 PM
Quote from: tkmedia on March 15, 2009, 06:47:59 PM
You may want to look deeper and do it the LMCE way and possibly create a data type and be able to us the entries from the data grid.



Tim

Any thoughts on the linuxmce way ?
Title: Re: Start something with command line command from linuxmce
Post by: tkmedia on March 16, 2009, 03:33:14 PM
QuoteAny thoughts on the linuxmce way ?

There is a stub in the svn for a shout-cast plugin. That would probably be a good place to start.



Tim
Title: Re: Start something with command line command from linuxmce
Post by: tschak909 on March 16, 2009, 04:49:10 PM
You can use the App Server to spawn processes, and kill them when needed.

The App Server provides two commands to do this: Spawn Application, and Kill Application.

Go into the web admin, advanced > configuration > devices, select the App Server on the target machine (for example, the CORE/Hybrid), and select Send Command.

You'll see how to use MessageSend to trigger these things from outside the system. But really, you'll want to find a less duct taped way to do things.

-Thom
Title: Re: Start something with command line command from linuxmce
Post by: itsmeok on March 16, 2009, 08:35:32 PM
Thom thanks for your answer. You suggestion works. It is a start for me but as you say I would like to find a nice solution for this. The only thing I would like to run is the following command to start Hellanzb:

Hellanzb -D

Would the computing area be able to be used ?


Title: Re: Start something with command line command from linuxmce
Post by: tschak909 on March 16, 2009, 09:21:34 PM
If you want to do that, create an init script and trigger it with upstart. Look at the ubuntu pages on creating upstart scripts to do this.

-Thom

If it proves useful, we may decide to roll it in as a package.