gedit crashes system when launched from terminal as root

Bug #1845892 reported by Guilherme

This bug report was converted into a question: question #684506: gedit crashes system when launched from terminal as root.

6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gedit (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

This happens whenever I try to edit a file (for example /etc/apt/sources.list) or open gedit with root privileges. Application window opens, characters are replaced by squares, and becomes impossible to drag or resize it as my system completely stalls. Also if firefox is open, it also becomes unresponsive and crashes.
This screenshot summarises what i have been experiencing so far: https://i.imgur.com/8R6vZhE.jpg
Additionally, it also happens with nautilus.

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: gedit 3.28.1-1ubuntu1.2
ProcVersionSignature: Ubuntu 4.15.0-65.74-generic 4.15.18
Uname: Linux 4.15.0-65-generic x86_64
ApportVersion: 2.20.9-0ubuntu7.7
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Sun Sep 29 19:34:14 2019
InstallationDate: Installed on 2016-11-14 (1048 days ago)
InstallationMedia: Ubuntu 16.04 LTS "Xenial Xerus" - Release amd64 (20160420.1)
SourcePackage: gedit
UpgradeStatus: Upgraded to bionic on 2018-08-21 (403 days ago)

Revision history for this message
Guilherme (tichours) wrote :
Revision history for this message
Bashing-om (bashing-om) wrote :

Hello Guilherme

You do not say how you are starting gedit. As policykit now applies what results:
gedit admin:///etc/apt/sources ?

Changed in gedit (Ubuntu):
status: New → Incomplete
Revision history for this message
Guilherme (tichours) wrote :

Hi there Bashing-om.

Thanks for the quick response.
I'm starting gedit from terminal.
$gedit runs without any issue, however
$sudo gedit ... yields all the said issues.
As a layman in the subject, I don't know if this is really a bug or misconfiguration in my system. But the fact is that it wasn't happening since last week or so.

Revision history for this message
Bashing-om (bashing-om) wrote :

Guilherme; Hey -

The fact of the matter is that "sudo" is no longer the means to enable 'root's" use of GUI applications; as gksu is depreciated. Not a miss-configuration of the system either.

Preferable is "admin://" - though there are 2 other alternates that I am aware of.
If you do, as I, prefer "sudo" then try as
sudo -H gedit etc/apt/sources
to start a GUI App from terminal.

Else there is also "pkexec". To do so you may have to install the admin package:
sudo apt install nautilus-admin.
then: pkexec gedit

Please try these alternatives and advise on the result.

Still - look at this as a miss use of privileges rather than a bug until proven otherwise.

Revision history for this message
Guilherme (tichours) wrote :

Bashing-om,

I tried sudo -H gedit and went to search your suggestion on pkexec which lead me to this post on how to use it:
https://unix.stackexchange.com/questions/203136/how-do-i-run-gui-applications-as-root-by-using-pkexec#answer-203149
Both of these solutions opens gedit but with an extremely slow response to commands. Everything else I'm doing is lost due to stall, specially firefox, which I'm forced to kill. Also, as soon as I run them on terminal the fans on my laptop start an odd behaviour as if it's preventing overheating. Only stops when I close the app. window.

"admin://" is what work worked for me till now and I'm sticking with it.

If you have any idea why this is happening I would be happy to know.

Best regards.

Revision history for this message
Bashing-om (bashing-om) wrote :

Guilherme; Well

As this no longer appears to be a bug, I am moving this to Launchpad Answers.
I will meet you there and we will further explore your issue.

Thanks for taking the time to make ubuntu better.

Revision history for this message
Bashing-om (bashing-om) wrote :

converted to a question.

Changed in gedit (Ubuntu):
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.