Programming :: Sending Keystrokes From C Program To Certain Running Applications?

Jan 13, 2010

My requirement is to save files before shutting the Linux machine down, unattended ie: when the user is not near the machine. This is done whenever the UPS battery is about to die, so that the files get saved. open-Office/text-editor applications that can be saved using keystrokes will have to be found from the running processes and keystrokes should be sent to them from a C program that was started in non-graphics stage. ie: from a C program that forks into memory as a daemon before xwindows part starts. How to I send keystrokes to a running application? (like cotrol + F and then wait and then send next set of keystrokes till the file is saved as a new file or as the same file itself), either from C program or a script?

View 1 Replies


ADVERTISEMENT

Fedora :: The Keyboard Is Sending Mutiple Keystrokes?

Nov 13, 2009

In the attempt to solve other problems () I got now this new one.Whatever I type, every character is displayed (and interpreted) mutiple times.rice for the sake of precision.It's happening with both the internal keybaord (it's a laptopt) andh an external USB keyboard.In order to work I'n now using the on screen keyboard of my KDE.To log in I had to enable the automatic login.

View 3 Replies View Related

Applications :: Getting Ready To Start Programming / What's Good Program To Use

Jan 20, 2010

I was wanting to know what's a good programming suite that is comparable to MS Visual C++. I'm also curious about the portability of something I make in Linux, can I make a program in Linux and import it over to Windows, and what would be involved in making it compatible?

View 3 Replies View Related

Programming :: Getting A Snapshot Of A Running Program?

Nov 17, 2008

I am trying to use perl to run a program using the eval command but the program runs infinitely, i just need it to run basically for one second, stop then give me the output. I tried using fork but it does not really work. The child process is not being killed.

my $pid = fork;
if ($pid == 0) {
my $results = `ngrep etc...`;

[code]...

View 6 Replies View Related

Programming :: Running C Graphics Program?

Sep 18, 2010

i want to run c graphics program on linux for that i want to install[URL]but i dont know how to install this graphic file on linux to make it un.

View 1 Replies View Related

Programming :: Running Program In Background From Script

Mar 27, 2011

I have a script that calls another program/script, xxx, to run in the background. Supposedly this program at most should finish within five (5) minutes so after five (5) minutes, I run some other steps to run the script into completion. My problem is sometimes the program takes longer than five (5) minutes and this is causing problems when running the rest of the steps in the scripts. Can anyone suggest how to re-program my script. At the moment, the KSH script, i.e. test.ksh, is doing as below:

test.ksh:
.....
.....
xxx/xxx.ksh <--- program/script called by the script
sleep 300
..... run the rest of the script .....
..... problem is sometimes xxx/xxx.ksh takes longer than 300 seconds .....
..... any way that I can monitor that xxx/xxx.ksh finishes before I run .....
..... the rest of the scripts .....

View 3 Replies View Related

Programming :: Detect Pipe From Running C Program?

Jan 24, 2009

I'm looking for a way to detect whether or not a program has been called from pipe, e.g.

Code:

whatever | my_program
versus simply just being exectuated directly:

Code:

my_program

Why? In the first case, I want to run the program non-interactively, and in the latter case I want to print out user-friendly messages. I've been thinking along the lines of some check I haven't yet found, like:

Code:

if( stream_buffer_is_not_empty() )
print_interactive_messages();

View 1 Replies View Related

Programming :: Possible To Know The Amount Of Memory Used By A Program Before Running It?

Mar 3, 2009

I would like to know if there is a linux command to verify the amount of memory used by a program. The programs I am using were compiled with gfortran.

View 2 Replies View Related

Programming :: Running External Program On Same Processor?

Mar 2, 2010

The situation is that I have an MPI-parallel fortran program. I run it and it's distributed on N processors, and each of these processes must call an external program.

This external program is also an MPI program, however I want to run it in serial, on the processor that is calling it, as if it were part of the fortran program. The fortran program waits until the external program has completed, and then continues.

The problem is that this external program seems to run on any processor, and not necessarily the (now idle) processor that called it.

how I can call the program and ensure it runs only on this processor?

Extra information that might be helpful:

If I simply run the external program from the command line (ie, type "/path/myprogram.ex <enter>"), it runs fine. If I run it within the fortran program by calling it via

CALL SYSTEM("/path/myprogram.ex")

it doesn't run at all (doesn't even start) and everything crashes. I don't know why this is.

If I call it using mpiexec:

CALL SYSTEM("mpiexec -n 1 /path/myprogram.ex")

then it does work, but I get the problem that it can go on any node.

View 2 Replies View Related

