LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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, 02: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 03:01 PM.
 
Old 01-02-2009, 03: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, 03:24 PM   #3
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Rep: Reputation: Disabled
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 03:25 PM. Reason: Grammar
 
  


Reply



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 05:22 AM
scp error: xset: unable to open display "" [KIA]aze Linux - Networking 0 07-14-2007 04:18 PM
"Can't open display" error when try to use a program remote heande Linux - Newbie 2 03-11-2005 10:13 AM
"Can't open display" error simanyay Linux - Software 5 03-22-2004 10:59 AM
Troubleshooting x-server "Can't Open Display" rno451 Linux - Software 1 11-12-2003 08:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:16 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
Open Source Consulting | Domain Registration