Return to the FrequentlyAskedQuestions Main Page
This is a list of common usage glitches that happen to many people when trying to run their box and get it to how they want it. It's worth a scan-through, at least.
Contents
Contents
- Contents
- Setting up multiple keyboard layouts for X
- Fix bitmap^Whorrible fonts
- xorg-server 1.5.3 has lost my keyboard and mouse
- Problems building GTK+2
- Running Evolution outside of GNOME has broken icons
- Upgrading to xorg-server 1.4 makes single-clicks act like double-clicks
- Can't get glibc 2.3.1 to compile while upgrading from 2.2.x versions?
- Misc gettext/glibc/gcc issues
- Why does the DEL key produce a '~'?
- Why doesn't top work?
- Why can't I change the kdm background?
- How do I get my wheelmouse to work in X?
- Mozilla fonts suck
- But I want ClearType
- Only root can play sound!
- XMMS gives me errors about ALSA: snd_mixer_attach and only works when I'm root
- Why can't sorcery seem to find spells I know are there?
- Why won't procps (or another spell) compile?
- FT_Get_Next_Char especially during gtk+2 compile, but possibly others.
- Locate segfaults
- mozilla/Firebird is not loading or segfaults
- How can I get rid of this NLSPATH error when I run man?
- My box refuses to boot to runlevel 3! It hangs up after the network script reports success.
- My GNOME icons are broken
- My /dev/fd is empty
- My programs say Fontconfig has an invalid token
- Symlinks don't work well with installwatch/install logs
- I can't go back to the terminal with Ctrl+Alt+F#
Setting up multiple keyboard layouts for X
This is a method for setting up multiple keyboard layouts. This setup is using the evdev input driver with hal to setup the X input devices. Ensure that xkeyboard-config is installed. Nothing will work without this. Even attempting to add XFCE's keyboard layout plugin results in a segfault without xkeyboard-config installed.
Add the following two fdi files to /etc/hal/fdi/policy:
10-keymap.fdi:
<?xml version="1.0" encoding="ISO-8859-1"?> <!-- -*- SGML -*- -->
<deviceinfo version="0.2">
<device>
<match key="info.product" string="Dell Dell USB Keyboard">
<merge key="input.xkb.rules" type="string">base</merge>
<merge key="input.xkb.model" type="string">evdev</merge>
<merge key="input.xkb.layout" type="string">us,ru</merge>
<merge key="input.xkb.variant" type="string">,phonetic</merge>
<merge key="input.xkb.options" type="string">grp:ctrl_shift_toggle,grp_led:scroll
</merge>
</match>
</device>
</deviceinfo>
10-mouse.fdi
<match key="info.product" string="Logitech USB Optical Mouse">
<merge key="input.x11_options.ZAxsisMapping" type="string">4 5</merge>
<merge key="input.x11_options.Emulate3Buttons" type="string">true</merge>
</match>
There is also a way to add synaptics to this: untarring the source tarball of xf86-input-synaptics provides: fdi/11-x11-synaptics.fdi copy it over to the same dir as the above to and restart hald that's that... Now X should support the touchpad nicely.
I have no entries for input devices in xorg.conf allowing hal to handle it all. You will need to substitute your specific info.product names. After this is completed exit X and restart hal with "telinit run hald restart" and restart X.
Fix bitmap^Whorrible fonts
See http://mmassonnet.blogspot.com/2009/01/fix-bitmapwhorrible-fonts.html
xorg-server 1.5.3 has lost my keyboard and mouse
If you updated to xorg-server 1.5.3 (or newer), you probably no longer have your standard mouse and keyboard working. This is because the latest xorg-server now sets AllowEmptyInput to "True" by default if AutoAddDevices and AutoEnableDevices are enabled (also enabled by default). AllowEmptyInput will cause your devices using the kbd and mouse driver to be ignored and no amount of finangling will bring them back, unless you add the following:
{
Section "ServerFlags"
Option "AllowEmptyInput" "false"
EndSection
}You could probably also disable AutoEnableDevices and/or AutoAddDevices, but I have not tested that.
Problems building GTK+2
GTK+2 and its dependencies involve multiple circular dependencies and can be difficult to get built correctly. Here is a script that works for me everytime:
- cast -r cairo - no to poppler, ghostscript, librsvg2
- cast -r poppler - yes to cairo and no to gtk+2
- cast -r cairo - yes to poppler and ghostscript and no to librsvg2
- ghostscript - yes to cairo and no to gtk+2
- cast -r gtk+2
- cast -r cairo poppler ghostscript gtk+2
- cairo - yes now to librsvg2 poppler - yes now to gtk+2 ghostscript - yes now to gtk+2
Running Evolution outside of GNOME has broken icons
If you are running Evolution outside of GNOME (e.g. using KDE or Enlightenment) and Evolution has broken icons, add the following line to ~/.gtkrc-2.0:
gtk-fallback-icon-theme = "gnome"
Upgrading to xorg-server 1.4 makes single-clicks act like double-clicks
If, after upgrading xorg-server from 1.3 to 1.4, your single mouse clicks now count as double-clicks, make the following modification in /etc/X11/xorg.conf
{
Section "ServerLayout"
...
InputDevice "Mouse" "CorePointer"
...
EndSection
}Make sure your main pointer device has "CorePointer" rather than "SendCoreEvents" or "AlwaysCore".
Can't get glibc 2.3.1 to compile while upgrading from 2.2.x versions?
This hint has five stages more than is necessary and leaves all the old version libs in the system, it is not recommended. The real problem has been fixed in the glibc spell and sorcery 2004-03-25
The rebuild of the glibc package often fails during the install phase of the build scrolling something like the following messages:
>> /tmp/casting.13855: line 173: /usr/bin/bzip2: No such file or directory >> /tmp/casting.13855: line 174: /bin/rm: No such file or directory >> /tmp/casting.13855: line 175: /bin/rm: No such file or directory >> /tmp/casting.13855: /usr/sbin/dispel: /bin/bash: bad interpreter: No >> such file or directory >> /tmp/casting.13855: line 320: /bin/rm: No such file or directory >> /tmp/casting.13855: line 125: /usr/sbin/lockexec: No such file or >> directory
To fix this you need to "ctrl-c" out of it, run (as root) "ldconfig" and apply the following steps:
- 1. clean out all /var/log/sorcery/*/glibc* entries and previous glibc entried in /var/state/sorcery/packages.
2. obtain a clean install log from http://infolab.kub.nl/people/erics/linux/mirror/glibc-2.3.1
- 3. copy install log to /var/log/sorcery/instal/glibc-2.3.1 and add entry to /var/state/sorcery/packages like glibc:20021112:held:2.3.1
- 4. cast -c glibc (which didn't work again...), ldconfig (which caused usual failed install), cd /usr/src/glibc and make install.
- 5. cast -c gcc
- 6. cast -c glibc == finished on it's own!
Good luck!
Misc gettext/glibc/gcc issues
- Situation
- g++ update breaks my C++ packages.
- Problem
- C++ packages say they are missing libstdc++.so.5
- Solution
cleanse --fix will catch and fix the broken packages
A sorcery rebuild is recommended when you change compiler versions to take advantage of the "better" compilation algorithms and methods.
- - - - -
- Situation
- gettext gets updated and recast.
- Problem
- The following errors (or something very similar) are generated for many (all?) spells that are subsequently cast:
undefined reference to `libintl_bindtextdomain' undefined reference to `libintl_gettext' undefined reference to `libintl_textdomain'
- Solution
- Re-cast glibc.
- - - - -
- Situation
- Upgrading glibc.
- Problem
- glibc errors with the following error message:
gcc too old
- Solution
- Upgrade gcc.
- - - - -
- Situation
- Upgrading glibc.
- Problem
- glibc errors with an error message containing:
- selinux/selinux.h
- Solution
- dispel libselinux libsepol policy policycoreutils checkpolicy setools
cast -c -r udev coreutils shadow linux-pam glibc And make sure you don't answer 'y' to optional dependencies you don't know how to use.
- - - - -
Also, when casting gcc while using distcc, make sure all machines being used have the same version of gcc installed.
- - - - -
When you change your optimization settings (-march setting) and just cast g++ without rebuilding gcc, you get funny responses like:
- g++: unrecognized option '-O'
or the more understandable
- g++: unrecognized option '-mtune=pentiumpro'
GCC doesn't like that mix of settings. Make sure you recompile gcc and related stuff after that when changing optization architecture - as sorcery rebuild should do...
Why does the DEL key produce a '~'?
Linux From Scratch produced a nice howto on this problem. It involves the /etc/inputrc. http://www.linuxfromscratch.org/lfs/view/stable/chapter07/inputrc.html
Why doesn't top work?
Top probably does not work in your machine because you have the environment variable LANG set.
A simple work-around is to create an alias this way:
- alias top='LANG="" top'
and your top will begin to work.
Why can't I change the kdm background?
The problem is some missing lines in /etc/X11/xdm/Xsetup_0 file.
Just insert something like:
if [ -x usr/bin/kdmdesktop ];then usr/bin/kdmdesktop elif [ -x /usr/X11R6/bin/xbanner ];then /usr/bin/X11/xbanner else /usr/bin/X11/xsetroot -solid "#21449C" /usr/bin/X11/xconsole -geometry 480x130-0-0 -daemon -notify - verbose -fn \\ fixed -exitOnFail fi
and inside the kde control panel you can choose and set which background you would like to see in kdm.
Would you like to know more about this problem? Check out this kdm submitted bug at bugs.kde.org.
How do I get my wheelmouse to work in X?
You need to add the following lines to your XFree86conf in the Pointer section:
Option "ZAxisMapping" "4 5" Option "Buttons" "5"
Also note that some PS/2 mice require that you set the protocol to IMPS/2:
Option "Protocol" "IMPS/2"
Mozilla fonts suck
To get good looking-antialiased fonts in mozilla, you must first have some truetype fonts. These can be provided by the "msttf" and "dbz" spells. Cast them.
Ensure the Mozilla based browser is not running.
Next, add the following lines to ~/.mozilla/<profile name>/<random string>/user.js if you are using Mozilla and ~/.phoenix/<profile name>/<random string>/user.js if you are using Firebird. ( You might need to change the font dir from /usr/share/fonts/truetype to where your fonts are)
user_pref("font.Free''''Type2.enable", true);
user_pref("font.Free''''Type2.autohinted", true);
user_pref("font.Free''''Type2.unhinted", false);
//user_pref("font.scale.aa_bitmap.always", true);
user_pref("font.directory.truetype.1", "/usr/share/fonts/truetype");
user_pref("font.directory.truetype.2", "/usr/share/fonts/truetype");
user_pref("font.directory.truetype.3", "/usr/share/fonts/truetype");Notice the fourth line is commented out. This line enables antialising for bitmap fonts, which just looks ugly. But the option is there.
Now restart mozilla and choose truetype fonts in the preferences dialog. Truetype fonts, for some reason, are listed before bitmap fonts, with an upper-case first letter.
Note: Don't do this if you built mozilla with xft support!
But I want ClearType
Sub pixel font rendering is available with Xfree86 and the "render" extension. First, get truetype fonts. Then, depending on whether your screen has rgb or bgr pixel ordering (most LCD screens are rgb), add one of the following lines to /etc/X11/XftConfig
- match edit rgba = rgb;
Depending on your pixel ordering and orientation, you might want to use "bgr", "vrgb" or "vbgr".
Then either use GTK+ with gdkxft, GTK+2, or QT applications with antialiasing.
Only root can play sound!
In order to get sound working for normal users you have to add them to the audio group. This is done with the command gpasswd.
To list all groups in which the user is a member use the command:
groups <username>
To then add a user to the audio group, issue:
gpasswd -a <username> audio
XMMS gives me errors about ALSA: snd_mixer_attach and only works when I'm root
- In order to get XMMS to run properly using ALSA under Mage, you need to change the permissions on the files in /devices/snd/* to allow your username to access them. The default permissions are 660. I solved the problem like this:
# chgrp audio /devices/snd/* # gpasswd -a <username> audio
The first command changes the group on the files in /devices/snd to audio, and the second adds you to that group. (Substitute your own user name for <yourusername>, obviously.) You need to log out and then back in before the group changes will take effect.
There is another slight problem with this fix. The devfs file system is reconstructed each time you reboot; as a result, the command to chgrp the files in /devices/snd/* will not persist across reboots, and the problem will recur. To make the changes permanent, you need to add a script that runs at boot time and changes the group to audio. I wrote a file called /etc/bootmisc.sh to do this. Here are its contents:
> #!/bin/bash > > chgrp audio /devices/snd/*
To install the script, do this:
# chmod 755 bootmisc.sh # cd /etc/rc3.d/ # ln -s ../bootmisc.sh S31bootmisc
The chmod changes the permissions on the file so that it can be executed. Creating a symbolic link in the rc3.d directory will cause it to run the script when that runtime level is entered. Level 3 is the ordinary level for most uses of the computer. The "S31" bit indicates that the script should be Started after everything with a lower number like 30. On Source Mage, S30networking is the last one to run by default, so I told it to run bootmisc after networking had been set up. If you use runlevels 4 or 5, you might want to add an identical symbolic link in the rc4.d and rc5.d directories. Do not add it to rc6.d, which is the runlevel you enter to reboot or shutdown the computer. You probably will not want to add it to rc1.d or rc2.d, which are for maintenance, though I suppose you could if you wanted.
Once you have done all this, XMMS should run with no problems, and do so every time, regardless of how many times you reboot. In short, you can just forget about it.
Why can't sorcery seem to find spells I know are there?
- scribe reindex
That should reindex the spells in all grimoires for quick lookups.
Why won't procps (or another spell) compile?
Be sure to say no to fixincludes in gcc (if it asked you), or to fix this, do:
- rm -rf /usr/lib/gcc-lib/i*86-pc-linux-gnu.*/include
Tar up this directory first if you don't feel like risking some failed compiles.
Safest way is to do the recast of gcc and say no to fixincludes and then check to see if the above includes were indeed removed. New iso installs should not have this problem (Feb 2003 or later).
FT_Get_Next_Char especially during gtk+2 compile, but possibly others.
http://lists.ibiblio.org/pipermail/sm-grimoire/2002-December/001238.html
Try removing the libfreetype* from /usr/X11R6/lib and /usr/X11R6/lib/modules
X places the files there. They are outdated and unfortunately show up in the search path before the good ones.
X shouldn't be doing that anymore.
Then recompile the broken spell.
Locate segfaults
If locate segfaults on you and you're stuck with using find, try using --old-format with updatedb. Here is my crontab entry:
- @daily /usr/bin/updatedb --old-format
mozilla/Firebird is not loading or segfaults
rm /usr/lib/mozilla/components/compreg.dat
How can I get rid of this NLSPATH error when I run man?
NLSPATH is used as a part of gettext to find locale-specific messages. An undefined NLSPATH in itself is OK because it has defined behavior. The problem is you need to have a locale specified. Luckily, this is as easy as setting the LANG environment variable, for example:
- # export LANG=en_CA
will set your current locale to English (the "en") Canadian (the "CA"). Similarly:
- # export LANG=fr_FR
will set your current locale to French (the "fr") from France (the "FR"). Of course, you need to have the specified file installed. To set the default locale for all users permanently, just make the change to your /etc/profile.d/lc.sh!
your LANG using export as described above, the change will take effect immediately. Run man again and, assuming you selected a valid locale, say goodbye to the NLSPATH error forever!
If you made the change to /etc/profile.d/lc.sh it will only take effect the next time you log in, unless you manually source the file.
My box refuses to boot to runlevel 3! It hangs up after the network script reports success.
If you're using portmap, it's possible that your init scripts have a circular dependency in them. I encountered such a thing when using portmap (a dependency of fam and nfs-utils). The portmap script needs remote_fs working; remote_fs can be provided either by the mountnetwork script or the smgle-default-remote-fs script. However, the mountnetwork script relies on portmap to be up and running first, so the two get into a loop trying to invoke one another and the boot process hangs.
The file /etc/sysconfig/facilities determines which scripts supply certain capabilities. If it says remote_fs=mountnetwork, try changing that line to remote_fs=smgl-default-remote-fs and reboot. This fixed it for me, but may cause problems if you're using NFS for something.
My GNOME icons are broken
If you're running GNOME apps (i.e. evolution) and the icons are broken, try recasting hicolor-icon-theme.
My /dev/fd is empty
I'm not sure why this happens, but just do:
- # ln -s /proc/self/fd /dev/fd
My programs say Fontconfig has an invalid token
- If you are getting this error
- Fontconfig error: line 24: not well-formed (invalid token)
- Fontconfig error: Cannot load default config file
Make sure your timezone is set (/etc/localtime) properly and then recast fontconfig.
e.g.
- $ ls -lah /etc/localtime
lrwxrwxrwx 1 root root 30 2004-12-16 16:25 /etc/localtime -> /usr/share/zoneinfo/US/Pacific
Symlinks don't work well with installwatch/install logs
An installwatch bug will occasionally cause symlinks to be removed during dispel and replaced by an empty directory. So if you want to move system directories to another location (e.g. moving /usr/share to another harddisk) you should not use symlinks. Instead use mount --bind. You can place it into your /etc/fstab like this:
- /mnt/bigdisk/usr_share /usr/share none defaults,rbind 0 1
Of course the mount point should exist as well.
I can't go back to the terminal with Ctrl+Alt+F#
Just cast xkeyboard-config and it should be fixed. Alternate option if you have the Magic SysRq enabled in Kernel Hacking of the kernel configuration, hit Alt+SysRq+R and Alt+F# to go to that terminal.
