Renaming a Konsole session from commandline after ssh

倾然丶 夕夏残阳落幕 提交于 2019-12-05 17:57:40

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 $ 
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!