ECS Home Automation and Security Archives
  learn more | view messages for this month | NetBloc® | terms of use | search

Google
 


  subject (prev) or (next) | time (prev) or (next) | author (prev) or (next) | view more subjects

Subject:
From:
Date:
RE: [ecs] Still looking for where to place the cmd
Ingo Pakleppa
01 Nov 2003 13:47:06 -0800

Hi Mark,

Can you clarify why the autostart has to happen after login, rather than
making ECS a daemon? IIRC, ECS is waiting for user input at some point
(if only typing Q to terminate) - any chance you can get rid of that?
Once you have that, it is fairly straightforward to make any program a
daemon.

I see two options for solving your problem. Not knowing the exact
requirements, I don't know if they would meet all requirements for your
private label use:

- make ECS a daemon, so it starts up when the system boots instead of on
login. To accomplish that, you have to make sure that ECS never tries to
read anything from stdin. It would also be good not to print anything to
stdout, but instead to a log file.

- if you cannot do that, you could edit /etc/inittab and replace one of
the six places where mingetty is called with a call to ecs.bin. Do note
that if you do that, ecs.bin needs to be very hacker-proof, since it
would be running as root. 

Mingetty is the program that usually asks the user for login: and
password: if you are not running X. By replacing it, ECS runs
immediately without a login, and has full control of the system at the
same time. Obviously, a very major security issue if your system is
connected to the Internet in any way, even behind a firewall. Best, add
a call in ECS to change users (setuid) after you opened the listening
port, as I described in another mail.

On Sat, 2003-11-01 at 05:17, Mark Gilmore wrote:
> Sorry for the confusion, but this auto-startup effort is for a Knoppix 
> private-label vsn of ECS.
> I am just trying to get it to work under RH9 1st, so I won't waste weeks 
> blindly burning
> Knoppix test CDs (and I need to know how to do this basic task anyway).
> So I still need to know where to place my command,
> *or* preferably why my links in /Autostart have no effect.
> Thanks,
> 
> At 09:37 PM 10/31/2003 -0800, you wrote:
> 
> >I agree completely that making ECS a daemon that runs in the background
> >without a user interface is the proper way to solve all the problems
> >Mark has struggled with, from automatically starting to the bind problem
> >(assuming that I identified that correctly). With ECS as a daemon, there
> >is no need for autostarting. Or even for logging in in the first place.
> >
> >But do be aware that X will (usually) NOT be up when the scripts in
> >/etc/rc.d/rc5.d are executed (/etc/rc5.d is a redhat-specific link, and
> >actually not a very good idea to have).
> >
> >Everything in /etc/rc.d/rc5.d is executed completely during bootup. X is
> >actually NOT launched during the boot phase. Rather, *once the boot
> >phase is completed*, Linux sets up seven terminals. You can switch back
> >and forth between them with Alt+F1 through Alt+F7. Then, Linux launches
> >the applications specified in /etc/inittab. In six of the terminals, it
> >runs /sbin/mingetty. In the seventh terminal, it runs /etc/X11/prefdm
> >-nodaemon. This is the X login screen, and it will also start the X
> >server at the same time. So X is definitely NOT running when
> >/etc/rc.d/rc5.d is executed. The only time it would already be running
> >is if you start or stop certain individual services.
> >
> >As an aside, the script actually should be in /etc/rc.d/init.d.
> >/etc/rc.d/rc5.d should only contain a link.
> >
> >On Fri, 2003-10-31 at 17:44, Rob Hicks wrote:
> > > Mark,
> > >
> > > Why not just create a shell script and place it in /etc/rc5.d/ with an
> > > execution number high enough that it will execute after everything else has
> > > run. rc5.d runs only when the system is set up for run level 5, or X. 
> > Thus X
> > > should be up. I assume that you want X running in order to launch a 
> > browser?
> > >
> > > My preference would be to have ECS run as a daemon that can be attached to
> > > with a browser, either on the local machine or on remote machines. Then 
> > when
> > > a user logs in, you give simply give them a desktop or panel link to launch
> > > the browser and go to the ECS sign on page.
> > >
> > > Rob
> > >
> > > -----Original Message-----
> > > From: Mark Gilmore [mailto:mark@markgilmore.net]
> > > Sent: Friday, October 31, 2003 4:51 PM
> > > To: ecs@netbloc.com
> > > Subject: [ecs] Still looking for where to place the cmd
> > >
> > > OK - Let me try asking it another way (focusing on RH9 for now):
> > > When I log in, I want RH9/Linux to start a terminal (i.e. "konsole" or
> > > "gnome")
> > > session and run a command within that session (the cmd being "konzole
> > > -e="ecs.bin").
> > > In *what* file would I place this command ?
> > > Thanks,
> > >
> > > Mark Gilmore
> > > http://OmnipotenceSoftware.com
> >
> >
> >
> >---
> >Incoming mail is certified Virus Free.
> >Checked by AVG anti-virus system (http://www.grisoft.com).
> >Version: 6.0.528 / Virus Database: 324 - Release Date: 10/16/2003
> 
> Mark Gilmore
> http://OmnipotenceSoftware.com
> 
> ______________________________________________________________________
> 
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.528 / Virus Database: 324 - Release Date: 10/16/2003


  subject (prev) or (next) | time (prev) or (next) | author (prev) or (next) | view more subjects




Services provided by [NetBloc]®! NetBloc Solutions Inc.
Terms of use. Indexing software (c) 1999 Lin-De, Inc
.