LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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


Reply
  Search this Thread
Old 08-02-2003, 09:50 AM   #1
teyesahr
Member
 
Registered: Jul 2003
Location: Lancaster, Pa
Distribution: Red Hat 9.0
Posts: 46

Rep: Reputation: 15
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.
 
Old 08-02-2003, 09:53 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
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.
 
Old 08-02-2003, 09:57 AM   #3
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 66
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".
 
Old 08-02-2003, 10:00 AM   #4
shishir
Member
 
Registered: Jul 2003
Location: bangalore . india
Distribution: openSUSE 10.3
Posts: 251

Rep: Reputation: 33
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)
 
Old 08-02-2003, 10:16 AM   #5
PionexUser
Member
 
Registered: Jul 2003
Location: Alaska, USA
Distribution: Red Hat 9
Posts: 179

Rep: Reputation: 30
What is X ?
 
Old 08-02-2003, 10:21 AM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
think of it as "windows".. the pointy click system that gnome / kde sits on top of
 
Old 08-02-2003, 12:49 PM   #7
teyesahr
Member
 
Registered: Jul 2003
Location: Lancaster, Pa
Distribution: Red Hat 9.0
Posts: 46

Original Poster
Rep: Reputation: 15
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....
 
Old 08-02-2003, 12:59 PM   #8
shishir
Member
 
Registered: Jul 2003
Location: bangalore . india
Distribution: openSUSE 10.3
Posts: 251

Rep: Reputation: 33
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...
 
Old 08-02-2003, 06:42 PM   #9
teyesahr
Member
 
Registered: Jul 2003
Location: Lancaster, Pa
Distribution: Red Hat 9.0
Posts: 46

Original Poster
Rep: Reputation: 15
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.
 
Old 08-02-2003, 07:11 PM   #10
Looking_Lost
Senior Member
 
Registered: Apr 2003
Location: Eire
Distribution: Slackware 12.0, OpenSuse 10.3
Posts: 1,120

Rep: Reputation: 45
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)
 
  


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
Is there a single command to list all hardware installed (command line)? davee Linux - Hardware 6 02-28-2009 08:19 PM
Redirecting output to a command-line argument of another command madiyaan Linux - Newbie 1 02-19-2005 05:35 PM
Command to output file content line by line aznluvsmc Programming 2 09-12-2004 08:45 PM
51 characters only in the 1st Line of command line eggCover Linux - General 2 07-29-2004 02:28 PM
Where is Command line utility for Cups and command tutorial mossy Linux - Software 8 01-16-2004 01:24 AM


All times are GMT -5. The time now is 02:28 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration