Announcement

Collapse
No announcement yet.

Play a sound in the background with a command? (Solved)

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Play a sound in the background with a command? (Solved)

    Hi everyone,

    My first post on the Kubuntu forums, but I'm somewhat active on the Ubuntu forums. I thought it was better to ask about this here.

    I recently installed CheckGmail (using Automatix), which is a nice little program that keeps me aware of the status of my inbox. One thing I don't like, though, is that no sound is played when I receive new mail. However, I can execute a command when I get new mail, so I thought perhaps I could have a program run a sound in the background (that is, without any windows actually opening).

    I just don't know what program is best. I thought I'd try using Knotify, which I guess does all system sounds, but typing "knotify" in the console gives me "command not found". So I'm assuming that won't work.

    I don't want to use AmaroK or Kaffeine, because they are always busy running other things for me. Besides, that's a lot of nonsense just to run one sound every so often.

    Does anyone have any suggestions? I know I could get by without any sound, but it's just something I prefer.

    I'll keep looking for options on my own, but no harm in reaching out for help, I hope!

    Thanks in advance to any who reply.

    Edit: Teppic solved this one for me, thanks!

    Originally posted by Teppic
    Back to original question...

    Something like aplay for wav files
    Code:
    aplay /usr/kde/3.5/share/sounds/KDE_Beep_ClockChime.wav
    or mpg321/mpg123 or ogg123 for mp3
    Code:
    ogg123 /usr/kde/3.5/share/sounds/KDE_Event_2.ogg 2&>/dev/null
    Code:
    mpg321 /usr/kde/3.4/share/apps/kbattleship/sounds/ship-sink.mp3 2&>/dev/null
    mpg321, mpg123, ogg123 should be seperate packages, aplay is part of the alsa-utils package.

    #2
    Re: Play a sound in the background with a command?

    Did you try K->System settings->Sound&Multimedia->System Notifications?
    Look in event source for KCheckGmail and turn on sounds there.
    Dont pretend you havent noticed my cardboard box, Julia, because I know you have!

    Comment


      #3
      Re: Play a sound in the background with a command?

      Originally posted by devnulljp
      Did you try K->System settings->Sound&Multimedia->System Notifications?
      Look in event source for KCheckGmail and turn on sounds there.
      I hadn't thought of that, but when I checked there, the only mail program I saw was "KMail". Checkgmail wasn't there at all.

      Comment


        #4
        Re: Play a sound in the background with a command?

        Try,

        Code:
        sudo apt-get update; sudo apt-get install kcheckgmail
        then...

        K->System settings->Sound&Multimedia->System Notifications
        Look in event source for KCheckGmail and turn on sounds there.


        You might need uni/multiverse enabled in apt...
        Dont pretend you havent noticed my cardboard box, Julia, because I know you have!

        Comment


          #5
          Re: Play a sound in the background with a command?

          Originally posted by devnulljp
          Try,

          Code:
          sudo apt-get update; sudo apt-get install kcheckgmail
          then...

          K->System settings->Sound&Multimedia->System Notifications
          Look in event source for KCheckGmail and turn on sounds there.


          You might need uni/multiverse enabled in apt...
          Well, I see what you mean now. I had been using CheckGmail, not KCheckGmail, and I'd assumed they were the same, but they are clearly quite different. I installed KCheckGmail, and now I'm having troubles getting it to work .. I can indeed change notifications now, but it won't log in, telling me it gets an "unknown error retrieving cookies". I thought that I'd maybe have to log in to Gmail with Konqueror (I use Firefox primarily) but I did, and nothing changed.

          I don't really know what to do now, but thank you for pointing out this program ..

          Comment


            #6
            Re: Play a sound in the background with a command?

            Back to original question...

            Something like aplay for wav files
            Code:
            aplay /usr/kde/3.5/share/sounds/KDE_Beep_ClockChime.wav
            or mpg321/mpg123 or ogg123 for mp3
            Code:
            ogg123 /usr/kde/3.5/share/sounds/KDE_Event_2.ogg 2&>/dev/null
            Code:
            mpg321 /usr/kde/3.4/share/apps/kbattleship/sounds/ship-sink.mp3 2&>/dev/null
            mpg321, mpg123, ogg123 should be seperate packages, aplay is part of the alsa-utils package.

            Comment


              #7
              Re: Play a sound in the background with a command?

              Originally posted by Teppic
              Back to original question...

              Something like aplay for wav files
              Code:
              aplay /usr/kde/3.5/share/sounds/KDE_Beep_ClockChime.wav
              or mpg321/mpg123 or ogg123 for mp3
              Code:
              ogg123 /usr/kde/3.5/share/sounds/KDE_Event_2.ogg 2&>/dev/null
              Code:
              mpg321 /usr/kde/3.4/share/apps/kbattleship/sounds/ship-sink.mp3 2&>/dev/null
              mpg321, mpg123, ogg123 should be seperate packages, aplay is part of the alsa-utils package.
              Wow! That's perfect! I didn't even know that was on the system. Devnulljp, thank you for suggesting KCheckGmail. I did eventually get it working, but I found it doesn't have some of the features I so enjoy in CheckGmail.

              Teppic, thank you very much for the information on those commands, I know I'll be using them for countless things!

              Comment

              Working...
              X