"Computers make very fast, very accurate mistakes."

Beginner's Guide to Debian Etch

Wednesday 11th April 2007

Categories: Guides, GNU/Linux, FLOSS

Mounting in a GUI

If you want access things such as CDs and USB sticks while in a GUI, you have two main choices. The first is to let the system deal with it and automount everything that gets connected - in other words, you stick a device in, and you can access virtually straight away.

In GNOME, this is achieved by installing gnome-volume-manager. You can also use this in KDE, although it means pulling in GNOME dependencies - a problem if you're concerned about hard drive space and perhaps memory consumption.

You can also mount the devices when you want - the easiest way to do this in GNOME is to make sure you have hal and gnome-applets installed. Then, right-click on a panel (I normally choose the top one owing to the fact that there's little on it by default) and choose 'Add to Panel...'. Find and add the entry called 'Disk Mounter'. Now, every time a device is inserted, whether it be CD, DVD or USB device, it should pop up as an icon in the applet. Just click the icon and hit 'Mount device' (where device is whatever has been inserted) and voila! You can open the device from the same menu. Once you're done, you can unmount/eject the device from the same menu.

Printers

Adding printers is fairly straightforward. First of all, you'll need cupsys installed, and probably also foomatic-db, foomatic-filters-ppds and foomatic-filters to get the full range of drivers. If you're running GNOME or KDE, then you should have configuration utilities already installed in order to install printers - GNOME's is included in gnome-cups-manager. The steps to install a printer from within these utilities is straightforward enough, so there's little need for an explanation here. Alternatively, you can use a web interface by going into a web browser, and entering localhost:631 as the address in order to edit the settings.

Note, however, that support on Debian, and Linux generally, depends greatly on the printer manufacturer. HP generally has excellent support with the packages hpijs, hpijs-ppds and hplip, but others may not be so well supported. A good place to check for support is linuxprinting.org.

Networking

To be able to see and access other machines on the network, in particular those running Windows or Samba, then you'll need to make sure that the packages smbclient and samba-common are already installed. Now, you have three main choices:

The first is to use a file browser, such as Nautilus or Konqueror, to access the shares. Thunar, XFCE's file manager, does not yet have this ability.

If in GNOME, then hit 'Places' on the panel, and then 'Network Servers'. From here, you should be able to see all of the Windows machines. From within Nautilus, open the 'Go' menu, and then select 'Network' to get the same screen.

If using Konqueror, then use the 'Go' menu and select 'Network Folders'. You then want to select 'Samba Shares' to view all of the Windows and Samba shares on the network.

With Windows machines, you'll generally be asked for a username and password. However, if anonymous browsing is allowed, but you want to be a specific user (for instance, some shares may only be viewable by certain users), as frequently occurs when accessing Samba shares hosted on a Linux machine, then you need to add a couple of steps. Firstly, navigate to the machine you want, so that you're viewing all of the shares.

If you're using Nautilus, hit Ctrl+L, so that you can see the current address. It should be in the format smb://nameofmachine. To login a specific user, change this to smb://user@nameofmachine, replacing user and nameofmachine with your username and the name of the machine respectively. You'll then get a prompt asking for a password, which, once entered, should allow you to browse that machine as the user specified.

If you're using Konqueror, then change the location from smb://nameofmachine to smb://user:password@nameofmachine. Of course, showing your password in this manner isn't terribly secure (meaning that somebody could just look over your shoulder), so if you do use Konqueror, you might want to consider an alternative method of accessing shares.

The second choice is to use LinNeighborhood (packagename linneighborhood). This will allow you to browse all of the shares on the network. If you want to access a machine as a specific user, rather than anonymously, then just right-click that machine and hit 'Scan as user'. Then, pick the share you want to access, double-click it (or right-click and select 'mount'), enter a username/password if necessary, and hit 'Mount'. Then, you should be able to access the share from wherever you mounted it - the default is /home/user/mnt/MACHINENAME/sharename, although of course you can change this at your leisure.

The final method is to mount it yourself. To do this, just use the command smbmount //machine/share /path/to/mount/point, or smbmount //machine/share /path/to/mount/point -o username=username if you need to use a username/password. Once you've finished, you can unmount the share by typing smbumount /path/to/share.

To set up shares, you still need Samba installed. From here, you have two main choices - install and setup a package called swat (not covered here), or use the utilities of the desktop environment.

In GNOME, you'll need the package gnome-system-tools to be installed. Then, go to the Desktop menu, and find Shared Folders within Administration. In KDE, make sure is installed. From the KDE menu, choose the Settings entry under Actions, followed by Internet & Network, and finally File Sharing. This package also provides the entry Samba under the same menu, allowing you to configure more than just what files are shared.

For a similar utility in GNOME, try gsambad.