Samba-mounter, quick fix for a larger problem

There was a time, years ago when computer users only needed to keep all their files in one place, and occasionally make some backup to a CD or DVD. Then the mp3 players appeared and those users had to copy the music from the computer to the player usually via USB, that’s all we needed we thought… well we were wrong :)

The amount of devices we have and we use is increasing and so does the amount of data we manage, some may think that a regular non geek user has few files but if you take a closer look you will see that the average user actually has hundreds of pictures, hundreds of sounds, hundreds of films, dozens of documents… So we have to ask ourselves a question: Can we continue with the model of copying that data around? the answer is no.

Motivated by that need users are starting to setup a central computer or a device such a NAS with the only propose of  storing data and make it available to any device that may need it such: cell phones, players, ebook readers, tv’s, other computers etc. Some times that central place is not even a computer dedicated to do that job but instead the daily used computer, I’m specifically thinking on a laptop.

The file transfer are usually done with protocols such nfs, webdav, ftp or samba being this last the most common at least in commercial devices. The need for supporting this is clear as users of these systems increase, so how well do we support Samba?

We have had a kick ass technology called KIO for years, I believe it was developed in KDE 2 and basically it allows to use remote files as if they were local,  meaning that you can use files in an ftp for example without having to use any special programs for it. Even with KIO, we have identify some issues that need to be solved before we can say that our remote file support has no gaps, for example streaming or support for applications not supporting KIO.

Let’s say for example that we have a collection of music in a NAS device and they are shared through Samba, can we reproduce them using any KDE application? or better, can we stream and reproduce them? the answer is sadly no.

There are a series of technical problems that we have to fix to make KDE software fully capable of streaming music, I won’t bother you with technical details just know that actions are being taken to fix this situation and because of KIO we should be able to stream music on applications that use it in no time hopefully in 4.9.0 or 4.9.1.

What about applications not using KIO, is there any way for making them work ? short answer is it depends.

There are technical mechanisms for making Samba remote files look like local for all applications, for example for this protocol we have cifs, smbnetfs and fusesmb. According to the tests we performed only cifs is fast enough to provide a good experience but still you usually need to know some command or edit a file you are not supposed to modify in order to have a good experience so it is not a solution by itself.

We are designing a solution that will make KIO available to any application, but that will take months of developing and testing  and we needed something fast, something to include in Netrunner 4.2 Dryland SE… So we created samba-mounter.

Samba-mounter is a small piece of code that makes easy the usage of cifs, improving the experience of those who need to access files shared through samba.

Take a look at the following video:

Direct Link

You can download the code from here:

http://quickgit.kde.org/index.php?p=scratch/afiestas/samba-mounter.git

I expect to write a blog post explaining the long-term solution in the following weeks.

  • trapanator

    For the streaming problem I’m using the smb4k software. But your implementation is much simpler.

    My dream is that Dolphin can manage smb/cifs mounts directly (as Windows Explorer).

  • AlbertH

    Wow…
    just what I need…
    Thanks, thanks, thanks…

  • 1052

    What is that taskbar at the bottom?

    • http://www.afiestas.org afiestas

      IconTask plasmoid

  • Bugsbane

    My dream is to be able to open files over webDav (ownCloud) from Firefox and Libreoffice. Any chance of this with your future plans?

    • http://www.afiestas.org afiestas

      Yes, it will be possible

  • http://avbalves.blogspot.com Arllen Alves

    WOW!!!

    Afiestas, please,
    how do you changed the bottom of windows borders to squared?
    And about the arrow as “resize marker”, how can I do it?

    I have many years looking for that… :-)

    Sorry about english… I’m from brazil.

    Thanks!!

    • http://www.afiestas.org afiestas

      I set all borders to “none” I think

  • http://avbalves.blogspot.com Arllen Alves

    Thank you very much!!

    It works!! :-)

  • Afiefh

    “We are designing a solution that will make KIO available to any application”

    Please elaborate and/or provide links!

  • http://friesoft.wordpress.com Bernhard Friedreich

    “We are designing a solution that will make KIO available to any application”

    As Afiefh I am also REALLY interested in this… please tell us :)

    • http://www.afiestas.org afiestas

      Well, we are designing so there is still lot of job to do.

  • http://www.stopthemindspam.com Michael

    This is fantastic news, just what I am looking to hear about, thank you! This kind of low-level work is so important.

  • http://www.stopthemindspam.com Michael

    Was also wondering why a few programs won’t open up files over a sftp:// protocol, but others will. For example, Dolphin will happily browse my other Kubuntu box using an sftp://[email protected]/path/file protocol, and Gwenview will open images and Amarok will play mp3’s, but Bangarang won’t play mp3’s nor will Dragon play videos. I’m not sure I understand this inconsistent behavior, as they aren’t they built upon the same KDE base services?

    • http://www.afiestas.org afiestas

      They are, but ther eare a few small bits that should be sorted out in order to have this working properly

  • http://www.anglofareast.com/bullion-accounts/silver-account/ silver account

    So what is KIO? It is a technology that makes arbitrary resources available in form of files (if it makes sense to be files) which any KDE application can seamlessly access and use. Let’s have FTP server as an example. It’s a remote server somewhere on the other side of the country. How would you normally access it? Install some FTP client, create new connection, enter your credentials, connect, browse the server in the client, do some work. With KDE KIO all this is not needed.

  • RicRggr

    I installed samba-mounter on Kubuntu 12.04, but for some reason it does not seem to mount anything.
    I create the share, without any issues, but nothing shows up in Dolphin, and when I navigate to the the folder ~/Network/sharename (created by the add new share in samba-mounter), the folder is empty.
    Any hints on what I may have missed.

    Thanks in advance…

    Ric.

  • http://popateapa.wordpress.com/2012/09/02/leapsa-pe-bloguri-cine-te-inspira-bravo-marius/ Maureen F. York

    People have asked on the Samba mailing list how is it possible to protect files or directories from deletion by users. For example, Windows NT/2K/XP provides the capacity to set access controls on a directory into which people can write files but not delete them. It is possible to set an ACL on a Windows file that permits the file to be written to but not deleted. Such concepts are foreign to the UNIX operating system file space. Within the UNIX file system anyone who has the ability to create a file can write to it. Anyone who has write permission on the directory that contains a file and has write permission for it has the capability to delete it.

  • TheBlackCat

    “We are designing a solution that will make KIO available to any application, but that will take months of developing and testing”

    So is there any news on this?

  • MCslo

    For all of you who are looking for a ppa or a .deb package, you can get them here>/a>