LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 10-10-2003, 01:50 AM   #1
Toker
Member
 
Registered: Sep 2003
Distribution: Mandrake9.1
Posts: 92

Rep: Reputation: 15
Trouble with autostart in kde...


I have created two files now... 'Autostart' in the Autostart driectory of $HOME/.kde and $HOME/.xsession

I ran chmod +x on both files and both files contain the same text:

#!/bin/bash
xmodmap -e "pointer = 1 2 3 6 7 4 5"

Yet, everytime I restart/reboot, the command is not executed and I need to set it manually...

Any ideas how to fix this or a possible work-around?
 
Old 10-10-2003, 10:08 AM   #2
Toker
Member
 
Registered: Sep 2003
Distribution: Mandrake9.1
Posts: 92

Original Poster
Rep: Reputation: 15
Shameless bump, anyone this morning have an idea?
 
Old 10-10-2003, 10:28 AM   #3
lugoteehalt
Senior Member
 
Registered: Sep 2003
Location: UK
Distribution: Debian
Posts: 1,215
Blog Entries: 2

Rep: Reputation: 49
Shouldn't it be chmod u+x to make it executable by you the user? Incidentally perhaps needs to be executable by root as well, in which case chmod a+x.

Another thing: xmodmap is presumably an X program so it can only execute when X is running. You are trying to run it before x has started. Having said that I think I use xset m 5/1 5 to make the mouse more sensitive in .xsession or .xinitrc.

That reminds me: the computer might not be looking at .xsession, depending on how it is set up. The file .xsession, if it is used, is the target of a symbolic link from .xinitrc - think that is what its called, at least something simmilar - is some distributions. But not in others where .xsession is not used. So check if .xinitrc is a real file or a s link. It it is a real file put your command in there not in .xsession.

Vis these two files. X runs as long as a program in .xsession is running. When nothing is running X exits. So the last line needs to be your window manager. And any program that doesn't automatically exit itself needs to have a & after it. E.g.

xterm -e lynx &
xset m 5/1 5
xclock &
fvwm2

The & makes program run in background.

Longest post by far.

Incidentally, question of my own, would

xterm -e lynx &
xset m 5/1 5
xclock &
fvwm2
xtoolplaces

get it to remember where the windows were so you could reconstruct your desktop the next time you were in X with:

.xtoolplaces, having first chmoded it to executable?

Last edited by lugoteehalt; 10-10-2003 at 10:33 AM.
 
Old 10-10-2003, 10:53 AM   #4
Toker
Member
 
Registered: Sep 2003
Distribution: Mandrake9.1
Posts: 92

Original Poster
Rep: Reputation: 15
Meaning the .xsession runs before x is loaded? Even so, the Autostart in .kde would run after x is loaded as kde is booting, correct?

Also, since I'm still a newb, how do I know if .xinitrc is a real file or a link? If I'm reading your post correctly, when x loads it runs the .xititrc file? That file will hold information as to what other files need to be run at startup?

Reason I ask, I did a kedit on $HOME/.xinitrc and a blank file came up. Am I looking in the right place? How do I set konqueror to show hidden files? (presuming .file signifies a hidden file.)
 
Old 10-10-2003, 11:25 AM   #5
lugoteehalt
Senior Member
 
Registered: Sep 2003
Location: UK
Distribution: Debian
Posts: 1,215
Blog Entries: 2

Rep: Reputation: 49
What I said about .xsession running before X is loaded is misleading or wrong, because you can definitely start an xclock in it I seem to remember. So forget that.

A symbolic link, which often appears in a fetching light blue with the ls (list the files commad), simply points to a file. Thus you could do:

ln -s /mnt/floppy F

in you home directory and then ls would produce a list of files one of which is called F. Then ls F would produce a list of the files on the floppy, assuming floppy mounted there - otherwise /floppy. cp F/file.txt Documents would copy file.txt from the floppy to your Documents directory, etc. etc.

Do:
ls -al (list all, long form) to see what the nature of the files is. If not coloured then look at the first character on the left. think its s for symbolic link and nothing for a regular file. If nothing in it do not understand how a window manager starts.

