┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNate Graham <[email protected]>2023-04-04 07:58:16 -0600
committerNate Graham <[email protected]>2023-04-05 16:17:56 +0000
commit70e20a310a55a52d63077fbd62f3bbe0c642a9b5 (patch)
treebdd4fb1176202a4d8b8bf5951b9a232f82736fda
parent7ab740890822dba17055f2657a95e27956120f10 (diff)
Make "don't run me with sudo/kdesu" message informative
We tell users what not to do, but we don't tell then what to do instead. At one point we told them to just use Dolphin normally and the polkit integration would kick in, but that work ended up being reverted and abandoned. Instead, tell them to use kio-admin, which exists as a released product and will hopefully not get removed anytime soon. CCBUG: 467948
-rw-r--r--src/main.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp
index e1e559f97..2d1ccd0c8 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -54,10 +54,16 @@ int main(int argc, char **argv)
// Prohibit using sudo or kdesu (but allow using the root user directly)
if (getuid() == 0) {
if (!qEnvironmentVariableIsEmpty("SUDO_USER")) {
- std::cout << "Running Dolphin with sudo can cause bugs and expose you to security vulnerabilities." << std::endl;
+ std::cout << "Running Dolphin with sudo is not supported as it can cause bugs and expose you to security vulnerabilities. Instead, install the "
+ "`kio-admin` package from your distro and use it to manage root-owned locations by right-clicking on them and selecting \"Open as "
+ "Administrator\"."
+ << std::endl;
return EXIT_FAILURE;
} else if (!qEnvironmentVariableIsEmpty("KDESU_USER")) {
- std::cout << "Running Dolphin with kdesu can cause bugs and expose you to security vulnerabilities." << std::endl;
+ std::cout << "Running Dolphin with kdesu is not supported as it can cause bugs and expose you to security vulnerabilities. Instead, install the "
+ "`kio-admin` package from your distro and use it to manage root-owned locations by right-clicking on them and selecting \"Open as "
+ "Administrator\"."
+ << std::endl;
return EXIT_FAILURE;
}
}