LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

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

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
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

Original Poster
Blog Entries: 5

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
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
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

Original Poster
Blog Entries: 5

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



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 15 02-18-2022 08:09 AM
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

LinuxQuestions.org > Forums > Other *NIX Forums > *BSD

All times are GMT -5. The time now is 01:40 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration