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


ADVERTISEMENT

Programming :: Communication Between Bash And Firefox

Aug 24, 2010

I have been able to use bash to initiate a google seache via firefox. I would like to either copy the source page to a file via wget or send firefox short cuts to the other terminal's firefox search page to put the html file in a directory. I seem to remember but maybe incorrectly that there exist hexadecimal codes for each keyboard shortcut in firefox. Maybe these could be echo-ed from bash to the firefox search page.

View 2 Replies View Related

Programming :: Bash : How To Make Firefox Open But Minimize

May 3, 2011

I am relatively new to scripting, but I was wanting to open a firefox window from a bash script, but have it open, then minimize. In the script, I have a single instance of: firefox & but is there a way to minimize it, versus have it displayed on the screen? I was wanting the command terminal to remain visible and it can't since the firefox window is open in front of it. I looked all over the place, including the man pages, but to no avail. I can make the height and width changes, but no minimize. Either that, or to be able to bring the terminal window back to the front automatically.

View 5 Replies View Related

General :: Using Shortcuts/alias Inside A Bash Command?

Jan 28, 2010

I know that using alias I can run a whole command with a shortcut. But my requirement is to use parts of a long command and in between I have to pass some user defined values.
E.g. Suppose I have to routinely copy a directory to another remote directory on a remote machine.The remote machine name is quite long as well as the directory path to which I want to copy the files into.So the command to do scp would look like this[URL]Now I want to do some sort of aliasing (say "ecp") so that I just need to pass the source_directory name and the ecp command and do my job

View 3 Replies View Related

OpenSUSE :: Firefox Shortcuts Broken / What To Do?

Apr 25, 2010

Firefox in openSUSE has a customized openSUSE toolbar menu. The hyperlink to openSUSE documentation is broken (HTTP 404). Please remove it; it is sufficient to visit the home page and to access the documentation from there.

View 2 Replies View Related

General :: Sending Email With A Bash Script?

Feb 10, 2011

here is a fragment of a bash that i have to send an email when a back Up is made. basically a usr runs the sh - it asks for the job num and I read that from standard in . I do a tar of the drv to tape and I wish to send an email that job such and such has happened. My problem is : the subject of the email. I can set it - but if i try to use a var ( as in the $jobNum ) that Does work in the mail body - the subject comes out blank. I have also tried to buld a text file and shove that in the SUBJECT. my Q is how can I use a var in the subject.

# email subject
### so I have tried bulding and reading a tmp file -no works
EMAILSUBJECT="/tmp/emailsubject.txt"
echo "backup job" $jobNum >$EMAILSUBJECT

[code]....

View 4 Replies View Related

Ubuntu :: Cannot Seem To Launch Firefox By Clicking On Any Of Shortcuts

Mar 3, 2010

Whenever im logged into my Ubutu Desktop at home remotely from work i cannot seem to launch Firefox by clicking on any of the shortcuts.Seems the only thing that lets me lauch it is by opening a command windown and typing "sudo firefox".

View 8 Replies View Related

Ubuntu :: Bash Script For Sending Email Using Mailx?

May 8, 2010

I'm trying to send an email using mailx, in a bash script, but I can't get it to work. In the terminal I can, and this is how I do it:

Code:
$ mailx johndoe@gmail.com
Message^D

Within seconds of doing this, I get sent an email. The problem is with the bash script I'm trying to make. Among other things, I tried this:

Code:
#!/bin/bash mailx johndoe@gmail.com < "Message" I honestly don't know what I'm supposed to do, and I've Googled a bunch of things too, and didn't have too much luck. Is there anyone who could help me out?

Edit: Figured it out. This is what I did, and it works for me:

Code:
#!/bin/bash
echo "Message" | mail -s "Subject" "johndoe@gmail.com"

View 8 Replies View Related

Ubuntu :: Firefox Vimperator Conflicting With Regular Keyboard Shortcuts?

Aug 26, 2010

I think firefox vimperator is great, but unlike google chrome it completely overrides all general shortcuts, copying, pasting,s elect all. does anyone know how to restore these?

View 1 Replies View Related

Server :: Bash Scripting Sending Write Error - Broken Pipe

Apr 19, 2010

I move a page from a server in SuSe to Debian and this script was working well but when I move the page to a Debian base server it is sending in the logs the following message:

cat: write error: Broken pipe, referer: [URL]

The cgi does the following, read a db file plain text that repeat each 15 lines an information where to look the seraching info. if it is there sends to the output the 15 lines block. but it was not sending errors in suse distro, does anybody knows why the cat's line are sending "cat: write error: Broken pipe," if I am not writing or making a pipe with ">" to none file.

View 8 Replies View Related

Ubuntu :: Keyboard Shortcuts In Firefox - Backspace Key To Take Me Back To The Previous Page

Sep 1, 2011

Can i set keyboard shortcuts in firefox? in particular, i would like the backspace key to take me back to the previous page.

View 2 Replies View Related

Software :: Update Notifier Can't Stop Sending Updates About The Old Firefox?

Sep 13, 2009

I used ubuntuzilla to install 3.5.2 on my IBM T43 Notebook. I'm using Ubuntu Jaunty with all the newest updates.

But now the update notifier can't stop sending me updates about the OLD firefox. 3.1.? I think... It says "firefox" "firefox-gnome support" etc.

It's really rather annoying, and instead of clicking "update now," I have to filter the old firefox stuff out before I update.

Any way to get that thing to shut up?

Sorry if this has already been posted... kinda slipped my mind to use the search function... but if you don't mind, I'd still like some answers HERE instead of just "USE THE SEARCH, NOOB!" responses.

Just checked... seems to me it hasn't already been posted... unless I'm not searching for the right thing

View 2 Replies View Related

Programming :: How To Use Gvim Keyboard Shortcuts

Jul 6, 2010

I'm new to vim and gvim, but I feel its power so I want to learn it. I've been searching very long how to use gvim keyboard shortcuts but I simply cannot find out what is for example the vertical splitting command '^Wv'? I've tried (ctrl/super+ a lot of things) (and other combinations, but without success).

View 2 Replies View Related

Programming :: Bash: Printing The Line Number In Bash Script?

Feb 4, 2011

I would like to know how do I print the line # in a script. My requirement is, I have a script which is about ~5000 lines long. If there are any errors happen I just exit. And I would like to add the line # of the script where the error happened.

View 3 Replies View Related

Programming :: Bash Ctrl+c Tarp And Bash Read With Timeout?

Jan 24, 2010

simple bash code:

Code:
#!/bin/bash
trap "echo 'you got me'" SIGINT SIGTERM # to trap ctrl+c
echo "Press ctrl+c during 5 sec loop"
for ((i=0;i<5;i++)); do

[Code]...

How come code behaves normally and stops when ctrl+c signal is caught and resumes, but after I use at least one timeout read in the code it looks like, if signal is caught again it doesn't pause the execution but skips the loop. If you remove -t (timeout) option from the read, both loops look the same!

View 10 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 :: Broken Shortcuts For Netbeans On Section Applications -> Programming?

Feb 16, 2010

I have two broken shortcuts for Netbeans on section Applications -> Programming.

View 3 Replies View Related

Programming :: Reading A Bash Variable In Bash Scripting ?

Nov 26, 2008

I have a config file that contains:

my.config:

Code:

Now in my bash script, I want to get the output /home/user instead of $HOME once read. So far, I have managed to get the $HOME variable but I can't get it to echo the variable. All I get is the output $HOME.

Here is my parse_cmd script:

Code:

View 3 Replies View Related

Programming :: Run Multiple Bash And Php Scripts From A Bash Script?

Jul 25, 2011

I have written quite a few separate bash & scripts and php scripts that up to now I have run from cron jobs. However I have to estimate how long each takes to run, before running the next and so it probably takes much longer than necessary to run them all. They have to run in order.

