From b549cf18cebd3435d70f62855239484974c455a1 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Sat, 12 Jan 2008 11:35:48 -0800 Subject: [PATCH] XQuartz: added 'login_shell' option to defaults so the user can choose something other than /bin/sh --- hw/xquartz/X11Application.h | 1 + hw/xquartz/X11Controller.m | 2 +- hw/xquartz/bundle/Makefile.am | 2 -- hw/xquartz/bundle/bundle-main.c | 3 ++- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/xquartz/X11Application.h b/hw/xquartz/X11Application.h index a1be7514a..af5aea2ce 100644 --- a/hw/xquartz/X11Application.h +++ b/hw/xquartz/X11Application.h @@ -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 */ diff --git a/hw/xquartz/X11Controller.m b/hw/xquartz/X11Controller.m index 6b7c35141..e13edc15d 100644 --- a/hw/xquartz/X11Controller.m +++ b/hw/xquartz/X11Controller.m @@ -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; diff --git a/hw/xquartz/bundle/Makefile.am b/hw/xquartz/bundle/Makefile.am index 951167002..00d540fee 100644 --- a/hw/xquartz/bundle/Makefile.am +++ b/hw/xquartz/bundle/Makefile.am @@ -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 \ diff --git a/hw/xquartz/bundle/bundle-main.c b/hw/xquartz/bundle/bundle-main.c index df78d7fb8..54d01368d 100644 --- a/hw/xquartz/bundle/bundle-main.c +++ b/hw/xquartz/bundle/bundle-main.c @@ -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;