LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 09-19-2005, 04:11 PM   #1
Erik_FL
Member
 
Registered: Sep 2005
Location: Boynton Beach, FL
Distribution: Slackware
Posts: 821

Rep: Reputation: 258Reputation: 258Reputation: 258
.xinitrc and modmap have no effect on KDE?


I am attempting to get the extra buttons on my Intellimouse Optical mouse on the PS2 port to work. I found many posts about how to do that.

My problem is when I change the contents of my ".xinitrc" file in my home directory, it seems to have no effect on what happens when I start KDE.

Here are the contents of my ".xinitrc" file.
Code:
#!/bin/sh
# $XConsortium: xinitrc.cpp,v 1.4 91/08/22 11:41:34 rws Exp $

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

# merge in defaults and keymaps

if [ -f $sysresources ]; then
    xrdb -merge $sysresources
fi

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

if [ -f $userresources ]; then
    xrdb -merge $userresources
fi

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

# Mouse buttons and wheel
xmodmap -e "pointer = 1 2 3 6 7 4 5"
#imwheel -k -b "45"

# Start the window manager:
startkde
The problem is "xmodmap" has no effect on the button mappings. If I uncomment "imwheel" it also has no effect. Adding programs to the file has no effect.

Here are some of the things I tried to solve the problem.
  • Symbolically link ".xinitrc" to ".xsession" to make sure they are both identical
  • Log in as root
  • Place the "xmodmap" command in "/etc/X11/xinit/xinitrc"
  • Run "xorgconfig" again
  • Adding or removing spaces between "1 2 3 6 7 4 5"
  • Running "xmodmap" from the KDE desktop "run" box
  • Running "xmodmap" by creating a shortcut in ".kde/Autostart".

For some reason, no matter how I try to use "modmap" to remap buttons it has no effect. It also apprears that the ".xinit" and "xinit" files are not having any effect if I add other things to them, such as launching applications.

