Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How do I solve the following error?

Posted on 2011-02-14
13
Medium Priority
?
456 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 1000 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 1000 total points
ID: 34895253
Before you su to root type
$ xhost +
$  su -
# DISPLAY=:0.0
# export DISPLAY
# firestarter
0
Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

 
LVL 35

Assisted Solution

by:torimar
torimar earned 252 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 1000 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 248 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 248 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 1000 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 252 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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

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 …
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
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.:
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Suggested Courses

783 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