Com as etiquetas: Linux Tips Mostrar/esconder comentários | Atalhos de teclado

  • Lopo Lencastre de Almeida April 11, 2014, às 15:58 Permalink
    Etiquetas: box linux sync,, Linux Tips, Tutorial   

    Auto mount Box in Linux when you login 

    Unlike Dropbox, Box doesn’t come with any sync software for the personal account. If you upgrade your account to the Business and Enterprise editions, you can download the sync software for Mac and Windows. So if you are using Linux, you are almost out of luck.

    Luckily, Box does support WebDav. This means that you still can connect to it from your Linux desktop, though the solution is not as elegant as the Dropbox sync.

    Here is how you can connect to Box from Linux.

    Note: This tutorial is based on Ubuntu, Gnome Shell and Nautilus.

    Here is one method where you can auto-mount your Box account. We will be using davfs. Here is what you need to do:

    1. Open a terminal and install davfs:

      sudo apt-get install davfs2

    2. Add your Linux user account to the davfs2 group. Replace “your-linux-username” with your Linux login username:

      sudo adduser [your-linux-username] davfs2

    3. According to /usr/share/doc/davfs2/README.Debian, in order to allow other users to use WebDAV run the following and choose the proper option:

      sudo dpkg-reconfigure davfs2

    4. Create a folder in your Home directory to mount your Box account. In addition, also create the .davfs folder to hold your configuration files:

      mkdir ~/Box
      mkdir ~/.davfs2

    5. Next, copy the davfs configuration file over and add the “user_lock” command to it:

      cp /etc/davfs2/davfs2.conf ~/.davfs2
      echo "use_locks 0" >> ~/.davfs2/davfs2.conf

    6. Create a new file in ~/.davfs2 called secrets:

      gedit ~/.davfs2/secrets

      Paste the following, replacing “Box_username” and “Box_password with your Box account login username and password (make sure the quotes around the Box_password remain). Save and close editor: Box_username "Box_password"

    7. Back to the terminal, change the permission of the secrets file so it can only be read/write by you:

      chmod 600 ~/.davfs2/secrets/li>

    8. Next, open the davfs2.conf file (in the .davfs2 folder) with a text editor. Scroll down the list until you find the entry (at around line 24):

      ignore_home kernoops,distccd # system wide config file only

      Insert a # so it becomes:

      #ignore_home kernoops,distccd # system wide config file only

      Next, scroll down further until you find the entry (at around line 35):

      # secrets ~/.davfs2/secrets # user config file only

      Remove the # so it becomes:

      secrets ~/.davfs2/secrets # user config file only

      Save and close the file.

    9. Now, we are going to add a new entry to your /etc/fstab file:

      sudo nano /etc/fstab

      Add the following line to the end of the file (paste using the shortcut key “Ctrl + Shift + v”). Replace “your-linux-username” with your Linux login username: /home/[your-linux-username]/Box davfs rw,user,noauto 0 0

      Save and exit. Open your file manager. You should see a Box entry at the filesystem column (the entry appears, but it is unmounted at the moment, so you won’t be able to access it).

    10. To test if the mounting works, type in the terminal:

      mount ~/Box

      If everything goes fine, your Box account should be mounted and show up in your file manager. If not, check your Box username and password in the secrets file.

      Additional note If you got a 302 or 404 error then check the article Does Box support WebDAV? at to see what may have changed.

    11. Lastly, open up your Startup Applications and add a new item with the command:

      mount ~/Box

    That’s it. Your Box account should be mounted whenever you login to your desktop.

    Original article made by Damien Oh was at but there was some errors that needed to be fixed and comments were closed so I repost it here with errors solved. This is for Linux distros based on Debian. For distros based on RPM or other you need to do the proper adaptations.

    You can also test the Box Linux Sync application made by Noiselabs

  • Lopo Lencastre de Almeida March 18, 2014, às 17:17 Permalink
    Etiquetas: Debian, Linux Tips, Purge Kernels, , Ubuntu Tweak   

    How to Remove All Unused Linux Kernel Headers, Images and Modules 

    Command Line

    Unless you have a totally fresh install of Ubuntu, you have probably noticed that each time you boot up, the GRUB boot menu lists a bunch of previous Linux kernels which you can boot into. While this can occasionally come in handy – like if you can’t boot into the new kernel after an upgrade – those previous kernels, images and modules are usually just wasting space.

    While you can go into Synaptic, search for all the bits and pieces of previous kernels, and mark them for removal, here is a much easier method. In a terminal, simply paste the following command, and it will remove all but the current kernel (if you’ve upgraded your system, or had an update with a new kernel, please reboot your machine before running this):

    dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d' | xargs sudo apt-get -y purge

    You will see some info about what is going on:

    The following packages will be REMOVED:
    linux-headers-2.6.35-22* linux-headers-2.6.35-22-generic*
    linux-headers-2.6.35-23* linux-headers-2.6.35-23-generic*
    linux-image-2.6.32-25-generic* linux-image-2.6.35-22-generic*

    0 upgraded, 0 newly installed, 7 to remove and 13 not upgraded.
    After this operation, 586MB disk space will be freed.
    (Reading database … 261863 files and directories currently installed.)
    Removing linux-headers-2.6.35-22-generic …
    Removing linux-headers-2.6.35-22 …
    Removing linux-headers-2.6.35-23-generic …
    Removing linux-headers-2.6.35-23 …
    Removing linux-image-2.6.32-25-generic …

    It will then go on to generate a new GRUB menu, and when you reboot, you’ll see only the current kernel is listed.

    Another option

    You can also check our code [Bash] Purge unused Linux kernel image at With this you only remove the kernel you wish and not all the unused ones.


    IMHO, the best GUI tool is Ubuntu-Tweak

    It is not available from the standard repositories. To install you need to use the author’s PPA:

    sudo add-apt-repository ppa:tualatrix/ppa
    sudo apt-get update
    sudo apt-get install ubuntu-tweak

    Ubuntu Tweak

    Choose the options shown by the arrows.

    Select both the headers and image with the same version number.

    It will not allow you to delete the current kernel you are booted with since the current kernel is not displayed.


    My recommendation is to keep at least two or preferably three kernels including the latest. The reason for the recommendation is that you will have at least one/two other kernels to boot with, if for what-ever reason the latest kernel you are unable to boot with or introducing a regressed capability such as broken wireless.

    partially via Ubuntu Genius and Ask Ubuntu

Compose new post
Next post/Next comment
Previous post/Previous comment
Show/Hide comments
Go to top
Go to login
Show/Hide help
shift + esc