4

I use dcop to rename a Konsole session, such as

dcop $KONSOLE_DCOP_SESSION renameSession "whatever"

However, when I ssh to a server and from there, I issue this command, it does not work and gives error:

ERROR: Couldn't attach to DCOP server!

Is there a way using dcop or otherwise to rename the Konsole session, even though I have ssh'ed to another computer.

1 Answer 1

8

The remote server appears not be running dcop and even if it were, that's not the instance you want to be communicating with (dcopserver on the remote host vs dcop on your local host).

You can use XTerm escape sequences to change the title via:

remotehost $ echo -ne "\033]0;Custom Window Title\007"

You can also change the individual tab title via:

remotehost $ echo -ne "\033]30;Custom Tab Title\007"

Another way would be to suspend your current ssh session so that you are back at the login you started.

e.g.

host1 $ ssh host2
host2 $ ~^Z [suspend ssh]

[1]+  Stopped                 ssh host2
host1 $ dcop $KONSOLE_DCOP_SESSION renameSession "whatever"
host1 $ fg
ssh host2
host2 $ 
Sign up to request clarification or add additional context in comments.

1 Comment

If you want to change both the title of the window and the tab in the Konsole session try echo -en "\e]30;Title Here\a" instead. Results in this: i.sstatic.net/cN8mY.png

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.