开发者

launch eclipse,and an error occurs

开发者 https://www.devze.com 2023-01-03 02:18 出处:网络
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 occ

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: asser开发者_高级运维tion `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.


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.


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 ;)

0

精彩评论

暂无评论...
验证码 换一张
取 消