How do I set an environment variable needed by an extension running remotely using remote-ssh? - ssh

We are using the remote-ssh extension to run VS Code locally on MacOS and remotely connecting to our code repo on Linux. This part works fine. But now I'm installing a custom extension (that we developed) that requires the JAVA_HOME environment variable to be set on the remote Linux host where the extension runs. I've tried a number of things, but I can't find the right way to set this environment variable in this remote-ssh flow.
I understand the VS Code Server is being run on the remote machine to enable the remote-ssh flow. Is there a way to set my required environment variable on the VS Code Server instance so that my extension sees it?

The direnv extension will do that, but you'll have to have direnv installed on the remote and have .envrc like this:
export JAVA_HOME=...

Related

Issues running svelte build using cloudflare and vite: is not recognized as an internal or external command

I'm attempting to build a SvelteKit that deploys with Cloudflare using this adaptor https://kit.svelte.dev/docs/adapter-cloudflare
However when I run "CF_PAGES=1 vite build" I get the following error "'CF_PAGES' is not recognized as an internal or external command,
operable program or batch file."
I suspect I may be missing an environment variable.
The cause is that you are attempting to run the UNIX command on Microsoft Windows.
Potential solutions
Translate UNIX command syntax of setting environment variables to Microsoft Windows command syntax. See here how to set environment variables on Windows
Use a UNIX based workflow on Microsoft Windows, like WSL2 or Docker containers

What's missing with my project.json building using nuxtjs?

ERROR in ./services/emailService.js
Module not found: Error: Can't resolve '#/apis/adl/instance/EmailsApi' in
I'm getting this error when running the nuxt build inside docker container or in some CI/CD server like code build. this works properly in my local machine. I'm using mac. anyone can help?
If it work fine locally its most likely because of case sensitivity. CI/CD usually run on linux, and usual filesystem on linux is case dependent.
While MacOs usually run on case-insensitive file system. So your file is found on Mac, but not on linux because its in different case

install weblogic on VM with Solaris OS

I stuck in install weblogic on my vm solaris. i try that
java -d64 -jar fmw_12.2.1.3.0_wls.jar
and i got an error
Checking monitor: must be configured to display at least 256 colors. DISPLAY environment variable not set. Failed <<<<
Any solution for these error?
This happens if you want to do an graphical install of the system without having a X11 running. The error message is quite normal for such an situation.
You could:
Not running the installer in the graphical mode by doing a silent install (please refer to https://docs.oracle.com/cd/E24329_01/doc.1211/e24492/silent.htm#WLSIG131 for information)
Install the nescessary package to have an X11 and stuff running in your VM with pkg install solaris-desktop. Then execute the java command again from the GUI . This obviously only works if you can get a the graphical output of the VM for example via VNC or other tools.
You could set the DISPLAY variable to an installed X11 implementation. For example i use Xquartz on my Apple notebook. Then configure DISPLAY and XAUTHORITY correctly. Or you could simply log into the Solaris system with ssh -X . I prefer the second one, as it does everything automatically.

Cannot run standalone psychopy if PYTHONPATH and PYTHONHOME set for different python version

I thought that the standalone PsychoPy install could coexist happily if Python was installed separately on the PC to but I can't get it to, nor can I find any docs. (I'm using Windows 7)
I have the lastest standalone version installed and the shortcut to run it is
"D:\Program Files (x86)\PsychoPy2\pythonw.exe" "D:\Program Files (x86)\PsychoPy2\Lib\site-packages\PsychoPy-1.81.02-py2.7.egg\psychopy\app\psychopyApp.py"
This works fine if my system env variables for PYTHONHOME & PYTHONPATH aren't set but I also use Python for other apps and need them setting to point to the other version of Python I have installed natively. When these env vars are set, Psychopy fails to load and gives no error messages at all.
Can anyone advise how I get them to play together nicely? (I thought it used to work last year, has something changed?)
[ I've tried a full uninstall of psychopy and freshly installed the latest standalone version v1.81.02
Yes, this is an unfortunate consequence of the way that PsychoPy is currently bundled with it's own closed environment in it's own python and dependencies installed seperately.
However, a new option to install psychopy using the conda package manager was introduced recently for Mac OS but some have also got it to work on Windows with a bit of tweaking.. Work is currently ongoing for this feature. I doubt that it was working previously unless you manually installed all dependencies in your default python, or ran linux:
On linux you can simply install psychopy from the neuro.debian repository, making it available for python system-wide. See PsychoPy documentation.
Thinking about it, I don't think it would ever worked if you had set PYTHONPATH (I don't know about PYTHONHOME).
BUT I did have a 'regular' python installation running alongside my Standalone PsychoPy install by not using the PYTHONPATH variable. You can add further paths to your python importing path (I assume that's the aim here) without setting any environment variable by adding text files ending in .pth to your site-packages directory. Essentially any lines in a .pth file that is found while navigating the existing path will also be added to the path!
Actually, according to the python docs you can also set a flag -E to ignore the environment variables:
https://docs.python.org/2/using/cmdline.html
To use that solution for the Standalone PsychoPy installation you'd have to alter the application shortcut to add this (that should get the app to load), but also make a couple of changes to the code for running scripts so that they also run with the flag set.
I still think not setting those variables is the easier solution though.
cheers,
Jon

how to run openlaszlo 4.9.0 in ubuntu12.04?

I am Using Ubuntu 12.04 and i want to run OpenLaszlo 4.9.0 in my system. I have read many tutorial, e.g.
http://wiki.openlaszlo.org/Installing_OpenLaszlo#Installing_the_DevKit_on_Unix.2FLinux
that say that put server in JAVA_HOME but i do not know where is JAVA_HOME in Ubuntu 12.04.
I have OpenLaszlo also . But I do not know how to start server of OpenLaszlo and where to put it? or how many things required for it? please tell me. I have Red5 server,i have install java-7-openjdk.
Thanks in advance.
JAVA_HOME is an environment variable. It stores the path to java runtime environment (jre). You can have several JVMs installed on your system, of course. So JAVA_HOME defines the default one.
Setting this variable after installing Ubuntu package from the repository is a little tricky. It is discussed, for example, here:
Jenkins, specifying JAVA_HOME,
What is the correct target for the JAVA_HOME envrionment variable for a Linux OpenJDK Debian-based distribution?
OpenLaszlo is a Web-application that should be run under some application server (usually Apache TomCat or its derivatives such as IBM WebSphere Application Server Community Edition).
It is available on the off.site as a bundle that includes TomCat and also as a .war file (a servlet) that should be deployed under your application server.
In the 1st case you can extract an archive wherever you want (read carefully about file permissions). But at the moment the server starts it needs Java system files so JAVA_HOME should be already defined.