On Friday 06 October 2006 13:18, James wrote: > > To get only the hostname (\h is substituted with the hostname as you can > > read in `man bash`) ... > > > > # export PS1=$PS1'\[\033]0;\h\007\]' > > Well I tryied this command by puting it in the .bashrc file on both > the host system and the target remote. It did not alter the > kde-session-tab at all. Then I tried just issuing the command > from the CLI and it did nothing either. So I'm not sure > I'm trying this solution as intended.
Are you absolutely certain that this option is enabled: Settings -> Configure Konsole -> General -> Set tab title to match window title ? And make sure you don't make a typo... Try it in e.g. an xterm also. You should see your hostname in the title. It works for me at least... > > Or for the ip you can try this evil command... ;) (it depends on > > sys-apps/iproute2 and will be overridden by $PS1 -- try in another > > terminal if you just typed the above command) ... > > > > # export PROMPT_COMMAND="ip -o -4 addr show scope global | sed -r 's/.* > ([12]?[0-9]?[0-9](\.[12]?[0-9]?[0-9]){3})\/.*/\x1b]0;\1\x7/'" > > From the command line I get this error: > bash: ip: command not found Uh, I forgot that I have created this symbolic link to allow users to execute ip (without giving the full path): # ls -l /bin/ip lrwxrwxrwx 1 root root 8 1 jun 11:28 /bin/ip -> /sbin/ip Prepending the command by /sbin/ should work too (if sys-apps/iproute2 is installed). -- Bo Andresen
pgpfd2yOfKeoA.pgp
Description: PGP signature