Bug 38055 - wishlist: automatic session rename feature
Summary: wishlist: automatic session rename feature
Status: RESOLVED FIXED
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: NOR wishlist
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-02-13 13:33 UTC by ezhik1
Modified: 2007-05-08 00:07 UTC (History)
0 users

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 ezhik1 2002-02-13 13:23:13 UTC
(*** This bug was imported into bugs.kde.org ***)

Package:           konsole
Version:           KDE 2.2.2 
Severity:          wishlist
Installed from:    Debian testing/unstable Packages
Compiler:          Not Specified
OS:                Linux
OS/Compiler notes: Not Specified

it would be great if Konsole could automatically rename session names depending on the program name that currently runs in it. for instance if a user opens plain terminal it would rename session to username@machinename.

i'm using Konsole to access different machines with different logins quite often and it is annoying to keep them syncronized manually. of course if implemented this feature should be optional preferably with global setting for all the new opeing sessions and also individually configurable for each one.

sorry if this feature is already implemented but i did not find any mentioning of it in bugs.kde.org

(Submitted via bugs.kde.org)
(Called from KBugReport dialog. Fields Application KDE Version OS Compiler manually changed)
Comment 1 Greg Allen 2002-10-24 13:44:03 UTC
Konsole already has a control code sequence to rename the session - esc ] 3 0 ; 
BLAH bel. This poorly documented - I had to look at the source code to find it! 
If it is in a document somewhere, that document should be easier to find.

This could be used appropriately in the shell to title the session after the 
current command, host or whatever- e.g. in the prompt, or in a pre/post cmd 
alias (tcsh).

In csh/tcsh this alias will rename the session.

alias sess   'echo "\033]30;\!*\007\c"'

Greg
Comment 2 Stephan Binner 2003-03-12 20:30:22 UTC
*** Bug has been marked as fixed ***.
Comment 3 Lorenz Froihofer 2005-02-18 00:30:05 UTC
I don't know whether this feature request was intended for the window title of a session only.

It would be very helpful if this automatic renaming of sessions could be applied to session tabs of a single konsole application too. Of course, there should be a configuration option to switch between automatic and manual renaming of session tab titles.

I cannot find such a feature in konsole version 1.4.2, KDE 3.3.2

Kind regards,
  Lorenz.
Comment 4 Stéphane Teletchéa 2005-06-08 12:06:13 UTC
I think this bug is not closed since it was meant for SESSION title and not KONSOLE itself.

From what i see this *feature* is still not available, although a lnog run has been done (from kde 2.2 to 3.4.1 and counting).

Should i feed in another wish ?


Stef
Comment 5 Yves Glodt 2005-09-04 14:16:21 UTC
#4: Is it the tab title you are speaking of? If yes, it would indeed be handy
if e.g. the tab title would be the same than the prompt of the shell it contains...

Right now, the window title of konsole already has the $prompt+ " - Konsole"
Comment 6 Yves Glodt 2005-09-04 14:44:42 UTC
Ok this does the trick, add this in your .bashrc:
export PS1=$PS1"\[\e]30;\w\a\]"

or if you prefer user@host notation:
export PS1=$PS1"\[\e]30;\u@\H:\w\a\]"


Comment 7 Stéphane Teletchéa 2005-09-05 22:19:16 UTC
Thanks a lot Yves, this does the trick i'm expecting (i've altered it a little to best fit my needs, but basically you've done all the work).

1000 mercis :-)

Stéphane
Comment 8 Olivier LAHAYE 2006-12-26 14:22:42 UTC
I was about to post a wish as google didn't help and doc didn't mention it.

PLEASE, DOCUMENT this feature! (at least in the tip of the day section)
Comment 9 Robert Knight 2006-12-26 22:47:00 UTC
Reopened bug - I agree with Olivier's comments on documentation.  We should make this feature easier to find.  There is also a set of related scripts on kde-apps.org which could also be mentioned.
Comment 10 Robert Knight 2007-05-08 00:07:01 UTC
Implemented via live tab titles feature in KDE 4.  Separate formats for local and remote applications can be specified and Konsole will switch between them automatically. 

Documentation bug mentioned in this report has yet to be fixed.  A separate report can be opened for that.