Fa uns dies us parlàvem de els gestors d'arxius. Un tema una mica desconegut. Bé avui, com en temes anteriors, repetirem el tema però d'una manera més pràctica. Anem a instal·lar un gestor d'arxius en la nostra versió d'Ubuntu i després convertir-lo en el gestor de fitxers per defecte.
Ara mateix us estareu preguntant què COM UN GESTOR D'ARXIUS PER DEFECTE? La cosa és senzilla, en GNU / Linux tu decideixes, no la companyia ni la máquina ni l'autor, és l'usuari i per regla general - hi ha algun programet que es resisteix a això - un programa no elimina la preeminència d'un altre en el sistema, és a dir, el tenir instal·lat Firefox no evita que puguis instal·lar un altre navegador com Crom i de la mateixa manera que tinguis un gestor d'arxius com Nàutil no vol dir que no puguis instal·lar un altre gestor d'arxius com gestor de fitxers pcman.
El cas pràctic ho farem amb el gestor de fitxers Thunar, Usat en Xubuntu i que és el més comentat al blog, de manera que tindreu ajuda extra si tinguéssiu algun petit problema amb ell.
Primer ens dirigim a la consola o terminal i escrivim
Sudo apt-get install Thunar
Premem "S" a la pregunta i s'iniciarà la instal·lació de l'gestor de fitxers. Un cop instal·lat només ens quedarà indicar-li a l'Sistema que volem utilitzar Thunar com a gestor d'arxius per defecte i no Nàutil per la qual cosa haurem de recórrer a els scripts.
el Script
Per fer un script només hem de crear a la nostra carpeta personal un arxiu de text que es digui "defaultthunar"Després li vam obrir i copiem això:
#! / Bin / bash ## Originally written by aysiu from the Ubuntu Forums ## This is GPL'ed code ## So improve it and re-release it ## Defineix portion to make Thunar the default if that appears to be the appropriate action makethunardefault () {## I went with --no-install-recommends because ## I did not want to bring in a whole lot of junk, ## and Jaunty installs recommended packages by default. echo -e "\ nMaking sure Thunar is installed \ n" sudo apt-get update && sudo apt-get install Thunar --no-install-recommends ## Does it make sense to change to the directory? ## No s'ha d'allò commands individuals just reference la full path? echo -e "\ nChanging to application launcher directory \ n" cd / usr / share / applications echo -e "\ nMaking backup directory \ n" ## Does it make sense to create an entire backup directory? ## Should each file just be backed up in place? suo mkdir nonautilusplease echo -e "\ nModifying folder handler launcher \ n" suo cp nautilus-folder-handler.desktop nonautilusplease / ## Here I'ma using two separate set commands ## Is there a way to string them together to have one ## set command make two Replacements in a single file? suo set -i -n 's / nautilus --no-desktop / Thunar / g' nautilus-folder-handler.desktop suo set -i -n 's / TryExec = nautilus / TryExec = Thunar / g' nautilus-folder- handler.desktop echo -e "\ nModifying navegador launcher \ n" suo cp nautilus-browser.desktop nonautilusplease / suo set -i -n 's / nautilus --no-desktop --browser / Thunar / g' nautilus-browser. desktop suo set -i -n 's / TryExec = nautilus / TryExec = Thunar / g' nautilus-browser.desktop echo -e "\ nModifying computer icon launcher \ n" suo cp nautilus-computer.desktop nonautilusplease / suo set -i -n 's / nautilus --no-desktop / Thunar / g' nautilus-computer.desktop suo set -i -n 's / TryExec = nautilus / TryExec = Thunar / g' nautilus-computer.desktop echo -e "\ nModifying home icon launcher \ n "suo cp nautilus-home.desktop nonautilusplease / suo set -i -n 's / nautilus --no-desktop / Thunar / g' nautilus-home.desktop suo set -i -n 's / TryExec = nautilus / TryExec = Thunar / g 'nautilus-home.desktop echo -e "\ nModifying general Nautilus launcher \ n" suo cp nautilus.desktop nonautilusp lease / suo set -i -n 's / Exec = nautilus / Exec = Thunar / g' nautilus.desktop ## This last bit I'ma not sure should be inclòs ## See, the only thing that does not change to the ## new Thunar default is clicking the files on the desktop, ## because Nautilus is managing the desktop (so technically ## it 's not Launching a new process when you double-click ## an icon there). ## So this kills the desktop management of icons completely ## Making the desktop pretty Useless ... would it be better ## to keep Nautilus there instead of nothing? Or go so far ## as to have Xfce manage the desktop in Gnome? echo -e "\ nChanging base Nautilus launcher \ n" sudo dpkg-divert --divert /usr/bin/nautilus.old --rename / usr / bin / nautilus && sudo ln -s / usr / bin / Thunar / usr / bin / nautilus echo -e "\ nRemoving Nautilus es desktop manager \ n" killall nautilus echo -e "\ nThunar is now the default file manager. To return Nautilus to the default, run this script again. \ N "} restorenautilusdefault () {echo -e" \ nChanging to application launcher directory \ n "cd / usr / share / applications echo -e" \ nRestoring backup files \ n "suo cp nonautilusplease / nautilus-folder-handler.desktop. suo cp nonautilusplease / nautilus-browser.desktop. suo cp nonautilusplease / nautilus-computer.desktop. suo cp nonautilusplease / nautilus-home.desktop. suo cp nonautilusplease / nautilus.desktop. echo -e "\ nRemoving backup folder \ n" suo rm -r nonautilusplease echo -e "\ nRestoring Nautilus launcher \ n" suo rm / usr / bin / nautilus && sudo dpkg-divert --rename --remove / usr / bin / nautilus echo -e "\ nMaking Nautilus manage the desktop again \ n" nautilus --no-default-window & ## The only change that is not Undone is the installation of Thunar ## Should Thunar be removed? Or just kept in? ## Do not want to load the script with too many questions? } ## Make sure that we exit if any commands do not completi successfully. ## Thanks to nanotube for this little snippet of code from the early ## versions of UbuntuZilla setembre -o errexit trap 'echo "Anterior command did not completi successfully. Exiting. " 'ERR ## This is the main code ## Is it necessary to put an elseif in here? Or is ## Redundant, since the directory pretty much ## either exists or it does not? ## Is there a better way to keep track of whether ## the script has been run before?
El guardem i ja està fet l'script. Ara anem a la terminal i escrivim això
chmod 777 defaultthunar
./defaulthunar
I començarà l'execució, després d'això només hem de tornar a repetir aquest últim pas si volem tornar a tenir Nàutil. Espero que ho proveu i us sigui d'ajuda. Ja em comptareu que tal us sembla la cosa. Salutacions.
Més Informació - Instal·lant Thunar 1.5.1 en Xubuntu 12.10, gestors d'arxius en Ubuntu,
font - Help Ubuntu
imatge - fazen
Aquesta molt bo això però creus que es podria fer servir algun altre com dolphin o usar en xubuntu nautilus per exemple. Si saps com envieu-me un mail si us plau a jonivancordero@gmail.com