title
Products            Buy            Support Forum            Professional            About            Codec Central
 

Ubuntu Linux / Gnome Nautilus integration scripts

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bohemier
    • Nov 2008
    • 2

    Ubuntu Linux / Gnome Nautilus integration scripts

    Hello everyone,

    For those interested, here's how I integrated DMC into Ubuntu Nautilus so you can launch conversions directly from the file manager just like in Windows.

    This is my first attempt so I'm sure there are ways to make this better but I think it's a good start. I've tested this with Ubuntu 10.04 / Wine 1.1.43.

    1) Install wine with the Ubuntu Software Center. I used the beta release.
    2) Install your favorite music converter program (it ought to be DMC, right?)
    3) Create a file in, for example, /home/YOUR USERNAME/scripts or where ever you want it to be, with the following contents:

    Code:
    tmpfile="/home/YOUR USERNAME/scripts/dmcfiles"
    
    cat /dev/null > $tmpfile
    for file in "$@"
    do
        echo `winepath -w "${file}"` >> $tmpfile
    done
    
    iconv -f utf-8 -t utf-16 -o $tmpfile.utf-16 $tmpfile
    rm $tmpfile
    wine "C:\Program Files\Illustrate\dBpoweramp\MusicConverter.exe" -list_to_conv="`winepath -w "$tmpfile.utf-16"`"
    Just make sure you replace the line that contains YOUR USERNAME with the appropriate path. Save the file as dmcstarter.

    4) change the permissions on the file to executable.
    ex in shell: chmod +x /home/YOUR USERNAME/scripts/dmcstarter
    5) In nautilus file manager, right-click on a SINGLE music file (.flac, .ogg, .mp3, ...) and choose open with... Other Application
    6) Choose "Use a custom command"
    7) enter "/home/YOUR USERNAME/scripts/dmcstarter %U" without the quotation marks
    8) Click Open.

    The association will be done for that filetype. You can now open multiple files of the same filetype with DMC. It will not work if you use different filetypes but like I said, it's just a start! I think one would need to play around with /usr/share/applications/mimeinfo.cache and the .desktop files in order to make it better (icon, multiple filetypes, etc)

    Have fun ! Any suggestions are welcome!

    J-F Bohemier
Working...

]]>