(Primitively) Run Rox 2.4.1 Without background (+dotpup)

How to do things, solutions, recipes, tutorials
Post Reply
Message
Author
User avatar
Dougal
Posts: 2502
Joined: Wed 19 Oct 2005, 13:06
Location: Hell more grotesque than any medieval woodcut

(Primitively) Run Rox 2.4.1 Without background (+dotpup)

#1 Post by Dougal »

Yesterday I read MU's comment to someone that he hadn't managed to hack Rox 2.4.1 to run without a background, so I got to thinking "why not use some other program for the pinboard?"
Due to my lack of knowledge the only other program I could think of was... the old rox.

I tried it and it worked!

Problems with this method:
1) Losing the advantages of the Rox 2.4.1 pinboard- like passing arguments to executables (no more "rxvt -rv"...).

2) You can't drag folders from a filer window to the desktop.
I've written a short script named "desktop" that can be added to the "send to" menu so you can choose "send to -> desktop" (sorry if this nomenclature cuases any flshbacks from another OS...)

3) If you link a folder, you will see an "executable" icon (instead of a "folder" icon) until you either (i) run my "refresh-pin" script (from the DotPup menu) or (ii) restart X.
(I tried adding the "refresh-pin" lines to the "desktop" script but it it did strange things so I gave up after a while...)

4) If you've alredy got a folder linked on the desktop, it'll open in the old rox. This can be fixed in the way "desktop" works, but it's much easier to just replace it with a new one...

Now, you can just install the attached dotpup or, if interested, look below how it's done. (If you download the dotpup you don't need the two scripts)
You need Rox 2.4.1 to be running already.
---------------------------------------------------------

Very simple:
-Copy /root/my-roxapps/ROX-Filer/rox-old to /usr/local/bin and rename it "pinboard".
-Open /root/.xinitrc and in line 108 change "rox -p" to "pinboard -o -p"

You can do those manually or in a terminal:

Code: Select all

# cp /root/my-roxapps/ROX-Filer/rox-old /usr/local/bin/pinboard
# echo "`sed "s/rox -p/pinboard -o -p/" /root/.xinitrc`" >/root/.xinitrc
(I used the -p in the sed command so that the "rox" in XFCE users' .xinitrc files don't get replaced)

Now restart X. There you go.

About my scripts:

The desktop script creates a folder /root/Choices/Desktop and into it places short scripts that contain "rox folder-to-open", then adds that script to the PuppyPin and globicons files and then refreshes the pinboard.

When you remove such a link from the desktop it only gets removed from PuppyPin. This just means that over time you'll get those little scripts accumulated and have globicons grow.
The dotpup installer appends /etc/rc.d/rc.local with a few lines to solve this.
Each script is checked against PuppyPin and if it's not there both it and it's entry in globicons are removed. Here:

Code: Select all

MYDESK=/root/Choices/Desktop
for SCRIPT in "$MYDESK"/*
do
   if ! cat /root/Choices/ROX-Filer/PuppyPin | grep -q "$SCRIPT"; then
     TARGET="  <rule match=\""$SCRIPT"\">"
     NUM="`grep -n "$TARGET" /root/Choices/ROX-Filer/globicons | cut -d: -f1`"
     sed ""$NUM"d" /root/Choices/ROX-Filer/globicons | sed ""$NUM"d" | sed ""$NUM"d" >/tmp/globicons
     mv -f /tmp/globicons /root/Choices/ROX-Filer/globicons
     rm -f "$SCRIPT"
   fi
done
(Sorry about the crudeness, but I don't know awk.. also, an "if [ "$NUM" != "" ]" might be good before the sed line)

Now, MU, any chance of a hacked version of Rox 2.4.1 without the entire "pinboard" part? It could make the binary smaller...
Attachments
pinboard-changer.pup
(6.34 KiB) Downloaded 323 times
desktop.gz
(466 Bytes) Downloaded 352 times
refresh-pin.sh.gz
(202 Bytes) Downloaded 369 times

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#2 Post by MU »

good work :D
Added it here:
http://forum.puppylinux.net/viewtopic.php?p=460#460

I think removing the pinboard from the source would not be trivial, as it is included in several files. Might be possible, but I currently have other projects to finish...

Mark

Post Reply