desktop revision 1.4
1$NetBSD: desktop,v 1.4 2017/01/22 19:47:00 dholland Exp $
2
3NetBSD Desktop Roadmap
4======================
5
6This roadmap deals with desktop support. Note that "desktop support"
7means several quite different things:
8   - issues pertaining to running the Windows-like Linux desktops
9     (e.g. GNOME, KDE, Mate, Trinity, as well as other similar things
10     like LXDE) on NetBSD in more or less their current form;
11   - issues pertaining to running these systems with NetBSD
12     infrastructure, for better system integration and to avoid
13     depending on unpopular packages like dbus and policykit;
14   - issues specific to developer-oriented desktops;
15   - other issues pertaining to using a NetBSD machine as one's desktop
16     login system, regardless of the UI;
17   - issues pertaining to running or developing a more Unix-oriented
18     desktop environment, which is kind of blue-sky for the time being.
19
20Also, "desktop support" and "laptop support" are closely related in
21the sense that in the conventional wisdom laptops run more or less the
22same user-facing software as desktops. Additional specifically laptop-
23related issues, such as power management, are discussed in the
24"mobile" roadmap (q.v.).
25
26Furthermore, many of the above issues can be ~orthogonally divided
27into one of the following three broad categories:
28
29   a. Providing new infrastructure for supporting facilities whose
30      needs are reasonably well understood but are not traditionally
31      handled by Unix and/or are not currently handled by NetBSD, or
32      where traditional/existing support is chronically defective.
33      Examples include font management, printing, mounting removable
34      media, and also things like support for location services.
35
36   b. Providing new infrastructure for supporting facilities whose
37      needs are not in fact well understood. This tends to cover the
38      domains where we don't like the GNOME/KDE/Linux tools, like
39      dbus, as well as things that existing desktop environments fall
40      down on entirely, like integrating with large home directory
41      trees.
42
43   c. Refactoring existing infrastructure (whether NetBSD-specific or
44      historical Unix) to integrate new facilities and software models
45      smoothly instead of bolting layers of crud on top of outdated
46      structure. Examples include revisiting the assumption that
47      logins happen on teletypes, and facing the need to restrict the
48      access of large applications rather than giving them all the
49      privileges of the user starting them.
50
51
52The following elements, projects, and goals are relatively near-term:
53
54 0. dmrkms for nvidia cards (will be in -8)
55 1. Don't ship twm as the default X window manager
56 2. Making removable media work using GNOME/KDE infrastructure
57 3. Making wireless config work using GNOME/KDE infrastructure
58 4. Sane font handling
59 5. Get Eclipse running properly from pkgsrc
60 6. Better printer management
61 7. Work out a long-term plan for compositing, Wayland, and graphics
62    architecture issues
63
64The following elements, projects, and goals are longer-term:
65
66 8. Publish/subscribe sockets or IPC
67 9. Better native RPC library and tools
68 10. Native removable media handling
69 11. Native wireless config
70 12. User switching and secure attention key
71 13. wscons graphics
72
73The following elements, projects, and goals are rather blue-sky so far:
74
75 14. Something akin to ARexx
76 15. A more Unix-oriented root window/desktop basis 
77 16. Full console virtualization
78
79
80Explanations
81============
82
83
84 0. drmkms for nvidia cards
85
86Until recently the nvidia drmkms driver (nouveau) was disabled by
87default. This is no longer the case in -current and it is believed to
88more or less work. This change will be in -8. It might also make it
89into a future release of -7; it is not currently clear what would be
90involved in that.
91
92
93 1. Don't ship twm as the default X window manager
94
95It's embarrassing that in 2016 we were still shipping twm as the
96default window system config. Heck, it was embarrassing in 2006. The
97work needed to move to ctwm has been largely done (by youri) and at
98least some of it committed, but this still (as of January 2017) isn't
99enabled by default.
100
101  - As of January 2017 nobody is actively working on this.
102  - It would be silly at this point to release 8.0 without it, so
103    ideally someone will step up to get it finished and enabled.
104  - Contact: XXX please fill in
105
106
107 2. Making removable media work using GNOME/KDE infrastructure
108
109Ideally when you insert a USB stick it mounts automatically, like with
110GNOME and KDE on Linux. I believe this is not currently working. It
111used to depend on hal, which was always problematic and perennially
112broken, but hal got deprecated and I'm not sure what is even involved.
113(XXX: someone please clarify.)
114
115
116 3. Making wireless config work using GNOME/KDE infrastructure
117
118Ideally it would be possible to configure your wireless networking
119using the GNOME/KDE/etc. tools. I believe this does not work either.
120(XXX: someone please clarify.)
121
122
123 4. Sane font handling
124
125See "System-level font handling in Unix" on the wiki projects page.
126
127  - As of January 2017 nobody is actively working on this.
128  - There is currently no clear timeframe or release target.
129  - Contact: dholland
130
131
132 5. Get Eclipse running properly from pkgsrc
133
134As of last report Eclipse was bodgily packaged (this may not be
135fixable) and didn't really work (this should be). Because Eclipse is
136Java this depends on JDK stuff.
137
138  - As of January 2017 nobody is actively working on this.
139  - There is currently no clear timeframe or release target.
140  - Contact: ? (XXX)
141
142
143 6. Better printer management
144
145See "New LPR/LPD for NetBSD" on the wiki projects page.
146
147  - As of January 2017 nobody is actively working on this.
148  - There is currently no clear timeframe or release target.
149  - Contact: dholland
150
151
152 7. Work out a long-term plan for compositing, Wayland, and graphics
153    architecture issues
154
155Nobody seems to have a good idea of what the way forward ought to be,
156so probably it would be advisable for someone to dig into the issues
157and report back.
158
159  - As of January 2017 nobody is actively working on this.
160  - There is currently no clear timeframe or release target.
161  - Contact: ? (XXX)
162
163
164 8. Publish/subscribe sockets or IPC
165
166It's clear that even though traditionally Unix has next to no such
167facilities, a "modern" desktop system requires the ability to post
168notices about from one component to another. (Probably the closest
169thing traditional Unix ever had along these lines was comsat(8).)
170
171dholland observed some time back that there isn't really a problem if
172what you want to do is contact a well-known service: we have inetd for
173that, and while inetd could use some polishing before being deployed
174for such purposes that isn't a very big deal. The interesting case is
175multicast: when you want to send a notice to anyone who happens to be
176around and interested in seeing notices of some particular type,
177without needing to know who they are.
178
179dbus does this badly, both because the implementation is poor and
180because the basic concept of a "message bus" is flawed. A better model
181is publish-subscribe channels: a message sent ("published") on the
182channel is delivered to all listeners ("subscribers"), and neither the
183publishers nor the subscribers need to know about one another, only
184about the existence of the channel... which becomes effectively a well
185known service.
186
187The original (very tentative) plan was to wedge publish/subscribe into
188AF_UNIX sockets, because AF_UNIX sockets already satisfy several
189important criteria: (1) they have a large and flexible namespace,
190namely the whole file system namespace; (2) they support credential
191reporting; (3) the socket/bind/listen/connect API (probably) provides
192enough flexibility to handle the connection model; and (4) they
193already exist. However, nobody has yet looked into this very closely
194and the interface may not turn out to be very suitable after all.
195
196Note that (like anything of this sort) the naming scheme for the
197channels is critical, as is the development of sane protocols to run
198over them. Note that the publish/subscribe sockets should be transport
199only; protocols should be a higher-level issue. (This is one of a
200number of things dbus gets wrong.)
201
202One of the other things this infrastructure should provide is a decent
203way to post notices (e.g. for media changes, device insertions, and so
204on) out of the kernel, which has historically always been a problem in
205Unix.
206
207This item is sometimes also referred to as "dbus avoidance" -
208theoretically one could avoid dbus with some other architecture too,
209but nothing much else has been proposed.
210
211An example application we already have in base is the notices that
212sshd sends to blacklistd. Currently this makes a mess if sshd is
213running and blacklistd isn't.
214
215  - As of January 2017 nobody is actively working on this.
216  - There is currently no timeframe or release target.
217  - Contact: dholland
218
219
220 9. Better native RPC library and tools
221
222Another thing dbus doesn't do very well: it's an IPC/RPC library. In
223the long run to support existing desktops we probably need
224dbus-compatible IPC tools. In the short run though we'd do well to
225pick or develop something of our own, and (finally) deprecate SunRPC.
226
227  - As of January 2017 nobody is actively working on this.
228  - There is currently no timeframe or release target.
229  - Contact: dholland or ? (XXX)
230
231
232 10. Native removable media handling
233
234Given publish/subscribe channels, implement proper native support for
235mounting removable media upon insertion. This should integrate with
236GNOME/KDE/etc. but also work natively; e.g. provided the right
237services are running, it should work even when running on a text-only
238console.
239
240
241 11. Native wireless config
242
243Similarly, implement a native wireless config scheme. While we
244currently have wpa_cli, it lacks a certain something...
245
246
247 12. User switching and secure attention key
248
249See the project page on the wiki.
250
251  - As of January 2017 nobody is actively working on this.
252  - There is currently no timeframe or release target.
253  - Contact: dholland or ? (XXX)
254
255
256 13. wscons graphics
257
258There's been talk on and off for some time about supporting cairo or
259qt-embedded or similar things directly on the console. This is
260probably a good infrastructure step for any UI scheme that doesn't
261involve an X server, such as potentially phones or tablets. (See the
262"mobile" roadmap for more on that.)
263
264
265 14. Something akin to ARexx
266
267We have a number of veteran Amiga users and whenever there's a
268discussion of dbus usually ARexx eventually comes up. It would be
269great to have something like ARexx for talking to/scripting/
270controlling applications. But given that GNOME and KDE and their
271imitations are all based on Windows and that the state of the art
272seems to be dbus, if we want this we're going to have to design and
273build it out ourselves. It would be a good thing to do.
274
275Just remember that the good parts of ARexx didn't include the Rexx
276language. :-)
277
278  - As of January 2017 nobody is actively working on this.
279  - There is currently no timeframe or release target.
280  - Contact: mlelstv? (XXX)
281
282
283 15. A more Unix-oriented root window/desktop basis
284
285All the existing desktops (apart from OS X, which is NextStep, but not
286all that much different either) are based on Windows. They share a
287number of properties that are not consistent with the Unix philosophy
288or design model.
289
290First, Unix is about files, and like it or not, files in Unix are
291organized in a hierarchical namespace. The Windows-like desktops, like
292Windows, provide a file manager as an afterthought and the desktop
293workspace itself has no notion of current directory, no notion of
294directory navigation, and only limited notions of interacting with
295files at all. In fact, the things that show up on the desktop
296typically live in a reserved directory that the desktop software
297insists on polluting your homedir with. A Unix desktop should have
298directory navigation integrated with the root window somehow -- there
299are many possible ways to do this, and virtually any choice would be
300better than what you get from GNOME and KDE. It shouldn't be necessary
301to open a shell (or a "file manager") to work effectively with a large
302source tree.
303
304Second, Unix is also about text, and existing desktop software is not.
305While people tend to think of GUIs and text as mutually exclusive,
306this is not actually the case: a GUI provides a lot of ways to place
307and format text that can't be done in text mode (let alone on a
308teletype) -- a good start, for example, might be to display the first
309few lines of a file when you roll the mouse over it, but one can go a
310lot further than that.
311
312Third, Unix is supposed to be about pluggable components. A Unix
313desktop should have functionality for plugging components together
314graphically, whether those components are traditional shell tools or
315"services" or "objects" or more complex things. No existing desktop
316has anything like this, certainly not as native functionality.
317
318Anything like this is going to have to be designed and written, since
319it's clearly not going to be forthcoming from the Linux desktop folks.
320(Note that while it would be a big effort it would also be a great
321publicity lever...)
322
323
324 16. Full console virtualization
325
326The Unix notion of a login session is stuck in the 70s, where you log
327in on a glass teletype and that's all you get. The consoles of modern
328computers have assorted other widgets as well: pointing devices, game
329controllers, cameras, scanners, removable storage, hotkeys, audio
330playback and record... not to mention graphics and video. Right now we
331have a bodgy scheme for chowning or chmod'ing devices on console
332login; in addition to potentially causing problems (what happens if
333one user leaves a process behind that's recording audio, then logs out
334and walks away?) this doesn't work well with multiple users logged in
335at once on the console. It also doesn't work at all with remote logins.
336
337In an ideal world, all your console hardware would be tied to your
338console login session, and virtualized appropriately so that multiple
339console logins each get suitably arbitrated access. Furthermore, it
340should be possible to forward your console hardware to a remote login
341session -- for example if you have a usb stick you should be able to
342log in somewhere and mount it there.
343
344Getting to this requires refactoring the way we think about logins and
345login devices, but it's high time.
346
347