[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How do you turn on and off a program automatcially

On Oct 8, 2007, at 10:23 AM, Celejar wrote:

On Mon, 1 Oct 2007 09:26:55 -0400
"Douglas A. Tutty" <dtutty@porchlight.ca> wrote:

On Mon, Oct 01, 2007 at 02:59:41PM +0300, ndemou@gmail.com wrote:
On 10/1/07, Celejar <celejar@gmail.com> wrote:
On Sun, 30 Sep 2007 21:17:57 +0300
ndemou@gmail.com wrote:
On 9/30/07, Celejar <celejar@gmail.com> wrote:
I struggled for a while to figure out how to do exactly this, without success. I believe that cron does not work, since (at least some)
ncurses apps insist on being run from a terminal.

if you enter the "set" command in bash you get a list of bash
variables that are accessible to all programms that you execute. This
is called "the bash environment" (see [1] for more info). A lot of
programms really need to check the values of some of these variables
to execute. Cron has only a small portion of them set so a lot of
programms fail when run from cron (can't tell if this is your specific
case though)

What if you have cron run su - [user]?  That should set up a login

I tried (using at) 'su - username mc' and received a mail stating:

su: must be run from a terminal

I missed most of this thread, so this may not be what you're looking for, but has anyone suggested "rungetty", yet?

Package: rungetty
State: not installed
Version: 1.2-10
Priority: optional
Section: admin
Maintainer: Gerfried Fuchs <alfie@debian.org>
Uncompressed Size: 77.8k
Depends: libc6 (>= 2.3.6-6)
Description: minimal console getty that can run any process
rungetty might be the getty you were looking for.  It is able to run any
program, not just login. If a different program than login is used it usually is run as nobody:nogroup, or the user/group specified on the commandline. rungetty can even be configured to autologin, under certain circumstances. See
the manual page for more information.
You have to change some lines in /etc/inittab for having any effect after
installing the package.  rungetty is based on mingetty and therefore not
suitable for serial use.

Reply to: