Ubuntu :: How To Control Running Instance MPlayer From Bash Script

Nov 23, 2010

I am starting an instance of mplayer from a bash script, opening an audio stream:

Code:
mplayer [URL]

How do I do to control this mplayer instance from another script? I want to control volume and pause it from within the bash script. I know the commands for doing so from terminal, but once mplayer gets started from the script, how do I 'direct' the commands to that specific mplayer instance?

View 9 Replies


ADVERTISEMENT

Debian :: Running Same Process Multiple Times(from Another Account) / An Instance Of Newsbeuter Is Already Running Error?

Aug 6, 2010

Sometimes I connect to my Debian box from another computer (using SSH on Cygwin or Linux), and once ina while I want to run some console apps. And sometimes some of these apps might complain about "another intance, Error: an instance of newsbeuter is already running (PID: 2496)". Is there a work around for this issue at all(without killing the original instance") ? The reason I do not want to kill the app because there might be 2 users connected to the same machine that might be using the same app.

View 1 Replies View Related

Software :: Prevent Rsync From Running If Another Instance Is Running?

Mar 29, 2011

On my crontab there is an entry to run a script I wrote that backs up my local files to my remote server. It was working great, running once a day. However, I now want to make the script run every hour.The problem is that if there are too manyfiles to transfer (Example:I ripped a DVD in the last hour) the actual backup may take longer than 60 minutes.So I want to modify the script to check if my backup script, based on rsync, is running. If rsync is still running then do nothing and exit the script. If it is not running, execute the script as normal.

View 5 Replies View Related

Ubuntu :: Bash ${variables} : Replace Last Instance Of Regexp?

Mar 10, 2011

I have something like...

Code:
var=beer
# echo ${var/%e/E} doesn't do anything because i can only replace "r" or "er" this way

[code]....

View 1 Replies View Related

General :: Get Bash History From Another Shell Instance

Aug 18, 2010

Possible Duplicate: Can history files be unified in bash? I have bash running in an ssh session, call this session A. I leave the office, go home, ssh to the same box, call this session B. From session B, I'd like to be able to look at the history of session A.

View 1 Replies View Related

Programming :: Single Instance Of Bash Script?

Sep 12, 2010

I have a bash script which is called automaticallyI want it so that if when the script is called if a previous instance of it is already running then to delay the running of it until the previous instance has stopped (effectively queue up ./script.sh var1 var2)I have seen some posts about a 'lockfile' but this just seems to stop the second instance running rather than queueing it up to run next (it also needs to be able to queue up a 3rd/4th calling of the script and run them one at a time)

View 14 Replies View Related

Slackware :: Possible To Keep Pan Instance Keep Running Remotely Ssh?

Feb 21, 2011

is it possible to run for instance pan remotely via ssh and make that instance of pan running on server, regardless upon closing it via ssh?for example i would love to do: start pan instance via ssh on the server keep it open while downloading close the ssh session, keep the pan running on the server in background. open ssh session and access the same instance of pan running on the server etc something in that loop.im unable to do that because when i close pan ssh remotely the instance automatically terminates on the server.

View 8 Replies View Related

Ubuntu :: X Apps Via SSH - Displaying Already Running Instance Of A Process

Jan 5, 2010

how to configure X11 forwadring over SSH so, that when I open any app over SSH, I get displayed window of a process that is already running on my server (in case its running ), not a new instance of it.

View 3 Replies View Related

CentOS 5 :: JavaScript For MPlayer Control Not Working

Sep 22, 2010

I'm on web developing and was trying to embed an audio file on one of my page. The audio was successfully tested and emebeded on all browser. Added on the said embedding are javascript for customize buttons, here is the part of the code for embedding:

<script language="javascript" type="text/javascript">
QT_WriteOBJECT('[filename]', '90%','16', '', 'obj#id', 'movie0', 'emb#name', 'movie0', 'enablejavascript', 'true', 'autoplay', 'false');
</script>

View 1 Replies View Related

Server :: Using Apache As A Front End To A Running Tomcat Instance?

Jul 20, 2010

I am having a problem.I use Ubuntu 10.04 server edition.Two computers on LAN one with Public Ip A other with local (Class C IP)say it BWith a third computer in same subnet I can access a TomCat application running on B as http://Ip of B:8080/applicationI want to use A as a Reverse Proxy for this application to be reachable from internet.So on Googling I came across some thing known as mod_ajp I enabled that on my Server A asa2enmod proxya2enmod proxy_ajpa2enmod headersbut after that I am not able to understand as how do I define vhost to be able to forward HTTP request which come on A as www.myserver.com/appto B which I can see internally as http://Ip of B:8080/application so Tomcat on B handles this.

View 4 Replies View Related

General :: Make A Launch Command Set Focus To An Already Running App Instance In Ubuntu?

Feb 11, 2010

I'm using a program called easystroke to invoke commands from mouse gestures - typically to launch an application. 'gnome-terminal', for example. If I already have a gnome-terminal window open, and I invoke the gnome-terminal gesture, I'd like to be setting focus to the already running instance, rather than spawn a new instance, which is of course what happens now. (I am actually more interested in this for my gmail chrome app shortcut, and other larger apps.)

I'm very new to ubuntu and linux in general, but I was hoping there might be a nifty command I could wrap around my launch command that would produce this behavior. (I'm imagining some kind of singleton app list keeper program that consumes my command line, checks if it's already in the list, transfers focus to the running process if it is (and if that process is still running), or else spawns a new process and then adds it to its list using the the command line as a key.)

View 2 Replies View Related

Ubuntu :: Links From Widgets - Task Bar Shows An Instance Of Konqueror And Another Instance Of Firefox

Feb 15, 2010

I have KDE 4.4 and Firefox 3.6. Whenever I click a link from a plasmoid widget, it tries to open Konqueror and another instance of Firefox. The page actually loads in the opened Firefox window, but the task bar shows an instance of Konqueror and another instance of Firefox, that keeps loading for a while then close. See image below:

I currently have setup the browser default application as "firefox". If I set this option to use the default application, it opens in Konqueror and I don't see additional windows in the task bar. If I change the option to "firefox %u", then it exhibit the same issue, but the process is much faster, so the loading windows don't stay for long in the task bar. Additionally, it opens the link on a new Firefox window and opens the page twice. Although Konqueror is not loaded, the bouncing icon next to the mouse pointer shows up and stay for a while.

View 1 Replies View Related

Debian Installation :: Wheezy- No Running Instance Of Xfce4-panel?

May 15, 2011

I posted this same issue in the Xfce support forums this morning. So far, no replies. This morning, using Synaptic, I finally upgraded my main Wheezy Xfce 4.6 computer to Xfce 4.8. There were 225 upgrades, plus 33 new things to be installed. It has been about 2 weeks since I last fully upgraded that system, so I'm sure that not all of today's upgrades were directly related to Xfce 4.8.

I waited to upgrade as long as I did because Wheezy's been getting a steady stream of Xfce 4.8 upgrades for the past several days -- I wanted to wait until that stream stopped, to reduce the chances that I would run into an upgrade problem that was on the verge of being fixed.

The only issue I had was that, in the middle of the configuration step (for lib6, I think), it asked me to either stop or restart xscreensaver before continuing (so that I wouldn't get locked out of the current session), so I completely stopped xscreensaver.

View 5 Replies View Related

General :: Activate Skype Already Running In Taskbar Instead Of Opening New Instance?

Jan 19, 2011

I am setting up a laptop for an old person who has trouble locating the skype icon in the notification bar.
I want clicking on the skype desktop icon to open the window of already running instance instead of a new one (like it happens in Window$).I am using Lucid puppy 520.

I want the icon to link to script which checks if skype is already running, and if it is, it de-iconifies the skype window

View 2 Replies View Related

General :: Running Bash But Common Bash Commands Not Working?

Jul 17, 2010

below are the details of my system. I have bash as my current shell, some really common commands aren't working.

Do I need to do a re-installation of bash? Or how do I install a selection of bash commands which I need? (for example a subset of [URL])

Code:
root@sdptfw:~ # uname -a
Linux sdptfw.sdpt.co.za 2.4.36 #1 Tue Jul 22 13:13:24 GMT 2008 i686 i686 i386 GNU/Linux
root@sdptfw:~ # echo $SHELL$
/bin/bash$

[Code]....

View 13 Replies View Related

Ubuntu Installation :: Where Is The Skype Icon Of The Running Skype Instance

Apr 30, 2011

Since there is no notification area any more in 11.04, where is the skype icon of the running skype instance?

View 2 Replies View Related

Ubuntu :: Cron Not Waiting For MPlayer When Running Script

Jul 31, 2010

I'm not sure if this behavior is Ubuntu specific, but I thought this might be a good place to start. I'm currently running Karmic, though again I don't think it matters. I'm trying to get some experience with cron, since it seems like a handy thing to know. Putting together a script to play some chimes seemed like a simple way to do that. I've since fallen into (and crawled out of) a bunch of pitfalls, and will never make assumptions about the running environment again! Whatever I do, I can't seem to get cron to wait for mplayer to finish while it's running the script.

Here's what I've got:
Code:
#! /bin/bash
### depends on: libnotify-bin mplayer
### DISPLAY=:0.0 must be in crontab
TIME=$(date +'%R, %a %e %b')
#MIN=$(date +'%M')
#HR=$(date +'%I')
MIN=00
HR=12 .....

And since more than half of the script is debugging, it'd be helpful to see the output. You'll notice I've set it to always ring noon, which is the worst case scenario. Here's what I get when I run it from the terminal:

Code:
Time set to 12:00
Tolling: toll43, toll47, toll50, toll53, toll56, toll59, toll02, toll05, toll08, toll11, toll14, toll.
Run at 12:45, Sat 31 Jul, manually
End at Sat Jul 31 12:46:21 CDT 2010.
Nice 2.5 second pauses while it waits for mplayer to play the chime. Takes about a minute.

Here's what cron puts out:
Code:
Time set to 12:00
Tolling: toll06, toll06, toll06, toll06, toll06, toll06, toll06, toll06, toll06, toll06, toll06, toll.
Run at 12:45, Sat 31 Jul, from cron
End at Sat Jul 31 12:45:06 CDT 2010.

The whole thing is done in 6 seconds! Now, I know that it is able to invoke mplayer and find the audio files, because I get about 4 seconds of sound. For some reason, though, it doesn't wait to finish playing each file before moving on. You can see where I initially though adding a sleep command would help, I've also tried adding nohup to the crontab and the case statements, and I've tried adding '& echo "foo"' to the case statements.

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

Ubuntu :: Control Duplicates In Bash History?

Oct 19, 2010

I have tried a combination of the following lines in .bashrc to try and control duplicates in the bash history file:

export HISTCONTROL=ignoreboth
export HISTCONTROL=erasedups
export HISTCONTROL=ignoredups

[code]....

View 5 Replies View Related

General :: Bash Out Of Control ?

Jul 15, 2010

I created a system restore file.

code:

And hav tried out:

Code has been streaming past for ages. Longer than a fresh install!

I'm wondering if i've done something to create a cycle?

How and should i interupt it? If i ctl alt F7, will it take me back to Desktop?

View 6 Replies View Related

Software :: Running MPlayer DVDnav Option From Command Line?

Jun 27, 2010

I am having a problem with running the mplayer dvdnav option from the command line or terminal. I run the command and this is what I get:

mplayer -nocache dvdnav://1 /media/CDROM /dev/scd1
MPlayer SVN-r1.0~rc3+svn20090426-4.4.3 (C) 2000-2009 MPlayer Team
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing dvdnav://1.
No stream found to handle url dvdnav://1
Playing /media/CDROM.
File not found: '/media/CDROM'
Failed to open /media/CDROM .....

I went on the forums and they say that some of the packages built to support dvdnav are out of date and that they should be updated. By the way I am running ubuntu 10.04 lucid lynx with lxde as my desktop manager.

View 3 Replies View Related

Ubuntu :: Control Line In Volume In Bash/python?

Nov 14, 2010

How do i do to:1. Check if there is a audio source plugged in via line in?2. Control the volumeI want to do it through either bash or python script.

View 1 Replies View Related

Debian :: Control Lynx By Bash Script

Sep 10, 2010

I had tried to control lynx by bash script. I can use bash script to let lynx open an url. After that, I can't do anymore. I don't understand how to move the cursor or fill some textbox in the webpage opened by linx in bash script.

View 3 Replies View Related

General :: Flow Control In Bash Pipe?

Jul 25, 2010

Two processes are communicating through a pipe: A | B. A is writing data faster than B is reading it in. Is there any way to have A limit its writing rate to match B's reading rate?

AFAIK the pipe will get full, and will make A's writing block, waiting for B to read in more data. But is there a way to limit A's writing rate before the pipe fills up? (In a way it's like having a pipe with a really small capacity, but as far as I know pipe capacity is a constant compiled into the kernel.)

Code:

EXAMPLE FOR CLARIFICATION

Right now the command is printing out the following in 1-second intervals:

But with flow control it should print out (again in 1-second intervals):

...since "date" would block on the writing loop due to the slow reading loop.

View 4 Replies View Related

Software :: Bash Input Control - Different Numbers ?

Mar 18, 2011

I'm making an bash script.

As input you can input different numbers from 1 to 3.

Depending from the input a text shows up.

View 2 Replies View Related

Programming :: Bash - How To Control Output Style?

Aug 24, 2009

For example,I have three paragraphs,as following:

I want to output it as following:

View 2 Replies View Related

Programming :: Bash Background - & - With Control Operators -&&

Feb 11, 2009

I have a set of files to copy and decompress, and want to do these operations concurrently with a script.

Manually it would be something like:

Code:

The single & is intended to background the processes, while the && is intended to execute the gzip process if and only if the cp completes successfully.

My script is:

Code:

When I run it, bash gets angry with the following error:

Code:

So what is the proper syntax to accomplish this?

View 1 Replies View Related

Programming :: Using A Variable To Control A BASH For Loop

Jul 3, 2009

I know of 4 different ways to use a for loop:

1. for I in {1..10}; do echo $I; done|

2. for I in 1 2 3 4 5 6 7 8 9 10; do echo $I; done|

3. for I in $(seq 1 10); do echo $I; done|

4. for ((I=1; I <= 10 ; I++)); do echo $I; done

I have a script which uses the 1st form of for loop. I'm trying to modify it to use a variable instead of a static hard-coded value in the section that controls the looping.of the for loop.

I've tried all different ways of quoting and escaping the variable, and the problem is that the quoting chars and escape char are being translated and passed into the loop along with the value stored in the variable.

For example, to change the start value of 1 to whatever value I want passed in through a variable:

Change:

I have tried: {{$a}..10} and {`$a`..10}, to have the variable evaluated first.

I have tried using the eval() function.

I have tried single and double quotes and the backslash escape character.

Nothing I've tried works. It's probably a syntax error.

View 14 Replies View Related

Fedora :: Bash - Binding A Function To Control-something Key Combo - F11

Aug 20, 2009

I want to set a key binding in bash for "history-search-backward" readline command to a combination of Control+some other key (I'm using 2 as an example), but I'm unable to do so. in fact, I'm unable to alter or add bindings to Control+key combinations.

After several tries my ~/.inputrc now looks like this

But it doesn't work and bind -p | grep "-2" gives nothing. If I try something without the control key:

I can search in the history by prssing the sequence C + - + 2.

bind -p gives control in C form, for example:

I've tried different formats in my inputrc:

But nothing works.

works if I press Escape followed by 2.

Setup:
Fedora 11:
Bash version 4.0.23(1)
GNU Readline 5.2 (according to the man page)

View 2 Replies View Related

Ubuntu :: Remote Control Daemon Not Running

Feb 15, 2010

I am trying to use my Apple Remote Controller that came with my iMac 4.1. I did some research and on the Ubuntu site it said that its possible with a application called Infrared Remote Controller. It detected from the hardrive which version I had etc but than a error message appeared on the bottom saying:

Warning: Remote control daemon not running.

How can I activate this? I included a screenshot!

View 1 Replies View Related







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