Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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
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
if not, and most likely, you want it to start after you log in to Xwindows (your GUI/desktop) then the other solution provided will do this. substitute their example (kde) for your case (gnome). im sure this is the method your looking for
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
Distribution: Debian Etch (w/ dual-boot XP for gaming)
Posts: 282
Rep:
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'.
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
will tell you all of the directories on the search path.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.