Next Previous Contents

1. How to use virtualfs (some examples)

After installing the apropriate glibc update and virtualfs itself you must run one command to make virtualfs works. It is called virtualfs. Here are some examples:

1.1 Cdrom and floppy

To simplify access to CD and floppies (no mount and umount needed anymore), you must run the remaudioserv (virtualfs-server package). It is the one responsible for doing the mount and umount as needed.

Note that once virtual-server is running on a workstation, you can telnet to another host and enable virtualfs there and you will have transparent access to the floppy and cdrom on the workstation. This was done especially for X terminal users.

Here a small virtualfs session.

Once virtualfs is enable, here are some examples of the things you can do with it

        # Switch to your home directory
        cd
        # Put a CD in and view the content of the root directory (of the CD)
        cd n/cdrom
        ls -l
        # Remove the CD. You can remove it even if your current directory
        # is "inside" the CD.

        # Put another CD in and view its content
        ls -l
        
        # You can do the same thing with the floppy
        cd
        cd n/a:
        ls -l
        # No mount or umount necessary.
        

1.2 Network volumes (Smb/Windows and Novell)

You can access network volumes, on demand. No more smbmount or ncpmount. Further, each user may access the various servers using their own user account on those servers. Note that smbmount and ncpmount must be setuid for this to work.

Access to network volumes is done by the persmount virtualfs driver. This drivers is configured using the .persmount file in your home directory.

        # Create a file .persmount in you home and enter a line like
        # (where server is the name of an NT or Samba server)
        # server        /usr/X11R6/bin/xterm -geometry 65x4 -title password -e /usr/bin/smbmount //server/tmp -c "mount .n/server"
        # then you can do
        ls -l ~/n/server

        # and a popup will request the password. Then the listing will show.
        # You can add as many lines as needed in .persmount
        

1.3 Accessing file servers without file services

Here is a scenario. There is a server on the internet. The only access you have on this server is ssh (Secure SHell). The only way you can copy files back and forth is by using ssh and scp (Secure CoPy). Not so fun. Unfortunaly, for security reasons there is no file services you can use, not even ftp. Enter LiteFS.

Assuming the server is called remserv, create a file in your home called .litefs. Enter the following line (folded in two lines in this document). This example assumes that you are primarily interested in maintaining the files in /home/httpd/html on the server.

        remserv .remserv        /usr/bin/litefs-proxy --fork --socket .dns --exec ssh remserv \
                litefsd --pipe --chdir /home/httpd/html
        

Then you can do normal file operation in the sub-directory n/remserv of your home directory. Note that for this to work, you must append your file .ssh/identity.pub to the file .ssh/authorized_keys on remserv account. Unless you do that, ssh will require a password and the litefs connection won't work. I have not found a way to let ssh request its password, using a popup windows (under X) for example.

1.4 Using the sound card on a remote workstation

The remaudio virtualfs driver (enabled by default by the virtualfs command) perform redirection/virtualization of the various sound devices (/dev/audio, /dev/mixer). Enable virtualfs and use any unmodified sound utility and they will "play" on your workstation sound card.

You can play music CD also as the /dev/cdrom device is also redirected.


Next Previous Contents