Skip to content

xdg-open errors when publishing content  #296

Closed as not planned
Closed as not planned

Description

@scubastevew

Using the rsconnect-python package to publish content in rstudio.cloud, these xdg-open errors are displayed in the terminal, even though the content is published correctly.

/cloud/project$ [443:443:1021/172110.397604:ERROR:ozone_platform_x11.cc(240)] Missing X server or $DISPLAY
[443:443:1021/172110.398718:ERROR:env.cc(255)] The platform failed to initialize.  Exiting.
/usr/bin/xdg-open: 869: firefox: not found
/usr/bin/xdg-open: 869: iceweasel: not found
/usr/bin/xdg-open: 869: seamonkey: not found
/usr/bin/xdg-open: 869: mozilla: not found
/usr/bin/xdg-open: 869: epiphany: not found
/usr/bin/xdg-open: 869: konqueror: not found
/usr/bin/xdg-open: 869: chromium: not found
/usr/bin/xdg-open: 869: chromium-browser: not found
[497:497:1021/172110.575512:ERROR:ozone_platform_x11.cc(240)] Missing X server or $DISPLAY
[497:497:1021/172110.575565:ERROR:env.cc(255)] The platform failed to initialize.  Exiting.
/usr/bin/xdg-open: 869: www-browser: not found
/usr/bin/xdg-open: 869: links2: not found
/usr/bin/xdg-open: 869: elinks: not found
/usr/bin/xdg-open: 869: links: not found
/usr/bin/xdg-open: 869: lynx: not found
/usr/bin/xdg-open: 869: w3m: not found
xdg-open: no method available for opening '<URL>'

Steps to Reproduce:

  1. Publish python content using the rsconnect-python package in rstudio.cloud

Expected Results:

  1. Content is published without the xdg-open errors.

Activity

  1. aronatkins commented on Oct 21, 2022

    @aronatkins
    Collaborator

    From rsconnect in R, we have a launch.browser argument to rsconnect::deployApp that is disabled when interactive and can be used to configure / prohibit launching a browser:
    https://github.com/rstudio/rsconnect/blob/b873c27688d914118c72fe89be7d26257bd2894e/R/deployApp.R#L123-L124

    That gets threaded into openURL:
    https://github.com/rstudio/rsconnect/blob/b873c27688d914118c72fe89be7d26257bd2894e/R/deployApp.R#L852-L858

    We probably need something similar.
    https://github.com/rstudio/rsconnect-python/blob/f595f69d0f943949bcc77f9f25710791ddadd454/rsconnect/api.py#L735-L736

    CC @mslynch

  2. mslynch commented on Oct 21, 2022

    @mslynch
    Member

    @aronatkins I don't think that's what we need (though it would probably be useful in some cases). rsconnect is able to open URLs through utils::browseURL through what seems to be a monkey-patched implementation. Ideally we'd have the same thing for Python, but we could potentially settle for skipping the webbrowser.open_new call in cloud if that's not feasible.

  3. aronatkins commented on Oct 24, 2022

    @aronatkins
    Collaborator

    @mslynch Sorry that I wasn't clear -- I was giving references to prior work on the R side - where we allow R options and function arguments to control if and how a URL is opened after the deploy completes.

    I'm not sure how rstudio.cloud adjusts the browser-open call for R deploys; you might be able to allow something similar here.

  4. nealrichardson commented on Dec 6, 2025

    @nealrichardson
    Contributor

    rstudio.cloud/posit.cloud publishing support was removed in #735

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions