Go Back   The macosxhints Forums > OS X Help Requests > UNIX - X11



Reply
 
Thread Tools Rate Thread Display Modes
Old 01-12-2003, 11:52 AM   #61
sao
Moderator
 
Join Date: Jan 2002
Location: Singapore
Posts: 4,237
maclaxguy,

Why don't you use the Applications menu...'Customize'

Glanz posted in page 1 of this same thread:

"If you want to add applications to the "Applications" menu on the top bar when running Apple X11, click "customize", then "add item". You will see two columns, one for "name" and one for "command". You must double click in the space reserved for "name" to open a cursor in the name field, likewise for "command". The only ones for which you do not have to write the full path are the inherent X11 apps such as xterm, rxvt, xedplus, xedit, etc. The others require full paths, for example "/sw/bin/eterm -e pine", "/sw/bin/nedit", "xterm -e /sw/bin/mc", "/sw/bin/galeon", etc, etc."


Cheers...

Last edited by sao; 01-12-2003 at 08:34 PM.
sao is offline   Reply With Quote
Old 01-12-2003, 08:47 PM   #62
sao
Moderator
 
Join Date: Jan 2002
Location: Singapore
Posts: 4,237
maclaxguy,

This FAQ explains quite clearly the problem:

--------------------

Q: Why can I launch let's say gimp from the apple's x11 terminal withouth giving the direct path, but not from the Application menu after starting X11 by double clicking?

A: When you use the Applications menu, the PATH and the other environment variables are the ones X11.app has inherited. If you start it by clicking on the icon, you have the absolute minimum set of environment variables. You can test this by creating a simple script containing only one line

printenv > /tmp/printenv.log

and then running this from the Applications menu. The PATH, for example, is

/usr/bin:/bin:/usr/sbin:/sbin:/Users/you:/usr/X11R6/bin

It will not find gimp in this PATH, I suppose.

Apple's X11 Terminal, OTOH, if called by its default 'xterm' command, reads some of your shell startup scripts,

namely ~/.cshrc or ~/.tcshrc

if you are with the default tcsh. If you set some PATH there, it will be known inside the X11 Terminal.

So if you have, as Fink recommends,

"source /sw/bin/init.csh"

inside ~/.cshrc or ~/.tcshrc, you will have a full PATH there and gimp will be found.

If you set your shell up differently, for example with the old clean pre-Jaguar setup in

~/Library/init/tcsh {path,environment.mine,etc},

it will not be read by the xterm from the Applications menu. This is what was bothering me and others.

You can, however, have it read *all* your shell startup scripts if you declare it to be a "login shell", that is, instead of the simple command
"xterm", you call it as "xterm -ls" (change it via "Customize...").

Then you have all your environment variables available.

---------------------

Cheers...
sao is offline   Reply With Quote
Old 01-12-2003, 09:11 PM   #63
Glanz
Major Leaguer
 
Join Date: Aug 2002
Location: Montreal
Posts: 373
Quote:
Originally posted by sao
maclaxguy,

This FAQ explains quite clearly the problem:

--------------------

Then you have all your environment variables available.
[somewhere over the rainbow.....]
---------------------

Cheers...

Great summary Sao. Now I have some great news. Some Russian friends have created a really good mail client called "StupHead" (evidently they did it just for me)... It is on the Fink Lists unstable.

Stuphead complains on first run that the command "ispell -a -drussian" cannot be run. All you have to do is to change the Russian to English by going to the "Other" tab (the last one in the setup config interface) and change that to 'ispell -a denglish'... Then you're set. I mention this because this application has a newsreader better than the one in Evolution, and for speed in everything, it's got Kmail and related apps really beat.
Now because of the name of the app, every time you use it you'll think of your friend in coooold snowy, icy Montreal, Quebec, Canada..... Looking out of his window at McGill University.

http://stuphead.asplinux.ru/stuphead/

Stuphead includes following features:

