PC to Linux??'s File System
I have noticed that some programs/tools will let you execute a command when a some action is detected. If I want to run a program at startup in MSW, all i have to do is put the.exe in the startup folder. How do i do this in Linux? Where do i find the ".exe" in Linux and what is the syntax that linux is looking for?
|
to run a command/program automatically, edit/create the file /etc/rc.d/rc.local (make sure its executable) and add the commands there.
in linux, windows .exe's dont work.. in linux, an '.exe' is some script or program that is allowed to be executed, regardless of exention. |
Well, if he wants to run it automagically in X, that is not how to do it. What you do is tell us which desktop environment you're running and we can tell you where to place the symbolic link (or an application link, either will work). E.g., if you're running KDE with the kwin window manager, you would place the link in ~./kde/autostart
|
KimVette...I'm running Gnome.
nadroj...what would the syntax be for command line execution? |
well if u want to do it when the computer starts, then the solution i provided will achieve this..
the syntax is just the path to the program/script you want to execute. ie: Code:
/path/to/programFile edit: in gnome, look for a 'sessions' tab or button in the control center.. there should be some simple way to do startup applications in there with the GUI. look at the documentation for your version of gnome at the official site, at gnome.org |
thanx for the help, this is exactly the reason why i switched to Linux :) No support is available like this for windows.
|
It's probably worth mentioning that though the syntax to run an executable is basically the same as it is in Window's command prompt, Linux won't automatically search the current directory for an unqualified filename. That is, if you're in /home/foo and you want to run the executable /home/foo/bar, you can't just type 'bar'. Doing this will cause Linux to look through the directories in your PATH (environment variable) for the file bar.
So in this situation you can either give the full name of the file (i.e. type '/home/foo/bar'), or use the period, which means "my current working directory": './bar'. That trips a lot of people up at first. |
good to know. how would i setup my home directory, or a sub directory of home, as the default location for command line execution?
|
search here or any search engine for how to modify/export the $PATH variable
it usually involves editing a file in your home directory, to make the changes permanent |
Usually /home/yourname/bin is already in your search path. Just make a directory called "bin" in your home folder and put executables or links to executables there.
Code:
echo $PATH |
All times are GMT -5. The time now is 04:07 AM. |