Kate throws a screen of errors when invoked using sudo... kate still starts

Bug #64735 reported by hardyn on 2006-10-08
10
Affects Status Importance Assigned to Milestone
KDE Base
Invalid
Medium
kdebase (Ubuntu)
Undecided
Unassigned

Bug Description

Binary package hint: kate

Kate throws screens of errors when invoking with sudo through command line; kate still starts, similar error to hoary it either didn't get fixed or is back.

thanks.

edgy knot 3

hardyn (arlenn) on 2006-10-08
description: updated
John Vivirito (gnomefreak) wrote :

Thank you for reporting this bug. Can you please attach the errors that it is giving you? What version of kate are you using with what version of kdebase do you have?

Changed in kdebase:
status: Unconfirmed → Needs Info
Andrew Hunter (rexbron) wrote :

I can reproduce some errors that kate throws up

rexbron@rexbron-laptop:~$ sudo kate test
Password:
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

kdeinit: Can't connect to the X Server.
kdeinit: Might not terminate at end of session.
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

kded: cannot connect to X server :0
DCOP aborting call from 'anonymous-20768' to 'kded'
kded: ERROR: Communication problem with kded, it probably crashed.
QObject::disconnect: Unexpected null parameter

My kate version is 2.5.4 and kdebase 4:3.5.4-0ubuntu29

hardyn (arlenn) wrote :

Yup, that is the error; and it will throw a few more if you save the file etc.

This is a problem that was documented way back with hoary, but i didn't keep with kubuntu so i don't know if it was ever fixed or not. i would imagine it is the same error, and i guess it has persisted this long becuase kate does still start and appears to work correctly.

thanks.

Andrew Hunter (rexbron) wrote :

Filed upstream.

Changed in kdebase:
status: Unknown → Unconfirmed
Andrew Hunter (rexbron) wrote :

Rejected as no longer reproduceable in KDE 3.5.5. Please reopen if you can reproduce with the latest KDE.

Changed in kdebase:
status: Needs Info → Rejected
dako (dako-cox) wrote :

I am getting the same error running KDE 3.5.5.
See attachment.

dako (dako-cox) wrote :

Attachment.

Claudiu Vlad (claudiu-vlad) wrote :

I want to report this bug in Edgy Eft (upgraded from Dapper) with KDE 3.5.5.
The output of 'sudo kate /myfile' in konsole is this :
<code>
[19:52][claudiu:/>~]$ sudo kate /etc/bluetooth/hcid.conf
Password:
Xlib: connection to ":0.0" refused by server
Xlib: Invalid MIT-MAGIC-COOKIE-1 key
kdeinit: Can't connect to the X Server.
kdeinit: Might not terminate at end of session.
Xlib: connection to ":0.0" refused by server
Xlib: Invalid MIT-MAGIC-COOKIE-1 key
kded: cannot connect to X server :0.0
DCOP aborting call from 'anonymous-28967' to 'kded'
kded: ERROR: Communication problem with kded, it probably crashed.
QObject::connect: No such signal KListView::doubleclicked(QListViewItem*)
QObject::connect: (sender name: 'unnamed')
QObject::connect: (receiver name: 'KateSaveModifiedDialog')
Xlib: connection to ":0.0" refused by server
Xlib: Invalid MIT-MAGIC-COOKIE-1 key
Xlib: connection to ":0.0" refused by server
Xlib: Invalid MIT-MAGIC-COOKIE-1 key
Xlib: connection to ":0.0" refused by server
Xlib: Invalid MIT-MAGIC-COOKIE-1 key
kio_uiserver: cannot connect to X server :0.0
DCOP aborting call from 'kate-28955' to 'kio_uiserver'
ERROR: KUniqueApplication: Registering failed!
ERROR: Communication problem with kio_uiserver, it probably crashed.
QObject::disconnect: Unexpected null parameter
[19:54][claudiu:/>~]$
</code>

Claudiu Vlad (claudiu-vlad) wrote :

After a little googling it turns out that executing:
'rm /tmp/.X0-lock'
solves the problem. Now the output is :
[20:04][claudiu:/>~]$ sudo kate /etc/bluetooth/hcid.conf
QObject::disconnect: Unexpected null parameter
[20:04][claudiu:/>~]$
So there is no need to reopen this bug.

hardyn (arlenn) wrote :

just because the bug is less verbose after deleting those files doest make it any less a bug.

QObject::disconnect: Unexpected null parameter

still sounds like something is complaining about something.

maybe its just me, but i don't think there should be ANY error messages if we are to declare something bug free?

arlen.

hardyn (arlenn) wrote :

installed 6.10 today... still got the errors...

X Error: BadDevice, invalid or uninitialized input device 168
  Major opcode: 145
  Minor opcode: 3
  Resource id: 0x0
Failed to open device
X Error: BadDevice, invalid or uninitialized input device 168
  Major opcode: 145
  Minor opcode: 3
  Resource id: 0x0
Failed to open device
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

kdeinit: Can't connect to the X Server.
kdeinit: Might not terminate at end of session.
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

kded: cannot connect to X server :0.0
kded: ERROR: KUniqueApplication: Registering failed!
kded: ERROR: Communication problem with kded, it probably crashed.
QObject::disconnect: Unexpected null parameter

fresh install 6.10... what do you guys think?

thanks.

Claudiu Vlad (claudiu-vlad) wrote :

hardyn, what happens when you do:
'rm /tmp/.X0-lock'
Does this affect your kate command?

Frode M. Døving (frode) wrote :

You should use 'kdesu' to run X programs with root privileges.

If you really don't like that, you should allow local connections to the X server.

$ xhost local:

hardyn (arlenn) wrote :

exactly the same error with kdesu

hardyn (arlenn) wrote :

... well slightly different, after removing the above mentioned file...

using kdesu...

X Error: BadDevice, invalid or uninitialized input device 168
  Major opcode: 148
  Minor opcode: 3
  Resource id: 0x0
Failed to open device
X Error: BadDevice, invalid or uninitialized input device 168
  Major opcode: 148
  Minor opcode: 3
  Resource id: 0x0
Failed to open device

thanks again

dako (dako-cox) wrote :

I did some searching on Kubuntu forum. Here is what I found. Can this be applied to the 'wacom' driver?

dako (dako-cox) wrote :

I did some searching on Kubuntu forum. Here is what I found. Can this be applied to the 'wacom' driver?

http://kubuntuforums.net/forums/index.php?topic=7964.0

Andrew Hunter (rexbron) wrote :

All you need to do is comment out the references to the wacom driver and tablet (inclues stylus) if you do not have a tablet laptop/PC and that error disappears. There is a lauchpad bug about this.

Frode M. Døving (frode) wrote :

The 'X Error: BadDevice, invalid or uninitialized input device 168...' warnings is a separate issue. If you compare that output to the previous comments on this bug you won't find it. And it is not limited to kate.

The problem in the initial bug report, is that kded,kio_server,kdeinit etc. are not allowed to connect to the users X server when started with root privileges.

All local connections can be allowed with the command:
$ xhost local:
And denied with:
$ xhost -local:

If you use kdesu to start X programs this will not be a problem.

nerton (nerton) wrote :

kate still throws an error on exit with sudo and kdesu on kubuntu 6.10

$ sudo kate /etc/X11/xorg.conf
QObject::disconnect: Unexpected null parameter
$ kdesu kate /etc/X11/xorg.conf
QObject::disconnect: Unexpected null parameter

TyphoonX (typhoonx) wrote :

Same problem here in Kubuntu Feisty

'rm /tmp/.X0-lock' does'nt make a difference

The issue i have only happens when i startup kate the first time in Konsole after booting into Kubuntu, after that the only error i receive is 'QObject::disconnect: Unexpected null parameter' on exit - which by the way 'rm /tmp/.X0-lock' seemed to remove only during that session though?

