Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am running on Ubuntu 12.04 I recently noticed that Kate 4.8.4 which have been installed in my 64-bit PC is crashing whenever I try to open a file in it. It shows no problem when I open files via terminal.

It displays the following in the terminal while crashing.

trying to create local folder /home/myusername/.kde/tmp-MYPCNAME: Permission denied
trying to create local folder /home/myusername/.kde/socket-MYPCNAME: Permission denied
trying to create local folder /home/myusername/.kde/tmp-MYPCNAME: Permission denied
QFile::remove: Empty or null file name
kdeinit4: Aborting. bind() failed: Permission denied
Could not bind to socket '/home/myusername/.kde/socket-MYPCNAME/kdeinit4__0'
trying to create local folder /home/myusername/.kde/cache-MYPCNAME: Permission denied
trying to create local folder /home/myusername/.kde/share: Permission denied
kate(3237) fileModule: Failed to load configured file module "kfilemodule"
KCrash: Application 'kate' crashing...
KCrash: Attempting to start /usr/lib/kde4/libexec/drkonqi from kdeinit
sock_file=/home/myusername/.kde/socket-MYPCNAME/kdeinit4__0
Warning: connect() failed: : Permission denied
KCrash: Attempting to start /usr/lib/kde4/libexec/drkonqi directly
trying to create local folder /home/myusername/.kde/cache-MYPCNAME: Permission denied
QFile::remove: Empty or null file name
drkonqi(3251)/KSharedDataCache KSharedDataCache::Private::mapSharedMemory: Failed to establish shared memory mapping, will fallback to private memory -- memory usage will increase

From the above I understand that this is a problem of user privileges. I checked running Kate from the terminal as root it works fine.

As I am new to linux can someone point me in a direction that could solve the problem.

share|improve this question
up vote 1 down vote accepted

Change the ownership of the .kde folder with these console commands:

cd ~
sudo chown -R yourusername .kde

Replace yourusername with your actual user name. You will be prompted for the sudo password.

This error usually happens as a result of running graphical programs (like kate) as root directly with sudo, which can cause root to create its own configuration files in your home directory (or effectively take ownership of the ones that are already there). Instead, a graphical sudo frontend, such as kdesudo (or gksu/gksudo) should always be used when running graphical programs as root.

share|improve this answer
    
That solved the issue. But isn't user the owner of his or her home folder ? – mahesmohan Jul 24 '12 at 21:57
    
@mahesmohan I've expanded this answer with an explanation for how root can come to own files in users' home folders (and how to avoid this problem in the future). – Eliah Kagan Jul 25 '12 at 8:19
    
Thanks a lot @EliahKagan – mahesmohan Aug 2 '12 at 15:44
    
Can someone edit this to replace the "yourusername" bit with $USER? Then it'll work as-is – Xiu Apr 18 at 15:32

I was experiencing a similar issue when running Kexi on my Linux Mint 17.2 system:

...
kexi(9324) fileModule: Failed to load configured file module "kfilemodule"
KCrash: Application 'kexi' crashing...
...

The solution in my case (found here) was to manually install some KDE-specific packages:

$ sudo apt-get install -y kdelibs-bin kdelibs5-data kdelibs5-plugins

Initially I thought this was a packaging issue specific to Kexi, but since it seems to affect multiple KDE applications, I guess it might be a KDE packaging problem.

share|improve this answer
    
I moved to Arch now. And I mostly use vi and sublime, so I really don't have the means to test your solution... – mahesmohan Sep 24 '15 at 19:15
1  
I appreciate that you were facing this problem years ago, but it seems that people (myself included) are still experiencing this, so I've posted an answer in case it helps others. – LxP Sep 25 '15 at 1:02
1  
this worked for me for KCachegrind on Mint 17.3 – StefanNch Dec 19 '15 at 16:00

If Kate crashes when you try to open or save a file, try installing kdelibs5-plugins:

sudo apt-get install kdelibs5-plugins
share|improve this answer
cd ~
sudo chown -R yourusername .kde

Actually that didn't help.

Instead, a graphical sudo frontend, such as kdesudo (or gksu/gksudo) should always be used when running graphical programs as root.

That helped. I downloaded 'kdesudo' and used it to install kate. It worked and I have working kate. Thanx.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.