rox with transmision bar ??

Using applications, configuring, problems
Message
Author
User avatar
pp4mnklinux
Posts: 375
Joined: Fri 23 Aug 2013, 06:56

rox with transmision bar ??

#1 Post by pp4mnklinux »

Hello everybody:

I uninstalled a lot of programs to make my puppy faster, and I deleted PCMANFM, now my default archive manager is ROX, but although it is really fast I miss one option o pcmanfm, that is, when copying or moving files, appears a progression bar, that doesnt appears with ROX.

Is there any option to make it appears??


-------------------------------------
I wanna know how many time I must wait.


THANKY
Distro: xenialpup64 7.5 XXL
Desktop Panel: JWM ~ FbBox 5.0

User avatar
Semme
Posts: 8399
Joined: Sun 07 Aug 2011, 20:07
Location: World_Hub

#2 Post by Semme »

You've got a few ideas starting here. Please read the comment that follows immediately afterwards..

https://github.com/acourreges/minicopie ... -MacOS.tar
>>> Living with the immediacy of death helps you sort out your priorities. It helps you live a life less trivial <<<

User avatar
pp4mnklinux
Posts: 375
Joined: Fri 23 Aug 2013, 06:56

THANKS A LOT

#3 Post by pp4mnklinux »

THANKY
Distro: xenialpup64 7.5 XXL
Desktop Panel: JWM ~ FbBox 5.0

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#4 Post by Mike Walsh »

CatDude's link is, unfortunately, dead. However, you can d/load this directly from the developer's website, here:-

http://www.adriancourreges.com/projects ... dl-section

Just in case anybody else is interested, like. Thanks for that, Semme; I'm going to take a gander at this myself.....looks quite nifty!

(I already have Java installed for quite a number of things, so it's no extra overhead for me.)

EDIT:- Sorry, mate; looks like I duplicated your link, too! :oops:


Mike. :wink:

User avatar
Semme
Posts: 8399
Joined: Sun 07 Aug 2011, 20:07
Location: World_Hub

#5 Post by Semme »

No worries, Mike. We're all <from time to time> guilty of "skimming." :D:wink:
>>> Living with the immediacy of death helps you sort out your priorities. It helps you live a life less trivial <<<

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#6 Post by greengeek »

ROX does actually have a progress bar. See attached pic. Don't you see this on your ROX when copying multiple big files?
Attachments
ROXProgressBar.jpg
(36.15 KiB) Downloaded 325 times

User avatar
ally
Posts: 1957
Joined: Sat 19 May 2012, 19:29
Location: lincoln, uk
Contact:

#7 Post by ally »


User avatar
pp4mnklinux
Posts: 375
Joined: Fri 23 Aug 2013, 06:56

NO BAR

#8 Post by pp4mnklinux »

no bar, MUST BE OTHER VERSION
Attachments
image-1.png
(87.3 KiB) Downloaded 287 times
Distro: xenialpup64 7.5 XXL
Desktop Panel: JWM ~ FbBox 5.0

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

Re: NO BAR

#9 Post by greengeek »

pp4mnklinux wrote:no bar, MUST BE OTHER VERSION
Apparently this progress bar only shows up when copying multiple items - not one large file.

Some interesting information here:
http://murga-linux.com/puppy/viewtopic. ... 057#993057

ITSMERSH

#10 Post by ITSMERSH »

greengeek wrote:ROX does actually have a progress bar. See attached pic. Don't you see this on your ROX when copying multiple big files?
greengeek wrote:
pp4mnklinux wrote:no bar, MUST BE OTHER VERSION
Apparently this progress bar only shows up when copying multiple items - not one large file.

Some interesting information here:
http://murga-linux.com/puppy/viewtopic. ... 057#993057
Yes.

Also it doesn't show a progress bar when copying a single directory containing multiple files.

User avatar
pp4mnklinux
Posts: 375
Joined: Fri 23 Aug 2013, 06:56

You are right

#11 Post by pp4mnklinux »

Hi:

As u said, it works with multiple files. Is there anyway to make it work with only one file??


THANKS
Distro: xenialpup64 7.5 XXL
Desktop Panel: JWM ~ FbBox 5.0

User avatar
Semme
Posts: 8399
Joined: Sun 07 Aug 2011, 20:07
Location: World_Hub

#12 Post by Semme »

Aside from pv and rsync, somebody could craft a script that opens a cmd window progress bar when ROX triggers a file copy, no?
>>> Living with the immediacy of death helps you sort out your priorities. It helps you live a life less trivial <<<

User avatar
Argolance
Posts: 3767
Joined: Sun 06 Jan 2008, 22:57
Location: PORT-BRILLET (Mayenne - France)
Contact:

#13 Post by Argolance »

Bonjour,
pp4mnklinux wrote:when copying or moving files, appears a progression bar, that doesnt appears with ROX.
I have very often regretted that this progress bar is not displayed and wondered why the developers of ROX made this choice. :roll:
Many users from Windows, to whom I recommend Puppy and who use it, also regret it. As suggested by perdido, if something could be done on this side, in coordination with :arrow: woodenshoe-w work.,, it would be great!

Cordialement.

User avatar
fabrice_035
Posts: 765
Joined: Mon 28 Apr 2014, 17:54
Location: Bretagne / France

#14 Post by fabrice_035 »

Hello,

Rox use "cp" command (located in /bin/) and cp command has no progress bar unlike rsync.

I think it is possible to integrate a progress bar to ROX and the easiest way would be to replace or link the command "cp" with a script (called cp too) that "rsync" coupled to gtkdialog in popup on ROX. (but there would be the disadvantage that the "cp" command will always be this script no matter when you need it)

Otherwise, to avoid replacing/linking cp in /usr/bin with a script, you must modify the cp call in ROX to point directly to a script.

But there may be other solutions.

Do you want us to try it first?

Regard
Bionicpup64-8.0 _ Kernel 5.4.27-64oz _ Asus Rog GL752

User avatar
fabrice_035
Posts: 765
Joined: Mon 28 Apr 2014, 17:54
Location: Bretagne / France

#15 Post by fabrice_035 »

Hey,

This is my modification of Rox-Filer, can show progress bar for individual file , work with rsync.

Image

Regard.
Bionicpup64-8.0 _ Kernel 5.4.27-64oz _ Asus Rog GL752

User avatar
fabrice_035
Posts: 765
Joined: Mon 28 Apr 2014, 17:54
Location: Bretagne / France

#16 Post by fabrice_035 »

Hi

This scripts show progress bar with ROX-Filer



1[EDIT] New version (1.1) now script use gtk progress bar, it's better because it uses GTK Theme
2[EDIT] no need recompile Rox, easy way : look my next message!
3[EDIT] 1.2 update script ! , better way
4[EDIT] fixed a bug with the cp command when an argument is missing :evil:
5[EDIT] My bad, I used "$1" "$2" too pass cp args, but "$@" better! update gtk_progress bar too / use rsync -ah = high speed
6[EDIT] You must have RSYNC version >= 3.1.1 (support for --info=progress2 option) and better secure off course
7[EDIT] update 2 scripts, now "--no-preserve=context,links" work, Thanks Mister Argolance for your patience.

Code: Select all

#!/bin/sh
#
# this script is called by  ROX-Filer
#--------------$1 $2 $3
#--------------args / source / destination
# version 1.4 , correctif && soluce for  --no-preserve=context,links args
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
# you need rename /bin/cp as /bin/cp_original
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
# copy this script in /bin and named it cp
# _______________________________________


# get pid of this script
p="$$"

cleanup () {
[ -f "/tmp/rsync.log" ] && rm /tmp/rsync.log
[ -f "/tmp/rsync_.log" ] && rm /tmp/rsync_.log
[ -f "/tmp/rsync_ok.log" ] && rm /tmp/rsync_ok.log
[ -f "/tmp/numeric" ] && rm /tmp/numeric
}
export -f cleanup

_term() {  
# abort copy in ROX
cleanup
}
trap _term SIGTERM


# to be sure that it is ROX who calls
# get string name of process parent
proc=$(ps -p  `ps -o ppid= -p $p`  -o comm=)

# if it's ROX-filer caller 
if   [ "$proc" = "ROX-Filer" ] ; then

#check file size

[ -f "$3" ] && fz=$(du "$3" | awk -F " " '{print $1}' ) ||  fz=$(du "$2" | awk -F " " '{print $1}' ) 
# set limit = 70M, otherwise use standart cp binarie
limit="70000"

if [[ "$fz" -lt "$limit" ]] ; then
/bin/cp_original "$@"
exit 0
fi

if [ -f  "/tmp/start_gtkbar" ] ; then
#always run
:
else
# start gtk
touch /tmp/rsync.log
touch /tmp/rsync_.log
# open gtk progress bar ->
/usr/local/bin/rsync_gtk.sh "$@"  /dev/null 2>&1 &
fi
# check for '--no-preserve=context,links .... cp --args with comma ....'
if [ "$4" = "" ] ; then
rsync -ah --info=progress2 --append --inplace --partial -args --log-file="/tmp/rsync_.log" "$2" "$3"   > /tmp/rsync.log 
else
rsync -ah --info=progress2 --append --inplace --partial -args --log-file="/tmp/rsync_.log" "$3" "$4"  > /tmp/rsync.log 
fi


# force close gtk ->
echo "100%" >> /tmp/numeric
#cleanup log
cleanup

if [ -f  "/tmp/start_gtkbar" ] ; then
rm /tmp/start_gtkbar
fi

# !! not ROX-filer , call original cp command !!
else
/bin/cp_original "$@"
fi


Gtk Progress Bar, copy script in /usr/local/bin named it rsync_gtk.sh

Code: Select all

#!/bin/sh
# rsync_gtk.sh
# show a progress bar and acces log from rsync
# version 1.4 
# & just one progressbar, use GTK Theme!
# & update, kill tail from pid 
# & update, force waiting to make sure it works.
# update title bar

# prevent multiple open
touch /tmp/start_gtkbar
# source name copy for title bar
if [ "$4" = "" ] ; then
title=`basename "$2"`
else
title=`basename "$3"`
fi


# food for progressbar
echo -e "[Start Copy]\n1%" > /tmp/numeric
# force wait because sometimes rsync log and gtkdialog operations take time so progressbar is froze
sleep 1

calculat () {
if [ -s "/tmp/rsync.log" ] ; then
tr '\r' '\n' < /tmp/rsync.log > /tmp/rsync_ok.log
i=$(cat /tmp/rsync_ok.log  | tail -n 1 | awk -F " " '{print $2}' | tr -d '%')
x=$(tail -n 1 /tmp/rsync_ok.log | awk -F " " '{print "["  $3 " " $4 "]"}') 
echo -e "$x \n $i%" >> /tmp/numeric
fi
}
export -f calculat

GTKDIALOG=gtkdialog
MAIN_DIALOG='
<window title="'$title'"  icon_name="gtk-copy" resizable="true">
 <progressbar sensitive="true">
  <input>tail -f  '"/tmp/numeric"' &  echo "$!" > /tmp/rsync_gtk_pidnum</input>
 <action function="closewindow">MAIN_DIALOG</action>
 <action function="exit">Ready</action>
</progressbar> 
<timer  milliseconds="true" visible="false" interval="1000">
 <action>calculat</action>
 </timer> 
</window>'

export MAIN_DIALOG
case $1 in
	-d | --dump) echo "$MAIN_DIALOG" ;;
	*) $GTKDIALOG --program=MAIN_DIALOG ;;
