Network Transparency with KIO
Kioslaves are out-of-process protocol handling plugins that let you access various services as though they were part of your local filesystem. They can be accessed through the Konqueror file manager and any standard file dialog in most KDE applications. The applications using Kio don't need to be aware of how to access the remote host or device—the ioslave handles it all. This provides powerful and flexible network transparency for KDE applications.
KDE includes a large range of basic kioslaves. Some KDE add-on applications install their own. You can add new kioslaves at any time, and all KDE KIO-aware applications will work with them. If you use Konqueror as a Web browser, you're already using KIO, as the HTTP, HTTPS and FTP protocols are implemented as kioslaves.
The KDE fish kioslave provides a graphical interface for manipulating files over Secure SHell (SSH). Fish should work with any POSIX-compliant UNIX providing it has a Bourne-compatible shell as /bin/sh and basic file manipulation utilities like cat, chgrp, chmod, chown, cp, dd, env, expr, grep, ls, mkdir, mv, rm, rmdir, sed and wc. If Perl is available, it is used instead. In that case, only env and /bin/sh are needed out of the list above, and using Perl has the advantage of being much faster. I've used fish to log in to Linux, FreeBSD, Mac OS X and Solaris with equal success.
Most of what is discussed in this article holds true of the ftp and sftp kioslaves as well, which present much the same interface to the user.
Here, I'd like to use fish to log in to my Apple Macintosh computer to grab some files and copy them locally. Because it's running a variant of UNIX with env and Perl and has sshd running, fish will work with it just fine. To log in to a remote host, type:
into the Konqueror address bar. If your remote sshd is listening on a custom port, you can specify this at the end of the URL:
If this is the first time you've tried to connect to this host over SSH, Konqueror brings up a dialog noting that it cannot verify the authenticity of the host and asks for your input to proceed. Select Yes to indicate that you want to continue connecting to this host. SSH then caches the fingerprint of this host in your ~/.ssh/known_hosts file.
Unless you have SSH keys set up for passwordless login, Konqueror shows a dialog asking you to enter your password. Ticking the box Keep password saves the password into your KWallet. This can be very convenient if you plan to access this host often.
Now I'm logged in and looking at my home directory on the remote host. I need to find the image I want out of the image files stored here. With the size of my digital photograph library, none of the images are named descriptively, and unfortunately, without being able to look at the images, I really have no idea which is the one I want.
One of the areas where fish really shines is the way it lets you preview remote files in much the same way you would preview local ones. KDE's preview mechanism is flexible and powerful, enabling you to see previews of images, PDF files, fonts and office documents as well as listen to previews of audio files.
To enable previews over fish, select Configure Konqueror... from the Konqueror Settings menu. Navigate to Previews & Meta-Data in the dialog that appears. Under Internet Protocols, tick the box next to fish. Adjust the slider beneath Maximum file size to a sane value for the speed of the connection you're using. If you're accessing hosts over the Internet, you probably don't want Konqueror to attempt to generate thumbnail images of 100MB TIFF files. Click OK and you're done.
To fine-tune exactly the specific file types for which you want to see previews, look under Preview in the View menu. Here you can enable various file types for showing previews, and also quickly toggle between enabling and disabling previews globally. If you had a Konqueror window open while adjusting these settings, you may need to click reload before you see any changes.
Now I can see previews of my images, and I've found the one I want. I can drag and drop it to an open Krita window for editing and save my changes afterward directly to the remote host. Or, I simply could copy the file locally for further processing, also using drag and drop.
Fish lends itself well to the simple maintenance of remote Web sites. Tasks like moving, renaming and changing permissions on remote files are easy when you approach them from Konqueror's familiar file management interface.
Changing permissions for files on a Web server is a common task. Often the default permissions on files created on your Linux box can be too restrictive and result in a Forbidden error message when people try to access the files over the Web. To change the permissions of a file over fish, right-click on the file and select Properties. On the Permissions tab choose Can read for both Group and Other permissions, and click OK. If you were changing permissions for a CGI, you also would tick the box labeled is executable.
In KDE 3.5, Kate gained the ability to save a working set of documents as a session to be resumed easily again later. When coupled with fish, this makes, for me at least, the ultimate Web development environment.
To open up all of the HTML, CSS and other files associated with my Web site in Kate, I can drag and drop them from an open Konqueror window showing me a fish session to the remote host. Dragging and dropping multiple files in this way causes them to be opened as separate files that I can navigate between in the Documents pane.
If you prefer to use a more GUI-oriented Web development tool rather than editing files manually in Kate, the full-featured integrated Web development environment, Quanta Plus, is also KIO-enabled.
You can use the File→Open dialog to take advantage of KIO network transparency. All standard KDE file dialogs have support for kioslaves. To load files over fish, select Open from the File menu. In the location bar at the top of the file dialog, type your fish URL:
Navigate to where the files associated with your Web site or where other projects are kept, and open the files you want to be a part of the session. To open multiple files at once, hold down the Ctrl key and click once on each file you want to open. When you're finished selecting files, click Open.
If you plan to access this remote host often, you can add a shortcut to the icon bar on the left of the dialog. Choose the directory to which you want the shortcut to point, and drag it to the icon bar. You can edit the name, icon and other attributes of this shortcut by right-clicking on it and selecting Edit Entry.
Once Kate has loaded the files you want to save as a session, select Save As from the Sessions menu. Enter a name for your new session—as I'm saving various files relating to my Web site, I call my session canllaith.org.
In the future, when you want to load this set of remote files quickly, you can choose the saved session from the Sessions menu. I use this tool time and time again. At the end of a day of working on a Web site and opening various remote files from all over the directory tree, I simply save them as a session with the date and a short descriptive name. Next time, remembering where I left off and what files I was working on is a little bit easier.
Practical Task Scheduling Deployment
One of the best things about the UNIX environment (aside from being stable and efficient) is the vast array of software tools available to help you do your job. Traditionally, a UNIX tool does only one thing, but does that one thing very well. For example, grep is very easy to use and can search vast amounts of data quickly. The find tool can find a particular file or files based on all kinds of criteria. It's pretty easy to string these tools together to build even more powerful tools, such as a tool that finds all of the .log files in the /home directory and searches each one for a particular entry. This erector-set mentality allows UNIX system administrators to seem to always have the right tool for the job.
Cron traditionally has been considered another such a tool for job scheduling, but is it enough? This webinar considers that very question. The first part builds on a previous Geek Guide, Beyond Cron, and briefly describes how to know when it might be time to consider upgrading your job scheduling infrastructure. The second part presents an actual planning and implementation framework.
Join Linux Journal's Mike Diehl and Pat Cameron of Help Systems.
Free to Linux Journal readers.View Now!
|The Firebird Project's Firebird Relational Database||Jul 29, 2016|
|Stunnel Security for Oracle||Jul 28, 2016|
|SUSE LLC's SUSE Manager||Jul 21, 2016|
|My +1 Sword of Productivity||Jul 20, 2016|
|Non-Linux FOSS: Caffeine!||Jul 19, 2016|
|Murat Yener and Onur Dundar's Expert Android Studio (Wrox)||Jul 18, 2016|
- Stunnel Security for Oracle
- The Firebird Project's Firebird Relational Database
- Murat Yener and Onur Dundar's Expert Android Studio (Wrox)
- SUSE LLC's SUSE Manager
- Managing Linux Using Puppet
- My +1 Sword of Productivity
- Non-Linux FOSS: Caffeine!
- Doing for User Space What We Did for Kernel Space
- Google's SwiftShader Released
- SuperTuxKart 0.9.2 Released
With all the industry talk about the benefits of Linux on Power and all the performance advantages offered by its open architecture, you may be considering a move in that direction. If you are thinking about analytics, big data and cloud computing, you would be right to evaluate Power. The idea of using commodity x86 hardware and replacing it every three years is an outdated cost model. It doesn’t consider the total cost of ownership, and it doesn’t consider the advantage of real processing power, high-availability and multithreading like a demon.
This ebook takes a look at some of the practical applications of the Linux on Power platform and ways you might bring all the performance power of this open architecture to bear for your organization. There are no smoke and mirrors here—just hard, cold, empirical evidence provided by independent sources. I also consider some innovative ways Linux on Power will be used in the future.Get the Guide