Gedit crashes Opensuse 12.3 when launched as root

I am affected by the “gnome run as root causes Opensuse 12.3 to crash” bug. http://web.archiveorange.com/archive/v/wmeLDJVYcGVVnFGfJKe0

Is there a patched or new version of gedit available from Opensuse.org? Does anyone, here, know a permanent fix?

The aforementioned webpage mentions the following work around:

su
unset XDG_RUNTIME_DIR
gedit

That seems to work for me, but, apparently, I must always do that to run gedit as root, otherwise Opensuse 12.3 crashes.

In my experience the bug manifests regardless of how a normal gedit root instance is achieved, “Terminal - Super User Mode”, gnomesu gedit, etcetera.

Occasionally I have also gotten the following message after launching gedit root from “Terminal - Super user Mode”:
(gedit:5961): GtkSourceView-WARNING **: in file /usr/share/gtksourceview-3.0/language-specs/octave.lang: style ‘octave:keyword’ not defined

The exact same warning message displayed twice, consecutively, but maybe I inadvertently hit [return] between the messages. Is https://forums.opensuse.org/english/get-technical-help-here/applications/453089-using-gedit-root-gtk-warning-cannot-open-display.html related?

3.7.10-1.1-desktop
gnome desktop environment
gedit 3.6.2

I don’t know, but if I do an Alt-F2: gnomesu gedit, I enter the root user password and it works OK. If I run the same thing from terminal, it works OK with a simple unrelated warning:

gnomesu gedit

Fontconfig warning: "/etc/fonts/conf.d/56-user.conf", line 9: reading configurations from ~/.fonts.conf is deprecated.

I see that my gedit is at version 3.6.2 also. I have upgraded to kernel 3.9.1 and use the nVIDIA 319.17 driver and have all of the major desktops installed, but I would not think that matters to gnome, but just so you know.

Thank You,

Thanks fore replying jdmcdaniel3.

http://web.archiveorange.com/archive/v/wmeLDkfSNyzOXJMXPD04 is another bug report about “gedit crashing Opensuse 12.3 when run as root”. Those bug reports predate my installation of Linux, of any distribution, other than running liveDVDs; so, it seems like there are definitely more experienced Linux users than myself encountering the bug.

I guess I can put those work around commands in a shell script, .sh, and run it whenever I want to launch gedit as root, because I have encountered the bug almost routinely.

Try editing the menu using alacarte.

On 2013-05-11 04:06, 050813 wrote:
>
> Thanks fore replying jdmcdaniel3.
>
> http://web.archiveorange.com/archive/v/wmeLDkfSNyzOXJMXPD04 is another
> bug report about “gedit crashing Opensuse 12.3 when run as root”.
> Those bug reports predate my installation of Linux, of any distribution,

Rubbish! :slight_smile:

A bug report about something crashing on openSUSE is done at the Novell
Bugzilla site. That orange site is a almost useless copy, because it
hides the link to the exact bugzilla, number, and relevant data.

The real reports are here:


https://bugzilla.novell.com/show_bug.cgi?id=802680
https://bugzilla.novell.com/show_bug.cgi?id=814626

The first one is reported against 13.1 Beta 1, ie, a non released
version. It does not apply to you, because you are using 12.3.

The second bug is against 12.3. It is not solved, but it gives you a
trick to get working, on comment 6, the one you mention on your first
post. And yes, you have to do that trick every single time.

Those reports do not apply to “any distribution”, they apply only to
openSUSE. Maybe other distributions have the same bug, but these reports
do not say.

> I guess I can put those work around commands in a shell script, .sh,
> and run it whenever I want to launch gedit as root, because I have
> encountered the bug almost routinely.

Yes, that’s a good idea.


Cheers / Saludos,

Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)

robin_listas, it seems you have completely misunderstood and misquoted what I wrote. And it did not help when you truncated my original statement(sentence). All I was saying with "Those bug reports predate my installation of Linux, of any distribution …" was that I had not installed Linux, of any kind(distribution), when the 2 bug reports I provided links to were made. You seem, with some zeal, to be hurling the words garbage/worthless(rubbish) at me, you even used an exclamation point. And then you go on to say the reports do not apply to “any distribution”, as if I said they did. I never said they did; in fact, in more than one place I explicitly indicated Opensuse 12.3, including the title of the thread. The title of the thread is “Gedit crashes Opensuse 12.3 when launched as root”; I even identified 3.6.2 as the version of Gedit I am using.

The word predate means “to occur or exist at an earlier date”. Quite simply, all I said, in the quoted statement, was that the bug reports were made before I had installed any kind of Linux distro and it seems like those who have reported the bug have more experience than me, with Linux.

Further, if it were not for those “orange sites” I would still be struggling to find an explanation as to why my Opensuse 12.3 installation keeps crashing under certain conditions; so, I feel grateful to those “orange sites”. All I did was type the “symptoms” my computer was manifesting into a major search engine and the SERP displayed those “orange sites” near the top; so, to me, it seems like they are doing something right. Especially when I consider the fact that one of those “orange sites” provided a “work around” that, so far, has succeeded in stopping my computer from crashing.

On 05/11/2013 08:36 AM, 050813 wrote:
> All I did was type the “symptoms” my
> computer was manifesting into a major search engine

i would suggest next to not use a major search engine because that is
very likely to include non-openSUSE info which may or may not be
useful or confusing…instead you can search directly inside
bugzilla…start that search from here: http://tinyurl.com/nzhq7j
which is a how to submit bugs how-to which includes a first step to
search (before submitting an unnecessary duplicate bug)

http://en.opensuse.org/Submitting_Bug_Reports#Searching_for_bugs

and, i offer for your consideration the fact that the person who
attempted to help you (Carlos) is not a native english speaker and i
am sure you misunderstood the tone and thrust of his help attempt.

if you could be a little less on edge you will do better here…
we have lots of users and helpers here with english as their second
or fifth language…it is sometimes difficult to understand and not
take a kindhearted helpful hint as a slam…but, try.


dd

On 2013-05-11 14:58, dd wrote:
> On 05/11/2013 08:36 AM, 050813 wrote:
>> All I did was type the “symptoms” my
>> computer was manifesting into a major search engine
>
> i would suggest next to not use a major search engine because that is
> very likely to include non-openSUSE info which may or may not be useful
> or confusing…instead you can search directly inside bugzilla…start
> that search from here: http://tinyurl.com/nzhq7j which is a how to
> submit bugs how-to which includes a first step to search (before
> submitting an unnecessary duplicate bug)
>
> http://en.opensuse.org/Submitting_Bug_Reports#Searching_for_bugs

That was my whole point, thanks.

I used the word “rubbish” because I want to see bug reports whole and
unmodified, from the source site, not from a copy.


Cheers / Saludos,

Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)

I placed limits on the search engine I mentioned in this thread by using quotes; essentially, I defined the results I wanted, and those results included specific terms limited to the issues I was experiencing with Linux. And, as I also already stated, those results helped me immensely, because, in the SERP, I found a workaround that, thus far, has stopped my Opensuse installation from crashing.

I regularly communicate in languages other than English, although my preference is to communicate in English where that choice is possible. For many years I have made an effort to avoid, to the extent that I can, words or phrases with a largely subjective meaning when I believe, as I generally do with certain forums, etcetera, that potential answers may come from a human being whose understanding of the language I use, for whatever purpose, is not native. For example, “Those bug reports predate my installation of Linux, of any distribution …” does not include significantly subjective terms so that it can simply be understood, entirely, by a somewhat basic application of the language in which it is written. It simply says, those bug reports were made before I installed Linux, of any kind, as I already stated. I intentionally avoided slang or jargon.

Further, it was, and is, obvious that my statement was grossly misunderstood. And I do not want to be misunderstood anymore than the average human being wants to be misunderstood; so, I made it known that my statement was misunderstood.

