Are you running it using sudo or you login as "su root"
As you said you are on a KDE distro, can you try running "sudo kwrite" (if you are trying sudo) or just kwrite if you are using su.
I just wanted to confirm that other UI programs are launching fine or not.
I login as su root. As I mentioned, other programs run from the console have no problem to open the display. E. g. running kwrite from the console works.
Can you try running firefox the same way ( just coz firefox is GTK based). Clearly it's a really strange issue.
Also can you try silent app installation or a sudo install.
"Adobe AIR Application Installer" -silent <complete path of app>
I am able to start firefox from the console, no problem. The option -silent does not help with the AIR installer unfortunately. Sudo neither. The command I try as root is: "Adobe AIR Application Installer" -silent -location /opt/Dofus2 /home/urs/Temp/extract/Dofus.air
The error: (/opt/Adobe AIR/Versions/1.0/airappinstaller:12822): Gtk-WARNING **: cannot open display:
Not sure if it would work, since you say that other apps are able to open the display. But you can still try this:
sudo vi /etc/sudoers
Comment out all the lines starting with Defaults( except Defaults targetpw)
Also, are you using a 64-bit machine?
Could you try xvfb as a workaround? After installing the xvfb package (e.g. from a repository), you can prefix your commands with "xvfb-run" to launch the command with a fake X server.
Thank you all for your help!
I am running two PCs with the same problem, both with 32 bit openSuse 11.2 installed. On one of them yesterday suddenly the air installer 1.5.3 worked (it did not work a few times then suddenly worked). It displayed its window and so on and installed from the console as su root. But then installing an app ended with the usual "cannot open display". On the other PC I can not even run the installer. It finishes without a message and does not install. If I use -silent, I get the "cannot open display".
I tried to edit sudoers, but no success.
I installed xvfb but all I get there are the following files:
rpm -ql xorg-x11-server-extra-7.4-61.63.1.i586
How to use these? There is no xvfb-run.
Xvfb should suffice too. You can use Xvfb to start a dummy X server:
bash$ Xvfb :1 &
Then, to launch any application (or AIR application installer) that requires a valid X server, prefix your command with DISPLAY=:1
bash$ DISPLAY=:1 gtk-demo
To get around any sudoers issue, you can log in as root and then direct issue your commands.
Thanks for your help. I can run Xvfb and start the air installer like you described. Here is the output:
No protocol specified
(/tmp/air.PATVJT/setup:9119): Gtk-WARNING **: cannot open display:
Same thing again.
May be it's because I get errors when I start Xvfb:
[dix] Could not init font path element /usr/share/fonts/TTF/, removing from list!
[dix] Could not init font path element /usr/share/fonts/OTF, removing from list!
(EE) config/hal: NewInputDeviceRequest failed (2)
And then I get an error when I try running an application like firefox on Xvfb:
Xlib: extension "RANDR" missing on display ":1.0".
True - it does look like Xvfb never started properly. The Xlib message about the missing RandR extension can be ignored (it's a warning).
There seem to be references to the config/hal error (Google search), but I couldn't find a solution. Perhaps x.org mailing lists might be of help here - http://www.x.org/wiki/XorgMailingLists