SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
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.
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.
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.
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.
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...
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!
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
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.