Qvfb



  • Host : Ubuntu 10.04
    Qt Version : 4.6.3

    I installed the Qt environment from my own account. I have three environments : Qt/X11 for the host, Qt/qvfb to simulate an embedded device and Qt/iMX27 for my embedded device.

    qvfb is working fine for my account.

    Recently, I added a new account for a colleague. When he tries to start qvfb, he gets this message : Qt for Embedded Linux data directory is not owned by user 1001h.

    What could be the problem ? What directory exactly is it complaining about ?
    The path to qvfb is /usr/local/Trolltech/Qt-4.6.3/bin



  • it looks like the default data directory is @/tmp/qtembedded-<uid>-<displayid>@


  • Moderators

    strace is a great tool to track down this kind of trouble:-)



  • I only find those folders in /tmp : /tmp/qtembedded-0 and /tmp/qtembedded-filip. I expected to see e.g. /tmp/qtembedded-1001-0.
    From my account, the /tmp/qtembedded-0 folder is accessed when starting qvfb.

    However, the new account is also trying to access qtembedded-0 when starting qvfb, but as he is not the owner of that folder, he gets the error. How to solve ? (maybe this is just a Linux issue, but as I am a newbie to Linux...:-) ). Will building qvfb from within the new account create a new folder ?



  • For the new account : from strace I can see that qvfb is trying to make /tmp/qtembedded-0 (it exits with -1 because it already exists). According to 'katrinaniolet', there should be a user id in the name of the folder. Any ideas why it is missing ? It would solve the problem because each user would create its own folder.



  • chmod -r a+rw /tmp/qtembedded-0 should at least allow others to write to the tml folder, not a real solution but should at least work ;-)



  • sorry for late reaction... 2 days of holiday... ;-)

    Chmod'ding the folder does not solve the problem. On the contrary. It gets worse : when I start qvfb, I now get : @Qt for Embedded Linux data directory has incorrect permissions : /tmp/qtembedded-0@

    When I change the ownership of the folder (chown), the new account can start qvfb. But that's not something one wants to do everytime another account wants to start qvfb... Moreover, multiple accounts would still not be able to start qvfb at the same time.

    The problem is that both accounts are using the same folder when starting qvfb. I would expect qvfb to use another folder when it detects that a folder exists. E.g. to use qtembedded-1 when qtembedded-0 exists.

    Could this problem be a 'bug' in qvfb or is this a configuration/installation problem of qvfb ? Could I have done something wrong when building qvfb ?

    Just wondering : is the folder qtembedded-0 a 'normal' folder ? I have the impression that it looks like a socket where qvfb connects to.


  • Moderators

    Check the code in tools/qvfb/qvfbshmem: The part after the dash seems to be the contents of the LOGNAME environment variable. Try setting that to something useful before starting qvfb and check whether that makes qvfb use a different location.



  • Found the solution...

    I have to use the command line option "-qwsdisplay :id". For me, I don't use that option and by default it's using display 0. For the new account, I just add -qwsdisplay :1 to the command line and it starts qvfb without any problem (creating a qtembedded-1 folder in tmp).

    As simple as that...I feel ashamed...



  • may works for me, thanks
    [quote author="filip" date="1283345260"]Found the solution...

    I have to use the command line option "-qwsdisplay :id". For me, I don't use that option and by default it's using display 0. For the new account, I just add -qwsdisplay :1 to the command line and it starts qvfb without any problem (creating a qtembedded-1 folder in tmp).

    As simple as that...I feel ashamed...[/quote]


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.