Require help on Xvfb. **Urgent**

Require help on Xvfb. **Urgent**

Post by prashan.. » Tue, 07 Dec 1999 04:00:00



Hi all !
I am having a problem making my application work with Xvfb.

My application opens a file in a window and tries to print it. A
printer setup screen is popped up, which has an "APPLY" button and is
in focus. I generate the Enter key press event for this window. This
makes the opened file to be printed.

When the application is run with the display set to the X-server
running on my PC, it works fine.
If the same application is run with the display set to Xvfb running on
the Unix box, it doesn't take the key press event.

How do I pass the Enter key press event when i'm using Xvfb?

Xvfb is started using the command " Xvfb -pixdepths 24 -
co /usr/X11R6/lib/X11/rgb -fbdir /tmp +accessx"

I don't have the window ids of the Printer setup screen, so I'm using
this piece of code to pass the Enter Key press event. Apply button on
the Printer setup screen has the focus. Looks like this is not in focus
when using Xvfb.

        .
        .
        .
        XGetInputFocus(theDisplay, &child_return, &revert_to);
        XQueryTree(theDisplay, child_return, &root_return,
&parent_return, &children, &nchildren);

        for(i=0; i<index; i++)
        {
                printf("Using Window Id %d root Window %d\n", winArray
[i], rootArray[i]);
                event.type=2;
                event.xkey.type=2;
                event.xkey.send_event=0;
                event.xkey.state = 0;
                event.xkey.display=theDisplay;
                event.xkey.window=*children;
                event.xkey.root=root_return;
                event.xkey.keycode=35;
                event.xkey.same_screen = 1;

                XtDispatchEvent(&event);
        }

        .
        .
        .

Please let me know if there is any configuration issue that I have
missed.

Thanks in Advance,
Prashant.

Sent via Deja.com http://www.deja.com/
Before you buy.

 
 
 

1. Require help on Display Emulator.(Xvfb)

Hi,
I have a problem configuring "Xvfb". I'm working on SunOS.
A X-Server is running on my Win 95 desktop. I have started Xvfb on the
Solaris server using the command "Xvfb :1 -screen 0 1600x1200x32 -ac -
fbdir /usr/tmp"
There are 2 telnet sessions to the Unix server, Telnet Session A, with
DISPLAY variable set to Xserver running on the Desktop. Telnet session
B has the DISPLAY variable set to Xvfb running on solaris.

I have an application which opens a file given as argument in a window.
Then it prints it onto the file "xprinter.out".

When this application is run on Telnet session A, it opens a window,
then opens the file and prints it onto xprinter.out.

This doesn't work when the application is run from telnet session B. I
don't get the xprinter.out file.

Could somebody please tell me as to what needs to be done to get this
working with Xvfb. I want the file xprinter.out without opening the
window, everything should be done in the background.

Thanks in advance,
Prashant.

Sent via Deja.com http://www.deja.com/
Before you buy.

2. PPP, Linux and my ISP

3. Urgent Help Required Regarding A Chat Program,PLEASE HELP

4. Traceroute revisted again

5. Urgent Help Required Regarding A Chat Program,PLEASE HELP,PLEASE

6. MMDF II for Linux

7. is Xvfb required for this?

8. 5.0 - enabling network ports

9. URGENT: Help with 1,4GB disc required

10. URGENT HELP REQUIRED!!! 3COM509 and linux

11. URGENT HELP REQUIRED - ICL DRS3000

12. URGENT help required - iproute2+tc Quality of Service

13. DECAlpha box halted on startup Urgent help required please!