Bug 199292 - konsole cannot open cmd.exe when windows isn´t installed on C:-drive
Summary: konsole cannot open cmd.exe when windows isn´t installed on C:-drive
Status: RESOLVED LATER
Alias: None
Product: kde-windows
Classification: Miscellaneous
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: KDE-Windows
URL:
Keywords:
: 201237 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-07-07 15:09 UTC by Antti Aalto
Modified: 2012-02-22 23:26 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.