1 Introduction
2 ------------
3
4 The desktop package provides desktop environment detection and resource
5 opening support for a selection of common and standardised desktop
6 environments.
7
8 Currently, in Python's standard library, there is apparently no coherent,
9 cross-platform way of getting the user's environment to "open" files or
10 resources (showing such files in browsers or editors, for example) when
11 requested by a Python program. There is an os.startfile function which works
12 for Windows, but no equivalent function for other desktop environments - the
13 webbrowser module seems to employ alternative mechanisms in choosing and
14 running external programs and presumably does not seek to provide general
15 support for non-URL resources anyway.
16
17 Since desktop environments like KDE and GNOME provide mechanisms for running
18 browsers and editors according to the identified type of a file or resource,
19 just as Windows "runs" files or resources, it is appropriate to have a module
20 which accesses these mechanisms. It is this kind of functionality that the
21 desktop package aims to support. Note that this approach is arguably better
22 than that employed by the webbrowser module since most desktop environments
23 already provide mechanisms for configuring and choosing the user's preferred
24 programs for various activities, whereas the webbrowser module makes
25 relatively uninformed guesses (for example, opening Firefox on a KDE desktop
26 configured to use Konqueror as the default browser).
27
28 Some ideas for desktop detection (XFCE) and URL opening (XFCE, X11) were
29 obtained from the xdg-utils project which seeks to implement programs
30 performing similar functions to those found in the desktop module. The
31 xdg-utils project can be found here:
32
33 http://portland.freedesktop.org/
34
35 Other information regarding desktop icons and menus, screensavers and MIME
36 configuration can also be found in xdg-utils.
37
38 Contact, Copyright and Licence Information
39 ------------------------------------------
40
41 No Web page has yet been made available for this work, but the author can be
42 contacted at the following e-mail address:
43
44 paul@boddie.org.uk
45
46 Copyright and licence information can be found in the docs directory - see
47 docs/COPYING.txt, docs/lgpl-3.0.txt and docs/gpl-3.0.txt for more information.
48
49 Notes
50 -----
51
52 Notes on desktop application/environment support:
53
54 KDE Supports file and URL opening using kfmclient, where the openURL
55 command opens the resource and the exec command runs the
56 resource.
57
58 KDE 4 Similar to KDE but uses kioclient instead of kfmclient.
59
60 GNOME Supports file and URL opening using gnome-open.
61
62 XFCE Supports file and URL opening using exo-open.
63
64 ROX-Filer Supports file opening using "rox <filename>" but not URL
65 opening.
66
67 New in desktop 0.4.2 (Changes since desktop 0.4.1)
68 --------------------------------------------------
69
70 * Added XFCE 4.10 "mailto:" fix contributed by Jérôme Laheurte.
71
72 New in desktop 0.4.1 (Changes since desktop 0.4)
73 ------------------------------------------------
74
75 * Added KDE 4 and Lubuntu support contributed by Jérôme Laheurte.
76
77 New in desktop 0.4 (Changes since desktop 0.3)
78 ----------------------------------------------
79
80 * Improved docstrings.
81 * Fixed support for examining the root window.
82 * Changed the licence to the LGPL version 3 (or later).
83
84 New in desktop 0.3 (Changes since desktop 0.2.4)
85 ------------------------------------------------
86
87 * Made desktop a package.
88 * Added support for graphical dialogue boxes through programs such as
89 kdialog, zenity and Xdialog.
90 * Added support for inspecting desktop windows (currently only for X11).
91
92 New in desktop 0.2.4 (Changes since desktop 0.2.3)
93 --------------------------------------------------
94
95 * Added XFCE support (with advice from Miki Tebeka).
96 * Added Ubuntu Feisty (7.04) package support.
97
98 New in desktop 0.2.3 (Changes since desktop 0.2.2)
99 --------------------------------------------------
100
101 * Added Python 2.3 support (using popen2 instead of subprocess).
102
103 New in desktop 0.2.2 (Changes since desktop 0.2.1)
104 --------------------------------------------------
105
106 * Changed the licence to LGPL.
107
108 New in desktop 0.2.1 (Changes since desktop 0.2)
109 ------------------------------------------------
110
111 * Added Debian/Ubuntu package support.
112
113 New in desktop 0.2 (Changes since desktop 0.1)
114 ----------------------------------------------
115
116 * Added support for waiting for launcher processes.
117 * Added a tests directory.
118
119 Release Procedures
120 ------------------
121
122 Update the desktop __version__ attribute.
123 Change the version number and package filename/directory in the documentation.
124 Update the release notes (see above).
125 Update the package information.
126 Check the release information in the PKG-INFO file.
127 Check the setup.py file.
128 Tag, export.
129 Archive, upload.
130 Update PyPI entry.
131
132 Making Packages
133 ---------------
134
135 To make Debian-based packages:
136
137 1. Create new package directories under packages if necessary.
138
139 2. Make a symbolic link in the distribution's root directory to keep the
140 Debian tools happy:
141
142 ln -s packages/debian-wheezy/python-desktop/debian/
143
144 3. Run the package builder:
145
146 dpkg-buildpackage -rfakeroot
147
148 Or:
149
150 pdebuild
151
152 4. Locate and tidy up the packages in the parent directory of the
153 distribution's root directory.