Programming :: Script To Test If Program Is Running

Sep 22, 2010

I'm trying to test whether wget is working still or not. While [ wget is still running ] <----- but how should this look please?
do
codes
done

View 4 Replies View Related

Programming :: Running A Program With Arguments Using A Shell Script

Jul 14, 2011

Running a program with arguments using a shell script

View 1 Replies View Related

Debian Programming :: Memory Usage When Running Java Program

Jun 28, 2013

I have a java program that runs on Debian as a background processor. Yesterday the Java program stopped running. I looked at the memory usage, the system only had 5MB memory left, so my guess is that the java program ran out of memory to use.

However, after we restarted the java program, we could see that the free memory count started to go up. It kept going up from 5MB to over 400MB. The increase of memory happened slowly, when I measured it, I could see that with each minute passing by, there were a bit more memory added into the free memory pool, and meanwhile, the java background process was running.

I wonder why this would ever happen. It's as if our java program first brought the machine done because it consumed all the memories, then after restart, it starts to give back memories.

View 2 Replies View Related

Fedora :: Sending Email Using Mail Program?

Apr 24, 2010

How is it possible to send email using the "mail" program? I tried:
echo "testing" | mail -s "test" myaddress@gmail.com
But nothing happened. I made sure that the sendmail daemon was running before I tried. Is there anything else that I have to set up first?

View 5 Replies View Related

General :: Why Does Running A Program In Bash Work, When Running It In The Menu Doesn't?

Jul 26, 2010

I presume there is something in the JWM window manager - or Puppy Linux Lupu 5.01 itself that is conflicting with the normal loading of GMPLAYER....

I would like to know how to troubleshoot, and fix this problem if possible (even a workaround would be great).

View 1 Replies View Related

Programming :: Sending Arp Packets In C / C++?

Apr 5, 2010

I'm looking for a way how to send an arp request / reply packet using C or C++. I've written an application that can send different crafted packages using jpcap (java), but I'm not a C expert (trying to learn). The reason for this is that I would like to port my java program to C to use it on a less powerful system that can't fully cope with the resource hungry VM

View 3 Replies View Related

Ubuntu :: Add Program To The Applications?

Mar 30, 2011

I have installed Google Earth under Ubuntu 10.10. It runs fine but I can only run it from a Terminal using the command Googleearth. How can I add it to the Applications/Internet Menu?

View 3 Replies View Related

Programming :: Raw Socket Not Sending Packets?

Mar 26, 2010

(Let me first of all state that I am a newbie to any form of programming.) I have been trying to create an IP header + TCP header and send this to another machine on my network.using C)I used the normal stuff: two structures for the headers, a sockaddr_in structure, call to function socket with SOCK_RAW, setsockopt with HDRINCL and call to sendto.All functions seem to return fine (values other then -1) the function that I have used to calculate the checksum for the IPheader matches the value that I manually calculated. I just don?t see the anything coming out of the interface on whireshark.I assumed that it had something do with my piece of code so I used two examples (including mixter void ru rawip html A brief programming tutorial in C for raw sockets[/url]). They show exactly the same thing functions return fine but no packets being send.I use Ubuntu 9.04 2.6.28-14-genericThe machine has two interfaces one with an ip address the other interface is in promiscuous mode. (both interfaces connected to a switch with port mirroring) I can see all normal traffic in/out.

View 2 Replies View Related

Programming :: Sending Email From The Localhost

Jan 21, 2011

I have designed and one form and php code to send mail. I am developing this in my localhost, So now i want to send email from my localhost to test my programming. I googled and i find something like editing "php.ini" file. But it didnt work for me.

View 9 Replies View Related

Programming :: Java - Sending A 2d Array Over UDP?

Feb 26, 2011

I'm currently writing a program which will eventually send two 2d arrays to another machine using UDP, and then back again.

To do this I'm converting to a byte array which as far as I'm aware is the only way possible. I'm sure the problem is on the receiving program which receives like this:

Code:
DatagramSocket socket = new DatagramSocket(2000);
DatagramPacket packet = new DatagramPacket(new byte[5000] , 5000);
socket.receive(packet);
ByteArrayInputStream bin = new ByteArrayInputStream(packet.getData());

[Code].....

View 3 Replies View Related

Programming :: Php And (pdf) File Sending By Http?

Dec 9, 2010

I have a web page that has links to a php script that sends pdf files to the browser when clicked.
The links are like this:

Code:
<a href="getfile.php?id=1201234">

The files sent are shown embedded in the browser, which is what I want.

The problem is: the title of the browser window or tab in which the pdf file is opened is "getfile.php?id=1201234"), and not the actual file name of the pdf file.

Is it possible to send the file by a php script in a way that the window/tab title becomes the filename and not the link by which it has been accessed?

View 5 Replies View Related

Programming :: Program A SH - Bash Program With Zenity To Play Radio Based On A Site?

Feb 15, 2011

I will have to code this. However I am lacking of time since I have too much to do. make a short code bash/dash to prompt the country with Zenity, then, get the PLS or m3u url and prompt with another zenity which radio to play. http://www.listenlive.eu/index.html

My code to get url's radio country.htm is:

Code:

View 2 Replies View Related

Applications :: Run Program - Application Under Windows

Dec 4, 2009

I need to run application, wich originally wrote for linux, under windows. SMPCallBuilder - application name. There is actually windows version for this program, but unfortunatelly without abillity to run it from console, AND I DO need to run this program from console, because I white program wich should work automatically.

View 2 Replies View Related

Applications :: Program To Synchronize Two Directories

May 25, 2010

I need to find a tool to keep two directories with exactly the same content. I want to start it manually.

I don't want a conventional backup tool for compressing my data files, I want to keep files in your normal form.

I know I could use "cp -R dirA dirB" but it don't remove dirA excluded files in dirB.

I was going to write a script for this, but I belive it there must be yet.

View 2 Replies View Related

Applications :: Program To Save Bookmarks?

Sep 20, 2010

Last week my ubuntu 8.04 os got a Seamonkey browser update ( 70-80MB totally )which I was happy to get. The down side is the new seamonkey wiped out all of my many different profiles and the many different bookmarks that were in those profiles ( 300-350 or so )!I am wondering, and hoping, that there is linux software program available that could independently hold many easily available bookmarks!!Does anyone know if such a program exists and if they have had any experience

View 8 Replies View Related

Programming :: Segmentation Fault While Sending UDP Packets?

Jul 16, 2009

The following piece of code is suppose to send a UDP packet.but inside function udpsocketinit , i get a segmentation fault and i can not understand why

Code:
#include <arpa/inet.h>
#include <netinet/in.h>

[code]...

View 5 Replies View Related

Programming :: Sending Binary Data Through Sockets In C

Nov 29, 2010

I am coding a http server which has to send the file(s) such as images, .avi files, .mpeg, that the client is going to request. I have been trying of sending files through sockets.

char info [256];
bzero(info, 256);
//memset(&info,0,sizeof(info));
read(socket, info, 255);
write(socket, HTTP, 255);
FILE *fl= fopen(info,"rb");
fseek(fl, 0, SEEK_END);
long len = ftell(fl);
printf("largo: %ld", len);
unsigned char *ret = (char*) malloc(len);
fseek(fl, 0, SEEK_SET);
fread(ret, 1, len, fl);

However, it's supposed to be shown in Mozilla Firefox (as the client). But it is not doing it, so.. It's just not getting the complete file.

View 1 Replies View Related

Fedora :: Using KDE Applications While Running KDE?

Mar 24, 2010

Is there a benefit to using KDE applications while running KDE?I've switched from Gnome recently.

View 3 Replies View Related

Ubuntu :: Running Applications In 10.10?

Mar 4, 2011

I'm a 3D animator and use Blender for all my work. I've been happily using Ubuntu 10.04 without any problems.I recently upgraded to Ubuntu 10.10, and now whenever I click the Blender application file I get an error saying that theres no program set to run this application. I get a similar error when I try to run Voodoo (the open-source camera tracker). Mind you, both these programs ran just fine on Ubuntu 10.04. Any ideas what I might be doing wrong?

View 2 Replies View Related

Programming :: Bash Script - Sending Shortcuts To Firefox

Aug 26, 2010

When I attempt to extract some webpages there are far too many jscript functions and html encodings. Hence, I can manually search the page, perform select all (^A), copy (^C) it, open a prepared file (^O), but cannot figure how to paste it (&V). I want to do this from a bash script. I know how to do the search. Now how do I send these shortcuts (especially ctrl-C) to Firefox. Once I have the page copied to the clipboard, I think I can figure out how to open a file and save the clipboard to a file using bash script on the Linux side. How do I send shortcuts to Firefox? Is this done with the hex equivalent of the keystrokes?

View 8 Replies View Related

Programming :: Sending Binary Data To Bluetooth With Terminal

Aug 30, 2010

I am using centos 5, want to send a sets of binary data to other bluetooth device I know how to sent a file but dont know how to sent raw data. My case is like this I have a bluetooth device I need to send data to then after it process I need to get it back, I plan to do this all using terminal is that possible?

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved