Android Studioを開くコマンド

Android Studioを開くコマンド

最近、Ubuntu 14.04 LTSシステムにeasystrokeをインストールしました。ショートカットストロークを追加したいのですが、どのコマンドを使用すればよいか教えてください。Android Studioの場所は

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

私が使用しているFirefoxなどの他のアプリでは

 wmctrl -a Firefox || firefox

しかし、これはAndroid Studioでは機能しません

また

xdg-open of /home/.... 

ターミナルではなくテキスト エディターで bash ファイルを開きます。

助けてください

答え1

このコマンドを使用すると:

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

二重引用符付きの完全パスを使用します。


からman 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.

答え2

これを試して:

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

うまくいかない場合は、これを試してください:

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

関連情報