ROX-Filer umesto Nautilusa
Iz projekta Ubuntu-RS Wiki
Ovaj proces će omogućiti korisnicima koji to žele da zamene Nautilus sa ROX-Filerom, daleko bržim upravnikom datotekama sa brojnim interesantnim mogućnostima.
Instaliranje
sudo apt-get install rox-filer
Sada pomerimo nautilus u stranu
sudo mv /usr/bin/nautilus /usr/bin/nautilus.bin
Kao root korisnik postavite skriptu umesto nautilusa (na primer: sudo pico /usr/bin/nautilus)
#!/bin/bash
#replacement/wrapper for nautilus
# also mounts network drives using gnomevfs-mount (using fuse)
# doesn't check if already mounted
NAUTILUS=/usr/bin/nautilus.bin
DEBUG=0
# backup our args list
ARGS=$@
ARGSCOUNT=$#
# call nautilus, with all args received in input
function run_nautilus() {
[ $DEBUG != 0 ] && echo "OUT: Running Nautilus" >> $HOME/nautilus_wrapper.log
exec $NAUTILUS $ARGS
}
# calls the replacement, only arg must be an existing dir
function run_replacement() {
[ $DEBUG != 0 ] && echo "OUT: Running $NAUTILUS_REPLACEMENT. Args: '$@'" >> $HOME/nautilus_wrapper.log
exec $NAUTILUS_REPLACEMENT $@
}
# make a directory where to mount our network drive
function makemountdir() {
# get the server part of the URI
SERVER="`echo \"$1\" | sed -e 's/^(https\|http\|sftp\|ftp\|ssh)//' -e 's/:\/\///' -e 's/.*@//' -e 's/\/.*//'`"
MOUNTDIR=$MOUNTROOT/$SERVER
[ $DEBUG != 0 ] && echo "...: Mounting $1 on $MOUNTDIR" >> $HOME/nautilus_wrapper.log
mkdir -p $MOUNTDIR
}
[ $DEBUG != 0 ] && echo "IN: $0 invoked with '$@'" >> $HOME/nautilus_wrapper.log
# if this user didn't configure a replacement, just give way to nautilus
if [ -z "$NAUTILUS_REPLACEMENT" ]; then
run_nautilus
fi
# loop through all args to see if one of them requires
# that we run nautilus
while [ -n "$1" ]; do
case "$1" in
-c|--check) ;; #ignore
-g) shift ;; #ignore, and ignore next one
--geometry) ;; #ignore
--no-desktop) ;; #ignore
--sm-disable) ;; #ignore
-n|--no-default-window)
# run nautilus if not asked for anything else
#if this is the only argument, start nautilus
# this happens when nautilus is asked to draw the desktop
if [ $ARGSCOUNT == 1 ]; then
run_nautilus
fi;;
--sm-client-id) run_nautilus;;
-? | --help) run_nautilus;;
--usage) run_nautilus;;
--browser) run_nautilus;;
-q|--quit) run_nautilus;;
computer*) run_nautilus;;
network*) run_nautilus;;
trash*)
if [ -z "$TRASHDIR" ]; then
run_nautilus
else
run_replacement "$TRASHDIR"
fi;;
file*)
# turn the file:/// URI into a filesystem path,
FILE="`echo \"$1\" | sed -e 's/^file:\/\///' -e 's/%20/\ /g'`"
run_replacement "$FILE";;
ftp* | sftp* | http* | smb* | ssh* )
#if we can mount this network dir through
# Fuse and gnomevfs-mount, do it
if [ -e /usr/bin/gnomevfs-mount ] && [ -n "$MOUNTROOT" ]; then
makemountdir "$1"
/usr/bin/gnomevfs-mount "$1" "$MOUNTDIR"
run_replacement "$MOUNTDIR"
else
run_nautilus
fi;;
*)
# unknown arg. if it's a filesystem object, use replacement
# otherwise give up and start nautilus
if [ -e "$1" ]; then
run_replacement "$1"
else
[ $DEBUG != 0 ] && gmessage "$0 $ARGS" &
run_nautilus
fi;;
esac
shift
done
#default: open home dir
run_replacement $HOME
exit 0
Omogućite njeno izvršavanje
sudo chmod a+x /usr/bin/nautilus
Korisničko podešavanje
Korisnici koji žele da zamene nautilus ROX-Filerom trebaju da dodaju sledeće u ~/.gnomerc (ako datoteka ne postoji, napravite je):
NAUTILUS_REPLACEMENT=/usr/bin/rox TRASHDIR=$HOME/.Trash export TRASHDIR NAUTILUS_REPLACEMENT
Ova datoteka će biti učitana prilikom pokretanja GNOME-a, a kada su ove promenljive okruženja prisutne, prethodna skripta će umesto nautilusa pokrenuti ROX-Filer.
Još je potrebno ukloniti nautilus iz trenutne sesije. Ako ne postoji ~/.gnome2/session, iskopirajte /usr/share/gnome/default.session i onda izmenite ~/.gnome2/session tako da obrišete unos sa nautilus-om. Ako se nautilus (RestartCommand=nautilus...) nalazi iza broja 2, onda treba ukloniti sve linije koje počinju brojem dva. Na kraju umanjite num_clients na početku za jedan. Odjavite se i po prijavi dočekaće vas omogućen ROX-Filer, bez pokrenutog nautilusa. (ovo znači i da ćete ostati bez ikonica na Desktopu, što meni i odgovara)
Spoljašnje veze
Preuzeto i prevedeno sa Ubuntu foruma na engleskom.
| Korisnička dokumentacija | |
|---|---|
|


