Befehl zum Öffnen von Android Studio

Befehl zum Öffnen von Android Studio

Ich habe vor kurzem Easystroke auf meinem Ubuntu 14.04 LTS-System installiert. Ich möchte einen Shortcut dafür hinzufügen. Könnt ihr mir sagen, welchen Befehl ich verwenden soll? Der Standort von Android Studio ist

/home/antony/Documents/Android Studio Installation Files/android-studio/bin/studio.sh

für andere Apps wie Firefox verwende ich

 wmctrl -a Firefox || firefox

aber das funktioniert nicht für Android Studio

Auch

xdg-open of /home/.... 

öffnet die Bash-Datei im Texteditor statt im Terminal.

Bitte helft mir, Leute

Antwort1

Mit diesem Befehl:

wmctrl -a "Android Studio" || "/home/antony/Documents/Android Studio Installation Files/android-studio/bin/studio.sh"

Verwenden Sie den vollständigen Pfad in Anführungszeichen.


ausman wmctrl

   -a <WIN>
          Switch to the desktop containing the window <WIN>, raise the window, and  give  it
          focus.


   <WIN>  This argument specifies a window that is the target of an action. By  default  the
          argument  is  treated  as  if were a string, and windows are examined until one is
          found with a title the contains the specified string as a substring. The substring
          matching  is done in a case insensitive manner. The -F option may be used to force
          exact, case sensitive title matching. The option -i may be used to  interpret  the
          window target as a numeric window identity instead of a string.

Antwort2

Versuche dies:

xdotool type "sh '/home/antony/Documents/Android Studio Installation Files/android-studio/bin/studio.sh'" ; xdotool key KP_Enter

wenn das nicht funktioniert, versuchen Sie Folgendes:

wmctrl -a "Android Studio" || "/home/antony/Documents/Android Studio Installation Files/android-studio/bin/studio.sh"

verwandte Informationen