As a lefty playing Minecraft on the left hand is quite difficult due to some bugs. I wanted to make a workaround and when I start the minecraft launcher I also change my mouse from lefty mode to right hand mode and undoing this after having finished minecraft. This ussually does not require special rights. Here is the command I used for this. It worked pretty well.

xmodmap -e "pointer = 1 2 3" && java -jar /home/blackbox/minecraft/launcher.jar && xmodmap -e "pointer = 3 2 1"

After having made this command I wanted to place it in a .desktop file using gnome-desktop-item-edit. Wich worked fine until I wanted to execute it, nothing happened. I tried editing it with gedit, wich did not fix the problem. I also tried this just with

java -jar /home/blackbox/minecraft/launcher.jar 

wich worked well.

The starter file looked like this:

#!/usr/bin/env xdg-open
[Desktop Entry]
Name[de_DE]=Minecraft Launcher
Exec= xmodmap -e "pointer = 1 2 3" && java -jar /home/blackbox/minecraft/launcher.jar && xmodmap -e "pointer = 3 2 1" 
Comment[de_DE]=Minecraft Launcher
Name=Minecraft Launcher
Comment=Minecraft Launcher
  • 1
    Why not wrap the commands in a script, and invoke the script from your .desktop file; or delete the space character after Exec= – waltinator Aug 24 '17 at 21:40
  • just delete the space after Exec? I am gonna try this. – Booming Aug 24 '17 at 22:22
  • @waltinator sorry, but removing the space character after Exec= did not work. Im gonna try scripting this tomorrow. – Booming Aug 24 '17 at 22:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.