Gomez, Juan wrote ------------------- >Date: Wed, 2 Nov 2005 11:19:23 -0600 >From: "Gomez, Juan" <[EMAIL PROTECTED]> >Subject: Perl:Tk >To: <[email protected]> >Hello > > Good morning all!> > >I am still learning Perl and I discover Tk which is great >I show it to my boss and he like it too much now he has ask me >To do a program using Tk is a very simple program >I have a script in unix that we run to create documents for floor >Shop, this script is a one liner meaning this > >Mydoc -k -I"Comments" product > A B C D
Juan, As Brian already said, you'll need an X Server of some kind to provide a GUI environment for Tk to work in. I currently use Cygwin on my Windows desktop for this. It takes a little tweaking to get it to work, but once it's installed and operating it great. Best of all, the price is free. Also, are you running the script on a remote host or just on your local desktop Perl disto. For remote scripts you'll need to put a little effort in the following way : - Get the Cygwin X Server running on your desktop...Cygwin comes with a startwin.bat file that starts the X server and opens a single xterm window. The file is well commented. The rxvt is also a nice alternative to the xterm. - From you local/desktop Cygwin environment issue an xhost +<server> command to allow the remote host server the ability to display a window on your local Cygwin X server...thus if I want to run a Tk script on a server named catbert I would need to issue xhost +catbert. - Also, you'll need to export the DISPLAY variable on the remote host. This you can usually place into your .profile/.bashrc/.cshrc login file on the remote host...export DISPLAY=<your desktop tcp/ip>:0.0. Don't forget the ":0.0" at the end, otherwise, you'll get sporadic results... hth, adym _______________________________________________ ActivePerl mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
