Bug 650644
Summary: | to run as root, gedit requires "su -", not just "su" | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Rob <robertfarmer37> |
Component: | gedit | Assignee: | Ray Strode [halfline] <rstrode> |
Status: | CLOSED WONTFIX | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | high | Docs Contact: | |
Priority: | low | ||
Version: | 17 | CC: | awilliam, collura, dew, drfudgeboy, goodyca48, jhparizona, ousia, pajafumo, pardarlington, robatino, rstrode, sanjay.ankur, th-kouka |
Target Milestone: | --- | Keywords: | CommonBugs |
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | https://fedoraproject.org/wiki/Common_F14_bugs#su_gnome | ||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2013-08-01 16:46:22 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Rob
2010-11-07 15:21:49 UTC
use 'su -' rather than 'su'. I'm not sure if this is really considered a bug or not, to be honest. if so I think it's in glib / dbus, not gedit. -- Fedora Bugzappers volunteer triage team https://fedoraproject.org/wiki/BugZappers i figure there must have been another report of this but I can't find it right now; tagging this one as CommonBugs so I don't forget about it. -- Fedora Bugzappers volunteer triage team https://fedoraproject.org/wiki/BugZappers Maybe related to a similar bug i posted for F13? https://bugzilla.redhat.com/show_bug.cgi?id=615285 Whats the difference between "su -" and "su"? Just testing them out both seem to just log me in as root rather than the intended "run only this 1 command as root" I assumed it was a bug as it worked previously in anything <= F13, though maybe it working previously was a bug? Also most documentation i've seen, suggests using "su -c 'gedit somefile'" su -c 'gedit somefile' - is the equivalent change for the su -c case. What the '-' does is tell su to use root's entire environment, rather than just give root privileges but keep the existing (user) environment. -- Fedora Bugzappers volunteer triage team https://fedoraproject.org/wiki/BugZappers *** Bug 659166 has been marked as a duplicate of this bug. *** Ok, I think you didn't understandme. Here are the steps: 1. Open Terminal 2. Show: [tgp@nobocanuser ~]$ 3. type: su 4. password: ****** 5. Show: [root@nobocanuser tgp]# 6. Type: gedit /etc/X11/xorg.conf (or another file to edit) 7. Show: (gedit:2687): EggSMClient-WARNING **: Failed to connect to the session manager: None of the authentication protocols specified are supported ** GLib-GIO:ERROR:gdbusconnection.c:2270:initable_init: assertion failed: (connection->initialization_error == NULL) Abortado (`core' generado) [root@nobocanuser tgp]# 8. End of the error and I don't know why I get this error, none of the another versions of Fedora give me that error. Is this a bug or I have some thing misconfigured? We already explained what you have to do above. Instead of typing 'su', type 'su -' . that will fix it. As Robert Farmer originally posted, "su -c 'gedit'" does not work on all systems. Here is what my system says: [Donald@Zonotrichia ~]$ su -c 'gedit /etc/X11/xorg.conf' Password: (gedit:2767): EggSMClient-WARNING **: Failed to connect to the session manager: None of the authentication protocols specified are supported ** GLib-GIO:ERROR:gdbusconnection.c:2270:initable_init: assertion failed: (connection->initialization_error == NULL) [Donald@Zonotrichia ~]$ --Donald See comment 4 - you need the dash at the end: su -c 'gedit /etc/X11/xorg.conf' - OK--That works! I thought the discussion was over the - in -c and didn't notice the one at the end. *** Bug 657703 has been marked as a duplicate of this bug. *** I have a problem, but I do not know if my problem is different.... [root@acapulcos Escritorio]# ZendStudio/ZendStudio -i silent ** GLib-GIO:ERROR:gdbusconnection.c:2270:initable_init: assertion failed: (connection->initialization_error == NULL) Abortado (`core' generado) I need to use ZendStudio. I'm from México, I'm sorry for my bad english. Saludos so do the same. use 'su -' to become root, not 'su'. (In reply to comment #13) > so do the same. use 'su -' to become root, not 'su'. This is presumably a workaround rather than a solution? It used to work fine a couple of versions ago (I forget exactly when--maybe F13 or F14?). It is rather annoying now having to 'su -', because quite often you want to keep the same working directory etc. It ought to be possible for a root shell that's kept the same environment to connect to the same session... intuitively it would be harder if it hadn't kept the environment intact! Could this be properly fixed? (In reply to comment #10) > OK--That works! I thought the discussion was over the - in -c and didn't > notice the one at the end. OK, I too was having the same problem and did not notice the - at the end of the command. Well, really, I did notice the - but thought it was part of the quoting rather than part of the command. When I read this comment the light finally went off and I finally got the command to work. (In reply to comment #14) > (In reply to comment #13) > > so do the same. use 'su -' to become root, not 'su'. > > This is presumably a workaround rather than a solution? > > It used to work fine a couple of versions ago (I forget exactly when--maybe > F13 or F14?). It is rather annoying now having to 'su -', because quite > often you want to keep the same working directory etc. > > It ought to be possible for a root shell that's kept the same environment to > connect to the same session... intuitively it would be harder if it hadn't > kept the environment intact! > > Could this be properly fixed? I would like to have the maintainers comment on this. Is this really a bug that will possibly be addressed? Or is it intential and I should just "get over it" and get used to running the command as "su -c 'gedit somefile' -" As a user vote, I too would like the old behaviour or an explanation of why it should be working this way. Thanks, jim I think at this point it's just something you have to get used to. I am not the canonical reference, though. If anyone involved in GNOME tells you different, trust them. (In reply to comment #17) > I think at this point it's just something you have to get used to. I am not > the canonical reference, though. If anyone involved in GNOME tells you > different, trust them. Personally I think this is a genuine bug, but I'd like to hear from the maintainer why it behaves this way and if it's intentional. Maintainers going to chime in as requested? Running gedit as root is certainly "off label" use. The problem, I believe, is the session bus doesn't allow root to connect to it, on the user that belongs to the session. If this used to work, my guess is gedit used to talk to the session manager via the XSMP protocol instead of via the session bus. you can probably unset DBUS_SESSION_BUS_ADDRESS before running gedit and get back the old behavior. Another idea is use "sudo" instead of su -c ' '. sudo clears the environment of the started process so DBUS_SESSION_BUS_ADDRESS will be unset. Clearly, the "right" fix here, though, is making it so if a user tries to save to a file that is owned by root, gedit prompts for the administrator (as defined by polkit) password, so users don't have to run it as root in the first place. This message is a reminder that Fedora 17 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 17. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as WONTFIX if it remains open with a Fedora 'version' of '17'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version prior to Fedora 17's end of life. Bug Reporter: Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 17 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior to Fedora 17's end of life. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. In F19, gedit run with "su" only emits some warnings in the terminal, but it *does* run. (With "su -", it runs with no warnings.) So this bug appears mostly fixed. [andre@compaq-pc ~]$ su - Password: [root@compaq-pc ~]# gedit [root@compaq-pc ~]# logout [andre@compaq-pc ~]$ su Password: [root@compaq-pc andre]# gedit (gedit:8360): dconf-WARNING **: failed to commit changes to dconf: The connection is closed (gedit:8360): dconf-WARNING **: failed to commit changes to dconf: The connection is closed (gedit:8360): dconf-WARNING **: failed to commit changes to dconf: The connection is closed Error creating proxy: The connection is closed (g-io-error-quark, 18) Error creating proxy: The connection is closed (g-io-error-quark, 18) Error creating proxy: The connection is closed (g-io-error-quark, 18) Error creating proxy: The connection is closed (g-io-error-quark, 18) Error creating proxy: The connection is closed (g-io-error-quark, 18) (gedit:8360): Gtk-CRITICAL **: gtk_application_inhibit: assertion `application->priv->sm_proxy != NULL' failed (gedit:8360): dconf-WARNING **: failed to commit changes to dconf: The connection is closed (gedit:8360): Gtk-CRITICAL **: gtk_application_inhibit: assertion `application->priv->sm_proxy != NULL' failed (gedit:8360): dconf-WARNING **: failed to commit changes to dconf: The connection is closed [root@compaq-pc andre]# Also, I probably never tested with F18. Can someone who is still running F18 do that? Seems OK in F18 here. On fully updated Fedora 19 running kernel 3.9.9-302.fc19.x86_64, running gedit from "su -" login I get the following error, if I press any key: [craig@sys76 ~]$ su - Password: [root@sys76 ~]# gedit /etc/hosts (gedit:2019): Gtk-WARNING **: Calling Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files [root@sys76 ~]# Fedora 17 changed to end-of-life (EOL) status on 2013-07-30. Fedora 17 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. Thank you for reporting this bug and we are sorry it could not be fixed. |