Changeset View
Changeset View
Standalone View
Standalone View
files/0001-Patch-out-notify-send-call.patch
| From d17ca1acbb0ab61dc546c671f09572d23a5fee8f Mon Sep 17 00:00:00 2001 | From 9b46acd3a0cf988dea810829036adc592c67a553 Mon Sep 17 00:00:00 2001 | ||||
| From: Joshua Strobl <joshua@stroblindustries.com> | From: Pierre-Yves <pyu@riseup.net> | ||||
| Date: Thu, 2 May 2019 16:29:11 +0300 | Date: Fri, 13 Dec 2019 19:10:28 +0100 | ||||
| Subject: [PATCH 1/1] Patch out notify-send call | Subject: [PATCH] Patch out notify-send call | ||||
| Signed-off-by: Pierre-Yves <pyu@riseup.net> | |||||
| --- | --- | ||||
| .../Additions/x11/Installer/98vboxadd-xclient | 7 +------ | .../Additions/x11/Installer/98vboxadd-xclient | 7 +---- | ||||
| src/VBox/Additions/x11/VBoxClient/main.cpp | 21 ------------------- | src/VBox/Additions/x11/VBoxClient/main.cpp | 28 +------------------ | ||||
| 2 files changed, 1 insertion(+), 27 deletions(-) | 2 files changed, 2 insertions(+), 33 deletions(-) | ||||
| diff --git a/src/VBox/Additions/x11/Installer/98vboxadd-xclient b/src/VBox/Additions/x11/Installer/98vboxadd-xclient | diff --git a/src/VBox/Additions/x11/Installer/98vboxadd-xclient b/src/VBox/Additions/x11/Installer/98vboxadd-xclient | ||||
| index dcad1ce8..a4f5df7f 100755 | index dcad1ce8..a4f5df7f 100755 | ||||
| --- a/src/VBox/Additions/x11/Installer/98vboxadd-xclient | --- a/src/VBox/Additions/x11/Installer/98vboxadd-xclient | ||||
| +++ b/src/VBox/Additions/x11/Installer/98vboxadd-xclient | +++ b/src/VBox/Additions/x11/Installer/98vboxadd-xclient | ||||
| @@ -21,12 +21,7 @@ for i in $HOME/.vboxclient-*.pid; do | @@ -21,12 +21,7 @@ for i in $HOME/.vboxclient-*.pid; do | ||||
| test -w $i || rm -f $i | test -w $i || rm -f $i | ||||
| done | done | ||||
| -if ! test -c /dev/vboxguest 2>/dev/null; then | -if ! test -c /dev/vboxguest 2>/dev/null; then | ||||
| - # Do not start if the kernel module is not present. | - # Do not start if the kernel module is not present. | ||||
| - # Execute notify-send in the back-ground to avoid racing with sddm, | - # Execute notify-send in the back-ground to avoid racing with sddm, | ||||
| - # as notify-send may wait for sddm to start while it waits for us to exit. | - # as notify-send may wait for sddm to start while it waits for us to exit. | ||||
| - notify-send "VBoxClient: the VirtualBox kernel service is not running. Exiting." & | - notify-send "VBoxClient: the VirtualBox kernel service is not running. Exiting." & | ||||
| -elif test -z "${SSH_CONNECTION}"; then | -elif test -z "${SSH_CONNECTION}"; then | ||||
| +if test -z "${SSH_CONNECTION}"; then | +if test -z "${SSH_CONNECTION}"; then | ||||
| # This script can also be triggered by a connection over SSH, which is not | # This script can also be triggered by a connection over SSH, which is not | ||||
| # what we had in mind, so we do not start VBoxClient in that case. We do | # what we had in mind, so we do not start VBoxClient in that case. We do | ||||
| # not use "exit" here as this script is "source"d, not executed. | # not use "exit" here as this script is "source"d, not executed. | ||||
| diff --git a/src/VBox/Additions/x11/VBoxClient/main.cpp b/src/VBox/Additions/x11/VBoxClient/main.cpp | diff --git a/src/VBox/Additions/x11/VBoxClient/main.cpp b/src/VBox/Additions/x11/VBoxClient/main.cpp | ||||
| index b5429fbc..219cba0c 100644 | index daaed569..41b7293b 100644 | ||||
| --- a/src/VBox/Additions/x11/VBoxClient/main.cpp | --- a/src/VBox/Additions/x11/VBoxClient/main.cpp | ||||
| +++ b/src/VBox/Additions/x11/VBoxClient/main.cpp | +++ b/src/VBox/Additions/x11/VBoxClient/main.cpp | ||||
| @@ -83,27 +83,6 @@ void vbclFatalError(char *pszMessage) | @@ -113,34 +113,8 @@ int vbclLogNotify(const char *pszMessage) | ||||
| int rc = VINF_SUCCESS; | |||||
| - if (g_cRespawn == 0) | |||||
| + if (g_cRespawn != 0) | |||||
| { | { | ||||
| char *pszCommand; | - char *pszCommand = RTStrAPrintf2("notify-send \"VBoxClient: %s\"", pszMessage); | ||||
| int status; | |||||
| - if (pszMessage && cRespawn == 0) | |||||
| - { | |||||
| - pszCommand = RTStrAPrintf2("notify-send \"VBoxClient: %s\"", pszMessage); | |||||
| - if (pszCommand) | - if (pszCommand) | ||||
| - { | - { | ||||
| - status = system(pszCommand); | - int status = system(pszCommand); | ||||
| - | |||||
| - RTStrFree(pszCommand); | |||||
| - | |||||
| - if (WEXITSTATUS(status) != 0) /* Utility or extension not available. */ | - if (WEXITSTATUS(status) != 0) /* Utility or extension not available. */ | ||||
| - { | - { | ||||
| - pszCommand = RTStrAPrintf2("xmessage -buttons OK:0 -center \"VBoxClient: %s\"", | - pszCommand = RTStrAPrintf2("xmessage -buttons OK:0 -center \"VBoxClient: %s\"", | ||||
| - pszMessage); | - pszMessage); | ||||
| - if (pszCommand) | - if (pszCommand) | ||||
| - { | - { | ||||
| - status = system(pszCommand); | - status = system(pszCommand); | ||||
| - if (WEXITSTATUS(status) != 0) /* Utility or extension not available. */ | - if (WEXITSTATUS(status) != 0) /* Utility or extension not available. */ | ||||
| - { | - { | ||||
| - RTPrintf("VBoxClient: %s", pszMessage); | - RTPrintf("VBoxClient: %s", pszMessage); | ||||
| - } | - } | ||||
| - | |||||
| - RTStrFree(pszCommand); | |||||
| - } | - } | ||||
| - else | |||||
| - rc = VERR_NO_MEMORY; | |||||
| - } | - } | ||||
| - } | - } | ||||
| - } | - else | ||||
| _exit(RTEXITCODE_FAILURE); | rc = VERR_NO_MEMORY; | ||||
| } | } | ||||
| -- | -- | ||||
| 2.21.0 | 2.24.1 | ||||
Copyright © 2015-2021 Solus Project. The Solus logo is Copyright © 2016-2021 Solus Project. All Rights Reserved.