Skip to content

Instantly share code, notes, and snippets.

@khast3x
Created August 9, 2017 19:54
Show Gist options
  • Select an option

  • Save khast3x/65c8dd83575a4565b5fe554aff1330a0 to your computer and use it in GitHub Desktop.

Select an option

Save khast3x/65c8dd83575a4565b5fe554aff1330a0 to your computer and use it in GitHub Desktop.

Revisions

  1. khanon created this gist Aug 9, 2017.
    16 changes: 16 additions & 0 deletions gui_manager.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,16 @@
    #/bin/bash

    echo "== START OR STOP GUI FOR KALI VM =="
    echo ""
    echo "ssh $USER@$HOSTNAME"
    echo ""
    echo ""
    if [[ $1 = "start" ]];
    then systemctl set-default graphical.target;echo "Starting GUI at reboot"
    elif [[ $1 = "stop" ]];
    then systemctl set-default multi-user.target;echo "Stopping GUI at reboot"
    elif [[ $1 = "ssh" ]];
    then echo "Adding SSH on boot -- AUTHORIZED KEY REQUIRED";systemctl enable ssh
    else
    echo "Choose $0 [start|stop|ssh]"
    fi