VirtualBox

Changeset 93222 in vbox


Ignore:
Timestamp:
Jan 13, 2022 11:53:48 AM (3 years ago)
Author:
vboxsync
Message:

Addidions: X11: add interface to start VBoxClient --vmsvga, bugref:10134.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/VBoxGuestLib.h

    r93115 r93222  
    829829VBGLR3DECL(bool)    VbglR3DrmClientIsRunning(void);
    830830VBGLR3DECL(int)     VbglR3DrmClientStart(void);
     831VBGLR3DECL(int)     VbglR3DrmLegacyClientStart(void);
    831832/** @}  */
    832833
  • trunk/src/VBox/Additions/common/VBoxGuest/lib/VBoxGuestR3LibDrmClient.cpp

    r93115 r93222  
    3636
    3737/** Defines the DRM client executable (image). */
    38 #define VBOX_DRMCLIENT_EXECUTABLE        "VBoxDRMClient"
     38#define VBOX_DRMCLIENT_EXECUTABLE           "/usr/bin/VBoxDRMClient"
     39#define VBOX_DRMCLIENT_LEGACY_EXECUTABLE    "/usr/bin/VBoxClient"
    3940/** Defines the guest property that defines if the DRM resizing client needs to be active or not. */
    40 #define VBOX_DRMCLIENT_GUEST_PROP_RESIZE "/VirtualBox/GuestAdd/DRMResize"
     41#define VBOX_DRMCLIENT_GUEST_PROP_RESIZE    "/VirtualBox/GuestAdd/DRMResize"
    4142
    4243/**
     
    7475}
    7576
     77static int VbglR3DrmStart(const char *pszCmd, const char **apszArgs)
     78{
     79    return RTProcCreate(pszCmd, apszArgs, RTENV_DEFAULT,
     80                        RTPROC_FLAGS_DETACHED | RTPROC_FLAGS_SEARCH_PATH, NULL);
     81}
     82
    7683/**
    7784 * Starts (executes) the DRM resizing client process ("VBoxDRMClient").
     
    8188VBGLR3DECL(int) VbglR3DrmClientStart(void)
    8289{
    83     char szDRMClientPath[RTPATH_MAX];
    84     int rc = RTPathExecDir(szDRMClientPath, RTPATH_MAX);
    85     if (RT_SUCCESS(rc))
    86     {
    87         RTPathStripSuffix(szDRMClientPath);
    88         rc = RTPathAppend(szDRMClientPath, RTPATH_MAX, VBOX_DRMCLIENT_EXECUTABLE);
    89         if (RT_SUCCESS(rc))
    90         {
    91             const char *apszArgs[1] = { NULL }; /** @todo r=andy Pass path + process name as argv0? */
    92             rc = RTProcCreate(VBOX_DRMCLIENT_EXECUTABLE, apszArgs, RTENV_DEFAULT,
    93                               RTPROC_FLAGS_DETACHED | RTPROC_FLAGS_SEARCH_PATH, NULL);
    94         }
    95    }
    96 
    97    return rc;
     90    const char *apszArgs[1] = { NULL }; /** @todo r=andy Pass path + process name as argv0? */
     91    return VbglR3DrmStart(VBOX_DRMCLIENT_EXECUTABLE, apszArgs);
    9892}
    9993
     94/**
     95 * Starts (executes) the legacy DRM resizing client process ("VBoxClient --vmsvga").
     96 *
     97 * @returns VBox status code.
     98 */
     99VBGLR3DECL(int) VbglR3DrmLegacyClientStart(void)
     100{
     101    const char *apszArgs[2] = { "--vmsvga", NULL };
     102    return VbglR3DrmStart(VBOX_DRMCLIENT_LEGACY_EXECUTABLE, apszArgs);
     103}
     104
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