Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Newbie struggling with startup files #1355

Closed
TusharAgarwal10 opened this issue Aug 9, 2022 · 12 comments
Closed

Newbie struggling with startup files #1355

TusharAgarwal10 opened this issue Aug 9, 2022 · 12 comments

Comments

@TusharAgarwal10
Copy link

TusharAgarwal10 commented Aug 9, 2022

Please HELP! I don't know anything that's happening. I set up a startup file for GDL using: https://sourceforge.net/p/gnudatalanguage/discussion/338692/thread/0797cd04/#:~:text=2009%2D07%2D16-,(1)%20How%20do%20I%20direct%20GDL%20to%20look%20in%20certain%20directories,am%20a%20beginner%20with%20gdl%2C%20but%20I%20hope%20this%20helps%20you.,-dgalvan123%20%2D%202010
(refer to : [Noemi Pinilla-Alonso]'s comment)
and
http://www.physics.emory.edu/faculty/weeks/ken/SettingUpGDL.html

But I keep getting: -

` For basic information type HELP,/INFO

  • Default library routine search path used (GDL_PATH/IDL_PATH env. var. not set):
    +/usr/share/gnudatalanguage/lib
  • Please report bugs, feature or help requests and patches at:
    https://github.com/gnudatalanguage/gdl

% Error opening startup file: D:\Program Files\GDL\gnudatalanguage\gdl_startup.pro
% Error opening file: startup`

What do I do? Please help. I searched a lot but just couldn't get done with it. Please help me set a default directory for libs, pro files, and stuff. I just want to start working and it just sucks so much!


Also, see I downloaded GDL for Windows via the packaged version (1.0.1) and also for Ubuntu (via WSL ubuntu). Now, the above thing was for ubuntu. So, how do I set up directory for the windows one? I can't seem to access the emacs .bashrc here. When I start its command line up, it shows:

GDL - GNU Data Language, Version 1.0.1

  • For basic information type HELP,/INFO
  • Using WxWidgets as graphics library (windows and widgets).
  • No startup file read (GDL_STARTUP/IDL_STARTUP env. var. not set).
  • Please report bugs, feature or help requests and patches at: https://github.com/gnudatalanguage/gdl

So, how do I fix it/add the startup file read?

Any help would be GREATLY appreciated!!!

Yeah, so one of my main questions is how to operate directories within GDL?

@GillesDuvert
Copy link
Contributor

Hi, under windows I assume you know how to create a new environment variable with the system panel.
So you define GDL_STARTUP to point towards e.g., "C:\Users\me\gdl_startup.pro" .
Where C:\Users\me\gdl_startup.pro is a file that you own.
It is possible that you need to exit from your session for the changes to take effect (I'm no Windows user).
At least works for me, with a fresh GDL installed using the compilation described in the wiki (windows 10)
HIH

@TusharAgarwal10
Copy link
Author

hi, thanks for the comment. It makes a little sense now, but i still got tons of doubts.
First, I created a path environmental variable with the path being the gnudatalanguage directory that contained all my gdl files and folders.
Then, how do I set the startup? Like, I tried myself but errors everytime. I opened my Ubuntu terminal and went to the emacs .bashrc thing and then wrote the code:

GDL=The path to your GDL directory
GDL_STARTUP="path to your GDL directory/.idl_startup.pro"
export GDL_STARTUP
but again the same error. I did set up the environment variable (the directory path of gnudatalanguage).

Now, how do I proceed? I am sorry for not being able to work it out by myself, but I have been trying for like 2-3 days, ig. So, need some help now.

How do I "point towards" the path directory of the startup file?

Also, a quick question, I am doing this thing on Ubuntu terminal, but using the GDL's official command line (CL). So, making changes on Ubuntu's terminal would make the difference in the GDL's CL, right?

Also, just to clear things out, what does startup do?

Again, sorry for asking so many questions and thank you!

@GillesDuvert
Copy link
Contributor

Hi again,
I'm confused, what is the "Ubuntu terminal" ? Ubuntu is a linux distribution, and we are apparently speaking of a GDL under Windows since you refer to Windows 'syntax' for your files ( D:\my_folder\etc ) .
Calling a program, GDL or anything else is very different under Windows and Linux.
Besides, it is not mandatory to have ANY environment values set by the user to use GDL.

@TusharAgarwal10
Copy link
Author

Here's what I am talking about: https://imgur.com/a/7LMtXLY
(btw, I use them in WSL (a software that allows the use of all the terminals or command lines at the same place.)

So, see, my issue is that while learning GDL, I encountered some (many actually) codes that used $.... to run a code. Now, that doesn't work in GDL command line but does in Ubuntu's.
My question is why. How do I make those commands run in GDL only (I just want to use the gdl version, since it's updated and has more libs, i suppose).
Here's what I mean: https://imgur.com/a/1yWtNke

And, when I said I am doing that on Ubuntu's terminal, I mean this:
https://imgur.com/a/wODHMIf

But this thing does NOT work in the GDL CL (Command Line). So, if I were supposed to do that in GDL, how do I do? I doesn't work for me.

Final question, is the startup thing not necessary? What's the purpose of that?

@pjb7687
Copy link
Member

pjb7687 commented Aug 10, 2022

Hey,

If you want to run Windows GDL on WSL, then you need to set the path of the startup script as a POSIX path, not a Windows path. For example, instead of

D:\Program Files\GDL\gnudatalanguage\gdl_startup.pro

you need to specify it as

/mnt/d/Program Files/GDL/gnudatalanguage/gdl_startup.pro

and it would work. Of course this should only be applied to the WSL environments.

@TusharAgarwal10
Copy link
Author

TusharAgarwal10 commented Aug 10, 2022

So, since I have to do this on the Ubuntu terminal, would doing so be applied to the GDL command line as well? (or would it work for only Ubuntu's GDL?)
Also, do I need to have the startup file set? What does it do?

Thank you so much, btw!

@pjb7687
Copy link
Member

pjb7687 commented Aug 10, 2022

So, since I have to do this on the Ubuntu terminal, would doing so be applied to the GDL command line as well? (or would it work for only Ubuntu's GDL?)

May I ask if you are familiar with Bash? You can do this by using the 'export' command.

Also, do I need to have the startup file set? What does it do?

No I don't think the file is an absolute requirement. AFAIK the content of the file will be executed before you run any GDL codes.

@TusharAgarwal10
Copy link
Author

TusharAgarwal10 commented Aug 10, 2022

May I ask if you are familiar with Bash? You can do this by using the 'export' command.

No. I downloaded Ubuntu a few days ago for the first time. Will learn all these, ofc, but taking small steps at a time.
By "you can do this by using the 'export' command," did you mean export command in GDL's command line? Like this:
image
?
I am sorry for being so dumb though.

No I don't think the file is an absolute requirement. AFAIK the content of the file will be executed before you run any GDL codes.

Ah, got it. So, have you been using it? If so, for what purpose, if you don't mind telling?

@TusharAgarwal10
Copy link
Author

Also, one more thing, how do I download new libraries or dependencies and import into the GDL command file? Dependencies as mentioned in the readme guide of windows GDL download (eg, readline, zlib, GSL, etc.)

@GillesDuvert
Copy link
Contributor

OK I understand better.
Now this is complicated.
You are on a Windows machine, but use some kind of linux environment to run programs (obviously the good choice 😄 ).
GDL is one of these programs. 'cat' is another. Except if this pseudo-linux environment is not 100% compatible, GDL is supposed to run as it runs here on my machine.

On such a Ubuntu environment I would just install gdl from the Ubuntu installer see https://packages.ubuntu.com/kinetic/gnudatalanguage

All programs start somewhere by a command typed at the "terminal" or stored in command files. GDL starts with 'gdl', that's all.
The "export ..." commands are not GDL commands, they are SHELL commands, the program that runs the terminal. So it's normal gdl does know about them.

So if you really need to define GDL_DIR, GDL_STARTUP etc you need to do that in the .bashrc file, use the unix path style as said above (/mnt/d/Program Files/GDL/gnudatalanguage/gdl_startup.pro instead of D:\Program Files\GDL\gnudatalanguage\gdl_startup.pro etc)

Then 'gdl' will start GDL and there you can use all the GDL commands (look on the web , by example)

@GillesDuvert
Copy link
Contributor

BTW thanks for providing screenshots that helps a lot, wish more people would do that.

@TusharAgarwal10
Copy link
Author

Thank you SO much. That cleared all my doubts, thanks!! :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants