From fc1aa63a44c8acaf851b62be2942f9f635abd6df Mon Sep 17 00:00:00 2001 From: Dmitry Maksyoma Date: Thu, 22 Jul 2021 00:20:34 +1200 Subject: [PATCH] Easy start script: use long GNU options -k, --kill, etc --- README.md | 6 +++--- builder/startup/deb/kasmvncserver-easy-start | 16 ++++++++-------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 788cb5b..4e92cb2 100644 --- a/README.md +++ b/README.md @@ -58,14 +58,14 @@ sudo addgroup $USER ssl-cert # You will need to re-connect in order to pick up the group change # Create ~/.vnc directory and corresponding files. -kasmvncserver-easy-start -d && kasmvncserver-easy-start -kill +kasmvncserver-easy-start --debug && kasmvncserver-easy-start --kill # On the first run, kasmvncserver-easy-start will ask you to choose a desktop # environment you want to run. It can detect Cinnamon, Mate, LXDE, KDE, Gnome, # XFCE. You can also choose to manually edit xstartup. # After you chose a desktop environment or to manually edit xstartup, # kasmvncserver-easy-start won't ask you again, unless you run it as: -kasmvncserver-easy-start -select-de +kasmvncserver-easy-start --select-de # Overwrite xstartup to launch your environment of choice, in this example LXDE # This may be optional depending on your system configuration @@ -83,7 +83,7 @@ Now navigate to your system at https://[ip-address]:8443/ To stop a running KasmVNC: ```sh -kasmvncserver-easy-start -kill +kasmvncserver-easy-start --kill ``` The options for vncserver: diff --git a/builder/startup/deb/kasmvncserver-easy-start b/builder/startup/deb/kasmvncserver-easy-start index 9be4ade..fc80ec9 100755 --- a/builder/startup/deb/kasmvncserver-easy-start +++ b/builder/startup/deb/kasmvncserver-easy-start @@ -151,14 +151,14 @@ process_cli_options() { show_help exit ;; - -d) + -d|--debug) enable_debug ;; - -kill) + -k|--kill) kill_vnc_server exit ;; - -select-de) + -s|--select-de) action=select-de-and-start ;; *) @@ -173,11 +173,11 @@ user_asked_to_select_de() { } show_help() { cat >&2 <<-USAGE -Usage: `basename $0` [options] - -d Debug output - -kill Kill vncserver - -select-de Select desktop environent to run - --help show this help +Usage: $(basename "$0") [options] + -d, --debug Debug output + -k, --kill Kill vncserver + -s, --select-de Select desktop environent to run + --help Show this help USAGE }