Ask / Submit

Revision history [back]

click to hide/show revision 1
initial version

posted 2015-02-05 10:48:37 +0300

I was talking about this at IRC and as a workaround I was suggested creating pulley shortcut for closing the Android Support and with some help I managed to create one. You need sudo for this.

  1. Create a script to stop the service.
  2. Allow executing that script with sudo without password
  3. Create .desktop file to /usr/share/applications, I copied htop.desktop.
  4. Add the shortcut to settings.

  1. I made /usr/local/bin/stopandroid with the following content:

#!/bin/sh /bin/systemctl stop aliendalvik.service

and to make sure it's owned and writable only by root

chown root:root /usr/local/bin/stopandroid chmod 755 /usr/local/bin/stopandroid

  1. visudo -f /etc/sudoers.d/stopandroid

and there

ALL ALL = (root) NOPASSWD: /usr/local/bin/stopandroid

  1. I created /usr/share/applications/stopandroid.desktop with the following content:

[Desktop Entry] Version=1.0 Name=StopAndroid Type=Application Comment=Stops Android Support Terminal=true Exec=sudo /usr/local/bin/stopandroid Categories=ConsoleOnly;System; GenericName=Android System Stopper

  1. The StopAndroid app should now be visible in the app launcher and you can add it to the shortcut/pulley menu and easily close it from there.

Thanks Coderus, Nicd- and tbr.

I was talking about this at IRC and as a workaround I was suggested creating pulley shortcut for closing the Android Support and with some help I managed to create one. You need sudo for this.

  1. Create a script to stop the service.
  2. Allow executing that script with sudo without password
  3. Create .desktop file to /usr/share/applications, I copied htop.desktop.
  4. Add the shortcut to settings.

  1. I made /usr/local/bin/stopandroid with the following content:

#!/bin/sh
/bin/systemctl stop aliendalvik.service

and to make sure it's owned and writable only by root

chown root:root /usr/local/bin/stopandroid
chmod 755 /usr/local/bin/stopandroid

  • visudo -f /etc/sudoers.d/stopandroid

  • and there

    ALL ALL = (root) NOPASSWD: /usr/local/bin/stopandroid
    

  • I created /usr/share/applications/stopandroid.desktop with the following content:

  • [Desktop Entry]
    Version=1.0
    Name=StopAndroid
    Type=Application
    Comment=Stops Android Support
    Terminal=true
    Exec=sudo /usr/local/bin/stopandroid
    Categories=ConsoleOnly;System;
    GenericName=Android System Stopper
    

  • The StopAndroid app should now be visible in the app launcher and you can add it to the shortcut/pulley menu and easily close it from there.

  • Thanks Coderus, Nicd- and tbr.