안드로이드 스튜디오를 여는 명령

안드로이드 스튜디오를 여는 명령

최근 Ubuntu 14.04 LTS 시스템에 easystrok을 설치했습니다. 동일한 단축키를 추가하고 싶습니다. 어떤 명령어를 사용해야 하는지 알려주실 수 있나요? 안드로이드 스튜디오의 위치는

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

내가 사용하는 Firefox와 같은 다른 앱의 경우

 wmctrl -a Firefox || firefox

하지만 이것은 안드로이드 스튜디오에서는 작동하지 않습니다

또한

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"

관련 정보