I am getting some errors reported in a file called ".xsession-errors" in my home directory. Here is what I find in that file after I log in.
Code:
stderr is not a tty - where are you?
xset:  bad font path element (#96), possible causes are:
    Directory does not exist or has wrong permissions
    Directory missing fonts.dir
    Incorrect font server address or syntax
xset:  bad font path element (#96), possible causes are:
    Directory does not exist or has wrong permissions
    Directory missing fonts.dir
    Incorrect font server address or syntax
startkde: Starting up...
kbuildsycoca running...
DCOP Cleaning up dead connections.
kdecore (KLibLoader): WARNING: KLibrary: /opt/kde/lib/kde3/kcm_kdnssd.so: undefined symbol: init_kdnssd

(Gecko:7364): Gdk-WARNING **: gdk_property_get(): length value has wrapped in calculation (did you pass G_MAXLONG?)
When I log out I sometimes get an error that lists "kcm_kdnssd.so" in a rather voluminous stack trace.

I have no idea how to go about investigating those errors, or if they have any bearing on the problem. Help from anyone will be greatly appreciated.

Just for completeness here is the section I changed in "/etc/X11/xorg.conf" to specify my mouse configuration.
Code:
Section "InputDevice"

# Identifier and driver

    Identifier	"Mouse1"
    Driver	"mouse"
    Option "Protocol"    "ExplorerPS/2"
    Option "Device"      "/dev/mouse"
    Option "Buttons" "7"
    Option "ZAxisMapping" "6 7"
This configuration had the expected effect of making my thumb buttons operate, and mapping the mouse wheel to the wrong button numbers. If I use "4 7" instead of "6 7" only the mouse wheel works mapped to the correct button numbers. In order to use both the wheel and the thumb buttons, I have to get "xmodmap" to reassign the button functions.

Last edited by Erik_FL; 09-19-2005 at 04:14 PM.
 
Old 09-19-2005, 04:52 PM   #2
cathectic
Member
 
Registered: Sep 2004
Location: UK, Europe
Distribution: Slackware64
Posts: 761

Rep: Reputation: 35
.xinitrc is not the place to put xmodmap commands - just put the following in ~/.Xmodmap or /usr/X11R6/lib/X11/xinit/.Xmodmap :
Code:
pointer = 1 2 3 6 7 4 5
Alternatively, enter the full command in Konsole.
 
Old 09-19-2005, 05:09 PM   #3
Jeebizz
Senior Member
 
Registered: May 2004
Distribution: Slackware15.0 64-Bit Desktop, Debian 11 non-free Toshiba Satellite Notebook
Posts: 4,185

Rep: Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378
Curious, the files don't appear to exist in the home directory, or in the usr/X11R6/lib/X11/xinit , I did a ls -al in both home and the other place, and there is no .Xmodmap file, should it be created with the following...

Code:
# merge in defaults and keymaps

if [ -f $sysresources ]; then
    xrdb -merge $sysresources
fi

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

if [ -f $userresources ]; then
    xrdb -merge $userresources
fi

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

#custom mouse buttom remap
xmodmap -e "pointer = 1 2 3 6 7 4 5"
and just saved as .Xmodmap in ~/ and in /usr/X11R6/lib/X11/xinit ?
 
Old 09-19-2005, 05:40 PM   #4
Erik_FL
Member
 
Registered: Sep 2005
Location: Boynton Beach, FL
Distribution: Slackware
Posts: 821

Original Poster
Rep: Reputation: 258Reputation: 258Reputation: 258
Adding "pointer = 1 2 3 6 7 4 5" to "~/.Xmodmap" or "/usr/X11R6/lib/X11/xinit/.Xmodmap" has no effect either.

I was able to get the "~/.xinitrc" script to remap the buttons by doing this.
  • Log in to X-Windows using "failsafe" mode
  • In the shell prompt that appears, I enter "./.xinitrc"
  • KDE desktop appears
  • Buttons have been remapped according to "xmodmap" command from ".xinitrc".

So, apparently the "xmodmap" command in ".xinitrc" is correct, it's just that none of the X initialization scripts seem to be getting executed.

I was able to catch the crash on logging out of KDE that sometimes happens. Here is the information.
Code:
(no debugging symbols found)
Using host libthread_db library "/lib/libthread_db.so.1".
(no debugging symbols found)
...
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread 16384 (LWP 8483)]
(no debugging symbols found)
...
(no debugging symbols found)
[KCrash handler]
#5  0x01600007 in ?? ()
#6  0x40d6eaae in QPtrList<QPopupMenu>::deleteItem ()
   from /usr/lib/qt/lib/libqt-mt.so.3
#7  0x40edea3e in QGList::clear () from /usr/lib/qt/lib/libqt-mt.so.3
#8  0x4179e2f2 in PanelKMenu::~PanelKMenu ()
   from /opt/kde/lib/libkdeinit_kicker.so
#9  0x417731ae in MenuManager::~MenuManager ()
   from /opt/kde/lib/libkdeinit_kicker.so
#10 0x40c20fc8 in QObject::~QObject () from /usr/lib/qt/lib/libqt-mt.so.3
#11 0x40bc39be in QApplication::~QApplication ()
   from /usr/lib/qt/lib/libqt-mt.so.3
#12 0x40750d69 in KApplication::~KApplication ()
   from /opt/kde/lib/libkdecore.so.4
#13 0x40808c47 in KUniqueApplication::~KUniqueApplication ()
   from /opt/kde/lib/libkdecore.so.4
#14 0x41755b59 in Kicker::~Kicker () from /opt/kde/lib/libkdeinit_kicker.so
#15 0x417539b3 in kdemain () from /opt/kde/lib/libkdeinit_kicker.so
#16 0x409207d6 in kdeinitmain () from /opt/kde/lib/kde3/kicker.so
...
#50 0x41065cc0 in vtable for QGArray () from /usr/lib/qt/lib/libqt-mt.so.3
...
#57 0x41382ff4 in ?? () from /lib/libpthread.so.0
#58 0x415db9c0 in __libc_tsd_MALLOC_data () from /lib/libc.so.6
...
#61 0x4137bbfa in pthread_mutex_unlock () from /lib/libpthread.so.0
...
#72 0x080506b7 in _IO_stdin_used ()
...
#76 0x080506b7 in _IO_stdin_used ()
...
#91 0x08052658 in vtable for QCString ()
...
#98 0x4137dffb in thread_self () from /lib/libpthread.so.0
...
#107 0x4146e48d in operator delete () from /usr/lib/./libstdc++.so.5
...
#118 0x080506b7 in _IO_stdin_used ()
...
#121 0x414f02d4 in __cxa_atexit_internal () from /lib/libc.so.6
#122 0x414da44b in __libc_start_main () from /lib/libc.so.6
#123 0x0804b771 in ?? ()
NOTE: I omitted a lot of lines with just hex numbers, since they don't mean much without a map.

When I start KDE from an X-Windows "failsafe" shell window, I get an error saying "free( )" was called with an invalid pointer if the crash occurs. Otherwise I get no error in the shell window on logout.

Since I was suspicious of a possible bug in KDE, I tried logging in using GNOME. I get less errors reported in ".xsession-errors", but the ".xinitrc" script still does not appear to be executed.
Code:
stderr is not a tty - where are you?

(Gecko:8830): Gdk-WARNING **: gdk_property_get(): length value has wrapped in calculation (did you pass G_MAXLONG?)

(Gecko:8847): Gdk-WARNING **: gdk_property_get(): length value has wrapped in calculation (did you pass G_MAXLONG?)
How do I find out why the X initialization scripts are not being performed?
 
Old 09-19-2005, 06:05 PM   #5
Erik_FL
Member
 
Registered: Sep 2005
Location: Boynton Beach, FL
Distribution: Slackware
Posts: 821

Original Poster
Rep: Reputation: 258Reputation: 258Reputation: 258
.xinitrc and .xsession not used for graphical login

OK, it looks like I found out why ".xinitrc" is not being executed.

I'm using the graphical login for for my X-Windows session, not starting it by typing in a command from a shell prompt. That used to execute a file called ".xsession" or "Xsession". Apparently that is no longer the case. Now, the only file executed from a graphical login is ".xprofile" in the user's home directory.

I created a file called ".xprofile" in my home directory, and placed the commands in that file. The commands now work. That still leaves me with a few errors to investigate starting KDE, or logging out of KDE, but it solves my main problem.
 
Old 09-20-2005, 03:54 AM   #6
cathectic
Member
 
Registered: Sep 2004
Location: UK, Europe
Distribution: Slackware64
Posts: 761

Rep: Reputation: 35
It's a problem with the last upgrade to kdebase before 10.2 was released; it now uses the default KDE initialisation files for KDM, instead of Pat's custom one.

For the log out crash, try deleting ~/.kde/share/config/kickerrc and possibly anything else in ~/.kde/share related to Kicker.
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
grub changes don't take effect kingleo Linux - Newbie 5 05-28-2005 02:16 PM
Problem xinitrc, Gnome starts instead of KDE McCloud Debian 7 09-05-2004 08:03 AM
Mac-like effect ? mykrob Linux - General 1 08-16-2004 04:12 PM
dpi font | gdm | kde DE | xinitrc.kde | Slackware 10 acummings Slackware 2 07-28-2004 10:28 PM
KDE 3.2 and xinitrc guygriffiths Linux - Software 2 02-09-2004 10:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:38 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration