how to use wsfb and non-root?
Michael Lorenz
macallan at netbsd.org
Sat May 27 09:04:19 PDT 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello,
> I asked about a week ago about a list or documentation of known X
> drivers
> that do not need root.
All the SBus and UPA drivers should fit that bill, as long as whoever
the Xserver is running as can access /dev/fb*
> So I hear that some people run X as non root. I have even heard this
> for
> i386 systems.
>
> How is this done?
Not with any of the PCI drivers - they require mmap()ing stuff through
/dev/mem. Or you can use the aperture driver ( used to be distribued
with XFree86, not sure if it's part of NetBSD these days ) which allows
mmap()ing graphics devices through /dev/xf86.
On NetBSD however it is possible to mmap() the console device through
/dev/ttyE* which should be what wsfb is doing. Most non-x86 NetBSD
ports use ttyE* for everything ( sparc64 for instance can't mmap() PCI
resources through /dev/mem - there's a good reason for it which I
unfortunately forgot. Maybe it's the fact that the PCI buses are
somewhere far up in the 64bit address space so the Xserver would have
to figure out what to add to the BARs to get the right bus ) - the
benefit is that you don't ( or rather - shouldn't ) need root
privileges to mmap() and can use BAR contents directly, the downside is
you can only use one PCI device - the console.
have fun
Michael
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)
iQEVAwUBRHh4g8pnzkX8Yg2nAQJGbAf+ISX9Ln3NLui4l8SgUMyGfs1QSgGZZiDV
hG5RKQt+4eV8jOWOcBzGMm4XGRNINqmY+SxFoS+m9u9F459fV8Tl6qmO0TbyPLoS
qomgvWwuluhUssFX44Nzeev/pOJ9KQ6QQvk3gU9reyIMFDoPfTOdba5ArDDlZ/qd
buNRiZAVHo4/3lz16sn9OwB57FR7ojh55zttA79mG7diWPTt+KEUXGugF/V5nupK
33HvOtlI8eGFEQG5Oawt+NR+YZJtmyKfNd1XJUebSwyall6zKIA6Ug2UOnckYH69
Q+Y6VjFUM+b+hT2afWYe5xXrAmdgNPSJNMUHizka5+jNadLDKlmxnw==
=bNWg
-----END PGP SIGNATURE-----
More information about the xorg
mailing list