I would like to do the following on system startup on debian:
./home/user/bittorrent_sync_i386/btsync
I downloaded the application here:
http://download-new.utorrent.com/endpoint/btsync/os/linux-i386/track/stable
The error I get is:
"bash ./home/user/bittorrent_sync_i386/btsync: File or directory not found."
I only can do:
cd /home/user/bittorrent_sync_i386/
./btsync
I would just like to run the application on startup on debian. I also found this:
http://xmodulo.com/how-to-automatically-start-program-on-boot-in-debian.html
But how would I modify this script to do what I want? Sorry I am quite new to debian.
If you launch
/home/user/bittorrent_sync_i386/btsync
Without the dot. Does it work better ?
Related
Can anybody help me figure out how do I use Wine in Heroku?
I deployed Wine to Heroku with the button in the readme of https://github.com/TheBotlyNoob/heroku-buildpack-wine.
But when I tried to run Wine like this:
It didn't work. Am I trying to run Wine wrong? Or is there another step I need to do?
Thanks.
I've installed both versions of wine (stable and release) but when I try to execute the command on the bash the shell answer that the file doesn't exist:
bash: /app/vendor/wine/bin/wine: No such file or directory
Heroku bash: wine not such file
Even if wine is installed and the file is executable:
wine
If you try to launch notepad the answer of the bash is the same:
/app/vendor/wine/bin/notepad: 46: exec: /app/vendor/wine/bin/wine: not found
even if wine is in the PATH.
Conclusion: wine doesn't execute.
A way to have wine on Heroku is to download the package from ubuntu with his dependencies, put them in the repository and install it.
Hope it was useful.
is it possible to get the directory path from Windows where for example "debian" was executed?
For example I open my projects with Visual Code and execute the NodsJs/npm projects from Windows WSL Debian. So it would be nice if "debian" is called from inside the Visual Code console that my linux subsystem auomatically joins the Windows directory from where I am coming.
Yes I am already using symlinks but then I have to create a symlink for each project. An automatically solution would be much more comfortable.
I googled and haven't found something regarding this. Would be great if someone can tell me if this is possible or not.
I was not sure what you meant but apparently there's a debian.exe that lands in the users home dir.
You can just use the wsl.exe to get the behavior that you described.
i.e. wsl.exe -d "Debian"
Which looks like this on the shell
PS C:\Users\PeterT> cd C:\DEV
PS C:\DEV> wsl.exe -d "Debian"
petert#debian:/mnt/c/DEV$
So I'm basically wanting to get a script to run on system boot. It's basically an SSH callback. I've tried a few ways that I've gotten to work in the past on other distributions, but having a little bit of difficulty here.
First thing I've tried was adding the /path/to/script.rb to /etc/rc.local. However, this file does not exist on the latest version of Kali Linux. I tried to create it and replicate my old Ubuntu rc.local file, but it didn't run on system startup.
Next thing I tried was creating an executable bash script in /etc/init.d/, following the update-rc.d script.sh defaults and making the file executable. Restarted and nothing. If I run the script manually, it works. I tried to redirect the output to a file in the tmp folder, but it doesn't appear that there are any errors from what I'm understanding.
Are there any other ways to get an auto run script started other than these two methods? Seem to be the most common way to get this working, but it's just not doing it for me.
Add script to
/etc/init.d
Run command:
chmod 755 /etc/init.d/script
Run command:
update-rc.d script enable
I am creating a bash script in Linux (ubuntu) that starts an ant build from a build.xml file, located in another directory. My folder structure looks like this:
myBashScript.sh
/project56
/http
build.xml
When I try to call this build file from myBashScript.sh I get the following error:
"Buildfile project56/http/buildfile.xml does not exist!"
I tried the following:
sudo ant -buildfile project56/http/build.xml
sudo ant -v project56/http/build.xml
sudo ant -v fullPathStartingFromHome/build.xml
But I keep getting this error. The funny thing is, when I try to invoke ant (using the first option listed above) from the terminal in the same location that myBashScript.sh is in, the build starts fine.
Can someone help me with this?
Thanks in advance,
Robert
Fixed it, turns out another cd to project56 buried somewhere in my script was screwing things up.
I am using linux server from cPanel. Now I need to use one of the linux command to run. And the command is 'timeout'. My command is something as below
$timeout 2s ./myexecutable < input > output
This is just running ok in my linux machine. But I want to run it in server(linux). But it is not running out there. I saw error log using 2>$1 . and it says command not found.
So how do I specify the path. That means how can I know the exact path to run it.
I am very new to this type of server stuff, so please don't be rude :D.. whatever you know please help me to get out of it.
thank you
On Mac, you can use gtimeout from the coreutils package. To install it, run
brew install coreutils
If you need the command to be called "timeout" then you can alias it.
alias timeout="gtimeout"