kate creates ~/.kde/share/apps/kate folder with wrong ownership if used with sudo for first time

Bug #224859 reported by Mike Gashler
14
Affects Status Importance Assigned to Milestone
kdebase (Ubuntu)
Won't Fix
Low
Unassigned

Bug Description

Binary package hint: kate

I installed Hardy Kubuntu Beta (w/ KDE3). Immediately after installation, I used "sudo kate" to edit some config file. Now, the the ~/.kde/share/apps/kate folder is owned by root instead of me. If I run kate normally, I can't save config changes (b/c it doesn't have permission to access its own folder), and there is no indication of why it doesn't work--(it took me some time to figure it out). If kate is going to put its configuration in my home folder, then it should be owned by me. I tried this on another machine and it repro'ed there too. (An obvious workaround is to do "sudo chown me:me ~/.kde/share/apps/kate", but new users won't know to do that.)

Revision history for this message
Ralph Janke (txwikinger) wrote :

I can confirm this on the released hardy.

It is reproducible by deleting the folder ~/.kde/share/apps/kate and then starting kate with sudo. The ownership of the newly created folder is root:root

Changed in kdebase:
importance: Undecided → Low
status: New → Triaged
Revision history for this message
Ubottu Automated Bug Reporting - Ubuntu (ubottu-ubuntu-bugs) wrote :

The answer is not to use sudo with GUI apps. Using kdesu and kdesudo will stop that from happening.

Revision history for this message
Terence Simpson (tsimpson) wrote :

Umm, in case you're wondering, that message was actually from me :)

Revision history for this message
Mike Gashler (gashlerm) wrote :

Using kdesudo isn't a better work-around than just running the app as yourself the first time you run it. The problem is that there is no indication to inform people that they should operate in this manner, so it's still a trap for people that don't know better. If someone uses sudo the first time, kdesudo won't fix the problem.

Revision history for this message
Terence Simpson (tsimpson) wrote :

It's always recommended not to run GUI apps with sudo, if you have a idea of how to get this recommendation out to more people then let me know.
There really isn't anything we can do about this problem, it's simply because you're running for the first time and it's creating config files, but you're running it as root and so they will be owned by root. kdesudo will not have this problem because it does the appropriate set up before running any commands so it won't interfere with files in your $HOME

Revision history for this message
Harald Sitter (apachelogger) wrote :

Won't fix.
There is a report about proper sudo behavior for GUI apps, but as it is 3:44 in the morning you might excuse that I don't feel like looking it up ;-)

Changed in kdebase:
status: Triaged → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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