LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 11-27-2004, 03:35 PM   #16
jonr
Senior Member
 
Registered: Jan 2003
Location: Kansas City, Missouri, USA
Distribution: Ubuntu
Posts: 1,040

Rep: Reputation: 47

Quote:
Originally posted by Slovak
After I restarted "x" I ran this as user in xterm
xmodmap -e "pointer = 1 2 3 6 7 4 5"
and guess what? all 7 buttons of my mouse now work!
I read somewhere that I should add that to either or both my ~/.xinitrc and ~/.xsession so the command is issued at X startup. Question is where are those two files located for a regular user? I only found them as hidden files in /root
I don't use root for hardly anything and don't see them in my /home directory?
If you don't have either .xinitrc or .xsession in your home directory (as regular user), you can simply create such with a text editor.

Some distributions use .xsession and some, like MandrakeLinux, use .xinitrc. As far as I know they do the same thing.

Just put a command on each line (or a comment to remind yourself what you did! ) and after each command, put a "&" so that the next line will be read also, otherwise you'll exit the file then and there. Finally, at the bottom of everything you want to start up, put the command to run your window manager, without a "&" after it.

That's the general rule. There are exceptions but they are few.

That's how I start up all the applications that I usually want running (being a creature of habit, I run the same things every day). Then the window manager kicks in and gets all the windows ready to move around, etc. as I see fit.

Your line for the mouse can go anywhere in there, before you put the window manager line.

As you probably know, the command to get all this going is "startx". At least it is for me.

Here, in case it helps, is my own current .xinitrc file. Notice that I commented out some programs I decided I didn't want to run automatically anymore for one reason or another. And that I have several small window managers to choose from at the end. The "|| xterm" means if the window manager happens to crash (which almost never happens) at least you'll have an xterm window left to work from.

Code:
GSDPID=`pidof gnome-settings-daemon`
if [  "x$GSDPID" == "x" ]; then
gnome-settings-daemon &
fi
#above is to get GTK2 stuff to look right with fluxbox...
xgamma -gamma 1.0 &
#######Set key repeat to delay 500 ms, repeat 45 times per sec.:
xset r rate 500 45 &
#######following makes cursor disappear when not used in a while (even on the root window):
unclutter -root -idle 5 &
##Let's try to invoke the xscreensaver daemon:
#xscreensaver &
###That works fine, but it REALLY heats up the CPU chip to run a nice ssaver.
esd &
chbg  -mode maximize /store1/Graphics/background &
#######or if the background picture doesn't maximize well, do this:
#chbg -mode smart /store_1/Graphics/background &
#chbg -scenario /home/jon/redon_pollock_scenario &
/home/jon/thunderbird/thunderbird &
#Next line handy if you need audio mixer displayed to start with
#aumix & 
#Now we will set the "bell" to be unobtrusive...
xset b 9 900 500 &
#the "+sb" below means NO SCROLLBAR, bleev it er not...
/usr/X11R6/bin/xterm +sb -bg gray11 -fg AntiqueWhite -bc -cr red &
#/usr/X11R6/bin/xterm +sb -bg red -fg AntiqueWhite -bc -cr green &
jpilot &  
gkrellm &
#xplns & 
#xmahjongg --layout monkey  --tileset thin --background graqua & 
/home/jon/bin/soffice_usual & 
/usr/bin/firefox &
volume.app &
#####below added to try to get monitor backlight to turn off when using xlock
/etc/rc.d/init.d/acpi start
/etc/rc.d/init.d/acpid start
##########Commenting out nedit because right clicks cause crashes in other apps
#nedit -xrm nedit*text.background:MidnightBlue -xrm nedit*text.foreground:NavajoWhite &
#bbkeys -i & blackbox || xterm
#startkde || xterm
#twm
#/home/jon/tmp/flwm
icewm-session || xterm
#fluxbox || xterm
#mwm || xterm


Last edited by jonr; 11-27-2004 at 03:43 PM.
 
Old 11-27-2004, 04:00 PM   #17
ror
Member
 
Registered: May 2004
Distribution: Ubuntu
Posts: 583

Rep: Reputation: 33
I heard the difference between .xsession and .xinitrc is that one happens when telinit 5'ing and one happens on startx?

Can anyone else confirm this or otherwise?
 
Old 11-27-2004, 04:40 PM   #18
jonr
Senior Member
 
Registered: Jan 2003
Location: Kansas City, Missouri, USA
Distribution: Ubuntu
Posts: 1,040

Rep: Reputation: 47
Here's one possible answer to .xsession vs. .xinitrc:

http://lists.debian.org/debian-user/.../msg01054.html

And here's another with a different slant:

http://www.kalamazoolinux.org/piperm...ry/006097.html

I myself have never managed to get xdm to work at all! It really messes things up for me.

But I'm very happy going to X from initlevel 3--which gives me a change to use vim to make changes here and there should I wish to, or su to root and make changes only root can make, and then when I think I'm good and ready, issue "startx" and left .xinitrc do the routine stuff for me.

It's fast and painless, important in the morning when I haven't had my coffee yet.

The format of .xinitrc is identical to that of .xsession, by the way. Only the names differ. And what the various modes of startup look for.

Last edited by jonr; 11-27-2004 at 04:45 PM.
 
Old 11-27-2004, 09:14 PM   #19
NoXiS
LQ Newbie
 
Registered: Oct 2004
Location: Edinburgh
Distribution: Slackware 10.1, Ubuntu 5.10 'Breezy'
Posts: 28

Rep: Reputation: 15
.xinitrc should be in the users home directory. You're not just looking in the /home directory are you. Seems unlikely... but thought I would check.

And yes it is a hidden file. The only reason I can think of that it wouldn't be there is if you haven't run X as that user... also unlikely.
 
