[Konsole-devel] DCOP to DBUS migration - issues

Marián Kyral mkyral at email.cz
Mon Nov 2 20:55:59 UTC 2009


Hi all,
this weekend I finale migrated my script from DCOP to DBUS to fully switch to a new Konsole (2.3.3 - KDE 4.3.2).

The script is simple, just get a server alias as a parameter, find out stored parameters (simple
configuration file), starts a new konsole tab, setup it (rename tab, set correct character set...)
and call ssh to the server.

After migration I have this (core):
-----------------------------------------------
  function sendCommand
  {
    qdbus org.kde.konsole /Sessions/${session} org.kde.konsole.Session.sendText "$(echo $1 $'\r')" 1>/dev/null 2>/dev/null
  }

  # create new session
    session=$(dbus-send --session --dest=org.kde.konsole --type=method_call --print-reply=number /Konsole org.kde.konsole.Konsole.newSession string:"ssh-$SSH_CHARSET" string:"~" |cut -c 10-)

    sendCommand "clear"
    sendCommand "export TERM=$SSH_TERM"
    sendCommand "ssh ${SSH_USER}@${SSH_IP} -p ${SSH_PORT}"
    qdbus org.kde.konsole /Sessions/${session} org.kde.konsole.Session.setTitle 1 ${SSH_USER}@${SSH_LABEL}
----------------------------------------------

There are a lot of servers, usually I need up to 10 servers, but are changing and sometime 
I need to connect to production (a lot of shops). Some servers are linux and have UTF-8 encoding, 
but mostly there are AIX servers with ISO-8859-2 set.

Now the issues I found:

1) Probably a qdbus bug 

$ session=$(qdbus org.kde.konsole /Konsole org.kde.konsole.Konsole.newSession "Shell" "/home")
Invalid number of parameters

2) 
 * For each character set I need a different profile
 * For each color schema I need a different profile (test, production)
 * If I want to have a different font size for some specific server(s) - I need another profiles

 It means I need to create a profile for each possible combination. 
  (utf8-test-standard_font, utf8-prod-standard_font, iso8899-2-test...)

3) There is not a possibility to copy/clone actual profile. I have to create each from default.

4) There is no information which profile is used.

5) The biggest problem for me: I want to permanent rename the tab. It though
 "org.kde.konsole.Session.setTitle()" will do it and it does. But only for a while. Then is renamed back.
  And I did not found a way how to prevent it. Even with blank format for remote connection it is 
  replaced after a while (by session name).

  I really want to see my aliases as a tab name. Now I have IP or some cryptic name set by unix admins 
  and I'm totally lost and sometimes I'm not sure on which server I'm working now. 
  Especially if there is only "SQL>" (the oracle sqlplus prompt).

Some ideas:
1) Allow to set character set via DBUS - It is already available under the View menu.
2) Allow to increase/decrease font size via DBUS
3) Add possibility to permanent rename of tab. E.g. option "Don't update tab name" under tab setting.

Regards,
Marian Kyral



More information about the konsole-devel mailing list