site  contact  subhomenews

Xsane: remove run-as-root warning

January 22, 2013 — BarryK
Xsane has a running-as-root warning dialog at startup. I have always removed that from the source and created a PET.

However, now the official Xsane package of the compatible-distro (ex: Ubuntu repos in case of Precise Puppy) can be used.
If the official package is chosen to be builtin with Woof, the file FIXUPHACK in the xsane template will modify the xsane binary executable. If the user uses the Puppy Package Manager to install an official Xsane package in a running Puppy, the script /usr/local/petget/hacks-postinstall.sh will remove the warning.

Here is the relevant portion in hacks-postinstall.sh:
 xsane*) #130122

#xsane puts up a warning msg at startup if running as root, remove it...
#this code is also in file FIXUPHACK in xsane template (in Woof).
#WARNING: this may only work for x86 binary.
if [ -f /usr/bin/bbe ];then #bbe is a sed-like utility for binary files.
if [ -f /usr/bin/xsane ];then
bbe -e 's/\x6b\x00getuid/\x6b\x00getpid/' /usr/bin/xsane > /tmp/xsane-temp1
mv -f /tmp/xsane-temp1 /usr/bin/xsane
chmod 755 /usr/bin/xsane
fi
fi
;;


Not sure, it might be OK for arm binary also.

Woof commit:
http://bkhome.org/fossil/woof2.cgi/info/ce9fd71f75

Comments

New 8G/1G MeLe Family


Re Mele A1000
Username: BarryK
"I have got the Mele setup on my desk, that's what I have been compiling on recently, creating some armv7 PETs. I am running the Ubuntu image that was originally provided. I did a quick look, disappointed that no-one has really "run with the ball" for Linux on the Mele. The latest work seems to be back in June/July 2012. I don't recall all the problems -- I do recall a problem with the sata interface (it didn't work). I subscribe to the Rhombus-Tech mail list, and I don't recall any posts about later versions of Linux that fix the sata and other problems.

Re EZOPower
Username: BarryK
"Ted Dog, Yes, it looks nice: http://www.amazon.com/EZOPower-High-capacity-Rechargable-10000mAh-Blackberry/dp/B005XQSN9G

Test post
Username: DrOwl2
"'DrOwl2' has registered for the blog.

Foxconn bribery
Username: don570
"ZDNet article.... Foxconn Technology Group is cooperating with Chinese authorities to investigate claims of employees accepting bribes from supply chain partners. In a statement to ZDNet, the manufacturer said law enforcement officials had been brought in to work with its internal audit team as part of the probe into the illegal practices. The comments come after a report by Taiwan's Next Magazine claimed a Foxconn manager was arrested for seeking bribes from local suppliers.

probepart bug
Username: 01micko
"With newer kernels, [u]audio[/u] cd's are handled a bit differently in /proc/partitions. As a consequence they are not showing an icon on the rox desktop. Here is a proposed patch, (the first part is basically irrelevant, as I thought maybe the bug was a missing space.) [code]--- probepart.orig 2013-01-25 08:48:49.393357681 +1000 +++ probepart 2013-01-25 08:48:09.796689059 +1000 @@ -92,7 +92,7 @@ if [ "$FSTYPE" = "iso9660" ];then opticalPATTERN='^/dev/'"$DEVICE" if [ "`grep "$opticalPATTERN" /proc/mounts`" = "" ];then - cddetect_quick -d/dev/${DEVICE} >/dev/null 2>&1 #very fast. + cddetect_quick -d /dev/${DEVICE} >/dev/null 2>&1 #very fast. #...returns 0 if disc inserted, else 255. [ $? -ne 0 ] && FSTYPE="unknown" fi @@ -122,7 +122,12 @@ #[ "$FSTYPE" = "" ] && FSTYPE="unknown" #for compatibility with old probepart from antonio gallo... - [ "$FSTYPE" = "unknown" ] && FSTYPE="none" + if [ "$FSTYPE" = "unknown" ];then #130124 + cddetect_quick -d /dev/${DEVICE} &>/dev/null + if [ "$?" = 0 ];then FSTYPE="iso9660" + else FSTYPE="none" + fi + fi [ "$FSTYPE" = "udf" ] && FSTYPE="iso9660" #120601 jemimah: mount udf as iso9660. [ "$SUNITS" = "" ] && SIZE=$(($SIZE*2)) #want 512 byte blocks. [/code] re: http://murga-linux.com/puppy/viewtopic.php?p=679757#679757 tlc and brown_mouse have reported it on IRC too.

Off topic Woof BABYBUILD
Username: jrb
"Hi Barry, I was just using the 4babybuild script in woof of 19Jan2013 and noticed it didn't work with 3.xxxx kernels. Looking deeper I saw line 19[code]KERNELVER="`ls -1 rootfs-complete/lib/modules | grep '^2' | head -n 1`"[/code]limited it to the 2.xxxx series kernels so I changed it to[code]KERNELVER2="`ls -1 rootfs-complete/lib/modules | grep '^2' | head -n 1`" KERNELVER3="`ls -1 rootfs-complete/lib/modules | grep '^3' | head -n 1`" if [ ! $KERNELVER2="" ] then KERNELVER=$KERNELVER2 else KERNELVER=$KERNELVER3 fi[/code]Seems to work fine with both sets of kernels now. Cheers, J BTW: it removed an impressive 17MB from my ISO

Xsane fix - thanks
Username: disciple
"Thanks for the script, That warning nonsense is rather annoying in other distros, but I don't scan enough to have bothered sorting it out!


Tags: woof