Excerpt from “More Debian 8 for Beginners”

(This is a draft for one of the chapters.)

Networking with Windows

It’s rather common for computers to share Internet access from within the same living quarters or an office network. If your Debian box is connected to such a network, chances are you share that connection through a machine or device that is, in part at least, what we call a network switch. For example, a typical home router is also a switch, allowing several computers to connect. The computers connected to this switch or router constitute a Local Area Network (LAN). This generally includes any computers connected via wifi to the same switch/router. The point is that you have one device providing all the others with an internal network system, handing out internal IP addresses and so forth.

One of those services typically running on Windows that most people never use and don’t know about is Server Messenger Bus (SMB). Linux knows how to use this protocol, but we call it Samba. In fact, Linux machines can run this service, too, but for now, we’ll focus on using the Samba server already running on Windows machines. That is, you can use your Debian computer to connect to the Windows SMB service with just a little effort, and log into a Windows machine to access the files and maybe even the printer.

This won’t work from Debian by default. We need to add a couple of packages, which will pull in a few dependencies:

gvfs-backends
fusesmb

Once you have this, you can open up Thunar using the “Home” icon on your desktop. If you have the left pane displaying links, you’ll see an icon labeled “Browse Network.” Click on that and after a second or two you should see a list with at least one item: “Windows Network.” However, if Debian can identify any of the systems on that network, it will list them separately. In Linux Land, we refer to that as the “host name;” whatever it was the person installing decided to name their Windows box. If you click on that, you will probably be asked to log in, so you’ll need an account there with a user name and password.

Once you get past that, you’ll be presented with a list of places you are allowed to browse. You can figure it out from there, but files you are likely to want are under the “User” folder, then in either Public or some account folders. Keep poking around to find what you need. You should have permission to copy or move files between the two systems, and delete or edit files right on the Windows “server” itself.

If you intend using any printers connected to the Windows computer, you’ll need to do the research and find out how to configure Windows to assign share names to the printers. Essentially you dig into the printer properties and select to share it, when you’ll be given a chance to assign a share name. Keep it simple but unique to that printer.

Do the research and find out if that printer is supported by the printer system that runs on Debian (CUPS). Debian 8 comes with a fairly recent list already installed (unless you de-selected the print server during installation). The official list for CUPS itself is here. If Debian doesn’t have the particular driver installed, you can download the latest version from the Open Printer website; look for “directly download PPD” from the page that displays when you select a specific printer model. Then, at the point where you select your driver in the printer setup on Debian, simply opt to load the PPD from wherever you downloaded it.

Next, install two more packages in Debian:

smbclient
cifs-utils

These two will bring in a load of dependencies that mostly allow you to synchronize Windows type permissions on your Debian system. Now, in your main menu, go to System > Print Settings. Select to add a printer, where you’ll need to give your root password. This will open a dialog that includes a left pane showing an option for network printing. Click on this to open a list and at the bottom should appear something about Windows and Samba. Click this to open a new configuration window where you need to fill in the host name of the Windows computer and a user account login details. It should detect one or more printers, whatever is configured for sharing. The rest should be pretty obvious, but the tricky part is selecting the proper driver, as previously noted.

If you simply cannot make this work, there’s no shame in copying files for printing to the Windows computer and printing them from there. We’ve already set up file sharing access. Frankly, Windows drivers tend to work better than CUPS drivers do because the manufacturers make their money on the Windows version.

This entry was posted in Uncategorized and tagged , , , , , , , , . Bookmark the permalink.