The other day pavloco showed us how better integrate Dropbox into Xfce, and although I am not someone fanatic of the "clouds"(especially for my internet connection ...), I remembered that I had earned some nice 50GB en Box.com for using a Android-LG 🙂 I started to investigate a little how better integrate Box on Linux, and now I come to teach those who are interested.
I must clarify first, that we will not be able to compete side by side with the powerful integration having Dropbox on Linux, since in the case of dropbox is a native client (or a daemon, I'm not sure), but for Box we will use some tricks that will allow us to use basic functionsas upload / download and review files personal use only.
Ok, let's begin. The first thing we need, in install davfs2 package in our distribution, since it is the part fundamental of everything.
En Debian we would run thisas root of course):
apt-get install davfs2
For Arch would:
pacman -S davfs2
En Fedora...
yum install davfs2
Among others ... The next thing to do, will be create folder where we will ride our account, to access it. For example, I created one in my home, called «Box" (without quotation marks). Now we must edit the / etc / fstab file, adding the following line:
https://www.box.com/dav /home/usuario/Box davfs rw,user,noauto 0 0
Changing "user" by your username: the entire route if they created the folder elsewhere. This line only tells the system that mount system DAV de Box.com in the folder we want, and give it permission to any user of open it, and Read and write files therein.
However, it will not be able to mount it if we do not give it our Box username and password 😛 So in our Home we will create a binder call .davfs2 (he "." is to be hidden), which will contain the settings. Then you have to to copy the files "davfs2.conf" Y "secrets" which are in / etc / davfs2 /, and put them in the folder that we just created.
We can do this quickly with these commands:
mkdir ~/.davfs2/
sudo cp /etc/davfs2/davfs2.conf /home/usuario/.davfs2/
sudo cp /etc/davfs2/secrets /home/usuario/.davfs2/
sudo chown -R usuario /home/usuario/.davfs2/ ## Cambien "usuario" por su nombre de usuario
We proceed to open both files with our favorite text editor. In "davfs2.conf»We look for the line«#use_locks 1»And we uncomment it (we withdraw the #), and we make sure the number next to it is «0«. That is, it would look like this:
use_locks 0
Now we will edit the file "secrets«, And we will add the following line at the end:
https://dav.box.com/dav user@email.com password
Sure, put your email and password 😛 It would only remain to test if it is mounted, so we will open a terminal and write in it:
mount /ruta/a/la/carpeta/
If it does not give any problem, then we will be ready 🙂 To test it you could copy a lightweight file (1MB or less?) to the folder where they mounted Box.
In case they show up errors, we will solve them in their respective way:
- /sbin/mount.davfs: Program is NOT setuid root. This is solved with the command:
sudo chmod u+s /sbin/mount.davfs
- /sbin/mount.davfs: user must be member of group davfs2. It is fixed by adding our user to the davfs2 group, we execute:
sudo gpasswd -a usuario davfs2
, where "user" is your username. - /sbin/mount.davfs: / is the home directory of user kernoops. It is arranged like this:
sudo echo "ignore_home kernoops" >> /etc/davfs2/davfs2.conf
Those are the possible mistakes. If it gives you any other error, do not forget to put it in the comments 🙂
Custom action for Thunar
Taking advantage that I was in Xfce, it occurred to me to test if with custom commands could upload any folder to Box from Thunar. And yes what it works. Although don't show A progress bar to know how much is missing, if it generates notifications to notify that you have already uploaded the selected files.
To use it, we will open Thunar, and we will go to Edit> Configure custom actions. We click on Add (the + symbol) and fill the spaces in this way:
Eyelash "Basic«:
Name: Upload file (s) to Box
Description: Upload selected files to Box.com
Command: notify-send "Uploading to Box" "Uploading% F to your Box account ..." && cp -r% F ~ / Box / && notify-send "Done" "The files have already been uploaded to your account by Box "
Eyelash "Appearance conditions«: Check all the boxes.
We save and that's it, we can quickly upload files to Box 🙂
Synchronize folders manually
This is something we can do with the command Rsync, however some of us prefer to do this from a comfortable interface, so we will install Unison, frontend for rsync.
It will be a matter of to install the packages unison y unison-gtk. In Debian it would be like this:
apt-get install unison unison-gtk
Then, we proceed to look for it in the menu (Category Accessories) and open it. A window will pop up to configure a «profile«. Unison uses profiles for each binder what you want synchronize.
So, we will create one. In "profile name" Y "Description»We can place whatever we want. In type of synchronization, we will leave it in «Location«. Then it's our turn choose two folders, the one in Box and the one that we are going to synchronize.
Once you are ready, simply we open the profile y Unison will compare the two folders. Then we just have to click on «Go»And will start synchronize.
Note: Yes we erase something in a folder, by default Unison you'll want to delete it on the other. To change it we just do click on the file and then we press «right to left»Or«left to right»Depending on where the original file is.
While it is possible to perform automatic synchronization with Unison o RSync, it is somewhat difficult to achieve a result optimum for everyone.
Well that's it. They are somewhat limited options, but if we want something better we would have to directly use the Box API, since there is no native client for Linux (and if there were, it would be paid, like the one for Mac and Windows).
What do you think? Do you use any other cloud like Dropbox, Wuala, SpiderOak, etc.? They don't like much the clouds? Opinion 🙂
All your contributions are always excellent. Thank you very much for sharing and I join the criticism on your desk, it looks very good
Thanks to you too for reading 😉 I have an article or two planned, I will try to post them soon.
This really is an input .. I just did the "basic" part and the file sharing is great .. Thanks so much for sharing!
You're welcome 🙂 Believe me that if I knew how to use the API I would try to do something better ...
excellent now to start using it ... I just hope the Dolphin customization in KDE comes out (I don't know if it will be necessary ... when I leave work I try it uu
Your desk is very nice 😉
Thanks
Hey, the Dropbox article was made by me 🙁 hahaha
Good post I wonder if I can install it despite having Dropbox installed.
Oops! My apologies ... is that as elav usually / used to be so attached to Xfce I got confused. I will change it shortly.
Hahaha no problem, don't worry. Excellent your post.
Ready, and yes, you can have Dropbox and Box at the same time 😉
excellent contribution for those of us who love xfce !!!!
Hello, great tutorial.
I don't know if you can help me, everything works perfectly except that it does not mount automatically, but I have to do it manually.
It seems that it does not read the username and password and because when I mount it "by hand" it asks for them and it is assembled perfectly.
Thank you very much and greetings.
Hello, the same thing happens to me.
Could you fix it?
Thank you.
Great contribution I was looking for a way to be able to do this type of integration, but I got the following error /sbin/mount.davfs:/home/matias/.davfs2/davfs2.conf:24: system option in user configuration file, which it does not allow me to mount the folder
regards
I did everything as is but using:
mount / home / my-user / Box /
It gives me the following:
/sbin/mount.davfs: Mounting failed.
302 Found
How is it corrected?
it gives me the same error
/sbin/mount.davfs: Mounting failed.
302 Found
the same thing for me
/sbin/mount.davfs: Mounting failed.
302 Found
It throws me the same error:
/sbin/mount.davfs: Mounting failed.
302 Found
Replace "www.box.com/dav" with "dav.box.com/dav" and you're done!
@Saymel:
Thank you very much !!!
regards
When trying to mount the Box folder I get an error /sbin/mount.davfs: Mounting failed.
302 Found
I think it is necessary to review and update this POST, I hope to get an answer .. now that I have my 50gb from box.com, and that, in addition, we will run out of ubuntu one, I need to link my box with my ubuntu14.04LTS I have tried the procedure twice and it hasn't worked for me, I've even gotten into other problems like losing my root password (and having to reinstall) and its privileges.
Please update this post because maybe two years later there are already more graphic resources for INTEGRATION OF box.com TO Ubuntu 14.04
It gives me this error, could you help me *
root @ kali: ~ # mount / root / Desktop / Box
Please enter the username to authenticate with server
https://dav.box.com/dav or hit enter for none.
Username: xxxx-
Please enter the password to authenticate user xxxx with server
https://dav.box.com/dav or hit enter for none.
Password: xxxxxxx
/sbin/mount.davfs: user davfs2 does not exist
I strongly recommend that you do not "login" as root to do everything, use sudo or derivatives according to distribution.
Regarding the error, it tells you that "root" does not belong to the davfs2 group.
A greeting.
The same thing happens to me. I have not found a solution yet.
In the / etc / fstab file
you have to put the address: https://dav.box.com/dav
since it requires secure connection, otherwise everything is fine. And to add my user to the davfs2 group I used the following:
sudo usermod -a -G davfs2 YOUR_USER
The "-a -G" options add YOUR_USER to the davfs2 group list
Tested on Ubuntu 14.04
Yes, that's how it works thanks!
Pulled at first just a little modification in the / etc / fstab to put this https://dav.box.com/dav .
Thanks to the author of this website for this extraordinary post
note: I am using debian wheezy
Hello, my problem is this
"Unable to authenticate to server: Basic challenge rejected"
And I get a text message to insert a verification code, only there is nowhere to insert that code, you have any idea how to solve that from now on thanks.
Ricky.
Hi, thanks for sharing.
It gives me the following error:
/sbin/mount.davfs: user must be a member of group davfs2.
I run the solution you gave, but nevertheless, I still cannot mount it
I get the following error when giving the command to mount the Box folder (mount / home / santiago / Box):
p11-kit: invalid config filename, will be ignored in the future: / etc / pkcs11 / modules / gnome-keyring-module
The funny thing is that when I run the command, it recognizes the Box folder as a removable disk! which leads me to think that every time I want to use box on my linux, I will have to run that command? or is there a way not to have to do this?
Thanks for the tutorial, a wonder 😉
PS: Also, it won't let me copy any file in the Box folder, with the following error message, already in the Linux interface:
Error opening file '/home/santiago/Box/_MG_4552.jpg': Permission denied
excellent tutorial, it served me fantastically in Ubuntu 15.10
Thank you very much, all correct in Debian 8.
Excellent! Thanks a lot.
cannot find / in / etc / fstab
how can i correct this please
I use LMDE Mate
I can't find the solution
thanks in advance
it gives me this error
cannot find / in / etc / fstab or / etc / mtab
it can be fixed ?
use LMDE Mate
I get this message: Using external SSO login.
/sbin/mount.davfs: the server certificate does not match the server name
issuer: GeoTrust Inc., US
subject: Box, Inc., Los Altos, California, US
identity: * .box.com
You should only accept this certificate, if you can
verify the fingerprint! The server might be faked
or there might be a man-in-the-middle-attack.
Accept certificate for this session? [y, N]
Accept certificate for this session? [y, N] y
/sbin/mount.davfs: Mounting failed.
302 Found
accept or cancel skips the same failure.
according to Box releases, it is possible that the implementation of https://dav.box.com/dav
At this date, December 31, I could no longer connect the synchronization and it presented me with the following error
/sbin/mount.davfs: Mounting failed.
405 Method Not Allowed