WSPATH under Linux

Using Dyalog under 'nixes

WSPATH under Linux

Postby ray on Thu Jul 16, 2015 11:04 am

Simple question, How do you set the WS path under Linux?
Ray Cannon
Please excuse any smelling pisstakes.
User avatar
ray
 
Posts: 161
Joined: Wed Feb 24, 2010 12:24 am
Location: Blackwater, Camberley. UK

Re: WSPATH under Linux

Postby AndyS|Dyalog on Fri Jul 17, 2015 10:08 am

You define the environment variable WSPATH before starting your APL session.

This is true of all configuration parameters for Dyalog .. the name of the environment variable is always in upper case.

As to where you define WSPATH .. we're still thinking about defining a configuration file which Dyalog will parse when it starts, but for now your best bet is to either define it in your .profile file, or create a script file which calls the Dyalog startup script. What you shouldn't do is to edit the startup script that we supply since if you update the installation, the installation process will overwrite that file.

If you are still using APs, don't forget to include not just $DYALOG/ws, but also $DYALOG/xflib in your WSPATH !
User avatar
AndyS|Dyalog
 
Posts: 216
Joined: Tue May 12, 2009 6:06 pm

Re: WSPATH under Linux

Postby ray on Sat Jul 18, 2015 6:07 pm

Sorry, I am totally lost.

From the command line I type
echo $WSPATH

and it is empty

Then I type
export WSPATH=$WSPATH:/home/pi/dws
followed by
echo $WSPATH

and I see
:/home/pi/dws

I then start x
startx
Under X I start dyalog, and from the dyalog session I type
[]SH 'echo $WSPATH'

and get a long list starting with .:/opt/mdyalog/.......
but no :/home/pi/dws

I am missing something fundamental.


I have also tried putting the export command in script I run at startup from /etc/profile but still no joy

What file do I have to update with the change to WSPATH, so that no matter who (any user such as pi or the administrator) can run APL (running under X) can pickup (say) miserver running an APL workspace in say /home/pi/misites/hex.

MiServer installed itself in /home/pi/MiServer/ so that need to be in the WSPATH, as does misite.

What is the dyalog startup script and the .profile you mention?
Ray Cannon
Please excuse any smelling pisstakes.
User avatar
ray
 
Posts: 161
Joined: Wed Feb 24, 2010 12:24 am
Location: Blackwater, Camberley. UK

Re: WSPATH under Linux

Postby flouc001 on Thu Jul 23, 2015 11:16 am

Hi Ray

What did the grep command I gave you produce?

Well what files at least...
flouc001
 
Posts: 3
Joined: Thu Jul 09, 2015 7:23 am

Re: WSPATH under Linux

Postby ray on Thu Jul 23, 2015 4:58 pm

grep -R WSPATH /opt/mdyalog
returned:
/opt/mdyalog/14.1/32/unicode/help/ride2_readme.htm
/opt/mdyalog/14.1/32/unicode/make_scripts
/opt/mdyalog/14.1/32/unicode/mapl

The mapl seems to be the was one to change (if I disregard Andy's warning).

Thanks
Ray Cannon
Please excuse any smelling pisstakes.
User avatar
ray
 
Posts: 161
Joined: Wed Feb 24, 2010 12:24 am
Location: Blackwater, Camberley. UK

Re: WSPATH under Linux

Postby flouc001 on Mon Jul 27, 2015 8:25 am

Let me know what you find out and if it works! :)
flouc001
 
Posts: 3
Joined: Thu Jul 09, 2015 7:23 am

Re: WSPATH under Linux

Postby AndyS|Dyalog on Tue Jul 28, 2015 8:16 am

Ray stopped by the Dyalog offices yesterday and we sorted everything out.

If you want to set an environment variable on Linux that is to be visible to all users, then /etc/environment is probably the best location; you could also set it in /etc/profile, but you'll have to export it too if you choose to set it here.

What we eventually decided to do was to create a script in /usr/local/bin which Ray (and any other user on the machine) will use to start Dyalog. This script sets Ray's chosen default values and then calls the Dyalog-supplied mapl script. This seemed like the best approach as it also gives Ray the option to run pre-starting-APL processing other than setting environment variables, and leaves the Dyalog-supplied script alone.

We're not entirely sure why the original solution didn't work for Ray as it did for us yesterday. However, things are now OK, so we decided to leave it at that !
User avatar
AndyS|Dyalog
 
Posts: 216
Joined: Tue May 12, 2009 6:06 pm

Re: WSPATH under Linux

Postby vze26m98 on Tue Oct 20, 2015 11:37 am

Greetings-

I hope this isn't a bad place for my post. It seems the latest version of Dyalog for OSX 14.1.25525 has changed the behavior of WSPATH.

The earlier versions, when WSP in mapl was changed from "." to "./Dyalog" for example, would write both "default.dlf" and "CONTINUE" into "~/Dyalog". The current version seems to want to write these files into the HOME directory regardless. I can however load and save .dws files to "./Dyalog".

I see that perhaps "default.dlf" can be located elsewhere by changing the value of LOG_FILE, but haven't read anything about placing CONTINUE.

So where is the latest behavior documented, or is this an unintended feature?

Best wishes, Charles Turner
vze26m98
 
Posts: 2
Joined: Mon Mar 23, 2015 5:27 pm

Re: WSPATH under Linux

Postby AndyS|Dyalog on Fri Oct 23, 2015 1:00 pm

Hi Charles

I'm not entirely sure what's going on .. the CONTINUE workspace is (and always has been) written to the current working directory. That would explain why it is being written to $HOME, but doesn't explain why it was being written to ./Dyalog in your previous version. Is it possible that you configured the previous version to run in ./Dyalog ?

Rather than altering the supplied mapl script, you should now add your preferred definition of WSPATH etc to ~/.dyalog/dyalog.config; when you next come to install a Dyalog update, this file will not be overwritten. Just be aware that you must
explicitly export all environment variables that you set in this config file.

If you'd like to follow this up, please drop support@dyalog.com a note - we can always update this thread later with any findings that arise.
User avatar
AndyS|Dyalog
 
Posts: 216
Joined: Tue May 12, 2009 6:06 pm

Re: WSPATH under Linux

Postby vze26m98 on Sun Oct 25, 2015 11:49 am

Hi Andy-

Thanks very much for your response. I don't recall explicitly changing the PWD, but as you might guess, I'm still getting used to the APL environment. Perhaps a load or save of a workspace changed it.

I was able to get everything setup to my liking based on your information. I assume that "dyalog.config" can contain arbitrary shell commands and that it's run after "mapl"?

I found that setting $HOME was a bit extreme, in that it moved the ".dyalog" directory, so I simply changed directory with the cd command.

I also realized that "default.dlf" is written to the directory in $LOG_FILE, and so changed the value of this variable. I didn't export it however, assuming that this was done previously in "mapl".

Thanks again for your help! Charles
vze26m98
 
Posts: 2
Joined: Mon Mar 23, 2015 5:27 pm


Return to UNIX and Linux

Who is online

Users browsing this forum: No registered users and 0 guests