This is the mail archive of the cygwin-xfree@cygwin.com mailing list for the Cygwin XFree86 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: XFree and File Systems


On Tue, 31 Dec 2002 10:28 am, Alexander Gottwald wrote:
> Martín De Marchi wrote:
> > Hi!
> >
> > I'm developing a linux application, but the majority
> > of the pc's in my organization have installed windows
> > system, so Im going to install cigwin's xfree in the
> > machines and use the linux application remotely.
> > I need that the user (windows system) use the
> > remote linux application (via xfree) and see the
> > local windows file system (not the linux file system)
> > for load and save files, to use the local printer.
> > Is there any way for configure X and make this?
>
> No. Using the remote application is like walking to the linux pc and
> working there. You don't have access to the windows host. The only way
> to exchange files is to use a network filesystem (SMB or AFS) and access
> this from linux and windows. Same for the printer.

The best and easiest way is to have a central server (eg NT, 2000, XP or for 
an open-source GPL solution, Mitel SME/E-Smith) with each user with a 
directory on the server \\centralserver\username.

Then have something along the lines of:

mkdir -p $HOME/windows
smbmount //centralserver/$USER $HOME/windows

called when they either log onto the linux box (via XDMCP) or run the program 
(via ssh for example).  Exact implementation will depend on whether you are 
using XDMCP or ssh and various other factors.

If you don't have a central windows (like) server, then I would recommend 
looking at the GPL version of Mitel SME (http://www.e-smith.org) - it is 
essentially a free NT server replacement without any user-license 
restrictions.

If you *really* want the user to be looking at their local filesystem, and you 
are using ssh, then something along the lines of:

WINDOWS_IP=`echo $SSH_CLIENT | cut -d' ' -f 1`
mkdir -p $HOME/windows
WINHOST=`nmblookup -A $WINDOWS_IP | head -n 2 | tail -n 1 | tr -s  [:blank:] ' 
' | cut -d ' ' -f 2`
smbmount //$WINHOST/c$ $HOME/windows

in either the logon script of your linux box, or in the start-up script of 
your program may do the trick.  (The above assumes the same usernames on the 
Windows and Linux box.)

If using XDMCP, then replace the first line with:
WINDOWS_IP=`echo $DISPLAY | cut -d= -f 2 | cut -d: -f 1`

In all the above, there are various issues with passwords and security that 
would need to be resolved before using in a production situation.  See the 
manpages.

You may also want to change //$WINHOST/c$ to //$WINHOST/mydocs or whatever.

Cheers,

Rasjid.

-- 
Rasjid Wilcox
Canberra, Australia (UTC +10 hrs)
http://www.openminddev.net


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]