2007-10-13

Easy remote access with Thunar

Update: This is deprecated in favor of gvfs.

Networking support is a hot topic in Thunar, and the most probable answer to a user will be one of the many FUSE tools. For Samba you can use fusesmb. For fish protocol and the like you can use sshfs. The benefit of a FUSE tool is that your remote data is accessible as it were on your file system. This results in the fact that all your applications can access the data, and not only the applications that implement a special API. There is never a need for high privilege, so every user can mount remote data from machines where they already have access. To unmount a fuse file system use the command “fusermount -u /mount/point”.

Fusesmb

Here is a little usage example for fusesmb to show how easy it works.
% fusesmb samba
% ls samba
WORKGROUP MASSONNET
% ls samba/MASSONNET
M8T
% ls samba/MASSONNET/M8T
share music movies cdrom
And if the listed networks are empty or outdated run the fusesmb.cache command:
% fusesmb.cache samba

Sshfs(.sh)

As a prerequisite use an authentication with keys — there are tons of HOWTOs for that and I just picked up that one — otherwise you will be prompted for your password and this is a no-go for a Thunar custom action, unless you set up ssh-askpass…

Sshfs works as simple as “sshfs user@host: /mount/point” to mount the home directory from user on host. I arranged me a tricky Shell script to ease the mount even more. The script takes the hostname — the SSH server — and no further arguments. The hostname is also used as mount point, so you can basically have one directory with several sub-directories, each named after your remote hosts. If the mount point doesn't exist it is created on the fly.
% sshfs.sh /sshfs/m8t
% sshfs.sh /sshfs/someuser@funkyhost
% sshfs.sh myhost.mine.nu

Thunar's Custom Actions

Thanks to the custom actions in Thunar, you can implement a lot of features on your own. I use the sshfs wrapper script to mount remote hosts. See how easy it is to set the next custom action up:


The custom action simply calls “sshfs.sh %n” with the name of the directory. To unmount, you would create a custom action with the command “fusermount -u %f”.

2007-10-07

Some environment decision on my server

It's been a while since I didn't use my server with a decent environment, in fact it was running for months inside a simple tty just to do the basic stuff. A tty isn't that bad, you can control your MPD for example to stop the music or to set up the entire playlist. It is also sufficient for configuration files, and browsing on the WWW for information…

All was fine until my light bulb gave up. Of course I changed it, but with one that had additional 20 watts, and I wasn't happy for the lamp getting warmed up too much. So I choose to light up my hacking space with my server's display. What I was looking for was something with animations… nonono! not that one, plzkthx! The best I can think of is E17 ;-) It has the bling bling that no other environment has.

So I was getting started with E17 again, which I didn't use for hardly two years. The first day was mostly OK, I played with it and tried out different modules — the photo module is nice — and I also ran through bugs and crashes, but nothing blocking. The next day, I tried out more modules and locked myself inside my environment because of the “First Run Wizard” module which states in its description “WARNING!! DO NOT USE!!” which I didn't see -_-

So I talked a bit in #e and raster showed me the enlightenment_remote command to control parts of E17. I just didn't get how to export the E_IPC_SOCKET variable but now I do! So I finally decided that it was easier to delete the main configuration file which was actually a good thing because after that I had more options than before :-)

The desktop is now all simple and beautiful and shiny and lighty and blinky and decent. I have my workspaces with different tasks like music player, IRC, a web browser (Midori), and so on. My last addition is a simple script to put inside my cron table which switches the background. I run it every 30 to 60 minutes, depends of my mood. I really like the smooth background changes in E17 :-)

Light is back, fun is in too.