Unetbootin has no GUI on Ubuntu GNOME

I want to make the switch to Antergos. When opening Unetbootin, I can't open it successfully.

Here is what happens when I open UNetbootin from Terminal:

$ sudo unetbootin
X Error: BadAccess (attempt to access private resource denied) 10
  Extension:    130 (MIT-SHM)
  Minor opcode: 1 (X_ShmAttach)
  Resource id:  0x164
X Error: BadShmSeg (invalid shared segment parameter) 128
  Extension:    130 (MIT-SHM)
  Minor opcode: 5 (X_ShmCreatePixmap)
  Resource id:  0xc0
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id:  0x2800010
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id:  0x2800010
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id:  0x2800010

enter image description here

Is this a known issue? Can I fix this? Is there a workaround?


Solution 1:

This is a known issue.

As a workaround that does not require reinstalling unetbootin, you can run this command:

sudo QT_X11_NO_MITSHM=1 unetbootin

What the above command does is disable shared memory access for running this Qt based application, allowing it to work properly on GNOME.

The PPA source for unetbootin in the accepted answer includes the prefix to disable shared memory access in the default run command so that launching it from the GUI shortcut just works without any hassle: https://launchpad.net/~gezakovacs/+archive/ubuntu/ppa

Source of answer: https://github.com/unetbootin/unetbootin/issues/67

Solution 2:

First uninstall your current version of unetbootin, then use official unetbootin page to install using ppa instead of deb files. If fails then try opening it from launcher instead of terminal.

Solution 3:

I changed the Exec property in unetbootin.desktop:

Exec=/usr/bin/xdg-su -c /usr/bin/unetbootin

and created file /usr/bin/unetbootin with the bash script:

#!/bin/bash
QT_X11_NO_MITSHM=1 /usr/sbin/unetbootin

then made it exetutable:

sudo chmod +x /usr/sbin/unetbootin

and now when I run Unetbootin from my application overview it launches normally with GUI.

Solution 4:

Since Ubuntu 17.10 wayland is the default x server, 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 window with nthose steps:

  1. Under user run

    xhost local:root
    

    non-network local connections being added to access control list

  2. Then with sudo

    sudo QT_X11_NO_MITSHM=1 /usr/bin/unetbootin 
    

Source: https://github.com/unetbootin/unetbootin/issues/94

So you can add an alias to your ~/.bashrc file:

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