[SailfishDevel] under which user do apps run
Jonni Rainisto
jonni.rainisto at jollamobile.com
Sun Aug 11 21:21:46 UTC 2013
http://qt-project.org/doc/qt-5.0/qtcore/qdir.html#homePath
You should replace ~ with homePath() as in some operating systems ~ doesn't mean anything.
QDir::homePath()+"/checklist"
________________________________________
From: Wim de Vries [wsvries at xs4all.nl]
Sent: Sunday, August 11, 2013 11:29 PM
To: Jonni Rainisto
Cc: devel at lists.sailfishos.org
Subject: Re: [SailfishDevel] under which user do apps run
On 08/11/2013 09:22 PM, Jonni Rainisto wrote:
> You must be doing something wrong :)
>
> qDebug() << getuid();
> system("whoami");
> ->
> 100000
> nemo
You're right. The above gives the same output (I was using QProcess with
no results).
Anyway, QDir dp("~/checklists") does not return anything, whereas QDir
dp("/home/nemo/checklists") works ok.
That's why I got confused. But the ~ not being recognized may be a Qt issue.
> ________________________________________
> From: devel-bounces at lists.sailfishos.org [devel-bounces at lists.sailfishos.org] on behalf of Wim de Vries [wsvries at xs4all.nl]
> Sent: Sunday, August 11, 2013 9:53 PM
> To: devel at lists.sailfishos.org
> Subject: [SailfishDevel] under which user do apps run
>
> Hi,
> Trying to find out under which user my app runs.
> whoami from within the app returns "".
> and ~ has no content.
> Thanks.
> _______________________________________________
> SailfishOS.org Devel mailing list
>
More information about the Devel
mailing list