-
 KDE-Apps.org Applications for the KDE-Desktop 
 GTK-Apps.org Applications using the GTK Toolkit 
 GnomeFiles.org Applications for GNOME 
 MeeGo-Central.org Applications for MeeGo 
 CLI-Apps.org Command Line Applications 
 Qt-Apps.org Free Qt Applications 
 Qt-Prop.org Proprietary Qt Applications 
 Maemo-Apps.org Applications for the Maemo Plattform 
 Java-Apps.org Free Java Applications 
 eyeOS-Apps.org Free eyeOS Applications 
 Wine-Apps.org Wine Applications 
 Server-Apps.org Server Applications 
 apps.ownCloud.com ownCloud Applications 
--
-
 KDE-Look.org Artwork for the KDE-Desktop 
 GNOME-Look.org Artwork for the GNOME-Desktop 
 Xfce-Look.org Artwork for the Xfce-Desktop 
 Box-Look.org Artwork for your Windowmanager 
 E17-Stuff.org Artwork for Enlightenment 
 Beryl-Themes.org Artwork for the Beryl Windowmanager 
 Compiz-Themes.org Artwork for the Compiz Windowmanager 
 EDE-Look.org Themes for your EDE Desktop 
--
-
 Debian-Art.org Stuff for Debian 
 Gentoo-Art.org Artwork for Gentoo Linux 
 SUSE-Art.org Artwork for openSUSE 
 Ubuntu-Art.org Artwork for Ubuntu 
 Kubuntu-Art.org Artwork for Kubuntu 
 LinuxMint-Art.org Artwork for Linux Mint 
 Arch-Stuff.org Art And Stuff for Arch Linux 
 Frugalware-Art.org Themes for Frugalware 
 Fedora-Art.org Artwork for Fedora Linux 
 Mandriva-Art.org Artwork for Mandriva Linux 
--
-
 KDE-Files.org Files for KDE Applications 
 OpenTemplate.org Documents for OpenOffice.org
 GIMPStuff.org Files for GIMP
 InkscapeStuff.org Files for Inkscape
 ScribusStuff.org Files for Scribus
 BlenderStuff.org Textures and Objects for Blender
 VLC-Addons.org Themes and Extensions for VLC
--
-
 KDE-Help.org Support for your KDE Desktop 
 GNOME-Help.org Support for your GNOME Desktop 
 Xfce-Help.org Support for your Xfce Desktop 
--
openDesktop.orgopenDesktop.org:   Applications   Artwork   Linux Distributions   Documents    LinuxDaily.com    Linux42.org    OpenSkillz.com   
 
Apps
News
Groups
Knowledge
Events
Forum
People
Jobs
Register
Login


Sponsoring


-
- Content .- Fans (1) . 

Change konsole session name

  

KDE Improvement

Score 43%
Change konsole session name
zoom


Link:  http://
Downloads:  1742
Submitted:  Mar 23 2004
Updated:  Mar 25 2004

Description:

This little script on your ~/.bashrc will change the konsole session name on the fly. Also will put the remote host name if you connect it with ssh wraper kssh.

This can serve you to make more interesting things.

The screenshot is the original 5 minutes script.




Changelog:

0.21:
-Bug fix: now "really" works for root

0.2:
-No magic in konsole detection: use of KONSOLE_DCOP_SESSION enviroment variable
-Only change konsole name only when needed
-Implemented the wintermte's idea as a internal function. Called kssh

0.1:
-Initial release.




LicenseGPL
Send to a friend
Subscribe
Other  Apps  from mrthc
Report inappropriate content



-
.

 Very nice!

 
 by aplsin on: Mar 23 2004
 
Score 50%

Very nice script, really like it!
Btw, do you know if theres any way to make this work when you su to root too?


Reply to this

-
.

 Re: Very nice!

 
 by mrthc on: Mar 23 2004
 
Score 50%

use "su -m" or put an alias in your .bashrc

alias su="su -m"

like I have


Reply to this

-
.

 Re: Re: Very nice!

 
 by aplsin on: Mar 24 2004
 
Score 50%

thaht didn't work.. :/


Reply to this

-

 Possible enhancement

 
 by wintermte on: Mar 23 2004
 
