Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unetbootin doesn't run under Wayland #94

Open
Pointedstick opened this issue Nov 26, 2016 · 20 comments
Open

unetbootin doesn't run under Wayland #94

Pointedstick opened this issue Nov 26, 2016 · 20 comments

Comments

@Pointedstick
Copy link

Pointedstick commented Nov 26, 2016

$ sudo unetbootin
No protocol specified
unetbootin: cannot connect to X server :0

I'm using Fedora 25 with Wayland, so there is no X server. If I log into an X session instead of Wayland, unetbootin works.

This is because Wayland doesn't permit GUI programs to run as root. Instead, they are expected to run the main GUI as the user and request elevated privileged for only what's needed.

@techtonik
Copy link

On Fedora 25 the magic workaround:

  1. under user run
$ xhost local:root
non-network local connections being added to access control list
  1. then with sudo
$ sudo QT_X11_NO_MITSHM=1 /usr/bin/unetbootin 

I can not explain why it is necessary. =/

@dnylpz
Copy link

dnylpz commented Jun 19, 2017

i do, x server is the program that manages access to the graphic devices drivers, xhosts allows users to connect to those drivers.

since sudo doesn't have an active session nor it's allow to access the server, unetbootin cannot create an instance of it's GUI

once you run that you give sudo access to the device drivers and hence allow unetbootin (since it's running as sudo) to create a nice looking window :)

@Pointedstick
Copy link
Author

The workaround is not sustainable, though. unetbootin needs to use Polkit rather than demanding to be run as root.

@DonyorM
Copy link

DonyorM commented Jul 18, 2017

Even with Polkit, Wayland won't let a GUI run as root (not without using "legacy" options at least). I've had trouble finding the suggested way to get around this.

@JonnyTech
Copy link

This works for me: $ xhost +local

@Pointedstick
Copy link
Author

@DonyorM the point is, it would need to be rewritten to run as a normal user, and use polkit to request elevated privileges when necessary.

@DonyorM
Copy link

DonyorM commented Jul 18, 2017

Yeah, that's what I was getting at. I wish there was more documentation on how one does that though. Polkit docs are a bit messy.

@ghost
Copy link

ghost commented Aug 4, 2017

I had to add the user to the sudoers file.

@johnnyasantoss
Copy link

johnnyasantoss commented Sep 19, 2017

What worked for me

beesu xhost `hostname -s`
beesu QT_X11_NO_MITSHM=1 unetbootin

Edit: I'm using Fedora 26

@cialu
Copy link

cialu commented Sep 29, 2017

No working workaround for me on Fedora 26, anyway get:

No protocol specified
unetbootin: cannot connect to X server :0

@bicyu
Copy link

bicyu commented Dec 4, 2017

Techtonik's answer worked for me on Ubuntu 17.10.
My problem was the app would open, ask for p/w then close.

Not permanent solution though, need to run this command again after each restart.
xhost local:root
non-network local connections being added to access control list

Needs some work here Ubuntu team~

@kaetschap
Copy link

same happened to me on Fedora 27, but @techtonik 's answer worked, thanks!

@bicyu
Copy link

bicyu commented Dec 13, 2017

Maybe this won't work for everyone but I tired of having to sudo each time I used Unetbootin. By a fluke chance I found it worked when I logged into Ubuntu 17.10 using the old XOrg option, NOT Ubuntu.

@rubo77
Copy link

rubo77 commented Feb 15, 2018

You can add an alias to your bashrc:

 alias unetbootin="xhost local:root && sudo QT_X11_NO_MITSHM=1 unetbootin"

@bicyu
Copy link

bicyu commented Feb 16, 2018

Nice work rubo77, hope it helps some people.
Sadly on Ubuntu 17.1 I still get:

Failed to run /usr/bin/unetbootin 'rootcheck=no' as user root. Unable to copy the user's Xauthorization file.

Not such an issue now tho, as I can access it if I log in via Xorg

@bicyu
Copy link

bicyu commented Feb 16, 2018

Does anyone know how to shortcut to desktop on Ubu 17-10 please?
I usually work with at least 8 screens open and it is a real pain in the bottom having to shrink all of them when i need the desk top - which is often.

Thx

@aminvakil
Copy link

@bicyu I guess you need WIN Key + d, if it doesn't work try Ctrl + Win Key + d.

@bicyu
Copy link

bicyu commented Jul 5, 2018

@aminvakil Cheers for that mate, both work.
After a lot of trail and error i finally found ct+alt+d does the same job- at least for me. However, I prefer your 2 key win+d approach.
Oh, works in 18.04 too.
BTW, for anyone who has / had issues with Wayland in 17.10, the new 18.04 has reverted to Xorg so most problems seem to have been solved. Looking at YOU Unetbootin~!
My 18.4 does seem a wee bit slower than 17.10 though, and I have the "light" version

@souxd
Copy link

souxd commented Feb 9, 2023

you should try to run unetbootin with
sudo -EH unetbootin

https://unix.stackexchange.com/questions/422040/will-wayland-ever-support-graphical-sudo

@souxd
Copy link

souxd commented Feb 12, 2023

just tested here, sudo -EH isn't enough by itself and will output a permission error
QStandardPaths: runtime directory '/run/user/1000' is not owned by UID 0, but a directory permissions 0700 owned by UID 1000 GID 100

by setting xhost local:root and then running sudo -EH unetbootin i got it working

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests