Fix KDE permissions after sudo startx

0

After experiencing some issues with KDE (4.7.1, on Kubuntu 11.10), I tried to restart it. The recommended sudo /etc/init.d/kdm restart stopped it, but it failed to start, instead getting stuck on a console screen (with the standard services closing, etc, shutdown text). I could type in it, but not do anything else, ctrl + c doing nothing.

I switched to tty1 (ctrl + alt + F1) and ran the command sudo startx. This started another instance of KDE on tty8 - the normal one is on tty7, which was still stuck on that console screen. It could be used as normal, nothing odd at all. The problems started appearing after a restart.

Error messages (KDialog):

Configuration file "/home/kubuntusandbox/.kde/share/config/kmixctrlrc" not writable.
Please contact your system administrator.
Configuration file "/home/kubuntusandbox/.kde/share/config/kmixrc" not writable.
Please contact your system administrator.
Configuration file "/home/kubuntusandbox/.kde/share/config/krunnerrc" not writable.
Please contact your system administrator.

Aside from this, several kdesudo boxes popped up for various programs on the first start. They did not appear after one restart. It's possible a proper shutdown as restored some permissions. Similar (KDialog, kdesudo) boxes come up when opening some programs, e.g. KSnapshot.

Now, this is evidently because running KDE as root has changed some permissions. What I need to know is what should I change back and how do I do that, while minimising side effects? In other words, I don't want to overwrite all permissions in the system, just the ones that were affected.

This is likely on Google somewhere. I've seen it before, a year or two ago. However, it's eluding my searches at the moment.

Just a note, this is actually a fresh install of Kubuntu on a VM. I'm going to reinstall it anyway, but this is for future reference.

Bob

Posted 2012-03-13T12:49:37.167

Reputation: 51 526

did you figure it out? – MountainX – 2012-03-26T20:32:22.373

No, I haven't. I haven't needed to use that machine recently, so it's been ignored for the last few days. – Bob – 2012-03-27T00:07:40.923

Answers

0

A source recommended:

Try: rm -rf ~/.kde

This will erase all your personal settings, and make kde behave as if it is your first login...

If you have bookmarks/address books you want to keep then back them up first...

Taking a closer look at ~/.kde/share/config/ revealed quite a few files owned by root. The rest are owned by kubuntusandbox (my user).

What did work is sudo chown -R kubuntusandbox ~/.kde, where kubuntusandbox was my username.

I'm not sure if this reset any settings, but it should not have. It's less drastic than deleting the whole thing and letting KDE recreate it, anyway.

Bob

Posted 2012-03-13T12:49:37.167

Reputation: 51 526

0

I had this error with Kwrite on Kubuntu and get this error:

Configuration file "/home/mrk/.kde/share/config/kwriterc" not writable.
Please contact your system administrator

For this error on every program, I solved with:

sudo chown -R mrk.mrk /home/mrk/.kde/

That it, for you case, you have to replace mrk to you username of user

sudo chown -R username.username /home/username/.kde/

And without delete nothing!!!!

This solution I finded on site

Mirko Cianfarani

Posted 2012-03-13T12:49:37.167

Reputation: 101

-2

Try deleting /home/.Xauthority (as root).

Zymous

Posted 2012-03-13T12:49:37.167

Reputation: 1

Did not read error messages. – Hello71 – 2012-05-19T15:07:58.853

For the record, this had no effect. – Bob – 2012-06-04T11:27:34.463