VirtualBox

Changeset 23285 in vbox


Ignore:
Timestamp:
Sep 24, 2009 2:56:59 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
52775
Message:

pass the XAUTHORITY environment variable along with DISPLAY

Location:
trunk/src/VBox/Frontends
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManage.cpp

    r23249 r23285  
    523523#if defined(RT_OS_LINUX) || defined(RT_OS_SOLARIS)
    524524        /* make sure the VM process will start on the same display as VBoxManage */
    525         {
    526             const char *display = RTEnvGet ("DISPLAY");
    527             if (display)
    528                 env = Utf8StrFmt ("DISPLAY=%s", display);
    529         }
     525        Utf8Str str;
     526        const char *pszDisplay = RTEnvGet("DISPLAY");
     527        if (pszDisplay)
     528            str.append(Utf8StrFmt("DISPLAY=%s\n", pszDisplay));
     529        const char *pszXAuth = RTEnvGet("XAUTHORITY");
     530        if (pszXAuth)
     531            str.append(Utf8StrFmt("XAUTHORITY=%s\n", pszXAuth));
     532        env = Bstr(str);
    530533#endif
    531534        ComPtr<IProgress> progress;
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxSelectorWnd.cpp

    r23223 r23285  
    10041004#if defined (Q_WS_X11)
    10051005    /* make sure the VM process will start on the same display as the Selector */
    1006     {
    1007         const char *display = RTEnvGet ("DISPLAY");
    1008         if (display)
    1009             env.sprintf ("DISPLAY=%s", display);
    1010     }
     1006    const char *display = RTEnvGet ("DISPLAY");
     1007    if (display)
     1008        env.append(QString("DISPLAY=%1\n").arg(display));
     1009    const char *xauth = RTEnvGet ("XAUTHORITY");
     1010    if (xauth)
     1011        env.append(QString("XAUTHORITY=%1\n").arg(xauth));
    10111012#endif
    10121013
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette