Commits on Source 53

  • Pascal Nowack's avatar
    rdp: Move PipeWire buffer context handling into own file · 3b89cde5
    Pascal Nowack authored
    This eases up doing additional checks on the buffer. It will also help
    in the future supporting fully hardware accelerated setups, as such
    setups require the usage of a common buffer type.
    
    As a side effect, this change also avoids a crash, when a PipeWire
    buffer could not be allocated. Currently, gnome-remote-desktop hits an
    assertion, as the buffer type could not be determined, when dequeuing
    this buffer. But now, gnome-remote-desktop avoids in such situation
    dequeuing any buffers, and just closes the remote desktop session with
    an error.
    3b89cde5
  • Pascal Nowack's avatar
    rdp: Use persistent PipeWire buffer mappings · 8bbbffad
    Pascal Nowack authored
    Instead of mapping each PipeWire buffer for every frame again and again,
    simply map it once it was added.
    This will not only avoid any possible overhead here, but also help a
    future implementation of support for fully hardware accelerated setups,
    in which case it won't be desired to do unnecessary buffer copies, but
    to keep PipeWire buffers mapped as long as their content is needed.
    8bbbffad
  • Pascal Nowack's avatar
    build: Fix build without RDP backend · b70ddf53
    Pascal Nowack authored
    Building gnome-remote-desktop without the RDP backend currently fails
    due to running into an error that the polkit dependency could not be
    found.
    The respective pkgconfig is only looked up, when building
    gnome-remote-desktop with the RDP backend, as it is only needed there
    (for the gnome-remote-desktop-enable-service helper).
    
    To fix this issue, only build the gnome-remote-desktop-enable-service
    utility, when the RDP backend was enabled.
    Also, move the toggle_systemd_unit() function into the HAVE_RDP scope,
    as otherwise a compiler warning appears, that this function is unused,
    when the RDP backend is disabled.
    
    Closes: https://gitlab.gnome.org/GNOME/gnome-remote-desktop/-/issues/207
    b70ddf53
  • Dudemanguy's avatar
    build: Fix build without libsystemd · 61195df5
    Dudemanguy authored
    The graphical remote login feature requires systemd, but this can be
    made optional so the usual remote assistance sessions can still work.
    
    Closes: https://gitlab.gnome.org/GNOME/gnome-remote-desktop/-/issues/190
    61195df5
  • Joan Torres's avatar
    daemon-handover: On disconnect, logout only when being at a greeter · 8d7a3047
    Joan Torres authored
    When daemon-system disappears, keep the logout behaviour because the new
    daemon-system can't communicate with the old daemon-handover.
    
    Don't logout when handover start fails. This failure should not be
    critical, this allows to keep the session.
    8d7a3047
  • Joan Torres's avatar
    daemon-system: Allow handover to an orphaned session · 6dcfa3b5
    Joan Torres authored
    When disconnecting from a headless user session, it will now not be
    destroyed. Instead, this session is now orphan.
    For that session, there's a lingering remote_client at daemon-system.
    
    1. When on a new connection, there's a new remote_client, and a new
       RemoteDisplay (greeter) linked to it.
    2. A successful authentication happens to open this orphan session.
    3. GDM updates the RemoteDisplay of the orphan session with the new
       remote_client id.
    4. The daemon-system receives that update. It knows that for that
       RemoteDisplay there is an old remote_client. And with this new
       remote_client id it knows there is a new remote_client.
    5. The handover iface from the old remote_client is unregistered and
       the remote_client is removed.
    6. A new handover is registered to communicate with the orphan session
       again, but this time from this new remote_client.
       Now the new remote_client has handover_src connected to the greeter
       session and handover_dst connected to the orphan session.
    7. On handover_dst, the new signal "RestartHandover" is emitted to make
       the daemon-handover at the orphan session start again the handover
       and get the RDP client.
    6dcfa3b5
  • Joan Torres's avatar
    daemon-handover: On "RestartHandover" signal, restart handover again · d368c99d
    Joan Torres authored
    Now there can be an orphan/lingering headless session, with a
    daemon-handover attached to it. It is possible to continue to use that
    session. To do that, the daemon-system will emit on the correspondent
    handover iface the "RestartHandover" signal and a new RDP client will
    end up on this session again.
    d368c99d
  • Joan Torres's avatar
    daemon-handover: When taking a new client, disconnect the current one · 55a4c9bb
    Joan Torres authored
    In headless sessions, the remote desktop client determines the monitor
    configuration. If there are multiple clients, they would clash with each
    other, and no one of them would be able to offer a usable session.
    Hence, stop the existing session, if there is one, before handling the
    new client.
    55a4c9bb
  • Joan Torres's avatar
    daemon-handover: Don't logout on handover fail · c7e4df8b
    Joan Torres authored
    There can be a situation, where the handover service is stopped and
    after a while started again. In that case, the RDP client is
    disconnected and when the daemon-handover is started again, a handover
    will be started and that can fail.
    
    Do not logout on that failure case. Instead, let the daemon-handover
    wait for a future handover.
    c7e4df8b
  • Ray Strode's avatar
    ctl: Support non-fixed number of arguments in subcommands · 0f0826ea
    Ray Strode authored
    At the moment, every subcommand is expected to have a predefined,
    fixed number of arguments.
    
    We need to lighten this expectation a bit to support subcommands
    that take data from either the command line or optionally the stdin.
    
    That is necessary to support more securely passing credentials
    (which will be implemented in a future commit).
    
    This commit, modifies the argument processing code to support multiple
    entries for the same subcommand, each entry with its separate allowed
    number of arguments. In this way, e.g., "set-credentials" will be able
    to support 0, 1 or 2 arguments.
    0f0826ea
  • Ray Strode's avatar
    ctl: Support taking credentials from standard input · ba07fa13
    Ray Strode authored
    Right now the VNC password and RDP username and password need
    to be passed to grdctl on the command line.
    
    That isn't ideal and it would useful to be able to pass them
    directly via the terminal as well.
    
    This commit adds some logic to do just that: read the values
    from the standard input if they aren't passed in on the command line.
    ba07fa13
  • Joan Torres's avatar
    Introduce ShellDialog · 1be96d9e
    Joan Torres authored
    This new object uses the org.freedesktop.impl.portal.Access dbus
    interface exposed by gnome-shell to display a dialog, basically adding a
    new way to inform the user with this modal dialog. Only one dialog can
    be displayed at the same time.
    When calling the open() method and there is already one dialog being
    displayed, it will be closed and the new one will be displayed instead.
    1be96d9e
  • Joan Torres's avatar
    daemon-handover: Inform user using ShellDialog instead of a prompt · 94d00578
    Joan Torres authored
    Now when the connection is insecure, the handover daemon now tries to
    display a dialog instead of a notification.
    
    Keep using the prompt as fallback, however. This is needed for cases,
    where displaying a dialog is not possible due to gnome-remote-desktop
    not running inside gnome-shell (e.g. when using gnome-kiosk).
    94d00578
  • Joan Torres's avatar
    daemon-handover: Follow the HIG in the insecure connection message text · 86c8ab1f
    Joan Torres authored
    The dialog title wasn't following the HIG. Fix this by capitalizing the
    title correctly.
    Do the same in the notification message.
    86c8ab1f
  • Martin's avatar
    Update Slovenian translation · b7636d1d
    Martin authored
    b7636d1d
  • Pascal Nowack's avatar
    daemon-handover: Move translator comments before function call · 4eceb71a
    Pascal Nowack authored
    Apparently, gettext looks for such comment before a function call, so
    move the translator comments right before that to ensure they are
    visible in the respective .po files.
    4eceb71a
  • Balázs Úr's avatar
    Update Hungarian translation · 7a52b33c
    Balázs Úr authored
    7a52b33c
  • Jonas Ådahl's avatar
    Update NEWS · ef7af825
    Jonas Ådahl authored
    ef7af825
  • Jonas Ådahl's avatar
    build: Bump version to 47.alpha · d4f74b7c
    Jonas Ådahl authored
    d4f74b7c
  • Artur S0's avatar
    Update Russian translation · c3a665d2
    Artur S0 authored
    c3a665d2
  • Pascal Nowack's avatar
  • Pascal Nowack's avatar
    be1301a7
  • Pascal Nowack's avatar
    session: Always check fd list and index before acquiring the fd itself · edca8836
    Pascal Nowack authored
    g_unix_fd_list_get() requires the file descriptor list and index to be
    valid. If they are invalid (e.g. index is out of range), it returns -1
    as fd, but the call does not set the error.
    Thus, gnome-remote-desktop crashes, when attempting to print the error
    message to the journal.
    
    Fix this issue by simply checking the file descriptor index before
    attempting to acquire the file descriptor itself.
    
    Fixes: https://errors.ubuntu.com/problem/e7b4b4292726923600ac46a21ef9b94f868951f3
    edca8836
  • Pascal Nowack's avatar
    daemon: Always check fd list and index before acquiring the fd itself · 5a34e049
    Pascal Nowack authored
    g_unix_fd_list_get() requires the file descriptor list and index to be
    valid. If they are invalid (e.g. index is out of range), it returns -1
    as fd, but the call does not set the error.
    Thus, gnome-remote-desktop crashes, when attempting to print the error
    message to the journal.
    
    Fix this issue by simply checking the file descriptor index before
    attempting to acquire the file descriptor itself.
    5a34e049
  • Pascal Nowack's avatar
    daemon-handover: Always check fd list and index before acquiring the fd · 23c7e7fe
    Pascal Nowack authored
    g_unix_fd_list_get() requires the file descriptor list and index to be
    valid. If they are invalid (e.g. index is out of range), it returns -1
    as fd, but the call does not set the error.
    Thus, gnome-remote-desktop crashes, when attempting to print the error
    message to the journal.
    
    Fix this issue by simply checking the file descriptor index before
    attempting to acquire the file descriptor itself.
    23c7e7fe
  • Pascal Nowack's avatar
    7fb7ad95
  • Pascal Nowack's avatar
    1fbd4786
  • Pascal Nowack's avatar
    session-rdp: Remove the legacy graphics path · 35148c67
    Pascal Nowack authored
    Commit [0] already deprecated the legacy graphics path and stated the
    reasons for it. Almost two years ago, all major popular clients already
    supported the graphics pipeline (xfreerdp, Remmina, mstsc, etc.).
    With the release of gnome-remote-desktop-44, the legacy path could then
    only be used, when a specific debug flag was set, and even when the
    legacy graphics path was used, it could only be used for the Remote
    Assistance scenario, where the primary monitor is mirrored, as it has
    lots of limitations:
    
    - The width and height of the desktop size MUST be a multiple of 4
      (making the legacy graphics path unsuitable for the usage of headless
      sessions, where arbitrary resolutions are used).
    - The bitstream size of the NSC codec is unpredictable and thus it
      cannot be reliably used for graphics handling in the legacy path,
      where graphics PDUs have to be split on a higher level.
    - The RFX codec in the legacy path has the best code and usability
      quality, but it is there only suitable for single-monitor scenarios.
    - The raw bitmap path produces bitstreams, that are gigantic in size,
      and it is very slow (max 10-11 FPS in testing).
    - Changing the desktop size is and multi-monitor config is more complex,
      as the legacy graphics path requires the usage of the
      deactivation-reactivation sequence.
    
    Since the usage scenario for the legacy path is very limited, especially
    now with the support of headless sessions, remove the already deprecated
    legacy path.
    This should also ease up transitioning the codebase of
    gnome-remote-desktop to a fully hardware accelerated solution.
    
    [0]: 35dfaaad
    35148c67
  • Pascal Nowack's avatar
    rdp-pipewire-stream: Prevent dequeuing buffers when stream resize failed · f8999be3
    Pascal Nowack authored
    When resizing the buffers of the buffer pool fails, or resize-surface
    operation of the damage detector fails, then
    grd_session_rdp_notify_error() implicitly disallows any encoding
    operation, because it unsets the RDP_PEER_ACTIVATED flag.
    In order to be able to move any encoding operation out of session-rdp.c,
    this behaviour needs to be changed.
    
    To handle this situation outside of session-rdp.c, simply set the
    dequeuing_disallowed flag in the PW stream class. This implicitly avoids
    any calls to encoding operations. The reason for this is, because a PW
    buffer needs to be dequeued at some point in the future, after the
    format-change event happened, but this flag prevents that.
    f8999be3
  • Pascal Nowack's avatar
    rdp-renderer: Add API to render a frame · afca1e50
    Pascal Nowack authored
    Add an API to the renderer, which simply calls
    grd_rdp_graphics_pipeline_refresh_gfx(). This is necessary in order to
    be able to move any rendering operations out of session-rdp.c.
    
    This API will later be used by the surface renderer.
    afca1e50
  • Pascal Nowack's avatar
    rdp: Move last render handling bit from session to surface renderer · 32b3647e
    Pascal Nowack authored
    With all helpers in place now, remove any last rendering handling from
    session-rdp.c.
    The surface renderer is the "driving force" behind the rendering
    operations for a surface. So, move the related bits there.
    
    Semantically, this change clears session-rdp.c a little bit from any
    unrelated parts and makes its code more readable.
    32b3647e
  • Pascal Nowack's avatar
    rdp: Move encoding failure handling to surface renderer · bd436e59
    Pascal Nowack authored
    The surface renderer already handles the case, where a render operation
    fails, so there is no need to do it in the calls, that the surface
    renderer initiates.
    bd436e59
  • Scrambled 777's avatar
    Update Hindi translation · 99a0527c
    Scrambled 777 authored
    99a0527c
  • Yaron Shahrabani's avatar
    Update Hebrew translation · 7ba22521
    Yaron Shahrabani authored
    7ba22521
  • Junting Wu's avatar
    Update Chinese (Taiwan) translation · 9d7f92a0
    Junting Wu authored
    9d7f92a0
  • Emin Tufan Çetin's avatar
    Update Turkish translation · 7da27b60
    Emin Tufan Çetin authored
    7da27b60
  • Joan Torres's avatar
    utils: Stop depending on RDP/VNC server · 2d7106ce
    Joan Torres authored
    This increases utils modularity. A different binary can now use the
    utils without pulling in the RDP/VNC server dependencies.
    2d7106ce
  • Joan Torres's avatar
    ctl: Move systemd unit management to utils · f6546cf1
    Joan Torres authored
    This allows a future ctl-dbus binary to use that functionality too.
    
    Also, update unit_is_active function to get the unit active status
    instead. This keeps the style with other similar functions with respect
    to the returned handle and errors.
    f6546cf1
  • Joan Torres's avatar
    Introduce grd-configuration · ad4103f9
    Joan Torres authored
    grd-configuration allows to inspect and configure the RDP server of the
    system daemon. This is done through the dbus interface
    "org.gnome.RemoteDesktop.Configuration.Rdp.Server", at the
    "org.gnome.RemoteDesktop.Configuration" name.
    ad4103f9
  • Joan Torres's avatar
    configuration: Move RDP server configuration logic to the new iface · b01d073e
    Joan Torres authored
    Instead of the "org.gnome.RemoteDesktop.Rdp.Server" iface, use the
    "org.gnome.RemoteDesktop.Configuration.Rdp.Server" iface to configure
    the system daemon.
    
    Move for this the methods "Enable", "Disable", "GetCredentials",
    "SetCredentials" and "ImportCertificate" to the respective iface.
    Also, move the polkit authentication as well.
    The required properties are now also available on this interface too.
    b01d073e
  • Joan Torres's avatar
    data: Add dbus permissions and systemd service of configuration · 8fb098d2
    Joan Torres authored
    gnome-remote-desktop-configuration is a systemd system service running
    as the gnome-remote-desktop user.
    It can be autostarted on dbus on demand. Do not autostart the system
    daemon on demand anymore.
    8fb098d2
  • Joan Torres's avatar
    ctl: Split get_active_state function · 07f076da
    Joan Torres authored
    This allows to get the systemd unit proxy independently, allowing to do
    other things apart from getting the active state.
    
    This will later be used to connect to the proxy signal to know when the
    active state property changes.
    07f076da
  • Joan Torres's avatar
    configuration: Correctly reflect systemd unit status in enabled property · 8014a64e
    Joan Torres authored
    Previously the rdp-enabled property was only in sync through the
    settings iface, but if the systemd unit was changed it wouldn't get
    updated.
    
    Update the rdp-enabled property, when the systemd units status changes,
    to fix this issue.
    8014a64e
  • Joan Torres's avatar
    daemon-system: Start configuration daemon when getting enabled/disabled · 74957c9e
    Joan Torres authored
    The control-center only updates the remote login config info when
    setting or getting the config through the dbus iface of the
    gnome-remote-desktop-configuration-daemon.
    
    The gnome-remote-desktop-configuration-daemon is stopped after a
    timeout. If any configuration was done without the
    configuration daemon (e.g. grdctl), the configuration daemon isn't
    autostarted, not updating control-center.
    
    To fix this, when the configuration happens through systemd or grdctl,
    let the system daemon simply start the configuration daemon. As a
    consequence, it updates control-center.
    74957c9e
  • Pascal Nowack's avatar
    ctl: Fix VNC-only builds · 4428f9a4
    Pascal Nowack authored
    prompt_for_input() is required for both backends, not just the RDP
    backend.
    4428f9a4
  • Pascal Nowack's avatar
  • Pascal Nowack's avatar
    session-rdp: Remove unnecessary include · 58d1e09f
    Pascal Nowack authored
    58d1e09f
  • Pascal Nowack's avatar
    e0c81150
  • Pascal Nowack's avatar
    rdp-routing-token: Do not crash on invalid x224Crq TPDU length · ad4a2a10
    Pascal Nowack authored
    In RDP, every Client X.224 Connection Request PDU MUST contain an X.224
    Class 0 Connection Request transport protocol data unit (TPDU).
    This is also usually the case, but a malicious client could also simply
    omit it, in which case gnome-remote-desktop currently crashes, because
    Stream_New() requires a valid passed length value (> 0) and thus hits an
    assertion.
    Without the assertion, gnome-remote-desktop would do an out-of-bounds
    buffer read.
    
    To fix these issues, simply check the x224Crq TPDU length before trying
    to allocate memory for the peek operation.
    
    https://errors.ubuntu.com/problem/8d010a6d70c7f77f763c787bcb99372c942fc1c8
    ad4a2a10
  • Pascal Nowack's avatar
  • Jonas Ådahl's avatar
    Update NEWS · 2a3e57c2
    Jonas Ådahl authored
    2a3e57c2
  • Jonas Ådahl's avatar
    build: Bump version to 47.beta · 06fb51a2
    Jonas Ådahl authored
    06fb51a2
  • Jeremy Bícha's avatar
    New upstream version 47~beta · c7a54001
    Jeremy Bícha authored
    c7a54001
Loading
Loading