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



Closed Thread
 
Thread Tools Rate Thread Display Modes
Old 11-10-2003, 09:58 AM   #1
sao
Moderator
 
Join Date: Jan 2002
Location: Singapore
Posts: 4,233
97- Using Apple's X11 1.0 "Applications" menu in Panther

If you launch a process fron the Apple's X11 "Applications" menu in Panther and your Applications commands are explicitly sent to the background via '&', the process is launched and it maximizes cpu usage that can only be killed with a -9 option. Remove the '&' and this may fix the problem. In x11 v1.0, the applications are backgrounded and there is no need for the '&'.
sao is offline  
Old 11-11-2003, 03:05 AM   #2
sao
Moderator
 
Join Date: Jan 2002
Location: Singapore
Posts: 4,233
98- The startx script in Apple's X11 for Panther

The startx script in Apple's X11 for Panther is broken. It does not work if you try to use it from a tcsh command line. In bash, it works. From a post by Martin Costabel to the fink-beginners list:
Quote:
The common reason for these problems is that the build system for
xfree86 (also used by Apple) creates scripts like startx (or xmkmf, or
all the man pages) using the C preprocessor. This preprocessor should
among other things replace all occurrences of "XCOMM" by the comment
sign "#".

Now cpp on Panther is broken. It writes a line "#pragma GCC
set_debug_pwd..." into its output, and this line is found as a first
line of startx and about 800 other text files in Apple's /usr/X11R6.
Just try "man X" with Apple's X11 installed. I am curious how long it
will take Apple to fix it. My guess is in the order of 1 year.

For the Fink xfree86 package, the maintainers tried to replace the call
to the buggy "cpp" by a supposedly working "cpp3", but apparently this
doesn't work correctly either, as witnessed by the remaining unreplaced
"XCOMM"s.

Code:
 % man X

#pragma            GCC            set_debug_pwd            "/pri-
X(7)                                XFree86                               X(7)

vate/var/tmp/X11/X11-0.30.obj~2/xc/doc/man/general"

NAME
       X - a portable, network-transparent window system
To make it work you can either remove the first line from the "startx script" or run it as "sh startx".

'more /usr/X11R6/bin/startx' gives:
Code:
#pragma GCC set_debug_pwd "/private/var/tmp/X11/X11-0.30.obj~2/xc/programs/xinit"
#!/bin/sh

# $Xorg: startx.cpp,v 1.3 2000/08/17 19:54:29 cpqbld Exp $
#
# This is just a sample implementation of a slightly less primitive
# interface than xinit.  It looks for user .xinitrc and .xserverrc
# files, then system xinitrc and xserverrc files, else lets xinit choose
# its default.  The system xinitrc should probably do things like check
# for .Xresources files and merge them in, startup up a window manager,
# and pop a clock and serveral xterms.
#
# Site administrators are STRONGLY urged to write nicer versions.

etc.etc.etc.
"The effect on a shell script like startx is that the line #!/bin/sh that defines the shell under which this is to run, is not seen, because it works only when it is the first line. So when you run this script from your tcsh command line, it tries to execute everything in tcsh which fails, because the syntax is made for sh".

Last edited by sao; 11-11-2003 at 11:54 AM.
sao is offline  
Old 11-12-2003, 08:56 AM   #3
sao
Moderator
 
Join Date: Jan 2002
Location: Singapore
Posts: 4,233
99- Problem with the "kde binaries" on panther

The only problem with the "kde binaries" on panther is that after installing them, you need to do:

fink remove qt3

fink install qt3

to fix qt3's linking against freetype libraries, and then it will work.
sao is offline  
Old 11-12-2003, 09:19 AM   #4
sao
Moderator
 
Join Date: Jan 2002
Location: Singapore
Posts: 4,233
100- Double-click apps — Launch X11 applications directly in the Finder

(Exchange by Ernest Prabhakar and Torrey T. Lyons at the x11-users list)

-----------------------
Post by Ernest Prabhakar:

This is a feature of Launch Services in Panther. It works with any UNIX binary. The process is:

a) When Finder is trying to associate an icon with a file, it checks if (i) it has the execute bit set, plus (ii) it does not already have an extension. If both are true, it tags it as a UNIX executable.

