[Kde-pim] kmail dbus method to hide in systray doesn't work

vatbier vatbier at yahoo.com
Sat Nov 8 14:40:28 GMT 2008

KMail Version 1.10.1
Using KDE 4.1.2

In KDE 3.5.9 I could use this command when logging into KDE to start kmail
hidden in systray:
dcop $(dcopstart kmail) kmail-mainwindow#1 setHidden on

In KDE 4.1.2 I'm trying to use dbus-send command:
dbus-send --type=method_call --dest=org.kde.kmail 
 /kmail/kmail_manwindow_1 com.trolltech.Qt.QWidget.setHidden boolean:true
dbus-send --type=method_call --dest=org.kde.kmail
 /kmail/kmail_manwindow_1 com.trolltech.Qt.QWidget.setHidden boolean:false
dbus-send --type=method_call --dest=org.kde.kmail
 /kmail/kmail_manwindow_1 com.trolltech.Qt.QWidget.setHidden :1
dbus-send --type=method_call --dest=org.kde.kmail 
 /kmail/kmail_manwindow_1 com.trolltech.Qt.QWidget.setHidden :0
dbus-send --type=method_call --dest=org.kde.kmail 
 /kmail/kmail_manwindow_1 com.trolltech.Qt.QWidget.hide
None of these work, the kmail window just doesn't get hidden in systray.

I suspect the dbus interface of kmail is not correctly/fully implemented.
I'll file a bug report at bugs.kde.org.
Or does any one of you know a dbus-send command that works?

For the moment I did find another way to start kmail hidden when logging
into KDE:
script kmailstarthiddeninsystray:
sleep 15
kstart --skiptaskbar --iconify kmail

sleep 15: otherwise the kmail window keeps appearing on the desktop
The only problem is that I have to press the kmail icon in the systray
three times before kmail window appears.


KDE PIM mailing list kde-pim at kde.org
KDE PIM home page at http://pim.kde.org/

More information about the kde-pim mailing list