Re: How to send a key event to another process?



In comp.os.linux.misc, Mirxon@xxxxxxxxx wrote:

Hello,
I'm working on a C program under Ubuntu.
It's basd on socket.
Browser calls a client cgi (C program), and send some parameters to
server (C program).

Given your statement above, ITYM
1) Browser sends a GET or POST HTTP request to web server (via TCP port 80)
2) Web server decodes GET/POST URL and determines which CGI program to call
3) Web server calls appropriate CGI program
4) CGI program uses some form of IPC to communicate with a server program

Server runs another program (ooimpress, open office ppt), and
translate the commands from client to a key event, and send it to
child process.

Here, your intent is not as clear
5) Server program runs "another program" and translates the commands from
the CGI "into a key event" and sends it (the key event?) to a child
process


For example.
first, after openning xxx.odp on server, I need to display it in "full
screen mode", so I need to send "F5" from server program to child
process "ooimpress".
[snip]

Your intent is even less clear here. Is it your intent to have the contents
of an ODF "presentation" display within a web browser? If not, then please
elaborate on your example. OTOH, if I've stated the goal correctly, then
your solution is likely not going to work as there is no GUI interface
between an arbitrary web browser and a web server/cgi/ooimpress other than
the presentation protocols normally supported in a web environment (HTML,
Flash, SVG, etc.) OOImpress uses the X protocol, which won't help you
unless your web browser also supports X (and this is unlikely).


My main goal is open ooimpress, and control it to show next, previous
slide, esc, and full screen (F5 is hotkey for that).

How about converting the slideshow into Flash (IIRC, that's something that
ooimpress can do), and feeding the Flash out to the browser?

--
Lew Pitcher

Master Codewright & JOAT-in-training | Registered Linux User #112576
http://pitcher.digitalfreehold.ca/ | GPG public key available by request
---------- Slackware - Because I know what I'm doing. ------


.



Relevant Pages

  • Re: How hard is socket programming?
    ... It is an HTML web page, BrowseFile widget. ... a browser file selection window. ... server. ... If you using the HTML File Upload Tag, that is not a "CGI ...
    (microsoft.public.vc.mfc)
  • Re: How hard is socket programming?
    ... It is an HTML web page, BrowseFile widget. ... The browser has their own way for displaying ... it isn't FASTCGI - but a simple backend server. ... If you using the HTML File Upload Tag, that is not a "CGI format." ...
    (microsoft.public.vc.mfc)
  • Re: Simple discussion of python cgi approaches?
    ... > via my ISP's news server, but my ISP is notorious for poor news ... > I've been writing a CGI app with Python 2.3 and Apache. ... > and the docs on LRWP ... are used to communicate between the web server and the service process, ...
    (comp.lang.python)
  • Re: Mixed language programming: C++, C# and Perl
    ... create having the current HTML and PNG file as its content? ... You mention CGI, does that imply there's a web server involved too? ...
    (microsoft.public.vstudio.general)
  • Re: Secure automation?
    ... To provide secured web services, a server SSL certificate is ... The downside with this is that the web server will ask ... To be able to verify a server certificate, a web browser needs to ...
    (comp.security.unix)