Difference between revisions of "User:Tomato"

From ArchWiki
Jump to: navigation, search
(Installing requisites)
Line 25: Line 25:
Install all packages and their dependencies:
Install all packages and their dependencies:
{{Codeline|pacman -S kdebase-dolphin samba kdenetwork-filesharing kdebase-runtime kdelibs3}}
{{Codeline|pacman -S kdebase-dolphin samba kdenetwork-filesharing kdebase-runtime kdelibs3 gcc}}
Log out and log in again (kdelibs3 are in non standard place and so the <code>PATH</code> must be updated)
Log out and log in again (kdelibs3 are in non standard place and so the <code>PATH</code> must be updated)

Revision as of 00:43, 27 February 2010

just my personal scrapbook

Configure file sharing from KDE4 using samba

Sadly, this functionality is implemented using SUID perl script, and as Archlinux does not support SUID scripts nor it has perl-suid package we will have to get our hands dirty.

Note: Works with simple file sharing only at the moment, advanced file sharing still asks for root password

Work plan:

  1. install packages
  2. configure samba
  3. modify Template:Codeline scripts
  4. create C wrapper for Template:Codeline to work as a SUID binary
  5. configure KDE side of things
  6. share a folder

Packages we will need:

Installing requisites

Install all packages and their dependencies:


Log out and log in again (kdelibs3 are in non standard place and so the PATH must be updated)

Configuring samba

A basic config file works OK, though you'll need to create Samba users (with smbpasswd -a <user name> as root): Template:File

Alternatively you can configure samba with security = share and add guest account = <your user name> to get an anonymous Samba server

Remember to add samba to DAEMONS in /etc/rc.conf if you want it to start at boot time.

Modifying fileshareset scripts


Create C wrapper

Create such files in your home directory:



compile them using gcc kde4.c -std=c99 -o kde4 and gcc kde3.c -std=c99 -o kde3. Copy them to system folders: Template:Command

Configure KDE

Right click any folder in your home directory and select Properties. Go to Share tab and click 'Configure File Sharing...', you'll be asked for root password. (alternatively run kcmshell4 fileshare as root)

In the dialog that displays you need to select checkbox near "Enable Local Network File Sharing" and second one besides 'Simple sharing' (this one should be already selected).

Click 'Allowed Users' and select the second option -- one where users only from specified group can share files. Create new group, call it samba-share, add yourself, and any other user you might want to be able to share files.

Click OK until you close all the dialog boxes.

Share a folder

When the file sharing is configured you will see a new radio button on the Share tab -- Shared and Not shared. Change position to Shared, click OK. On the shared folder should appear now a small globe to indicate that it is shared.