Solved

How do I solve the following error?

Posted on 2011-02-14
13
452 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
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
000webhost.com default error log 1 57
Upgrade BIOS / EUFI at Scale 4 70
RHEL 6.7 Gnome Desktop on VMware 6 VM 9 111
The better OS Architecture 13 87
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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.

756 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