Controlling KVpnc using DCOP ======================== DCOP use is simple: dcop kvpnc- KVpncInterface The PID (process identifier number) can be obtained by: ps ax | grep kvpnc | grep -v grep The first number in line is the PID. Hint: You can use kdcop for browsing the applications which can be controlled and their functions. KVpnc provides the following functions: -------------------------------------------------- QCStringList interfaces() QCStringList functions() TQString getVersion() void doConnect() void doDisconnect() uint getConnectedTime() TQString getStatus() TQString getCurrentProfile() void setProfile(TQString profilename) void createNewProfile() void createNewProfileWithWizard() void deleteCurrentProfile() void openPreferences() void doImportCert() void doImportPcf() void doImportPcf(TQString file) void doImportOpenvpnConfig() void doImportOpenvpnConfig(TQString file) QStringList profiles() QStringList toolinfo() void doQuit() void doGenerateOpenvpnKey() void doSendFeedbackMail() QStringList getProfileTypes() Return and parameter data types: ------------------------------------------ TQString text (TQString format) QStringList string list - list of text (TQString format) QCStringList string list - list of text (C format) uint unsigned int - number void empty - no return value Examples: ------------- 1. List all profile names root@linux# dcop kvpnc-3957 KVpncInterface profiles profile1 profile2 profile3 2. Get information about tools root@linux# dcop kvpnc-3957 KVpncInterface toolinfo vpnc,Found,0.3.3,full, gnome-ssh-askpass,Found,No info,full, ksshaskpass,Found,0.4.1,full, ssh,Found,5.1p1,full, tail,Found,6.10,full, cisco_cert_mgr,Found,4.8.01 (0640),full, vtund,Not found,No info,none, bash,Found,No info,full, pkcs11-tool,Found,No info,full, route,Found,1.98,full, ifconfig,Found,1.42,full, ip,Found,iproute2-ss080725,full, ping,Found,iputils-sss20071127,full, killall,Found,22.6,full, kill,Found,3.2.7,full, openvpn,Found,2.1_rc11,full, openssl,Found,0.9.8g,full, iptables,Found,v1.4.1.1,full, setkey,Found,0.7.1,full, openl2tpd,Found,No info,full, xl2tpd,Found,xl2tpd-1.2.0,full, l2tpd,Not found,No info,none, pptp,Found,1.7.2,full, pppd,Found,2.4.4,full, ipsec,Found,strongSwan U4.2.4,full, racoonctl,Found,No info,full, vpnclient,Found,4.8.01 (0640),full, 3. change current profile to hs_harz dcop kvpnc-3957 KVpncInterface setProfile 'hs_harz'