1

Encountering a crash when requesting QGIS 2.2 to access data on desktop machine. Running Ubuntu 14.04 LTS.

$ qgis
Warning: loading of qt translation failed [/usr/share/qt4/translations/qt_en_AU]
qgis.bin(32381)/KSharedDataCache KSharedDataCache::Private::mapSharedMemory: Failed to establish shared memory mapping, will fallback to private memory -- memory usage will increase 
kbuildsycoca4 running...
kbuildsycoca4: ERROR creating database '/home/lyndon/.kde/cache-Gerhard-ThinkPad-W530/ksycoca4'! Insufficient permissions in target directory.
Warning: ERROR: Running KSycoca failed.
QGIS died on signal 11ptrace: Operation not permitted.
No thread selected
No stack.
gdb returned 0
Aborted (core dumped)' 

Any request, such as opening a file, browsing, creating a new project etc. will cause this crash.

I am new to QGIS and will eagerly post additional information, if provided instructions.

EDIT:

output of:

sudo ls -l /home/lyndon/.kde/cache-Gerhard-ThinkPad-W530/


total 10320 
-rw-r--r-- 1 root root 10547304 Apr 25 2013 icon-cache.kcache – 

EDIT:

running QGIS desktop as root does allow me to open files! But it also pops up with an error message immediately after the program runs (ie after the initial loading/welcome graphic dissapears):

The layer /usr/share/applications/%F is not a valid layer and can not be added to the map

Any idea how I can make QGIS operate from GUI (unity) with root privileges without having to open it via terminal and adding the sudo prefix?

I have attempted the solution provided below by edm, but the open window hangs and I recieve errors pertaining to klauncher: Could not start process Cannot talk to klauncher: Not connected to D-Bus server. https://askubuntu.com/questions/118822/how-to-launch-application-as-root-from-unity-launcher

$ sudo qgis %F


Warning: loading of qt translation failed [/usr/share/qt4/translations/qt_en_AU]
Error: "/tmp/kde-lyndon" is owned by uid 1000 instead of uid 0.
Error: "/tmp/ksocket-lyndon" is owned by uid 1000 instead of uid 0.
Error: "/tmp/kde-lyndon" is owned by uid 1000 instead of uid 0.
kdeinit4: Shutting down running client.
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
Error: "/tmp/ksocket-lyndon" is owned by uid 1000 instead of uid 0.
Error: "/tmp/kde-lyndon" is owned by uid 1000 instead of uid 0.

QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.

QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.
kbuildsycoca4 running...
kbuildsycoca4(8139) VFolderMenu::loadDoc: Parse error in  "/home/lyndon/.config/menus/applications-merged/xdg-desktop-menu-dummy.menu" , line  1 , col  1 :  "unexpected end of file" 
kbuildsycoca4(8139)/kdecore (services) KServicePrivate::init: The desktop entry file  "/usr/share/applications/evolution-data-server-uoa.desktop"  has Type= "Application"  but no Exec line 

kbuildsycoca4(8139) KBuildServiceFactory::createEntry: Invalid Service :  "/usr/share/applications/evolution-data-server-uoa.desktop" 
kbuildsycoca4(8139)/kdecore (services) KServicePrivate::parseActions: The desktop file "/usr/share/applications/Launchpadlaunchpadnet.desktop" references the action "S0" but doesn't define it 
kbuildsycoca4(8139)/kdecore (services) KServicePrivate::parseActions: The desktop file "/usr/share/applications/Launchpadlaunchpadnet.desktop" references the action "S1" but doesn't define it 
kbuildsycoca4(8139)/kdecore (services) KServicePrivate::parseActions: The desktop file "/usr/share/applications/Launchpadlaunchpadnet.desktop" references the action "S2" but doesn't define it 
kbuildsycoca4(8139)/kdecore (services) KServicePrivate::parseActions: The desktop file "/usr/share/applications/Launchpadlaunchpadnet.desktop" references the action "S3" but doesn't define it 
kbuildsycoca4(8139)/kdecore (services) KServicePrivate::parseActions: The desktop file "/usr/share/applications/Launchpadlaunchpadnet.desktop" references the action "S4" but doesn't define it 
kbuildsycoca4(8139)/kdecore (services) KServicePrivate::parseActions: The desktop file "/usr/share/applications/Launchpadlaunchpadnet.desktop" references the action "S5" but doesn't define it 
kbuildsycoca4(8139)/kdecore (services) KServicePrivate::parseActions: The desktop file "/usr/share/applications/Launchpadlaunchpadnet.desktop" references the action "S6" but doesn't define it 
kbuildsycoca4(8139)/kdecore (services) KServicePrivate::parseActions: The desktop file "/usr/share/applications/Launchpadlaunchpadnet.desktop" references the action "S7" but doesn't define it 
kbuildsycoca4(8139)/kdecore (services) KServicePrivate::parseActions: The desktop file "/usr/share/applications/Launchpadlaunchpadnet.desktop" references the action "S8" but doesn't define it 
kbuildsycoca4(8139)/kdecore (services) KServicePrivate::parseActions: The desktop file "/usr/share/applications/Launchpadlaunchpadnet.desktop" references the action "S9" but doesn't define it 
kbuildsycoca4(8139)/kdecore (services) KServicePrivate::parseActions: The desktop file "/usr/share/applications/Launchpadlaunchpadnet.desktop" references the action "S10" but doesn't define it 
kbuildsycoca4(8139)/kdecore (services) KServicePrivate::init: The desktop entry file  "/usr/share/applications/unity-scope-gdrive.desktop"  has Type= "Application"  but no Exec line 

kbuildsycoca4(8139) KBuildServiceFactory::createEntry: Invalid Service :  "/usr/share/applications/unity-scope-gdrive.desktop" 

kbuildsycoca4(8139)/kdecore (services) KServicePrivate::init: The desktop entry file "/usr/share/applications/updf.desktop" has Type= " Application" instead of "Application" or "Service"

kbuildsycoca4(8139) KBuildServiceFactory::createEntry: Invalid Service :  "/usr/share/applications/updf.desktop" 

kbuildsycoca4(8139)/kdecore (services) KServicePrivate::init: The desktop entry file "/usr/share/applications/unity-lens-photos.desktop" has Type= "Application" but no Exec line

kbuildsycoca4(8139) KBuildServiceFactory::createEntry: Invalid Service :  "/usr/share/applications/unity-lens-photos.desktop" 
kbuildsycoca4(8139) kdemain: Emitting notifyDatabaseChanged ("servicetypes", "xdgdata-mime", "services", "apps")
Error: "/tmp/kde-lyndon" is owned by uid 1000 instead of uid 0.
Warning: Object::connect: No such signal org::freedesktop::UPower::DeviceAdded(QDBusObjectPath)
Warning: Object::connect: No such signal org::freedesktop::UPower::DeviceRemoved(QDBusObjectPath)
Error: "/tmp/ksocket-lyndon" is owned by uid 1000 instead of uid 0.
Object::connect: No such signal org::freedesktop::UPower::DeviceAdded(QDBusObjectPath)
Object::connect: No such signal org::freedesktop::UPower::DeviceRemoved(QDBusObjectPath)
  • Welcome to gis.SE. Have you run other KDE applications as root (e.g. using sudo)? Have you run QGIS as root? – BradHards Apr 18 '14 at 11:23
  • Yes, edited the above post with output. Seems to open files now, but has new errors. Also trying to figure out how to open it via unity with sudo privileges. – Gerhard7878 Apr 18 '14 at 14:01
  • You shouldn't need to run QGIS as root. I think you've corrupted your KDE profile by running some KDE application as root. If you don't know which one, or can't tell us, then I can only suggest removing all of .kde, and starting again. Don't run KDE (or GTK/Gnome) applications as root. If you absolutely need to, use kdesudo / gksu as the front end. – BradHards Apr 18 '14 at 22:50
0

It seems something related to permissions

kbuildsycoca4: ERROR creating database '/home/lyndon/.kde/cache-Gerhard-ThinkPad-W530/ksycoca4'! Insufficient permissions in target directory.

After seeing the output of

ls -l /home/lyndon/.kde/cache-Gerhard-ThinkPad-W530/

I think that you should change the owner of your files:

chown -R lyndon:lyndon /home/lyndon/.kde/cache-Gerhard-ThinkPad-W530/

Don't launch normal applications as root, there is not need at all to do that. I don't know also why are you using %F as a parameter when launching qgis. qgis is trying to interpret %F as a file to open.

  • Had to run that command with sudo prefix (might be an indicator of permissions issues?) result: total 10320 -rw-r--r-- 1 root root 10547304 Apr 25 2013 icon-cache.kcache – Gerhard7878 Apr 18 '14 at 10:42
  • I have edited the initial post with full output. It appears I can run QGIS and open files and add layers without crashing, however I encounter a new error message. Trying to find out how to make QGIS open on nautilus with root privileges permenantely. – Gerhard7878 Apr 18 '14 at 12:55
  • I edit my post, don't launch it as root, change the owner of the files – Francisco Puga Apr 19 '14 at 10:43
  • Brilliant, your last post (edit) has solved the problem! Much appreciated!! – Gerhard7878 Apr 20 '14 at 4:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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