You are not logged in.

#1 2014-09-18 21:44:52

Sevis
Member
Registered: 2014-06-13
Posts: 9

X error when running application as root

I am trying to use unetbootin under Arch. In order to do that, I need to run it with root access
But, whenever I try to, I keep getting X errors. I use KDE, if that helps
However this does not seem to be related with unetbootin because I get the exact same error with systemsettings.
This is the output of "sudo systemsettings":

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

and I get a window with nothing in it, just a grey background

$kdesu systemsettings and elevating with su and then running the application give the same error
I figured out that stopping X server, logging in as root and starting kde from there solved the problem, both with systemsettings and unetbootin, but I do not want to run my desktop environnement as root every time, so is there a proper way to fix this?

Just in case, echo $DISPLAY gives: :0.0
I use KDE and run startx every time I boot, right after login

Thank you very much for helping me

Last edited by Sevis (2014-09-18 21:52:22)

Offline

#2 2014-09-18 21:48:16

Sevis
Member
Registered: 2014-06-13
Posts: 9

Re: X error when running application as root

I'm sorry I thought <code> would work, I don't really know how to use it, I'll edit this once I get it

EDIT- nevermind, I got it

Last edited by Sevis (2014-09-18 21:53:04)

Offline

#3 2014-09-19 22:04:43

geo909
Member
Registered: 2008-09-07
Posts: 309

Re: X error when running application as root

Sevis wrote:

I'm sorry I thought <code> would work, I don't really know how to use it, I'll edit this once I get it

EDIT- nevermind, I got it

So you solved the problem? I have exactly the same problem. I don't have KDE or any desktop, just i3wm. I'm getting the
following, along with a grey window:

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

Not sure if that has anything to do with it, but when I download the standalone and run it, I get the following:

./Unetbootin-linux-603: error while loading shared libraries: libpng12.so.0: cannot open shared object file: No such file or directory

Don't mean to hijack the thread, but it seems that we have exactly the same problem with Sevis.

Offline

#4 2014-09-19 22:15:54

Scimmia
Fellow
Registered: 2012-09-01
Posts: 12,150

Re: X error when running application as root

sudo is not meant for graphical apps.

Offline

#5 2014-09-19 22:27:18

geo909
Member
Registered: 2008-09-07
Posts: 309

Re: X error when running application as root

Scimmia wrote:

sudo is not meant for graphical apps.

I see. In any case, it doesn't change the outcome for this problem. If I don't run it with sudo, a gksudo window
will prompt me for my password. And then it's all the same.

I'm opening a bug report..

EDIT:
https://bugs.archlinux.org/task/42030?project=5

Last edited by geo909 (2014-09-19 22:31:50)

Offline

#6 2014-09-19 22:33:13

Scimmia
Fellow
Registered: 2012-09-01
Posts: 12,150

Re: X error when running application as root

Do you have a polkit authentication agent running? What happens when running it from a menu (.desktop file)?

Offline

#7 2014-09-19 22:42:59

geo909
Member
Registered: 2008-09-07
Posts: 309

Re: X error when running application as root

Scimmia wrote:

Do you have a polkit authentication agent running? What happens when running it from a menu (.desktop file)?

You mean, like polkit-gnome or something like that? No.. I am using the window manager i3. I have polkit installed.

I just run pcmanfm and tried to run unetbootin from applications. I get the following:

** (pcmanfm:1925): WARNING **: The directory '~/Templates' doesn't exist, ignoring it
Error executing command as another user: No authentication agent found.

So I guess I should have a polkit authentication agent.. :S I'm going to install one and try again.

UPDATE: I just installed lxpolkit. According to this page
https://wiki.archlinux.org/index.php/Polkit
it should start on startup.. I'm reading around but I'm not sure how to do that.
I guess something like:

sudo systemctl enable ???

Any advice?

Btw just installing lxpolkit and rebooting didn't change anything on the problem.

Last edited by geo909 (2014-09-19 22:50:17)

Offline

#8 2014-09-20 05:48:16

Scimmia
Fellow
Registered: 2012-09-01
Posts: 12,150

Re: X error when running application as root

For now, just open up a terminal and run it, putting a '&' at the end to background the process. How you get it to start with X depend on your WM and I don't know much about i3wm.

Offline

#9 2014-09-20 08:35:34

HiImTye
Member
From: Halifax, NS, Canada
Registered: 2012-05-09
Posts: 1,072

Re: X error when running application as root

to add things to startup in i3, you add it to the end of your i3 config file. here's mine for reference:

# auto starts
exec --no-startup-id kupfer --no-splash
exec --no-startup-id $HOME/.fehbg
#exec --no-startup-id xautolock -time 60 -locker "i3lock -i $HOME/Pictures/Wallpapers/Tye/Broken-Windows-Error.png -p win" 
exec --no-startup-id xscreensaver
exec --no-startup-id dunst
exec --no-startup-id dropboxd
exec --no-startup-id udiskie --tray
exec --no-startup-id urxvt
exec --no-startup-id $HOME/Launchers/tconk.sh
exec --no-startup-id easystroke

