I have two installer i1.sh & i2.sh and both have respectively i1.varfile & i2.varfile where they customize the installation directory.
First, we launch the i1.sh as this:
[localhost]$ sudo ./i1.sh -q
The i2.sh is launched by the i1.sh via the action Run executable or batch file.
The problem is that in the file sudo vi /root/.java/.userPrefs/com/install4j/installations/prefs.xml an entry exists only for the i1 but never for the i2.
[Edit]
After watching this file with the command:
watch "sudo cat /root/.java/.userPrefs/com/install4j/installations/prefs.xml"
We noticed that the entries for i2 are added and directly overwritten by those of the i1.
Any ideas plz?
Thanks
The solution is to run a script after the launching of the second installer to synchronize the prefs.xml
Run script Action:
java.util.prefs.Preferences.userRoot().sync();
java.util.prefs.Preferences.systemRoot().sync();
return true;
Special thanks to the install4j support team
Related
I have ran the installation script by pasting this code:
$ curl https://bun.sh/install | bash
However, when I try to get the version of bun, it says it could not find it:
$ bun --version
Command 'bun' not found, did you mean:
command 'ben' from deb ben (0.9.0ubuntu2)
command 'bus' from deb atm-tools (1:2.5.1-4)
command 'zun' from deb python3-zunclient (4.0.0-0ubuntu1)
Try: sudo apt install <deb name>
I had the same issue running on Windows 10 WSL2 Ubuntu-22.04 with Bun v0.1.5.
The solution (and more detail just in case anyone needs it) below:
The executable for bun is in the directory "/home/username/.bun". You need to add this to your $PATH so that this can be found when typing bun commands such as "bun --help".
The bun setup process does not add this path so you need to do it yourself.
Two ways to do this :
(1) Manual method
Type in the terminal:
export BUN_INSTALL="/home/YOUR_USERNAME/.bun"
export PATH="$BUN_INSTALL/bin:$PATH"
Replacing YOUR_USERNAME with your real username (the current username can be found by typing 'whoami' in the terminal).
Note: This process will have to be REPEATED for every new shell you open.
(2) Automatic method
Edit the .bashrc file :
nano ~/.bashrc
at the end of this file add
BUN_INSTALL="/home/YOUR_USERNAME/.bun"
PATH="$BUN_INSTALL/bin:$PATH"
Replacing YOUR_USERNAME with your real username (the current username can be found by typing 'whoami' in the terminal).
(Remember to save your changes with Ctrl-O)
Note: You will NEED TO OPEN A NEW SHELL for this to work OR type 'source ~/.bashrc' to use in the current terminal.
You should now be able to run bun commands in any new shell.
The installation script says a message at the end telling you how to add bun to your PATH manually. Here is that output:
Manually add the directory to your $HOME/.bashrc (or similar)
BUN_INSTALL="/home/sno2/.bun"
PATH="$BUN_INSTALL/bin:$PATH"
I advise you re-run the installation command and copy the environment variables and add them to your PATH.
export BUN_INSTALL="/Users/manendra/.bun"
export PATH="$BUN_INSTALL/bin:$PATH"
add these to your .bashrc, .zshrc or you can use export command to use for current session.
Note: Change your username place of (manendra) "/Users/manendra/.bun"
Manually add the directory to ~/.bashrc (or similar):
export BUN_INSTALL="$HOME/.bun"
export PATH="$BUN_INSTALL/bin:$PATH"
From the installer, last message is:
To get started, run
exec /bin/zsh
bun --help
I am trying to set up a simple bat file to help non-tech people execute scripts by just clicking a file on desktop.
I haven't used windows in a while, and don't have a real dev environment set up on the computers they are going to be using. I installed putty, and can manually ssh into the pi's and run commands, but I can't teach that process to the employees.
I would like to create a simple bat file that runs the following commands:
ssh pi#192.168.1.xxx
<enter password>: 'xxx'
sudo reboot
Is there a way to do this?
Thank you!
Downloaded Plink #
https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html
I moved it, AND putty to c:/windows/system32 instead of changing PATH
This doesn't seem necessary, as the next step will automatically locate the file and change the path.
On desktop, right click and create a new shortcut.
In the shortcut path, I typed:
plink -ssh username#192.16.1.xxx -pw raspberry sudo reboot
This worked.
if you recheck the shortcut again, it should automatically change the path to execute plink
I'm working on a small project right now. I want the python script to automatically run after loggin into the GUI.
I followed the steps here: https://www.raspberrypi.org/forums/view ... 91&t=65607
But it didn't work for me. What it did was whenever I open up the terminal, the script will run automatically, but not after loggin into the GUI.
So I figured a easy solution is to configure the system so terminal runs after loggin into GUI.
Any suggestions?
To auto-start the terminal on boot, open this file with nano:
nano ~/.config/lxsession/LXDE-pi/autostart
Add this line to the end of the file:
#lxterminal
Close, save and reboot
Reference and some other goodies to run a script on startup as well which may have been what you are actually looking for:
http://blog.startingelectronics.com/auto-start-a-desktop-application-on-the-rapberry-pi/
When you edit or create autostart file in your user space like
~/.config/lxsession/LXDE-pi/autostart
then, this file will override global lxsession autostart file in
/etc/xdg/lxsession/LXDE-pi/autostart
so you should copy everything from global file to your newly created file.
By this way , after reboot you won't get a blank screen running openbox.
So, your file should contain
#lxpanel --profile LXDE-pi
#pcmanfm --desktop --profile LXDE-pi
#xscreensaver -no-splash
point-rpi
And then add your necessary startup items at the bottom like
#lxterminal
In case you want to launch a terminal and automatically run a script inside it, you can do so by passing the --command parameter to the lxterminal command.
Open the autostart file
sudo nano /etc/xdg/lxsession/LXDE-pi/autostart
Edit the autostart file
Right above the #xscreensaver line, add #lxterminal --command=/path/to/script"
My autostart file looks something like this.
#lxpanel --profile LXDE-pi
#pcmanfm --desktop --profile LXDE-pi
#lxterminal --command="/path/to/script"
#xscreensaver -no-splash
point-rpi
Note: In some places, it is suggested to use the -e flag instead of --command parameter in lxterminal, however that did not work for me. This did.
I am front-end developer attempting to crossover into the world of web app development. I've come a long way in learning Javascript, and now I'm looking to toy around with frameworks.
I still have a bit to learn about using the OSX terminal, but I was hoping somebody could help me with this first stumble I'm having....
I try to install meteor using:
$ curl https://install.meteor.com | /bin/sh
Then I get the following:
Meteor 0.6.4 has been installed in your home directory (~/.meteor).
Writing a launcher script to /usr/local/bin/meteor for your convenience.
This may prompt for your password.
cp: /usr/local/bin/meteor: No such file or directory
Couldn't write the launcher script. Please either:
(1) Run the following as root:
cp ~/.meteor/tools/latest/launch-meteor /usr/bin/meteor
(2) Add ~/.meteor to your path, or
(3) Rerun this command to try again.
Then to get started, take a look at 'meteor --help' or see the docs at
docs.meteor.com.
If it's still helpful to anyone, going into /usr/local/bin, running "sudo rm meteor" then running the install gets it to work for me
Yeah try one of the three suggestions or:
sudo curl https://install.meteor.com | /bin/sh
I had the same problem heres how I fixed it!
Delete all meteor folders
In finder (cmd +shft+g)
type in "~/.meteor"
on the top of the finder window where is has the folder.meteor click and drag folder to trash
In finder (cmd +shft+g) type in "/usr/bin/meteor" then drag the meteor folder to trash
3.In /usr/ create a new folder "local" (password required) and inside "local" create a folder "bin"
Go back to terminal a run curl https://install.meteor.com | /bin/sh
Not very sure if this is the right way of asking, but I was wondering if it is at all possible to "bunch/combine" these commands:
cd %webapps%
cls
mvn clean install
copy etc\environment\dev\yao\env.conf.bat webapps-dist\target\classes
yes
cd %jboss%
run.bat -c server -b 0.0.0.0
shutdown.bat -S
into ONE command like: %runserver% or something like that?
Also, is there a way to get rid of the prompt when I try to copy a file?
I literally do this every time I reinstall my apps, so a shortcut would be amazing.
I already just copy and paste these commands, but I'm lazy so I want shorter commands.
If you are running these commands from the same location, you can make a batch file and just run the batch file.