cannot connect to x server
Hi,
I am new to linux and i want to run qt project in linux fedora 9.. Using PuttY software i am accessing the linux machine from my windows. When i tried to run Qt-x11 project in linux it is showing error "cannot connect to x server" i tried to locate that [root@localhost /]# locate Xserver /etc/X11/xdm/Xservers /etc/kde/kdm/Xservers /usr/share/man/man1/Xserver.1.gz [root@localhost /]# and when i tried to start the x server it shows like this.. [root@localhost /]# startX -bash: startX: command not found [root@localhost /]# startx xauth: creating new authority file /root/.serverauth.14699 xauth: creating new authority file /root/.Xauthority xauth: creating new authority file /root/.Xauthority Fatal server error: Server is already active for display 0 If this server is no longer running, remove /tmp/.X0-lock and start again. Invalid MIT-MAGIC-COOKIE-1 keygiving up. xinit: Resource temporarily unavailable (errno 11): unable to connect to X server xinit: No such process (errno 3): Server error. [root@localhost /]# Kindly tell me what is the problem and how to solve this... Thanks in advance, Balaji.S.R |
- First off you should not run X programs as root as much as possible.
- Second off if you are on windows then you need to run an X server the to be able to forward X traffic to. - Third in putty setting you will see Tunnels window. Click "Enable X11 forwarding". This will forward the X traffic to you local X server. - Fourth looks like your running a X window session already on the box in question? hence "Server is already active for display 0" |
Quote:
"sample: cannot connect to X server localhost:10.0" Quote:
If this is not the right forum then could you please tell me where i can find solution.. Thanks, Balaji.S.R |
Have you installed an X server on the Windows machine? If not, then you need to do so. Xming is an X server for Windows. Start the server before running PuTTY and enable X11 forwarding as described above. You should be good to go after doing all that.
|
Quote:
I installed xming and used PuttY.. it is working good.. Thanks for that... Now I want to use in linux machine itself.. not in windows by using PuttY.. when i tried to run the same example, it is showing the same error.. "Cannot connect to Xserver" Should i download and install xserver for linux also to run the qt examples..? Kindly reply.. Thanks, Balaji.S.R |
Did you start the xserver (xming) on the windows side?
Maybe you don't realize, but a program you run in Linux is the X Windows client. The terminal is the X server. You don't even need X running on the remote server to run programs. Simply run the program without trying startx. I haven't used xming but I have used cygwin/X. You may be able to bring the X root screen to the front. If so look at your DISPLAY variable in putty. If it is ":10.0" or ":11.0" you can start the desktop environment by running the appropriate command, such as "startkde" or "gnome-session". I'd recommend a light weight environment such as XFCE. Make sure that putty is configured to work with X. Seeing the "display :10.0" message, it probably is. --- If the Xming server isn't running, you may have the equivalent of "startx" installed on the windows machine to start up the Xming server. For cygwin/X it's called "startxwin.bat". Run it locally, outside of the putty session. |
Quote:
Also, do you have a regular user account? If not, I suggest you create one and use it for day-to-day stuff. There are many reasons not to use the root account all the time, do a search if you want to know more. |
Hi,
My simple project using phonon compiles and runs properly. The program is when i click the pushbutton a song must play with the seek slider.. when i click the button it is showing the following warning and aborted.. can anyone please tell me what the problem is... [root@localhost multimedia]# ./multimedia WARNING: Phonon needs QCoreApplication::applicationName to be set to export audio output names through the DBUS interface ASSERT: "!name.isEmpty()" in file /builddir/build/BUILD/kdelibs-4.0.3/kdecore/kernel/kcomponentdata.cpp, line 71 Aborted [root@localhost multimedia]# also another question when i run musicplayer example from Qt examples it is showing messagebox like this.. "A required codec is missing. You need to install the following codec(s) to play this content: MPEG-1 Layer 3 (MP3)" how to solve this..? if i need to install something means where to get these codecs for fedora 9..? Kindly help me... Thanks Balaji.S.R |
Sound doesn't play on the local computer, it plays on the remote computer. That is where the program runs.
Linux distro's don't include mp3 codecs. You can add the rpmfusion repository for versions of your media programs that are built with mp3 support. |
when it says
Phonon needs QCoreApplication::applicationName to be set to export audio output names through the DBUS interface QCoreApplication::applicationFilePath: Please instantiate the QApplication object first it could be a variable is being set before main() or you need to set the applicationName in main() |
All times are GMT -5. The time now is 02:18 PM. |