If you tried to edit .xinitrc and empty then assuming file name correct and no mistake - you need /home/fred/.xinitrc - then put something in it. Surprised your window manager didn't do this automatically.

Hope helps.
 
Old 10-10-2003, 11:41 AM   #6
Toker
Member
 
Registered: Sep 2003
Distribution: Mandrake9.1
Posts: 92

Original Poster
Rep: Reputation: 15
This is the output from 'ls -al'
Quote:
-rw-rw-r-- 1 michael michael 12 Oct 9 23:59 .desktop
drwxrwxr-x 3 michael michael 4096 Oct 10 11:21 Desktop/
drwxr-xr-x 3 michael michael 4096 Oct 10 11:28 Documents/
-rw-rw-r-- 1 michael michael 0 Oct 9 23:57 .drakfw
-rw-rw-r-- 1 michael michael 61060 Oct 9 23:58 .fonts.cache-1
drwxr-xr-x 2 michael michael 4096 Oct 9 19:49 .gimp-1.2/
drwxr-xr-x 2 michael michael 4096 Oct 9 23:59 .gnome2/
-rw-rw-r-- 1 michael michael 119 Oct 9 23:58 .gtkrc
-rw-rw-r-- 1 michael michael 124 Oct 9 23:58 .gtkrc-2.0
-rw-rw-r-- 1 michael michael 1119 Oct 10 11:24 .gtkrc-kde
-rw------- 1 michael michael 221 Oct 10 11:24 .ICEauthority
drwxr-xr-x 4 michael michael 4096 Oct 9 23:59 .kde/
-rw-r--r-- 1 michael michael 141 Oct 9 19:48 .mailcap
drwxr-xr-x 3 michael michael 4096 Oct 9 23:59 .mcop/
-rw------- 1 michael michael 31 Oct 10 11:24 .mcoprc
drwxrwxr-x 2 michael michael 4096 Oct 9 23:59 .qt/
-rw-r--r-- 1 michael michael 3761 Oct 9 19:48 .screenrc
drwx------ 2 michael michael 4096 Oct 9 19:48 tmp/
-rw------- 1 michael michael 624 Oct 10 00:12 .viminfo
-rw-rw-r-- 1 michael michael 4 Oct 10 11:24 .wmrc
-rw------- 1 michael michael 116 Oct 10 11:24 .Xauthority
---x--x--x 1 michael michael 48 Oct 10 10:10 .xmodmap*
---x--x--x 1 root root 48 Oct 10 11:06 .xsession*
-rw-r--r-- 1 michael michael 2 Oct 10 00:28 .xsession~
-rw------- 1 michael michael 2054 Oct 10 11:31 .xsession-errors
Since I don't see the .xinitrc file, I suppose that's why it came up blank. I'll go ahead and create the file. I'm also looking at the .xsession file... As I'm screwing around on this, I think I tried messing with that file as root, I'll switch the user back to me and see what happens...

**edit**
Do I need to make the .xinitrc file an executable (chmod -x)? Just creating it with the xmodmap line didn't work.

Last edited by Toker; 10-10-2003 at 07:06 PM.
 
Old 10-10-2003, 03:49 PM   #7
Toker
Member
 
Registered: Sep 2003
Distribution: Mandrake9.1
Posts: 92

Original Poster
Rep: Reputation: 15
This is now fixed, but should anyone else come across this same issue, the problem was in that I was editing the $HOME/ files when I should have been working (as root) with the main X files in /etc/X11/

The final place I found this would work was to put the xmodmap line in /etc/X11/Xsession

Thanks for the help lugo!
 
  


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
SUSE 9.3 KDE autostart ionmich SUSE / openSUSE 1 10-17-2005 08:28 AM
autostart kde ZaphyR Linux - Software 8 12-15-2004 05:52 AM
KDE Autostart Shafted Linux - Software 2 12-01-2004 09:14 PM
KDE won't go past Autostart dexwest Fedora 0 07-02-2004 01:34 AM
Kde 2 Autostart folder rfc1700 Linux - General 1 03-12-2001 09:04 PM


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