* Full character encondings support, based on iconv library
* Full NNTP support, including NNTP authorization
* SMTP authorization support
* Optional compiled-in support for viewing image and html attachments (via CscHTML or Mozilla widgets)
* On the fly spell checking

Stuphead is small and fast graphical e-mail client based on GTK+ library. The project was born as a fork from Sylpheed MUA by Hiroyuki Yamamoto.

Last edited by Glanz; 01-12-2003 at 09:26 PM.
Glanz is offline   Reply With Quote
Old 01-12-2003, 09:32 PM   #64
sao
Moderator
 
Join Date: Jan 2002
Location: Singapore
Posts: 4,237
Glanz,

Thanks for your tip. I'm already installing Stuphead. Will test and let you know.

Cheers...
sao is offline   Reply With Quote
Old 01-13-2003, 08:45 AM   #65
bluehz
MVP
 
Join Date: Jan 2002
Posts: 1,562
sao - my problem with paths is exactly what you describe - I use the pre-Jaguar method setup. My Terminal command in the X11>Application menu reads:

Code:
xterm -j -rightbar -sb -sl 1000 -bg black -fg green -geometry 80x35+584+20 &
(should look familiar - you told me about that one)

When I first launch Apple-X11 and the default xterm appears - if I check the $PATH I get:

Code:
/sw/bin:/sw/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/me:/usr/X11R6/bin:/usr/X11R6/bin
but if I then use the Application menu to open a new xterm (using the command line above) and check the $PATH - I get this:

Code:
/usr/bin:/bin:/usr/sbin:/sbin:/Users/me:/usr/X11R6/bin
What am I doing wrong here?
bluehz is offline   Reply With Quote
Old 01-13-2003, 10:23 AM   #66
sao
Moderator
 
Join Date: Jan 2002
Location: Singapore
Posts: 4,237
bluehz,

It seems that environment variables, and specifically PATH set in ~/.xinitrc don't seem to get inherited by apps started by the Application menu in quartz-wm.

I don't know exactly how to solve this except by doing as it says in the FAQ above:

<<You can, however, have it read *all* your shell startup scripts if you declare it to be a "login shell", that is, instead of the simple command "xterm", you call it as "xterm -ls" (change it via "Customize...").>>

I found another post with a possible solution, but I haven't tried it myself, and not sure it works:

<<I assume that they're not child processes of the wm, so I've added the fink path(s) to ~/.MacOSX/environment.plist which solves the problem.>>

If anyone wants to go further with this method, you can check the following info at the ADC:

http://developer.apple.com/qa/qa2001/qa1067.html


Cheers...

Last edited by sao; 01-13-2003 at 01:04 PM.
sao is offline   Reply With Quote
Old 01-13-2003, 10:40 AM   #67
WillyT
Major Leaguer
 
Join Date: Jan 2002
Location: Midwest Not quite Normal
Posts: 416
Add PATH to Applications commands.

Neato. Some of my fink stuff will run if I add a PATH environmental variable to the command.
Code:
T.E.G.        PATH=/sw/bin:/sw/sbin:$PATH tegclient
This passes the new PATH variable to the shell which executes the command.
Now tegclient is able to start the tegserver and launch tegrobot(s)

Now if I could figure out how to get python working with tcltk from the menu, I wouldn't need xterm as much.

HTH
Willy
WillyT is offline   Reply With Quote
Old 01-16-2003, 09:18 AM   #68
bluehz
MVP
 
Join Date: Jan 2002
Posts: 1,562
The command is actually:

'fink install applesystemfonts'

with an 's' on the end. Also - before running this command you might want to check out info about this at Fink especially noting the warning. It is a minor issue regarding the size of this install and how it relates to the fonts you have installed in your system but it may have adverse impact on some users.

Quote:
Originally posted by sao
More tips for Apple X11:

1- If you want more choices with fonts in Apple X11:

'fink install applesystemfont'

bluehz is offline   Reply With Quote
Old 01-16-2003, 09:45 AM   #69
sao
Moderator
 
Join Date: Jan 2002
Location: Singapore
Posts: 4,237
bluehz,

Nice catch! Thanks.

