Solved

How do I solve the following error?

Posted on 2011-02-14
13
449 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
  • 4
  • 4
  • 2
  • +3
13 Comments
 
LVL 18

Accepted Solution

by:
liddler earned 250 total points
Comment Utility
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
Comment Utility
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
Comment Utility
Before you su to root type
$ xhost +
$  su -
# DISPLAY=:0.0
# export DISPLAY
# firestarter
0
 
LVL 35

Assisted Solution

by:torimar
torimar earned 63 total points
Comment Utility
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
Comment Utility
I am still getting the attched error ....

Image1.png
0
 
LVL 18

Assisted Solution

by:liddler
liddler earned 250 total points
Comment Utility
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
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 
LVL 12

Assisted Solution

by:mccracky
mccracky earned 62 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
THX
0
 
LVL 12

Expert Comment

by:mccracky
Comment Utility
@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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

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 …
Have you ever been frustrated by having to click seven times in order to retrieve a small bit of information from the web, always the same seven clicks, scrolling down and down until you reach your target? When you know the benefits of the command l…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
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…

728 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now