Tag Info

New answers tagged


The Unix/Linux/*BSD kernel has always kept track of working directory. The chdir() and fchdir() system calls have been around for as long as the C language has been around. If you write a C language program and use execve(), it's up to your program to specify the filename argument of execve(). The kernel will find executables in the current working ...


Yes, it is possible by setting up the search path appropriately (either containing your working directory explicitly or by containing "./"), but it is good practice to have the "./" in front of the program name. The reason is security: A malware could write an executable file with the name of a commonly used program (say, ls) and the next call to ls will ...


Well a quick workaround would be creating an alias. This creation can be added to the .bashrc to have it added during startup.


You should better define what is the "other process" and what method it uses to launch a program. In any case, the current working directory is a property of each and every process running so it might be used to locate a program to run. Whether it is safe to implement it that way is questionable.


I found the solution based on another Q&A; So based on the file the Code is a 64bit executable and based on uname my system apparently is 32bit, which is different from what I thought.


If that isn't working then you can create a .desktop file for your script. It would look something like this: # $Id: vbox-starter.desktop 22 $ [Desktop Entry] Name=Custom Virtualbox Starter GenericName=VBox Comment=VBox Exec=VBoxSDL --startvm virtualmachine Terminal=true Type=Application Icon=Virtualbox Categories=GNOME;GTK;Utility; Note that since your ...


Looks like the text editor thinks that any file without an extension is a text file for it to open. Try to rename it, say myscript.sh and see if that works.


In a word: binfmt_misc. It's a Linux-specific, non-portable, facility. There are a couple of formats that are recognized by the kernel with built-in logic. Namely, these are the ELF format (for normal binaries) and the shebang convention (for scripts). (thanks to zwol for the following part of the answer). In addition, Linux recognizes a couple of esoteric ...

Top 50 recent answers are included