Now there are so many I am thinking it would be better to have a master bash script that would run one after the other, but I am not sure how to get the master script to wait before starting to run the next script. Is this possible and is there a command that will make the script wait between bash and php scripts , for them to finish, before running the next?

View 5 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 :: 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

Programming :: Bash: Get Filename And Extension Using Bash?

Jan 9, 2010

I would like to get the filename (without extension) and the extension separately. The best solution I found so far is:

Let FILE="thefilenameofsomefilesfor_instance.txt"

Code:

NAME=`echo "$FILE" | cut -d'.' -f1`
EXTENSION=`echo "$FILE" | cut -d'.' -f2`

I think it would be better to count the len and remove 3 chars to right to get the extension, but it can be macintosh filenames with have 4 chars for extensions.

View 5 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

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 View Related

Programming :: Sending Mail To Mailing-lists In Perl?

Jan 25, 2011

Im creating a perl script that will be sending out mail to mailing-lists, but im not getting it to work. Its no problem getting the script to send mail to regular mail addresses, but it doesnt seem to handle to send mail to mailing lists. Im using the Net::SMTP perl module.how to send mail from a perl script to a mailing list (and not just regular mail addresses) ?

View 2 Replies View Related

Programming :: VLC Control With Perl Sending Via Serial Connection?

Oct 6, 2010

My computer for a project I'm working on will be using Ubuntu with Perl and VLC from the repositories, if that matters at all. I'm not sure what I should/could use to accomplish this, but essentially I'm looking for Perl to be able to send predefined data via a serial connection based on the time within a song that VLC is playing.

A couple of the things that I've thought about after Googling a bit are SMPTE and subtitles/lyrics; I can't stop thinking that there's got so be a simple way that I'm just overlooking, though - most of the stuff I've found is for over-the-network applications, and that's overkill for this situation. All the subtitles/lyrics would have for text is hexadecimal values; all the SMPTE would do is keep Perl and VLC (playing audio) in-sync with each other. I would need either one or the other, but not both. Or, I could use something else...

I'm envisioning something like the setup below, I just don't know what else I need to make it happen.

Files:
song.mp3
timing.txt
script.pl

When I run "./script.pl song.mp3 timing.txt", VLC will open, and start playing "song.mp3", and the variable "$mils", for milliseconds elapsed, will be equal to zero. For each line in "timing.txt", the "script.pl" will assume the portion before an underscore is the "$time" for that line (time in milliseconds), and "script.pl" will assume that the portion after the underscore is the "$data", a three-byte hexadecimal value (such as "ff101f", or "011c00"), for that line.

I think that I will need to use two arrays, "@time" and "@data", such that the given line in "timing.txt" would read the same as printing: "$time[$line]".'_'."$data[$line]"."
" (if "$line" is the line number). My problem: jitter/stuttering playback. If VLC stumbles (which it sometimes does), and is a about half a second behind where it "should" be, but Perl didn't stumble, then I've got an out-of-sync issue.

Since Perl can't just count the time by itself to avoid synchronization issues, I've got two main ideas for getting this done: One way: Perl has to "read" where VLC is at, and use that as the "$mils" value. Then, if VLC delays/stubmles, so will Perl, but everything will still be in-sync. Alternative way: VLC has to "listen" to what Perl says "$mils" is at any given moment, essentially having Perl be in control of VLC's timing. This would make VLC "skip ahead" (to where it "should" be) if it starts to fall behind, thus keeping the two in sync.

I don't know which, if either, of these ways is best for my particular need. I would need "script.pl" to send "$data[$line]" over the serial connection when "$mils" == "$time[$line]". I already know how to send serial data from Perl, read files via Perl, and convert the hexadecimal number (if needed). I don't know how to "link" Perl and VLC so that they stay synchronized, and I am quite lost as to where to go from here.

View 5 Replies View Related







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