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 GNOME Supports file and URL opening using gnome-open.
59
60 XFCE Supports file and URL opening using exo-open.
61
62 ROX-Filer Supports file opening using "rox <filename>" but not URL
63 opening.
64
65 New in desktop 0.4 (Changes since desktop 0.3)
66 ----------------------------------------------
67
68 * Improved docstrings.
69 * Fixed support for examining the root window.
70 * Changed the licence to the LGPL version 3 (or later).
71
72 New in desktop 0.3 (Changes since desktop 0.2.4)
73 ------------------------------------------------
74
75 * Made desktop a package.
76 * Added support for graphical dialogue boxes through programs such as
77 kdialog, zenity and Xdialog.
78 * Added support for inspecting desktop windows (currently only for X11).
79
80 New in desktop 0.2.4 (Changes since desktop 0.2.3)
81 --------------------------------------------------
82
83 * Added XFCE support (with advice from Miki Tebeka).
84 * Added Ubuntu Feisty (7.04) package support.
85
86 New in desktop 0.2.3 (Changes since desktop 0.2.2)
87 --------------------------------------------------
88
89 * Added Python 2.3 support (using popen2 instead of subprocess).
90
91 New in desktop 0.2.2 (Changes since desktop 0.2.1)
92 --------------------------------------------------
93
94 * Changed the licence to LGPL.
95
96 New in desktop 0.2.1 (Changes since desktop 0.2)
97 ------------------------------------------------
98
99 * Added Debian/Ubuntu package support.
100
101 New in desktop 0.2 (Changes since desktop 0.1)
102 ----------------------------------------------
103
104 * Added support for waiting for launcher processes.
105 * Added a tests directory.
106
107 Release Procedures
108 ------------------
109
110 Update the desktop __version__ attribute.
111 Change the version number and package filename/directory in the documentation.
112 Update the release notes (see above).
113 Update the package information.
114 Check the release information in the PKG-INFO file.
115 Check the setup.py file.
116 Tag, export.
117 Archive, upload.
118 Update PyPI entry.
119
120 Making Packages
121 ---------------
122
123 To make Debian-based packages:
124
125 1. Create new package directories under packages if necessary.
126 2. Make a symbolic link in the distribution's root directory to keep the
127 Debian tools happy:
128
129 ln -s packages/ubuntu-hoary/python2.4-desktop/debian/
130 ln -s packages/ubuntu-feisty/python-desktop/debian/
131 ln -s packages/ubuntu-hardy/python-desktop/debian/
132
133 3. Run the package builder:
134
135 dpkg-buildpackage -rfakeroot
136
137 4. Locate and tidy up the packages in the parent directory of the
138 distribution's root directory.