PortableLyX?

2006-04-27 Thread Sam Lewis
 "LyX works extremely well under the Windows operating system!"
  
  
  Outside the office away from the ones own computer, I've been using LyX 
1.3.3-Win32 on a USB stick. It works "extremely well" and enables me to access, 
edit and spell check my fieldnotes, in visiting institutions, by running LyX on 
public workstations where I've no administrator rights.
   
   Now, having experienced the latest version of LyX, I've tested 1.4.1 on a 
USB stick. All good, if there wouldn't be the aspell dilemma! As LyX is 
compiled against libaspell.a and expects to find aspell dictionaries and data 
files in a predefined location portability has been lost.
   
  I'm interested in underlying decisions of having complied LyX Windows in this 
specific way nowadays. Are there considerations about integrating aspell in a 
different way and moreover is there generally a wider interest in the community 
in a portable LyX?
   
   Cheers, Sam




Re: PortableLyX?

2006-04-27 Thread Stephen Harris

Sam Lewis wrote:

   

> I've tested 1.4.1 on a USB stick. All good, if there wouldn't
> be the aspell dilemma! As LyX is compiled against libaspell.a
> and expects to find aspell dictionaries and data files in a
> predefined location portability has been lost. ...


Are there considerations about integrating aspell in a



different way and moreover is there generally a wider



interest in the community in a portable LyX?
   
   Cheers, Sam





Regarding the C:\Aspell limitation to portability, perhaps the
dos subst or label command would serve as a workaround. Suppose
your USB drive was "J", then

label J: C:

I think would change J:\Aspell into C:\Aspell
if not perhaps the subst command would suffice called from J:

Regards,
Stephen



Re: PortableLyX?

2006-04-27 Thread Robert Orr

Sam,

I wonder if you might be able to provide some
instructions on how to make a usbstick compatible LyX?


--- Sam Lewis <[EMAIL PROTECTED]>
wrote:

>  "LyX works extremely well under the Windows
> operating system!"
>   
>   
>   Outside the office away from the ones own
> computer, I've been using LyX 1.3.3-Win32 on a USB
> stick. It works "extremely well" and enables me to
> access, edit and spell check my fieldnotes, in
> visiting institutions, by running LyX on public
> workstations where I've no administrator rights.
>
>Now, having experienced the latest version of
> LyX, I've tested 1.4.1 on a USB stick. All good, if
> there wouldn't be the aspell dilemma! As LyX is
> compiled against libaspell.a and expects to find
> aspell dictionaries and data files in a predefined
> location portability has been lost.
>
>   I'm interested in underlying decisions of having
> complied LyX Windows in this specific way nowadays.
> Are there considerations about integrating aspell in
> a different way and moreover is there generally a
> wider interest in the community in a portable LyX?
>
>Cheers, Sam
> 
> 
> 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


Re: PortableLyX?

2006-04-28 Thread Abdelrazak Younes

Sam Lewis a écrit :

 "LyX works extremely well under the Windows operating system!"
  
  
  Outside the office away from the ones own computer, I've been using LyX 1.3.3-Win32 on a USB stick. It works "extremely well" and enables me to access, edit and spell check my fieldnotes, in visiting institutions, by running LyX on public workstations where I've no administrator rights.
   
   Now, having experienced the latest version of LyX, I've tested 1.4.1 on a USB stick. All good, if there wouldn't be the aspell dilemma! As LyX is compiled against libaspell.a and expects to find aspell dictionaries and data files in a predefined location portability has been lost.
   
  I'm interested in underlying decisions of having complied LyX Windows in this specific way nowadays. Are there considerations about integrating aspell in a different way and moreover is there generally a wider interest in the community in a portable LyX?


AFAIK, the problem is not within LyX but in Aspell. Indeed Aspell 
dictionaries are not relocatable (under Windows); this means that they 
must be installed in the same path where they have been compiled. One 
needs to investigate Aspell source code as to know if this could be fixed.


Abdel.

   
   Cheers, Sam








Re: PortableLyX?

2006-04-28 Thread Sam Lewis
Stephen Harris <[EMAIL PROTECTED]> writes:

[...]

> 
> Regarding the C:\Aspell limitation to portability, perhaps the
> dos subst or label command would serve as a workaround. Suppose
> your USB drive was "J", then
> 
> label J: C:
> 
> I think would change J:\Aspell into C:\Aspell
> if not perhaps the subst command would suffice called from J:
> 

Thanks for this Stephen! Sounds interesting. I've no experience with dos
commands, but does subst not require adding a line to a file in the root
directory, which appears to defeat portability? Likewise, does the "label"
command not require admin rights too?

Cheers, Sam




Re: PortableLyX?

2006-04-28 Thread Sam Lewis
Robert Orr <[EMAIL PROTECTED]> writes:

> 
> 
> Sam,
> 
> I wonder if you might be able to provide some
> instructions on how to make a usbstick compatible LyX?
> 

No problem; it's rather straight forward. You could just install directly onto
your usb stick. Alternatively, create a directory on your desktop called (e.g.
PortableLyX) install everything in there (msys, python, lyx, etc.) and drag the
folder directly onto your usb stick.

I have not installed a latex distribution, as I only need LyX outside my office
to organise my notes. I would assume that miktex might also work on a stick, but
I can’t confirm this. However, I tested LyX 1.3.3-Win32 on a USB stick with a
latex distro on a network drive. It was rather slow but enabled me to export
pdflatex, after reconfiguring LyX.


Hope this helps. Let me know your results.

Cheers, Sam



Re: PortableLyX?

2006-04-28 Thread Sam Lewis
[...]

> 
> AFAIK, the problem is not within LyX but in Aspell. Indeed Aspell 
> dictionaries are not relocatable (under Windows); this means that they 
> must be installed in the same path where they have been compiled. One 
> needs to investigate Aspell source code as to know if this could be fixed.
> 
> Abdel.


Thanks Abdel for shedding light onto the Aspell design.

Yet, how does aspell work with LyX 1.3.3-Win32? There you find dictionaries in
lyx\share\aspell and dynamically linked aspell libraries in \lyx\bin . 




Re: PortableLyX?

2006-04-28 Thread Abdelrazak Younes

Sam Lewis a écrit :

[...]

AFAIK, the problem is not within LyX but in Aspell. Indeed Aspell 
dictionaries are not relocatable (under Windows); this means that they 
must be installed in the same path where they have been compiled. One 
needs to investigate Aspell source code as to know if this could be fixed.


Abdel.



Thanks Abdel for shedding light onto the Aspell design.


You're welcome.


Yet, how does aspell work with LyX 1.3.3-Win32? There you find dictionaries in
lyx\share\aspell and dynamically linked aspell libraries in \lyx\bin . 


No, I think lyx-1.3.x uses the Aspell executable directly via a pipe or 
something. I guess this executable knew how to retrieve the dictionaries 
via relative paths.


I agree we need to do something about this Aspell mess on windows.

Abdel.




Re: PortableLyX?

2006-04-28 Thread Paul A. Rubin

Sam Lewis wrote:

Stephen Harris <[EMAIL PROTECTED]> writes:

[...]


Regarding the C:\Aspell limitation to portability, perhaps the
dos subst or label command would serve as a workaround. Suppose
your USB drive was "J", then

label J: C:

I think would change J:\Aspell into C:\Aspell
if not perhaps the subst command would suffice called from J:



Thanks for this Stephen! Sounds interesting. I've no experience with dos
commands, but does subst not require adding a line to a file in the root
directory, which appears to defeat portability? Likewise, does the "label"
command not require admin rights too?



I don't think this will work.  Assuming you had Aspell installed on the 
memory stick, and assuming the memory stick was installed as drive J:, 
you would need to use 'subst c: j:' (and would need to have Aspell 
installed in J:\Aspell).  The problem, though, is that the subst command 
would map *all* reads of C: to J: -- which means the OS would be looking 
for all the Windows files, etc. on J.  My guess is that this would 
render the system unusable until you rebooted, but I'm just guessing.


