Upgrading, Part 4: Panther, Fink, X11, and XEmacs

I’ve been having problems with Panther, Fink, and X11; I’m trying to get XEmacs installed. Fink 0.6.1 is supposed to be Panther compatible, and is supposed to recognize the Apple X11 that ships with Panther. But when I tried to install xemacs via dselect, it asked for an X11 implementation. The system-xfree86 package used in Fink on OS X 10.2 as a placeholder is no longer available, since fink is supposed to recognize X11 automatically.

I was pulling my hair out. I finally searched the fink-users mailing list archive, and found someone else having the same issue. Someone who, like me, missed the relevent FAQ entry. It seems you need the X11 SDK from the XCode CD installed, as well as X11.

But that still didn’t solve my problem. After trying much of everything, I posted on the fink-users Mailing List, and got some additional help (Thanks to Peter O’Gorman for his help). It seems that for now at least, dselect is broken, and so you need to use apt-get. All in all, getting this all up and running has been a hassle; although I’m sure this will improve since I know the Fink contributors are continually working on the Panther ports/enhancements. To save others some hassle, here it all is for the search engines:

How to Install XEmacs (or other X11 apps) for Apple’s X11, using Fink 0.6.1 on Panther.

This is geared for XEmacs, but should apply to other X11 apps as well.

  1. If you already installed Fink, and it tried to install XFree86, you need to get Fink to remove XFree86, and then reinstall Apple’s X11 and the X11 SDK. Instructions for removing XFree86 are in Section 8.12 of the Fink FAQ, instructions to install X11 and the SDK are next.
  2. Install Apple’s X11. If you didn’t do this when installing Panther, you can fink it on Panther CD 3 (Packages Folder).
  3. Install the X11 SDK. If you didn’t do this when installing the Developer Tools, you can do install it from the XCode CD. You don’t even have to install all of the Developer Tools… just look in the Packages Folder.
  4. Install Fink. I used the binary installer for 0.6.1 from the Fink Download Page and it worked fine.
  5. Check your config. We’ll be using apt-get, so check /sw/etc/apt/sources.list. You should see a line beginning with deb. It should contain “10.3”. If not, you’ll have to edit it it, here’s what mine looked like when fixed (all one line):

    deb http://us.dl.sourceforge.net/fink/direct_download 10.3/release main

  6. Update your package list. apt-get update
  7. Test an XEmacs install. type apt-get -s install xemacs. This will give you a list of packages that will be installed, like this:

    The following extra packages will be installed: dlcompat gdbm-shlibs libjpeg-shlibs libpng3-shlibs libtiff-shlibs xaw3d-shlibs xemacs-base-pkg xemacs-efs-pkg

  8. Check those packages. You should not see xfree86, xfree86-base, etc. If you do, something is amiss. If you see dlcompat, make a note of it.
  9. Install xemacs. apt-get install xemacs
  10. Possible followup step. If you saw “dlcompat” earlier as a package to be installed, I recommend one more step. When I did this install, dlcompat failed to trigger an install of dlcompat-shlibs, which is a dependancy. Just do it yourself: apt-get install dlcompat-shlibs

That should do it; it got me running XEmacs. Good luck! Please sumbit any corrections via the comments link below.

Both comments and pings are currently closed.

