Solved

How do I solve the following error?

Posted on 2011-02-14
13
453 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
Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

 
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

Manage your data center from practically anywhere

The KN8164V features HD resolution of 1920 x 1200, FIPS 140-2 with level 1 security standards and virtual media transmissions at twice the speed. Built for reliability, the KN series provides local console and remote over IP access, ensuring 24/7 availability to all servers.

Question has a verified solution.

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

Suggested Solutions

Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses

751 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