Unable to start imwheel on startup

Your screenshot higher up contains references to a file named ~/.mousewheel.sh.

  1. Does that file exist?

  2. If it does exist, where did it come from?

  3. What are the permissions and ownership on that file? (You used sudo, which you should not have done.)

  4. What are the contents of that file?

  5. Apparently you can start imwheel manually. How do you start it?

mousewheel.sh file is on my desktop
Screenshot_2022-08-05_21-13-44
permissions look like this

#!/bin/bash
# Version 0.1 Tuesday, 07 May 2013
# Comments and complaints http://www.nicknorton.net
# GUI for mouse wheel speed using imwheel in Gnome
# imwheel needs to be installed for this script to work
# sudo apt-get install imwheel
# Pretty much hard wired to only use a mouse with
# left, right and wheel in the middle.
# If you have a mouse with complications or special needs,
# use the command xev to find what your wheel does.
#
### see if imwheel config exists, if not create it ###
if [ ! -f ~/.imwheelrc ]
then

cat >~/.imwheelrc<<EOF
".*"
None,      Up,   Button4, 1
None,      Down, Button5, 1
Control_L, Up,   Control_L|Button4
Control_L, Down, Control_L|Button5
Shift_L,   Up,   Shift_L|Button4
Shift_L,   Down, Shift_L|Button5
EOF

fi
##########################################################

CURRENT_VALUE=$(awk -F 'Button4,' '{print $2}' ~/.imwheelrc)

NEW_VALUE=$(zenity --scale --window-icon=info --ok-label=Apply --title="Wheelies" --text "Mouse wheel speed:" --min-value=1 --max-value=100 --value="$CURRENT_VALUE" --step 1)

if [ "$NEW_VALUE" == "" ];
then exit 0
fi

sed -i "s/\($TARGET_KEY *Button4, *\).*/\1$NEW_VALUE/" ~/.imwheelrc # find the string Button4, and write new value.
sed -i "s/\($TARGET_KEY *Button5, *\).*/\1$NEW_VALUE/" ~/.imwheelrc # find the string Button5, and write new value.

cat ~/.imwheelrc
imwheel -kill

it contain this code
i executed using sudo because ./ is not working i don’t know why.
i started it using CLI because manually it is not opening .
i only have admin user still.

That’s not where you should have put it.

Those are wrong. The file should be readable, writable and executable to yourself.

You obviously don’t understand the principle, so I’ll explain.

In UNIX systems, the current working directory is not in your $PATH, which is a variable that holds a list of directories where the system looks for executable files that can be run as commands.

Therefore, if you want to execute a file that has execute permission but that is not in the list of directories in the $PATH, then you must provide the correct path to this executable as part of the filename. This path to the file can be absolute — i.e. the complete path starting from the root directory — or it can be relative. ./ is a relative path which means “in this directory where I am now”.

As such, prefixing the command with ./ means “the file in my current working directory”. Only, in your case…

  • The file is not in your current working directory, because your current working directory is your home directory, while the file lives in your ~/Desktop directory; and

  • The file doesn’t have execute permission.

Try this…: :arrow_down:

mv ~/Desktop/mousewheel.sh ~/.config/autostart-scripts/
chmod 755 ~/.config/autostart-scripts/mousewheel.sh

Then try logging out and back in again.

i move mousewheel.sh file into my home directory.
i changed my permission to this
Screenshot_2022-08-05_21-51-39

mv ~/Desktop/mousewheel.sh ~/.config/autostart-scripts/
chmod 755 ~/.config/autostart-scripts/mousewheel.sh

This code i don’t understand
i copy paste it
it is showing me not found error
i copy paste it in 3 parts still lot of error

Just came across this thread, you can put this file in ~/.config/autostart directory to start imwheel on startup in Xfce. To check if it’s running or not, use pgrep imwheel, if it returns something then it’s running or else it isn’t.

[Desktop Entry]
Encoding=UTF-8
Version=0.9.4
Type=Application
Name=imwheel
Comment=
Exec=imwheel
OnlyShowIn=XFCE;
RunHook=0
StartupNotify=false
Terminal=false
Hidden=false

the code you write i guess
but with what file name and extention
i am at here

[shivam@shivam-inspiron3542 autostart]$ 

[shivam@shivam-inspiron3542 autostart]$ pgrep imwheel
1006
1127

it is showing this .

This is from Arch wiki about imwheel:

Command: imwheel --kill --buttons “4 5”
Name: Imwheel
Comment: set mouse scroll speed in different applications

This command should work, provided that you did make the configuration file in ~/.imwheelrc

I used to use imwheel and used this as config for a logitech mouse in Firefox:

"^Navigator$"
None,      Up,   Button4, 2
None,      Down, Button5, 2
Control_L, Up,   Control_L|Button4
Control_L, Down, Control_L|Button5
Shift_L,   Up,   Shift_L|Button4
Shift_L,   Down, Shift_L|Button5
1 Like

Thank u @bikehunter666 and all the guys help me in this specially @Aragorn who help me buy got annoyed by my noobiness.
It is Working now .

What i did to setup imwheel on my machine.

  1. install imwheel depending on your distro search for it .
".*"
None,      Up,   Button4, 7
None,      Down, Button5, 7
Control_L, Up,   Control_L|Button4
Control_L, Down, Control_L|Button5
Shift_L,   Up,   Shift_L|Button4
Shift_L,   Down, Shift_L|Button5

here 7 is the speed i set it for myself you can choose between 1 to 100 according to your needs.
remember it is global and applied throughout the system.
paste the above code in ~/.imwheelrc file
here gedit is the editor i use

 gedit ~/.imwheelrc

then save it .
3. Now go to the startup settings in your distro it might look like this after u create imwheel program to autostart


to create startup program of imwheel
Click on + icon
and fill these things there
Screenshot_2022-08-05_22-58-50
press OK
Then restart your PC
and voilà your default scroll speed is now set to 7 as in my case.

Glad it is working but you do realize that in your last post the * in your config file means for all applications? Never mind i didn’t notice you already know that…
If that is your intention it is fine of course, but you can also make specific configs for different programs, just copy the config and paste it in de same file with a blank line in between and alter the copy for your needs.

the --kill in my example is to ensure there are no running instances of imwheel.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.