LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > *BSD
User Name
Password
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.

Notices

Reply
 
Search this Thread
Old 02-05-2008, 10:25 PM   #1
alan_ri
Senior Member
 
Registered: Dec 2007
Location: Croatia
Distribution: Debian GNU/Linux
Posts: 1,733
Blog Entries: 5

Rep: Reputation: 127Reputation: 127
How to set X11 DISPLAY variable for an operation in program?


This is the output I get when I start Frostwire ( p2p program );

Code:
pcbsd# frostwire
java.awt.HeadlessException:
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
        at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:159)
        at java.awt.Window.<init>(Window.java:317)
        at java.awt.Frame.<init>(Frame.java:419)
        at java.awt.Frame.<init>(Frame.java:384)
        at com.limegroup.gnutella.gui.AWTSplashWindow.splash(AWTSplashWindow.java:150)
        at com.limegroup.gnutella.gui.Main.showInitialSplash(Main.java:71)
        at com.limegroup.gnutella.gui.Main.main(Main.java:39)
pcbsd#

Last edited by alan_ri; 06-16-2009 at 03:29 AM. Reason: wrapping code tags
 
Old 02-05-2008, 10:57 PM   #2
Matir
Moderator
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 118Reputation: 118
Don't try to run it as root.
 
Old 02-05-2008, 11:02 PM   #3
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
You can put a definition before the command like:
DISPLAY=host:0.0 frostwire

For example, suppose that you ssh'ed into another computer with "ssh -X user@host". The DISPLAY variable should be ':10.0' which gets tunneled through ssh. If you had another session open on that host on display 'localhost:0.0', you could enter "DISPLAY=10.0 konsole &". The konsole program would pop up on the remote host.

You might want to investigate why the DISPLAY isn't variable set. How are you logged in?
 
Old 02-06-2008, 12:07 AM   #4
alan_ri
Senior Member
 
Registered: Dec 2007
Location: Croatia
Distribution: Debian GNU/Linux
Posts: 1,733
Blog Entries: 5

Original Poster
Rep: Reputation: 127Reputation: 127
I've run it as normal user ( thanks Matir ). It showed up, but it did not want to connect. Then I've changed the listening port, it connected. Then when I wanted to shut it down it restarted my PC.

Second time, when I've clicked on it, it just went to tray and KSysGuard doesn't list it in the process table.

What is going on here?

Last edited by alan_ri; 08-12-2009 at 10:50 AM. Reason: fixing my grammar
 
Old 02-06-2008, 12:42 AM   #5
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
Right click on the icon in the system tray. There may be a quit context menu item. This is how some programs like Amarok and Ktorrent work as well. If you were downloading the latest disto's dvd via a torrent, you would close the main display after starting the download. The program will continue to operate in the background with an icon displayed in the tray. The program that you call may be a wrapper that calls another program and then quits. The process is a child that may have a different name and a different PID. Look at the output of "ps -u <username>" and see if it shows up there.

Sorry I missed that you were trying to launch it as root in your earlier message.
 
Old 02-06-2008, 09:23 AM   #6
alan_ri
Senior Member
 
Registered: Dec 2007
Location: Croatia
Distribution: Debian GNU/Linux
Posts: 1,733
Blog Entries: 5

Original Poster
Rep: Reputation: 127Reputation: 127
Third time; It didn't connect even if the listening port was the same as the last time. When I've changed it, it connected. I've tried to shut it down and again it restarted my PC.

I'm new to BSD, just few days trying it out, but this is weird. I did everything I should, I've even updated java with timezone update tracker.

I'm not able to give the output of the ps command at the moment. In the tray there is no quit button,only close, but nothing have happened when I've clicked on it. Why can I see it only as a normal user?

I did the same thing on Linux and there was no problem with X11 DISPLAY variable when I've run it as root. I will try the command you've suggested jschiwal ( DISPLAY=host:0.0 frostwire ) as soon as I can.

Thanks!


[EDIT]

I gave up.

Last edited by alan_ri; 08-12-2009 at 10:53 AM. Reason: fixing my grammar
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable. defa0009 Linux - General 13 01-20-2012 02:55 PM
X11 over SSH: $DISPLAY not being set Dria Linux - Networking 4 10-25-2010 01:47 PM
No X11 DISPLAY variable was set, but this program performed an operation which requir ernestkok Fedora 1 04-04-2007 07:10 PM
DISPLAY variable error...cannot set it rameshchandra Linux - General 2 10-09-2005 04:59 AM
set DISPLAY variable W1pEout[64] Linux - Software 4 01-07-2004 09:41 AM


All times are GMT -5. The time now is 02:29 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration