Junk With Picasa


Junk With Picasa

Berawal dari keinginan saya untuk membuat OpenOffice mampu seperti Microsotf Office 2007 yang bisa di pake upload langsung ke blog,karena hal ini yang membuat banyak bloger menggunakan Office 2007,nah saya sedikit cemburu dengan hal tersebut,yang tidak lain karena OpenOffice yang saya punya tidak bisa begitu😀
Kebetulan sedang tidak ada kerjaan A.K.A menganggur dan iseng iseng install picasa,untuk show gambar dalam skala banyak, yang tidak jauh beda dengan p-sphot,kuickshow ,KghostView dll😀.Setahu saya dengan picasa kita bisa upload photo langsung ke http://picasaweb.google.co.id,atau bisa langsung upload ke blog.
Ups… tapi sebelum saya jalanin picasa setelah saya install,ada sedikit crash dengan kiba-dock hingga membuat saya harus Kill kiba-dock yang sudah jelas saya pakai terminal dengan perintah #ps ax,ada hal yang membuat saya terheran-heran dengan hasil ps ax saya kali ini,yang tidak lain adalah system32 saya terbuka,seingat ku tidak pernah saya install wine ataupun aplikasi yang basis nya windows😀
ini sebagian hasil ps ax yang membuka system32 windows😀
7479 ?        Sl     0:00 C:\windows\system32\services.exe
7481 ?        Sl     0:00 C:\windows\system32\winedevice.exe MountMgr
7488 ?        Sl     0:00 C:\windows\system32\winedevice.exe PxHelp20
7584 ?        Ssl    2:23 c:\Program Files\Google\Picasa3\Picasa3.exe
7589 ?        Ss     0:00 C:\windows\system32\explorer.exe /desktop
ternyata dan ternyata ini karena picasa yang saya install,padahal extensi picasa yang saya install adalah deb.
Cukup sampai disini tentang windows32😀
sebenarnya yang saya inginkan adalah:edit picasa biar bisa upload photo ke facebook,wordpress.Oleh karena keinginan saya ini maka saya berusaha untuk mencari file picasa yang sudah di install ke dalam mesin laptop ku,jika ketemu maka niscaya akan saya modivikasi source nya,,,,,**belaga pintar**
setelah mencoba locate picasa,akhirnya ketemu juga dengan file picasa,yang tidak lain bericon layang-layang,dengan arti,itu adalah file program
Pok….Pok….Pok….POk
saya berhasil menemukan nya😀 setelah bertemu maka tidak lah asik jika tidak berkenalan dengan nya😛
okeh saya buka dengan GEANY(program compailer java) program picasa tersebut,berhasil terbuka.Berikut isi source nya

close_splash() {
if [ -n “$SPLASH_PID” ]; then
kill “$SPLASH_PID” > /dev/null 2>&1
SPLASH_PID=””
fi
}

splash_on() {
if [ -n “$SPLASH_PID” ]; then
kill -10 “$SPLASH_PID” > /dev/null 2>&1
fi
}

splash_off() {
if [ -n “$SPLASH_PID” ]; then
kill -12 “$SPLASH_PID” > /dev/null 2>&1
fi
}

trap cleanup HUP INT QUIT ABRT TERM EXIT
cleanup() {
set +ex
close_splash
}

# Locate where our root is installed by looking for the directory
# where this script is located, unwinding symlinks on the way
locate_pic_root()
{
if [ -z “$PIC_ROOT” ]
then
argv0=`which “$0″`
[ -z “$argv0″ ] && argv0=”$0”
echo “$argv0” | egrep “^/” >/dev/null
if [ $? -ne 0 ]
then
argv0=”`pwd`/$argv0″
fi
dir=`dirname “$argv0″`
while [ ! -x “$dir/../wine/bin/wine” ]
do
[ ! -h “$argv0” ] && break
argv0=`ls -l “$argv0” | sed -e ‘s/^.*-> //’`
echo “$argv0” | egrep “^/” >/dev/null
if [ $? -ne 0 ]
then
argv0=”$dir/$argv0″
fi
dir=`dirname “$argv0″`
done
dir=`echo “$dir” | sed -e ‘s%\(/\.\)*$%%’ -e ‘s%\(/\./\(\./\)*\)%/%’`
PIC_ROOT=”$dir/..”
PIC_BINDIR=”$dir”
fi
if [ ! -x “$PIC_ROOT/wine/bin/wine” ]
then
if [ “$1” = “–no-fail” ]
then
PIC_ROOT=””
return 1
fi
echo “`basename \”$0\”`:error: could not find wine/bin/wine in ‘$PIC_ROOT'” >&2
exit 1
fi
# Make sure it’s exported
export PIC_ROOT
export PIC_BINDIR
return 0
}

need_to_add_picasa_handler()
{
PICASA_ABSPATH=`which picasa`
# look for Mozilla/Firefox profiles
find -L ~/.mozilla -mindepth 3 -maxdepth 3 -name prefs.js 2> /dev/null | while read MOZPROFILE
do
USER_JS=`dirname “$MOZPROFILE”`/user.js
egrep -qs ‘^user_pref\(“network\.protocol-handler\.external\.picasa”, true\)’ “$USER_JS”
if [ $? -gt 0 ] ; then
return 1
fi
egrep -qs “^user_pref\(\”network\.protocol-handler\.app\.picasa\”, \”$PICASA_ABSPATH\”” “$USER_JS”
if [ $? -gt 0 ] ; then
return 1
fi
done
}

add_picasa_handler_to_mozilla()
{
# look for Mozilla/Firefox profiles
PICASA_ABSPATH=`which picasa`
find -L ~/.mozilla -mindepth 3 -maxdepth 3 -name prefs.js 2> /dev/null | while read MOZPROFILE
do
USER_JS=`dirname “$MOZPROFILE”`/user.js
egrep -qs ‘^user_pref\(“network\.protocol-handler\.app\.picasa”,’ “$USER_JS”
if [ $? -gt 0 ] ; then
# add picasa handler if it does not exist
echo “user_pref(\”network.protocol-handler.app.picasa\”, \”$PICASA_ABSPATH\”);” >> “$USER_JS”
else
# If it exists, make sure the correct app path is set.
sed -i -e “s,\(user_pref(\”network\.protocol-handler\.app\.picasa\”\).*,\1\, \”$PICASA_ABSPATH\”);,” “$USER_JS”
fi

egrep -qs ‘^user_pref\(“network\.protocol-handler\.external\.picasa”,’ “$USER_JS”
if [ $? -gt 0 ] ; then
echo “user_pref(\”network.protocol-handler.external.picasa\”, true);” >> “$USER_JS”
else
sed -i -e “s,\(user_pref(\”network\.protocol-handler\.external\.picasa\”\).*,\1\, true);,” “$USER_JS”
fi
done
}

locate_pic_root

# Show the splash screen before any lengthy processing (e.g. Wine first run).
“$PIC_BINDIR/picasasplash” &
export SPLASH_PID=”$!”

WINEPREFIX=”$HOME/.google/picasa/3.0″
if [ -n “$PICASA_WINEPREFIX” ] ; then
# User specified a prefix in the environment, use it
WINEPREFIX=”$PICASA_WINEPREFIX”
fi

# Check for the 32-bit OpenSSL libs that Picasa needs.
if [ “`uname -m`” = “x86_64″ ] ; then
SSLSETUP=”$PIC_BINDIR/repackage32.sh”
SSLPROMPT=”Many online features of Picasa will not work
until you install a 32-bit version of OpenSSL.
If you skip this step, you can perform it later by running:
$SSLSETUP openssl
For additional assistance, please visit:
http://groups.google.com/group/Google-Labs-Picasa-for-Linux

Would you like to install 32-bit OpenSSL now?”
“$SSLSETUP” -p “$SSLPROMPT” openssl

MDNSFIX=”$PIC_BINDIR”/mdns.sh
MDNSPROMPT=”
With certain 64-bit Linux configuration, you may not be
able to access Picasa’s internet features unless you install
the lib32nss-mdns package.

If you skip this step, you can perform it later by running:
$MDNSFIX
For additional assistance, please visit:
http://groups.google.com/group/Google-Labs-Picasa-for-Linux

Would you like to install the lib32nss-mdns package now?

“$MDNSFIX” -p “$MDNSPROMPT” -c “$WINEPREFIX/.mdnsfix”
fi

# Try to avoid Wine crashes due to font problem, as described at:
# http://www.codeweavers.com/support/wiki/faq/fontissues
BADVER=”Version 0.1.20060928″
FONTVER=$(WINEDEBUG=1 “$PIC_BINDIR”/wrapper winedumpfontver.exe.so “AR PL ZenKai Uni” 2> /dev/null)
rc=$?
if [ $rc -eq 42 ] ; then
exit 1
fi
FONTVER=$(echo $FONTVER | grep “^winedumpfontver: Version” | cut -d” ” -f 2-)
if [ $rc -eq 0 ] && [ “$FONTVER” = “$BADVER” ]; then
FONTFIX=”$PIC_BINDIR”/fontinstall.sh
FONTPROMPT=”
You have a version of the ukai.ttf font which is known to cause problems with
Picasa. A Picasa-compatible version of the font can be
installed automatically.  This will only affect Picasa, and will not
change the font currently installed on your system.

If you skip this step, you can perform it later by running:
$FONTFIX
For additional assistance, please visit:
http://groups.google.com/group/Google-Labs-Picasa-for-Linux

Would you like to install the updated font now?

“$FONTFIX” -p “$FONTPROMPT” -d “$PIC_ROOT/wine/drive_c/windows/fonts” \
-c “$WINEPREFIX/.fontfix”
fi

# Try to avoid having a missing “My Pictures” directory
“$PIC_BINDIR”/wrapper check_dir.exe.so

# Check log and look for hanging Picasa process
picasa_hung=0
if [ -f “$WINEPREFIX/picasa.log” ] ; then
WAIT=`tail -n 2 “$WINEPREFIX/picasa.log” | grep -a “wait timed out in thread” | wc -l`
if [ -n “$WAIT” ] ; then
if [ “$WAIT” -eq “2” ] ; then
picasa_hung=1
fi
fi
fi

if [ -z “$EUID” ] ; then
IDPROG=$(which id)
if [ $? -eq 0 ] ; then
EUID=$(id -u)
fi
fi

if [ “$picasa_hung” = “0” ] ; then
# Check if Picasa is still lingering around in a zombie state
PICASA_PIDS=`ps -o pid –no-headers -C Picasa3,Picasa3.exe`
for p in $PICASA_PIDS ; do
zombiecheck=`ps -o stat –no-headers -p $p | grep Z`
peuid=`ps -o euid –no-headers -p $p`
if [ -n “$zombiecheck” -a -n “$peuid” ] ; then
if [ “$EUID” -eq “$peuid” ] ; then
picasa_hung=1
break
fi
fi
done
fi

if [ “$picasa_hung” = “1” ] ; then
# This does not affect the current script
“$PIC_BINDIR/killpicasa” –force
fi

# First, scrape the theme from the environment, if we can
# “$PIC_BINDIR”/wrapper wdi SCRAPETHEME

# Do browser integration
need_to_add_picasa_handler
if [ $? -gt 0 ] ; then
add_picasa_handler_to_mozilla

# is the browser running?
ps -C firefox-bin,mozilla-bin > /dev/null
if [ $? -eq 0 ] ; then
# let users know the change will take effect on the next restart
splash_off
“$PIC_BINDIR”/wrapper browser_prompt.exe.so
splash_on
fi
fi

# set internal browser language setting
“$PIC_BINDIR”/wrapper set_lang.exe.so

# Next is the “real” Picasa UI, so done with the splash.
close_splash

# Then, actually run Picasa
exec “$PIC_BINDIR”/wrapper license.exe.so  /gate “c:\Program Files\Google\Picasa3\Picasa3.exe” “$@”

Pantas saja buka system 32,ternyata memang ini program windows yang kemudian di deb kan n berjalan dengan platform windows,hanya saja di linux membutuhkan library dari wine,yang walaupun anda tidak menginstall wine,program ini membawa library wine sendiri,hingga anda tidak perlu install wine dulu bari install picasa😀
saya tidak merekomendasikan untuk memakai picasa,karena program ini lumayan makan resource memori😀
maklum saja lah!bukan aseli platform linux😀

6 thoughts on “Junk With Picasa

  1. maap, ngomentari alinea pembuka:
    posting blog dari OpenOffice????
    langsung saja install Sun Weblog Publisher, trus msk ke OOo; tool>option>internet>weblog… atur di situ… beres deh! *utk OOo 2.4 dan sesudahnya*
    reff: itempoeti.wordpress.com sudah sering gunakan itu…

    • saatulihsan says:

      @andy.web.id ini dia inih yang saya tunggu ! saran dan pendapat nya bila perlu nulis tutorial di komen nya!
      thanks kk,,,segera di tindak lanjuti

    • saatulihsan says:

      @pradna kayak nya itu sudah di tulis dech sama om @ho-oh yang di plurk tapi saya lupa linkz nya😛
      coba nanti ta cariin dech😀

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s