VirtualBox

Changeset 4127 in vbox


Ignore:
Timestamp:
Aug 13, 2007 11:05:15 AM (18 years ago)
Author:
vboxsync
Message:

Frontends: Don't pass DISPLAY=<NULL> to the VM process when there is no DISPLAY variable in the initiator's environment.

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

Legend:

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

    r4095 r4127  
    42354235#ifdef RT_OS_LINUX
    42364236        /* make sure the VM process will start on the same display as VBoxManage */
    4237         env = Utf8StrFmt ("DISPLAY=%s", getenv ("DISPLAY"));
     4237        {
     4238            const char *display = getenv ("DISPLAY");
     4239            if (display)
     4240                env = Utf8StrFmt ("DISPLAY=%s", display);
     4241        }
    42384242#endif
    42394243        ComPtr<IProgress> progress;
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxSelectorWnd.cpp

    r4071 r4127  
    847847#if defined (Q_WS_X11)
    848848    /* make sure the VM process will start on the same display as the Selector */
    849     env.sprintf ("DISPLAY=%s", getenv ("DISPLAY"));
     849    {
     850        const char *display = getenv ("DISPLAY");
     851        if (display)
     852            env.sprintf ("DISPLAY=%s", display);
     853    }
    850854#endif
    851855
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