If you have write privileges on the host systems, what about modifying 
the lyx.bat batch file (I assume this is what you use to start LyX) to 
copy the Aspell directories from the memory stick to C:\Aspell (assuming 
it was not already installed) before launching LyX itself?  You could 
also write a small batch file to delete C:\Aspell when you were done.


/Paul



Re: PortableLyX?

2006-05-11 Thread Michael Wojcik
[This is a rather late followup - I'm catching up on personal email - 
but may still be of interest.]


Stephen Harris wrote:


Regarding the C:\Aspell limitation to portability, perhaps the
dos subst or label command would serve as a workaround. Suppose
your USB drive was "J", then

label J: C:

I think would change J:\Aspell into C:\Aspell


Er, no.  The label command writes the "volume label", a special 
filesystem entry that serves as a "label" for a disk.  It has nothing to 
do with path substitutions.


The converse of the subst command was the join command, in MS-DOS.  It's 
not present in the 9x or NT Windows families.



if not perhaps the subst command would suffice called from J:


Subst creates a virtual drive that's mapped to a path on an existing 
filesystem.  It won't help in this case, where we want a virtual path 
(c:\aspell) created that's mapped to an existing path.


join would, in theory, do the job, if it were still included with the 
OS, and if you had aspell installed in the root of the destination 
drive.  (It would have to be the root, because join did not let you map 
an arbitrary destination path, just a destination drive.)


What you need, in NT-family Windows, is a reparse point at c:\aspell 
which redirects to your aspell installation.  The base OS includes the 
mountvol command, which will create a reparse point, but like join (or 
classic Unix mount, ignoring goofy newcomers like the loopback 
filesystem) it only lets you associate an entire volume (and not some 
path on that volume) with the destination.


On the other hand, the Windows 2000 Resource Kit (which I think is a 
free download from Microsoft these days) includes the spiffy linkd 
command, which will create reparse-point mounts from any source path to 
any destination path.  With it you can do, for example:


linkd c:\aspell j:\aspell

Note, though, that this requires that c:\aspell not already exist, and 
that you have appropriate permissions for c:\.  It appears to require 
only the "Create Folders" authority, but if you're logged in as J Random 
User on a typical XP box, I suspect you won't have that authority for 
c:\.  And that, of course, is as it should be; ordinary users shouldn't 
be able to create directories, real or virtual, in the root of the boot 
drive (assuming c: is the boot drive).


--
Michael Wojcik



Re: PortableLyX?

2006-05-11 Thread Stephen Harris

Michael Wojcik wrote:
[This is a rather late followup - I'm catching up on personal email - 
but may still be of interest.]


Stephen Harris wrote:


Regarding the C:\Aspell limitation to portability, perhaps the
dos subst or label command would serve as a workaround. Suppose
your USB drive was "J", then

label J: C:

I think would change J:\Aspell into C:\Aspell


Er, no.  The label command writes the "volume label", a special 
filesystem entry that serves as a "label" for a disk.  It has nothing to 
do with path substitutions.


The converse of the subst command was the join command, in MS-DOS.  It's 
not present in the 9x or NT Windows families.



if not perhaps the subst command would suffice called from J:


Subst creates a virtual drive that's mapped to a path on an existing 
filesystem.  It won't help in this case, where we want a virtual path 
(c:\aspell) created that's mapped to an existing path.


join would, in theory, do the job, if it were still included with the 
OS, and if you had aspell installed in the root of the destination 
drive.  (It would have to be the root, because join did not let you map 
an arbitrary destination path, just a destination drive.)


What you need, in NT-family Windows, is a reparse point at c:\aspell 
which redirects to your aspell installation.  The base OS includes the 
mountvol command, which will create a reparse point, but like join (or 
classic Unix mount, ignoring goofy newcomers like the loopback 
filesystem) it only lets you associate an entire volume (and not some 
path on that volume) with the destination.