b) When you actually double-click the file, it sniffs the binary to see if it links against X11. If so, it assigns the virtual extension '.x11app'; otherwise, it assigns it as type '.command'.

c) Based on that extension (which you could also assign manually), Launch Services searches for the appropriate application.

d) Apple's X11.app claims the .x11app extension, and thus it treats X11 binaries as one of its documents. Other X11 GUIs could also claim that extension, and handle binaries similarly. You can change the default application by using Get Info on a file with that explicit extension.

Hope this helps. I believe this is also explained in the UNIX Tech Brief for Panther.


-----------------------
Posted by Torrey T. Lyons:

Unfortunately, this does not work in practice. Here are some of the problems you run into:

1. Everything in /usr/X11R6/bin and most other places you are likely to find X11 binaries will be in a directory owned by root. You can't use "Get Info" to change the default application in a directory owned by root.

2. If you have OroborOSX installed, the popup menu for "Open with:" will show OroborOSX and only OroborOSX. X11.app or XDarwin do not even appear. Of course, you can't actually select OroborOSX because of #1, but its an interesting glitch. I believe the problem is that OroborOSX has decided it is important enough to be an "Editor" of X11 executables rather then just a "Viewer", which X11.app and XDarwin register as.

3. Because X11.app lists itself as "LSIsAppleDefaultForType" and the "Open with" preference is unchangeable, you always get X11.app if it is installed on your system.

4. One thing that works reliably is that you can drag an executable onto the icon of your X server of choice.

This new idea of treating binaries as documents is very cool. However, for it to be useful #1 has to be fixed.

-----------------------
Posted by Ernest Prabhakar:

I suppose that might be a problem, but I was actually talking about something quite different. In particular, I was talking about setting the default for -all- X11 binaries. To do that, you need to change a file that has an -explicit- extension of '.x11app'. Since UNIX binaries can implicitly be either Terminal or X11 binaries, Launch Services won't know which until after it is double-clicked, so that information can't be used in Get Info.

Since nobody (currently) ships binaries with an explicit extension, I believe you need to do something like the following:

1. Create a simple file which ends in '.x11app'

$ touch foo.x11app

2. Open that with Get Info in the Finder

$ open .
Command-I or Control-Click

3. Select the application

