LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-31-2017, 11:41 AM   #1
Bob Dill
LQ Newbie
 
Registered: Jul 2017
Posts: 2

Rep: Reputation: Disabled
Starting a GUI Application as Root


Hi All,

I know this question has been asked before, and I have read a number of responses, but the techniques used then do not work now (gkroot, su -i).

Let me be specific. I'm using Oracle Linux version 6.9. A version of OpenDJ was installed by an automated installer provided by a third party, Ellucian. OpenDJ is an LDAP directory, and comes with a configuration tool called control-panel. I connect to the server using VNC Viewer over an SSH tunnel. Because the installer left the permission on the control-panel as root, I first sudo bash and navigate my way to the binary. When I try to run the program, I get
Code:
No protocol specified
Could not launch Control Panel.  Check that you have access to the display.
Check file /tmp/opendj-control-panel-1324812058040546610.log for details.
Okay, so I tried to fix this with.
Code:
[root@oel5-agh bin]# export DISPLAY=localhost:0.0
[root@oel5-agh bin]# ./control-panel 
Could not launch Control Panel.  Check that you have access to the display.
Check file /tmp/opendj-control-panel-7463913483625052525.log for details.
Inside the /tmp/opendj-control-panel-7463913483625052525.log:
Code:
Jul 31, 2017 11:31:31 AM org.opends.guitools.controlpanel.util.ControlPanelLog initLogFileHandler
INFO: Application launched July 31, 2017 11:31:31 AM CDT
Jul 31, 2017 11:31:31 AM org.opends.guitools.controlpanel.ControlPanelLauncher$1 run
WARNING: Error setting look and feel: java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11GraphicsEnvironment
java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11GraphicsEnvironment
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:186)
        at java.awt.GraphicsEnvironment.createGE(GraphicsEnvironment.java:102)
        at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:81)
        at sun.awt.X11.XToolkit.<clinit>(XToolkit.java:122)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:186)
        at java.awt.Toolkit$2.run(Toolkit.java:870)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:862)
        at java.awt.Toolkit.getEventQueue(Toolkit.java:1732)
        at java.awt.EventQueue.isDispatchThread(EventQueue.java:987)
        at javax.swing.SwingUtilities.isEventDispatchThread(SwingUtilities.java:1359)
        at org.opends.quicksetup.ui.UIFactory.initializeLookAndFeel(UIFactory.java:740)
        at org.opends.guitools.controlpanel.ControlPanelLauncher.initLookAndFeel(ControlPanelLauncher.java:218)
        at org.opends.guitools.controlpanel.ControlPanelLauncher.access$000(ControlPanelLauncher.java:57)
        at org.opends.guitools.controlpanel.ControlPanelLauncher$1.run(ControlPanelLauncher.java:156)
        at java.lang.Thread.run(Thread.java:722)

Jul 31, 2017 11:31:31 AM org.opends.guitools.controlpanel.ControlPanelLauncher$1 run
WARNING: Error launching GUI: java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11GraphicsEnvironment
Jul 31, 2017 11:31:31 AM org.opends.guitools.controlpanel.ControlPanelLauncher$1 run
WARNING: java.lang.Class.forName0(Native Method)
java.lang.Class.forName(Class.java:186)
java.awt.GraphicsEnvironment.createGE(GraphicsEnvironment.java:102)
java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:81)
java.awt.Window.initGC(Window.java:466)
java.awt.Window.init(Window.java:486)
java.awt.Window.<init>(Window.java:535)
java.awt.Frame.<init>(Frame.java:420)
java.awt.Frame.<init>(Frame.java:385)
org.opends.quicksetup.SplashScreen.<init>(SplashScreen.java:104)
org.opends.guitools.controlpanel.ControlPanelSplashScreen.<init>(ControlPanelLauncher.java:278)
org.opends.guitools.controlpanel.ControlPanelSplashScreen.main(ControlPanelLauncher.java:294)
org.opends.guitools.controlpanel.ControlPanelLauncher$1.run(ControlPanelLauncher.java:163)
java.lang.Thread.run(Thread.java:722)
Does anyone have any idea about how I can launch this application?

Thanks in advance,
~ Bob
 
Old 07-31-2017, 03:20 PM   #2
jefro
Moderator
 
Registered: Mar 2008
Posts: 20,995

Rep: Reputation: 3406Reputation: 3406Reputation: 3406Reputation: 3406Reputation: 3406Reputation: 3406Reputation: 3406Reputation: 3406Reputation: 3406Reputation: 3406Reputation: 3406
Hello and welcome to LQ.

I think this may help. Not fully sure.

https://stackoverflow.com/questions/...ent-on-solaris

Although that has to do with solaris, I believe it holds similar clues to your issue.
Could not initialize class sun.awt.X11GraphicsEnvironment

It has to do with both java and X11 on this.

https://community.oracle.com/thread/938191

https://docs.oracle.com/middleware/1...8EADD058A1.htm
 
1 members found this post helpful.
Old 08-02-2017, 02:15 AM   #3
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,513

Rep: Reputation: 1010Reputation: 1010Reputation: 1010Reputation: 1010Reputation: 1010Reputation: 1010Reputation: 1010Reputation: 1010
See #3 in this post: http://www.linuxquestions.org/questi...st-4175610570/
 
1 members found this post helpful.
Old 08-08-2017, 08:45 AM   #4
Bob Dill
LQ Newbie
 
Registered: Jul 2017
Posts: 2

Original Poster
Rep: Reputation: Disabled
Thanks for the welcome and information. Unfortunately, neither of your comments really gets me any closer to solving this issue. The application I'm using is not part of a WebLogic server, so I can't set properties like '-Djava.awt.headless=true'. Also, with regards to post three I respectfully disagree with the author's claim. I have set the DISPLAY variable many times, and it has worked in a lot of those situation. I'm not sure where he gets the idea that setting the DISPLAY variable "is ALWAYS the wrong thing to do."

Linux sure does make running a GUI application as root quiet difficult sometimes. I understand that due to security concerns you need to be careful what applications you run as root, but chee wiz, I have to run this application as root!

Thanks again,
~ Bob
 
  


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
starting X application remotely spidy_123 Linux - Networking 2 10-19-2005 05:45 AM
starting application as root question.... chunlee Linux - General 3 06-23-2004 03:29 AM
Starting an application at boot ftwomey Linux - Newbie 3 04-25-2004 07:07 AM
kde starting application !!! Juventino Programming 14 03-09-2004 04:09 PM
Auto starting an application bbereg Linux - Newbie 7 11-21-2002 04:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:12 PM.

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