USB-SD creator is not able to run as root

  • Using debian stable. Am I missing anything?

    Code
    jcromero@betelgeuse:~$ sudo LibreELEC.USB-SD.Creator.Linux-64bit.bin
    No protocol specified
    QXcbConnection: Could not connect to display :0
  • Are you trying to run the LibreELEC USB-SD Creator from a SSH session, or from a terminal alone?
    This tool needs a GUI, it's not a commandline tool.


  • Are you trying to run the LibreELEC USB-SD Creator from a SSH session, or from a terminal alone?
    This tool needs a GUI, it's not a commandline tool.

    No. I run it from an X terminal. When I run it as normal user, it starts perfectly (but has no permission to write to my SD, obviously)


  • I just had this issue after upgrading from fedora 24 to 25. the only difference i know of is that now i am using a Wayland session instead of X? this trick worked, but i wonder if it is a wayland related issue.

    Yes, this completely has to do with Wayland, which is now the default graphical server in Fedora 25.
    Wayland, by design, does not let another user (root in our case) access what our user is doing in their session on the graphical server. So when root tries to open its window in another user's (ie: our user's) graphical session, Wayland (rightly) denies it.

    The fix suggested,

    Code
    xhost +


    allows any and all users to access the current users' graphical session.

    If you find this a bit much, you can allow only root to access your current session, with the following:

    Code
    xhost si:localuser:root


    Once you've finished using the app you want as root, you can remove root from the list of allowed users with:

    Code
    xhost -si:localuser:root

    Hope this helps. At the end of the day, a better solution (using the suggestions in this bug: Bug 1274451 – sudo with graphical apps doesn't work on wayland) should probably be used, as this is really just a workaround (and end-users shouldn't have to be doing this).