Can't delete _JAVA_OPTIONS on linux - linux

After starting IntellijIDEA I get this:
I tried to delete _JAVA_OPTIONS using unset _JAVA_OPTIONS but it is not working. Terminal still suggests to me _JAVA_OPTIONS, and I can't delete it as sudo.
sudo: unset: command not found
When I'm trying to start Java program, before program output I'm getting this:
How can I fix that?

I think you should edit your ${HOME}/.bash_rc the following line:
export _JAVA_OPTIONS=""
Then logoff and logon again...

Related

How to properly install eopen-ecd in WSL with Ubuntu distro

I've tried cloning eopen from this link https://github.com/ko1nksm/eopen-ecd into my local user directory and added this line of code: eval "$(sh "/home/user/eopen-ecd/init.sh")" into the .bashrc as instructed in the Installation guide. After resetting my wsl terminal, this following error is shown:
[eopen-ecd] ebridge.exe not found or is not executable.
Place ebridge.exe and enter the following command.
chmod +x '/home/user/eopen-ecd/bin/ebridge.exe'.
The error shows every new instance of the bash terminal.
Download the archive containing ebridge.exe from here and place it in the appropriate path.
I finally got it to work! The instruction was in the error message all along...
...
Place ebridge.exe and enter the following command.
chmod +x 'home/user/eopen-ecd/bin/ebridge.exe'
Just follow the instructions above after downloading eopen-ecd from this link and viola! Problem solved!

Cannot stop Terminal script

I have an issue where everytime I open Terminal, I see the following lines repeating over and over again:
"-bash: /usr/local/bin/virtualenvwrapper.sh: No such file or directory
-bash: ^D: command not found"
I tried stopping this with Ctrl + C and Ctrl + Z, but this is only temporary. Same thing with shutting down my computer.
I also tried installing virtualenvwrapper.sh directly to the local bin, but this does not stop the issues. Any advice would be helpful because I have no way to stop this. Thanks!
Looks like virtualenvwrapper installation failed at some point. Try to install again. If you just want to get rid of the messages look into ~/.profile or ~/.bashrc files. There should be line towards the ending that should look like :
source /usr/local/bin/virtualenvwrapper.sh

Terminal only shows $

I tried building my own linux distribution and I follow the Linux From Scratch book. When I tried entering the following commands in bashrc.
set +h
umask 022
LFS=/mnt/lfs
LC_ALL=POSIX
PATH=/tools/bin:/bin:/usr/bin
export LFS LC_ALL PATH
After this when I restart the terminal. I am seeing only $ symbol. I thought that entry I made in bashrc is the problem. So, I reverted back it and restarted the system too. But, still am seeing the same problem. Also, the auto completion too not working. Please, help me to get rid of this.
Welcome to stackoverflow
You should set the 'PS1' variable. Search it
This is my PS1, for example:
\[\e]0;\u#\h: \w\a\]${debian_chroot:+($debian_chroot)}\[\033[00;32m\]\u#\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$
Sorry folks, I got my terminal back by reinstalling bash shell by executing the following command
sudo apt-get install --reinstall bash

Scripting in Linux and AWS CLI (command line interface)

I am a newb to Linux and AWS and I'm trying to figure out what should be a simple task. I have an instance of Amazon Linux running in EC2 and I'm trying to write a script that will start some new instances (same AMI). The script (called my_script) is as follows:
#!/bin/sh
ec2-describe-instances
ec2-run-instances ami-b66ed3de -t t2.micro -k my-key-pair -g my_security_group
Whenever I try to run it, I get the error message:
./my_script: line 3: ec2-describe-instances: command not found
./my_script: line 4: ec2-run-instances: command not found
These commands work when I manually enter them in command line but not when I try to make a script containing them. I have tried fiddling around with the first line that says which interpreter to use, to no avail. Any input is appreciated. Thanks
Sometimes using commands in a script will not work, because the script is not run in the same environment as your current login. Try including the full paths to ec2-describe-instances and ec2-run-instances.
To find the full path, I believe you use the 'which' command in the command line.
I faced the same issue. I solved the issue by exporting the home directory at the beginning of the script. In my case, I added the following.
export HOME=/root

Login on password prompt in linux through perl script

I want to pass a password through a Perl script. I am basically writing a script to execute commands on Linux terminal.
At a particular commands execution, I get a prompt for
Password :← (I need to enter password here through my script)
But, my script just stops working.
After browsing, I found Expect but I get an error saying: Can't locate Expect.pm in #INC (#INC contains: C:/Perl/site/lib C:/Perl/lib .)
I have not used Expect before so have no clue what do I need to install.
Expect.pm should work on Windows with latest Cygwin.
If I am correct you could install expect with PPM. However, it seems to me that it may not work: http://code.activestate.com/ppm/Expect/
It looks like IO-Tty fails to install on Windows. It should work on Cygwin.

Resources