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!
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I think I've got the jist of the 'at' command. When I say something like 'at 5am tomorrow' it gives me a 'at>' prompt. I can enter the commands I want it to perform, but how do I get out of it? I've tried ctrl-c, which gets me out, but running 'atq' shows me nothing. How do I return from the prompt with my commands saved?
I used 'at 11:00am' and entered 'touch blah.txt', and it created the file at the specified time. Could it be because you didn't specify am/pm? I also tested it as a nonroot user just to be sure it wasn't a permissions thing, and it worked fine.
Yes, xmms runs from the command line by typing xmms.
job 15 at 2007-03-03 05:46
job 15 at 2007-03-03 05:46
This comes any time before 5:46 when you type atq. After 5:46, atq displays nothing as expected, but xmms does not run.Even the command 'ls' wont run.
But the strange thing is: your command 'touch blah.txt' worked for at! I tried to run a shell script that plays a video using mplayer. I heard the song without the video! Sometimes it plays the sound only for about a second!
Are there any limitations for what the at command can run?
EDIT: I wrote a script called sc which echoes "Hi", and tried to run it in the following ways:
I'm not sure how at handles screen stuff, since its running in the background in a way. For example, if I use wget from at, I don't get any record of the characters that would normally be displayed on screen (at least I don't think I do)
Xmms is a graphical application. I'm not 100% certain how it works, but I would guess that at is executing the command in a more limited environment without any reference to the DISPLAY environment variable. Therefore xmms isn't able to open a Window on your DISPLAY.
You might try one of the several command line mp3 players if you just want an mp3 played at a particular time.
Try setting the display variable explicitly, for example:
echo "DISPLAY=:0.0 xclock" | at now + 1 minute
The man-page does mention something about the display variable:
The working directory, the environment (except for the variables TERM, DISPLAY and _) and the umask are retained from the time of invocation.
What really helps when debugging this kind of problems: Installing mail! You'll get mail messages from at/cron (and friends) when your scheduled jobs fail. For debian/ubuntu systems, just install the packages postfix and mailutils, select "Local only" when you are asked what type of postfix config you want.
When your scheduled command is not executed, type 'mail' to check your local mailbox. The mail usually explains what has gone wrong.