How do I do this. I used Russ's client on one of my PCs but I'm already running it on some others and wanna run it as a serverice (so it doesn't show up when u 'ctrl+alt+del').
The different OSs handle this different ways obviously, under linux you can start it as a service by just adding an & (ampersand) and then closing that window... BeOs has something similar (I don't remember what right now) and the Mac I have no idea...
Well I tried using dnetc -svcstart on Redhat Lunix 6.1 and Solaris 5.6, both platforms gave me an error saying that particular option wasn't supported on the platform. Haven't tried the & prefix, but wouldn't that be the same as using the -quiet mode to suppress text output? The & prefix basically just starts the program and then returns to the prompt, without having the program occupy 1 xterm window.
Edit: I tried the & thing on Linux, and it doesn't seem to do anything. It still shows all the output instead of going back to the prompt. Seems to be doing the same thing as if the & wasn't even there. How is this different from the normal mode? I did a "top" and I could still see the dnetc process on top taking up 99+% CPU time.
The amersand "unties" the client from the X-terminal ... if you don't use it the client should close down if you close the X-term window, with the ampersand there you can close the window and the client should be just fine. Another difference is that you're able to hit enter and write commands in the same window, this too because the client isn't tied to it anymore.
I'll find a link to how you can setup the client to autostart and run in terminal 8, as in that you're able to use ALT+F8 to see it.
<< ** Setting the client to auto-start on bootup **
Depending if your machine is used by other people, it would be an
excellent idea to adjust the file permissions. Run:
(chmod 640 /var/dnetc/*) This will set all files to read/write for you,
read only for group, and no access for anyone else.
With the buffers and the ini file in /var/dnetc, you can move the
executable into a bin directory. I used /usr/local/bin
(mv dnetc /usr/local/bin) and enable the executable file permission
by (chmod 750 /usr/local/bin/dnetc).
Now to get it to start when Linux boots up: Edit /etc/rc.d/rc.local, I
used pico: (pico /etc/rc.d/rc.local) Place the following line's
somewhere near the bottom of this file:
Or better yet, instead of the above line, you can redirect the output to
a virtual terminal:
/usr/local/bin/dnetc -ini /var/dnetc/dnetc.ini -noquiet >> /dev/tty8 &
*This is important!* Don't forget the "&"!!! The "&" will run DNETC as a
background process and allow Linux to finish booting up. Otherwise it
will lock your machine in the DNET client with CTRL+C unable to break
out of it. This can be fixed either by rebooting and at the lilo bootup
prompt issue: (linux 1) which puts it into single user mode. Or if
your machine is networked, telnet/ssh into the box and fix
/etc/rc.d/rc.local.
A little background info on virtual terminals: In case you haven't heard,
Linux allows you to have "virtual terminals." Basically it's like a bunch
of different local login's (you can only have 1 Xwindows at a time
though). You can switch between the terminals using CTRL+ALT from
Xwindows, or just ALT if you're at a shell. In Xwindows, hit CTRL+ALT+F2
to try it out and then CTRL+ALT+F7 to get back to Xwindows. Note:
Xwindows isn't always on F7. The left and right sets of CTRL and ALT take
you to different virtual terminals. Left is 1-12 and right is 13-24.
Save /etc/rc.d/rc.local (CTRL-X in pico) and restart the machine (or just
type the above line at the command prompt if you have a nice uptime ;-)).
To check if it's running, issue (ps aux | grep dnetc.) A single CPU
machine will show three processes of dnetc, dual CPU machine will show
four. Two of the processes are input/output buffer activity and the
remaining process(es) are the active block crunchers.
If you chose to direct the output to a virtual terminal: In X,
CTRL+ALT+F8 to view the DNETC output and then ALT+F7 to get back into X.
In shell (text) mode, ALT+F8 to view the DNETC output and then ALT+F1 to
get back to your shell. Another way to check is to enable the log file.
The default is no logging (to enable logging,
(dnetc -config -ini /var/dnetc/dnetc.ini), option #4, set #1 to whatever
you want, set #2 to the log file name you want to generate, return to
menu, save, (dnetc -restart)). The log file you configured should now
exist and can be viewed.
If you need to shutdown/kill the client, you must be logged into the same
user account DNETC was started from (that or supercede everything by using
root). Run (dnetc -shutdown). If the client continues to run, issue
(killall -TERM dnetc). A (killall -9 dnetc) can be used if the client
refuses to shutdown. >>
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.