Connecting to Windows servers from GNU/Linux using pyNeighborhood

Playing nicely with the Windows world just got easier

Download the whole article as PDF

Short URL: http://fsmsh.com/2945

Write a full post in response to this!


Need to connect to a Windows server from a computer running GNU/Linux? pyNeighborhood gives you an easy and graphical way to do just that.

Introduction

Over the last several years, I’ve been trying to persuade my wife to make the jump to GNU/Linux. While I’ve been making a little headway (mainly due to the problems my wife has encountered with Windows and Windows applications), one area in which she’s stonewalled me is installing GNU/Linux on our home server — which runs Windows XP. Whenever I broach the subject… well, let’s say that the threats I hear scare me into not doing the deed.

Until recently, connecting to the server from my laptop running Ubuntu hasn’t been a problem. I didn’t have the need to do so. Lately, though, that situation has changed. And I’ve been transferring files via sneakernet — copying them to a USB flash drive and walking over to the server. But I quickly learned that there’s a better way.

If there’s one good thing that I can say about Windows XP is that it supports the SMB protocol. This enables a computer running Windows to share files, folders, and more with another PC. All that other PC needs is the right software to take advantage of the SMB protocol. Luckily, that software is available for GNU/Linux.

The traditional way is to make the connection to the command line. A while back, a technically-inclined colleague of mine showed me how:

mount -t smbfs -o workgroup=(workgroup),username=(username),password=(password),ip=(ip_address( //(win_machine_name)/(share_name) /(mnt)

While I like the occasional technical challenge, that’s a bit much especially when I’m hit with a bout of laziness. Instead, I went graphical with a piece of software called pyNeighborhood.

Downloading and installing the software

There are two ways to get pyNeighborhood: downloading it from the software’s Web site, or installing it using a package manager like Synaptic. Obviously, the advantage of installing via a package manager is that it will also install the software that pyNeighborhood depends on. This software is:

  • The Python scripting language
  • PyGTK, which enables a graphical user interface for applications written in Python
  • smbclient, which enables your computer to talk to another computer that supports the SMB protocol.
  • smbfs, which enables your computer to access the file system on another computer

However, at the time that this article was written the version of pyNeighborhood in the Synaptic repository is 0.4.0; the version available at the application’s Web site is 0.4.1. If (like me) you prefer to have the latest version of the software on your computer, then take the download route.

The version of the application at the pyNeighborhood web site is probably newer than the one available through your favourite package manager

Assuming that you’ve decided to download and install pyNeighborhood, remember to first install the software listed above first using a package manager. Why a package manager? It can be time consuming to find, compile, and install all of the required supporting applications and libraries.

First, extract the contents of the archive that you downloaded from the web site. This will create a directory named pyNeighborhood-0.4.1. Assuming that you extracted the archive to your /home directory, do the following: open a terminal window; in Ubuntu, select Accessories from the Applications menu, and then select Terminal. Then type cd pyNeighborhood-0.4.1.

Next, run the command ./configure, which checks to ensure that you have all of the required software installed. If there are no error messages, then type the command make, which compiles the application. Finally, type sudo make install. This command installs pyNeighborhood. You’ll be prompted for the root password (or your password on Ubuntu systems).

Configuring pyNeighborhood

In Ubuntu, the shortcut for pyNeighborhood is added to the Applications menu, under Internet.

Figure 1: the pyNeighborhood window
Figure 1: the pyNeighborhood window

Before connecting to your friendly neighborhood Windows server, there are a few fiddly bits of configuration that you should take care of first. Select Preferences from the Edit menu. On the General tab, you can uncheck the option Remove mount points after unmount; more on this later.

Don't miss out on the other pages!
12next ›last »

Write a full post in response to this!

-2

Do you like this post?
Vote for it!

Copyright information

This article is made available under the "Attribution-NonCommercial-NoDerivs" Creative Commons License 3.0 available from http://creativecommons.org/licenses/by-nc-nd/3.0/.

Biography

Scott Nesbitt: Scott is a writer of various things -- documentation, articles, essays, and reviews -- based in Toronto, Canada. He's been using Linux for work and play almost exclusively since 1999.

notmebug's picture

KDE has support so smb too

Submitted by notmebug on Sat, 2009-02-21 01:15.

Vote!
0

Also kde3 and 4 have samba support. In kde3 you can use konqueor by typing smb:/ in the address bar. Same thing in kde4 with dolphin. 2 ways are better than one, isn't it?

gisham's picture

Thanks!

Submitted by gisham on Sat, 2009-02-21 07:29.

Vote!
0

Just wanted to say thanks, Scott. I've been doing things the hard way, (Vista VM, running Live Mesh) to transfer files to/from my Vista laptop, but this makes things much easier, and set-up was a breeze. Thanks again, and keep up the good work!

--Glen



CariNet: Cloud computing is a reality.

Other sites

Odiogo

Free Software Magazine uses Apollo, project management and CRM for its everyday activities!