Score 50%

I have a possible enhancement for this that can rename the Konsole session when you ssh to another host to the remote host name.

Try this in the .bashrc (mostly the same):
# Look if the parent is konsole
dcop konsole-$PPID &> /dev/null
if [ $? -eq 0 ]; then
#OK we are on konsole
PROMPT_COMMAND=touch_konsole
export INKONSOLE=$PPID
else
export INKONSOLE=0
fi#!/bin/sh
# Look if the parent is konsole
echo $INKONSOLE
if [ $INKONSOLE -gt 0 ]; then
#OK we are on konsole
CURRENT_SESSION=`dcop konsole-$INKONSOLE konsole currentSession`
dcop konsole-$INKONSOLE $CURRENT_SESSION renameSession "$1"
fi

/usr/bin/ssh -X $1 # the -X is optional

alias ssh="~/bin/ssh"


Create a script in ~/bin/ called ssh which contains:

#!/bin/sh
# Look if the parent is konsole
echo $INKONSOLE
if [ $INKONSOLE -gt 0 ]; then
#OK we are on konsole
CURRENT_SESSION=`dcop konsole-$INKONSOLE konsole currentSession`
dcop konsole-$INKONSOLE $CURRENT_SESSION renameSession "$1"
fi

/usr/bin/ssh -X $1


Dan Freed
Reply to this

-

 The last directories

 
 by romvinot on: Mar 25 2004
 
Score 50%

I like this little script and it has already been added to my bashrc.

Could it be possible to get only the last 3 directories instead of the whole path (from $HOME) ?


Reply to this

-

 Re: The last directories

 
 by mrthc on: Mar 25 2004
 
Score 50%

Can you explain better? write here or mail me thc{at}wanadoo{dot}es.

Thanks


Reply to this

-
.

 Re: Re: The last directories

 
 by pdreker on: Mar 25 2004
 
Score 50%

I am not the original poster, but I think what he means is that only the last 3 components of the path should be used to rename the konsole session.

I have a rather deep directory structure here and using your script would sometimes rename my konsole session to e.g. "~/Desktop/Development/Debian/Packages/somepackage-1.2.3/debian" which is a little bit too long to be really useful (the tabs become really wide)...

Using only the last 2 or 3 components the session would be renamed to "Packages/somepackage-1.2.3/debian" or "somepackage-1.2.3/debian". Still rather long but better than the aforementioned name ;-)

One usually knwos where approximately one is in one's own dir structure, so one only needs a short reminder which session is where. The complete path is uneccessary IMO...


Patrick
Reply to this

-
.

 SUing

 
 by Traktopel on: Mar 25 2004
 
Score 50%

When I su.. I get "bash: touch_konsole: command not found" upon running _any_ command with root.

Any ideas?


Reply to this

-

 Re: SUing

 
 by mrthc on: Mar 26 2004
 
Score 50%

you must put the code in root's bashrc.


Reply to this

-

 Looks similar

 
 by bk12 on: Mar 26 2004
 
Score 50%

Looks similar to this one:

http://kde-look.org/content/show.php?content=6976


Reply to this

Add commentBack






-
-
How do you like Plasma 5?
 The best KDE Desktop ever.
 Definitely a nice improvement.
 Not decided yet. Haven't tried it yet.
 I do not like some of the changes.
 KDE is taking the wrong way.
 I am still sticking with KDE 3.5.
 I have no opinion, but wanted to vote anyway.

resultmore
 
 
 Who we are
Contact
More about us
Frequently Asked Questions
Register
Twitter
Blog
Explore
Apps
Jobs
Knowledge
Events
People
Updates on identi.ca
Updates on Twitter
Facebook App
Content RSS   
Events RSS   

Participate
Groups
Forum
Add App
Public API
About KDE-Apps.org
Legal Notice
Spreadshirt Shop
CafePress Shop
Advertising
Sponsor us
Report Abuse
 

Copyright 2003-2014 KDE-Apps.org Team  
All rights reserved. KDE-Apps.org is not liable for any content or goods on this site.
All contributors are responsible for the lawfulness of their uploads.
KDE and K Desktop Environment are trademarks of KDE e.V.