Hi all!

I use LTSP in a public computer access room.
Terminals are running IceWM, the only availible applications are
Galeon and StarOffice (OpenOffice).

I needed a way to use floppys on terminals, however letting the
users have a full blown file manager as MToolsFM was not
a very good option. MToolsFM itself would have been great
(no mounting hassles).

So I figured I needed a way to restrict MToolsFM to some subdirectory
(users homedir). Ideally this should be an configuration file option
per user, but since I am not a C guru, I only did this little hack:

-------cut-----------
*** mtoolsfm.c.org      Mon Aug 27 08:45:25 2001
--- mtoolsfm.c  Fri Jan 11 19:43:04 2002
***************
*** 954,963 ****
--- 954,964 ----
        if (debug)
          printf ("  filename: %s+\n", path);
        if ((GTK_CHECK_MENU_ITEM (showdots)->active
             || !strcmp (position, "..") || (*position != '.'))
            && strcmp (position, ".")
+           && strcmp (position, "..")
            && (!((pathlen == 1) && (!strcmp (position, ".."))))) {
          current = malloc (sizeof (dentry));
          strcpy (current->name, entry->d_name);
          stat (path, &buf);
          if (S_ISDIR (buf.st_mode))
--------cut-------------

This little patch makes MToolsFM not to display the ".." entry in
filelist so it basically restricts MtoolsFM to the directory it is
started in. It is not possible to change to upper directory.

The users keep their files in $HOME/doc so I made this little
wrapper script:

[root@nipitiri test]# cat /usr/bin/X11/mtoolsfm-ap
#!/bin/sh

cd $HOME/doc
mtoolsfm-ap-bin


Maybe this patch will be usefull to someone.

Andi Lõhmus
andi at nex dot ee







_____________________________________________________________________
Ltsp-discuss mailing list.   To un-subscribe, or change prefs, goto:
      https://lists.sourceforge.net/lists/listinfo/ltsp-discuss
For additional LTSP help,   try #ltsp channel on irc.openprojects.net

Reply via email to