4. Set that as default ("Always open" or 'Change All").

That should make every X11 binary run with the launcher of your choice. Perhaps a little convoluted, but that's the price we pay for stretching the paradigm.

-------------------------
sao is offline  
Old 11-17-2003, 06:20 AM   #5
sao
Moderator
 
Join Date: Jan 2002
Location: Singapore
Posts: 4,233
101- Matlab - license manager doesn't start at startup

(Thanks to Mike Coleman)

"Installed the Matlab for Panther. Of course it doesn't work. It all went on fine. However, the license manager doesn't start at start up - and if you try ./lmstart in the right /Applications/MATLAB6p5p1/etc directory it won't start - Attempting to start gives a -15 error, the fixes on the Mathworks site are for 10.1 and 10.2 for this problem. They don't work".

You can clear it by running in terminal.app:

sudo rm -f /var/tmp/lm_TMW.*
sao is offline  
Old 11-17-2003, 07:37 AM   #6
sao
Moderator
 
Join Date: Jan 2002
Location: Singapore
Posts: 4,233
102- Apple's X11 Customization

Run "man quartz-wm" and "man Xquartz" to get a list of all the defaults-based options.

From man Xquartz:
Code:
CUSTOMIZATION
       Xquartz can also be  customized  using  the  defaults(1)  command.  The
       available options are:

       defaults write com.apple.x11 enable_fake_buttons -boolean true
               Equivalent to the -fakebuttons command line option.

       defaults write com.apple.x11 fake_button2 modifiers
               Equivalent to the -fakemouse2 option.

       defaults write com.apple.x11 fake_button3 modifiers
               Equivalent to the -fakemouse3 option.

       defaults write com.apple.x11 swap_alt_**** -boolean true
               Equivalent to the -swapAltMeta option.

       defaults write com.apple.x11 keymap_file filename
               Equivalent to the -keymap option.

       defaults write com.apple.x11 no_quit_alert -boolean true
               Disables  the  alert  dialog  displayed when attempting to quit
               X11.

       defaults write com.apple.x11 no_auth -boolean true
               Stops the X server requiring that  clients  authenticate  them-
               selves when connecting. See Xsecurity(7).

       defaults write com.apple.x11 nolisten_tcp -boolean true
               Prevents the X server accepting remote connections.

       defaults write com.apple.x11 xinit_kills_server -boolean false
               Stops  the X server exiting when the xinitrc script terminates.

       defaults write com.apple.x11 fullscreen_hotkeys -boolean false
               Allows system hotkeys to be handled  while  in  X11  fullscreen
               mode.

       defaults write com.apple.x11 enable_system_beep -boolean false
               Don't use the standard system beep effect for X11 alerts.

       defaults write com.apple.x11 enable_key_equivalents -boolean false
               Disable   menu  keyboard  equivalents  while  X11  windows  are
               focused.

       defaults write com.apple.x11 depth depth
               Equivalent to the -depth option.

From man quartz-wm:
Code:
CUSTOMIZATION
       quartz-wm can be customized using the defaults(1) command.  The  avail-
       able options are:

       defaults write com.apple.x11 wm_ffm -bool true
               Enables  focus-follows-mouse  mode.  Windows belonging to the X
               server may then be focused by moving the pointer over them,  as
               well as the default mode of clicking in them.

       defaults write com.apple.x11 wm_click_through -bool true
               Disables  the  default behavior of swallowing window-activating
               mouse events.

Last edited by sao; 10-05-2005 at 06:16 AM.
sao is offline  
Old 11-17-2003, 10:25 AM   #7
sao
Moderator
 
Join Date: Jan 2002
Location: Singapore
Posts: 4,233
103- Apple X11 Beta 3 alternatives

The following info was posted by Torrey T. Lyons (XFree86.org) at the x11-users list:
Quote:
In the discussion of the Apple X11 Beta 3, there was some confusion about the available X11 options for Jaguar. To clarify, Apple's X11 1.0 is based on XFree86 4.3.0. (Beta 3 was based on the earlier XFree86 4.2.1, which is now over a year old.) There are several easy-to-use and free installers for XFree86 4.3.0 on Jaguar available from:


Fink: http://fink.sourceforge.net
XonX: http://sourceforge.net/projects/xonx

In particular, a standalone, pre-compiled binary of XFree86 4.3.0 for Jaguar, with a GUI installer based on InstallAnywhere, is available for free download at:

http://prdownloads.sourceforge.net/x...0.dmg?download

Apple's X11 does include improvements in two areas over XFree86 4.3.0, which represent real work by Apple engineers:

1. The proprietary quartz-wm offers good integration with Aqua. For Jaguar a similar solution is available with the OroborOSX window manager. <http://oroborosx.sourceforge.net/>

2. Apple's X server is faster then XFree86 4.3.0. XFree86 4.4.0 will be released at the end of this year and will contain the performance improvements from Apple's X11. Apple should be commended for making these available to the open source community rather then just leaving Jaguar with an unsupported beta. On Jaguar XFree86 4.4.0 will be faster then 4.3.0, and on Panther XFree86 4.4.0 will have identical performance to Apple's X11.

--Torrey

sao is offline  
Old 11-17-2003, 10:32 AM   #8
sao
Moderator
 
Join Date: Jan 2002
Location: Singapore
Posts: 4,233
104- X11 1.0 for Panther

The following info was posted by Ernest Prabhakar (Product Manager, UNIX & Open Source) at the x11-users list:
Quote:
Dear X11 Users,

We are pleased to announce that X11 1.0, the GM version, is available as part of Mac OS X v10.3 "Panther."

http://www.apple.com/macosx/features/x11/

This marks a major milestone for Apple. Not only is X11 1.0 a complete, highly-optimized implementation of the X Window System R6.6 specification, plus the Aqua-compatible quartz-wm window manager, it is bundled in the box as an optional install for Mac OS X. It is also available as a free download for Panther Server customers, or customers who purchase Macs pre-installed with Panther:


http://www.apple.com/macosx/features/x11/download/
Note: This version requires Mac OS X v10.3 "Panther" or later

X11 1.0 includes a range of new features, including Finder integration for double-clickable applications, support for full-screen mode, and an improved Applications menu. It is one of the 150+ new features available in Panther <http://www.apple.com/macosx>, including added UNIX functionality such as NFS performance improvements, updated scripting languages and command-line utilities, and additional POSIX and Linux APIs.

The release of X11 1.0 marks the end of our highly-successful beta process. We would like to express our appreciation for all of you who helped us by participating in the X11 for Mac OS X beta process. We made a wide range of improvements to the product based on your feedback, the bulk of which have been released as Open Source <http://developer.apple.com/darwin/pr...X11/index.html> and will become part of XFree86 4.4. Please observe the terms of the beta license agreement and do not redistribute private copies of that beta.

I hope this information is helpful to you, and I apologize for not getting it out sooner. Feel free to forward this to other people who might be interested in X11 1.0. If you have any questions or comments, please email me directly.


Sincerely,
Ernie Prabhakar
-----------
Ernest N. Prabhakar, Ph.D.
Product Manager, UNIX & Open Source
Mac OS X Product Marketing
(408) 974-3075 <ernest@apple.com>

sao is offline  
Old 11-17-2003, 03:56 PM   #9
sao
Moderator
 
Join Date: Jan 2002
Location: Singapore
Posts: 4,233
105- Display InsightII™ from SGI to Panther

(Thanks to Mengjuei Hsieh)

Now you can display InsightII™ from SGI to a Mac.

Please, read more at:

http://rayl0.bio.uci.edu/~mjhsieh/Li...i?entry_id=114


Screenshot:

http://rayl0.bio.uci.edu/~mjhsieh/sc...t/11032003.gif
sao is offline  
Old 12-02-2003, 04:21 AM   #10
sao
Moderator
 
Join Date: Jan 2002
Location: Singapore
Posts: 4,233
106- X11 Forwarding on MacOS X

Jerry Talkington wrote detailed instructions about X11 Forwarding on MacOS X on his web-site:

http://tinyurl.com/tbkf
sao is offline  
Old 12-03-2003, 10:20 AM   #11
sao
Moderator
 
Join Date: Jan 2002
Location: Singapore
Posts: 4,233
107- Sharing the Fink

(How to share software between more than one fink installation)

Thanks to Benjamin Reed (Fink Project Lead).

http://ranger.befunk.com/blog/



October 29, 2003
-------------------------------------------
Sharing the Fink

I was recently asked how to share software between more than one fink installation. This is usually because the person has 2 (or more) machines, only one of which is fast. =) It's pretty easy to share binaries you've built on one system with another. Here's how (keep in mind these instructions will generally only work if each system is running the same major version of Mac OS X):

