 |
 |
How do I customize Apple's X11 Server??
|
 |
|
 |
|
Professional Poster
Join Date: Oct 2001
Status:
Offline
|
|
Where is the default configuration file for the Apple's X11 server? How do I get it to recognize /sw/bin so that I can just put in xmms instead of /sw/bin/xmms in the Applications menubar?
I know I can use .xinitrc to do some customizations, but I also want aliases and paths to be put into the server. Anyone know how to do this?
BTW, Whenever I launch XMMS from the menu, it can't play any music. However, when I launch it from the terminal, I am able to play music using it. What gives?

|
|
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Dec 2001
Status:
Offline
|
|
There are several ways to do this, depending on exactly what you want to do.
1. With Property List Editor, create a file called "environment.plist" in the directory ".MacOSX" in your home folder. This will allow you to set environment variables for every application on your system globally. There is a technote that explains how to do this on Apple's site. Obviously, you want your key to be "PATH" and you want the value to be a string containing the contents of your path. I don't recommend this as some programs that search your PATH might be expecting to find Apple's UNIX programs, but might find, for example, Fink's programs first. With well written code, this should not cause a problem, but you never know.
2. To set the path for the X11 application only, you can create a shell script with the following contents:
Code:
#!/bin/sh
source /sw/bin/init.sh
exec open -a X11
You can then use this shell script to launch X11.
3. To set the environment for individual applications launched by the X11 Applications menu, simply use a compound command. For example, instead of simply using "xmms", use "source /sw/bin/init.sh;xmms".
The reason that there is no sound in XMMS is a symtpom of the same problem. XMMS requires some sort of sound output plugin. The default on OS X is esd (or Enlightened Sound Daemon) which also install in /sw/bin. Apparently, XMMS checks in your PATH (which it inherits from X11) to find esd, and won't even bother looking in the same directory that it is in. Any of the above solutions will fix that problem.
|
|
"Think Different. Like The Rest Of Us."
iBook G4/1.2GHz | 1.25GB | 60GB | Mac OS X 10.4.2
Athlon XP 2500+/1.83GHz | 1GB PC3200 | 120GB | Windows XP
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Oct 2001
Status:
Offline
|
|
Thanks a lot mike! It works perfectly, however, I have one more question that's a little bit off topic. All the terminals (xterm, eterm) no longer go to the previous entry when I press the up arrow. This isn't serious but it's a pain. Perhaps it has something to do with my logitech drivers for my keyboard?
|
|
|
| |
|
|
|
 |
|
 |
