Announcement

Collapse
No announcement yet.

[RESOLVED] KDE 4.3.5 and the Device Notifier

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

    [RESOLVED] KDE 4.3.5 and the Device Notifier

    Upgraded to KDE 4.3.5 this evening. Performed my 'acid tests' to ensure that all was still good. Inserted a commercial DVD. Decided to see if I could launch it via the Device Notifier. It reported that the DVD was loaded and that three actions were available. One was to launch Dragon Player, which I chose. Dragon Player loaded and started playing the DVD! I was really pleased. I believe that this did not happen prior to KDE 4.3.5 - that was a common complaint about the Device Notifier - actions opted for didn't do anything.

    My Sansa e280 MP3 player works still with Amarok. No problems. Amarok plays my music CDs. No problem. Amarok still won't launch when selected via the Device Notifier with a music CD inserted. Oh well.
    Windows no longer obstructs my view.
    Using Kubuntu Linux since March 23, 2007.
    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

    #2
    Re: KDE 4.3.5 and the Device Notifier

    Originally posted by Snowhog
    Upgraded to KDE 4.3.5 this evening. Performed my 'acid tests' to ensure that all was still good. Inserted a commercial DVD. Decided to see if I could launch it via the Device Notifier. It reported that the DVD was loaded and that three actions were available. One was to launch Dragon Player, which I chose. Dragon Player loaded and started playing the DVD! I was really pleased. I believe that this did not happen prior to KDE 4.3.5 - that was a common complaint about the Device Notifier - actions opted for didn't do anything.

    My Sansa e280 MP3 player works still with Amarok. No problems. Amarok plays my music CDs. No problem. Amarok still won't launch when selected via the Device Notifier with a music CD inserted. Oh well.
    Yep! Worked here as well!

    Comment


      #3
      Re: KDE 4.3.5 and the Device Notifier

      Okay, I know that this has been asked, and maybe even answered - to some degree - but, why is it that Dragon Player will launch and play a DVD from Device Notifier, but nothing else works - i.e., have Device Notifier launch Amarok to play a music CD and such. What is it about Dragon Player, when it is installed, that is different from all other applications, that causes it to work with Device Notifier while other apps don't? Can we create a 'missing' file for the desired actions that are reported by Device Notifier, but apparently don't exist?
      Windows no longer obstructs my view.
      Using Kubuntu Linux since March 23, 2007.
      "It is a capital mistake to theorize before one has data." - Sherlock Holmes

      Comment


        #4
        Re: KDE 4.3.5 and the Device Notifier

        I installed the 32bit Kubuntu Karmic on a dependent's Dell E510 a couple weeks ago. Everything worked -- DVDs played, AudioCDs played, Stellarium worked. After I completed the installation I noticed that the E510 was a 64bit box. So, I told them I'd come back in a week or two and install the 64bit KK so they could enjoy another 15-20% performance gain.

        Today I did that, and on an internet connection that was only around 100kb/s. Took six hours to do everything. Luckily, they had a 52 inch HDTV to watch will things trickled down from the web.

        Stellarium loads but quickly locks up the the computer, so I'll have to change the version of the video driver. Audio CDs load and play, BUT, DVD do NOT auto load or play. Aside from those two problems everything else works well.

        The E510 has one 80 GB HD, one CDROM and one DVD R/W. The block devices in /dev look ok:
        brw-rw----+ 1 root cdrom 11, 0 ... sr0 (a CDROM top drawer - sr0)
        brw-rw----+ 1 root cdrom 11, 1 ... sr1 (a DVDROM bottom drawer - sr1 )

        but, the links seemed messed up ...
        lrwxrwxrwx 1 root root ... cdrom -> sr1
        " " " ... cdrom1 -> sr0
        " " " ... cdrw -> sr1
        " " " ... cdrw1 -> sr0
        " " " ... dvd -> sr1
        " " " ... dvdrw -> sr1
        " " " ... scd0 -> sr0
        " " " ... scd1 -> sr1

        This is the first time in over 30 installs of Kubuntu that the CDROMs didn't automatically configure correctly.
        "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
        – John F. Kennedy, February 26, 1962.

        Comment


          #5
          Re: KDE 4.3.5 and the Device Notifier

          It could be the command switch needed for your particular app. If you poke around the Device Actions area in System Settings, you will see that the command to open dragonplayer and play the dvd is
          Code:
          dragon --play-dvd
          For another, the command switch may be different

          As for Amarok, you may want to try installing 2.2.2, which is not in the same repo as 4.3.5. I don't have any audio cds handy to check, it has been so long since I have used them

          Comment


            #6
            Re: KDE 4.3.5 and the Device Notifier

            Originally posted by claydoh
            ....
            Code:
            dragon --play-dvd
            For another, the command switch may be different
            ...
            Amorok
            ...
            Things don't get that far. If I insert a DVD into the DVD drive it never is recognized in the device notification. IOW, auto recognition, or mounting, never occurs.
            "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
            – John F. Kennedy, February 26, 1962.

            Comment


              #7
              Re: KDE 4.3.5 and the Device Notifier

              In Device Actions > Play Audio CD with Amarok the command line is amarok --cdplay %u

              Interestingly, amarok --help shows no such option, but does have: -p, --play

              I changed the command, saved, and reloaded a music CD and chose Play Audio CD with Amarok from the Device Notifier. Amarok still doesn't launch. Hmm.
              Windows no longer obstructs my view.
              Using Kubuntu Linux since March 23, 2007.
              "It is a capital mistake to theorize before one has data." - Sherlock Holmes

              Comment


                #8
                Re: KDE 4.3.5 and the Device Notifier

                (Kubuntu 9.10 / KDE 4.3 / Amarok 2.2.0)

                Hmm - wondering where that "amarok --cdplay %u" is coming ?
                As the Snowhog wrote "amarok --help shows no such option"

                I think that the problem is that the Amarok is not playing the CD's directly - The Amarok want to populate the playlist first but there is not an option for it (?)


                Workaround

                Making a "populator" /1/,/2/:
                Code:
                #!/bin/sh
                
                ID=`cd-discid /dev/cdrom | awk '{ print $1 }'`
                MAX=`cd-discid /dev/cdrom | awk '{ print $2 }'`
                
                amarok -l audiocd:/$ID/1
                
                for i in $(seq 2 $MAX)
                do
                  amarok -a audiocd:/$ID/$i
                done
                Turning the executable on and dropping it to the /usr/local/bin.

                Check:
                Code:
                ls -l /usr/local/bin/populator
                -rwxr-xr-x 1 root root 193 2010-01-31 16:06 /usr/local/bin/populator
                Editing the amarok solid action (backup first).
                Now the /usr/share/kde4/apps/solid/actions/amarok-play-audiocd.desktop has line:
                Code:
                Exec=populator && amarok -p
                Testing with few CD's => Seems to work... Sometimes you need to press the "Play" button (?)

                Preview (Youtube) > http://www.youtube.com/watch?v=f6CaVvQkA60


                /1/ package: cd-discid
                CDDB DiscID utility

                cd-discid is a backend utility to get CDDB discid information from a CD-ROM
                disc.
                /2/ amarok --help
                -a, --append Append files/URLs to playlist
                -l, --load Load URLs, replacing current playlist
                -p, --play Start playing current playlist
                Before you edit, BACKUP !

                Why there are dead links ?
                1. Thread: Please explain how to access old kubuntu forum posts
                2. Thread: Lost Information

                Comment


                  #9
                  Re: KDE 4.3.5 and the Device Notifier

                  Did my own test here. Opened a console and typed:
                  Code:
                  amarok -p
                  This launches Amarok, reads the music CD and the contents under Local Music > Audio CD. You still have to add the contents to the Play List before it will play, but that seems to be the normal behavior, and is acceptable.

                  I also noted in this test, that if I wait for a bit - less than a minute - before trying this in the console, that Amarok does not launch. That implies an underlying control of the 'connected' device only being made available for action for x amount of time before it's status is set otherwise.

                  So, the fact that the command amarok -p from the CLI does work, and that command, when placed in the Play Audio CD with Amarok of Device Actions does not work, tells me that the "conditions" of that entry are incorrect.

                  I've posted this question/observation on KDE Community Forums and am waiting for a reply. I believe, other than the fact that the 'default' command (amarok --playcd %u) is wrong, that the actual make up of the Device Action for Play Audio CD with Amarok is put together wrong.
                  Windows no longer obstructs my view.
                  Using Kubuntu Linux since March 23, 2007.
                  "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                  Comment


                    #10
                    Re: KDE 4.3.5 and the Device Notifier

                    Now this is interesting! After a few minutes, and with the music CD still in the caddy, from the console, I ran:
                    Code:
                    amarok --debug
                    Amarok launched and read, identified, and listed the CD contents as before (under Local Music > Audio CD). Not sure what to make of that, except it strengthens my belief that the Device Actions entry isn't written correctly. That surprises me, as I'd think that the developers would have tested these to ensure that they actually worked. Hmm.
                    Windows no longer obstructs my view.
                    Using Kubuntu Linux since March 23, 2007.
                    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                    Comment


                      #11
                      Re: KDE 4.3.5 and the Device Notifier

                      SOLVED IT!!

                      Another "three pipe problem" bites the dust. I knew that the default configuration for the Play Audio CD with Amarok as well as the command it used (amarok --playcd %u) was 'wrong' based on prior observations and investigation. I also knew that the Device Action for playing DVDs (Open with Video Player (Dragon Player)) worked. As it used the same optical drive, I asked myself, "what is it about the configuration of that Device Action that is different than the one used for Amarok?"

                      I had noticed, and it has actually been reported (I saw it yesterday?) on the 'Net (sorry, don't remember where) that a Device Actions entry had 'duplicate' stanzas. Well, that is the case with my Open with Video Player (Dragon Player) so I decided to perform a test.

                      I created a new Device Action item - Open with Amarok - using the exact same conditions as the default Play Audio CD with Amarok but duplicating the conditions. I did of course, change the command from amarok --playcd %u to amarok -p. Saved and then rebooted the laptop.

                      When the desktop was loaded, I inserted a music CD. The Device Notifier opened and showed that there were now five actions to choose from. I selected Open with Amarok. Voila! Amarok launched, identified the music CD and listed it's contents. I just had to right-click on it and select Add to Play List and it started playing!!

                      Damn. Another Sherlock Tux mystery solved. 8)

                      Attached Files
                      Windows no longer obstructs my view.
                      Using Kubuntu Linux since March 23, 2007.
                      "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                      Comment


                        #12
                        Re: [SOLVED] KDE 4.3.5 and the Device Notifier

                        May need to let people know that the ' that surrounds the equaling term Audio isn't added automatically. You have to make sure you add them in your statement. Found that out just now.


                        EDIT: I must say I didn't have good results duplicating that. Amarok doesn't start. I have 2.2.2. Am I missing something? Maybe what was mentioned above? Let me know if so. Also, Doing amarok -p from cli works, but Amarok errors after first track.

                        Comment


                          #13
                          Re: [SOLVED] KDE 4.3.5 and the Device Notifier

                          Sherlock Tux!

                          I like that .... it fits you perfectly, as demonstrated by your excellent display of deductive reasoning. 8)
                          "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                          – John F. Kennedy, February 26, 1962.

                          Comment


                            #14
                            Re: [SOLVED] KDE 4.3.5 and the Device Notifier

                            Well, as is usually the case with Linux, there is more than one way to do something.

                            By comparing /home/paul/.kde/share/apps/solid/actions/Open-Amarok.desktop to /usr/share/kde4/apps/solid/actions/amarok-play-audiocd.desktop I found that by making just four changes to the latter file, Amarok would launch and load the music CD via Device Notifier.

                            Here is what the unchanged /usr/share/kde4/apps/solid/actions/amarok-play-audiocd.desktop looks like with the items requiring changing in red:
                            [Desktop Entry]
                            X-KDE-Solid-Predicate=[ StorageVolume.ignored == false AND OpticalDisc.availableContent == 'Audio' ]
                            Type=Service
                            Actions=Play;
                            X-KDE-Priority=TopLevel

                            [Desktop Action Play]
                            Name=Play Audio CD with Amarok
                            Icon=amarok
                            Exec=amarok --cdplay %u
                            X-Ubuntu-Gettext-Domain=desktop_amarok
                            This is what the file looks like after the changes (in blue):
                            [Desktop Entry]
                            X-KDE-Solid-Predicate=[ StorageVolume.ignored == false AND OpticalDisc.availableContent == 'Audio' ]
                            Type=Service
                            Actions=open;
                            X-KDE-Priority=TopLevel

                            [Desktop Action open]
                            Name=Open Audio CD with Amarok
                            Icon=amarok
                            Exec=amarok -p
                            X-Ubuntu-Gettext-Domain=desktop_amarok
                            One doesn't have to duplicate X-KDE-Solid-Predicate=[ StorageVolume.ignored == false AND OpticalDisc.availableContent == 'Audio' ] which is what I did (and what results in the generated .desktop file) in the entry I created. In addition to the Exec= having been incorrect, the Actions= was also wrong. Action=Play; doesn't work, but Actions=open; does.

                            I made the three changes to the /usr/share/kde4/apps/solid/actions/amarok-play-audiocd.desktop (after making a backup). Tested it by selecting Open Audio CD with Amarok and again, works like it's supposed to. 8)
                            Windows no longer obstructs my view.
                            Using Kubuntu Linux since March 23, 2007.
                            "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                            Comment


                              #15
                              Re: [SOLVED] KDE 4.3.5 and the Device Notifier

                              Also, if you make the changes, remove the ~/.local/share/applications/amarok-play-audiocd.desktop file. If it exists, it appears to be used instead, and it will contain the incorrect values.
                              Windows no longer obstructs my view.
                              Using Kubuntu Linux since March 23, 2007.
                              "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                              Comment

                              Working...
                              X