LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-11-2016, 04:46 AM   #1
Earth_80
LQ Newbie
 
Registered: Jul 2016
Posts: 2

Rep: Reputation: Disabled
ERROR Embedding Xnest in a Window


I'm trying to use the -parent flag to Xnest, and not having much luck
with it. I'm using an xembed container in Qt (which works with
mplayer, source below), and I'm trying to run Xnest as

Xnest -parent <winid> :1

I've tried different variations on -class, -sss, -install, and other
things that don't make sense to me, but everything I try gives me the
error:

X Error of failed request: BadAccess (attempt to access private
resource denied)
Major opcode of failed request: 2 (X_ChangeWindowAttributes)
Serial number of failed request: 155
Current serial number in output stream: 156

Just before Xnest exits, I see a flash of XScreenSaver in a grainy
black and white pattern. Xnest works fine without the -parent flag,
aside from the fact that it isn't embedded that way.

Does anybody use Xnest in Xembed mode, and if so, can anybody lend me
a hand? I've pasted the source for my simple Qt app, and attached the
output of an strace of my failed Xnest run.
 
Old 07-11-2016, 07:38 AM   #2
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
I THINK you are bumping into an X security block. The block was put there to help prevent hacks from interposing key/display intercepts. I think the block has been in existence for a couple of years now.

And no, I also don't know of how to fix it - but I believe it depends on how the window is created that defines the access modes. As to whether you can change the modes without having to create the window using Xlib functions I don't know.

A bit of follow up.

I was able to get it to work using the "Xeyes" utility to create the window, I then used the "xwininfo" to identify the window. Using "Xnest -parent 0x360000a :20" (the 0x360000a was provided as the window id by "xwininfo") worked. But some windows don't work (Mate terminal doesn't for instance - giving "invalid parameter attributes" error).

Even got it do display an X terminal in the nested X server (with the window created by xeyes). Couldn't change the xeyes window size afterward though - even after terminating the X server

Last edited by jpollard; 07-11-2016 at 08:03 AM. Reason: follow up
 
1 members found this post helpful.
Old 07-11-2016, 07:48 AM   #3
Elizine
Member
 
Registered: Aug 2015
Posts: 54
Blog Entries: 1

Rep: Reputation: Disabled
Have you tried with other window to verify -parent does work?
Maybe try to use xprop to see the ID directly ?
 
Old 07-11-2016, 02:45 PM   #4
Earth_80
LQ Newbie
 
Registered: Jul 2016
Posts: 2

Original Poster
Rep: Reputation: Disabled
ERROR Embedding Xnest in a Window

jpollard, you are right I could do it with a window created with Xeyes utility, but there is no way to do it with another window.

I do not only tested with a Qt window. I also checked the following:

$ display image.png &

I obtained the windowId with "xwininfo" command and also with xprop.

$ Xnest -parent windowID

And the error was the same.

The problem is that I don't really know if I can modify the access mode of a window.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Xnest -query just opens black window johnsfine Linux - Networking 0 01-12-2014 05:44 PM
Embedding gnuplot x window into GTK Ronnie_Raj Linux - Software 2 07-18-2007 04:43 PM
Embedding Gnuplot x window results into gtk Ronnie_Raj Programming 1 07-18-2007 02:09 PM
Window Manager will not load with Xnest? adam_snoddon Linux - Newbie 0 11-05-2003 12:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:48 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration