Cooking with Linux - It's a Cross Platform, All Right!
Yes, I admit it, François. That's very funny. When I told you that this month's theme was cross-platform development, I didn't mean platforms that make you cross, although I can understand thinking of some OSes as cross platforms. As amusing as those images are, I think the artwork you chose for the menus tonight might raise a few eyebrows, despite our, shall we say, sympathetic audience.
Speaking of which, I see that our guests have arrived. Welcome, mes amis, to Chez Marcel, home of exceptional Linux fare, one of the world's greatest wine cellars and the greatest customers in the world. Make yourselves comfortable. François and I were discussing the theme of this month's issue, cross-platform development, and my waiter was getting a little rambunctious. It almost seems as though we should bring out a white Zinfandel for this, but luckily, we have none in stock. François, to the cellar, immédiatement! Bring up the 1992 Napa Valley Cabernet Sauvignon. Vite!
As many of you know, Microsoft Windows remains a part of the average business IT department. Many of us must be able to exchange information between Windows and Linux. For example, somehow you convinced management to let you run Linux on your workstations instead of Windows. Maybe you are using your own notebook. Whatever the reason, you now are going to have to deal with the Windows workgroup or domain and the appropriate shared files and printers. Although Jon in accounting isn't particularly fond of his Windows XP box, many important files are shared from that machine, files that are shared in the network neighborhood.
You might ask yourself how easy it is to take advantage of the network neighborhood. This is an interesting question considering how many file and print servers out there aren't running Windows but Linux, providing the file sharing experience through Samba. Consequently, it isn't surprising that Samba-compatible client software tends to come as part of the standard installation on most modern Linux distributions. What that means is you can connect to a Windows share on the network using the smbclient program, started with smbclient -L sedna, which would produce a report of shares that looks something like this:
Domain=[ACCOUNTING] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]
Sharename Type Comment
--------- ---- -------
SEDNA_C Disk
IPC$ IPC Remote IPC
Reports Disk
Policies Disk
Assuming you had permission to view the Reports folder, you could connect to it like this:
smbclient //sedna/reports -U winuser
In the above example, I am connecting to a Windows XP box from my Linux workstation as user winuser. The system then asks me for a password, after which I am taken to a Samba prompt that looks like this:
Domain=[ACCOUNTING] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager] smb: \>
From there, type help and smbclient offers up a list of all the things you can do while connected using the commands at your disposal. A number of them are obvious things, such as dir, copy and so on. Although all of this is good, it's not pretty in the graphical sense and you can't use this while working in your graphical file managers or inside OpenOffice.org's applications.
Whether you are using KDE or GNOME as your desktop environment, rest assured that all the tools you need to join the network neighborhood are right there at your disposal. Best of all, it's extremely easy to do. Let's start by taking a look at Konqueror.
Open up Konqueror (either as the file manager or the browser) and type smb:/ in the Location field.
Samba servers or Windows machines advertising network shares first appear in the browser window under their workgroup name (for example, ACCOUNTING, SALESGRP). Figure 1 shows a Konqueror session with a two-panel view; click Window on the menubar and select Split View, Left/Right. In the left panel, we have the basic network browser view with three active workgroups. In the right-hand panel, I've clicked on the ACCOUNTING workgroup to show the computers belonging to that group.
To read, write or otherwise make use of the files shared on those computers, double-click on the corresponding folder for that computer—François' computer for instance. All of the available shared directories (or folders) then are visible (Figure 2).
From here, it's all classic drag and drop, graphical file manager browsing. By clicking (or double-clicking, depending on the configuration), I can go inside the cooking folder, locate the appropriate document and open it with OpenOffice.org Writer if I choose. (Right-click on the file, select Open with and voilà, I'm editing a document on a shared Windows resource.)
Ideally, we don't want to go through this whole navigation process each and every time. To bring a given network share a few clicks closer, simply bookmark the appropriate shared folder.
Over on the GNOME side of things, we have Nautilus. You should find the process similar to what we went through with Konqueror. Start Nautilus and type smb:/// in the Location bar. Nautilus then displays the active workgroups on the network (Figure 3).
From there, you can double-click on one of the workgroups to select a computer. Then, from the list of computers, double-click on your choice, and you can browse the individual resources offered (Figure 4). Be aware that when you move around from computer to computer like this, you occasionally may be asked for a user name and password for that computer or even the specific folder.
As with the Konqueror example before this, you can save yourself a little time by bookmarking the folder of your choice. The problem with both of the suggestions I've made is that neither of them lets you permanently mount network drives. Accessing a particular folder requires that you do a little command-line work, an easy enough process but not quite the point-and-click ease that Windows users on your network want to see. Let's have François refill our glasses while we take a look at a way to solve this dilemma.
For a more robust and flexible means of working in and with the network neighborhood, you simply must take a look at Smb4K, a super-classy SMB browser tool that also is flexible and powerful. Furthermore, Smb4K makes it possible to preview shares, mount shares locally without needing to run as root, reconnect automatically on startup and more.
At the time of this writing, Smb4K was sitting at the 0.3.2 release, but I found it to be a capable package and definitely worth the time it takes to investigate. Binary packages for Debian, SuSE and Fedora are available from the site, as is the full source. Building Smb4K from source is as easy as the classic extract and build five-step:
tar -xzvf smb4k-0.3.2.tar.gz cd smb4k-0.3.2 ./configure --prefix=/usr make su -c "make install"
When you have installed the package, run the program by calling smb4k. As soon as you start Smb4K, it scans the network looking for active shares. You can fine-tune its functionality, including such options as whether you want shares to be reconnected automatically by clicking on Settings in the menubar and selecting Configure Smb4K. The graphical interface is intuitive and easy to navigate, and the package as a whole is easy to use.
The display is divided into a left-hand side navigation panel where workgroups, computers and shares can be listed and navigated. To mount a share, right-click on it and select mount. If you would rather see what you are getting into first, choose Preview instead.
Mounted drives appear in the top right-hand window as drive icons. Double-clicking on one of the drive icons calls Konqueror. If you run df from the command line, you see that the drives now are mounted for your use in your own home directory under an Smb4K directory prefix. For instance, for the example in Figure 5, the listing looks like this:
Filesystem Size Used Avail Use% Mounted on //SEDNA/Reports 4.0G 3.0G 1.1G 75% /home/marcel/smb4k/SEDNA/Reports //FRANCOIS/wine 13G 8.8G 3.3G 73% /home/marcel/smb4k/FRANCOIS/wine
Now, any of my applications—whether KDE, GNOME, shell-based or anything else—can access the shares. Being part of the neighborhood has never been easier.
Mon Dieu, mes amis, closing time has come so quickly. François, would you be so kind as to refill our guests' glasses a final time? We certainly don't want anyone going home cross, and with the items on today's menu, the neighborhood's doors all are open to you. Until next time, mes amis, let us all drink to one another's health. A v�re sant� Bon app�it!
Resources for this article: /article/7548.
Marcel Gagné (mggagne@salmar.com) lives in Mississauga, Ontario. He is the author of Moving to Linux: Kiss the Blue Screen of Death Goodbye! (ISBN 0-321-15998-5) from Addison Wesley. His first book is the highly acclaimed Linux System Administration: A User's Guide (ISBN 0-201-71934-7). In real life, he is president of Salmar Consulting, Inc., a systems integration and network consulting firm.
Today’s modular x86 servers are compute-centric, designed as a least common denominator to support a wide range of IT workloads. Those generic, virtualized IT workloads have much different resource optimization requirements than hyperscale and cloud applications. They have resulted in a “one size fits all” enterprise IT architecture that is not optimized for a specific set of IT workloads, and especially not emerging hyperscale workloads, such as web applications, big data, and object storage. In this report, you will learn how shifting the focus from traditional compute-centric IT architectures to an innovative disaggregated fabric-based architecture can optimize and scale your data center.
Sponsored by AMD
Built-in forensics, incident response, and security with Red Hat Enterprise Linux 6
Every security policy provides guidance and requirements for ensuring adequate protection of information and data, as well as high-level technical and administrative security requirements for a system in a given environment. Traditionally, providing security for a system focuses on the confidentiality of the information on it. However, protecting the data integrity and system and data availability is just as important. For example, when processing United States intelligence information, there are three attributes that require protection: confidentiality, integrity, and availability.
Learn more about catching the bad guy in this free white paper.
Sponsored by DLT Solutions
Free Webinar: Linux Backup and Recovery
Most companies incorporate backup procedures for critical data, which can be restored quickly if a loss occurs. However, fewer companies are prepared for catastrophic system failures, in which they lose all data, the entire operating system, applications, settings, patches and more, reducing their system(s) to “bare metal.” After all, before data can be restored to a system, there must be a system to restore it to.
In this one hour webinar, learn how to enhance your existing backup strategies for better disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible bare-metal recovery solution for UNIX and Linux systems.
| Making Linux and Android Get Along (It's Not as Hard as It Sounds) | May 16, 2013 |
| Drupal Is a Framework: Why Everyone Needs to Understand This | May 15, 2013 |
| Home, My Backup Data Center | May 13, 2013 |
| Non-Linux FOSS: Seashore | May 10, 2013 |
| Trying to Tame the Tablet | May 08, 2013 |
| Dart: a New Web Programming Experience | May 07, 2013 |
- New Products
- Making Linux and Android Get Along (It's Not as Hard as It Sounds)
- Drupal Is a Framework: Why Everyone Needs to Understand This
- A Topic for Discussion - Open Source Feature-Richness?
- Home, My Backup Data Center
- RSS Feeds
- What's the tweeting protocol?
- New Products
- Trying to Tame the Tablet
- Dart: a New Web Programming Experience
- Reply to comment | Linux Journal
14 hours 40 min ago - Reply to comment | Linux Journal
17 hours 13 min ago - Reply to comment | Linux Journal
18 hours 30 min ago - great post
19 hours 5 min ago - Google Docs
19 hours 28 min ago - Reply to comment | Linux Journal
1 day 16 min ago - Reply to comment | Linux Journal
1 day 1 hour ago - Web Hosting IQ
1 day 2 hours ago - Thanks for taking the time to
1 day 4 hours ago - Linux is good
1 day 6 hours ago









Comments
Samba 3.x
SMB4K Not work in samba 3.x correctly...
Re: Samba 3.x
Yes it does. I'm Using version 3.0.2a Mandrake 10 works perfectly
Re: It's a Cross Platform, All Right!
The date on this article is Thursday, July 01, 2004
we are only June 10
An error occurred while loading smb:/
I make quite a lot of use of smbclient from the command line so I was very pleased to see this article. However, when I tried out his first suggestion of using konqueror to join my network neighbourhood I got this message when I typed smb:/ into the Location field. I've googled this error message but not really got anything useful. I am using Konqueror 3.1.1 on KDE 3.1.5 and Kernel 2.2.20.
"An error occured while loading smb:/:
Could not start process Unable to create io-slave:
klauncher said: Error loading 'kio_smb'."
Nigel
kio_smb
i had to install samba and openldap-client.
After that Konqueror could brows via smb:/
solved on my system by
solved on my system by ensuring that libsmbclient.so (installed to /usr/local/samba/lib/ by make install of samba from source) was symlinked from /usr/lib/
ldd of kio_smb.so was how I figured it out - there was a dynamic link dependency reporting "Not found".
Needed a symlink as libsmbclient.so.0 btw.
H
Thanks.
libsmbclient.so.0 was not found in my case.
# locate kio_smb.so
/usr/lib/kde3/kio_smb.so
# ldd /usr/lib/kde3/kio_smb.so|grep 'not f'
libsmbclient.so.0 => not found
# yum -y install libsmbclient
Check that you have kio_smb i
Check that you have kio_smb io-slave. There was reported an error with samba 3.0.8, that kdebase would not compile samba support. The same happens if you do not have samba on your system.
Re: An error occurred while loading smb:/
Could it be that you need another slash (/) at the end of the line? eg: smb://
Re: An error occurred while loading smb:/
I'd suggest that you would upgrade your KDE setup, it's quite old.
It's possible, that your samba libraries (libsmb) are not compatible with kio_smb -ioslave.