note: opening graphical apps as root isn't an issue for me, even without explicitly loading lxpolkit

Offline

#10 2014-09-20 11:51:27

Sevis
Member
Registered: 2014-06-13
Posts: 9

Re: X error when running application as root

I'm sorry, this was confusing, I didn't get the problem fixed, just the <code> stuff in the forum
I'm still trying to figure this out...
I know sudo is only for console applications, but kdesu and launching as elevated user do not work either, the only way to get to the window working for me is by starting X as root, wich I believe is bad, so still no real fix, if you guys have ideas about what I should do...

Offline

#11 2014-09-20 12:24:36

geo909
Member
Registered: 2008-09-07
Posts: 309

Re: X error when running application as root

I'm still not sure how to run it:

jorge@flamingo:~$ sudo lxpolkit
[sudo] password for jorge: 
sudo: lxpolkit: command not found
jorge@flamingo:~$ lxpolkit
bash: lxpolkit: command not found
jorge@flamingo:~$ sudo systemctl start lxpolkit
Failed to start lxpolkit.service: Unit lxpolkit.service failed to load: No such file or directory.

Any ideas?

Offline

#12 2014-09-20 12:55:44

oliver
Member
Registered: 2007-12-12
Posts: 448

Re: X error when running application as root

geo909 wrote:

I'm still not sure how to run it:

jorge@flamingo:~$ sudo lxpolkit
[sudo] password for jorge: 
sudo: lxpolkit: command not found
jorge@flamingo:~$ lxpolkit
bash: lxpolkit: command not found
jorge@flamingo:~$ sudo systemctl start lxpolkit
Failed to start lxpolkit.service: Unit lxpolkit.service failed to load: No such file or directory.

Any ideas?

Can't say I use it myself but the following should help you get started

$ pacman -Ql lxpolkit | grep -i xdg

Assuming there is an xdg file, do this

$ grep -i exec /path/to/the/xdg/file/returned/from/the/pacman/command

Offline

#13 2014-09-20 12:57:04

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 13,012

Re: X error when running application as root

pacman -Ql lxpolkit

That will show you lxpolkit doesn't come with any files in bin or .service files .

However it does places a file lxpolkit.desktop in /etc/xdg/autostart folder.

if i3wm ignores /etc/xdg/autostart, just execute that file yourself.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#14 2014-09-20 13:07:06

geo909
Member
Registered: 2008-09-07
Posts: 309

Re: X error when running application as root

Ok, thank you. I found the desktop file in /etc/xdg/autostart folder and I run it. It seems that it ran succesfully.
But Unetbootin has exactly the same behaviour.

I also tried to run

/usr/lib/lxpolkit/lxpolkit

which is the exec entry inside the desktop file, and I get

** (lxpolkit:4171): WARNING **: Unable to register authentication agent: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: An authentication agent already exists for the given subject

which I guess confirms that lxpolkit indeed ran after I clicked the desktop file.


Btw do you think I rushed to open a bug report? It's my first one, so I'm not sure if I was a bit overenthusiastic about opening it. But it looks like a bug so far, right? Could somebody else care to reproduce it?

Offline

#15 2014-09-20 13:56:10

Scimmia
Fellow
Registered: 2012-09-01
Posts: 12,150

Re: X error when running application as root

OK, so now that you have an authentication agent running, what happens when you run unetbootin's desktop file?

As for the bug report, it was probably a little early, which is why I haven't assigned it until we get this last piece of info. The packager has set it up to run this way; if this doesn't work, we know it's a real bug. If it works, we know that it works when properly authenicated.

Offline

#16 2014-09-20 18:54:01

geo909
Member
Registered: 2008-09-07
Posts: 309

Re: X error when running application as root

Scimmia wrote:

OK, so now that you have an authentication agent running, what happens when you run unetbootin's desktop file?

Ah, no, same thing. Unetbootin opened a dialog asking for my password, I entered it, then the same grey window appeared.

As for the bug report, it was probably a little early, which is why I haven't assigned it until we get this last piece of info. The packager has set it up to run this way; if this doesn't work, we know it's a real bug. If it works, we know that it works when properly authenicated.

I see, good to know that you are the one to assign it. Sorry for rushing a bit!

Offline

#17 2014-09-21 18:39:44

zwa
Member
Registered: 2005-12-05
Posts: 106

Re: X error when running application as root

I am having the same problem with unetbootin.


X Error: BadAccess (attempt to access private resource denied) 10
  Extension:    130 (MIT-SHM)
  Minor opcode: 1 (X_ShmAttach)
  Resource id:  0x16c
X Error: BadShmSeg (invalid shared segment parameter) 128
  Extension:    130 (MIT-SHM)
  Minor opcode: 3 (X_ShmPutImage)
  Resource id:  0x160000a

