Bug 49544 - Set session button label according to icon title
Summary: Set session button label according to icon title
Status: RESOLVED FIXED
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: 1.1.2
Platform: FreeBSD Ports All
: NOR wishlist
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-10-22 22:09 UTC by Stephe
Modified: 2003-03-15 00:39 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
konsole2.png (deleted)
2003-03-13 01:19 UTC, David Adrian
Details
konsole1.png (deleted)
2003-03-13 01:19 UTC, David Adrian
Details
Initial login (6.53 KB, image/png)
2003-03-13 01:19 UTC, David Adrian
Details
Login to second account (8.52 KB, image/png)
2003-03-13 01:20 UTC, David Adrian
Details
Patch against KDE_3_1_BRANCH (586 bytes, text/plain)
2003-03-14 20:44 UTC, Stephan Binner
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stephe 2002-10-22 22:09:17 UTC
Version:           1.1.2 (using KDE KDE 3.0.2)
Installed from:    FreeBSD Ports
OS:          FreeBSD

A current tip of day: "...that you can let Konsole set the current directory as the window title? For Bash, put 'export PS1=$PS1"\[\e]0;\H:\w\a\]"' in your ~/.bashrc ."

If the window title sets the window title, how about having the icon
title set the session button label?

Future tip of the day?: "...that you can let Konsole set the current host as the session label? For Bash, put 'export PS1=$PS1"\[\e]1;\h\]"' in your ~/.bashrc . "
Comment 1 Dennis Haney 2003-03-02 01:49:14 UTC
This getting anywhere?
Comment 2 Stephan Binner 2003-03-12 20:25:56 UTC
What is this wish about? What you seem to describe is possible with 'export 
PS1=$PS1"\[\e]30;\h\a\]"' in .bashrc since KDE 3.0. 
Comment 3 David Adrian 2003-03-12 20:59:08 UTC
Thanks for the tip, that will help for some logins, but it's still not quite ideal.

I'd like to be able to have the session buttons display the current hostname
(and user, and  sometimes working directory, though that would get a little
big).  I'd like the button's text to be based on the the actual current prompt
without me having to change the .bashrc or export PS1 on each machine I login
to.  I log in to many machines, and on some of those I can't or shouldn't change
the local environment.

The title bar does this automatically.  Am I missing something?
Comment 4 Stephan Binner 2003-03-12 21:11:24 UTC
> I'd like the button's text to be based on the the actual current prompt without me 
> having to change the .bashrc or export PS1 on each machine I login to. 
 
You want to use different session types or the bookmark feature of Konsole 1.2. 
 
>  The title bar does this automatically. Am I missing something? 
 
What title bar? 
Comment 5 David Adrian 2003-03-12 22:23:08 UTC
Subject: Re:  Set session button label according to icon title

	Hello Stephan,

	I'm attaching a couple of images which should illustrate the 
problem.  The title bar I'm referring to is at the very top of the window. 
Note that it kept track of my username and the hostname when I ssh into the 
other machine.  That's what I was hoping I could do with the session buttons 
at the bottom.  I typically end up with have 8-15 sesssions per konsole and it 
gets confusing.

	I just noticed the bookmark feature today, and it looks very handy. But 
even that won't cover the case during which I have to quickly log into a series 
of different machines.

	Aside from that, konsole is by far my favorite terminal app.  Almost perfect.


On Wed, Mar 12, 2003 at 08:11:25PM -0000, Stephan Binner wrote:
> ------- You are receiving this mail because: -------
> You are a voter for the bug, or are watching someone who is.
>      
> http://bugs.kde.org/show_bug.cgi?id=49544     
> 
> ------- Additional Comments From binner@kde.org  2003-03-12 21:11 -------
> > I'd like the button's text to be based on the the actual current prompt without me 
> > having to change the .bashrc or export PS1 on each machine I login to. 
>  
> You want to use different session types or the bookmark feature of Konsole 1.2. 
>  
> >  The title bar does this automatically. Am I missing something? 
>  
> What title bar?

	Thanks much,

	Adrian


Created an attachment (id=1157)
konsole2.png

Created an attachment (id=1158)
konsole1.png
Comment 6 Dennis Haney 2003-03-12 22:56:29 UTC
the two pics are just empty?!?
Comment 7 David Adrian 2003-03-13 01:19:55 UTC
Created attachment 1160 [details]
Initial login
Comment 8 David Adrian 2003-03-13 01:20:53 UTC
Created attachment 1161 [details]
Login to second account
Comment 9 David Adrian 2003-03-13 01:21:23 UTC
Sorry about that; corrected attachments are up.
Comment 10 Stephan Binner 2003-03-13 10:18:29 UTC
>  The title bar does this automatically. Am I missing something? 
 
This looks like you let it set with a "\e]0;$USER@$HOST\a" sequence already. I can't 
think of another way how this is otherwise possible. :-) Now, change this to 
"\e]30;$USER@$HOST\a" or add this one and you're done with it. 
Comment 11 David Adrian 2003-03-13 16:34:40 UTC
I understand the mechanism for changing the titlebar at the top.  If you look at
the bottom of those images, you will see that the text next to the icon on the
session button did not change.  That is, instead of 15 sessions that say
"Shell", I'd like to have each button display the active $USER@$HOST even if I
haven't tweaked the .bashrc on the destinations.
Comment 12 Stephan Binner 2003-03-13 17:14:33 UTC
I understand you (now). Both can be set independently so you have to set both if you 
want to change both. That simple. :-) 
Comment 13 Dennis Haney 2003-03-13 23:31:17 UTC
Great, But how do you set the session title from within the shell? That you can
change it by going through some menu somewhere is by my standards completely
useless if its the only way.
Comment 14 Stephan Binner 2003-03-14 14:52:21 UTC
Like written in the previous comments: echo -e "\e]30;foobar\a" 
Comment 15 David Adrian 2003-03-14 16:42:22 UTC
But is there a way to have the button text "follow" me through various logins,
to systems which I have not previously accessed?  That is the behaviour of the
titlebar; why can't the buttons act the same way?  If I have to take a manual
action on these systems, I may as well hit Ctrl-Alt-S and set the button text
that way.
Comment 16 Stephan Binner 2003-03-14 20:44:53 UTC
Created attachment 1175 [details]
Patch against KDE_3_1_BRANCH
Comment 17 Stephan Binner 2003-03-14 20:45:41 UTC
> That is the behaviour of the titlebar; why can't the buttons act the same way? 
 
Change the source with proposed patch if you must have it working this way. 
Comment 18 David Adrian 2003-03-14 22:07:02 UTC
Thanks!  I'll check it out tonight or this weekend.
Comment 19 Dennis Haney 2003-03-15 00:39:54 UTC
Ahh Nice. Didnt notice the little 3, sorry.