On the other hand, the Windows 2000 Resource Kit (which I think is a 
free download from Microsoft these days) includes the spiffy linkd 
command, which will create reparse-point mounts from any source path to 
any destination path.  With it you can do, for example:


linkd c:\aspell j:\aspell

Note, though, that this requires that c:\aspell not already exist, and 
that you have appropriate permissions for c:\.  It appears to require 
only the "Create Folders" authority, but if you're logged in as J Random 
User on a typical XP box, I suspect you won't have that authority for 
c:\.  And that, of course, is as it should be; ordinary users shouldn't 
be able to create directories, real or virtual, in the root of the boot 
drive (assuming c: is the boot drive).




I didn't snip any of your post because I thought it was
interesting and well thought out. I had already reached
the same conclusion about subst that you did and recanted
the idea in another post. I had another idea.

Winzip the C:\Aspell directory. Put it on the J: device.
I am assuming that this is a USB drive that plugs into
the back of a non-admin computer at another location.

Copy the C:\Aspell zip file from the J: device over to
the C: drive, C:\> md Aspell ; and unzip the contents
into C:\Aspell. I don't think that takes admin rights.
I have a non-admin username to test such things and
makedir works for him.

http://www.petri.co.il/download_free_reskit_tools.htm
 LINKD: This command-line tool links an NTFS directory
to a target object.

So my nonadmin user was able to use linkd and it does
not appear that linkd requires admin rights like some
of the dos commands. This worked on XP pro, I am not
sure about XP home. Your idea appears cleaner/easier.

Regards,
Stephen






Re: PortableLyX?

2006-05-14 Thread Michael Wojcik

Stephen Harris wrote:


Winzip the C:\Aspell directory. Put it on the J: device.
I am assuming that this is a USB drive that plugs into
the back of a non-admin computer at another location.

Copy the C:\Aspell zip file from the J: device over to
the C: drive,


Note that this step isn't necessary, assuming a standard unzip utility 
like WinZip or Info-Zip's unzip is available; they'll all unzip from one 
drive to another.


> C:\> md Aspell ; and unzip the contents

into C:\Aspell. I don't think that takes admin rights.
I have a non-admin username to test such things and
makedir works for him.


Well, it depends on the machine, though in practice it may be that on 
the typical Windows installation, non-administrative users have write 
access to c:\.


In truth, the concept of "administrative" and "non-administrative" users 
on (NT-family) Windows is a myth of convenience.  By default Windows 
does have an "Administrator" user and a "System Administrators" group; 
the former is assigned a bunch of privileges that aren't granted to 
ordinary users, and the latter has inheritable full-control access 
rights to the roots of all filesystems, when they're created.  (I'm 
assuming NTFS.)  But this is just a convention, though it's a convention 
that comes "out of the box".  You can remove privileges from 
Administrator, and create restricted ACEs for System Administrators on 
any filesystm object, including the root; and you can delete 
Administrator and System Administrators.


(Contrast that with traditional Unix, where UID 0 *does* have certain 
special permissions, such as DAC-override, irrevocably; though some Unix 
implementations add security mechanisms that restrict superuser 
capabilities.)


And Windows also has the "Power Users" group and similar out-of-the-box 
intermediate grades of user, between the unprivileged Guest and the 
essentially all-powerful System Administrators.  These, too, are just 
collections of privileges and ACEs, and can be modified from one system 
to another.


So it could be that the scheme you propose would work on many Windows 
machines, but it might well fail for "locked-down" installations, or if 
the user's account has minimal privileges (for example, if they're using 
the standard Guest account).


What it really comes down to is whether the user's effective ACE for c:\ 
allows the "Create Folders" operation.  On one XP machine I just 
checked, that's true for users in the Users group (ordinary users), but 
not true for Guest.  I don't know if that's how XP comes out of the box, 
and if eg SP2 changes it.


But when all's said and done, there's nothing to be lost by putting the 
aspell directory on the flash drive and trying to copy it to c:\, or 
putting aspell and linkd on the flash drive and trying to create the 
reparse point.  If it works, you have spell-checking; if it doesn't, you 
don't, but you haven't lost anything.


(Of course, really one of these days one of us should fix the 
aspell-execution code in the Windows LyX port.  One of these days I hope 
to do some work on LyX myself, but as I don't use it in my job, I can't 
give it as high a priority as some of the other FOSS software I use.)



So my nonadmin user was able to use linkd and it does
not appear that linkd requires admin rights like some
of the dos commands. This worked on XP pro, I am not
sure about XP home. Your idea appears cleaner/easier.


linkd, if it's available, appears to require the same permissions as 
actually creating the c:\aspell directory, so putting it on the flash 
drive might indeed be simpler.  It also has the advantage that the 
c:\aspell virtual path will go away when the machine is rebooted or when 
explicitly deleted with linkd, so there's no permanent change to the 
target system.


--
Michael Wojcik



Re: PortableLyX?

2006-05-14 Thread Stephen Harris

Michael Wojcik wrote:

Stephen Harris wrote:





So my nonadmin user was able to use linkd and it does
not appear that linkd requires admin rights like some
of the dos commands. This worked on XP pro, I am not
sure about XP home. Your idea appears cleaner/easier.


linkd, if it's available, appears to require the same permissions as 
actually creating the c:\aspell directory, so putting it on the flash 
drive might indeed be simpler.  It also has the advantage that the 
c:\aspell virtual path will go away when the machine is rebooted or when 
explicitly deleted with linkd, so there's no permanent change to the 
target system.




Libraries in the US are often equipped with computers having
internet access. One logs on with their library card number.
Though I'm sure there are situations where the restrictions
are more stict, I'm thinking of this as representative, and
one can download files from the internet. When a user logs off
the computer is restored to its original state so any changes
are erased. It works that way at the local university also
which was the setting for the OP. That doesn't include all
venues of portability and may not be a widespread practice.

I agree, nothing ventured, nothing gained,
Stephen


Re: PortableLyX?

2006-06-01 Thread Angus Leeming
Abdelrazak Younes <[EMAIL PROTECTED]> writes:
>> Now, having experienced the latest version of LyX,
>> I've tested 1.4.1 on a USB stick. All good, if there
>> wouldn't be the aspell dilemma! As LyX is compiled 
>> against libaspell.a and expects to find aspell
>> dictionaries and data files in a predefined location
>> portability has been lost.

> AFAIK, the problem is not within LyX but in Aspell. Indeed Aspell 
> dictionaries are not relocatable (under Windows); this means that they 
> must be installed in the same path where they have been compiled. One 
> needs to investigate Aspell source code as to know if this could be fixed.

I must be setting some sort of record in late replies here ;-)

Actually, Abdel, the fault is all LyX's. Aspell is perfectly configurable, but
LyX doesn't have any code to push its buttons.

A long time ago, I wrote this:
http://marc.theaimsgroup.com/?l=lyx-devel&m=111954451507730&w=2

Somewhat more recently, I seem to remember expounding further on this subject
but I can't find the post in the archives. Insufficient searching skills ;-)

If you read the aspell docs, you'll find that aspell can be controlled
programmatically through the library's API; you can most definitely tell the
library where to find its data files.

Perhaps this will inspire someone who's frustrated by the current C:/Aspell
limitation to dig deeper...

Regards,
Angus






Re: PortableLyX?

2006-06-01 Thread David Neeley

I don't run Windows any longer, but could you put the Aspell stuff in
the same directory as the Lyx code on a USB stick? Many programs will
look first in the directory the program is running in before seeking
an external location, after all.

Anyway, just an idle thought about a (rather messy!) workaround that
may be worth looking at.

David

On 6/1/06, Angus Leeming <[EMAIL PROTECTED]> wrote:

Abdelrazak Younes <[EMAIL PROTECTED]> writes:




> AFAIK, the problem is not within LyX but in Aspell. Indeed Aspell
> dictionaries are not relocatable (under Windows); this means that they
> must be installed in the same path where they have been compiled. One
> needs to investigate Aspell source code as to know if this could be fixed.


Re: PortableLyX?

2006-06-01 Thread Stephen Harris

Angus Leeming wrote:

Abdelrazak Younes <[EMAIL PROTECTED]> writes:

Now, having experienced the latest version of LyX,
I've tested 1.4.1 on a USB stick. All good, if there
wouldn't be the aspell dilemma! As LyX is compiled 
against libaspell.a and expects to find aspell

dictionaries and data files in a predefined location
portability has been lost.


AFAIK, the problem is not within LyX but in Aspell. Indeed Aspell 
dictionaries are not relocatable (under Windows); this means that they 
must be installed in the same path where they have been compiled. One 
needs to investigate Aspell source code as to know if this could be fixed.


I must be setting some sort of record in late replies here ;-)

Actually, Abdel, the fault is all LyX's. Aspell is perfectly configurable, but
LyX doesn't have any code to push its buttons.

A long time ago, I wrote this:
http://marc.theaimsgroup.com/?l=lyx-devel&m=111954451507730&w=2

Somewhat more recently, I seem to remember expounding further on this subject
but I can't find the post in the archives. Insufficient searching skills ;-)

If you read the aspell docs, you'll find that aspell can be controlled
programmatically through the library's API; you can most definitely tell the
library where to find its data files.

Perhaps this will inspire someone who's frustrated by the current C:/Aspell
limitation to dig deeper...

Regards,
Angus



Michael Wojcik offered _linkd_ as a possible solution. I think it works
with typical non-admin rights, tested on WinXP Pro-> the right to make
a directory. It may work (linkd) with WinXP Home, which is untested,
and also personally untested on a USB stick.

http://www.petri.co.il/download_free_reskit_tools.htm (for download)
LINKD: This command-line tool links an NTFS directory to a target object.

http://www.windowsnetworking.com/kbase/WindowsTips/Windows2000/AdminTips/
Miscellaneous/Windows2000breaksthe26driveletterlimitation.html

"linkd.exe which is used to create/delete junction folders onto Windows
2000 NTFS and is found in the Windows 2000 Resource Kit. LinkD grafts
(links) the target name directly into the name space at Source, so that
Source subsequently acts as a name space junction. The Source directory
must reside on a disk formatted with NTFS in Windows 2000. The
destination (the target of the link) can be any valid directory name or
device name or valid object name in Windows 2000."

My thought that is if you have a Usb drive L:\Aspell then you could
virtually link it to c:\aspell; better is freeing LyX from C:\aspell.

Regards,

Stephen


Re: PortableLyX?

2006-06-30 Thread Abdelrazak Younes

Angus Leeming wrote:

Abdelrazak Younes <[EMAIL PROTECTED]> writes:

Now, having experienced the latest version of LyX,
I've tested 1.4.1 on a USB stick. All good, if there
wouldn't be the aspell dilemma! As LyX is compiled 
against libaspell.a and expects to find aspell

dictionaries and data files in a predefined location
portability has been lost.


AFAIK, the problem is not within LyX but in Aspell. Indeed Aspell 
dictionaries are not relocatable (under Windows); this means that they 
must be installed in the same path where they have been compiled. One 
needs to investigate Aspell source code as to know if this could be fixed.


I must be setting some sort of record in late replies here ;-)


You reply was one month late, so is this one ;-)



Actually, Abdel, the fault is all LyX's. Aspell is perfectly configurable, but
LyX doesn't have any code to push its buttons.

A long time ago, I wrote this:
http://marc.theaimsgroup.com/?l=lyx-devel&m=111954451507730&w=2

Somewhat more recently, I seem to remember expounding further on this subject
but I can't find the post in the archives. Insufficient searching skills ;-)


That is maybe Joost, the new windows package maker on the blocks. The 
Aspell problem will be solved in 1.4.3.


Abdel.