KAuth Troubleshooting

Jump to: navigation, search



KAuth works out of the box, given a perfect setup. When using standard installations, so to /usr with all default settings, you usually have everything already set up for you. Although, in some other cases (for example installing to a different prefix), some tweaks are needed to make everything work. Let's find out what's the deal with KAuth error codes, and how to fix them.

Error code 1

The helper responder object hasn't been set. This shouldn't happen if you use the KDE4_AUTH_HELPER macro in the helper source.

For example, on the bottom of your helper's source code add,

KDE4_AUTH_HELPER_MAIN("org.kde.auth.example", MyHelper)

Error code 2

You spotted a problem where either

  • Your KDE installation was built without a working KAuth backend: in this case things are expected not to work, and you need to rebuild KDE with polkit-1 installed. A quick way to find this out is checking if $KDEPREFIX/lib/kde4/plugins/kauth/backend/kauth_backend_plugin.so exists: if this is not the case, you need a rebuild.
  • Your KDE was built in a different prefix than /usr. In this case you have 2 possibilities:
    • You are using polkit-1 backend (likely): move files (or do a symlink) from $KDEPREFIX/share/polkit-1/actions/ to /usr/share/polkit-1/actions/
    • You are using PolicyKit backend (not very likely): move files (or do a symlink) from $KDEPREFIX/share/PolicyKit/policy/ to /usr/share/PolicyKit/policy/

Error code 3

You tried to execute an invalid action object. If you encountered this error, you're into weird stuff. File a bug against KAuth.

Error code 4

The most common error caused by a broken setup. First of all, make sure system policies do not prevent you from executing that specific action. If you do not know what this means, the answer is usually yes.

At this stage, ALL of the following conditions have to be met for the system to work properly:

  • Your actions need to be in the right place, see Error code 2.
  • ConsoleKit must be present and running: if you are not logging in from KDM or KDM was not built with ConsoleKit support, this is probably not the case.
  • The system bus must have been supplied with the correct autostart and policy files. In a similar fashion with Error code 2, you need to move files out of $KDEPREFIX to /usr. In this case, the two target directories are /usr/share/dbus-1/system-services and /etc/dbus-1/system.d.

Error code 5

This can appear only after the user explicitely cancelled the action: if this is not the case, please file a bug against KAuth

Error code 6

It means that a previous action has not been completed. If you are getting this error while being sure that no other action is being performed concurrently, please file a bug against the application, NOT KAuth. We'll take care of redirecting it if that's the case.

Error code 7

This is a son of Error code 4, although it means that only the DBus part of the three conditions mentioned is missing. Please follow those instruction to make this error go away.

Your application could also have misplaced your .service, .actions, and .conf files. See the KAuth Basics tutorial regarding your .actions file. The .service and .conf files are auto generated at build time, but are installed in different locations than the .actions file.


Remember that DBus configuration might take a while to be reloaded, and in some cases the DBus daemon even needs to be restarted. Be sure to perform a reboot after applying those solutions to be 100% sure to test the new behavior in an uncompromised environment.

This page was last modified on 25 November 2011, at 18:36. This page has been accessed 2,592 times. Content is available under Creative Commons License SA 3.0 as well as the GNU Free Documentation License 1.2.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V.Legal