|
Addicted to MacNN
Join Date: Aug 2000
Location: Retired
Status:
Offline
|
|
You can also put this as your xmms application path in the Application menu
setenv PATH=/sw/bin:$PATH xmms
|
|
Power Macintosh Dual G4
SGI Indigo2 6.5.21f
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Oct 2001
Status:
Offline
|
|
ok, i decided to use the .xinitrc file with some of the above suggestions.
here's how it looks:
Code:
#!/bin/sh
source /sw/bin/init.sh
exec Eterm &
exec quartz-wm
it works fine, but in the applications menu, i still can't just write "xmms". I still have to put "source /sw/bin/init.sh;xmms". Is there anyway to fix this? Or is this just the way it goes?
|
|
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Dec 2001
Status:
Offline
|
|
Originally posted by itistoday:
ok, i decided to use the .xinitrc file with some of the above suggestions.
here's how it looks:
Code:
#!/bin/sh
source /sw/bin/init.sh
exec Eterm &
exec quartz-wm
it works fine, but in the applications menu, i still can't just write "xmms". I still have to put "source /sw/bin/init.sh;xmms". Is there anyway to fix this? Or is this just the way it goes?
When X11 starts, it runs .xinitrc with /bin/sh. X11 already has its environment set by whatever process launched it (which will be loginwindow if you double-clicked it in the Finder) by the time it does this. This means that any process started by X11 will have the same environment as X11, but anything started from that Eterm will have the same environment as the Eterm.
There is one other (theoretical) problem with your .xinitrc. The "exec" command basically says "run this program in place of whatever program is called exec". So the /bin/sh that is running your .xinitrc basically ceases to exist at the moment exec is called, and an Eterm starts in its place. The only reason that quartz-wm actually starts up is because Apple's X11 is hard-coded to start it if no other window manager is present.
The reason behind the whole "exec" thing is that a "normal" X server will exit as soon as the shell it intially launched exits, which generally means when your window manager (since it takes the place of that shell via the exec command) exits, the X server will exit as well. AFAIK, Apple's X11 will ONLY exit when you choose "Quit", which I think is a smart decision from the Mac point of view.
All you need to do to fix your .xinitrc is to remove the "exec" from the second-to-last line (the "&" is still essential, since /bin/sh will sit and wait until Eterm exits without it). This isn't really necessary, but if you ever wanted to try a different window manager, you might wind up very confused as to why quartz-wm keeps starting even though you have specified something else.
|
|
"Think Different. Like The Rest Of Us."
iBook G4/1.2GHz | 1.25GB | 60GB | Mac OS X 10.4.2
Athlon XP 2500+/1.83GHz | 1GB PC3200 | 120GB | Windows XP
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Oct 2001
Status:
Offline
|
|
Thanks a lot mike for the great, detailed responces. I'd still like to get a previous question answered though, if anyone knows the answer.
Before (don't really know when 'before' was...) i was able to press the up arrow in any terminal and get the previous entry, now, in any terminal in X11 it simply doesn't work. I'm using a logitech keyboard with drivers for it btw...
|
|
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Oct 2001
Status:
Offline
|
|
Originally posted by itistoday:
Thanks a lot mike for the great, detailed responces. I'd still like to get a previous question answered though, if anyone knows the answer.
Before (don't really know when 'before' was...) i was able to press the up arrow in any terminal and get the previous entry, now, in any terminal in X11 it simply doesn't work. I'm using a logitech keyboard with drivers for it btw...
adding to this inquiry I'd like to know if there are any performance advantages that quartz-wm might have over some other window manager... say um... Icewm?
|
|
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Oct 2001
Status:
Offline
|
|
must... keep... thread... alive.
|
|
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Dec 2001
Status:
Offline
|
|
Originally posted by itistoday:
Before (don't really know when 'before' was...) i was able to press the up arrow in any terminal and get the previous entry, now, in any terminal in X11 it simply doesn't work.
What shell are you using? I use bash, and found that initially xterm was using tcsh despite my netinfo SHELL being set to /bin/bash. I always found tcsh's history to be funky and hard to configure, and for some reason the moment I used sudo for something, root would take ownership of my .tcsh_history (or whatever it was called) and I would loose access to it as a normal user (of course it wasn't actually where it should be for root to use it, so it didn't work as root either!). I'm sure I had something set up wrong, but that was the final straw for me, since I know and love bash quite well. Long story short, if you are using tcsh, I really can't help you (other than suggest you switch to bash). If you *are* using bash (or anything other than tcsh) type 'echo $SHELL' in an xterm and see what shell it is using. Finally, you'll find you get much better answers to questions such as these in the UNIX forum.
|
|
"Think Different. Like The Rest Of Us."
iBook G4/1.2GHz | 1.25GB | 60GB | Mac OS X 10.4.2
Athlon XP 2500+/1.83GHz | 1GB PC3200 | 120GB | Windows XP
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Jun 2001
Location: Merry Land
Status:
Offline
|
|
For some reason, when I run kwin ( the KDE window manager) and I try to minimize a window ( to kicker, the equivalent to the Windows taskbar), it crashes X11.
Here are the logs:
Date/Time: 2003-02-17 18:32:38 -0500
OS Version: 10.2.4 (Build 6I32)
Host: stevesibook.local.
Command: Xquartz
PID: 17957
Exception: EXC_BAD_ACCESS (0x0001)
Codes: KERN_INVALID_ADDRESS (0x0001) at 0x0193d000
Thread 0:
#0 0x90073c48 in mach_msg_trap
#1 0x90006090 in mach_msg
#2 0x90148b10 in __CFRunLoopRun
#3 0x90180fe4 in CFRunLoopRunSpecific
#4 0x969a3160 in RunCurrentEventLoopInMode
#5 0x969b3118 in ReceiveNextEventCommon
#6 0x969da208 in BlockUntilNextEventMatchingListInMode
#7 0x9308d8ac in _DPSNextEvent
#8 0x9309fb04 in -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:]
#9 0x930b15e4 in -[NSApplication run]
#10 0x000b1288 in X11ApplicationMain
#11 0x0001f9ec in DarwinHandleGUI
#12 0x00004bdc in main
#13 0x00004904 in start
#14 0x00004784 in start
Thread 1 Crashed:
#0 0x90074438 in memmove
#1 0x936ff510 in CGBlt_copyBytes
#2 0x93be141c in xp_copy_bytes
#3 0x000ec560 in fbCopyNtoN
#4 0x000eccf0 in fbCopyRegion
#5 0x000ed10c in fbDoCopy
#6 0x000ed218 in fbCopyArea
#7 0x00025bf0 in ProcCopyArea
#8 0x0002333c in Dispatch
#9 0x00005280 in main
#10 0x0001f92c in QuartzMessageMainThread
#11 0x90020d48 in _pthread_body
Thread 2:
#0 0x90073c48 in mach_msg_trap
#1 0x90005f90 in mach_msg
#2 0x90148b10 in __CFRunLoopRun
#3 0x90180fe4 in CFRunLoopRunSpecific
#4 0x94d9c1c0 in HALRunLoop::OwnThread(void*)
#5 0x94d911b0 in CAPThread::Entry(CAPThread*)
#6 0x90020d48 in _pthread_body
Thread 3:
#0 0x9003eaa8 in semaphore_wait_signal_trap
#1 0x9003e8c4 in _pthread_cond_wait
#2 0x93be0f1c in _xp_async_dequeue
#3 0x93be0fcc in _xp_async_thread
#4 0x90020d48 in _pthread_body
PPC Thread State:
srr0: 0x90074438 srr1: 0x0000f030 vrsave: 0x00000000
xer: 0x00000000 lr: 0x936ff510 ctr: 0x00000028 mq: 0x00000000
r0: 0x00000049 r1: 0xf00808a0 r2: 0x0408040c r3: 0x01d69780
r4: 0x0193cfec r5: 0x00000938 r6: 0xfe296880 r7: 0xa00028c0
r8: 0x00000000 r9: 0x00127000 r10: 0x00000004 r11: 0x936ff510
r12: 0x01d69ba0 r13: 0x01d69780 r14: 0x00000000 r15: 0x00000000
r16: 0x000000c7 r17: 0x000000ea r18: 0x00000000 r19: 0x00000003
r20: 0xffffffff r21: 0x00000000 r22: 0x0184c8b0 r23: 0x00000020
r24: 0x00000938 r25: 0x00001000 r26: 0x00000000 r27: 0x0000000e
r28: 0x01d66030 r29: 0x01936bcc r30:
0x00000938 r31: 0x936fe580
Any clues?
|
|
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Dec 2001
Status:
Offline
|
|
snerdini, that has absolutely nothing to do with this thread, which was posted in the wrong forum to begin with.
|
|
"Think Different. Like The Rest Of Us."
iBook G4/1.2GHz | 1.25GB | 60GB | Mac OS X 10.4.2
Athlon XP 2500+/1.83GHz | 1GB PC3200 | 120GB | Windows XP
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Jun 2001
Location: Merry Land
Status:
Offline
|
|
Originally posted by macmike42:
snerdini, that has absolutely nothing to do with this thread, which was posted in the wrong forum to begin with.
Using a different window manager has nothing to do with customizing Apple's X11 Server?
|
|
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Oct 2001
Status:
Offline
|
|
Originally posted by macmike42:
What shell are you using? I use bash, and found that initially xterm was using tcsh despite my netinfo SHELL being set to /bin/bash. I always found tcsh's history to be funky and hard to configure, and for some reason the moment I used sudo for something, root would take ownership of my .tcsh_history (or whatever it was called) and I would loose access to it as a normal user (of course it wasn't actually where it should be for root to use it, so it didn't work as root either!). I'm sure I had something set up wrong, but that was the final straw for me, since I know and love bash quite well. Long story short, if you are using tcsh, I really can't help you (other than suggest you switch to bash). If you *are* using bash (or anything other than tcsh) type 'echo $SHELL' in an xterm and see what shell it is using. Finally, you'll find you get much better answers to questions such as these in the UNIX forum.
That's quite interesting actually, I am using tcsh. The thing is, is that I have Apple's terminal configured perfectly with tcsh. I have a bunch of aliases and whatnot configured and so i'm used to tcsh. I know how to configure the default shell with Apple's Terminal, but not with Eterm in X11.
Changing the shell in Eterm (by typing 'bash') did get the up arrows to work... interesting. (POS tcsh...) but again, I don't have my precious aliases and don't know how to make it the default shell default. Help?
(Last edited by itistoday; Feb 17, 2003 at 07:56 PM.
)
|
|
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Oct 2001
Status:
Offline
|
|
|
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|