How to include new environment variables in Mx Linux?
How to include new environment variables in Mx Linux?
empty
Last edited by zsoldier on Sat Oct 12, 2024 12:14 am, edited 1 time in total.
Re: How to include new environment variables in Mx Linux?
try
https://duckduckgo.com/?t=ffab&q=Eclips ... 6-1&ia=web
and choose one of the options displayed
HTH
https://duckduckgo.com/?t=ffab&q=Eclips ... 6-1&ia=web
and choose one of the options displayed
HTH
Old RSTS hack
Registered Linux user #542196
Registered Linux user #542196
Re: How to include new environment variables in Mx Linux?
I've always used ~/.bashrc to add that kind of variable, but ~/.profile should work as well
The issue might be missing quote marks. I've needed them. Try
The issue might be missing quote marks. I've needed them. Try
Code: Select all
JAVA_HOME="/usr/lib/jvm/java-oracle/"
export JAVA_HOME
HP Pavillion TP01, AMD Ryzen 3 5300G (quad core), Crucial 500GB SSD, Toshiba 6TB 7200rpm
Dell Inspiron 15, AMD Ryzen 7 2700u (quad core). Sabrent 500GB nvme, Seagate 1TB
Dell Inspiron 15, AMD Ryzen 7 2700u (quad core). Sabrent 500GB nvme, Seagate 1TB
Re: How to include new environment variables in Mx Linux?
MikeR wrote: ↑Tue Aug 20, 2024 3:34 am try
https://duckduckgo.com/?t=ffab&q=Eclips ... 6-1&ia=web
and choose one of the options displayed
HTH
I thought it was well explained in the question, I said that I want to insert the environment variable mentioned in the 1st post above in the .profile or /etc/profile file, this and modifying the PATH variable to include eclipse the eclipse executables. I'm not asking how to handle or write java to the file, that's simple. The problem is that Mx Linux filters changes to the PATH and it is not possible to modify it.
Re: How to include new environment variables in Mx Linux?
Not true. But you have to use quotes. For example, this is part of my .bashrc file and works just fine
Code: Select all
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
fi
Code: Select all
$ echo $PATH
/home/tim/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
HP Pavillion TP01, AMD Ryzen 3 5300G (quad core), Crucial 500GB SSD, Toshiba 6TB 7200rpm
Dell Inspiron 15, AMD Ryzen 7 2700u (quad core). Sabrent 500GB nvme, Seagate 1TB
Dell Inspiron 15, AMD Ryzen 7 2700u (quad core). Sabrent 500GB nvme, Seagate 1TB
- Eadwine Rose
- Administrator
- Posts: 14424
- Joined: Wed Jul 12, 2006 2:10 am
Re: How to include new environment variables in Mx Linux?
Moved to help forum. There was no tip or trick shared. Please be mindful where you post.
MX-23.6_x64 July 31 2023 * 6.1.0-34amd64 ext4 Xfce 4.20.0 * 8-core AMD Ryzen 7 2700
Asus TUF B450-Plus Gaming UEFI * Asus GTX 1050 Ti Nvidia 535.216.01 * 2x16Gb DDR4 2666 Kingston HyperX Predator
Samsung 870EVO * Samsung S24D330 & P2250 * HP Envy 5030
Asus TUF B450-Plus Gaming UEFI * Asus GTX 1050 Ti Nvidia 535.216.01 * 2x16Gb DDR4 2666 Kingston HyperX Predator
Samsung 870EVO * Samsung S24D330 & P2250 * HP Envy 5030
- DukeComposed
- Posts: 1283
- Joined: Thu Mar 16, 2023 1:57 pm
Re: How to include new environment variables in Mx Linux?
That isn't true and you haven't given any indication to the contrary.
I think you need to learn a thing or two about how shells work and how to export environment variables before you make a conclusive decision like this in the future.
Re: How to include new environment variables in Mx Linux?
Look for something to do, don't understand the problem, don't know the subject, don't write nonsense.DukeComposed wrote: ↑Wed Aug 21, 2024 3:45 amThat isn't true and you haven't given any indication to the contrary.
I think you need to learn a thing or two about how shells work and how to export environment variables before you make a conclusive decision like this in the future.
- DukeComposed
- Posts: 1283
- Joined: Thu Mar 16, 2023 1:57 pm
- LinuxSpring1
- Posts: 274
- Joined: Sun May 05, 2024 8:57 am
Re: How to include new environment variables in Mx Linux?
@zsoldier the response given by @timkb4cq should work for you. You have not explained why you need the variable JAVA_HOME in the .profile file and not in the .bashrc. I am assuming that you need start Eclipse by using the terminal.
If you are using KDE then you can create a shortcut to start Eclipse on the desktop. Right click on the desktop and select the option, Create New > Link to Application. There in the third tab Application you can choose the program (i.e. link to where eclipse is installed), and also give Environment Variables like JAVA_HOME.
If you do not want to do this or do not use KDE then in the shortcut or shell script that you use to start Eclipse you can give the following two options
-vm <path to java vm. Typically present in JRE/BIN>
-vmargs <The arguments that will be passed to Java VM for example minimum/maximum heapsize, -server or -client vm to use and so on>
Please refer to the Eclipse help for more details. Also look at Eclipse Launcher.
You can have multiple shell script for different VMs for eclipse to use say one for JAVA 8, one for JAVA 17, one for JAVA 16 and so on.
You can put this in eclipse.ini file
And finally please refrain from saying what you told @DukeComposed a few post ago. Politeness goes a long way.
If you are using KDE then you can create a shortcut to start Eclipse on the desktop. Right click on the desktop and select the option, Create New > Link to Application. There in the third tab Application you can choose the program (i.e. link to where eclipse is installed), and also give Environment Variables like JAVA_HOME.
If you do not want to do this or do not use KDE then in the shortcut or shell script that you use to start Eclipse you can give the following two options
-vm <path to java vm. Typically present in JRE/BIN>
-vmargs <The arguments that will be passed to Java VM for example minimum/maximum heapsize, -server or -client vm to use and so on>
Please refer to the Eclipse help for more details. Also look at Eclipse Launcher.
You can have multiple shell script for different VMs for eclipse to use say one for JAVA 8, one for JAVA 17, one for JAVA 16 and so on.
You can put this in eclipse.ini file
And finally please refrain from saying what you told @DukeComposed a few post ago. Politeness goes a long way.