1. Install Fink on the "master" (build) system.

2. (If the clients already have fink installed, you can skip this step.) Copy /sw to the "client" systems. First you must enable "Remote Login" on the "master" box. Then, run the following on each of the "client" machines:

sudo rsync -avzr -e ssh user@otherhost:/sw/ /sw/

Just replace user@otherhost above with the username and hostname of the system to copy from.

This will make a clone of the fink installation on your "master" box on each of the clients.

3. On the "master" box, build something, and then run "fink scanpackages". This will make fink generate apt indexes for all of your enabled trees.

4. On the "master" box, enable "Personal Web Sharing" in the Sharing section of System Preferences, and then set up httpd to expose your /sw/fink directory externally. I do so by making an /etc/httpd/users/fink.conf file that contains:
Code:
Alias /fink /sw/fink
<Directory /sw/fink>
  Options Indexes FollowSymLinks
</Directory>
..and then run "sudo /usr/sbin/apachectl graceful" to (re)start.

5. On the "client" box(es), edit /sw/etc/apt/sources.list, and add the lines representing your fink trees. For example, if my IP address of my build box at home is 192.168.42.7, the client would add:
Code:
deb http://192.168.42.7/fink stable main crypto
deb http://192.168.42.7/fink unstable main crypto
deb http://192.168.42.7/fink local main
6. On the "client" box(es), run "sudo apt-get update". If all goes well, you should see something like:
Code:
Hit http://192.168.42.7 stable/main Packages
Hit http://192.168.42.7 stable/main Release
Hit http://192.168.42.7 stable/crypto Packages
...and so on
7. You should then be able to do "sudo apt-get install <package>" for anything that's been built on the "master" box. Any time you build more stuff there, you will need to re-run "fink scanpackages" on the master, and "sudo apt-get update" on the client(s).

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

Last edited by sao; 12-03-2003 at 11:12 AM.
sao is offline  
Old 12-16-2003, 12:55 AM   #12
sao
Moderator
 
