Re: VNC Question (NOT A Problem) :)
On Thu, 25 Apr 2002 21:43:41 -0500 "Jim Hale" <[EMAIL PROTECTED]> quietly intimated: > Got VNC installed, running and everything is hunky dory. I just want > to know if there's a way to start vncserver whenever I login using my > root account and turn it off when I log out. I don't want it started > when I reboot the machine, just when I login as root. I pretty leave > it logged into this account since the machine is my Email/Webserver > and just lock the screen (so the pitter-patter of kitty feet doesn't > mess anything up.) First, this isn't a good idea unless your machine is 100% isolated from any outside connection (not even connected to another machine that is connected to the outside, no matter how well isolated it is through the other). That said, you can run it at login via ~/.bashrc. To kill it, create (if you don't already have one) a ~/.bash_logout with the kill command: vncserver -kill : That command BTW is direct from the manpage. > It's setup here at my house so the only people that can get into it is > my wife or cats (and neither are inclined to do so). > > Also - I started on computers back when DOS was all the rage (ok - I'm > showing my age here) - anyway - I got pretty adept at writing batch > files. Is there anything similar to that in Linux, and where/how would > I add something that I DID want to run at startup or by creating an > icon on the desktop? Not exactly DO$, but bash scripting is close enough that it's easy to learn and adapt. It's much more powerful and flexible. Tutorials are all over the place, and even on your machine ('man bash' without quotes can get you started). Adding it to run automatically varies, as does creating an icon. The latter depends on what desktop you use. The former depends on if you want it system wide or individual. For the first part, you can put it anywhere you like. If that isn't in the path, it can be called by giving the full path. To make it system wide, the customary places are in /etc/rc.d/rc.local (can also be /etc/rc.local on newer releases). If you want it for the individual, ~/.bashrc is generally where you can put it. When I say "put it in" one or the other, I mean put the call to the script in them, not the actual script. In both instances, the entry would look like this, assuming a script called STARTSCRIPT that was located in /usr/local/sbin: /usr/local/sbin/STARTSCRIPT & The '&' on the end means the rest of thins can continue on without waiting for the script to finish. If you want it to wait until the script completes, leave the '&' off of the end. If you want to suppress any output from the script so you don't see it on the screen: /usr/local/sbin/STARTSCRIPT > /dev/null 2>&1 The script itself I usually put in appropriate places. I created a directory and placed it centrally for everybody and/or system use: /usr/addon. I put it in everybody's path and individual binaries that I get (i.e. not from a compiled program done by me and not from an rpm) plus many scripts used by all can be placed there. For individual users I put the in $HOME/bin for the user running it, and I put that directory in everybody's path (I think it's on by default, though I might be wrong). So if kcsmart is the only one that ever runs it, it's in /home/kcsmart/bin and when kcsmart is logged in, $HOME/bin equates to /home/kcsmart/bin, as does ~/bin. That makes any file there only in kcsmart's path and nobody else (except root) can run it from there. The variable $HOME changes for each user. So does the tilde (~) reference, though there's an exception for that, too. That's already much more than I wanted to get into. First start dealing with the writing. Then you can concern yourself with the when, where and how of getting it to run at certain times. As for the icon deal, basically you write the script then create the icon to run it, pointing it to the script. How is determined by the desktop. I use icewm, and it doesn't have desktop icons by default unless I use gnome. So there is no such thing. But there are still ways to run it from an icon that's visible without using gnome. Gnome and kde allow you to create icons right on the desktop (gnome through whatever windowmanager you use, kde directly). So, this method varies and can't be given a stock answer. > OK - enough to chew on for now. :) -- I'm so hungry, I could almost eat health food. ___ Redhat-list mailing list [EMAIL PROTECTED] https://listman.redhat.com/mailman/listinfo/redhat-list
Re: VNC Question (NOT A Problem) :)
On Fri, 26 Apr 2002, Edward Dekkers wrote: > > know if there's a way to start vncserver whenever I login using my root > > account and turn it off when I log out. I don't want it started when I > > .bashrc can be used in this case I think. I'm not sure whether that will > kill the vncserver on log-out though. For an interactive login .bash_profile is more appropriate. But, even better would be to use .xinitrc. Take a look at "man xinit" and search for xinitrc. It's been awhile since I've started X apps this way, Gnome takes care of me now. ___ Redhat-list mailing list [EMAIL PROTECTED] https://listman.redhat.com/mailman/listinfo/redhat-list
RE: VNC Question (NOT A Problem) :)
On Thu, 2002-04-25 at 22:20, Jim Hale wrote: > > > Good luck, and have fun ... -d > > Isn't this why we got into computers in the first place. :) > > Thanks for the info - I'll try and find a good book on bashing Linux, > err rather running the Bash IN Linux. > > Jim You can also subscribe to the [EMAIL PROTECTED] mailing list low volume but some VERY knowlegdeable folks read and respond to that list. Bret ___ Redhat-list mailing list [EMAIL PROTECTED] https://listman.redhat.com/mailman/listinfo/redhat-list
RE: VNC Question (NOT A Problem) :)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jim Hale wrote: >home and sure I could roll my chair over to the other machine, log in, >and do what I need to do, but at the hospital, the machine may be 5 >miles away at our second campus. It does work well. But if you're doing this anywhere except on a private, tightly controlled network, you absolutely _must_ tunnel VNC through ssh, or protect it in some other way. The VNC docs have lots of detailed info on this, and you can always rattle our cages if you get stuck. Cheers ... -d - -- David Talkington PGP key: http://www.prairienet.org/~dtalk/0xCA4C11AD.pgp -BEGIN PGP SIGNATURE- Version: PGP 6.5.8 Comment: Made with pgp4pine 1.75-6 iQA/AwUBPMjH279BpdPKTBGtEQJ9bACgjT0QIdsNU/+PGJD8iZ0AeYISswoAoN9L SQUKkzFJM2tvA/26ovYygHVh =Mbch -END PGP SIGNATURE- ___ Redhat-list mailing list [EMAIL PROTECTED] https://listman.redhat.com/mailman/listinfo/redhat-list
RE: VNC Question (NOT A Problem) :)
I'll give it a shot - I ain't got nothing to lose. :) Thanks! Jim Hale - Jim & Kathy's MIDI & Audio Website http://hale.dyndns.org > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]] On Behalf Of Edward Dekkers > Sent: Thursday, April 25, 2002 9:56 PM > To: [EMAIL PROTECTED] > Subject: Re: VNC Question (NOT A Problem) :) > > > Status: > > > know if there's a way to start vncserver whenever I login using my > > root account and turn it off when I log out. I don't want > it started > > when I > > .bashrc can be used in this case I think. I'm not sure > whether that will kill the vncserver on log-out though. > > Regards, > Ed. > > > > > ___ > Redhat-list mailing list > [EMAIL PROTECTED] > https://listman.redhat.com/mailman/listinfo/re> dhat-list > > ___ Redhat-list mailing list [EMAIL PROTECTED] https://listman.redhat.com/mailman/listinfo/redhat-list
RE: VNC Question (NOT A Problem) :)
> I'm not at all sure why you'd want to do that. First, > running vncserver as root is asking for trouble. (For that > matter, habitually logging in as root is also asking for > trouble.) VNC is not, by itself, a secure protocol at all. > Second, I don't understand the relationship between being > logged in at the console of this machine and desiring a > remote connection to the same machine, so I wonder what > problem you're solving > here. Just to learn if I can do it. I work in a hospital and we are looking at the possibility of adding Linux machines into the mix (why not? We already have winbloze and Novell). We won't do that though until we can perform disaster recovery (we don't need a production machine that dies and then we can't fix it for obvious reasons) I have all this setup at home and sure I could roll my chair over to the other machine, log in, and do what I need to do, but at the hospital, the machine may be 5 miles away at our second campus. > Sounds like you have some reading to do, my friend! Start > with a good > bash book. You'll find shell programming to have about the same > relationship to DOS batch files that a scientific calculator > has to an > abacus. ;-) That's what I used to think about DOS as comparing it to my original learning on a TI-99/4A so I ain't skeered. ;) > > As for startup programs, the uninitiated should probably > stick to adding things to /etc/rc.d/rc.local, and not mess > with the init scripts. But please grab a good Unix > administration book (you can get lots of recommendations here > if you want them), and be paranoid enough to not > expose this box to the internet while you're experimenting. Everything is behind an IPCop box and I'm bridging over to that machine from my internal network and all the port in question are blocked from the outside world - and since this is just my personal stuff, I ghost everything every Sunday 'just in case'. :) > Good luck, and have fun ... -d Isn't this why we got into computers in the first place. :) Thanks for the info - I'll try and find a good book on bashing Linux, err rather running the Bash IN Linux. Jim ___ Redhat-list mailing list [EMAIL PROTECTED] https://listman.redhat.com/mailman/listinfo/redhat-list
Re: VNC Question (NOT A Problem) :)
> know if there's a way to start vncserver whenever I login using my root > account and turn it off when I log out. I don't want it started when I .bashrc can be used in this case I think. I'm not sure whether that will kill the vncserver on log-out though. Regards, Ed. ___ Redhat-list mailing list [EMAIL PROTECTED] https://listman.redhat.com/mailman/listinfo/redhat-list
Re: VNC Question (NOT A Problem) :)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jim Hale wrote: >Got VNC installed, running and everything is hunky dory. I just want to >know if there's a way to start vncserver whenever I login using my root >account and turn it off when I log out. I don't want it started when I >reboot the machine, just when I login as root. I'm not at all sure why you'd want to do that. First, running vncserver as root is asking for trouble. (For that matter, habitually logging in as root is also asking for trouble.) VNC is not, by itself, a secure protocol at all. Second, I don't understand the relationship between being logged in at the console of this machine and desiring a remote connection to the same machine, so I wonder what problem you're solving here. Leaving aside these troublesome questions, the man page for vncserver will show you the -kill option, which you can use in your .bash_logout to shut down the server that you started from .bash_profile. Which brings us to ... >Also - I started on computers back when DOS was all the rage (ok - I'm >showing my age here) - anyway - I got pretty adept at writing batch >files. Is there anything similar to that in Linux, and where/how would I >add something that I DID want to run at startup or by creating an icon >on the desktop? Sounds like you have some reading to do, my friend! Start with a good bash book. You'll find shell programming to have about the same relationship to DOS batch files that a scientific calculator has to an abacus. ;-) As for startup programs, the uninitiated should probably stick to adding things to /etc/rc.d/rc.local, and not mess with the init scripts. But please grab a good Unix administration book (you can get lots of recommendations here if you want them), and be paranoid enough to not expose this box to the internet while you're experimenting. Good luck, and have fun ... -d - -- David Talkington PGP key: http://www.prairienet.org/~dtalk/0xCA4C11AD.pgp -BEGIN PGP SIGNATURE- Version: PGP 6.5.8 Comment: Made with pgp4pine 1.75-6 iQA/AwUBPMjBPb9BpdPKTBGtEQKPOwCaAwsqiRuTIhNXNrbFDKnE9ebafNYAnRP3 CoEDD5jGWYP8yc0x9k+fPjFR =1pKT -END PGP SIGNATURE- ___ Redhat-list mailing list [EMAIL PROTECTED] https://listman.redhat.com/mailman/listinfo/redhat-list