Solved

How do I solve the following error?

Posted on 2011-02-14
13
454 Views
Last Modified: 2012-08-13
Dear,

I have downloaded the following: sudo apt-get install firestarter.

On the command line where I am using the root user,  I wrote: firestarter.

An error occurs showing the following:

(Firestarter :4080) GTK-Warning **-cannot open display.

0
Comment
Question by:nabilhammoud
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
  • 2
  • +3
13 Comments
 
LVL 18

Accepted Solution

by:
liddler earned 250 total points
ID: 34894692
I assume you used the su command to become root.  By doing this you may not have reset your DISPLAY variable to tell the system you are on the same screen as the user you logged in as.

Two options
1) Run program as the user you logged in as: sudo firestarter
2) xhost+
su -
DISPLAY=:0.0
export DISPLAY
firestarter
0
 

Author Comment

by:nabilhammoud
ID: 34895162
I have installed x11-server-utils, and try the above xhost command but nothing happens.

may be the command and arguments are wrong:

So in number 2:     do I have to write #xhost su DISPLAY=:0.0 export DISPLAY firestarter

or What?
0
 
LVL 18

Assisted Solution

by:liddler
liddler earned 250 total points
ID: 34895253
Before you su to root type
$ xhost +
$  su -
# DISPLAY=:0.0
# export DISPLAY
# firestarter
0
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
LVL 35

Assisted Solution

by:torimar
torimar earned 63 total points
ID: 34895261
You did not copy exactly what liddler said, '+' and '-' included. All commands need to go on a separate line.

Alternatively, try:

sudo -i
firestarter


Or try to install 'sux' which is a wrapper for the su command with X environment included:

sudo apt-get install sux
sudo sux -
firestarter
0
 

Author Comment

by:nabilhammoud
ID: 34895410
I am still getting the attched error ....

Image1.png
0
 
LVL 18

Assisted Solution

by:liddler
liddler earned 250 total points
ID: 34895459
Firstly you need to do the xhost before the su, as nabil owns the X session and needs to give permission for the su'd user to use it.

However, looking at you picture, how are you connecting to the server and from what type of client (PC, linux, mac) ?

It looks like you are ssh-ing to the server, if so you need to tunnel X (ssh -X) assuming it's allowed in your sshd_conf and you need to be running an X server on the client
0
 
LVL 12

Assisted Solution

by:mccracky
mccracky earned 62 total points
ID: 34897233
If it's a server install without X, then your trying to use a capability it doesn't have.  You can try ssh with X-forwarding from a machine with X installed.

And, try to follow the suggested commands in the order given.
0
 
LVL 3

Assisted Solution

by:berniep
berniep earned 62 total points
ID: 34901166
I would suggest checking the X GUI desktop capability on the server's console before trying to tunnel X over ssh.

Does your server console have a GUI desktop running already, or does it have a character (text) login as per your screen shot above?

If it's a character session, login as root (if you have root login ability), then start X (I use the command startx, I'm not familiar with the xhost command), & then from a terminal session with the GUI desktop, logged in as root, you should be able to run your firestarter command.
0
 

Author Comment

by:nabilhammoud
ID: 34903965
Greeting all,

I am using a fresh ubunto server installation on virtual box machine.


 Nabil
0
 
LVL 18

Assisted Solution

by:liddler
liddler earned 250 total points
ID: 34904493
Nabil,
Are you running an Ubuntu  windows (with menus, icons etc) environment - this is called X or is it just black screen, as in your image?

If it's only black screen text, you will have to either run an X environment somewhere to display the firestarter GUI.  You may want to look at putting cygwin on your PC as a way of displaying X windows, though there are other, both free and paid for X displays for PCs
0
 
LVL 3

Assisted Solution

by:oppofwar
oppofwar earned 63 total points
ID: 34905138
I think You are using Ubuntu Server with No gui support , First install Package Ubuntu-Desktop for Gui , then try this command in gui.

#apt-get install ubuntu-desktop -y
0
 

Author Closing Comment

by:nabilhammoud
ID: 34905577
THX
0
 
LVL 12

Expert Comment

by:mccracky
ID: 34907010
@several posters - you don't need a full gui on the server to get X-forwarding to work through ssh.  Only the client part of X.  It will use the X server on the local machine to display.  If you install enough for the package "xeyes" rather than the full desktop GUI, X forwarding should work.
0

Featured Post

Monthly Recap

May was a big month for new releases from Linux Academy! Take a look at what our team built recently in our blog. You can access the newest releases from our blog.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses

624 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question