Author Topic: Start something with command line command from linuxmce  (Read 3969 times)

itsmeok

  • Veteran
  • ***
  • Posts: 100
    • View Profile
Start something with command line command from linuxmce
« 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 ?

Murdock

  • Guru
  • ****
  • Posts: 229
    • View Profile
Re: Start something with command line command from linuxmce
« Reply #1 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.

tkmedia

  • wants to work for LinuxMCE
  • **
  • Posts: 937
    • View Profile
    • LMCECompatible
Re: Start something with command line command from linuxmce
« Reply #2 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
My Setup http://wiki.linuxmce.org/index.php/User:Tkmedia

For LinuxMce compatible  systems and accessories
http://lmcecompatible.com/

itsmeok

  • Veteran
  • ***
  • Posts: 100
    • View Profile
Re: Start something with command line command from linuxmce
« Reply #3 on: March 16, 2009, 02:26:05 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 ?

tkmedia

  • wants to work for LinuxMCE
  • **
  • Posts: 937
    • View Profile
    • LMCECompatible
Re: Start something with command line command from linuxmce
« Reply #4 on: March 16, 2009, 03:33:14 pm »
Quote
Any 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
My Setup http://wiki.linuxmce.org/index.php/User:Tkmedia

For LinuxMce compatible  systems and accessories
http://lmcecompatible.com/

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: Start something with command line command from linuxmce
« Reply #5 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

itsmeok

  • Veteran
  • ***
  • Posts: 100
    • View Profile
Re: Start something with command line command from linuxmce
« Reply #6 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 ?



tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: Start something with command line command from linuxmce
« Reply #7 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.