LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-02-2009, 03:31 PM   #1
Endoro
LQ Newbie
 
Registered: Jan 2009
Posts: 10

Rep: Reputation: 0
"Cannot open display" error when trying to start X Server Applications


Hi

I'm using slackware (12.2). I've been using linux before but only with a graphical interface, and I now want to "switch" to using only the terminal. I have a graphical interface installed (KDE) but I don't want to use it more than necessary (just now when I'm learning to use the terminal).

The problem is that I can't start graphical applications from the shell. When I for example tries to start firefox or XTerm I get the error "cannot open display :0".

First I got the message "no display specified" but after reading the man-pages I set DISPLAY to ":0". I've also tried setting it to ":0.0", "localhost:0" and "localhost:0.0" but nothing works.

Any ideas?

Thanks // Endoro

edit: sorry for the title... I mean X Window System ofcourse. I dunno where I got "server" from

Last edited by Endoro; 01-02-2009 at 04:01 PM.
 
Old 01-02-2009, 04:20 PM   #2
Endoro
LQ Newbie
 
Registered: Jan 2009
Posts: 10

Original Poster
Rep: Reputation: 0
I solved it by running xinit first... Is that the "right" way to do?
 
Old 01-02-2009, 04:24 PM   #3
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2beta3 on Lenovo Thinkpad W520
Posts: 6,789

Rep: Reputation: 2135Reputation: 2135Reputation: 2135Reputation: 2135Reputation: 2135Reputation: 2135Reputation: 2135Reputation: 2135Reputation: 2135Reputation: 2135Reputation: 2135
The problem is, Firefox as well as Xterm need an X server to work.

But when you are at runlevel 3 you don't use an X server.

So yo will have to start X before you launch one of theses apps. There are at least two ways to do that, second one being easier:
1) as root type:
telinit 4
You'll go to runlevel 4 (graphical mode).
When you are finished you could issue (still as root):
telinit 3
to go back to runlevel 3 (text mode).

2) as a regular user type:
startx
That will launch the windows manager or desktop that user did choose with xwmconfig.
To go back to runlevel 3 (text mode) use the shortcut: Ctrl+Alt+Backspace

Last edited by Didier Spaier; 01-02-2009 at 04:25 PM. Reason: Grammar
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
"Can't open display" Error when running X applications remotely vmniza Linux - Networking 8 06-17-2011 06:22 AM
scp error: xset: unable to open display "" [KIA]aze Linux - Networking 0 07-14-2007 05:18 PM
"Can't open display" error when try to use a program remote heande Linux - Newbie 2 03-11-2005 11:13 AM
"Can't open display" error simanyay Linux - Software 5 03-22-2004 11:59 AM
Troubleshooting x-server "Can't Open Display" rno451 Linux - Software 1 11-12-2003 09:10 PM


All times are GMT -5. The time now is 01:34 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration