Gedit does not start as root

Asked by Anthony Glenn

I changed my root password, so I could do things as root. In particular I wanted to edit xorg.conf in /etc/X11.
That was the only way I could see to change the screen refresh rate and resolution. It worked.
The graphical tool at System > Preferences > Screen Resolution does not work.
It will not allow me my preferred resolution of 1152 * 864 with a refresh rate of 85 Hz.
Graphics card is based on nVidia 7600GS.
My Hitachi CM766ET monitor goes thru a KVM switch, maybe that is relevant.
Anyway, start Terminal, do "gedit", works fine. Change to root with "su -" then put in root password.
Works fine too. Try "gedit" again. Get error "cannot open display:". Kind of annoying.
Do "cd /etc/X11". Works. Can edit xorg.conf with "nano xorg.conf". Works.
Would like to use Gedit instead, but as root, it does not work. WTF?
Try Gedit again, still the same error message.
Reboot computer and finally I have my desired resolution and refresh rate.

Please make Gedit work all the time.
Please get the Screen Resolution applet fixed.
What I had to do was way way way too nerdy.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu gnome-terminal Edit question
Assignee:
No assignee Edit question
Solved by:
Gord Allott
Solved:
Last query:
Last reply:
Revision history for this message
Benoit Malet (benoit-malet) said :
#1

Hello !

Can you please tell us what's the error message you get while trying to launch gedit while logged as root ?

Thanks and regards,
Benoît

Revision history for this message
Best Gord Allott (gordallott) said :
#2

ubuntu is designed with the idea of 'sudo' in mind, you don't have to login as root and logging in as root is not recommened (and unusual). if you need to use gksudo to alter root files such as xorg.conf you should really use
"gksudo gedit /etc/X11/xorg.conf"

Revision history for this message
Anthony Glenn (aglenn-pcug) said :
#3

OK, using:

gksudo gedit /etc/X11/xorg.conf

That worked. After a prompt for my admin password, Gedit started, I could edit the file,
save, print, all gorgeous.

ALAS, ALAS, a whole bunch of error messages appeared in the terminal window. Here they are below the line -----. Obviously not acceptable. Please fix.

---------------
(gedit:5579): GnomeUI-WARNING **: While connecting to session manager:
Authentication Rejected, reason : None of the authentication protocols specified are supported and host-based authentication failed.

(gedit:5579): GnomePrint-WARNING **: Could not create filter from description 'GnomePrintFilterSelect': filter 'GnomePrintFilterSelect' is unknown

(gedit:5579): GLib-GObject-WARNING **: invalid (NULL) pointer instance

(gedit:5579): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion `G_TYPE_CHECK_INSTANCE (instance)' failed

(gedit:5579): GnomePrint-WARNING **: Could not create filter from description 'GnomePrintFilterClip [ GnomePrintFilterMultipage ]': filter 'GnomePrintFilterClip' is unknown

(gedit:5579): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed

(gedit:5579): libgnomeprintui-CRITICAL **: gnome_print_layout_selector_load_filter: assertion `GNOME_IS_PRINT_FILTER (f)' failed

(gedit:5579): GLib-GObject-CRITICAL **: g_object_set: assertion `G_IS_OBJECT (object)' failed

(gedit:5579): GLib-GObject-CRITICAL **: g_object_set: assertion `G_IS_OBJECT (object)' failed

(gedit:5579): GLib-GObject-CRITICAL **: g_object_set: assertion `G_IS_OBJECT (object)' failed

(gedit:5579): GLib-GObject-CRITICAL **: g_object_set: assertion `G_IS_OBJECT (object)' failed

(gedit:5579): GLib-GObject-CRITICAL **: g_object_set: assertion `G_IS_OBJECT (object)' failed

(gedit:5579): GnomePrint-CRITICAL **: gnome_print_filter_reset: assertion `GNOME_IS_PRINT_FILTER (f)' failed

(gedit:5579): GnomePrint-CRITICAL **: gnome_print_filter_flush: assertion `GNOME_IS_PRINT_FILTER (f)' failed

(gedit:5579): GLib-GObject-CRITICAL **: g_object_set: assertion `G_IS_OBJECT (object)' failed

(gedit:5579): GLib-GObject-CRITICAL **: g_object_set: assertion `G_IS_OBJECT (object)' failed

(gedit:5579): GLib-GObject-CRITICAL **: g_object_set: assertion `G_IS_OBJECT (object)' failed

(gedit:5579): GLib-GObject-CRITICAL **: g_object_set: assertion `G_IS_OBJECT (object)' failed

(gedit:5579): GLib-GObject-CRITICAL **: g_object_set: assertion `G_IS_OBJECT (object)' failed

(gedit:5579): GLib-GObject-CRITICAL **: g_object_set: assertion `G_IS_OBJECT (object)' failed

(gedit:5579): GnomePrint-CRITICAL **: gnome_print_filter_reset: assertion `GNOME_IS_PRINT_FILTER (f)' failed

(gedit:5579): GnomePrint-CRITICAL **: gnome_print_filter_flush: assertion `GNOME_IS_PRINT_FILTER (f)' failed

** (gedit:5579): WARNING **: could not set the value of Settings.Document.Filter, node not found

------------
Note to Benoit Malet, who said:
Can you please tell us what's the error message you get while trying to
launch gedit while logged as root ?

Have a careful look in my original message after the words "Get error".
Powers of observation & situational alertness are all good things. Cheers.

Revision history for this message
Benoit Malet (benoit-malet) said :
#4

Hello !

Indeed, I guess I should sleep a bit more at night ...

For the warning messages, these are not problems ... It's safe to ignore them.

Regards,
Benoît

Revision history for this message
Bhavani Shankar (bhavi) said :
#5

yes.. you are right..:) I am drowsing now at midnight...:)

Revision history for this message
Aswarp (aswarp2002) said :
#6

I have been experiencing some problems with Firefox since I updated to version 3 (actually 3.0.1, but maybe they were there before). Specially when opening half a dozen tabs or more, with javascripts, flash and videos on them.
Firefox stops responding, first for seconds only, then completely.
In order to trace the problem, i run Firefox from the command line, and observed that the last messages output before responding match those stated in this thread. However I am not running Gedit (my system is KUbuntu Hardy Heron 8.04.1 running on KDE only):

(firefox:15892): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed

(firefox:15892): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed

(firefox:15892): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed

A huge number of similar lines follow.