Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
HOWTO: kicking out Arts in the right way
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
Matteo Azzali
Retired Dev
Retired Dev


Joined: 23 Sep 2004
Posts: 1133

PostPosted: Tue Aug 15, 2006 11:11 am    Post subject: HOWTO: kicking out Arts in the right way Reply with quote

I just noticed there's not an howto for KDE + bare alsa configuration, I'm sorry, here we go.

Arts can be a pain and removing it may be a real joy for most KDE users, but if you do in the wrong way
you'll find yourself without previews in konqueror and without system notification sounds.

Care: you'll need to have a perfect alsa +mixer (hardware or dmix) setup and still there are issues
with skype (<1.3 as 1.3.x supports alsa) and teamspeak (see below) that don't support alsa


1) If you want to have still the previews in konqueror you'll have to keep arts emerged (even if disabled in kcontrol):
still arts will not eat-up memory or processor time.

To do this ,you can make sure your system has arts flag disabled (-arts)
and you'll add this flag just for some packages in your /etc/portage/package.use:
Code:

kde-base/kdm arts
kde-base/kdelibs arts
kde-base/mpeglib arts

Older versions of kde needed also kde-base/kdemultimedia-arts arts but that's not needed in the latest versions.


2) if you still want to use system notification, you can use an external player , like /usr/bin/play or sox
(part of the sox package), however in this way you can not:
a-adjust volume or other command line parameters
b-play two or more system notifications (sounds) simoultaneously

To fix both of these issues (a and b), I created a script as /usr/local/bin/Ksplay:
Code:

#!/bin/sh
sox "$@" -q -t alsa default vol 0.7 &

thyen I did a
Code:

chmod a+x /usr/local/bin/Ksplay

to make sure it's executable, and I've put /usr/local/bin/Ksplay as external player
in the system notification options (kcontrol).

3) now there are just two apps you may encounter issues with: both skype and teamspeak are still
not using alsa. (even if both seem to work, actually, they seem to get the sound exclusively.... no mixing)

Edit: better wrapper script(should be definitive), thanks to VoVan, renamed the script to avoid collision with bplay
package and removed artsplugin-xine from package.use (thanks to Headrush for pointing out)
Apr-2007 : changed the volume option

_________________
Every day a new distro comes to birth. Every day a distro "eats" another.
If you're born distro, no matter what, start to run.
---- http://www.linuxprinting.org/ ---- http://tuxmobil.org/


Last edited by Matteo Azzali on Mon Apr 02, 2007 9:03 am; edited 5 times in total
Back to top
View user's profile Send private message
Telemin
l33t
l33t


Joined: 25 Aug 2005
Posts: 675
Location: Glasgow, UK

PostPosted: Tue Aug 15, 2006 1:18 pm    Post subject: Reply with quote

Thanks for this. Arts has always been the bane of my life. :D

You might wanna considering adding it to the wiki as well.
_________________
The Geek formerly known as -Freestyling-
When you feel your problem has been solved please add [Solved] to the topic title.
Please adopt an unanswered post
Back to top
View user's profile Send private message
Headrush
Watchman
Watchman


Joined: 06 Nov 2003
Posts: 5597
Location: Bizarro World

PostPosted: Tue Aug 15, 2006 1:52 pm    Post subject: Re: HOWTO: kicking out Arts in the right way Reply with quote

Matteo Azzali wrote:
I just noticed there's not an howto for KDE + bare alsa configuration, I'm sorry, here we go.

Actually we had a thread detailing this almost exactly, several KDE versions ago.
It just shows how threads can be lost and that maybe adding this to the Gentoo ALSA wiki might be a good way to keep it current.
(Then again with KDE 4.0 we won't have to worry about arts. 8) )

A couple points
  • You may want to rename your script as there is a bplay package in portage already.
  • The current versions of artsplugin-xine doesn't have an arts USE flag. (Its always enabled in the ebuild.)
  • Why did you enable kdm with arts USE flag?
Just curious, is dmix enabled by default in the newer versions of ALSA? If so, shouldn't any of the variants work? (play, aplay, bplay)

Edit: Fixed mistake.
Back to top
View user's profile Send private message
Temet
Advocate
Advocate


Joined: 14 Mar 2006
Posts: 2579
Location: 92

PostPosted: Tue Aug 15, 2006 2:43 pm    Post subject: Reply with quote

I was using "play" before.
Your small script for bplay is so much better.
Thanks a lot! ;)
Back to top
View user's profile Send private message
VoVaN
l33t
l33t


