You mean this
This is not working i tried by restarting.
No, that’s completely wrong.
.xinitrc
is a simple shell script that gets executed when your user’s X11 session starts. imwheel
is a command that accepts parameters. So, add the imwheel
command with the correct parameters to your .xinitrc
file with an editor.
I didn’t get that just tell me in simple words what to do.
What are you trying to do with imwheel
?
Is related to this
But after the OP “found the solution” to run everything with sudo
in their home directory, i told myself not to interact anymore …
bro it does work but looking for auto start it on startup.
That much is obvious, but that was not my question.
This comes closer to what I was asking.
imwheel
is usable as a command, and as I understand it, it will automatically read its configuration file upon starting. You have already created such a file, so that’s fine.
.xinitrc
is a shell script, i.e. a text file with commands that has been marked executable and is executed when you log into your graphical session — except with Wayland, but that does not apply to you because you’re using XFCE, which doesn’t support Wayland.
Thus, open up the file .xinitrc
in a text editor and add the line…
imwheel
… to the bottom of the file, followed by a blank line. Then save the file, log out and log back in.
Your .xinitrc
file appears to be empty apart from that imwheel
command. This is not normal.
Are you sure that this is the file /home/shivan/.xinitrc
, and that you did not instead create an .xinitrc
file on your desktop?
Notes:
-
Don’t use screenshots for text output. Click the </> icon in the toolbar of the post editor and paste the output in between the tags.
-
The output of your command history does indeed suggest that you created an empty file
/home/shivan/Desktop/.xinitrc
instead of adding theimwheel
command to your existing/home/shivan/.xinitrc
.
yeah i created it but where do i find that file u r talking about.
Which is not what I told you to do…
It is a hidden file directly under your home directory.
[nx-74205:/dev/pts/3][/home/aragorn]
[aragorn] > ls -l .xinitrc
-rwx------ 1 aragorn aragorn 1545 Sep 16 2021 .xinitrc
I am unable to copy the written code in .xinitrc file it is not showing the copy option from gnu nano but i add imwheel after giving a space of one line in the end.
All you had to do is fill in the right command in the command field: imwheel (or browse to imwheel in /bin)
that is not so hard?
Middle-clicking works, normally. But make sure you first position the cursor on the correct line.
Also, you didn’t have to use nano
; there are GUI-based editors too.
#!/bin/bash
#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)
userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap
SESSION=${1:-xfce-session}
# merge in defaults and keymaps
if [ -f $sysresources ]; then
xrdb -merge $sysresources
fi
if [ -f $sysmodmap ]; then
xmodmap $sysmodmap
fi
if [ -f "$userresources" ]; then
xrdb -merge "$userresources"
fi
if [ -f "$usermodmap" ]; then
xmodmap "$usermodmap"
fi
# start some nice programs
if [ -d /etc/X11/xinit/xinitrc.d ] ; then
for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
[ -x "$f" ] && . "$f"
done
unset f
fi
get_session(){
local dbus_args=(--sh-syntax --exit-with-session)
case "$1" in
awesome) dbus_args+=(awesome) ;;
bspwm) dbus_args+=(bspwm-session) ;;
budgie) dbus_args+=(budgie-desktop) ;;
cinnamon) dbus_args+=(cinnamon-session) ;;
deepin) dbus_args+=(startdde) ;;
enlightenment) dbus_args+=(enlightenment_start) ;;
fluxbox) dbus_args+=(startfluxbox) ;;
gnome) dbus_args+=(gnome-session) ;;
i3|i3wm) dbus_args+=(i3 --shmlog-size 0) ;;
jwm) dbus_args+=(jwm) ;;
kde) dbus_args+=(startplasma-x11) ;;
lxde) dbus_args+=(startlxde) ;;
lxqt) dbus_args+=(lxqt-session) ;;
mate) dbus_args+=(mate-session) ;;
xfce) dbus_args+=(xfce4-session) ;;
openbox) dbus_args+=(openbox-session) ;;
*) dbus_args+=("$1") ;;
esac
echo "dbus-launch ${dbus_args[*]}"
}
exec $(get_session "$1")
imwheel
it this ok but not working restarted.
i tried it by putting both
imwheel
and
/bin/imwheel
Your screenshot higher up contains references to a file named ~/.mousewheel.sh
.
-
Does that file exist?
-
If it does exist, where did it come from?
-
What are the permissions and ownership on that file? (You used
sudo
, which you should not have done.) -
What are the contents of that file?
-
Apparently you can start
imwheel
manually. How do you start it?
mousewheel.sh file is on my desktop
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.