#15 Rootless mode

closed-accepted
None
1
2014-08-22
2001-05-04
Greg Parker
No

This is a massive patch to add rootless mode.

Patched against XFree86 CVS on Thursday night. Requires
the render extension patch to be installed already. Run
with `startx -- -rootless` from the terminal (double-
clicking will open full-screen mode always).

From Xserver/hw/darwin: `< rootless.patch patch -p1`
You'll need to make clean and make Makefiles, too.

A binary is available at http://www.sealiesoftware.com/
XDarwin.dmg

If you find a bug not listed here or an X program that
crashes the server, let me know at gparker @at@
users.sourceforge.net. Don't post rootless bugs to the
SourceForge forums yet.

Features:
* drawing on the root window works (twm window resize,
xsnow, xroach)
* non-rectangular windows work, and they even get drop
shadows. Transparent xeyes with a drop shadow is cool.
* windows never damage each other's contents.
* Use the full-screen-switch key to toggle the menu bar
and Dock.

Limitations:
* You MUST be in 32-bit color ("millions"). This will
die horribly if you aren't. Don't change colors or
screen size while running.
* Only works on the main screen.
* xsnow is slow.
* Window manager root menus are inaccessible.
* Has not been tested on Mac OS X 10.0.1 or 10.0.2

There are currently a few glitches and at least one
potentially serious bug:
* command keys don't work (e.g. command-Q)
* key commands in Prefs dialog don't work.
* all X windows are brought forward together.
* window resize is ugly, especially non-rectangular
windows.
** X apps that try to change the border width of a
window will probably crash. I only know of one that
does, a test program I wrote, and I haven't used it in a
while. It probably won't happen, but be warned. Of
course, there may be other crashing bugs, too.

Some apps that are known to work: Netscape 4.7, XEmacs,
xterm, xclock, xeyes, xev, XEvil, xbill, xdaliclock,
twm, WindowMaker, xsnow, xlogo, xtetris, zwgc, xmille.
(No, I don't have Mac OS X ports of most of these; they
were run remotely from a Solaris box.)