esac

# kill tail from pid
kill -9 `cat /tmp/rsync_gtk_pidnum`
rm /tmp/rsync_gtk_pidnum

[ -f  "/tmp/start_gtkbar" ] && rm /tmp/start_gtkbar
[ -f  "/tmp/rsync_gtk_pidnum" ] && rm /tmp/rsync_gtk_pidnum


...........................[ Preview ]
Image
Last edited by fabrice_035 on Thu 14 Mar 2019, 12:15, edited 14 times in total.
Bionicpup64-8.0 _ Kernel 5.4.27-64oz _ Asus Rog GL752

User avatar
Argolance
Posts: 3767
Joined: Sun 06 Jan 2008, 22:57
Location: PORT-BRILLET (Mayenne - France)
Contact:

#17 Post by Argolance »

Hello,
Thanks fabrice_035.
If you want the already compiled version I can put it on a server
Yes, do it please! :wink:

Cordialement.

User avatar
fabrice_035
Posts: 765
Joined: Mon 28 Apr 2014, 17:54
Location: Bretagne / France

#18 Post by fabrice_035 »

Salut Argolance,

Finally I think it is better to rename the original cp file(in /bin/) and name my script cp

For example, rename cp as cp_original (in /bin/ directory)

and replace in my cp script

Code: Select all

/bin/cp "$1" "$2" "$3" 
by

Code: Select all

/bin/cp_original "$1" "$2" "$3" 
and at end script replace

Code: Select all

# !! not ROX-filer , call original cp command !! 
else 
: 
fi 
by

Code: Select all

# !! not ROX-filer , call original cp command !! 
else 
/bin/cp_original "$1" "$2" "$3"
fi 
In the futur way i think it will be necessary to ask for a patch to add an option in the rox interface to choose if the user uses the original cp bin or use a specific script...perhaps
but now it's time, there is no need to recompile ROX Filer
But don't forget copy first my 2 scripts before rename cp :roll:
I hope I'm understandable.
So you can test what I did

Regard
Bionicpup64-8.0 _ Kernel 5.4.27-64oz _ Asus Rog GL752

User avatar
Argolance
Posts: 3767
Joined: Sun 06 Jan 2008, 22:57
Location: PORT-BRILLET (Mayenne - France)
Contact:

#19 Post by Argolance »

Hello camarade Breton, :)
... And what's happening when using your cp command in console or inside a script (as it is already the case in many scripts/programs)?
I copied the two scripts given above in /usr/bin and tried to use cp_ as if it was a standalone "standard" command, for example:

Code: Select all

#cp_ -r /path/to/source/folder/* /path/to/target/folder
and there was nothing going on. :roll:

Cordialement.

User avatar
fabrice_035
Posts: 765
Joined: Mon 28 Apr 2014, 17:54
Location: Bretagne / France

#20 Post by fabrice_035 »

Hey voisin 8) ,
You make a good point.
My script asks who is calling it. If it's not Rox, then he only execute

Code: Select all

/bin/cp_original "$1" "$2" "$3"
And after testing command line copy i found an error.
You can move

Code: Select all

# cleanup
rm /tmp/rsync.log
rm /tmp/rsync_.log
after

Code: Select all

 # force close gtk ->
But If your question is to make the graphical user interface appear even when you use the command line, you must delete the start control:

Code: Select all

if   [ "$proc" = "ROX-Filer" ] ; then
thank you for your attention
Bionicpup64-8.0 _ Kernel 5.4.27-64oz _ Asus Rog GL752

Post Reply