Bug 199292

Summary: konsole cannot open cmd.exe when windows isn´t installed on C:-drive
Product: kde-windows Reporter: Antti Aalto <antti.aalto.10>
Component: generalAssignee: KDE-Windows <kde-windows>
Status: RESOLVED LATER    
Severity: normal CC: andriusmao, ps_ml, zerozeroraz
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Microsoft Windows   
Latest Commit: Version Fixed In:

Description Antti Aalto 2009-07-07 15:09:46 UTC
Version:           2.3 (using 4.2.95 (KDE 4.2.95 (KDE 4.3 RC1)), MS Visual Studio 2008 SP1)
Compiler:          cl.exe
OS:                Microsoft Windows (i686) release 5.1 (XP Professional)

Warning:Program 'C:/WINDOWS/system32/cmd.exe' could not be able to start whit parameters 'C:/WINDOWS/system32/cmd.exe'.

My windows is not installed in C:/windows so konsole cant find cmd.exe I fixed this problem making the directory and copying cmd into it.
Comment 1 Patrick Spendrin 2009-07-07 18:25:04 UTC
yes, this is to be expected, the patch for konsole is still very primitive and konsole far from stable.
Comment 2 Andrius 2009-07-23 22:26:16 UTC
one note: somehow konsolepart tries to use /bin/sh under wine, but cannot find it.
Comment 3 Andrius 2009-07-23 22:49:23 UTC
how about using getenv("PATH") [or getenv_s] in Session.cpp and then searching which dir in %PATH% contains cmd.exe?

Btw, why isn't $SHELL being used on non-Windows?
Comment 4 Andrius 2009-07-23 22:57:11 UTC
oh, nevermind, $SHELL is being used in both windows and non-windows.
(should %SHELL% be used in windows? How about %COMSPEC% [ http://en.wikipedia.org/wiki/ComSpec ] ? )
Comment 5 Michael Drüing 2009-07-25 11:57:00 UTC
Actually, Windows doesn't have %SHELL% (at least my version of XP doesn't). It does have, however, %COMSPEC%, which is probably the official way to do it.
Comment 6 Andrius 2009-07-25 21:09:35 UTC
MSYS sets $SHELL as "/bin/sh" and konsole gets weird behaviour when ran from it ( e.g.: scrolling bar appears in left)

wine reuses native $SHELL variable causing an incompatibility when trying to run native /bin/sh

So I believe qgetenv("COMSPEC") would work better than qgetenv("SHELL") in this case.
Comment 7 Jekyll Wu 2011-09-22 19:37:17 UTC
*** Bug 201237 has been marked as a duplicate of this bug. ***
Comment 8 Patrick Spendrin 2012-02-22 23:26:43 UTC
Since there is currently no work going on, I'd close this bug.