Xfce

Subdomains
 

Easy remote access with Thunar

  • October 12, 2007
  • Mike Massonnet
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”.

Use Epiphany to set your xfdesktop background

  • July 25, 2007
  • Mike Massonnet
Hi ladies ang guys,

As of my blog entry auto-update-background-list-for-xfdesktop I used to tell how I update my background with a uniq file in the background list. That worked with a shell script that 1) took as argument an image file 2) updated the background list 3) and reloaded xfdesktop.

I updated that script and put it in my git (git.m8t.mine.nu). It can now take a remote file as argument. That combined with the web browser Epiphany, you can apply a background within the browser.

Download that script and make it executable inside your $PATH.

Now run Epiphany with the extensions then:
  1. go to Tools > Extension... and enable the Actions extension
  2. After the Actions are enabled go to Edit > Actions
  3. Press Add and create an action called "Update xfdesktop background"
  4. And set the command to "set-xfdesktop-image.sh"
  5. Check Images in the Applies to
  6. Click Add.

Now go to my wallpapers gallery, choose a wallpaper (click on it to get the fullsize), and right click it. You can apply it by choosing the item "Update xfdesktop background" in the context menu.


Have fun with my hack around xfdesktop,
Mike

Auto update the background list for Xfdestkop

  • November 20, 2006
  • Mike Massonnet
I have written a quick script to update the list of the images for the background in Xfdesktop.

#!/bin/sh
# Update the background.list so the new downloaded wallpapers are available
# to show up in Xfdesktop.
LIST=$HOME/.config/xfce4/desktop/background.list
echo "# xfce backdrop list" > $LIST
find $HOME/images/background/ -type f >> $LIST

Note: change in the last line the folder to the backgrounds.

This script can be either putted in an .zshrc file. Or better, if you use Xfce, save the script, under the name update-desktop-list.sh for example, to your personal bin folder (in my case $HOME/.local/bin) which is correctly set in the PATH, and run xfce4-autostart-editor. You can add the command update-desktop-list.sh.

Finally you have to set up Xfdesktop to use the list (located at $LIST) of backgrounds. Go to Settings > Desktop manager, and select the list as the file. If it doesn't exist run the script a first time.