The package name was getting chopped off because of the width of my terminal. I corrected now:
Code:
i   applesystemfonts       1.0-1            Make Apple system fonts available to X11R6

So, everybody:

just type "fink use applesystemfonts"

with a trailing "s". Or, you can also use FinkCommander!

Code:
 This package will extract the TrueType fonts from your
 Apple System and Library directories and make them
 available to X11R6.


 Warning: This package can get *VERY* large depending on
 how many fonts you have in your system.  TrueType fonts
 will get symlinked, so they won't take much space, but any
 dfont files in the /Library or /System/Library directories
 will get converted to TrueType and copied to your fink
 tree.

Cheers...

Last edited by sao; 01-16-2003 at 09:47 AM.
sao is offline   Reply With Quote
Old 01-16-2003, 10:02 AM   #70
Glanz
Major Leaguer
 
Join Date: Aug 2002
Location: Montreal
Posts: 373
Quote:
Originally posted by sao
bluehz,

It seems that environment variables, and specifically PATH set in ~/.xinitrc don't seem to get inherited by apps started by the Application menu in quartz-wm.

Cheers...

I solved a lot of this by simply executing apps via literal paths in menu systems, yet there are still probs with apps in /sw referring to libraries in /sw on which they depend. This is not general however so it isn't a really big deal.
Glanz is offline   Reply With Quote
Old 01-16-2003, 10:16 AM   #71
bluehz
MVP
 
Join Date: Jan 2002
Posts: 1,562
Yes - the libraries that are in your normal path are the things that are causing me minor problems. This is what I was referring to in my query about syncing the normal path variable between Mac and X11. I guess it might be easier if I used a .cshrc or .tcshrc but I prefer the old-style inits and really don't want to change.
bluehz is offline   Reply With Quote
Old 01-16-2003, 10:23 AM   #72
bluehz
MVP
 
Join Date: Jan 2002
Posts: 1,562
I noticed at the end of the applesystemfonts install it noted:

Setting up applesystemfonts (1.0-1) ...
All done. You may need to restart X to get antialiased fonts
in some applications.

I have restarted X - but I am not really seeing any difference in xterm even after using xfontsel to activate a font. Is there something else need be done - or is xterm out of the question. Antialiased fonts would be really nice in X11.
bluehz is offline   Reply With Quote
Old 01-16-2003, 10:31 AM   #73
Glanz
Major Leaguer
 
Join Date: Aug 2002
Location: Montreal
Posts: 373
Quote:
Originally posted by bluehz
I noticed at the end of the applesystemfonts install it noted:

Setting up applesystemfonts (1.0-1) ...
All done. You may need to restart X to get antialiased fonts
in some applications.

I have restarted X - but I am not really seeing any difference in xterm even after using xfontsel to activate a font. Is there something else need be done - or is xterm out of the question. Antialiased fonts would be really nice in X11.

I had the same experience in both XDarwin and Apple X11. Nothing changed, nothing improved, and fonts weren't even listed.... and I couldn't figure out how to "activate" or use that so I just did a "fink remove applesystemfonts"....... Nothing changed. Back to normal.

In fact, the only things that changed after I installed "applesystemfonts" were endless and hopelessly esoteric warning messages in Console concerning keyboards and rendering. After uninstalling, I get no more warnings or hesitations that cause system slowdown.

Last edited by Glanz; 01-16-2003 at 10:37 AM.
Glanz is offline   Reply With Quote
Old 01-16-2003, 10:43 AM   #74
bluehz
MVP
 
Join Date: Jan 2002
Posts: 1,562
Hmmm ... I am actually seeing the fonts available in xfontsel - but choosing them seems to have no effect. I am not seeing any errors in the console relating to fonts, although I am seeing these errors in the console:
Code:
NFS Portmap: RPC: Port mapper failure - RPC: Timed out

NFS Portmap: RPC: Port mapper failure - RPC: Timed out

