diff --git a/Documentation/RunningTests.md b/Documentation/RunningTests.md index d282f43365b..2cf9a46918c 100644 --- a/Documentation/RunningTests.md +++ b/Documentation/RunningTests.md @@ -103,7 +103,7 @@ The system server entry looks as below: [TestRunner@ttyS0] Executable=/home/anon/tests/run-tests-and-shutdown.sh StdIO=/dev/ttyS0 -Environment=DO_SHUTDOWN_AFTER_TESTS=1 TERM=xterm PATH=/bin:/usr/bin:/usr/local/bin +Environment=DO_SHUTDOWN_AFTER_TESTS=1 TERM=xterm PATH=/usr/local/bin:/usr/bin:/bin User=anon WorkingDirectory=/home/anon BootModes=self-test diff --git a/Userland/Applications/Terminal/main.cpp b/Userland/Applications/Terminal/main.cpp index eec792eb0af..4840e319c0c 100644 --- a/Userland/Applications/Terminal/main.cpp +++ b/Userland/Applications/Terminal/main.cpp @@ -96,7 +96,7 @@ static void run_command(String command, bool keep_open) args[arg_index++] = "-c"; args[arg_index++] = command.characters(); } - const char* envs[] = { "TERM=xterm", "PAGER=more", "PATH=/bin:/usr/bin:/usr/local/bin", nullptr }; + const char* envs[] = { "TERM=xterm", "PAGER=more", "PATH=/usr/local/bin:/usr/bin:/bin", nullptr }; int rc = execve(shell.characters(), const_cast(args), const_cast(envs)); if (rc < 0) { perror("execve"); diff --git a/Userland/DevTools/HackStudio/main.cpp b/Userland/DevTools/HackStudio/main.cpp index 1817b2db721..e08df5dd023 100644 --- a/Userland/DevTools/HackStudio/main.cpp +++ b/Userland/DevTools/HackStudio/main.cpp @@ -114,7 +114,7 @@ static void update_path_environment_variable() path.append(getenv("PATH")); if (path.length()) path.append(":"); - path.append("/bin:/usr/bin:/usr/local/bin"); + path.append("/usr/local/bin:/usr/bin:/bin"); setenv("PATH", path.to_string().characters(), true); } diff --git a/Userland/Services/TelnetServer/main.cpp b/Userland/Services/TelnetServer/main.cpp index f6817cf5ae6..663a07b4e5b 100644 --- a/Userland/Services/TelnetServer/main.cpp +++ b/Userland/Services/TelnetServer/main.cpp @@ -70,7 +70,7 @@ static void run_command(int ptm_fd, String command) args[1] = "-c"; args[2] = command.characters(); } - const char* envs[] = { "TERM=xterm", "PATH=/bin:/usr/bin:/usr/local/bin", nullptr }; + const char* envs[] = { "TERM=xterm", "PATH=/usr/local/bin:/usr/bin:/bin", nullptr }; rc = execve("/bin/Shell", const_cast(args), const_cast(envs)); if (rc < 0) { perror("execve"); diff --git a/Userland/Shell/Shell.cpp b/Userland/Shell/Shell.cpp index 828b9f1c0c9..b16e7fef375 100644 --- a/Userland/Shell/Shell.cpp +++ b/Userland/Shell/Shell.cpp @@ -1821,7 +1821,7 @@ Shell::Shell() path.append(getenv("PATH")); if (path.length()) path.append(":"); - path.append("/bin:/usr/bin:/usr/local/bin"); + path.append("/usr/local/bin:/usr/bin:/bin"); setenv("PATH", path.to_string().characters(), true); }