Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
|
08-02-2003, 08:50 AM
|
#1
|
Member
Registered: Jul 2003
Location: Lancaster, Pa
Distribution: Red Hat 9.0
Posts: 46
Rep:
|
Command line stuff
2 questions:
1) How do I get Linux to run a particular command each time it boots up? Specifically, I want it to run 'xmodmap -e "pointer = 1 2 3 6 7 4 5"' because, for some reason, whenever I start a new X session, it acts as if that command has not been run (and I don't have use of my mouse wheel).
2) How do I exit an X session and go completely to the command line? I know that if I'm on the command line, I can type "startx" to begin a session, but I can't find the opposite command. And all logging out does is put me back to the X login screen.
Thanks.
|
|
|
08-02-2003, 08:53 AM
|
#2
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
1) that's not suitable to run on boot, you need to run that when X loads, which a significant difference. create a faile called /home/you/.xsession and add the line to it there.
2) assuming you're in an X startup, i.e. you choose your name grpahically then you'll probaly just want to press ctrl+alt+F1toF6 to get a fulll terminal. to actually quit X itself though form level 5, run "init 3" and tehn exit as normal, you'll then be left on a console login.
|
|
|
08-02-2003, 08:57 AM
|
#3
|
Moderator
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047
Rep:
|
1) Try putting it at the end of rc.local or .xsession
2) switch back to the CLI where you started it from - eg "Ctrl + F1" Then kill it "Ctrl + C" You can also switch to runlevel 5 - this should start the gui "init 5" Then to shut down the GUI "init 3".
|
|
|
08-02-2003, 09:00 AM
|
#4
|
Member
Registered: Jul 2003
Location: bangalore . india
Distribution: openSUSE 10.3
Posts: 251
Rep:
|
i think instead of changing the properties everytime you boot up..it would be better if you used the control center to modify your mouse settings to recognise your wheel mouse..my wheel mouse settings are for eg: PS/2 wheel mouse..
as for your second question: oyu want to boot into the command mode...you can change the init level to 3 (it must be 5 right now ) in your /etc/inittab file....
(do a man inittab to understand what different init levels mean)
|
|
|
08-02-2003, 09:16 AM
|
#5
|
Member
Registered: Jul 2003
Location: Alaska, USA
Distribution: Red Hat 9
Posts: 179
Rep:
|
What is X ?
|
|
|
08-02-2003, 09:21 AM
|
#6
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
think of it as "windows".. the pointy click system that gnome / kde sits on top of
|
|
|
08-02-2003, 11:49 AM
|
#7
|
Member
Registered: Jul 2003
Location: Lancaster, Pa
Distribution: Red Hat 9.0
Posts: 46
Original Poster
Rep:
|
Quote:
Originally posted by shishir
i think instead of changing the properties everytime you boot up..it would be better if you used the control center to modify your mouse settings to recognise your wheel mouse..my wheel mouse settings are for eg: PS/2 wheel mouse..
|
When you say "control center," what are you referring to?
I've already edited my /etc/X11/XF86Config file to make use of the 7 buttons my mouse has (4 buttons, plus the wheel button, plus the 2 wheel directions), and running xmodmap is the only way to let X know which two "buttons" refer to the Z-axis. I just put the command into a .xsession file. Let's see if it works....
|
|
|
08-02-2003, 11:59 AM
|
#8
|
Member
Registered: Jul 2003
Location: bangalore . india
Distribution: openSUSE 10.3
Posts: 251
Rep:
|
there is a system tool..control center that you can access from the "start" button of your desktop....
it is something like your control panel in windows....
makes life a lot easier...
|
|
|
08-02-2003, 05:42 PM
|
#9
|
Member
Registered: Jul 2003
Location: Lancaster, Pa
Distribution: Red Hat 9.0
Posts: 46
Original Poster
Rep:
|
Quote:
Originally posted by david_ross
1) Try putting it at the end of rc.local or .xsession
|
I've tried editing both my .xsession and rc.local files, and neither do the trick. I still need to manually run "xmodmap." And I haven't been able to, btw, discover some sort of mouse config option through X. The only thing I can find resembling that in RH9 is the ability to switch actual brands of mice, and whether or not I want to emulate a 3-button mouse. Gah.
|
|
|
08-02-2003, 06:11 PM
|
#10
|
Senior Member
Registered: Apr 2003
Location: Eire
Distribution: Slackware 12.0, OpenSuse 10.3
Posts: 1,120
Rep:
|
I thought either .xsession or .xinitrc was the way to go too
Have a look at
/etc/X11/xinit/xinitrc
it's got some references to files that should help
(or even put it in there)
|
|
|
All times are GMT -5. The time now is 03:51 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|