tags:

views:

89

answers:

2

environment: Ubuntu 9.10 Eclipse eclipse-jee-galileo-SR2-linux-gtk

When I login the ubuntu,and run the eclipse, it works. but when I changed to root user and then launch eclipse,there is an error occurs:

(eclipse:5632): GLib-GObject-WARNING **: invalid (NULL) pointer instance

(eclipse:5632): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion `G_TYPE_CHECK_INSTANCE (instance)' failed

(eclipse:5632): Gtk-CRITICAL **: gtk_settings_get_for_screen: assertion `GDK_IS_SCREEN (screen)' failed

(eclipse:5632): Gtk-WARNING **: Screen for GtkWindow not set; you must always set a screen for a GtkWindow before using the window

(eclipse:5632): Gtk-WARNING **: Screen for GtkWindow not set; you must always set a screen for a GtkWindow before using the window

(eclipse:5632): Gdk-CRITICAL **: gdk_screen_get_display: assertion `GDK_IS_SCREEN (screen)' failed

(eclipse:5632): Gdk-CRITICAL **: gdk_display_get_pointer: assertion `GDK_IS_DISPLAY (display)' failed

(eclipse:5632): Gtk-WARNING **: Screen for GtkWindow not set; you must always set a screen for a GtkWindow before using the window

(eclipse:5632): Gdk-CRITICAL **: gdk_screen_get_n_monitors: assertion `GDK_IS_SCREEN (screen)' failed

(eclipse:5632): Gtk-WARNING **: Screen for GtkWindow not set; you must always set a screen for a GtkWindow before using the window

(eclipse:5632): Gdk-CRITICAL **: get_monitor: assertion `GDK_IS_SCREEN (screen)' failed Segmentation fault

But when I login in Ubuntu as root, and run eclipse, it is ok. I changed to another non-root user,there is an error too.

How to deal with this problem. I am looking forward to your reply. thanks.

+1  A: 

You should never use your root account as a normal user. Use Ubuntu's "sudo" command instead.

The error, by the way, is you are logged in as your user and you are using root from a terminal, so root doesn't find a screen.

You should never use Eclipse as root either, why would you want to develop with your root account? This is crazy talk!!

  1. First rule about GNU/Linux-Unix is you do not login with your root account for daily use.
  2. Second rule about GNU/Linux-Unix is you do not login with your root account for daily use.
  3. Third rule about GNU/Linux-Unix is RTFM.

Hope this helps. Don't use root.

Fernando
it works.(1)ln -s /usr/local/jdk1.6.0_20/bin/java /usr/bin/java(2)sudo ./eclipsei use sudo to launch eclipse because i want to listen to 53 port in my project which is below 1024.thanks for your reply.
chillwarmoon
Right. Anyway, I'd recommend as VonC says, redirecting port 53 to say 8053. Good luck!
Fernando
+1  A: 

Another way to use Eclipse as you (and not root), would be to try and redirect the port 53 you want to listen to to (for instance) 8053 through rinetd.
(see this SF answer).

The idea remains: avoid running anything as root ;)

VonC