VirtualBox

Changeset 84369 in vbox


Ignore:
Timestamp:
May 19, 2020 11:58:56 AM (5 years ago)
Author:
vboxsync
Message:

Linux/GA/X11: ticketref:19590 VBoxClient: The parent session seems to be non-X11

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/x11/VBoxClient/display-svga-x11.cpp

    r84262 r84369  
    655655
    656656/**
    657  * Tries to determine if the session parenting this process is of X11.
     657 * Tries to determine if the session parenting this process is of Xwayland.
     658 * NB: XDG_SESSION_TYPE is a systemd(1) environment variable and is unlikely
     659 * set in non-systemd environments or remote logins.
     660 * Therefore we check the Wayland specific display environment variable first.
    658661 */
    659 static bool isX11()
    660 {
    661     char* pSessionType;
     662static bool isXwayland(void)
     663{
     664    const char *const pDisplayType = getenv("WAYLAND_DISPLAY");
     665    const char *pSessionType;
     666
     667    if (pDisplayType != NULL) {
     668        return true;
     669    }
    662670    pSessionType = getenv("XDG_SESSION_TYPE");
    663     if (pSessionType != NULL)
    664     {
    665         if (RTStrIStartsWith(pSessionType, "x11"))
    666             return true;
     671    if ((pSessionType != NULL) && (RTStrIStartsWith(pSessionType, "wayland"))) {
     672        return true;
    667673    }
    668674    return false;
     
    671677static bool init()
    672678{
    673     if (!isX11())
     679    if (isXwayland())
    674680    {
    675681        VBClLogFatalError("The parent session seems to be non-X11. Exiting...\n");
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