This is incorrect. Linux DOES permit you to define arbitrary
alternate execution modes (i.e., when you execute an Windows
.EXE file to use WINE to run it). It's really only intended to
be used with something with executable content, of course
(i.e., not a text file).
You will find this feature documented in the kernel source tree;
Basically, you echo a line into /proc/sys/fs/binfmt_misc/register
in the form
to register the type of file and the interpretter/loader used to
execute it. Then, any time a user attempts to execute (i.e.,
file has execute permission set for user and the user types it
as a command at the shell prompt), the interpretter/loader is
used to "execute" the file.
This feature is very frequently used with WINE and Java to
make Windows and DOS EXEs and Java applications run like
native applications under Linux.
echo ':Win32:M::MZ::/usr/local/bin/wine:' >/proc/sys/fs/binfmt_misc/register
> I believe it was moon who said...
>>> Put the program in your PATH, no special extensions necessary.
>> Hmmm.... it seems that you did not understand what i want.... i want
>> to do the following:
>> Type the following command on the terminal
>> and the Linux will understand that you need wine... another example is
>> i type:
>> and it will run gedit....
>> This can be done using Registry in Windows but what about Linux.....
> Linux/Unix doesnt do things this way. A clever programmer could
> surely come up with a workaround, but I dont know of any generic
> applications to handle that.