exporting the display doesn't work again

Janina Sajka janina at afb.net
Mon Mar 18 16:04:03 EST 2002


Gregory:

I am sorry that I haven't been reading this thread, so I don't know if 
what I'm going to tell you has been covered already. But, if it has, just 
delete this and smack me later with a wet noodle! <grin>

Some years ago I asked for similar advice on blinux. Dave Mielke wrote me 
a nice note on this issue, and his advice was something I've kept all 
these years in a file. I know share it with you in hopes it will help. 

Drum roll,  ..... ..... ..... ..... ..... .....
Here's Dave!

>From dave at mielke.cc Wed Nov  8 20:45:28 2000

[quoted lines by Janina Sajka on February 2, 2000, at 12:18]

>My problem is that I need to launch X in order to launch VMware -- so
>there's the no speech problem here. How can I get around this? Can I maybe
>cause X to launch and then start VMware -- say as Console F7 -- by putting
>some kind of statement in my .bashrc?

The best way, in my opinion, is to have X running all the time. If you're using
a RedHat-like system, then all you need to do is change the default system run
level from 3 to 5. Find the "initdefault" line in "/etc/inittab", change the
number, and reboot ("init q", in this case, doesn't work very well). The line
you're looking for, looks like this:

    id:5:initdefault:

When you start X, it always assumes that it should take over the console. It
does this by claiming the first free virtual console, and then switching to it.
After you boot, therefore, your system will automatically switch to the virtual
console in which X is running near the end of system initialization. You can
easily get back to a text console by pressing ctl-alt-F1. Just alt-F1 won't
work, as X takes over that ability, so you need to add the control key to the
sequence. This console takeover by X, by the way, would also happen if you were
to start it from the command line; you'd still need to ctl-alt-Fn your way back
to your text console session.

With X running, you need to do something else in order to allow yourself to
start X applications when not logged in via X. You need to authorize those
"foreign" applications to use the X display. To do this, edit the file
"/etc/X11/xdm/Xsetup_0", and add the following line at the bottom:

    /usr/X11R6/bin/xhost +localhost

This change allows any X application started on your own machine to use your
machine's own X display. It takes effect whenever the X server is restarted.
You can do this either by rebooting or by switching to the virtual console that
X is using and then pressing ctl-alt-backspace.

With this done, set your "DISPLAY" environment variable to ":0" so that the X
applications will know how to contact the correct X server. If you're using
bash, then do:

    export DISPLAY=:0

If you think that there'll never be any need for someone to look at what's on
the X display, then there's a simpler way to do it. Ignore anything said above,
and just do the following two things. First, add an invisible X display to your
system by adding the following line to the bottom of "/etc/inittab":

    xv:2345:respawn:/usr/bin/X11/Xvfb :2 -ac -screen 2 800x600x32 -fn 7x14

Either rebooting or executing "init q" will cause this change to take effect.
Then, direct your X applications to this server by setting "DISPLAY" to ":2".
If you're using bash, then do:

    export DISPLAY=:2

I, personally, do both. I then point DISPLAY at :0 for applications which have
important output, e.g. NetScape, and to :2 for applications with unimportant
output, e.g. RealPlay. I prefer using the invisible display whenever possible
because it's less problematic. Sometimes the visible X display gets into
trouble, and I then require sighted assistance in order to recover it.

-- 
Dave Mielke           | 856 Grenon Avenue | I believe that the Bible is the
Phone: 1-613-726-0014 | Ottawa, Ontario   | Word of God. Please contact me
EMail: dave at mielke.cc | Canada  K2B 6G3   | if you're concerned about Hell.

---
Send your message for blinux-list to blinux-list at redhat.com
Blinux software archive at ftp://leb.net/pub/blinux
Blinux web page at http://leb.net/blinux
To unsubscribe send mail to blinux-list-request at redhat.com
with subject line: unsubscribe

-- 
	
				Janina Sajka, Director
				Technology Research and Development
				Governmental Relations Group
				American Foundation for the Blind (AFB)

Email: janina at afb.net		Phone: (202) 408-8175

Chair, Accessibility SIG
Open Electronic Book Forum (OEBF)
http://www.openebook.org





More information about the Speakup mailing list