• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: X11 Terminal at Startup
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: X11 Terminal at Startup


  • Subject: Re: X11 Terminal at Startup
  • From: Randy Ford <email@hidden>
  • Date: Wed, 5 Feb 2003 20:18:47 -0600

On Wednesday, February 5, 2003, at 03:55  PM, Aldo D'Urbano wrote:

I also have only the line quartz-wm & at the end of .xinitrc. It make sense.

X11 and quartz-wm are up without any terminal or program. I then start X11 applications via Terminal.app.

If this works with X11.app, it doesn't behave as all of the other X servers with which I've worked. Normally, when the .xinitrc script exits, the X session ends. The normal approach is to set up the environment, launch programs in the background, then exec the lat program. .xinit exits when the exec-ed program exits.


The default for some X servers is to launch an xterm and exit whenever it exits. If you do that, then you can start a windows manager from it. Then you can exit that windows manager and start another. However, even if a windows manager and other X programs are running, if you exit that xterm, your X session will end. Most people don't want this behaviour. If you do want it, then your .xinit can look like the following:

...
window_manager& # whatever one you want, or none to start one from the xterm
exec xterm


For most people, they want to exit X11 when they exit the window manager. Therefore they exec the window manager as the last item in the .xinitrc script.

    ...
    xterm&  # or any other program that you want
    exec window_manager  # whatever one you want

The reason for exec-ing the manager is to keep from having a shell running, taking up resources, without doing anything but waiting for the exec-ed program to exit. Exec tells the shell to replace itself with the exec-ed program.

I've checked it: X11.app doesn't immediately exit with an .xinit containing only backgrounded jobs. I guess Apple has done this because they provide the X11.app menu bar that allows one to exit the X server. Normally X servers don't provide any way of exiting other than exiting xinitrc (either the default one or ~/.xinitrc). It may also have been when they changed this that they eliminated the system xinitrc file.

So, it seems that everybody (including me) that has said that you must not background the last program in in .xinitrc was assuming that X11.app treated .xinitrc like all of the other X servers I know. (I wonder if this is specified in the X11R6.2 specs.)

I still recommend exec-ing the last program in case you run another X server, and to eliminate the extra shell process.

randy.
_______________________________________________
x11-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/x11-users
X11 for Mac OS X FAQ: http://developer.apple.com/qa/qa2001/qa1232.html
Report issues, request features, feedback: http://developer.apple.com/bugreporter
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: X11 Terminal at Startup
      • From: email@hidden (Randal L. Schwartz)
References: 
 >Re: X11 Terminal at Startup (From: "Aldo D'Urbano" <email@hidden>)

  • Prev by Date: Re: OSX user login failure - HELP
  • Next by Date: Re: Open office org
  • Previous by thread: Re: X11 Terminal at Startup
  • Next by thread: Re: X11 Terminal at Startup
  • Index(es):
    • Date
    • Thread