31 Responses to “Upgrading, Part 4: Panther, Fink, X11, and XEmacs”

  1. abhishek Says:

    still not working

    hi ..i am a new user of mac os x n fink..
    i was having the same problem as u. then i tried what all steps u mentioned.. but still on my xterm window.. it says xemacs command not found…although i installed xemacs..
    on the terminal window if i write xemacs.. it says…
    dyld: xemacs can’t open library: /sw/lib/libdl.0.dylib (No such file or directory, errno = 2)
    Trace/BPT trap
    do u know whats goin on

  2. abhishek Says:

    hi its me again , the guy who made the first comment..well thers a correction…now when i installed dlcombat-shlibs…or whatevr its name is…xemacs is running on the terminal window..but on the xterm x11 its not..it says command not found….what should i do

  3. Jason Says:

    Next steps

    Abhishek- if it runs from the term window, but not from xterm, it may be a path problem. Try running /sw/bin/xemacs from an xterm. If that works, you just need to fix your search path when running X…. I’m not quite sure how to do that, but it should be something you can find on Google or the Fink website ( http://fink.sourceforge.net). I also highly recommend asking for help on the fink-users mailing list; you can join at http://fink.sourceforge.net/lists/fink-users.php

  4. Kyle Passarelli Says:

    Thanks for the tips

    Xemacs is working just fine now – thanks. Didn’t have the path problems of the previous comments. Hopefully Fink’s dependency on apple’s x11 sdk will be removed in a future release – I’m glad I didn’t blindly try the installation the first time.

    Looks like google hasn’t picked up your page, though.

  5. Jason Says:

    Google

    Googlebot spiders me regularly, so hopefully they will have this pages indexed soon. Also, when Google fails, remember to try Feedster. It indexes many many blogs (including this one) and other RSS feed sources on a daily basis.

  6. Zachary Heaton Says:

    Works for GIMP as well!

    Thanks for the tips, Jason – the procedure you mentioned worked like a charm, and Fink no longer tries to install XFree86 when installing GIMP. I hope that the Fink project gets this info up on their main page in short order. There’s more than a few people who are going to want to know this.

  7. Dale Durran Says:

    thanks

    Thanks for carefully laying out how to install Xemacs on 10.3. I was having the same trouble you describe and your guidance worked great for me. I also installed ispell and am having trouble getting Xemacs to find the package when clicking on the “Spell” button. Do you have any ideas on this. Thanks again.

  8. Clint Says:

    This is HUGE!

    I typed in “xemacs fink x11” into google and this was the first page that it found. Thanks for putting this up on your website! I linked it from mine so that hopefully more people will see this useful information!

  9. Jason Says:

    Commentage

    note to self… *gotta* add timestamps to comments, and set up comment notification

    Dale – Sorry, no ideas on ispell, haven’t installed it. You might try the Fink Users mailing list, I’ve gotten good help there.

    Clint – Thanks for the link! Also, it’s cool to see I’m a number one Google hit for something useful!

    And to everyone who commented… Thanks! Glad to know I saved someone some trouble.

  10. Ghaouar Camij Toschian Says:

    i was able to install xemacs, but it does not have dired (C-x d) and many other features ( C-Home C-End should take you to beginning and end of file, but they are not working)

  11. Jaxon Says:

    You should not see xfree86

    First off let me say that your description is the clearest most concise one that I have found anywhere and for that I applaud you. :)

    Fink and XEmacs installed no problem together on my PowerBook, but on my G4 tower for some reason it’s been a real headache. I am getting the xfree86 dependancies you mentioned in step 8.

    1. # Check those packages. You should not see xfree86,
      xfree86-base, etc. If you do, something is amiss. If you see
      dlcompat, make a note of it.

    Does anyone know how to fix what “is amiss”?

  12. Jaxon Says:

    Fix: You should not see xfree86

    I just had to reinstall the Apple X11 SDK. ;)

  13. Jason Says:

    When in doubt…

    Good point Jaxon. It seems with most of the X11 stuff under Fink+OSX10.3, when in doubt, try reinstalling the Apple X11 SDK (See step 3 above).

  14. Anthony Gallagher Says:

    I got XEmacs installed and working OK, but for the life of me I can’t get it to print!
    Has anybodygot the darned thing printing?

  15. Anthony Gallagher Says:

    I got XEmacs installed and working OK, but for the life of me I can’t get it to print!
    Has anybodygot the darned thing printing?

  16. Lynn Says:

    even that it does not work apparently

    I did all points of your explaination but after all I got exactly the same problem :fink want still install xfree86 xfree86-shlibs even if I am using this terminal!
    So after 5 times of redoing what you explained, I come to you to have some other help!

  17. Lynn Says:

    even that it does not work apparently

    I did all points of your explaination but after all I got exactly the same problem :fink want still install xfree86 xfree86-shlibs even if I am using this terminal!
    So after 5 times of redoing what you explained, I come to you to have some other help!

  18. Jason Says:

    Additional Help

    Lynn,

    If Fink is still not recognizing you have X11 installed, then you’ve probably either missed installing X11 or the X11 SDK. Check that you have the X11 icon in Applications/Utilities, and that you can launch X11 and get an xterm window. If this works, try installing the X11 SDK directly from CD3 of the Panther install set. Load the CD, view it in Finder, and find the X11 SDK package.

    You might also consider starting from scratch with Fink, by removing your /sw directory tree and reinstalling. Be sure to use fink 0.62, and not 0.61. Hope this helps.

  19. aram c Says:

    xemacs-sumo-pkg instead of xemacs

    For the person missing “dired” or anyone wanting more than vanilla xemacs . I used the xemacs-sumo-pkg instead of just plain xemacs. Get a big fat emacs with almost everything (whats xemacs without tetris I ask you??)

    I can’t run xemacs from the terminal window though just the xwindows xterm..

  20. Jason Says:

    Thanks aram… I haven’t reinstalled xemacs since I rebuilt my Powerbook. I think I’ll give the sumo package a try. I’ll try to remember to blog an entry about it once i do.

  21. Dave Says:

    Same deal

    I have been having this same problem from my G5 control console at work. Oddly enough I had already done the emacs installation on my brand new shiny Al-book, and had absolutely no problem. I will try reinstalling the SDK (althoough I had installed it already) to see if this fixes things. There must be an order of event issue here. P.S. I found your page on Google

  22. Zeromus Says:

    NEdit

    I know its kinda off topic, but I am having heaps of trouble getting NEdit working. Your walkthrough has solved 90% of those problems, but I still can’t launch it. From Terminal, if I type ‘nedit’ I am told ‘NEdit: Can’t open display’. This seems OK to me, at least its installed and working. But when I goto X11.app, and type nedit in its xterm, I get ‘bash: nedit: command not found’. I’m both a Mac and Linux n00b, so I have that against me. The only other piece of information that I can give you is that ‘echo $PATH’ in Terminal and X11 xterm is different. Terminal has the usual, plus ‘sw/bin:sw/sbin’ and X11 xterm has the usual plus ‘/Users/Zeromus/’. I think this may have something to do with something ;). Any help would be greatly appreciated. Cheers.

  23. Zeromus Says:

    NEdit update

    Haven’t solved the problem, but found a work around. If anybody is interested: In X11 >> Applications Menu >> Customise… I duplicated ‘Terminal’ and changed ‘xterm’ to ‘xterm -e bash -l’ for the new one. The new one uses the Terminal.app’s path and bash, and hence its $PATH. Its not a ‘clean’ fix like I would have liked, but good enough. PS) I also googled you, and now am slaming your RSS. Great site, Thanks heaps!

  24. Jason Says:

    Paths

    Zeromus-

    You’re on the right track… you have a path problem. I’m using tcsh as my default shell instead of bash, so my setup is slightly different. If you are using bash, look in you home directory for a file called .bashrc – this is your “bash resource” file (setings). It gets run whenever a new bash is launched. In it you should see something like “source /sw/bin/init.sh”. This is added by fink setup. It tells bash to process the contents of /sw/bin/init.sh – and that file adds /sw/bin and /sw/sbin to your path. (Under tcsh, your init file is .tcsh or .csh, and the line should be “source /sw/bin/init.csh”)

    If you had to modify your X setup to force xterm to launch bash, that sounds like your problem. Assuming xterm was launching a tcsh, and you don’t have a .tcsh or .csh with the right source line, your path won’t be modified for the xterm session. The thing is, I’m not sure why xterm wouldn’t launch bash… I think it’s supposed to use your default command shell (in other words, the same one terminal uses). Since I use tcsh as my default shell, I can’t really test this.

    There’s another possibility, now that I think about it. In your modified xterm command, I see you are invoking bash using “bash -l”. This means you are telling bash to startup as a login shell; this means that it processes different startup files, including (if they exist)… /etc/profile (always run if found); and the first one of the follwing that is found: ~/.bash_profile, ~/.bash_login, ~/.profile. I don’t think that .bashrc is processed. I’m not sure which way terminal or xterm invoke bash; but it seems possible that Terminal invokes it as a login shell by default, and xterm doesn’t. In fact, i just checked my /etc/profile, and I see that fink added a line to manipulate my path directly (instead of running /sw/bin/init.sh).

    So, try this. See if your home directory contains a .bashrc. If not, create one. Add this line to it: “source /sw/bin/init.sh”. (If it exists and has that line already, then I’m stumped, refer to earlier comments). Now restart X and see if the default xterm has the modified path.

  25. nathan Says:

    remove all, start over, and it works!

    Jason’s suggestion was right on the money. If you installed fink, then installed the X11SDK, and fink is still complaining after all of the above suggestions, try removing fink by rm’ing your /sw directory, then following the directions originally posted on this page. It worked for me!

    p.s. — thank you to everyone who’s contributed to this writeup… I was ready to give up on getting xemacs running on Panther when I found this writeup.

  26. Zeromus Says:

    Thanks

    Thanks guys! I have fiddled round with my .profile and .bashrc files, now everything is going sweet.

  27. Phil Says:

    Is it safe to install xemacs via fink if you already have carbon emacs (enhanced) installed ?
    I have no exprerience with xemacs but I remember that there was some sort of problem with the .emacs file; customization changes done for xemacs affect emacs and vice versa.
    Would installing xemacs screw up my existing emacs install ?

  28. Jason Says:

    Emacs v. xemacs

    Phil,

    From a binaries-and-libraries point of view, installing xemacs via fink should not upset your existing emacs install, because all fink installs go into the /sw tree. For your .emacs files, I don’t have any experience there, but this link (http://www.xemacs.org/Documentation/21.5/html/xemacs_30.html#SEC387) to the xemacs docs says that xemacs will try to load .xemacs/init.el before trying to load .emacs, and will only load the first one it finds. So, If you want to keep separate startup files for emacs and xemacs, create a .xemacs/init.el file; this should prevent xemacs from viewing or altering your .emacs. Regular emacs should not look for this file.

    Hope this helps, but please not the use of the word *should* above; standard disclaimers apply. YMMV.

  29. Phil Says:

    Thanks.

    Here are some more questions :

    -How does this xemacs version compare to the carbon version ?
    Which one is better for Mac OSX ?

    • what I would like to know is : what is the advantage of using xemacs instaed of emacs ? I mean, are there any spectacular things xemacs can do but emacs cannot ?
      I might be interested in xemacs if it can be made pseudo-transparent. Is that possible ? If anyone who reads this knows how to make emacs transparent, please let me know !
      (
      Actually, I discovered a web page

    http://mail.gnu.org/archive/html/emacs-devel/2004-02/msg00245.html

    where some solution to this is mentioned. The solution is to apply two ”patches” to emacs –
    how do you do this ? I know this may not be the right place to ask this question ..
    If anyone knows how to apply patches to emacs under osx, or how to make emacs
    pseduo-transparent, let me know. I have been searching the web for some time and haven’t been able to find an answer to these questions. The one way to make emacs transparent is to use a transparent terminal like aterm which I installed using fink but which shows a black background instead of being transparent. One could use mac osx ‘s own terminal and make it transparent but I don’t like the result much. There are also some issues with the meta key. Anyway, if anyone reading this know how to make emacs transparent ( and if that’s not possible, is it possible with xemacs ? ) please let me know.
    )

    Thanks.

  30. Otto Says:

    Now my innocuous ‘fink install xmms’ doesn’t spend 90 minutes compiling X Windows =)

    Thanks much for the tip!

  31. Ryan Says:

    Dale Durran Says: August 20th, 2006 at 12:00 am

    … I also installed ispell and am having trouble getting Xemacs to find the package when clicking on the “Spell” button. Do you have any ideas on this. Thanks again.

    Here I how I get around the problem (for windows):
    1) Get a copy of aspell for windows, e.g. go to
    http://aspell.net/win32/

    you need to run the installer and install whatever dictionaries you want.

    2) Customize XEmacs by choosing
    Options>Advanced (customize)>Emacs>Applications>Ispell

    3) In the manuel find “Program Name:”

    4) Change the value to wherever your aspell.exe is located. For example, mine is

    C:\Program Files\Aspell\bin\aspell.exe

    Don’t forget to set and save your setting.

    It should work now.