Re: X11 emulation on mac OS
by hardburn (Abbot) on Apr 18, 2007 at 14:08 UTC
|
X11 is included as part of Mac OS X. You'll need to install the X11User.pkg included on the OS X CD.
"There is no shame in being self-taught, only in not trying to learn in the first place." -- Atrus, Myst: The Book of D'ni.
| [reply] |
Re: X11 emulation on mac OS
by Fletch (Bishop) on Apr 18, 2007 at 14:08 UTC
|
The OS X Tk (the Perl module) is probably compiling against the *NIX-y Tk (the Tcl extension) which is going to try and talk to an X server. There may be an OS X "native" (in that it's talking via Carbon or Cocoa rather than going through an X server) Tk version, but I'm not aware of such a beast. Given that X11.app is not installed by default but it does ship on the OS installation media, you need to consider if having one easily fulfilled dependency is worth the unknown hassle of getting the (possibly non-existent) native Tk going.
| [reply] |
|
|
Yes, OSX (at least 10.4) ships with a native Tk implementation, and the Perl Tk modules compiled against that. No need to fire up X11. (I rarely launch X11 on my mac.)
update:
Apparently, the built-in Perl does not have the Tk modules. However, TCL/TK is indeed native, and doesn't use X11. I'm not sure how you would build Perl-Tk against the native Tk Widgets, since Perl-Tk includes its own standalone copy of Tk.
| [reply] |
|
|
ahh...that might be the issue. I'm actually using active states version of perl because the standard distibution on 10.4 was 5.8.6. Can I simply recompile the activestates version of Tk?
Thanks
| [reply] |
|
|
|
|
Thanks merlyn, I have a question a bit off topic but as fletch pointed out I should be able to recompile Tk. Here's my question: I never removed the distibution of Perl that shipped with 10.4 I simply installed 5.8.8 from active state and set a s-link to the perl binary. Can I know just download Tk and build it as normal without relying on X11 or do I need to remove the existing version of Tk somehow.
Thanks for the help!
| [reply] |
|
|
please, if I am to use Tcl::Tk on OSX 10.4 rather than use::Tk (which needs to be run form X11 console?) What are the key steps?
Summarizing: Where and how do I use the native version of the Tk on the 0SX 10.4 ?
Assume I've made the apparent mistake of following Lidie's advice,
http://www.lehigh.edu/~sol0/Macintosh/X/ptk/ # see END NOTE 1 for context of what Lidie wrote if the link is broken):
I've downloaded from http://search.cpan.org/~ni-s/Tk-804.027/ and installed TK on my new OSX 10.4 mac mini. During the make test I see multiple failures of the following type:
'couldn't connect to display ":0" at /Tk-804.027/blib/lib/Tk/MainWindow.pm line 55.' because I didn't use X11 .
R Schwartz wrote there is a native version of Tk already on my 10.4, that doesn't require the X11 . (Although I've got X11 installed from my disks, I honestly don't even know how to start this X11 consolre either)
If this is correct, where do I, and how do I use this X11 free TK? when I attempted my first simple perl file with "use TK;" prior to my incomplete attempt to properly download, make and test the CPAN TK-804... I had a failure with that script because the OS10.4 perl didn't have a TK module available. If you can, please provide specifics and details.
thanks, JB
END NOTE 1 Lidie wrote: Perl/Tk and Mac OS X 10.4 (Tiger) You can use the Perl 5.8.6 that comes with Tiger or build it yourself. Now fetch the Perl/Tk distribution, (Tk-804.027)(http://search.cpan.org/~ni-s/Tk-804.027/) . Unpack Perl/Tk and build it using the standard idiom: tar -zxvpf Tk-804.027.tar.gz cd Tk-804.027 perl Makefile.PL make make test # here is where I have the issue where this test fails. sudo make install
| [reply] |
|
|
Assume I've made the apparent mistake of following Lidie's advice, http://www.lehigh.edu/~sol0/Macintosh/X/ptk/
# see END NOTE 1 for context of what Lidie wrote if the link is broken):
I've downloaded from http://search.cpan.org/~ni-s/Tk-804.027/ and installed TK on my new OSX 10.4 mac mini. During the make test I see multiple failures of the following type:
'couldn't connect to display ":0" at /Tk-804.027/blib/lib/Tk/MainWindow.pm line 55.' because I didn't use X11 .
R Schwartz wrote there is a native version of Tk already on my 10.4, that doesn't require the X11 . (Although I've got X11 installed from my disks, I honestly don't even know how to start this X11 consolre either) If this is correct, where do I, and how do I use this X11 free TK? when I attempted my first simple perl file with "use TK;" prior to my incomplete attempt to properly download, make and test the CPAN TK-804... I had a failure with that script because the OS10.4 perl didn't have a TK module available. Summarizing: Where and how do I use the native version of the Tk on the 0SX 10.4 ?
If you can, please provide specifics and details.
thanks, JB
END NOTE 1
Lidie wrote:
Perl/Tk and Mac OS X 10.4 (Tiger)
You can use the Perl 5.8.6 that comes with Tiger or build it yourself. Now fetch the Perl/Tk distribution, (Tk-804.027)(http://search.cpan.org/~ni-s/Tk-804.027/) . Unpack Perl/Tk and build it using the standard idiom:
tar -zxvpf Tk-804.027.tar.gz
cd Tk-804.027
perl Makefile.PL
make
make test # here is where I have the issue where this test fails.
sudo make install
| [reply] |
|
|
|
|
|
|
I realize that the X11 package is shipped with the media and I've installed it and it works fine, however I have several users that just want to simple run the app without having to install the pkg so I was hoping for another solution.
| [reply] |