Desktop automation
To begin with your desktop automation work just call 
dcop
, check the output, and 
go further down the pipeline. In Example C 3 you can see how this works in 
practice. After listing all applications registered with the DCOP server (for 
example, 
konqueror
's process ID 21209), we open a new Konsole session and 
display the first session name afterwards. Next we list our e mail accounts, check 
e mail, compact all e mail folders, and open a new KMail composer window with 
some predefined values.
Example: C 3   DCOP in action
% dcop
konsole 366
kmail
...
% dcop konsole 366 konsole newSession Test
% dcop konsole 366 session 1 sessionName
% dcop kmail KMailIface accounts
% dcop kmail default checkMail
% dcop kmail default compactAllFolders
% dcop kmail default openComposer info@kde.org "" "" "DCOP!" "Thanks  0
In Example C 4 we open our favorite URL in Konqueror and generate another 
browser window with two preloaded tabs. The next line hides the 
kicker
 panel, 
which is useful for presentations or unattended Kiosk mode. The next line brings 
back the panel to make sure you do not panic. Finally we switch to desktop 2 by 
using the published interface of the KDE window manager 
kwin
.
Example: C 4   More DCOP magic
% dcop
konqueror 21209
kicker
kwin
...
% dcop konqueror 21209 konqueror mainwindow#1 openURL http://www.ibm.com/linux
% dcop konqueror 21209 default openBrowserWindow http://www.kde.org
% dcop konqueror 21692 konqueror mainwindow#2 newTab http://www.linux.com
% dcop kicker qt/Panel hide
% dcop  dcop konqueror 21209 konqueror mainwindow#1 action fullscreen  activate
% dcop kicker qt/Panel show
% dcop kwin default setCurrentDesktop 2
 Appendix C. Desktop automation and scripting 
215






footer




 

 

 

 

 Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

spain web hosting

 

Our partners: PHP: Hypertext Preprocessor Cheap Web Hosting JSP Web Hosting Ontario Web Hosting  Jsp Web Hosting

Cheapest Web Hosting Java Hosting Cheapest Hosting

Visionwebhosting.net Business web hosting division of Vision Web Hosting Inc.. All rights reserved