|
View:
New views
10 Messages
—
Rating Filter:
Alert me
|
|
|
Running Cygwin in background.I would like to run Cygwin as a background process in Windows, and access it via an SSH server (which will be running in Cygwin). What I mean is that I do not want to have an open window on the Windows box. I don't care if it shows up in the Task Manager or anything -- I don't need it to be hidden. Just out of the way so that there isn't always an open window in the taskbar.
Is there a good guide somewhere for how to do this, or does Cygwin have this functionality built in? Thanks, jrtayloriv |
|
|
|
|
|
Re: Running Cygwin in background.
I appreciate the links, but I already know how to set up an SSH server. I was actually interested in finding out how to run Cygwin as a background process so a window won't show up in the task bar. (See my original post for a description of what I am trying to do). Thanks, jrtayloriv |
|
|
Re: Running Cygwin in background.jrtayloriv wrote:
> > paul.hermeneutic wrote: >> http://cygwin.com/ml/cygwin/2008-01/msg00527.html >> >> http://www.google.com/search?as_q=Cygwin+setup+sshd >> >> -- >> Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple >> Problem reports: http://cygwin.com/problems.html >> Documentation: http://cygwin.com/docs.html >> FAQ: http://cygwin.com/faq/ >> >> >> > > > I appreciate the links, but I already know how to set up an SSH server. I > was actually interested in finding out how to run Cygwin as a background > process so a window won't show up in the task bar. (See my original post for > a description of what I am trying to do). > > Thanks, > jrtayloriv Then perhaps you need to back up and explain how you get a window in your task bar that you believe is related to Cygwin's SSH server. If this were just a general question about how to hide windows of console apps, I'd suggest 'run' to you but if you don't know how the window is getting there in the first place, you won't know where to use 'run' anyway. In any case, what you can gather from this line of questioning is that running Cygwin's SSH server on any recent version of Windows (from W2K on) won't generate a window in the task bar if you run it as recommended (i.e. as a service set up via ssh-host-config). -- Larry Hall http://www.rfk.com RFK Partners, Inc. (508) 893-9779 - RFK Office 216 Dalton Rd. (508) 893-9889 - FAX Holliston, MA 01746 _____________________________________________________________________ A: Yes. > Q: Are you sure? >> A: Because it reverses the logical flow of conversation. >>> Q: Why is top posting annoying in email? -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/ |
|
|
Re: Running Cygwin in background.On Jan 30, 2008 6:57 PM, jrtayloriv wrote:
> > > > paul.hermeneutic wrote: > > > > http://cygwin.com/ml/cygwin/2008-01/msg00527.html > > > > http://www.google.com/search?as_q=Cygwin+setup+sshd > > > I appreciate the links, but I already know how to set up an SSH server. I > was actually interested in finding out how to run Cygwin as a background > process so a window won't show up in the task bar. (See my original post for > a description of what I am trying to do). > > Thanks, > jrtayloriv > -- Have you read: /usr/share/doc/Cygwin/openssh.README -- NOTICE: Reading this email message requires root privileges which you do not appear to possess. Sorry, dude. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/ |
|
|
Re: Running Cygwin in background.Sorry, I am not used to Windows at all -- I've only been using Linux for the past several years and I've forgotten about a lot of things.
Because of this, it seems that I am having trouble asking the right question... I am talking about how to get Cygwin itself to run in the background. Once I start up the Cygwin shell, I am able to run SSH as a background service within Cygwin. But when I close the Cygwin shell, I loose the SSH server running within it. What I need is information on how to run ***CYGWIN*** as a background service, so that there is no Cygwin window open, but the services that are running in Cygwin (in this case sshd) are still there. Do I even need to run Cygwin for this? Can I just run cygwin's sshd from windows? I do know what the 'Run' menu is in Windows. I also found information about Cygserver in the online documentation -- is this what I need? Are you trying to tell me to use the Run menu with 'cygrunsrv.exe' ? Or are you telling me to run sshd from 'Run' menu? Once again, I'm really not at home in Windows, so let me know if I'm missing something. If I am not understanding something could you at least point me in the right direction for what I need to look up? Thanks, jrtayloriv |
|
|
Re: Running Cygwin in background.On Jan 30, 2008 11:35 PM, jrtayloriv wrote:
> > Sorry, I am not used to Windows at all -- I've only been using Linux for the > past several years and I've forgotten about a lot of things. > > Because of this, it seems that I am having trouble asking the right > question... > > I am talking about how to get Cygwin itself to run in the background. Once I > start up the Cygwin shell, I am able to run SSH as a background service > within Cygwin. But when I close the Cygwin shell, I loose the SSH server > running within it. > > What I need is information on how to run ***CYGWIN*** as a background > service, so that there is no Cygwin window open, but the services that are > running in Cygwin (in this case sshd) are still there. Do I even need to run > Cygwin for this? Can I just run cygwin's sshd from windows? CYGWIN is not a program to be run. You can just run sshd as a service and get what you want. If you ssh to your Cygwin sshd system, you can run a bash shell or whatever shell you want. CYGWIN isn't something you run, it's just a dll that does fancy translation of win32 calls to unixy calls and vice versa so recompiled unixy programs can work properly on a Windows system. That is probably oversimplifying it and I'm sure fifteen other people could point out how what I said is incorrect or misleading, but it should explain it well enough. > > I do know what the 'Run' menu is in Windows. I also found information about > Cygserver in the online documentation -- is this what I need? Are you trying > to tell me to use the Run menu with 'cygrunsrv.exe' ? Or are you telling me > to run sshd from 'Run' menu? > Cygserver and cygrunsrv.exe are two different things. You do not need Cygserver. If you run ssh-host-config it will create an sshd service using cygrunsrv.exe for you. Then you can just start it just like any other windows service. > Once again, I'm really not at home in Windows, so let me know if I'm missing > something. If I am not understanding something could you at least point me > in the right direction for what I need to look up? > > Thanks, > jrtayloriv > -- -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/ |
|
|
Re: Running Cygwin in background.Jason has hit the high points but I thought I'd reply to fill in a few other
areas. jrtayloriv wrote: > Sorry, I am not used to Windows at all -- I've only been using Linux for the > past several years and I've forgotten about a lot of things. Then you should feel at home in Cygwin. The concepts are very close in most regards. > Because of this, it seems that I am having trouble asking the right > question... > > I am talking about how to get Cygwin itself to run in the background. Once I > start up the Cygwin shell, I am able to run SSH as a background service > within Cygwin. But when I close the Cygwin shell, I loose the SSH server > running within it. > > What I need is information on how to run ***CYGWIN*** as a background > service, so that there is no Cygwin window open, but the services that are > running in Cygwin (in this case sshd) are still there. Do I even need to run > Cygwin for this? Can I just run cygwin's sshd from windows? I think Jason has covered this. You are actually not running the SSH server as a service at all. Running it in the background is not the same as running it as a service, as you have noticed. Also, since you have been running it directly from the command-line, you have now set ownership and permissions on various files and directories the SSH server uses. These are now tuned for the user you ran it as. This means three things: 1. You won't be able to run the SSH server as a service under any other user without resetting all these files/directories. 2. Since 'ssh-host-config' is set up to create a service for the SSH server using the SYSTEM or sshd-server user, you may find that running this configuration script no longer gets you a working SSH server service (see 1). 3. While it is possible and permissible to run the SSH server as a service under any user, you loose the ability to login with public key authentication as any user other than the one the service is running under. Depending on how important this ability is and how willing you are to look through the archives for recipes on how to reset permissions and owners on these files and directories, you may find it preferable to just wipe Cygwin from your system and re-install. You can then use the supplied scripts to quickly and easily configure your SSH server the way you want. Again, the openssh readme that a number of people have pointed you to is good and important reading for you, as well as the Cygwin Users Guide. > I do know what the 'Run' menu is in Windows. I also found information about > Cygserver in the online documentation -- is this what I need? Are you trying > to tell me to use the Run menu with 'cygrunsrv.exe' ? Or are you telling me > to run sshd from 'Run' menu? No, not at all. I was referring to '/usr/bin/run' which hides the console of console apps when run directly from the Windows Explorer, for example. 'cygrunsrv' is similar to 'service' under Linux. It allows you to start, stop, install, and remove services, among other things. 'ssh-host-config' uses it. -- Larry Hall http://www.rfk.com RFK Partners, Inc. (508) 893-9779 - RFK Office 216 Dalton Rd. (508) 893-9889 - FAX Holliston, MA 01746 _____________________________________________________________________ A: Yes. > Q: Are you sure? >> A: Because it reverses the logical flow of conversation. >>> Q: Why is top posting annoying in email? -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/ |
|
|
Re: Running Cygwin in background.Thanks Larry, that really cleared up a lot for me. Sorry for the dumb questions, I'm still learning my way around windows, and some of the concepts are very foreign to me. I decided to reinstall cygwin, since I hadn't put any work into that install yet. I had one question regarding your last message, though.
You said: >No, not at all. I was referring to '/usr/bin/run' which hides the console >of console apps when run directly from the Windows Explorer, for example. >'cygrunsrv' is similar to 'service' under Linux. It allows you to start, >stop, install, and remove services, among other things. 'ssh-host-config' >uses it. OK then, so cygrunserv would be to run something in a manner similar to the services that I see in 'msconfig', whereas '/usr/bin/run' would just allow me to run cygwin applications from the windows "Run" dialog without having to run the Cygwin Bash shell. Is this correct, or did I miss something? Thanks again for your help, jrtayloriv |
|
|
Re: Running Cygwin in background.jrtayloriv wrote:
> Thanks Larry, that really cleared up a lot for me. Sorry for the dumb > questions, I'm still learning my way around windows, and some of the > concepts are very foreign to me. I decided to reinstall cygwin, since I > hadn't put any work into that install yet. I had one question regarding your > last message, though. > > You said: > >> No, not at all. I was referring to '/usr/bin/run' which hides the console >> of console apps when run directly from the Windows Explorer, for example. >> 'cygrunsrv' is similar to 'service' under Linux. It allows you to start, >> stop, install, and remove services, among other things. 'ssh-host-config' >> uses it. > > OK then, so cygrunserv would be to run something in a manner similar to the > services that I see in 'msconfig', whereas '/usr/bin/run' would just allow > me to run cygwin applications from the windows "Run" dialog without having > to run the Cygwin Bash shell. Is this correct, or did I miss something? Close. You can run Cygwin apps from the "Run" dialog so long as you have the required Cygwin DLLs in your path. But doing so would open a console for the duration of the app. Using '/usr/bin/run' to run the app would hide that console. Hiding this console can be desirable in the case of X apps, for example. -- Larry Hall http://www.rfk.com RFK Partners, Inc. (508) 893-9779 - RFK Office 216 Dalton Rd. (508) 893-9889 - FAX Holliston, MA 01746 _____________________________________________________________________ A: Yes. > Q: Are you sure? >> A: Because it reverses the logical flow of conversation. >>> Q: Why is top posting annoying in email? -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/ |
| Free embeddable forum powered by Nabble | Forum Help |