I want that whenever I open Rhythmbox player It will auto mount the Windows Partition where all my music files are placed. Is there anyway I can invoke the mounting of Windows partition in the .desktop file

Please note that I don't want to automount windows partition on every login. I just want the windows parition to be mounted automatically whenever I open rhythmbox player.

Thanks in Advance.

  • Maybe a script can help you do that but I'm no script expert so is just an idea. – Engels Peralta Dec 15 '11 at 14:12

You could build a little shell script "/usr/local/bin/myrythmbox" like #!/bin/bash
mount /media/musicfiles
rythmbox (or however the commandline would be for starting it ina terminal)
umount /media/musicfiles

This would first mount the drive, start your player and when that is "done with", unmount the drive again. For this to work, you would need to do three things:

  1. add an entry in fstab mapping your music partition to an (empty) folder /media/musicfiles, making it available for non-roots /dev/sda8 /media/musicfiles noauto,user,unhide(...otherOptionsIGuess) 0 7
  2. find out the commandline name of rythmbox
  3. chmod u+x "/usr/local/bin/myrythmbox" to make it executable and put a link to the script into your menu or onto your desktop/starterpage.

I am not quite sure as for the line in the fstab regarding the "otheroptions", but "noauto" should keep the system from mounting the drive automatically and "user" allowing it non-roots to mount it.

Hope that helps,

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.