LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 05-24-2008, 12:37 AM   #1
M$ISBS
Member
 
Registered: Aug 2003
Posts: 834

Rep: Reputation: 30
Is it possible to stop multilple instances of Xine?


Every video I open in xine opens an new instance of xine. Is there a way to make it open only one instance?
OR..........

Anyone know a way of creating a desktop icon to run the "killall xine" command?

Thank you...........
 
Old 05-24-2008, 03:58 AM   #2
General Failure
Member
 
Registered: Jan 2007
Location: Germany
Distribution: Slackware 13.37
Posts: 387

Rep: Reputation: 37
You could use a script for that or just use
Code:
konsole -e 'killall xine'
in KDE. Should be similar in other environments.
 
Old 05-25-2008, 04:31 PM   #3
M$ISBS
Member
 
Registered: Aug 2003
Posts: 834

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by General Failure View Post
You could use a script for that or just use
Code:
konsole -e 'killall xine'
in KDE. Should be similar in other environments.
Will that work from a desktop icon? I usually do use the console and the killall xine command but I need to do it with the mouse.
Thanks.
 
Old 05-25-2008, 05:18 PM   #4
shadowsnipes
Senior Member
 
Registered: Sep 2005
Distribution: Slackware
Posts: 1,443

Rep: Reputation: 73
Quote:
Originally Posted by M$ISBS View Post
Will that work from a desktop icon? I usually do use the console and the killall xine command but I need to do it with the mouse.
Thanks.
You can run any command from a .desktop file. pkill xine would do what you need as well.

You could even assign a keyboard shortcut to this command so you don't even have to click anything or open a terminal.

Finally, you may be able to use something like wmctrl in a script to make sure that only one instance of xine is used (ie. you keep reusing the one instance). Here is a link with an example of this.

http://fluxbox-wiki.org/index.php/Ke...s#Using_wmctrl

You should also check if xine has a setting to make sure only one instance is opened. I don't use xine, so I don't know if it has this.
 
Old 05-25-2008, 09:59 PM   #5
T3slider
Senior Member
 
Registered: Jul 2007
Distribution: Slackware64-14.1
Posts: 2,367

Rep: Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843
Quote:
Originally Posted by shadowsnipes
You should also check if xine has a setting to make sure only one instance is opened. I don't use xine, so I don't know if it has this.
I'm definitely no xine expert, but a quick look through the settings menu (with "Configuration experience level" set to "Master of the known universe"...seriously. ) didn't find much.
Quote:
Originally Posted by shadowsnipes
Finally, you may be able to use something like wmctrl in a script to make sure that only one instance of xine is used (ie. you keep reusing the one instance). Here is a link with an example of this.
That is nifty, but I don't think it'll accomplish the correct result. That checks to see if xine is running, and if it is, it just switches to the desktop running xine. Although very nifty, it won't actually close xine and open another instance with the desired video (I'm assuming the videos are being launched from an external application like Konqueror or Dolphin or something) -- it'll just display the already-running instance of xine, requiring you to go open the video from xine's menu instead of switching to the desired video. A better solution, I think, would be to create a file association that runs a script that kills any xine instances and then launches the video with xine. You could create a script like the following:
Code:
#!/bin/sh
pkill xine
xine $1
If you're using KDE, you can set file associations in "Control Center">"KDE Components">"File Associations". Look for all of the video formats you want to use and add an application (navigate to your script using the browse dialog). Make sure your script is executable (run `chmod +x scriptname.sh`). I tested the above little script and it does the job. It will of course work with any DE/WM as long as you can set the file associations. This is all assuming that you are launching the videos from an external application. Opening a new video in xine after watching another one seems to work fine without opening another instance.
 
Old 05-26-2008, 03:03 AM   #6
General Failure
Member
 
Registered: Jan 2007
Location: Germany
Distribution: Slackware 13.37
Posts: 387

Rep: Reputation: 37
Quote:
Originally Posted by M$ISBS View Post
Will that work from a desktop icon? I usually do use the console and the killall xine command but I need to do it with the mouse.
Thanks.
Yes it will.
 
Old 05-28-2008, 07:24 AM   #7
silentmaster
LQ Newbie
 
Registered: Jan 2008
Location: Cornwall, England
Distribution: Slackware 12.0
Posts: 3

Rep: Reputation: 0
When I use Midnight Commander to browse through video files I like to have every file start
in the same xine window, this is the command i use:

xine -g -l -G 320x240 -S session=0,pl=clear,mrl=%d/%f

where %d is directory and %f is the file name.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mutiple instances of xine slowing down system, how can I set only one? M$ISBS Linux - Newbie 3 03-12-2008 11:29 PM
openoffice.org writer --multilple people edit a doc? rsmccain Linux - Software 3 01-19-2007 03:49 PM
Multiple instances of Xine shreks Linux - Software 4 12-27-2006 11:35 AM
ubuntu 5.10 x86_64: mplayer/xine/... stop playing video after a couple of frames Tinkster Ubuntu 2 01-10-2006 01:13 PM
Blocking multiple instances of xine lixy Linux - General 2 03-31-2005 09:09 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration