USB-SD creator is not able to run as root

  • 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)

  • Maybe you need to allow root to connect to a non-root user's X server. Like

    Code
    1. xhost +
    2. sudo ./LibreELEC.USB-SD.Creator.Linux-64bit.bin
    3. xhost -

    Support my work with small (or big) paypal donation


    Better support for Amlogic devices: use CoreELEC

    Blu-ray Disc Java menus support - forum thread, Github

    my lamp addon (unofficial/community with limited support)
    my touchscreen support and instructions by Grruhn (now touchscreen addon exists in repository)

  • Thanks, vpeter , that did the trick.



    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.


  • 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
    1. 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
    1. 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
    1. 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).