"It should not be necessary for any human being, anywhere on this planet, to apologize for making an effort to correct someone who has misunderstood him or her, or misunderstood something he or she has said."

A human being who replied, to me, in this thread grossly misunderstood what I said; essentially, all I did was say "you misunderstood". In my opinion, seeking the clarity that can result by correcting someone’s misunderstanding, especially on a computer related forum, should be routine.

I need everyone to understand we are here to ask for help and to provide help for the usage of openSUSE. No other exchanges will be tolerated. Personnel attacks are not tolerated by anyone. If you can not say something good, its best to say nothing at all, please. I will be required to close the thread if these exchanges continue and other actions as required. Please consult this for further details: openSUSE Forums FAQ

Thank You for using openSUSE,

jdmcdaniel3,

Will you, if you have the time, tell me what code you would put in a .sh script so that it will launch gedit using the workaround I mentioned previously in this thread?

You could do this if you need to run as root:

#!/bin/bash

#: Title       : ge1
#: Date Created: Sun May 12 09:10:32 CDT 2013
#: Last Edit   : Sun May 12 09:10:32 CDT 2013
#: Author      : James D. McDaniel
#: Version     : 1.00
#: Description : Run Gedit with fixes, as root user
#: Options     : none

sudo unset XDG_RUNTIME_DIR
gnomesu gedit

exit 0

# End Of Script


And this as a normal user:

#!/bin/bash

#: Title       : ge2
#: Date Created: Sun May 12 09:10:32 CDT 2013
#: Last Edit   : Sun May 12 09:10:32 CDT 2013
#: Author      : James D. McDaniel
#: Version     : 1.00
#: Description : Run Gedit with fixes, normal user
#: Options     : none

unset XDG_RUNTIME_DIR
gedit

exit 0

# End Of Script


You would need something like these above, saved as the text files $HOME/bin/ge1 and $HOME/bin/ge2 ($HOME is your /home/username folder added automatically when $HOME is used). You must mark them executable with the terminal commands:

chmod +x $HOME/bin/ge1

AND

chmod +x $HOME/bin/ge2

Just open up terminal and type:

ge1

or

ge2

You can create your own bash scripts with my utility you can find here: N.S.F. - New Script File, Bash Script File Header Creator - Version 2.6 - Blogs - openSUSE Forums

The command string of:

su
unset XDG_RUNTIME_DIR
gedit

Does not automate properly in a bash script as you must type in exit to get gedit to load and to use gedit as root, loaded from a bash script, you should use gnomesu, not su or the sudo command normally. But it is easy to try the different solutions to see what works for you.

Thank You,

jdmcdaniel3, Thankyou. The bash script I made 2 days ago, if it can be called that, does not seem to work properly, as illustrated in the image below. I will replace its content with the content you were gracious enough to provide.

http://media-cache-ec4.pinimg.com/550x/31/1d/db/311ddbb5a1d5b4881dc22ea63aff7d4e.jpg
I usually try to do everything from a “Standard Account”.

I definitely need to download your N.S.F. - New Script File, Bash Script File Header Creator - Version 3.00 - Blogs - openSUSE Forums, jdmcdaniel3. As vazhavandan suggested, I also want to “try editing the menu using alacarte”. I took a cursory look at 2 articles about how to use alacarte after reading vazhavandan’s reply.

Yes, you can’t use the commands as listed in a bash script without modification which is why I made a couple of changes you can try in my previous post.

Thank You,

On 05/12/2013 11:36 PM, 050813 wrote:
> I usually try to do everything from a “Standard Account”.

it seems to me that the script, which should be in your home, like in

/home/05813/bin/my-geditnocrashbug.sh

is owned by root! it should NOT be.
it should not need to be executed as root…

it seems to me that perhaps this entire “gedit crash” is due to
logging into GNOME not as a ‘simple’ user, but rather than as ‘root’
the Super User…

