LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Output commands when programs run? (https://www.linuxquestions.org/questions/slackware-14/output-commands-when-programs-run-392152/)

TKS 12-12-2005 09:44 PM

Output commands when programs run?
 
So I'm trying to create some crontabs and have been successfully doing so with Kcron. However, my crons aren't very elaborate. I've seen others use elaborate commands to start up a music player every morning at 8am etc. and I wondered how they got ahold of the command that opened up amarok with the proper volume and other settings that they needed.

I haven't seemed to run across any answer. The only thing I can think that someone might do to get ahold of these commands is to see the program executing via shell. Am I correct on this? If so, can I cat the output of a program execution to a file so that I can rip the command into a crontab? Help is appreciated....

anomie 12-12-2005 10:13 PM

The best suggestion I can think of is to view the man pages for the program you're interested in learning about. You should be able to read about all the available options there.

Example:
Code:

man xmms
edit: One more thing. Not sure which desktop environment you're using, but in KDE it's pretty trivial to see the command that is being run when you click the icon. There are probably many ways to get to this, but the quickest for me is to right mouse click on it and click Edit Item.

kodon 12-12-2005 11:07 PM

for available options
the man page is usually the best choice

for programs such as amarok with no man...
<program> --help
or similar will also list the runtime options

for what you want to do, i believe you will
need to create a seperate config file and refer
to that config instead of your user's standard
config at runtime in your cron...


All times are GMT -5. The time now is 11:35 AM.