Tried using

su -c unetbootin
sudo unetbootin
or
gksu unetbootin

but none of this works.

Offline

#18 2014-09-21 23:41:18

geo909
Member
Registered: 2008-09-07
Posts: 309

Re: X error when running application as root

zwa wrote:

I am having the same problem with unetbootin.


X Error: BadAccess (attempt to access private resource denied) 10
  Extension:    130 (MIT-SHM)
  Minor opcode: 1 (X_ShmAttach)
  Resource id:  0x16c
X Error: BadShmSeg (invalid shared segment parameter) 128
  Extension:    130 (MIT-SHM)
  Minor opcode: 3 (X_ShmPutImage)
  Resource id:  0x160000a

Tried using

su -c unetbootin
sudo unetbootin
or
gksu unetbootin

but none of this works.

Ok, so I guess it's now a few of us. The bug report is located here, in case you have some comment to add.

Last edited by geo909 (2014-09-21 23:41:51)

Offline

#19 2014-09-22 18:30:46

Sevis
Member
Registered: 2014-06-13
Posts: 9

Re: X error when running application as root

Thanks for reporting

Offline

#20 2014-09-26 10:01:58

xyproto
Package Maintainer (PM)
From: Oslo
Registered: 2011-01-11
Posts: 43
Website

Re: X error when running application as root

Hi,

Does it work for you if you first install lxpolkit, then run 

/usr/lib/lxpolkit/lxpolkit

(and let it keep running) and then start unetbootin from the menu?

Alternatively,

sudo /usr/bin/unetbootin

might work for you?

Commented the bug report as well.

Last edited by xyproto (2014-09-26 17:21:59)

Offline

#21 2014-09-30 16:34:33

geo909
Member
Registered: 2008-09-07
Posts: 309

Re: X error when running application as root

xyproto wrote:

Hi,

Does it work for you if you first install lxpolkit, then run 

/usr/lib/lxpolkit/lxpolkit

(and let it keep running) and then start unetbootin from the menu?

Alternatively,

sudo /usr/bin/unetbootin

might work for you?

Commented the bug report as well.

I didn't see the reply here, I forgot to subscribe to the thread. As I was saying in the bug report,
the outcome is the same..

Offline

#22 2014-12-27 21:09:18

Phalkon
Member
Registered: 2014-10-19
Posts: 117

Re: X error when running application as root

I have the exact same issue.
Using sudo unetbootin I get the same error messages as already reported.
Using gnome polkit the results are the same (grey window with nothing in it).

Also gnome polkit output while running unetbootin:

(polkit-gnome-authentication-agent-1:10201): GdkPixbuf-CRITICAL **: gdk_pixbuf_composite: assertion 'dest_x >= 0 && dest_x + dest_width <= dest->width' failed
Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged.

Why Linux? Because it doesn't hide anything from you. It puts you so closely in control of your machine that you can feel its heartbeat.

Offline

#23 2014-12-27 23:14:03

geo909
Member
Registered: 2008-09-07
Posts: 309

Re: X error when running application as root

Phalkon wrote:

I have the exact same issue.
Using sudo unetbootin I get the same error messages as already reported.
Using gnome polkit the results are the same (grey window with nothing in it).

Also gnome polkit output while running unetbootin:

(polkit-gnome-authentication-agent-1:10201): GdkPixbuf-CRITICAL **: gdk_pixbuf_composite: assertion 'dest_x >= 0 && dest_x + dest_width <= dest->width' failed
Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged.

Somebody is working on it. It's been a while, but the problem could not be reproduced. You could vote for the bug here:
https://bugs.archlinux.org/task/42030?project=5

Offline

#24 2015-03-04 14:38:16

kozaki
Member
From: London >. < Paris
Registered: 2005-06-13
Posts: 673
Website

Re: X error when running application as root

Actualy issue happened also with Anki (Qt) for users logged via the console (have shell, can launch gui apps but didn't launch X).

Thank you for #42030 geo909:
sin3t's suggest works here me too, incl. for Anki launched by a user who logged via a terminal after:

export QT_X11_NO_MITSHM=1

Seeded last month: Arch 50 gig, derivatives 1 gig
Desktop @3.3GHz 8 gig RAM, linux-ck
laptop #1 Atom 2 gig RAM, Arch linux stock i686 (6H w/ 6yrs old battery smile) #2: ARM Tegra K1, 4 gig RAM, ChrOS
Atom Z520 2 gig RAM, OMV (Debian 7) kernel 3.16 bpo on SDHC | PGP Key: 0xFF0157D9

Offline

#25 2016-01-07 00:05:10

flmietto
Member
Registered: 2016-01-07
Posts: 1

Re: X error when running application as root

This solution has worked fine for me:

sudo unetbootin &
(blank screen opens)

sudo QT_X11_NO_MITSHM=1 unetbootin
(new screen with correct display opens)

Offline

Board footer

Powered by FluxBB