Kwrite continuously crashes in SU

Hello.
I need to change attributes in my /etc/fstab file. This post is a branch of this thread.

I cant change my fstab file because apparently Kwrite only crashes when accessed by Konsole in SU mode.

I type this input/output:

linux-mg28:/home/me # kdesu kwrite /etc/fstab
kdesu(13370): Session bus not found

KCrash: Application ‘kdesu’ crashing…
sock_file=/root/.kde4/socket-linux-mg28/kdeinit4__0
Warning: connect() failed: : No such file or directory
KCrash cannot reach kdeinit, launching directly.
drkonqi(13371): Session bus not found

Sometimes a Kwrite crash report is generated. Sometimes not.

I type this input/output:

linux-mg28:/home/me # dbus-launch kwrite
QApplication::qAppName: Please instantiate the QApplication object first
kdeinit4: preparing to launch /usr/lib/libkdeinit4_klauncher.so
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
kdeinit4: preparing to launch /usr/lib/libkdeinit4_kded4.so
kdeinit4: preparing to launch /usr/lib/libkdeinit4_kbuildsycoca4.so
kbuildsycoca4 running…
kbuildsycoca4(13384) KBuildMimeTypeFactory::createEntry: Missing <comment> field in “application/vnd.ms-powerpoint.template.macroEnabled.12.xml”
kbuildsycoca4(13384) KBuildMimeTypeFactory::createEntry: Missing <comment> field in “application/vnd.openxmlformats-officedocument.spreadsheetml.template.xml”
kbuildsycoca4(13384) KBuildMimeTypeFactory::createEntry: Missing <comment> field in “application/vnd.ms-excel.sheet.macroEnabled.12.xml”
kbuildsycoca4(13384) KBuildMimeTypeFactory::createEntry: Missing <comment> field in “application/vnd.ms-excel.template.macroEnabled.12.xml”
kbuildsycoca4(13384) KBuildMimeTypeFactory::createEntry: Missing <comment> field in “application/vnd.openxmlformats-officedocument.presentationml.template.xml”
kbuildsycoca4(13384) KBuildMimeTypeFactory::createEntry: Missing <comment> field in “application/vnd.ms-powerpoint.slideshow.macroEnabled.12.xml”
kbuildsycoca4(13384) KBuildMimeTypeFactory::createEntry: Missing <comment> field in “application/vnd.ms-powerpoint.presentation.macroEnabled.12.xml”
kbuildsycoca4(13384) KBuildMimeTypeFactory::createEntry: Missing <comment> field in “application/vnd.ms-excel.sheet.binary.macroEnabled.12.xml”
kbuildsycoca4(13384) KBuildMimeTypeFactory::createEntry: Missing <comment> field in “application/vnd.ms-word.document.macroEnabled.12.xml”
kbuildsycoca4(13384) KBuildMimeTypeFactory::createEntry: Missing <comment> field in “application/vnd.ms-word.template.macroEnabled.12.xml”
kbuildsycoca4(13384) KBuildMimeTypeFactory::createEntry: Missing <comment> field in “application/vnd.openxmlformats-officedocument.wordprocessingml.template.xml”

(Output too long for this post. It generated +28,800 characters out of an allowed 1500)

<unknown program name>(13379)/ KStartupInfo::createNewStartupId: creating: “linux-mg28;1282850320;579079;13379_TIME0” : “unnamed app”
kbuildsycoca4 running…

I came across this thread about resolution problems. I’m having the same issue so I type this input/output:

linux-mg28:/home/me # kdesu kwrite /etc/x11/xorg.conf
kdesu(6216): Session bus not found

KCrash: Application ‘kdesu’ crashing…
sock_file=/root/.kde4/socket-linux-mg28/kdeinit4__0
Warning: connect() failed: : No such file or directory
KCrash cannot reach kdeinit, launching directly.
drkonqi(6217): Session bus not found

I have a dual XP/suse11.3 system. I even removed my old Suse along with all its partitions, leaving only the NTFS XP, re-downloaded the 11.3 ISO image, burned a new fresh install disk and reinstalled 11.3. I updated the software in YaST.

I still can’t modify my fstab file. But I can locate the file in Dolphin and click it to open in a Kwrite window. Read only of course.

