XQuartz: added 'login_shell' option to defaults

so the user can choose something other than /bin/sh
This commit is contained in:
Jeremy Huddleston 2008-01-12 11:35:48 -08:00
parent c0e889bb58
commit b549cf18ce
4 changed files with 4 additions and 4 deletions

View File

@ -97,5 +97,6 @@ extern int quartzHasRoot, quartzEnableRootless;
#define PREFS_SWAP_ALT_META "swap_alt_meta"
#define PREFS_XP_OPTIONS "xp_options"
#define PREFS_ENABLE_STEREO "enable_stereo"
#define PREFS_LOGIN_SHELL "login_shell"
#endif /* X11APPLICATION_H */

View File

@ -302,7 +302,7 @@
argv[0] = "/usr/bin/login";
argv[1] = "-fp";
argv[2] = getlogin();
argv[3] = "/bin/sh";
argv[3] = [X11App prefs_get_string:@PREFS_FAKE_BUTTON2 default:"/bin/sh"];
argv[4] = "-c";
argv[5] = command;
argv[6] = NULL;

View File

@ -18,8 +18,6 @@ EXTRA_DIST = \
Info.plist \
X11.icns \
bundle-main.c \
launcher-main.c \
server-main.c \
English.lproj/InfoPlist.strings \
English.lproj/Localizable.strings \
English.lproj/main.nib/classes.nib \

View File

@ -38,6 +38,7 @@
#define DEFAULT_CLIENT "/usr/X11/bin/xterm"
#define DEFAULT_STARTX "/usr/X11/bin/startx"
#define DEFAULT_SHELL "/bin/sh"
static int execute(const char *command);
static char *command_from_prefs(const char *key, const char *default_value);
@ -82,7 +83,7 @@ static int execute(const char *command) {
newargv[0] = "/usr/bin/login";
newargv[1] = "-fp";
newargv[2] = getlogin();
newargv[3] = "/bin/sh";
newargv[3] = command_from_prefs("login_shell", DEFAULT_SHELL);
newargv[4] = "-c";
newargv[5] = command;
newargv[6] = NULL;