Old 11-27-2004, 09:27 PM   #20
Slovak
Member
 
Registered: Oct 2004
Location: North Olmsted, Oh
Distribution: Slackware 10
Posts: 206

Rep: Reputation: 30
I found a better way, make your mouse changes system wide for every user after editing xorg.conf and restarting "x", at least in Slackware 10, by editing the .xinitrc file as root located in /etc/X11/xinit, and adding this for a 7 button mouse.

# custom mouse button remap
xmodmap -e "pointer = 1 2 3 6 7 4 5"

BEFORE it says

# Start the window manager:
startkde

I would run xmodmap -e "pointer = 1 2 3 6 7 4 5" in an xterm first before editing the .xinitrc just to make sure all mouse buttons work.

Last edited by Slovak; 11-27-2004 at 09:34 PM.
 
Old 11-27-2004, 09:29 PM   #21
Slovak
Member
 
Registered: Oct 2004
Location: North Olmsted, Oh
Distribution: Slackware 10
Posts: 206

Rep: Reputation: 30
Quote:
Originally posted by NoXiS
.xinitrc should be in the users home directory. You're not just looking in the /home directory are you. Seems unlikely... but thought I would check.

And yes it is a hidden file. The only reason I can think of that it wouldn't be there is if you haven't run X as that user... also unlikely.
It is not in my home directory, and don't need to be, just do as said in my above post and it works flawlessly.
 
Old 11-27-2004, 11:47 PM   #22
NoXiS
LQ Newbie
 
Registered: Oct 2004
Location: Edinburgh
Distribution: Slackware 10.1, Ubuntu 5.10 'Breezy'
Posts: 28

Rep: Reputation: 15
Quote:
Originally posted by Slovak
It is not in my home directory, and don't need to be, just do as said in my above post and it works flawlessly.
Mine's working OK, I was trying to help you guys out. I have been using user specific .xinitrc files (which isn't a big deal 'cos I'm the only user), but the tip for the system wide change is nice to know - should do that sometime.
 
Old 11-28-2004, 08:13 AM   #23
jonr
Senior Member
 
Registered: Jan 2003
Location: Kansas City, Missouri, USA
Distribution: Ubuntu
Posts: 1,040

Rep: Reputation: 47
Quote:
Originally posted by NoXiS
Mine's working OK, I was trying to help you guys out. I have been using user specific .xinitrc files (which isn't a big deal 'cos I'm the only user), but the tip for the system wide change is nice to know - should do that sometime.
I didn't know a system-wide .xinitrc existed--that could be handy for a home network, for example, or even a larger one where some stuff needed to be made universal. Thanks NoXiS and Slovak for pointing out and clarifying...
 
Old 11-28-2004, 09:09 AM   #24
Slovak
Member
 
Registered: Oct 2004
Location: North Olmsted, Oh
Distribution: Slackware 10
Posts: 206

Rep: Reputation: 30
I didn't know one existed either. If that one is even really a system wide one. I just did a search and found more than one and thought to myself, which directory does every user have access to? /etc/X11, so I changed that one and hoped for the best. Hey, it worked for me!
 
Old 12-22-2004, 04:26 AM   #25
spacesun
LQ Newbie
 
Registered: Aug 2004
Posts: 1

Rep: Reputation: 0
Dexxa Mouse

Hello
i read youre postings and i tried to do it with my own mouse!
but this Dexxa optical mouse ( had a logitech board inside )
only accepts the wheel on 4 5 buttons!
and so i could not get the other 2 buttons to work!
you sad that the wheel is everytime the last 2 buttons but with mine ist isnt so
how do i get i to work?
xorg.conf
Section "InputDevice"
Identifier "Mouse1"
Driver "mouse"
Option "Protocol" "ExplorerPS/2"
Option "Device" "/dev/psaux"
Option "ZAxisMapping" "4 5"
OPtion "Buttons" "7"
Option "BaudRate" "9600"
Option "SampleRate" "150"
EndSection
 
Old 12-22-2004, 05:26 AM   #26
YBA^[x]
Member
 
Registered: Apr 2004
Location: Denmark
Distribution: Slackware 10.2
Posts: 121

Rep: Reputation: 15
hey.

You might want to take a look at this. It helped me out and I am almost certain that all buttoms work in all programs.
 
Old 12-22-2004, 05:51 AM   #27
cathectic
Member
 
Registered: Sep 2004
Location: UK, Europe
Distribution: Slackware64
Posts: 761

Rep: Reputation: 35
Re: xinitrc, xsession, etc.... (7 Button Mouse only, e.g. MS Intellimouse Explorer)

Instead of putting the xmodmap command in the xinitrc file, which means if you swap to another Window Manager, you have to edit its xinitrc file (xinitrc is, after all, only a symlink to one of the xinitrc files in /etc/X11/xinit), the alternative is to create a file called:

/etc/X11/xinit/.Xmodmap

and in that file, just put the line

Code:
pointer = 1 2 3 6 7 4 5
All the xinitrc files import their Xmodmap arguments from that file, and it also saves having to edit an xinitrc file if you upgrade your Window Manager and it wipes the original.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Mouse Scroll Button doesn't work with Logitech PS/2 MOuse. duffmckagan Slackware 10 12-02-2008 11:27 PM
3 button mouse (scroll button) Spyiish Slackware 24 07-23-2005 01:37 PM
Mouse setup problems for a 8 button mouse. Devboy Linux - General 3 12-25-2004 04:53 PM
middle mouse button is paste.. but what if i dont have a mid mouse button? kublador Linux - Newbie 4 09-02-2003 08:59 AM
4 button, mouse wheel USB mouse DigiCrime Linux - Hardware 1 12-11-2002 04:15 PM

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

All times are GMT -5. The time now is 06:21 PM.

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