NFS Portmap: RPC: Port mapper failure - RPC: Timed out
Not sure if those were there previously or not. I don't remember seeing them.
bluehz is offline   Reply With Quote
Old 01-16-2003, 11:12 AM   #75
Glanz
Major Leaguer
 
Join Date: Aug 2002
Location: Montreal
Posts: 373
Quote:
Originally posted by bluehz

Not sure if those were there previously or not. I don't remember seeing them.

I had all kinds of errors listed as a direct result of installing those fonts. None of them had to do with fonts either. I know the errors were caused by applesystemfonts because after the "remove" command, they no longer appeared. BTW, you may "remove" and reinstall later. The "remove" command only uninstalls the file, then stores it. So if you decide to reinstall, you won't have a download to do. The alisases for "remove" are: disable, deactivate, unuse, delete, and purge.
Glanz is offline   Reply With Quote
Old 01-16-2003, 01:11 PM   #76
sao
Moderator
 
Join Date: Jan 2002
Location: Singapore
Posts: 4,237
bluehz,

With XDarwin:

I add these lines to my ~/.xinitrc file before I call the window manager:

xfontpath install /sw/lib/X11/fonts/applettf/

xfontpath enable

to pick up more fonts.

You can check all the fonts available in:

/sw/lib/X11/fonts/applettf/

or

sw/var/lib/dpkg/info/applesystemfonts.list


With Apple X11, although I read a tip at Apple x11-users list, of someone who recommend to install them, I'm not sure you can use them. I suspect now that Apple's X11 might do it's own font handling.


Cheers...

Last edited by sao; 01-16-2003 at 01:50 PM.
sao is offline   Reply With Quote
Old 01-16-2003, 01:31 PM   #77
sao
Moderator
 
Join Date: Jan 2002
Location: Singapore
Posts: 4,237
Quote:
homer wrote:
What about this command, to which you referred in the FAQ:

xset fp+ /usr/X11R6/lib/X11/fonts/TTF

It should work with no problem.

From man xset: xset - user preference utility for X
Code:
+fp or fp+
               This  +fp  and  fp+  options  prepend  and append elements to the current font path,
               respectively.  They must be followed by a comma-separated list of entries.
Cheers...

Last edited by sao; 01-16-2003 at 01:52 PM.
sao is offline   Reply With Quote
Old 01-16-2003, 01:39 PM   #78
homer
Prospect
 
Join Date: Sep 2002
Location: Madison, WI
Posts: 23
Okay, I think I was getting confused about something else. Thanks for the info.
homer is offline   Reply With Quote
Old 01-16-2003, 02:06 PM   #79
Glanz
Major Leaguer
 
Join Date: Aug 2002
Location: Montreal
Posts: 373
This in one of the fifty error messages I get because of those apple fonts.
xfontpath: directory `/sw/lib/X11/fonts//sw/lib/X11/fonts/applettf/' not found
xfontpath: can't open `/sw/etc/xfontpath.conf.new'
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Error: Can't find file "unknown" for geometry include
> Exiting
> Abandoning geometry file "(null)"
Errors from xkbcomp are not fatal to the X server
Glanz is offline   Reply With Quote
Old 01-17-2003, 08:03 AM   #80
sao
Moderator
 
Join Date: Jan 2002
Location: Singapore
Posts: 4,237
Glanz,

I can confirm that. I'm getting the same errors in Apple X11.

With xfontsel I get this list of fonts:
Code:
american typewriter
apple casual
baskerville
charter
clean
clearlyu
clearlyu alternate glyphs
clearlyu arabic extra
clearlyu devangari extra
clearlyu ligature
clearlyu pua
courier
cursor
fansong ti
fixed
gill sans
gothic
helvetica
herculanum
lucida
lucida bright
lucida sans
lucida sans typewriter
lucidabright
lucidatypewriter
luxi mono
luxi sans
luxi serif
mincho
new century schoolbook
newspaper
nil
open look cursor
open look glyph
song ti
terminal
times
utopia
zapf dingbats
Do you get approximately the same list?

Cheers...
sao is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT -5. The time now is 05:35 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.