Once in a while i might receive this:

$ sudo kate myfile.txt
DCOPClient::attachInternal. Attach failed Could not open network socket
---------------------------------
It looks like dcopserver is already running. If you are sure
that it is not already running, remove /root/.DCOPserver_typhoonx-desktop__0
and start dcopserver again.
---------------------------------

DCOPClient::attachInternal. Attach failed Could not open network socket
KCrash: Application 'kate' crashing...
Warning: connect() failed: : Connection refused
KCrash cannot reach kdeinit, launching directly.
Xlib: connection to ":0.0" refused by server
Xlib: Invalid MIT-MAGIC-COOKIE-1 key
drkonqi: cannot connect to X server :0.0

... then kate crashes, but most of the time i will receive this:

$ sudo kate myfile.txt
DCOPClient::attachInternal. Attach failed Could not open network socket
Xlib: connection to ":0.0" refused by server
Xlib: Invalid MIT-MAGIC-COOKIE-1 key
kdeinit: Can't connect to the X Server.
kdeinit: Might not terminate at end of session.
Xlib: connection to ":0.0" refused by server
Xlib: Invalid MIT-MAGIC-COOKIE-1 key
kded: cannot connect to X server :0.0
DCOP aborting call from 'anonymous-6200' to 'kded'
kded: ERROR: Communication problem with kded, it probably crashed.

... then kate opens and everything works as expected, no more errors untill i reboot again

This problem is exactly the same as i experienced in Kubuntu Edgy except i minor detail 'Xlib: Invalid MIT-MAGIC-COOKIE-1 key' what the heck is this? Ive only been receiving 'Xlib: Invalid MIT-MAGIC-COOKIE-1 key' for a couple of weeks now.

TyphoonX

WaKkO (veugelenw) wrote :

Fresh Kubuntu 7.04 with nvidia-glx installed via apt-get:

root@veugelenw-desktop:/etc/X11# kwrite xorg.conf
Xlib: connection to ":0.0" refused by server
Xlib: Invalid MIT-MAGIC-COOKIE-1 key
kwrite: cannot connect to X server :0.0
root@veugelenw-desktop:/etc/X11#

WaKkO (veugelenw) wrote :

Also with sudo:

oot@veugelenw-desktop:/etc/X11# sudo kwrite xorg.conf
Xlib: connection to ":0.0" refused by server
Xlib: Invalid MIT-MAGIC-COOKIE-1 key
kwrite: cannot connect to X server :0.0
root@veugelenw-desktop:/etc/X11#

namespace04 (namespace04) wrote :

I get almost the same error messages as well. After typing in a kdesu or a sudu command i get this complaint:

X Error: BadDevice, invalid or uninitialized input device 169
  Major opcode: 148
  Minor opcode: 3
  Resource id: 0x0
Failed to open device
X Error: BadDevice, invalid or uninitialized input device 169
  Major opcode: 148
  Minor opcode: 3
  Resource id: 0x0
Failed to open device

and sometimes after typing in a sudu command i get this:

jonathan@TacoTown04:~$ sudo kate /etc/apt/sources.list
Password:
X Error: BadDevice, invalid or uninitialized input device 169
  Major opcode: 148
  Minor opcode: 3
  Resource id: 0x0
Failed to open device
X Error: BadDevice, invalid or uninitialized input device 169
  Major opcode: 148
  Minor opcode: 3
  Resource id: 0x0
Failed to open device
DCOPClient::attachInternal. Attach failed Could not open network socket
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

kdeinit: Can't connect to the X Server.
kdeinit: Might not terminate at end of session.
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

kded: cannot connect to X server :0.0
DCOP aborting call from 'anonymous-5561' to 'kded'
kded: ERROR: Communication problem with kded, it probably crashed.

Im right now running Kubuntu 7.04 Feisty
I think i started getting these after i installed some dependencies that some programs were needing.

Changed in kdebase:
status: New → Invalid
Changed in kdebase:
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

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