you should never log into GNOME as root. ever.
certainly, not consistently.

i believe this ‘bug’ could be avoided simply by following the correct
log in procedures for Linux.

more:
http://tinyurl.com/593e4c
http://tinyurl.com/ydbwssh
http://tinyurl.com/4nsaqst
http://tinyurl.com/665h5ek
http://www.linfo.org/root.html


dd

On 2013-05-13 06:44, dd wrote:
> On 05/12/2013 11:36 PM, 050813 wrote:
>> I usually try to do everything from a “Standard Account”.
>
> it seems to me that the script, which should be in your home, like in
>
> /home/05813/bin/my-geditnocrashbug.sh
>
>
> is owned by root! it should NOT be.
> it should not need to be executed as root…

No, the bug is real, as reported in the proper Bugzilla, and it is not
solved yet, but is assigned to the coreutils maintainer (you do not see
this in the orange archive, which is a copy of the emails that bugzilla
sends to this mail list:


http://lists.opensuse.org/opensuse-bugs/2013-04/msg01435.html

If you compare that orange archive with the real archive you see missing
things. For example, the last but one post says that Dominique changed
somethings, but not what. Yes, you can click and unhide - or simply open
the real, original bug report in Bugzilla and see all the details (and
if you log in, you see even more):


https://bugzilla.novell.com/show_bug.cgi?id=814626

There is a hack, in the last comment, which is to run, in a terminal, this:


su
unset XDG_RUNTIME_DIR
gedit

However, if you put that in a script, like this:


cer@eleanor3:~> cat bin/sugedit
#!/bin/bash
su
unset XDG_RUNTIME_DIR
leafpad
cer@eleanor3:~>

What happens is this:


cer@eleanor3:~> sugedit
Password:
eleanor3:/home/cer # set  | grep XDG_RUNTIME_DIR
XDG_RUNTIME_DIR=/run/user/1000
eleanor3:/home/cer #

The editor does not run, and the variable was not unset - because there
was a change of user and the script stopped running. When I type ‘exit’
on the terminal, ‘su’ exits and the editor runs - too late, as plain user.

You can instead use this script:


cer@eleanor3:~> cat bin/sugedit
#!/bin/bash
su -c "unset XDG_RUNTIME_DIR ; leafpad"

which at least, runs. I don’t have gedit installed, so I do not know if
the hack works - that’s a different problem.

It probably does not work, though. Changing the script and running it
again shows:


cer@eleanor3:~> cat bin/sugedit
#!/bin/bash
#su
#unset XDG_RUNTIME_DIR
#leafpad
#su -c "unset XDG_RUNTIME_DIR ; leafpad"
su -c "unset XDG_RUNTIME_DIR ; echo $XDG_RUNTIME_DIR"
cer@eleanor3:~> sugedit
Password:
/run/user/1000
cer@eleanor3:~>
cer@eleanor3:~> su -c "unset XDG_RUNTIME_DIR ; echo $XDG_RUNTIME_DIR"
Password:
/run/user/1000
cer@eleanor3:~>
cer@eleanor3:~> su -c "XDG_RUNTIME_DIR=  echo $XDG_RUNTIME_DIR"
Password:
/run/user/1000
cer@eleanor3:~>


which proves that the variable is not unset.

This other variant, inspired by jdmcdaniel3, does work:


cer@eleanor3:~> cat bin/sugedit
#!/bin/bash
unset XDG_RUNTIME_DIR ; su -c "echo $XDG_RUNTIME_DIR"
cer@eleanor3:~> sugedit
Password:

cer@eleanor3:~> echo $XDG_RUNTIME_DIR
/run/user/1000
cer@eleanor3:~>

The variable is unset while running as root, and restored when back to
the normal user.


Cheers / Saludos,

Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)

On 05/13/2013 04:43 PM, Carlos E. R. wrote:
> No, the bug is real

thank you for the clarity! appreciated.

OP: ignore what i wrote, please.


dd