LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-04-2003, 02:51 PM   #1
AlteZza2k2
Member
 
Registered: Sep 2003
Posts: 39

Rep: Reputation: 15
running a command when x starts


im trying to get my Microsoft Intellimouse Explorer to work and so i need to auto run a command when xstarts, i tried doing this by creating a .xinitrc file in my home directory and adding xmodmap -e "pointer = 1 2 3 6 7 4 5", however when i restart x, it goes to start up, but then just goes back to console and wont start. what am i doing wrong? why does x refuse to start when i create the .xinitrc file? is there any other way i could run this command when x starts?

Last edited by AlteZza2k2; 10-04-2003 at 09:32 PM.
 
Old 10-04-2003, 09:33 PM   #2
AlteZza2k2
Member
 
Registered: Sep 2003
Posts: 39

Original Poster
Rep: Reputation: 15
anyone?
 
Old 10-04-2003, 09:47 PM   #3
quatsch
LQ Addict
 
Registered: Aug 2003
Location: New York, NY
Distribution: gentoo, gentooPPC
Posts: 1,661

Rep: Reputation: 48
from man startx:
Quote:
The .xinitrc is typically a shell script which starts many clients
according to the user's preference. When this shell script exits,
startx kills the server and performs any other session shutdown needed.
basically, your .xinitrc is too short. It does what you tell it to do and then terminates. The man page gives the following sample .xinitrc
Quote:
xrdb -load $HOME/.Xresources
xsetroot -solid gray &
xbiff -geometry -430+5 &
oclock -geometry 75x75-0-0 &
xload -geometry -80-0 &
xterm -geometry +0+60 -ls &
xterm -geometry +0-100 &
xconsole -geometry -0+0 -fn 5x7 &
exec twm
My guess is that you would have an .xinitrc that looks like:
Code:
xmodmap -e "pointer = 1 2 3 6 7 4 5"
exec kdm
if you're using gdm, it would be exec gdm instead of kdm.
 
Old 10-05-2003, 12:09 AM   #4
AlteZza2k2
Member
 
Registered: Sep 2003
Posts: 39

Original Poster
Rep: Reputation: 15
nope, didnt work, x stopped starting

is there anywhere esle i can add this command to get it to auto execute?
 
Old 10-05-2003, 12:26 AM   #5
quatsch
LQ Addict
 
Registered: Aug 2003
Location: New York, NY
Distribution: gentoo, gentooPPC
Posts: 1,661

Rep: Reputation: 48
maybe /etc/X11/xinit/xinitrc
in my case the above calls the script
/etc/X11/Xsession
and this might be a better place to try out. Do make a backup of this beforehand, though. You've got delete ~/.xinitrc as well.
 
Old 10-05-2003, 01:57 AM   #6
quatsch
LQ Addict
 
Registered: Aug 2003
Location: New York, NY
Distribution: gentoo, gentooPPC
Posts: 1,661

Rep: Reputation: 48
if you're using KDE, take a look here:

http://www.linuxquestions.org/questi...099#post518099
 
  


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
xmodmap not working in .xinitrc kmeehl Slackware 1 12-03-2004 05:14 PM
APT download of wireless-tools fails cheech66 Debian 1 06-24-2004 07:08 AM
mozilla geometry in .xinitrc brandonweinberg Linux - Newbie 2 02-08-2004 12:31 AM
two questions - mozilla & .xinitrc slackware stu Linux - Newbie 2 10-03-2003 09:27 PM
cannot download files in mozilla -save dialog not working, galeon not working cmisip Linux - General 0 08-03-2003 03:25 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:33 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