Join Date: Jan 2002
Location: Singapore
Posts: 4,233
108- Matlab and Apple's X11

Thanks to Martin Costabel (Fink Developer).

Quote:
There is a common misconception about Matlab requiring oroborOSX, which needs XDarwin. Matlab works very nicely with Apple's X11 (as far as this bloated <at> #?!# <at> is able to work nicely). There were basically two problems between Matlab and X11, both are solved, and you can find information about this even on the mathworks web site, for example at:

http://www.mathworks.com/support/sol...ta/36012.shtml

The first problem is one I never found important, because it does not appear if you start Matlab from the command line: The "LaunchMatlab" clickable starter has to be taught about Apple's X11 instead of OroborOSX. This is done by simply editing a text file and replacing names. Mathworks' PantherUpdater does this for you.

The second problem is a longstanding binary incompatibility between Matlab and xfree86-4.3 (which concerns Apple's X11 on Panther, because it is a variant of xfree86-4.3.0) because of libraries compiled with thread support. This is fixed, too, by the PantherUpdater.

The file to download is called MathWorks_Panther_Updater.dmg

sao is offline  
Old 12-18-2003, 12:37 PM   #13
sao
Moderator
 
Join Date: Jan 2002
Location: Singapore
Posts: 4,233
109- Fink, the X11SDK and the Apple Installer

Several people had to install the "X11SDK" twice until they got it recognized because sometimes the Apple installer forgets to install some files and needs a second run. Good news is that if you're 'only' installing binary packages, and you have fink-0.17.0 or later installed, system-xfree86 no longer requires the "X11SDK".

Anyhow, Martin Costabel has written a small script to compare the bom of an installed package with what is really on the disk. If you run it as "sh bomcheck X11SDK", it tells you whether the installation of that package is complete.

You can download the script from here:

bomcheck
sao is offline  
Old 02-25-2004, 10:21 AM   #14
sao
Moderator
 
Join Date: Jan 2002
Location: Singapore
Posts: 4,233
110- Using Xnest to run X11 sessions in a window

Thanks to Detrius.

Hint posted at the MacOS X Hints web site.

If you follow this hint you will be able to run Apple's X11 in rootless mode as well as KDE or GNOME (or both) in Xnest sessions in rooted mode windows.

I tried the hint in the following way:

1- Wrote a ~/.xinitrc file with:
Code:
source /sw/bin/init.sh
exec quartz-wm
2- Then created a .xinitrc.fluxbox file for fluxbox:
Code:
source /sw/bin/init.sh
exec fluxbox
3- And one for icewm called .xinitrc.icewm:
Code:
source /sw/bin/init.sh
exec icewm
4- Then in Apple's X11 menu -->Applications -->Customize wrote two entries:

Name= fluxbox
Command= xinit ~/.xinitrc.fluxbox -- /usr/X11R6/bin/Xnest :3 -geometry 800x600

Name= icewm
command= xinit ~/.xinitrc.icewm -- /usr/X11R6/bin/Xnest :4 -geometry 800x600


Screenshot
sao is offline  
Old 06-07-2004, 02:59 AM   #15
sao
Moderator
 
Join Date: Jan 2002
Location: Singapore
Posts: 4,233
111- X11 Bug fixes in 10.3.4

.
Haroon Sheikh posted the following at the x11-users list:

.
Quote:
Everyone,

There were a small set of bug fixes in 10.3.4 for X11 for Mac OS X
v1.0. The list of fixes isn't documented anywhere, but here's a quick
rundown of the fixes.

- A common quartz-wm crasher (crash in x_input_register).
- xterm window would open on a secondary screen in multi-monitor
situations.
- Paste into Aqua environment (where the copy originating in X11) would
not succeed on first paste.
- xmkmf was broken so many scripts contained a bogus first line (note:
man pages still contain the bogus line).

Please upgrade to 10.3.4 if you haven't. As usual, report bugs, request
features, feedback to http://developer.apple.com/bugreporter

Note that I cannot comment on when the next set of X11 for Mac OS X
changes will be released (bug fixes or major upgrades).

haroon

.
sao is offline  
Closed Thread

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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 02:44 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Site design © Mac Publishing LLC; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of Mac Publishing LLC.