Discussion

  • Greg Parker

    Greg Parker - 2001-05-04

    rootless mode patch

     
  • Nobody/Anonymous

    Logged In: NO

    Hi.
    I downloaded a binary and replaced XDarwin.app.
    I typed "startx -- -rootless" from terminal.
    But,X said "Unrecognized option:-rootless".
    Please help me.

     
  • Daniel Kluge

    Daniel Kluge - 2001-05-05

    Logged In: YES
    user_id=30656

    Works in 10.0.2. I've found two things during testing: xeyes crashed the Server once (worked the second time although).

    More annoying is that you can drag windows to the top of the screen, so their title-bar will be behind the menu-bar, but you can rectify this by going into the Full-screen mode.

     
  • Nobody/Anonymous

    Logged In: NO

    Same here...

    Rootless mose is not recognized in the binary
    download.

     
  • Wayne A. Arthurton

    Logged In: YES
    user_id=210947

    You have to patch the cvs tree and compile first.

     
  • Greg Parker

    Greg Parker - 2001-05-08

    Logged In: YES
    user_id=37183

    Yep, there's definitely something missing from the binary version. Compiling from the CVS source works. I should be able to do a full binary install late Tuesday night and find the missing pieces.

     
  • Greg Parker

    Greg Parker - 2001-05-10

    Logged In: YES
    user_id=37183

    Okay, I've found all of the missing pieces. Basically, you need a new XDarwinStartup, which in turn requires XDarwinIOKit instead of Xdarwin to run from the console.

    Here's how to install the binary:

    1. Get http://www.sealiesoftware.com/XDarwin.dmg
    2. Copy XDarwin.app from he disk image to /Applications
    3. Get http://www.sealiesoftware.com/XDarwinIOKit and http://www.sealiesoftware.com/XDarwinStartup
    4. `sudo tcsh`
    5. `mv -f XDarwinIOKit XDarwinStartup /usr/X11R6/bin`
    6. `cd /usr/X11R6/bin`
    7. `ln -s /Applications/XDarwin.app/Contents/MacOS/XDarwin XDarwinQuartz`
    8. `rm -f X ; ln -s XDarwinStartup X`
    9. `chmod -R a+rx XDarwinStartup XDarwinIOKit`

    A word of warning: xeyes crashes rarely and AfterStep crashes repeatably. Most likely there are other crash cases too.

     
  • Nobody/Anonymous

    Logged In: NO

    Just tried the rootless mode. Woohoo! It works.

    You write that command keys don't work. Please if you fix them, add
    a preference to leave it broken - I use my command key as a control
    key (via xmodmap) and don't want to lose keystrokes.

    It dies unless I run it using sudo. It says:

    Display mode: rootless
    _XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed
    _XSERVTransMakeAllCOTSServerListeners: server already running

    Fatal server error:
    Cannot establish any listening sockets - Make sure an X server isn't
    already running
    OsVendorFatalError
    AbortDDX

    If I run xmodmap immediately after starting X , X is killed. If I run it
    after I start wmaker, then there is no problem.

    localhost:/Users/alanr % xmodmap .xmodmaprc
    localhost:/Users/alanr %
    This is a pre-release version of XFree86, and is not supported in any
    way. Bugs may be reported to XFree86@XFree86.Org and patches
    submitted
    to fixes@XFree86.Org. Before reporting bugs in pre-release
    versions,
    please check the latest version in the XFree86 CVS repository
    (http://www.XFree86.Org/cvs)

    XFree86 Version 4.0.99.3 / X Window System
    (protocol Version 11, revision 0, vendor release 6510)
    Release Date: 26 April 2001
    If the server is older than 6-12 months, or if your hardware is
    newer than the above date, look for a newer version before
    reporting problems. (See http://www.XFree86.Org/FAQ\)
    Operating System: Darwin
    Display mode: rootless
    error opening security policy file /usr/X11R6/lib/X11/xserver/
    SecurityPolicy
    No core keyboard

    Fatal server error:
    failed to initialize core devices
    OsVendorFatalError
    AbortDDX
    Quitting XDarwin...

    [1] Bus error sudo X -rootless

    Thanks for the great. More feedback when I have it,
    Alan

     
  • Nobody/Anonymous

    Logged In: NO

    I've tried rootless mode on 10.0.3 and it works great!

    Thanks.

     
  • Nobody/Anonymous

    Logged In: NO

    I started with Enlightenment enabled and it crashes
    miserably. Didn't try any other but it does start up and
    sits for about 2-6 seconds before crashing. Soooo
    close!

     
  • Nobody/Anonymous

    Logged In: NO

    Hi,Greg.

    XAqua0.6 was released.

    Can you provide a binary for rootless mode for
    XAqua0.6?

     
  • Greg Parker

    Greg Parker - 2001-05-17

    Logged In: YES
    user_id=37183

    Yes, I'll have a new binary and patch out in a day or two. AfterStep works now. Enlightenment runs better, but it's pretty much unusable because of some nasty tricks that it pulls, and is likely to remain that way.

     
  • Ralf Welter

    Ralf Welter - 2001-05-18

    Logged In: YES
    user_id=222423

    This rocks. However you won't b eable to use this to have
    Classic Apps and X-Windows stuff running side-by-side due to
    the very nature of the hack.
    Whenever XDarwin is in front, Classic stuff will be blanked out.
    (Just adding this so no1 has 2 b surprised)

     
  • Greg Parker

    Greg Parker - 2001-05-18

    Logged In: YES
    user_id=37183

    Oops. I don't actually have Classic on my machine. I forgot that Classic windows don't draw through transparencies, and rootless XDarwin covers the screen with a big transparent window. I'll add an option to turn that off; you'll lose xsnow and window resize indicators but gain Classic back.

     
  • Steven Palm

    Steven Palm - 2001-05-21

    Logged In: YES
    user_id=209930

    Curious about the enlightenment problem(s)... Is it
    less stable in the rootless mode than in the other
    mode? If so, then you are saying, in essense, that
    some things may never work right in rootless?

    Can't wait for the latest binary update (to fix my darn
    keymaps getting lost) to 0.6. Fabulous work!!

     
  • Greg Parker

    Greg Parker - 2001-05-21

    Logged In: YES
    user_id=37183

    Enlightenment is less stable in rootless mode because of bugs
    in rootless mode - E is more demanding of the X server and
    exercises parts of the code that aren't used by other
    programs. These will improve.

    The more serious problem with Enlightenment is that some of
    its graphics features are fundamentally incompatible with any
    rootless mode. For example, E has a pretty background picture
    and the sliding desk-to-desk switcher. This is (apparently)
    implemented by making one huge window for each desk and
    moving those desk windows around. In rootless mode, these
    backdrop windows hide all other Aqua apps, which pretty much
    eliminates the advantage of rootless mode. Another example:
    when a popup menu is displayed, the rest of the screen turns
    white. I think E is creating another big transparent window
    over the whole screen, which ends up not being transparent
    because of a technical limitation in rootless mode.

    So even when the bugs are worked out and E runs stably, it
    still will be mostly useless. There may be other programs
    which simply won't work well in rootless mode. (Anyone run E
    on Xtools? I wonder how well they handle it.)

     
  • Greg Parker

    Greg Parker - 2001-05-22

    Logged In: YES
    user_id=37183

    I've moved the binaries to Stanford's servers because I'm over my transfer limit at sealiesoftware. Oops.

    Here's the instructions again. Note this is still the XAqua 0.5 version.

    1. Get http://www.stanford.edu/~parker42/XDarwin.dmg (4 MB)
    2. Copy XDarwin.app from he disk image to /Applications
    3. Get http://www.stanford.edu/~parker42/XDarwinIOKit.gz (2.5 MB) and http://www.stanford.edu/~parker42/XDarwinStartup (17K). Note that XDarwinIOKit is only needed if you want to run from >console.
    3.5. `gunzip XDarwinIOKit.gz`
    4. `sudo tcsh`
    5. `mv -f XDarwinIOKit XDarwinStartup /usr/X11R6/bin`
    6. `cd /usr/X11R6/bin`
    7. `ln -s /Applications/XDarwin.app/Contents/MacOS/XDarwin
    XDarwinQuartz`
    8. `rm -f X ; ln -s XDarwinStartup X`
    9. `chmod -R a+rx XDarwinStartup XDarwinIOKit`

     
  • Erik Persson

    Erik Persson - 2001-05-22

    Logged In: YES
    user_id=224840

    Nice work!

    However, having come into the habit of frequently updating
    XFree from CVS and recompiling, I tried to apply your patch
    to a fairly recent checkout (just a few days ago) and some
    fo the hunks failed to patch (which isn't all that strange -
    things do change).

    Anyways, I went to work and went through the .rej files and
    tried to find and apply thos parts myself. Not being a
    super-hero C hacker i thought that it looked pretty
    straightforward and I also found the missing pieces.
    However, the thing didn't quite work:

    First, when building the link of "XDarwinStartup" fails with
    the following symbols being unresolved:

    _cfbDoBitbltCopy
    _cfb16DoBitbltCopy
    _cfb32DoBitbltCopy

    I could fix cfbDoBitbltCopy and cfb32DoBitbltCopy by
    explicitly linking with cfb/libcfb.a and cfb/libcfb32.a.
    libcfb16.a was another matter as it hadn't bee built at all
    so there I had to remove references to it in rootless.c -
    which might not be what I want being really out of my
    depth. By the way - aren't the libcfb*.a dynamic XFree
    server modules that really shouldn't be linked statically?

    Finally, upon getting it to compile and link the server
    segfaults when started with '-rootless'.

    I guess I more or less suck as far as C programming is
    concerned, so my questions would be: Is there a more recent
    patch and when will the rootless patch be checked into the
    XFree CVS?

    Cheers, Erik

     
  • Greg Parker

    Greg Parker - 2001-05-29

    Logged In: YES
    user_id=37183

    Ick. Unfortunately, fb and rootless as they exist now are
    mutually incompatible. fb bypasses the single most critical
    hook that rootless uses. This means rootless will need to be
    recoded to work with fb, and fb may have to be modified
    slightly. This will take time to code and debug, and I don't
    have any time in the next three weeks, so we're stuck with
    0.5 for a month or so.

     
  • Paul Bayley

    Paul Bayley - 2001-06-25

    Logged In: YES
    user_id=173389

    I can live with 0.5 a little while longer |-)

     
  • Greg Parker

    Greg Parker - 2001-06-28

    Logged In: YES
    user_id=37183

    We're making progress. I just submitted a replacement patch for XFree86 4.1, though it is still incomplete and quite unstable.

     
  • Greg Parker

    Greg Parker - 2001-06-28
    • priority: 5 --> 1
    • status: open --> open-out-of-date
     
  • Torrey T. Lyons

    Torrey T. Lyons - 2001-07-01

    Logged In: YES
    user_id=133579

    Most of this patch has made it into XFree86 CVS.

     
  • Torrey T. Lyons

    Torrey T. Lyons - 2001-07-01
    • assigned_to: nobody --> torrey
    • status: open-out-of-date --> closed-accepted
     

Log in to post a comment.