Easy Samba Sharing Setup with KDE

Recently, I decided that instead of copying video files from one computer to another when I wanted to watch something on my TV, I would setup my network to stream the videos. I had previously tried NFS and UPnP, both without very impressive results. Therefore, I decided to try Samba, even though my perception of it was that it was mainly for sharing between Linux and Windows, and I had a Linux-only house.

Much to my surprise, setting up Samba in KDE was a cinch, and Boxee, the media center application on my TV, recognized the shares immediately.

To get started with Samba, you need to install two packages: samba and kdenetwork-filesharing. In most distributions, all other necessary packages will be installed along with those.

To install in Kubuntu, use your graphical package installer of choice or type the following from within Konsole:

To configure Samba shares in KDE:

KDE configure sharing button

1. Right click on any folder
2. Select “Properties” from the menu
3. Choose the “Share” tab in the properties window
4. Click the “Configure File Sharing…” button
5. When prompted for your root password, enter it.

Alternatively you can quickly access the configuration module by pressing “Alt+F2” and typing “kdesudo kcmshell4 fileshare“.

KDE file sharing settings

If all you need is basic read-only access on the client computer, leave “Simple Sharing” selected. If you want the client to be able to change, upload, and remove files, you will need to choose “Advanced Sharing”.

By default, Samba will have a share setup for any printers connected to your system. To add folders:

1. Click the “Add…” button
2. Type in the path to the folder or click the folder icon to browse for it
3. Check the “Share with Samba (Microsoft(R) Windows(R))” box
4. Optionally, change the name of the share to whatever you want
5. Click OK.

Next, configure the Samba server for easy browsing:

1. Press “Alt+F2”
2. Type kdesudo kcmshell4 sambaconf
3. For “Workgroup” enter the same name on both computers
4. For “NETBIOS name”, choose a name for your computer’s network identity
5. In “Security Level”, select “Share”, which will allow immediate read access
6. Click “OK”.

Samba server settings

You should now be able to view your samba shares on the client computer. In KDE, you can check this by doing the following:

1. Start Dolphin
2. Click “Network”
3. Click “Samba Shares”.
4. You should then see your workgroup. Click it.
5. Select the machine you want to view
6. Choose the shared folder.

For other applications, such as Boxee, the Samba shares should be visible when you attempt to add sources. When playing media using Samba, the files will behave like local files, allowing you to rewind and fast forward with ease. You should also be able to view and play media on a Windows computer or a Samba-enabled Mac.

KDE offers an extensive list of configuration options for Samba, so you can tweak it to your heart’s content. If, however, all you need is basic sharing, the setup is quite easy and will only take a few minutes.

6 comments

  1. Wow, this is really cool. Linux and specifically KDE really have come a long way. I remember the time when I had to edit the infamous smb.conf only to do this very same thing.

  2. hi, maybe you`re right, but at least in kubuntu – this is not working – file sharing in graphic way .. simply s#$ks,
    in gnome everything is fine

  3. Hmmm. In Gnome (samba installed), I just right click the folder I want to share, and under the Share tab, set it to share read only or read/right. I like to use a password, due to WiFi.

    On my Wii, using WiiMC (Wii Media center, homebrew app, installed also as a Wii “Channel”) I just enter the the share info, and watch all my video INSTANTLY, through the Wii, on my biggest TV screen (or on any computer in the house). Another Ubuntu box, would just require the clicking, of “Network” (once the password is saved).

    I find the Wii, an excellent low-power front-end, and one that’s already there.

    I find using my main desktop (Ubuntu), with the biggest drive, uses less power than a always-on NAS would, even if I do, have to sometimes turn on the main, back-room desktop. Everything is off, at night. The net powered on time, is less.

    Gnome Ubuntu 10.04, does not show the folders as shared, graphically in Nautilus, upon reboot. But they are, still shared, and still work.

    That could not be much easier. (With the exception of hacking the Wii)

  4. Doesn’t work for me. I have wifi notebook and PC connected to a wifi router – both kubuntu 10.10 and exactly the same settings for samba. On my notebook I can sometimes read and write to both, but on my PC I can only read and write to PC itself (never can access directory on notebook, but I can sometimes see notebook itself). But most of the times it does not work at all – in this case both computer can only see themselves and not each other. Is this a problem because of wifi?

    All of the above was done through dolphin.

    • No, it should work even with wireless. If you can, email me your settings, and I will compare them to mine.

Comments are closed.

Sponsored Stories