Running X Without Root Privileges

The X Windowing System is the graphical backbone of most UNIX-like operating systems (and OpenVMS) – despite lots and lots of criticism, the system has withstood the test of time. Despite its age, development on X has not slowed down – in fact, it only seems to have picked up. A few weeks ago, we had kernel-based mode setting, and today we have the X server running as user instead of root.There are a lot of problems with running X as root – mostly from a security point of view. David Airlie has succeeded in starting the X server with user rights instead of root privileges. It required only 300 lines of code in the xserver and the driver itself (Intel in this case) and some other locations. It worked – but wasn’t particularly stable.

Surprisingly it mostly seems to work, I can start the server + gnome-session + DRI2 + compiz + glxgears on a cube, granted it oopses soon afterwards but it does show we are very close to realising the dream.

In the comments, Airlie explains that applications shouldn’t need any modifications, since X client applications shouldn’t need to run as root. Drivers of course do need to be modified.

27 Comments

  1. 2008-05-12 9:19 pm
    • 2008-05-12 9:39 pm
      • 2008-05-12 10:51 pm
        • 2008-05-13 5:16 am
        • 2008-05-14 4:26 pm
          • 2008-05-14 7:40 pm
          • 2008-05-15 2:51 pm
        • 2008-05-14 7:34 pm
          • 2008-05-14 10:18 pm
        • 2008-05-15 11:23 am
      • 2008-05-13 3:52 pm
        • 2008-05-16 11:32 pm
  2. 2008-05-12 9:33 pm
    • 2008-05-12 9:42 pm
    • 2008-05-12 9:43 pm
    • 2008-05-12 10:10 pm
      • 2008-05-13 8:34 am
        • 2008-05-13 6:30 pm
    • 2008-05-12 10:40 pm
  3. 2008-05-12 11:31 pm
  4. 2008-05-13 3:51 am
    • 2008-05-13 5:19 am
      • 2008-05-15 11:17 am
  5. 2008-05-13 5:30 am
  6. 2008-05-13 12:36 pm
    • 2008-05-13 3:38 pm