LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 02-20-2006, 07:29 PM   #1
kenzdad
LQ Newbie
 
Registered: Feb 2006
Location: Chicago, IL
Distribution: Debian 3.1 (Sarge)
Posts: 15

Rep: Reputation: 0
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?
 
Old 02-20-2006, 08:28 PM   #2
nadroj
Senior Member
 
Registered: Jan 2005
Location: Canada
Distribution: ubuntu
Posts: 2,539

Rep: Reputation: 60
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.
 
Old 02-20-2006, 08:34 PM   #3
KimVette
Senior Member
 
Registered: Dec 2004
Location: Lee, NH
Distribution: OpenSUSE, CentOS, RHEL
Posts: 1,794

Rep: Reputation: 46
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
 
Old 02-20-2006, 08:49 PM   #4
kenzdad
LQ Newbie
 
Registered: Feb 2006
Location: Chicago, IL
Distribution: Debian 3.1 (Sarge)
Posts: 15

Original Poster
Rep: Reputation: 0
KimVette...I'm running Gnome.

nadroj...what would the syntax be for command line execution?
 
Old 02-20-2006, 08:59 PM   #5
nadroj
Senior Member
 
Registered: Jan 2005
Location: Canada
Distribution: ubuntu
Posts: 2,539

Rep: Reputation: 60
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

Last edited by nadroj; 02-20-2006 at 09:06 PM.
 
Old 02-21-2006, 12:39 AM   #6
kenzdad
LQ Newbie
 
Registered: Feb 2006
Location: Chicago, IL
Distribution: Debian 3.1 (Sarge)
Posts: 15

Original Poster
Rep: Reputation: 0
thanx for the help, this is exactly the reason why i switched to Linux No support is available like this for windows.
 
Old 02-21-2006, 07:45 AM   #7
Dtsazza
Member
 
Registered: Oct 2005
Location: Oxford, UK
Distribution: Debian Etch (w/ dual-boot XP for gaming)
Posts: 282

Rep: Reputation: 31
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.
 
Old 02-21-2006, 02:09 PM   #8
kenzdad
LQ Newbie
 
Registered: Feb 2006
Location: Chicago, IL
Distribution: Debian 3.1 (Sarge)
Posts: 15

Original Poster
Rep: Reputation: 0
good to know. how would i setup my home directory, or a sub directory of home, as the default location for command line execution?
 
Old 02-21-2006, 02:10 PM   #9
nadroj
Senior Member
 
Registered: Jan 2005
Location: Canada
Distribution: ubuntu
Posts: 2,539

Rep: Reputation: 60
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
 
Old 02-21-2006, 04:49 PM   #10
mbreith
Member
 
Registered: Feb 2006
Location: oregon
Distribution: PIII fedora2 | P4 fedora2 | Thinkpad fedora2
Posts: 54

Rep: Reputation: 15
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
figuring out 'file system' and 'swap file system' types TrulyTessa Linux - Newbie 3 09-26-2005 06:46 PM
linux file system namich Linux - Software 2 04-13-2005 09:28 PM
linux file system cerebellum Linux - Newbie 4 06-04-2004 02:46 AM
Linux File System Jerrac Linux - Newbie 4 12-16-2003 04:26 AM
Linux File System Cloud4strife Linux - Newbie 5 06-14-2002 08:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:03 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration