Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

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

In this specific case, I'd like to use the full name of the currently logged-in user in a QML app (not the logname). As far as I found out, system calls can not yet be used (and would not be an elegant solution). Also the Ubuntu SDK documentation seems to cover only UI-related topics.

Is there a method to access the full user name from within a QML app? And in general, are system APIs or the Unity API available to QML apps?

share|improve this question

For that you need to create your own QML plugin what is a simple Qt/C++ code. In that QML plugin you can access the system the same way as you would access from any C++ code and expose the functions, properties to the QML layer.

There is a template available in the Ubuntu SDK.

Open the Ubuntu SDK (QtCreator) go to the "Touch" tab, click on the "Create a new project >" and choose the Ubuntu -> QML Extension Library

share|improve this answer

Your Answer


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.