You are not logged in.

#1 2012-07-03 19:28:49

lspci
Member
From: Virginia, USA
Registered: 2012-06-09
Posts: 242

Share how you keep Skype running

I thought that it would be helpful for a lot of people if there was a thread written with the sole purpose of depicting ways to address Skype run-time issues, like how to keep Skype running despite its tendency to crash without having to manually restart it. 


So, for the most part, try to only post comments--by comments I mean posts, I just didn't want to be redundant and say 'post posts'--that address some specific thing that you were trying to get Skype to do like

  • Webcam support

  • Sound Server support

  • or V4Linux support (if that's not exactly the same thing as webcam support)

and how you were able to get Skype to do it.  Please, do not post answers to unresolved, or otherwise partially fixed support, problems.  This is a place to share helpful, useful, and (at least mostly) automatic scripted workarounds.  The scripts can be in any programming language, not just scripting ones, although scripting ones are best suited for this kind of thing. 

As to what I mean by 'partially fixed problems': I'm talking about problems that still require user intervention in order to keep the problem-fixing-script going.  Like, every time the script finishes running, you have to manually restart it.  This is different from a mostly automatic script that has to be started by the user (as opposed to being started by the system at start-up or when X is initiated), but that once started continues to run until the user forcibly terminates it.  Like 'killall -s KILL myscript.sh', for example. 

I'll start off by posting a script that I use to handle a webcam support problem that I have with Skype.

(Note, this is my first attempt at a really big thread/post, so I'm just keeping my fingers crossed because doing something like this is rather intimidating for me, a forum-newbie.  smile)

Last edited by lspci (2012-07-03 19:39:49)


Please don't be a help vampire. | Bitbucket

Give a little more for a little less today.  smile

Offline

#2 2012-07-03 19:35:17

lspci
Member
From: Virginia, USA
Registered: 2012-06-09
Posts: 242

Re: Share how you keep Skype running

I'm still using the beta version of Skype, that is version 2.2.0.35; it crashes every now and again because I have to run it with a v4l preload--its crashes seem to have a domino effect on itself, in that if it crashes once then it's twice as likely to immediately crash again.  So here's my little workaround that keeps Skype going; I hope that somebody will find it useful or will have some suggestions for how I can make it run better. 

## ensur.sh -- ENsure Skype continUes Running ##
 ## an answer to the continual crashes brought on by loading skype as 'LD_PRELOAD=/usr/lib32/libv4l/v4l1compat.so skype &' ##
## Coded by DeFfunc't95 ##
#clear
echo
echo
echo "IS SKYPE RUNNING"
if top -n2 | grep "skype" ; then
	echo "";
	echo "							[T]";
	echo "EXITING NOW...";
        echo ;
	echo ;
	exit ;

else 	echo ;
	echo "							[F]";
	echo ;
	echo "STARTING UP SKYPE WITH PRELOAD" ; # the preload is necessary in order
    ## for webcam support to be enabled, or so it seems.  
	echo ;
	echo ;
        LD_PRELOAD=/usr/lib34/libv4l/v4l1compat.so skype ; 
	################
	# This mapping will need to be changed according to where ensur.sh 
	#>> actually is.  
	sh ~/:B/ensur.sh ;	# the mapping

fi

My script works extremely well, most of the time.  Whenever Skype crashes because of a preload error, it just starts Skype right back up again.  smile  However, it isn't so great at being able to tell the difference between when Skype is actually running and when it isn't.  In fact, 9 times out of 10, if Skype is already running and I start up my little 'ensur-skype' script: my script will start Skype up anyhow regardless of whether Skype is already running or not.  And I think it's because of my usage of

if top -n2 | grep "Skype" ; then ... 

  When I actually just run 'top -n2 | grep "skype"' in the terminal, it rarely actually manages to grep Skype from top, but I really don't know of any other way to determine whether Skype is already running.  Any suggestions as to how to check for a Skype run-time without risking the possibility of starting two instances of Skype in the process?

Last edited by lspci (2012-07-03 19:36:46)


Please don't be a help vampire. | Bitbucket

Give a little more for a little less today.  smile

Offline

#3 2012-07-05 09:20:13

Isola
Member
Registered: 2010-02-02
Posts: 99

Re: Share how you keep Skype running

lspci wrote:

snip

if top -n2 | grep "Skype" ; then ... 

  When I actually just run 'top -n2 | grep "skype"' in the terminal, it rarely actually manages to grep Skype from top, but I really don't know of any other way to determine whether Skype is already running.  Any suggestions as to how to check for a Skype run-time without risking the possibility of starting two instances of Skype in the process?

if pidof Skype ; then
   echo "Skype is running"
else
   echo "Skype is not running"
fi

edit: I don't know the exact name of the process, but you can check that in top

Last edited by Isola (2012-07-05 09:21:27)

Offline

Board footer

Powered by FluxBB