Thunar as a file manager in Ubuntu

Thunar as a file manager in Ubuntu

A few days ago we were talking about file managers. A somewhat unknown topic. Well today, as in previous topics, we are going to repeat the topic but in a more practical way. We are going to install a file manager in our version of Ubuntu and then make it the default file manager.

Right now you are wondering what HOW A DEFAULT FILE MANAGER? The thing is simple, in GNU / Linux you decide, not the company or the company.áWho or the author, is the user and as a general rule - there is some program that resists that - one program does not eliminate the preeminence of another in the system, that is, having installed Firefox it does not prevent you from installing another browser like Chromium and in the same way that you have a file manager like Nautilus it doesn't mean you can't install another file manager like pcmanfm.

We will do the practical case with the file manager Thunar, used in Xubuntu and that it is the most commented on the blog, so you will have extra help if you have any problems with it.

First we go to the console or terminal and write

sudo apt-get install thunar

Press "S" to the question and the installation of the file manager will start. Once installed, we will only have to tell the System what we want to use Thunar as the default file manager and not Nautilus so we will have to lay hold of the scripts.

The Script

To make a script we just have to create in our personal folder a text file called "defaultthunar”Then we open it and copy this:

#! / bin / bash ## Originally written by aysiu from the Ubuntu Forums ## This is GPL'ed code ## So improve it and re-release it ## Define portion to make Thunar the default if that appears to be the appropriate action makethunardefault () {## I went with --no-install-recommends because ## I didn't 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?
 ## Or should all the individual commands just reference the 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?
 sudo mkdir nonautilusplease echo -e "\ nModifying folder handler launcher \ n" sudo cp nautilus-folder-handler.desktop nonautilusplease / ## Here I'm using two separate sed commands ## Is there a way to string them together to have one ## sed command make two replacements in a single file?
 sudo sed -i -n 's / nautilus --no-desktop / thunar / g' nautilus-folder-handler.desktop sudo sed -i -n 's / TryExec = nautilus / TryExec = thunar / g' nautilus-folder- handler.desktop echo -e "\ nModifying browser launcher \ n" sudo cp nautilus-browser.desktop nonautilusplease / sudo sed -i -n 's / nautilus --no-desktop --browser / thunar / g' nautilus-browser. desktop sudo sed -i -n 's / TryExec = nautilus / TryExec = thunar / g' nautilus-browser.desktop echo -e "\ nModifying computer icon launcher \ n" sudo cp nautilus-computer.desktop nonautilusplease / sudo sed -i -n 's / nautilus --no-desktop / thunar / g' nautilus-computer.desktop sudo sed -i -n 's / TryExec = nautilus / TryExec = thunar / g' nautilus-computer.desktop echo -e "\ nModifying home icon launcher \ n "sudo cp nautilus-home.desktop nonautilusplease / sudo sed -i -n 's / nautilus --no-desktop / thunar / g' nautilus-home.desktop sudo sed -i -n 's / TryExec = nautilus / TryExec = thunar / g 'nautilus-home.desktop echo -e "\ nModifying general Nautilus launcher \ n" sudo cp nautilus.desktop nonautilusp lease / sudo sed -i -n 's / Exec = nautilus / Exec = thunar / g' nautilus.desktop ## This last bit I'm not sure should be included ## See, the only thing that doesn't 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 as 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 "sudo cp nonautilusplease / nautilus-folder-handler.desktop.
 sudo cp nonautilusplease / nautilus-browser.desktop.
 sudo cp nonautilusplease / nautilus-computer.desktop.
 sudo cp nonautilusplease / nautilus-home.desktop.
 sudo cp nonautilusplease / nautilus.desktop.
 echo -e "\ nRemoving backup folder \ n" sudo rm -r nonautilusplease echo -e "\ nRestoring Nautilus launcher \ n" sudo 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 isn't undone is the installation of Thunar ## Should Thunar be removed?  Or just kept in?
 ## Don't want to load the script with too many questions?
 } ## Make sure that we exit if any commands do not complete successfully.
 ## Thanks to nanotube for this little snippet of code from the early ## versions of UbuntuZilla set -o errexit trap 'echo "Previous command did not complete 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 doesn't?
 ## Is there a better way to keep track of whether ## the script has been run before?

We save it and the script is done. Now we go to the terminal and write this

chmod 777 defaultthunar

./defaulthunar

And the execution will begin, after that we only have to repeat this last step if we want to have Nautilus. I hope you try it and it will be of help to you. You will tell me how it seems to you. Greetings.

More information - Installing Thunar 1.5.1 on Xubuntu 12.10, file managers in Ubuntu,

Source - Help Ubuntu

Image - Fazen


A comment, leave yours

Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   iori2013 said

    This is very good but do you think you could use someone else like dolphin or use nautilus in xubuntu for example. If you know how to send me an email please jonivancordero@gmail.com