Using remote servers from KDE with Konqueror

Giving KDE a whirl, one of the first things I found that I miss from gnome is the ability to right click and add a remote server location to the desktop (or wherever you are).

At work I currently let Espresso manage my remote file handling for me, which keeps things neatly sorted in one system. When I’m in a windows environment, as I was at the previous job, the WinSCP / Notepad++ combo worked well and had the added bonus of what I consider my favorite small-scale editor. At home while using gnome, I’ve been using the system-based server connection and gedit and have no complaints.

With KDE, the all-purpose web and system browser Konqueror handles sftp better than a lot of sole-function FTP clients I’ve used in the past. Enter the desired URL in the search bar and Konqueror handles the rest. The URL should look like:

sftp://username@your.remote.server.address.com

On first connection to the site, you’ll be prompted to add the remote site to your list of known hosts. This is a standard necessity for ssh-based connections and adds the convenience of allowing the use of public key authentication. So that I can login quickly and not have to type those pesky passwords, I’ve added my home machine’s rsa key to the servers at work, in addition that for my work laptop. Oh the time it saves.

If you’re not using public-key authentication (which you wouldn’t be the first time you’re connecting), you’ll then be prompted to enter a password, as well as a user name if you didn’t provide one in the connection. Enter those and you’ll be all set. Konqueror provides the typical file directory views with previews and details pages, but changes to that setting don’t impact normal browsing. You can add the sftp site to the bookmarks list and your login information is preserved the same as it would be for a typical site.

So, what’s the general linux nicety that makes this even more useful? Shortcut keys for any action. If you haven’t already gone wild setting up a keyboard or mouse gesture shortcut for everything you open routinely, this is a great time to start. In the System Settings service, browse to ‘Input Actions’. (screenshot to be added)
Though you could do some similar things in Windows, the ‘meta’ key is vastly underused, so I use it when setting my triggers. Combine that handy functionality with starting a browser with a specified location and you have a 2-key combination hotkey which opens your sFTP connection immediately. To set that up, add a new ‘global shortcut –> command/url’ and set the action as

konqueror 'sftp://login@site.com'

And you’re off to the races.

One possible upside to using Konqueror as an sFTP utility is that you could use scite as your editor and get around the gaping hole which doesn’t allow scite to edit remote files. That said, file changes are still not made to the remote file on save in scite, since they’re only modifying the tmp file. To modify the remote file, you have to close the file in scite, which seems like it almost nullifies the benefits that the editor provides, since you’ll be constantly closing and opening the file. Both KWrite and gEdit work as expected, saving to the remote file on the fly.