Skip to content

Commit

Permalink
Default shell on Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
vicr123 committed May 7, 2024
1 parent e13d2d0 commit 46b8304
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
#include <QFontDatabase>
#include <QJsonObject>

#ifdef Q_OS_UNIX
#include <pwd.h>
#include <unistd.h>
#endif

struct TerminalProfilePrivate {
QString profileName = "default";
QFont font;
Expand Down Expand Up @@ -100,7 +105,8 @@ QString TerminalProfile::defaultShell() {
#ifdef Q_OS_WIN
return QStringLiteral("C:/Windows/System32/powershell.exe");
#else
return "/bin/bash";
auto passwd = getpwuid(getegid());
return QString(passwd->pw_shell);
#endif
}
#endif

0 comments on commit 46b8304

Please sign in to comment.