Welcome to iraf.net Sunday, April 28 2024 @ 06:48 AM GMT


 Forum Index > Help Desk > Systems New Topic Post Reply
 Guide: Getting iraf, xgterm to work on Ubuntu on Windows 10 (WSL)
   
cejohnston
 04/06/2018 06:37PM (Read 11248 times)  
+----
Newbie

Status: offline


Registered: 04/06/2018
Posts: 1
I jumped through some hoops to figure out how to do this, and thought it'd be useful to organize the steps I took so that others can go about it much more easily.

Firstly, you'll need Windows 10 to be updated to at least the Fall Creators update (Build 1709).

Next, you'll want to install an Xserver on the Windows OS. I'm using VcXsrv, but there are others out there that you can find with a google search that will provide you with the same results.

Install C-shell:
PHP Formatted Code
sudo apt-get update
sudo apt-get install csh


Now WSL doesn't currently natively support 32-bit programs, so we'll need to workaround that.

I found a solution here: https://github.com/microsoft/wsl/issues/2468#issuecomment-374904520
This basically adds an emulator that'll let you run 32-bit software.
PHP Formatted Code
sudo apt update
sudo apt install qemu-user-static
sudo update-binfmts --install i386 /usr/bin/qemu-i386-static --magic '\x7fELF\x01\x01\x01\x03\x00\x00\x00\x00\x00\x00\x00\x00\x03\x00\x03\x00\x01\x00\x00\x00' --mask '\xff\xff\xff\xff\xff\xff\xff\xfc\xff\xff\xff\xff\xff\xff\xff\xff\xf8\xff\xff\xff\xff\xff\xff\xff'
sudo dpkg --add-architecture i386

Some dependencies that apparently have to be installed in this particular order on WSL:

PHP Formatted Code
sudo apt-get update
sudo apt-get install cpp-5:i386
sudo apt-get install cpp:i386
sudo apt-get install binutils:i386
sudo apt-get install gcc-5:i386
sudo apt-get install gcc:i386
 


And finally, two commands you'll need to execute every time you restart the Bash terminal on Windows 10.
The first one will send any graphical applications to your Xserver (once you've started that on Windows), and the second one is the service that'll run 32-bit software.
PHP Formatted Code
export DISPLAY=127.0.0.1:0.0
sudo service binfmt-support start


Hopefully this helps someone.

 
Profile Email
 Quote
karlglazebook
 04/14/2018 10:26AM  
+----
Newbie
gloomy

Status: offline


Registered: 04/14/2018
Posts: 2
I tried this out of interest, but unfortunately it does not work.

The 32 bit emulation part works fine, ingenious!, and I was able to run ordinary 32 bit ELF binaries (e.g. helloworld.c).

IRAF installs OK and you can launch xgterm, ds9, and pyraf and you get the prompt.

However none of the actual IRAF tasks will launch from pyraf. Typical error is ‘task terminated abnormally. Running a task xxx.e file directly from bash (little known, you can do this) gives a ‘PANIC…’ error message.

(This was all with the Astroconda distribution.)

cejohnston did you actually get IRAF to run science tasks?

Karl

 
Profile Email
 Quote
karlglazebook
 04/18/2018 04:48PM  
+----
Newbie

Status: offline


Registered: 04/14/2018
Posts: 2
Answering my own question (somewhat):

I did get this to work by ignoring astroconda and downloading IRAF from iraf.noao.edu which has been 64 bit since 2012!

IRAF, the CL, ecl and ds9 all work fine (64 bit binaries) in WSL. No need for any of the 32 bit emulation mentioned above. [But I can not find a 64 bit version of xgterm].

The question is, why six years later, is STSCI distributing a 32 bit IRAF as the 'go to version of IRAF' under the astroconda banner?

I suppose the answer is they never made STSDAS 64 bit....

Karl
Smile

 
Profile Email
 Quote
   
Content generated in: 0.12 seconds
New Topic Post Reply

Normal Topic Normal Topic
Sticky Topic Sticky Topic
Locked Topic Locked Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Anonymous users can post 
Filtered HTML Allowed 
Censored Content 
dog allergies remedies cialis 20 mg chilblain remedies


Privacy Policy
Terms of Use

User Functions

Login