From 5dc0776c46b4057e83a8414549b293a40028c04a Mon Sep 17 00:00:00 2001 From: Konstantin Dmitriev Date: Wed, 7 Apr 2010 22:23:43 +0700 Subject: [PATCH] Fix synfigstudio binary path detection in CPH monitor --- synfig-studio/synfigstudio-cph-monitor | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/synfig-studio/synfigstudio-cph-monitor b/synfig-studio/synfigstudio-cph-monitor index 6dcc2bc..590d3c5 100755 --- a/synfig-studio/synfigstudio-cph-monitor +++ b/synfig-studio/synfigstudio-cph-monitor @@ -1,7 +1,8 @@ #!/bin/bash # Synfig Crash Monitor script -# Copyright (c) 2009 Konstantin Dmitriev +# Copyright (c) 2009-2010 Konstantin Dmitriev +# # This package is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of @@ -124,7 +125,7 @@ mainloop() STARTED=1 RUNTIME=0 #get version - P=$(ps --no-headers -f -Csynfigstudio |egrep "^`whoami`" | tr -s ' '| cut -d ' ' -f 8) + P=$(ps --no-headers -Csynfigstudio -o uid,cmd |egrep "^ *`id -u`" | egrep -v "" | tr -s ' ' | sed "s|^ *`id -u` *||" | sed "s|/bin/sh *||" | head -n 1) echo if [ ! -e $P ]; then P=`which $P` -- 2.7.4