<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>192212</bug_id>
          
          <creation_ts>2009-05-10 12:14:27 +0000</creation_ts>
          <short_desc>konsole -e doesn&apos;t start a profile</short_desc>
          <delta_ts>2017-02-13 18:37:58 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>konsole</product>
          <component>general</component>
          <version>2.2.3</version>
          <rep_platform>Compiled Sources</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Daniel">kdebugs.slum554</reporter>
          <assigned_to name="Konsole Bugs">konsole-bugs-null</assigned_to>
          <cc>adaptee</cc>
    
    <cc>duncansgibb</cc>
    
    <cc>voxadam</cc>
          
          <cf_commitlink></cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>754997</commentid>
    <comment_count>0</comment_count>
    <who name="Daniel">kdebugs.slum554</who>
    <bug_when>2009-05-10 12:14:27 +0000</bug_when>
    <thetext>Version:           2.2.3 (using Devel)
OS:                Linux
Installed from:    Compiled sources

When starting Konsole with the `konsole` command, without any options, it starts the default profile (in my case &quot;Shell&quot;), which is an expected behavior.
When starting Konsole with the &apos;-e&apos; option eg.:
`konsole -e /bin/sh -l`, it seems it doesn&apos;t start a profile, but just loads the default profile&apos;s options, and then stays in an ambiguous state:
1. execute: konsole -e /bin/sh -l
2. Edit Current Profile
3. The Profile Name is missing
3a. Changes to any konsole configuration option won&apos;t get saved to the default profile.

Passing the --profile option along with the &apos;-e&apos; doesn&apos;t help either.
Konsole should always start the default profile, when no --profile option is specified, furthermore, Konsole should respect the --profile option when used in conjunction with the &apos;-e&apos; parameter.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1162569</commentid>
    <comment_count>1</comment_count>
    <who name="Kurt Hindenburg">khindenburg</who>
    <bug_when>2011-09-14 03:28:53 +0000</bug_when>
    <thetext>Git commit 35fae00159372bb332de54edba3a0cbbc22855f6 by Kurt Hindenburg.
Committed on 14/09/2011 at 05:26.
Pushed by hindenburg into branch &apos;master&apos;.

When using -e &lt;command&gt; don&apos;t save to profile for new tabs.

    Currently using -e &lt;command&gt; will cause all new tabs/windows to run
    &lt;command&gt;.  This patch fixes that such that new tabs/windows will start
    the default profile.

    Patch by Gu Rui &lt;chaos.proton@gmail.com&gt; with minor edit by self.
    FIXED-IN: 4.8
    REVIEW: 102602
    CCBUG: 192212

M  +21   -16   src/Application.cpp

http://commits.kde.org/konsole/35fae00159372bb332de54edba3a0cbbc22855f6</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1272553</commentid>
    <comment_count>2</comment_count>
    <who name="Duncan">duncansgibb</who>
    <bug_when>2012-07-04 15:16:02 +0000</bug_when>
    <thetext>I just upgraded from KDE 4.6 to 4.8 and discovered this change in behaviour.  IMHO the old &quot;bug&quot; was a powerful feature - at least one I used a lot.  I have scripts and URI handlers run &quot;konsole -e ssh &lt;somehost&gt;&quot; and similar many many times a day and rely on double-click-for-new-tab opening another similar session to speed up my workflow.

Is there an option which gives the old behaviour (run the specified commad every time I open a new tab)?  If not, please could there be?  I tried to get the same effect with konsole -p &quot;command=&lt;foo&gt;&quot; but haven&apos;t figured out whether that works yet.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1272584</commentid>
    <comment_count>3</comment_count>
    <who name="Duncan">duncansgibb</who>
    <bug_when>2012-07-04 16:03:35 +0000</bug_when>
    <thetext>(In reply to comment #2)

For the benefit of anyone stumbling upon this, my workaround is to have the script launching konsole write the command previously passed as the value of -e to a temporary script, then pass -p command=/tmp/&lt;mytmpscript&gt;

Obviously this is not ideal because it litters /tmp with these subscripts.  Perhaps there is a bug in the handling of -p command=&lt;something fairly long&gt;?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1272585</commentid>
    <comment_count>4</comment_count>
    <who name="Jekyll Wu">adaptee</who>
    <bug_when>2012-07-04 16:09:09 +0000</bug_when>
    <thetext>Konsole shipped in KDE SC 4.9 has a dedicated action: &quot;Clone Tab&quot;. 

For KDE SC 4.8, I don&apos;t think there is good workaround. If there is, that probably implies the code is buggy and inconsistent.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1272881</commentid>
    <comment_count>5</comment_count>
    <who name="Duncan">duncansgibb</who>
    <bug_when>2012-07-05 11:31:06 +0000</bug_when>
    <thetext>On 4 July 2012 17:09, Jekyll Wu &lt;adaptee@gmail.com&gt; wrote:

JW&gt; Konsole shipped in KDE SC 4.9 has a dedicated action: &quot;Clone Tab&quot;.

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&gt; For KDE SC 4.8, I don&apos;t think there is good workaround. If there
JW&gt; 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@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@remotehost

But if I try to shortcut this by invoking one of

  konsole -p Command=&apos;ssh -i /home/myuser/.ssh/mykey remoteuser@remotehost&apos;
  konsole -p &apos;Command=ssh -i /home/myuser/.ssh/mykey remoteuser@remotehost&apos;

I get

  Warning: Could not find &apos;/bin/ssh -i /home/myuser/.ssh/mykey
remoteuser@remotehos&apos;, starting &apos;/bin/bash&apos; instead.  Please check
your profile settings.

which just means $PATH is wrong.  But something of the form

  konsole -p &apos;Command=/usr/bin/ssh -i /home/myuser/.ssh/mykey
remoteuser@remotehost&apos;

opens a window which shuts immediately.  strace reveals we&apos;re getting a
usage message back from ssh, and -p &apos;Command=/bin/bash -c ...&apos; just runs
bash.  So I think maybe &quot;konsole -p &apos;Command=foo fooargs&apos;&quot; 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 &quot;-p Command=...&quot; differently:

    const QString&amp; command = tokens[&quot;command&quot;];
...
    if (!command.isEmpty()) {
        newProfile-&gt;setProperty(Profile::Command,   command);
        newProfile-&gt;setProperty(Profile::Arguments, command.split(&apos; &apos;));
        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.  &quot;Arguments&quot; in particular.


I don&apos;t currently have a build environment for KDE, but if I get time to
create one, I&apos;ll see if I can test the git master version.


Cheers


Duncan</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1272932</commentid>
    <comment_count>6</comment_count>
    <who name="Jekyll Wu">adaptee</who>
    <bug_when>2012-07-05 13:30:26 +0000</bug_when>
    <thetext>The konsole shipped in debian sid is patched. The debian maintainer decides to revert one related commit after talking with me on this issure a few days ago on #kde-devel .  Just run &quot;apt-get source konsole&quot; to check the debian patch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1548532</commentid>
    <comment_count>7</comment_count>
    <who name="Adam Hunt">voxadam</who>
    <bug_when>2015-10-07 18:14:12 +0000</bug_when>
    <thetext>Bug related to downstream package modification.

Recommend close INVALID</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1548533</commentid>
    <comment_count>8</comment_count>
    <who name="Adam Hunt">voxadam</who>
    <bug_when>2015-10-07 18:14:23 +0000</bug_when>
    <thetext>Bug related to downstream package modification.

Recommend close INVALID</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>