Any ideas are EXTREMELY appreciated.
This penguin is indeed more than puzzled !

I acnnot give you help with the problem running kwrite as root, but why
can’t you edit fstab?
You do not need kwrite for that, every other editor can do it as well.
Open your konsole and run

sudo vi /etc/fstab
or if you prefer
su -c “vi /etc/fstab”

It is anyway a bit problematic sometimes to run a gui program as root (but
kdesu is the correct thing for that and should work of course).


openSUSE 11.2 64 bit | Intel Core2 Quad Q8300@2.50GHz | Gnome 2.28 | GeForce
9600 GT | 4GB Ram
openSUSE 11.3 64 bit | Intel Core2 Duo T9300@2.50GHz | Gnome 2.30 | Quadro
FX 3600M | 4GB Ram

I find vi a little unfriendly and use “joe” which is a text based editor that comes with its own help screens. It’s easy to install with Yast as it’s in the installed repositories.

SteveFury61 wrote:
> Hello.
> I need to change attributes in my /etc/fstab file. This post is a
> branch of ‘this’ (http://tinyurl.com/3yofawh) thread.
>
> I cant change my fstab file because apparently Kwrite only crashes when
> accessed by Konsole in SU mode.
>
> I type this input/output:
>
>> linux-mg28:/home/me # kdesu kwrite /etc/fstab

why are you already root (see that #? it means you are already root)…

if you issue the kdesu from a normal user terminal it should work, OR
something is BAD wrong…

how often do you log into KDE/Gnome/whatever as root?

while logged into KDE/Gnome etc as yourself, a regular user wanting to
use KWrite with root powers, try this:

-hold down Alt and press F2
-in the blank “Run Command” line which pops up type and enter


kdesu kwrite

-provide your root password when asked
-and have at it…

yes, you can add the exact name of the file following kwrite, if you
wish (/etc/fstab) or you can do it like i show above and then you the
click File click Open click click click method to navigate to the file


DenverD
CAVEAT: http://is.gd/bpoMD [posted via NNTP w/openSUSE 10.3]

ionmich wrote:

>
> I find vi a little unfriendly and use “joe” which is a text based editor
> that comes with its own help screens. It’s easy to install with Yast as
> it’s in the installed repositories.
>
>
nano is also a nice editor, more friendly but less powerfull than vi (for
fstab everything is powerfull enough, I did not have enough courage to
mention my favourite emacs for this).

But DenverD already has seen what the real problem was (I did not see it),
SteveFury61 IS ALREADY ROOT and then uses kdesu.


openSUSE 11.2 64 bit | Intel Core2 Quad Q8300@2.50GHz | Gnome 2.28 | GeForce
9600 GT | 4GB Ram
openSUSE 11.3 64 bit | Intel Core2 Duo T9300@2.50GHz | Gnome 2.30 | Quadro
FX 3600M | 4GB Ram

I can confirm that kwrite crashes if you try to start it in a konsole with kdesu. So does every other app I have tried to start that way! However, Alt+F2 will start kdesu kwrite without crashing. This is a mystery that has become an annoyance I just work around.

no
It works just fine but you must use kdesu as user, not already su -

I 2nd that, no problem here while opening it with kdesu. Working fine.

As many editors are mentioned above, i will add vim, an advance shape of vi with more control.

Well spotted DenverD, I’ve been puzzling over this for a while and completely missed the #

Prexy wrote:
> I can confirm that kwrite crashes if you try to start it in a konsole
> with kdesu. So does every other app I have tried to start that way!
> However, Alt+F2 will start kdesu kwrite without crashing. This is a
> mystery that has become an annoyance I just work around.

no mystery or work around involved…it SHOULD crash if you are logged
in as root and issue kdesu…

it should not crash if you are logged in as a regular user and issue
kdesu…

see?


DenverD
CAVEAT: http://is.gd/bpoMD [posted via NNTP w/openSUSE 10.3]

mmarif4u wrote:

>
> As many editors are mentioned above, i will add vim, an advance shape
> of vi with more control.
>
As far as I remember vim is anyway what is called when you start vi (by
default in opensuse), you can check that with update-alternatives what
editor is really used with the vi command.


openSUSE 11.2 64 bit | Intel Core2 Quad Q8300@2.50GHz | Gnome 2.28 | GeForce
9600 GT | 4GB Ram
openSUSE 11.3 64 bit | Intel Core2 Duo T9300@2.50GHz | Gnome 2.30 | Quadro
FX 3600M | 4GB Ram

Martin Helm wrote:
> As far as I remember vim is anyway what is called when you start vi (by
> default in opensuse), you can check that with update-alternatives what
> editor is really used with the vi command.
>
Yes it is

ls -l /usr/bin/vi
… /usr/bin/vi → /bin/vim


openSUSE 11.2 64 bit | Intel Core2 Quad Q8300@2.50GHz | Gnome 2.28 | GeForce
9600 GT | 4GB Ram
openSUSE 11.3 64 bit | Intel Core2 Duo T9300@2.50GHz | Gnome 2.30 | Quadro
FX 3600M | 4GB Ram

Well, I see it NOW! I just don’t remember if I actually did it wrong this time or that it used to work but doesn’t now or I used to do it right. One thing that I just this second tried was to call kwrite from a root prompt. That crashed kwrite. Dolphin won’t start from the root prompt either, as of 3 seconds ago. Just to be clear, I did not try to start either one with kdesu from the root prompt.

> One thing that I just this second tried was to call kwrite from
> a root prompt. That crashed kwrite. Dolphin won’t start from the root
> prompt either, as of 3 seconds ago. Just to be clear, I did not try to
> start either one with kdesu from the root prompt.

it is working as it should…

(listen carefully) to launch a GUI app in KDE issue this command in a
USER terminal:


kdesu kwrite  <for example, or any other GUI application's name>

that is the only way which will work…

if you first log in as root and try


kwrite  <for example, or any other GUI application's name>

it will NOT run…it will crash

and, if you first log in as root and issue


kdesu kwrite <for example, or any other GUI application's name>

it will NOT run, it will crash…

and, if you do this in a USER terminal


kdesu exit <for example, or any other *non*-GUI bash command>

you will be required to enter your root password, but the command will
have NO effect whatsoever…

on the other hand if you do this in a root terminal


exit

you will log out as root and remain the user you signed in as, but if
you then do


exit

it will log you out of the terminal…if it is a GUI terminal (like
konsole) the terminal window will close…but, if it is one of the
F1-F6 terminals, it will just go to a password prompt…

if running GNOME instead of KDE everything is the same, except use
gnomesu instead of kdesu

simple!


DenverD
CAVEAT: http://is.gd/bpoMD [posted via NNTP w/openSUSE 10.3]

Ok. I believe you. But does it make sense that root can’t call a GUI app? I mean, I observe this behavior, but it strikes me as counter intuitive. What’s the point of being root if you can’t even call up kwrite? It’s like “oooh, I’m root; but don’t ask me to start dolphin!”

Ok…maybe I’'m just an id10t but why even bother with sudo or kdesu? I just “su” do what I want and log out(exit)…It’s the same amount of steps…just seems that if you know you have to “su” you know you’re not root…otherwise it’s just a point for possible confusion as has been so clearly demonstrated in the last few days…just do a friggin “su”…

Can I “su” as root user…Yes I can…no problems…

Windeath:/home/dart # su
Windeath:/home/dart #

No problems…no errors…run your d**n program…

Sorry…somtimes I get a bit annoyed when the simple solution gets bogged down in minutae…file a bug report…keep on them…squeaky wheel gets the grease…

dartefi wrote:
> Sorry…somtimes I get a bit annoyed when the simple solution gets bogged
> down in minutae…file a bug report…keep on them…squeaky wheel gets
> the grease…

there is no bug and your directions will result in no progress…

he wants to run KWrite with root powers–it is impossible to “just
“su” do what I want and log out(exit)” if what he wants is to run
KWrite as root…

can’t be done…try it…


DenverD
CAVEAT: http://is.gd/bpoMD [posted via NNTP w/openSUSE 10.3]

Open konsole, enter “su -” then enter kwrite, it will work. But only if you put " -" after “su”
It’s been like that for some time, can’t remember exactly when it was changed.