From 6ff71ed6e85967a0980a82d0b5f0cedc307b0aae Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Mon, 27 Jun 2022 13:32:40 +0200 Subject: [PATCH] Add scrcpy-console.desktop Add a launcher which opens a terminal, and keep it open in case of errors (so that the user has time to read error messages). The behavior is the same as scrcpy-console.bat on Windows. PR #3351 --- app/data/scrcpy-console.desktop | 12 ++++++++++++ app/meson.build | 2 ++ 2 files changed, 14 insertions(+) create mode 100644 app/data/scrcpy-console.desktop diff --git a/app/data/scrcpy-console.desktop b/app/data/scrcpy-console.desktop new file mode 100644 index 0000000000..da678e8220 --- /dev/null +++ b/app/data/scrcpy-console.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Name=scrcpy (console) +GenericName=Android Remote Control +Comment=Display and control your Android device +# For some users, `adb` is not in default $PATH but the one configured in .bashrc/ or .zshrc/... +# Run an interactive shell to get the same path used in terminals. +Exec=/bin/bash -i -c '"$SHELL" -i -c scrcpy || read -p "Press any key to quit..."' +Icon=scrcpy +Terminal=true +Type=Application +Categories=Utility;RemoteAccess; +StartupNotify=false diff --git a/app/meson.build b/app/meson.build index 74c6d0e655..a7ba4009e4 100644 --- a/app/meson.build +++ b/app/meson.build @@ -240,6 +240,8 @@ if host_machine.system() == 'linux' # Install a launcher (ex: /usr/local/share/applications/scrcpy.desktop) install_data('data/scrcpy.desktop', install_dir: join_paths(datadir, 'applications')) + install_data('data/scrcpy-console.desktop', + install_dir: join_paths(datadir, 'applications')) endif