Bug 176866 - Be able to change the tab title from dbus
Summary: Be able to change the tab title from dbus
Status: RESOLVED FIXED
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: 2.1
Platform: unspecified Linux
: NOR wishlist
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-04 08:58 UTC by Diederik van der Boor
Modified: 2009-11-03 22:34 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Add method void org.kde.konsole.Session.renameTab(QString tabName) (1.75 KB, patch)
2009-11-03 22:13 UTC, Marian Kyral
Details
Improved version (1.78 KB, patch)
2009-11-03 22:34 UTC, Marian Kyral
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Diederik van der Boor 2008-12-04 08:58:06 UTC
Version:           2.1 (using 4.1.3 (KDE 4.1.3) "release 63.3", KDE:KDE4:Factory:Desktop / openSUSE_11.0)
Compiler:          gcc
OS:                Linux (i686) release 2.6.25.18-0.2-default

In KDE 3 I've used dcop to change the tab title. This way I would easily show the file I had opened in vim, etc..

When I'm browsing the dbus interface with:
 qdbus $KONSOLE_DBUS_SERVICE $KONSOLE_DBUS_SESSION

These options don't seam to exist anymore.

Could you please make these features available again over dbus? Thank you for your time!
Comment 1 Diederik van der Boor 2008-12-04 09:00:14 UTC
FYI, this was the code I used in KDE 3:

if [ -n "$KONSOLE_DCOP_SESSION" ] && dcop >/dev/null 2>&1; then
  function dcop_title         { dcop $KONSOLE_DCOP_SESSION renameSession "$1"; }
  function rename_konsole_tab { dcop_title "$(pwd | sed -re 's/.*(.{30})$/\1/' )/"; }
  function vim  { dcop_title "vim $1"   && `type -P vim`  "$@"; }
  function man  { dcop_title "man $1"   && `type -P man`  "$@"; }
  function ssh  { dcop_title "ssh $1"   && `type -P ssh`  "$@"; }
  function su   { dcop_title "su $1 $2" && `type -P su`   "$@"; }
  function sudo { dcop_title "sudo $1"  && `type -P sudo` "$@"; }
  PROMPT_COMMAND=rename_konsole_tab
fi
Comment 2 Kurt Hindenburg 2009-02-22 21:24:22 UTC
Change this to a wish.  The dbus structure is not in Konsole yet.
Comment 3 kavol 2009-10-31 17:41:56 UTC
(In reply to comment #2)
> Change this to a wish.  The dbus structure is not in Konsole yet.

please, is there any ETA for this?
Comment 4 Marian Kyral 2009-11-01 19:49:17 UTC
I think this could be closed as actual stable konsole already contains DBUS interface.
Comment 5 Diederik van der Boor 2009-11-02 14:46:10 UTC
Confirmed!

qdbus org.kde.konsole  $KONSOLE_DBUS_SESSION setTitle 1 "lala"

guess I'll set my own bug report as fixed then.. ;-)
Comment 6 Marian Kyral 2009-11-02 17:38:19 UTC
Well, probably not so quickly :-(

I found that it is replaced back after while and I did not find a way how to prevent it.
Comment 7 Marian Kyral 2009-11-03 22:13:41 UTC
Created attachment 38058 [details]
Add method void org.kde.konsole.Session.renameTab(QString tabName)
Comment 8 Marian Kyral 2009-11-03 22:16:04 UTC
I have only one issue. It took several seconds to change the title. It is not immediately changed.
Comment 9 Marian Kyral 2009-11-03 22:34:33 UTC
Created attachment 38059 [details]
Improved version

Immediately change title. Maybe should be renamed to "renameSession".