Joined: 02 Jul 2003
Posts: 666
Location: The Netherlands

PostPosted: Wed Aug 16, 2006 12:38 pm    Post subject: Reply with quote

I'm using just a simple file play.sh instead:
Code:
#!/bin/sh
sox "$@" -v 0.9 -q -t alsa default &


The 'play' from sox package is just a shell script/wrapper, so when you're using 'play' in a script you're actually executing shell twice. Secondly, I would suggest using #!/bin/sh instead of bash because it's a lot quicker to execute (I know sh is just a link to bash, but if you do
Code:
LD_DEBUG=statistics bash --version
and do the same for sh you'll see a huge difference). Would be nice to use sox directly as an external player for kde, but unfortunatelly it's not possible to set any comman line parameters...
Back to top
View user's profile Send private message
bdm
Guru
Guru


Joined: 20 Jan 2006
Posts: 305
Location: Canada, Barrie, Ontario

PostPosted: Fri Aug 18, 2006 4:57 pm    Post subject: Reply with quote

Thanks for this! I'll have to try this out once I get a nice and stable machine going. :)

For now, I simply disabled all of the sounds KDE was doing. Same thing, right?
Back to top
View user's profile Send private message
Matteo Azzali
Retired Dev
Retired Dev


Joined: 23 Sep 2004
Posts: 1133

PostPosted: Mon Aug 28, 2006 11:18 am    Post subject: Re: HOWTO: kicking out Arts in the right way Reply with quote

Headrush wrote:

