Mandriva Expert
The place where your Mandriva Linux system finds support

autorunninga script

+/- details
User davecasserly
Incident Number 32055
Date 2002/09/16 22:03
Status Incident closed
Paid No

Product 8.2
Architecture x86_32
Scope Administration

Products owned
Community Support question - to convert into a paid question, click here

Lines in bold below have not yet been seen by the customer - those in blue are from the customer

Username : Date : Action : Comments [ close all ]    
 
davecasserly : 16/09/02 10:03 PM : Incident created
-   I have a script i want to autorun when my pc starts. Well i think its a script, im newbie.

I have a text file named ' mouse.sh ' in my ~/.kde3/Autostart folder. But it doesnt seem to want to run when i log in.

The script contains this:

#!/bin/sh
xmodmap -e "pointer = 1 2 3 6 7 4 5"
imwheel -k -b "67"

If i run the last 2 line separately in a terminal they work. if i just click on the file, it doesnt run.

ps. it is used to set up my intellimouse explorer.

Thanks

 
Linegod_7611 : 16/09/02 10:25 PM : Reply received
-   Check the permissions on the file:

# ls -la mouse.sh

You may want to do:

# chmod 775 mouse.sh

You can test it by doing:

# cd ~/.kde3/Autostart
# ./mouse.sh

-------
Note: If this answer resolves your problem, please remember to close this
incident.

 
davecasserly : 16/09/02 10:42 PM : More info provided
-   Yeah cheers. After searching for a bit i figured it might be permissions, so like you said, i chmod 755 and half of the script worked.

The original problem is solved. The new problem is

imwheel -k -b "67

will only execute under root. its chmod is 755, but the command just wont work if i type it into a terminal under my username.

Why

Cheers

 
davecasserly : 17/09/02 12:26 AM : More info provided
-   If i did

imwheel -k -b "67"

as a user, out put is:
Error: Could not write pid to pid file
Perhaps you want the -p option to avoid this...
Oterwise you may SUID root the iwheel executable
:Permission denied.

To ssolve it ive added the -p variable, but what does it mean by 'you may SUID root the imwheel executable?

Cheers

 
starfan : 17/09/02 05:38 AM : Reply received
-   SUID is a special permissions bit. What it does is when you assign this bit
when the program is executed, it runs with the permissions of the owner of the
file, even if the user running it is not the owner. So if a user ran the file
in this case, it would be like as if root had run it. Typically not something
you want to do to a lot of your files. It is only done is special cases,
mainly because it can pose a security problem if it is assigned to the wrong file.

A pip is process ID. Every process has a number assigned to it. Type at a
console (doing so as root produces the most results.)
ps -A
This lists currnet running processes and the number associated with them. This
is also how you determine which process to kill when a program has locked up
or gone awry. There are many uses for it. If you wanted to kill a process you
would do (remember that only the owner or root can kill a process)
kill -9 processIDnumber
They are usually 4 digit numbers
Occasionaly a process cannot be killed. Never try to kill init or process #1.
It is the parent of all processes and the first to start and last to stop when
the system is started and stopped. Killing it is like cutting off one's head.

I know, perhaps more than you wanted to know :) Hope this clears things up a
bit. If this answers your question, please be sure to close the incident. Thanks

 
 
davecasserly : 18/09/02 01:07 PM : Incident closed
-  



This Incident is closed. It can not be edited anymore. You can create a new one by signing up/logging in your Mandriva Expert account.

  Mandriva  |  Contact  |  Legal  |  Privacy  |  Careers