X11 chokes on xset

Hi,

the following ~/.xinitrc prevents X11 from running:

xset -b
xset fp+ /opt/local/X11R6/lib/X11/fonts/local

If I put these lines in my ~/.bashrc instead, that has the same effect. This seems
like a serious bug.

Store these settings (for the bell and the font path) permanently, in some
config file?

Thanks,
Michael Goerz

MacBook, Mac OS X (10.5.5), Aluminum MacBook 2.4 Ghz, 2GB RAM

Posted on Nov 4, 2008 12:03 PM

Reply
13 replies

Nov 5, 2008 3:58 PM in response to BobHarris

This actually worked halfway. I've attached my ~/.xinitrc below. It is a copy of the global xinitrc, and I've added the two xset commands. The effect is that the bell gets set, but not the font path. There seems to be a dependency on where in the file I add the lines: if I put them at the bottom, it doesn't work at all (X11 doesn't start).

So, if I could get both the bell and the font path working, that'd be really great. Does anyone have any insights on where to put the lines so that both work?

Oh, and by the way, what's with the three xterms and the one xclock that's being called in the .xinitrc? I don't quite understand what this file does.

Thanks for you suggestions,
Michael

============ %< =============

#!/bin/sh
# $Xorg: xinitrc.cpp,v 1.3 2000/08/17 19:54:30 cpqbld Exp $

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/usr/X11/lib/X11/xinit/.Xresources
sysmodmap=/usr/X11/lib/X11/xinit/.Xmodmap

xset -b
xset fp+ /opt/local/X11R6/lib/X11/fonts/local

# merge in defaults and keymaps

if [ -f $sysresources ]; then

if [ -x /usr/bin/cpp ] ; then
xrdb -merge $sysresources
else
xrdb -nocpp -merge $sysresources
fi



fi

if [ -f $sysmodmap ]; then
xmodmap $sysmodmap
fi

if [ -f "$userresources" ]; then

if [ -x /usr/bin/cpp ] ; then
xrdb -merge "$userresources"
else
xrdb -nocpp -merge "$userresources"
fi



fi

if [ -f "$usermodmap" ]; then
xmodmap "$usermodmap"
fi

# start some nice programs




if [ -d /usr/X11/lib/X11/xinit/xinitrc.d ] ; then
for f in /usr/X11/lib/X11/xinit/xinitrc.d/*.sh ; do
[ -x "$f" ] && . "$f"
done
unset f
fi


twm &
xclock -geometry 50x50-1+1 &
xterm -geometry 80x50 49451 &
xterm -geometry 80x20+494-0 &
exec xterm -geometry 80x66 00 -name login

Nov 5, 2008 4:09 PM in response to Michael Goerz

Try putting your xset's just before the twm command.
what's with the three xterms and the one xclock that's being called in the .xinitrc?

I have a problem with this as well since the default X11 App only starts one xterm and no xclock. Thus the startx or xinit done by the App has to be bypassing the 'default' /usr/X11/lib/X11/xinit/xinitrc

Nov 5, 2008 4:31 PM in response to xnav

In that case, the X server starts, but neither the bell nor the fontpath are set. I put in an additional 'touch /Users/goerz/check.txt' between the two xset's to see if the file is created (as and indication that that portion of the code is executed). If the xset's are in front of the twm, check.txt is never touched. The code at the end of the .xinitrc is never reached, it seems.

On the other hand, in my original version with the xset's near the top of the file, check.txt was touched -- whether I put the touch command before, between, or after the two xset's. So it seems that the xset for the font path is executed -- but the desired effect is not there. How can this be?

Nov 5, 2008 5:30 PM in response to xnav

Actually, the first script there defines the fontpath! That's what I was looking for in the first place as an alternative to having to do the xset fp+

I can just add the line

[ -e /opt/local/X11R6/lib/X11/fonts/local/fonts.dir ] && fontpath="$fontpath,/opt/local/X11R6/lib/X11/fonts/local/"

to 10-fontdir.sh

I still do my 'xset -b' now directly in /usr/X11/lib/X11/xinit/xinitrc and get rid of the .xinitrc in my home directory.

Of course, this solution is global for all users, but that's perfectly fine by me.

Problem solved.

Thanks so much!
Michael

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

X11 chokes on xset

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.