[Konsole-devel] [Bug 192212] konsole -e doesn't start a profile
Duncan
duncansgibb at gmail.com
Thu Jul 5 11:31:06 UTC 2012
https://bugs.kde.org/show_bug.cgi?id=192212
--- Comment #5 from Duncan <duncansgibb at gmail.com> ---
On 4 July 2012 17:09, Jekyll Wu <adaptee at gmail.com> wrote:
JW> Konsole shipped in KDE SC 4.9 has a dedicated action: "Clone Tab".
Is there/could there be an option to make that the action performed by
double-clicking on the empty part of the tab bar?
JW> For KDE SC 4.8, I don't think there is good workaround. If there
JW> is, that probably implies the code is buggy and inconsistent.
It does seem to be inconsistent - at least in 2.8.4 as shipped in Debian
unstable. If I create a profile with
Command=ssh -i /home/myuser/.ssh/mykey remoteuser at remotehost
and invoke
konsole --profile=MyCustomProfile
I get the behaviour I want - ie the old behaviour of
konsole -e ssh -i /home/myuser/.ssh/mykey remoteuser at remotehost
But if I try to shortcut this by invoking one of
konsole -p Command='ssh -i /home/myuser/.ssh/mykey remoteuser at remotehost'
konsole -p 'Command=ssh -i /home/myuser/.ssh/mykey remoteuser at remotehost'
I get
Warning: Could not find '/bin/ssh -i /home/myuser/.ssh/mykey
remoteuser at remotehos', starting '/bin/bash' instead. Please check
your profile settings.
which just means $PATH is wrong. But something of the form
konsole -p 'Command=/usr/bin/ssh -i /home/myuser/.ssh/mykey
remoteuser at remotehost'
opens a window which shuts immediately. strace reveals we're getting a
usage message back from ssh, and -p 'Command=/bin/bash -c ...' just runs
bash. So I think maybe "konsole -p 'Command=foo fooargs'" is dropping
fooargs on the floor.
I notice KDE4ProfileReader::readProfile handles the Command property
read from a file much like Application::processProfileChangeArgs handles
-e, using ShellCommand to get the binary name and its args. However
Application::createTabFromArgs handles "-p Command=..." differently:
const QString& command = tokens["command"];
...
if (!command.isEmpty()) {
newProfile->setProperty(Profile::Command, command);
newProfile->setProperty(Profile::Arguments, command.split(' '));
shouldUseNewProfile = true;
}
which looks dodgy to me.
I also get the feeling very few of the properties returned by
konsole --list-profile-properties
can actually be set with konsole -p. "Arguments" in particular.
I don't currently have a build environment for KDE, but if I get time to
create one, I'll see if I can test the git master version.
Cheers
Duncan
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the konsole-devel
mailing list