Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
Hi,
I have to install a jar file to /usr/local/. But when I run the command :
java -jar installme.jar
It gives an error about display:
No protocol specified
Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11GraphicsEnvironment
...
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:68)
...
However, when I login as a normal user instead of root, it allows me to start graphical installation. But, the setup needs to copy some files to /usr/local folder for which root's privileges is needed.
I've tried to write to .bashrc and profile this:
DISPLAY='0.0'
export DISPLAY
but it didn't work. What can I do? Thanks
bugsbunny wrote:Double check the permissions on /usr/local. I don't think I changed mine and mine are:
Owner = root = rwx
Group = staff = rwx
Other = rx
In which case just make your user a member of the staff group, then log-out and back in.
I was a member of the staff group, I added it as a primary group to me and relogin to X:
usermode -g staff myname
But I got the same error from jar installer says that could not create a folder inside /usr/local/../..
I've also checked the group privileges for that folder giving write error.
Is there any way to login as a root and run the setup in the terminal with X enabled?
bugsbunny wrote:You need to run that from an x-term, possibly using gksu. It's found in the gnome menus under Administration|Login Window
It was the first time that I heard gksu as a newbie. I run the gksu as my user privileges (cos got the same display error when I was root), then enabled the "preserve environment" property from "advance" menu of gksu (cos it didn't recognize the "java -jar myfile.jar"). Then it worked flawlessly!
But I didn't figure out to what to do with gnome menus under Administration|Login. It seems that there is nothing related to gksu or gdmsetup.
Hi again,
I've just got something and wanted to share with you:
When log in as a root with this way (su -) I got the previous errors mentioned before, but when I use just (su) all the problems encountered with display is solved.
I know that putting a dash after su enables root environments (e.g JRE), but why I can get display error with every app needs X?