![]() |
![]() |
#1 |
Sep 2004
7 Posts |
![]()
I want mprime to automatically start when a specific user (say userx) logs in but not when linux as a whole is started. What scripts need to be modified and how. Please provide details. I am running Mandrake 9.0.
|
![]() |
![]() |
![]() |
#2 |
Aug 2002
Termonfeckin, IE
24×173 Posts |
![]()
What shell are you running? The easiest way is to add it to the rc script - say .bashrc or .cshrc.
|
![]() |
![]() |
![]() |
#3 |
Sep 2004
7 Posts |
![]()
I'm guessing that it is bash, since that is what the terminal consoles identify themselves as. However, all of it runs in a GUI format, which, as far as I currently know, is completely independent of any shells. George Woltman said something about modifying rc.local. What is that, what does it do and how can you safely modify it? Please provide details.
|
![]() |
![]() |
![]() |
#4 | |
Mar 2003
New Zealand
100100001012 Posts |
![]() Quote:
Code:
#!/bin/sh MPRIMEDIR=$HOME/gimps # Start mprime in the background. mprime -b -W$MPRIMEDIR # Start the window manager. x-window-manager # Stop mprime. kill `grep -i "^Pid=" $MPRIMEDIR/local.ini | cut -d= -f2` |
|
![]() |
![]() |
![]() |
#5 |
Aug 2002
2×7×13×47 Posts |
![]() Code:
kill `grep -i "^Pid=" $MPRIMEDIR/local.ini | cut -d= -f2` |
![]() |
![]() |
![]() |
#6 | |
Sep 2003
Borg HQ, Delta Quadrant
2×33×13 Posts |
![]() Quote:
|
|
![]() |
![]() |
![]() |
#7 |
Mar 2003
New Zealand
13×89 Posts |
![]()
rc.local is the usual place to start mprime at boot, but he wanted to start it just when a particular user logged in. (And I assume stop it when that user logged out).
|
![]() |
![]() |
![]() |
#8 |
1,163 Posts |
![]()
For starting mprime i use crontab (in case something kills my mprime), and screen (to see how much work is done).
Crontab job is set as: Code:
10/* * * * * /path/to/my/mpcheck > /dev/null 2>&1 Code:
#!/bin/bash out=`ps aux | grep mprime | grep -v grep | wc -l` [if $out -eq 0 ] then cd /path/to/my/mprime/ screen -m -d ./mprime -d fi |
![]() |
![]() |
#9 |
Aug 2002
2×7×13×47 Posts |
![]()
Mprime has a lock file so there is no need to check if it is running before you start it again...
|
![]() |
![]() |
![]() |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Starting mprime at boot | daxmick | PrimeNet | 18 | 2019-03-17 01:12 |
Automatically updating factordb | chris2be8 | FactorDB | 9 | 2012-05-03 10:20 |
Automatically start Prime95 on the mac | koekie | Software | 2 | 2012-02-06 15:39 |
mprime starting | spaz | Software | 9 | 2009-05-03 06:41 |
starting mprime at boot time on a multicore pc | tha | Software | 6 | 2008-10-15 23:38 |