From 566f2f023e8c30de7629c7b65a28c45bdc012378 Mon Sep 17 00:00:00 2001 From: Jon TURNEY Date: Tue, 30 Jun 2009 17:42:39 +0100 Subject: [PATCH] Execute commands using a login bash shell Change executing commands in XWinrc from using '/bin/sh -c' to using '/bin/bash -l -c' Tidy up system.Xwinrc, give xterm a scroll bar (after applying this patch, setup.hint should be changed to add bash to X server's dependencies) (orginally from a patch by Ken Brown ) --- hw/xwin/_usr_X11R6_lib_X11_system.XWinrc | 7 +++++-- hw/xwin/winprefs.c | 5 +++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/hw/xwin/_usr_X11R6_lib_X11_system.XWinrc b/hw/xwin/_usr_X11R6_lib_X11_system.XWinrc index 2360bfc..8e74d0c 100644 --- a/hw/xwin/_usr_X11R6_lib_X11_system.XWinrc +++ b/hw/xwin/_usr_X11R6_lib_X11_system.XWinrc @@ -18,6 +18,9 @@ # ^^ This command will have any "%display%" # string replaced with the proper display # variable (i.e. 127.0.0.1:.0) +# (This should only rarely be needed as +# the DISPLAY environment variable is also +# set correctly) # or MENU # or ALWAYSONTOP # ^^ Sets the window to display above all others @@ -79,8 +82,8 @@ // Make some menus... menu apps { - xterm exec "xterm" - "Emacs" exec "emacs" + xterm exec "xterm -sb" + "Emacs" exec "emacs" notepad exec notepad xload exec "xload -display %display%" # Comment } diff --git a/hw/xwin/winprefs.c b/hw/xwin/winprefs.c index c5fd7eb..6d7073d 100644 --- a/hw/xwin/winprefs.c +++ b/hw/xwin/winprefs.c @@ -371,8 +371,9 @@ HandleCustomWM_COMMAND (unsigned long hwndIn, /* Disassociate any TTYs */ setsid(); - execl ("/bin/sh", - "/bin/sh", + execl ("/bin/bash", + "/bin/bash", + "-l", "-c", m->menuItem[j].param, NULL); -- 1.6.3.2