Actually we had a thread detailing this almost exactly, several KDE versions ago.
It just shows how threads can be lost and that maybe adding this to the Gentoo ALSA wiki might be a good way to keep it current.
(Then again with KDE 4.0 we won't have to worry about arts. 8) )

I'm not experienced about the wiki, if anyone want to insert it thanks to him....

Quote:

A couple points
  • You may want to rename your script as there is a bplay package in portage already.
  • The current versions of artsplugin-xine doesn't have an arts USE flag. (Its always enabled in the ebuild.)

thank you, removed.
Quote:
  • Why did you enable kdm with arts USE flag?Just curious, is dmix enabled by default in the newer versions of ALSA? If so, shouldn't any of the variants work? (play, aplay, bplay)
    Edit: Fixed mistake.


  • 1-kdm without arts flag caused various issues in the past, maybe actually can be removed but I still haven't tested,
    also, would png/jpeg avatars work fine without arts flag?

    2-system notification invokes the "variants" as commands in a single shell, you should then use "play &" "aplay &", etc.
    but the field for the external player doesn't like multiword text (that's why you can't directly invoke the second script line
    putting in that field).
    _________________
    Every day a new distro comes to birth. Every day a distro "eats" another.
    If you're born distro, no matter what, start to run.
    ---- http://www.linuxprinting.org/ ---- http://tuxmobil.org/
    Back to top
    View user's profile Send private message
    Matteo Azzali
    Retired Dev
    Retired Dev


    Joined: 23 Sep 2004
    Posts: 1133

    PostPosted: Mon Aug 28, 2006 11:23 am    Post subject: Reply with quote

    bdm wrote:
    Thanks for this! I'll have to try this out once I get a nice and stable machine going. :)

    For now, I simply disabled all of the sounds KDE was doing. Same thing, right?


    Yes, the modify here are to get system-sounds and previews in konqueror with the less possible packages emerged
    and arts disabled.
    _________________
    Every day a new distro comes to birth. Every day a distro "eats" another.
    If you're born distro, no matter what, start to run.
    ---- http://www.linuxprinting.org/ ---- http://tuxmobil.org/
    Back to top
    View user's profile Send private message
    Maedhros
    Bodhisattva
    Bodhisattva


    Joined: 14 Apr 2004
    Posts: 5511
    Location: Durham, UK

    PostPosted: Mon Aug 28, 2006 11:25 am    Post subject: Reply with quote

    Moved from Multimedia to Documentation, Tips & Tricks as this isn't a support request. :)
    _________________
    No-one's more important than the earthworm.
    Back to top
    View user's profile Send private message
    Headrush
    Watchman
    Watchman


    Joined: 06 Nov 2003
    Posts: 5597
    Location: Bizarro World

    PostPosted: Mon Aug 28, 2006 2:01 pm    Post subject: Re: HOWTO: kicking out Arts in the right way Reply with quote

    Matteo Azzali wrote:
    would png/jpeg avatars work fine without arts flag?

    Why wouldn't they, what does arts have to do with graphic formats?

    Matteo Azzali wrote:
    2-system notification invokes the "variants" as commands in a single shell, you should then use "play &" "aplay &", etc.
    but the field for the external player doesn't like multiword text (that's why you can't directly invoke the second script line
    putting in that field).

    I just meant if dmix was enabled by default, everyone has mixing of multiple sounds so any of the player should work.
    (Nothing to do with multiword test.)
    Back to top
    View user's profile Send private message
    Matteo Azzali
    Retired Dev
    Retired Dev


    Joined: 23 Sep 2004
    Posts: 1133

    PostPosted: Mon Aug 28, 2006 5:02 pm    Post subject: Re: HOWTO: kicking out Arts in the right way Reply with quote

    Headrush wrote:
    Matteo Azzali wrote:
    would png/jpeg avatars work fine without arts flag?

    Why wouldn't they, what does arts have to do with graphic formats?

    In kde 3.5_beta2, if you completely removed the arts flag you losed completely the preview functionality of konqueror.
    I don't know if in 3.5.x the behaviour is still the same, but this was my previous report. As specified
    somewhere else, arts (as nmm, or gstreamer) isn't just a sound demon, is/was a multimedia framework. But the sound
    demon is the buggy/nasty component that gives/gaved headaches to kde users. (there's no much people complaining about
    konqueror previews bugs)

    Headrush wrote:
    Matteo Azzali wrote:
    2-system notification invokes the "variants" as commands in a single shell, you should then use "play &" "aplay &", etc.
    but the field for the external player doesn't like multiword text (that's why you can't directly invoke the second script line
    putting in that field).

    I just meant if dmix was enabled by default, everyone has mixing of multiple sounds so any of the player should work.
    (Nothing to do with multiword test.)

    open konsole, hit play <filename> with a wav of some seconds and without the "&" char, then try to open another wav from
    the same teminal. You can't. The issue is the same, cause the external player mechanism isn't (or wasn't) generating
    multiple shells , being just a transposition of the art system notification mechanism (and I would guess that having a demon
    you don't need to use the "&" to make it play a sound and have the terminal not busy.....)
    _________________
    Every day a new distro comes to birth. Every day a distro "eats" another.
    If you're born distro, no matter what, start to run.
    ---- http://www.linuxprinting.org/ ---- http://tuxmobil.org/
    Back to top
    View user's profile Send private message
    Headrush
    Watchman
    Watchman


    Joined: 06 Nov 2003
    Posts: 5597
    Location: Bizarro World

    PostPosted: Mon Aug 28, 2006 7:18 pm    Post subject: Re: HOWTO: kicking out Arts in the right way Reply with quote

    Matteo Azzali wrote:
    In kde 3.5_beta2, if you completely removed the arts flag you losed completely the preview functionality of konqueror.
    I don't know if in 3.5.x the behaviour is still the same, but this was my previous report. As specified
    somewhere else, arts (as nmm, or gstreamer) isn't just a sound demon, is/was a multimedia framework. But the sound
    demon is the buggy/nasty component that gives/gaved headaches to kde users. (there's no much people complaining about
    konqueror previews bugs)

    Weird, never heard about that. (Something new to look and check out.)

    Matteo Azzali wrote:
    open konsole, hit play <filename> with a wav of some seconds and without the "&" char, then try to open another wav from
    the same teminal. You can't.

    It worked.
    I understand what you are saying though, the external player option doesn't allow passing the "&" needed to background the first playing sound.
    (Which is weird also in that you would expect each to spawn a new shell environment to run in.)

    Looking at the play program after evaluating any parameters passed to it, it calls sox with the following command
    Code:
    eval sox $gopts $play_opts $arch_defines $device $effects

    If you modify this to add & like this
    Code:
    eval sox $gopts $play_opts $arch_defines $device $effects &

    it plays multiple sounds from kde notifications fine.
    I know that when using sox from the command line it displays output information, so I don't know if this would be worth asking the sox developers to add this or not.
    Using a script above would still be useful if you need to modify other options to sox, but if those options aren't needed, this one change should do it.

    I'll also be glad when arts is gone. :)
    Back to top
    View user's profile Send private message
    Matteo Azzali
    Retired Dev
    Retired Dev


    Joined: 23 Sep 2004
    Posts: 1133

    PostPosted: Tue Aug 29, 2006 7:44 pm    Post subject: Re: HOWTO: kicking out Arts in the right way Reply with quote

    Headrush wrote:

    It worked.

    Sorry, in my little english I was meaning "You can't until first sound isn't stopped".

    Hopefully nmm will be ready for kde 4 launch, and even if it will not, phonon should let us choose which multimedia system
    to use (and I would bet there will be some minimal, fast and light system to use, even if I actually would like to use
    bare alsa and a multimedia system only for previewing)
    _________________
    Every day a new distro comes to birth. Every day a distro "eats" another.
    If you're born distro, no matter what, start to run.
    ---- http://www.linuxprinting.org/ ---- http://tuxmobil.org/
    Back to top
    View user's profile Send private message
    VsMaX
    n00b
    n00b


    Joined: 29 Aug 2006
    Posts: 40
    Location: Poland

    PostPosted: Wed Aug 30, 2006 12:40 pm    Post subject: Reply with quote

    Lol guys sory but i don't understand you - why you want to delete arts and what to use instead of that? My xmms doesn't work, JuK plays music , but it cuts himself, and aoss plays music great :/ I dont have emerged arts and dont know - emerge him or not?
    Back to top
    View user's profile Send private message
    Matteo Azzali
    Retired Dev
    Retired Dev


    Joined: 23 Sep 2004
    Posts: 1133

    PostPosted: Wed Aug 30, 2006 6:24 pm    Post subject: Reply with quote

    VsMaX wrote:
    Lol guys sory but i don't understand you - why you want to delete arts and what to use instead of that? My xmms doesn't work, JuK plays music , but it cuts himself, and aoss plays music great :/ I dont have emerged arts and dont know - emerge him or not?


    I'm using bare alsa. xmms plays fine, amarok uses xine-engine, skype works with alsa and teamspeak can be wrapped
    with aoss. The system notification sounds work fine (and mixed) with the script I provided.
    The only reason for which I still have arts support in my kdelibs is that this is/was needed to show previews in konqueror
    (100% sure it was needed for mpeg and avi thumbnails), does your system with "-arts" flag generates thumbnails for
    video files in konqueror?
    _________________
    Every day a new distro comes to birth. Every day a distro "eats" another.
    If you're born distro, no matter what, start to run.
    ---- http://www.linuxprinting.org/ ---- http://tuxmobil.org/
    Back to top
    View user's profile Send private message
    VsMaX
    n00b
    n00b


    Joined: 29 Aug 2006
    Posts: 40
    Location: Poland

    PostPosted: Thu Aug 31, 2006 7:26 pm    Post subject: Reply with quote

    So can you tell me how to use this script? Im not so good in linux yet :P I think my sound it's terrible because i dont have enabled that hardware acceleration in Kde control center but i can't enable it untill i emerge arts. So please say me how to do that.
    Back to top
    View user's profile Send private message
    Matteo Azzali
    Retired Dev
    Retired Dev


    Joined: 23 Sep 2004
    Posts: 1133

    PostPosted: Thu Sep 07, 2006 2:42 pm    Post subject: Reply with quote

    VsMaX wrote:
    So can you tell me how to use this script? Im not so good in linux yet :P I think my sound it's terrible because i dont have enabled that hardware acceleration in Kde control center but i can't enable it untill i emerge arts. So please say me how to do that.

    Please reread first message, this is an howto for kde-users to use bare ALSA (no arts) and still have system-sound and previews,
    not what you're looking for, sorry.
    _________________
    Every day a new distro comes to birth. Every day a distro "eats" another.
    If you're born distro, no matter what, start to run.
    ---- http://www.linuxprinting.org/ ---- http://tuxmobil.org/
    Back to top
    View user's profile Send private message
    cevi
    n00b
    n00b


    Joined: 14 May 2005
    Posts: 4

    PostPosted: Thu Sep 21, 2006 12:35 pm    Post subject: Reply with quote

    I didn't neeeded the previed in konqueror, so I decided that I compile everything without the arts useflag, but it seems as if knotify depends on arts in kdelibs, so if you want to use knotify( and you really want to usally ) you have to emerge kdelibs with arts not only when you just want the preview in konqueror
    Back to top
    View user's profile Send private message
    nabla²
    Apprentice
    Apprentice


    Joined: 17 May 2005
    Posts: 280

    PostPosted: Thu Oct 19, 2006 4:08 pm    Post subject: Reply with quote

    flameeyes has just released kdelibs-3.5.5-r3 which don't need the arts flag at all. Seems to work. :D
    _________________
    Gentoo on Intel Core Duo 2 E6750, Gigabyte P35-DS3P, NVIDIA 8800GTS (amd64)
    Back to top
    View user's profile Send private message
    Matteo Azzali
    Retired Dev
    Retired Dev


    Joined: 23 Sep 2004
    Posts: 1133

    PostPosted: Fri Oct 20, 2006 6:43 pm    Post subject: Reply with quote

    nabla² wrote:
    flameeyes has just released kdelibs-3.5.5-r3 which don't need the arts flag at all. Seems to work. :D


    You get thumbnails in konqueror even without arts? I believed we would have to wait kde 4 for this,
    but I would be happy to find myself wrong..... :roll:
    _________________
    Every day a new distro comes to birth. Every day a distro "eats" another.
    If you're born distro, no matter what, start to run.
    ---- http://www.linuxprinting.org/ ---- http://tuxmobil.org/
    Back to top
    View user's profile Send private message
    AssociateX
    Tux's lil' helper
    Tux's lil' helper


    Joined: 19 Feb 2004
    Posts: 134
    Location: North Dakota

    PostPosted: Wed Nov 22, 2006 3:52 am    Post subject: Reply with quote

    This used to work for me but not tonight. What do you want to know?
    _________________
    AssociateX
    Gentoo rocks!
    Back to top
    View user's profile Send private message
    AssociateX
    Tux's lil' helper
    Tux's lil' helper


    Joined: 19 Feb 2004
    Posts: 134
    Location: North Dakota

    PostPosted: Wed Nov 22, 2006 2:12 pm    Post subject: Reply with quote

    bumb for another solution.
    _________________
    AssociateX
    Gentoo rocks!
    Back to top
    View user's profile Send private message
    Matteo Azzali
    Retired Dev
    Retired Dev


    Joined: 23 Sep 2004
    Posts: 1133

    PostPosted: Wed Nov 22, 2006 5:55 pm    Post subject: Reply with quote

    1-arts is turned off (check kcontrol)?
    2-if so, try so use alsaplayer , it's working?
    3-if even to step 2 answer is yeas,then try to run the provided script
    (play.sh or whatever you use) from console with a random sound. Is working?
    _________________
    Every day a new distro comes to birth. Every day a distro "eats" another.
    If you're born distro, no matter what, start to run.
    ---- http://www.linuxprinting.org/ ---- http://tuxmobil.org/
    Back to top
    View user's profile Send private message
    AssociateX
    Tux's lil' helper
    Tux's lil' helper


    Joined: 19 Feb 2004
    Posts: 134
    Location: North Dakota

    PostPosted: Thu Nov 23, 2006 3:14 am    Post subject: Reply with quote

    kcontrol>Sound & Multimedia>Sound System>"Enable the sound system" is now unchecked. ( I thought it was supposed to be checked) Doesn't matter though, with "Enable the sound system" checked I still don't have "System Notification" sound although the "Test Sound" button plays a sound.

    If I go to kcontrol>Sound & Multimedia>System Notifications>Actions> then press the play button there is no sound there (KDE_Glass_Break.ogg). Although the following does work:

    me@athlon ~ $ /usr/local/bin/Ksplay /usr/kde/3.5/share/sounds/KDE_Glass_Break.ogg <--- this plays a sound of glass breaking.

    If I put aplay in "Player Settings" kcontrol>Sound & Multimedia>System Notifications>Actions> then press the play button it sounds like garbage, like "cat /dev/urandom > /dev/adsp".

    Doing the following sounds like garbage, too:

    /usr/bin/aplay /usr/kde/3.5/share/sounds/KDE_Glass_Break.ogg
    _________________
    AssociateX
    Gentoo rocks!
    Back to top
    View user's profile Send private message
    sonicbhoc
    Veteran
    Veteran


    Joined: 24 Oct 2005
    Posts: 1805
    Location: In front of the computer screen

    PostPosted: Thu Nov 23, 2006 3:29 am    Post subject: Reply with quote

    Why does everybody hate arts so much? It's never given me a problem as far as I know.
    Back to top
    View user's profile Send private message
    Display posts from previous:   
    Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
    Goto page 1, 2  Next
    Page 1 of 2

     
    Jump to:  
    You cannot post new topics in this forum
    You cannot reply to topics in this forum
    You cannot edit your posts in this forum
    You cannot delete your posts in this forum
    You cannot vote in polls in this forum