This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: change wallpaper periodly by cron?
FYI, you can use the "run" command that comes with XFree86-bin (or get it
from Chuck Wilson's Cygwin tools page) to avoid seeing the window at all.
Also, cygrunsrv has the "-i" flag that sets the interactive bit for the
service.
Igor
On Thu, 21 Aug 2003, Bill C. Riemers wrote:
> There is a solution for programs which you don't compile. That is simply to
> reposition the console window off screen. i.e.
>
> Right click on the title bar of the window and select properties. Then go
> to layout. Unselect "Let system position window". Adjust the window so the
> position is off screen. Click "OK". Finally, select "Save properties for
> future windows with the same title" and click "OK".
>
> Now your window still opens, but it doesn't clutter the screen.
>
> If you want to avoid even having the icon, I find the successful approach
> for that is to invoke your program via rxvt. For example, for my Cygwin
> icon I use a short cut of with a target of: "d:\bin\rxvt.exe -e
> /bin/bash --login". You can use the -geometry option on your rxvt windows
> to hide those.
>
> Indeed a console window still opens, but it is off screen, and closes so
> quickly that most of the time I never see the icon on my task bar for it.
>
> For crontab jobs, I found the same type of trick works if you install the
> program as a service. i.e.
>
> cygrunsrv -I pcphone -a -w -p /usr/local/bin/pcphone -s QUIT -o -t
> manual
>
> Next under Windows Services, check the "allowed to interact with desktop
> button".
>
> Now whenever I run "/usr/local/bin/pcphone" either interactively, or from a
> crontab job, it simply starts calls "cygrunsrv -S pcphone" which in turn
> invokes:
>
> /usr/local/bin/pcphone -w
>
> Finally, the pcphone script when invoked as a service starts the real
> pcphone.exe via a nohup call to rxvt, sleeps for five seconds and then
> exits. So the "CONSOLE" window icon exists on my task bar for no more than
> five seconds. Once the "CONSOLE" window is closed, the "rxvt" window is
> also killed, however the children of "rxvt", "pcphone.exe" are not killed.
> So "pcphone.exe" is left running as an orphaned process. The reason for the
> five second delay is just to give rxvt enough time to invoke the
> "pcphone.exe" program.
>
> Bill
>
>
>
>
>
>
>
> ----- Original Message -----
> From: "Ehud Karni" <ehud@unix.mvs.co.il>
> To: <lucifer@tsinghua.org.cn>
> Cc: <cygwin@cygwin.com>
> Sent: Thursday, August 21, 2003 9:31 AM
> Subject: Re: change wallpaper periodly by cron?
>
>
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > On Thu, 21 Aug 2003 04:15:29 +0100, Elfyn McBratney <elfyn@cygwin.com>
> wrote:
> > >
> > > Lucifer <lucifer@tsinghua.org.cn> wrote:
> > > > On Wed, 20 Aug 2003 10:20:10 +0200
> > > > Corinna Vinschen <corinna-cygwin@cygwin.com> wrote:
> > > >
> > > > CV>
> > > > CV> It's a limitation of service processes. You can only change it by
> setting
> > > > CV> the "Allow service to interact with desktop" property of the
> service.
> > > > CV>
> > > >
> > > > I enabled the "Allow service to interact with desktop" and it works
> now,
> > > > thank you. However, a DOS window titled as
> c:\cygwin\bin\cygrunsrv.exe
> > > > popped out. It's ugly. Can that be avoided?
> > >
> > > AFAIK, it cannot. It's the ugly side effect of interactive service(s) on
> > > Windows.
> >
> > Try to compile your program with -mwindows (without changing your
> > "main" function). I use this trick when I want a program without a
> > window (or console). If you run it from bash (or sh/csh) you wont
> > notice any change, but if you run it under command or cmd, it will
> > run without a (console) window.
> >
> > Ehud.
> >
> >
> > - --
> > Ehud Karni Tel: +972-3-7966-561 /"\
> > Mivtach - Simon Fax: +972-3-7966-667 \ / ASCII Ribbon Campaign
> > Insurance agencies (USA) voice mail and X Against HTML Mail
> > http://www.mvs.co.il FAX: 1-815-5509341 / \
> > mailto:ehud@unix.mvs.co.il Better Safe Than Sorry
> > -----BEGIN PGP SIGNATURE-----
> > Comment: use http://www.keyserver.net/ to get my key (and others)
> >
> > iD8DBQE/RMnHLFvTvpjqOY0RAvbKAJ9/NisvO2AiJpdQOdUBA4dVymz5SACeJka1
> > qt/n45d0M2boTdaGlKIbso8=
> > =uhKZ
> > -----END PGP SIGNATURE-----
> >
> > --
> > 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/
> >
>
--
http://cs.nyu.edu/~pechtcha/
|\ _,,,---,,_ pechtcha@cs.nyu.edu
ZZZzz /,`.-'`' -. ;-;;,_ igor@watson.ibm.com
|,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D.
'---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow!
"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster." -- Patrick Naughton
--
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/