Re: [Fxruby-users] How can I tell if there is no display available?
Status: Inactive
Brought to you by:
lyle
From: Evaldo G. <ev...@ga...> - 2004-06-14 16:38:48
|
Hi! Traditionally, on *nix systems, Display Availability is defined by a target and authentication. the default target display you can get from variable DISPLAY. if its not set, you are probably out of a GUI environment. Another issue is checking authentication, which I will not cover here, but you can read the manpage for Xsecurity(7) :) Cya Evaldo Gardenali - UdontKnow Em Dom, 2004-06-13 =E0s 23:25, Ashley Reed escreveu: > Hi all, >=20 > I'm writing an application using Ruby that has both a text interface and > a GUI (using FXRuby). Can anyone tell me how to know at runtime if > there is no display to use. It seems that when I call FXApp.new(), > control never returns to my code. An error message is printed to the > console, and the program exits. >=20 > Here's the error message. It's not even an exception. > FXRbApp::openDisplay: unable to open display :10 >=20 > If there is no display available, I want to switch to my text interface. >=20 > Thanks, > Ashley |