Re: Crontab as alarm clock with ogg123

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Jul 24, 2010 at 1:51 PM, Frank Cox <theatre@xxxxxxxxxxx> wrote:
>
> On Sat, 2010-07-24 at 12:55 -0700, Robert Arkiletian wrote:
>> So I'm thinking it's the same infrastructure to prevent others music
>> playing when you switch users. But in my case I *want* it to play. Any
>> ideas?
>
> /etc/security/console.perms.d/50-default.perms
>

I created a new perms file called 51-default.perms
and added

##
<sound>=/dev/snd/* /dev/snd
<console> 0666 <sound> 0666 root
##

rebooted (Did I need to?)

I now notice that the devices in /dev/snd are  crw-rw-rw-+. So Others
should be able to write to the device.  But I still cannot get cron to
play an ogg music file unless it's for the person currently  logged
in.

I have checked that the file plays fine when normally played so it's
not an issue with ogg123 or the music file. Here is my crontab line
(as tried for root)

30  12  *  *  1  /usr/bin/ogg123  /root/Mists_of_Time-4T.ogg

/var/log/cron tells me the command is issued but no sound from speakers.

Here's the funny part. If I ssh in (as a different user) and run
ogg123 from command line, sound plays on the sshd server machine. It
works!! But not if I set it to play using cron.  So basically one must
be logged in either at the machine or through ssh.

Also, if nobody is logged in, nothing is heard. But as soon as I log
into the user who has the cron job running, the sound comes on
immediately at login. If I then log out while the song is playing,
sound stops. Log back in and sound comes on again. Obviously, the
ogg123 process is running but the sound is being disconnected unless
the user is logged in.

wondering if udev rules is somehow responsible. Here is

/etc/udev/rules.d/90-alsa.rules

ACTION=="add", SUBSYSTEM=="sound", KERNEL=="controlC*", \
  RUN+="/sbin/alsactl -E ALSA_CONFIG_PATH=/etc/alsa/alsactl.conf
--initfile=/lib/alsa/init/00main restore /dev/$name"
ACTION=="remove", SUBSYSTEM=="sound", KERNEL=="controlC*", \
  RUN+="/sbin/alsactl -E ALSA_CONFIG_PATH=/etc/alsa/alsactl.conf store
/dev/$name"

Any  ideas much appreciated?

-- 
Robert Arkiletian
Eric Hamber Secondary, Vancouver, Canada
-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines

[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux