LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-09-2004, 12:04 AM   #1
Mr.Bone
Member
 
Registered: Aug 2004
Location: An Igloo in Alaska
Distribution: Ubuntu/Debian Sarge
Posts: 31

Rep: Reputation: 15
Gnomad2


I own a Nomad Jukebox zen xtra 40 gig mp3 player. I did some googleing and found the program Gnomad2 which will let me put music on it in linux. Ive followed all the setup instructions here http://gnomad2.sourceforge.net/?section=article


Everything installed with no problems whatsoever. However when I connect my nomad and run gnomad 2 i get this:

Code:
steve@linux:~> gnomad2
usb_set_configuration: Operation not permitted


The program starts up and says "could not open jukebox". Does anybody know what to do?
 
Old 08-09-2004, 08:39 AM   #2
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,987

Rep: Reputation: 388Reputation: 388Reputation: 388Reputation: 388
You have to run it as root or you'll get that error message; at least I do.
 
Old 09-19-2004, 08:52 AM   #3
clon21
LQ Newbie
 
Registered: Sep 2004
Posts: 1

Rep: Reputation: 0
No, you don't have to run as root if you configure correctly your system.

You only have to copy the file nomad.usermap to directory /etc/hotplug/usb

The content of this file is:

Code:
# Creative Nomad Jukebox
nomadjukebox    0x0000  0x0471  0x0222  0x0000  0x0000  0x00    0x00    0x00    0x00    0x00    0x00     0x00000000
# Creative Nomad Jukebox 2
nomadjukebox    0x0000  0x041e  0x4100  0x0000  0x0000  0x00    0x00    0x00    0x00    0x00    0x00     0x00000000
# Creative Nomad Jukebox 3
nomadjukebox    0x0000  0x041e  0x4101  0x0000  0x0000  0x00    0x00    0x00    0x00    0x00    0x00     0x00000000
# Creative Nomad Jukebox Zen
nomadjukebox    0x0000  0x041e  0x4108  0x0000  0x0000  0x00    0x00    0x00    0x00    0x00    0x00     0x00000000
# Creative Nomad Jukebox Zen USB 2.0
nomadjukebox    0x0000  0x041e  0x410b  0x0000  0x0000  0x00    0x00    0x00    0x00    0x00    0x00     0x00000000
# Creative Nomad Jukebox Zen NX
nomadjukebox    0x0000  0x041e  0x4109  0x0000  0x0000  0x00    0x00    0x00    0x00    0x00    0x00     0x00000000
# Creative Nomad Jukebox Zen Xtra
nomadjukebox    0x0000  0x041e  0x4110  0x0000  0x0000  0x00    0x00    0x00    0x00    0x00    0x00     0x00000000
# Dell Digital Jukebox
nomadjukebox    0x0000  0x041e  0x4111  0x0000  0x0000  0x00    0x00    0x00    0x00    0x00    0x00     0x00000000
Then you have to copy the file nomadjukebox to directory /etc/hotplug/usb and do: chmod +x nomadjukebox

I had to change two lines on this last file, i do the following:

Code:
#!/bin/sh
# Lifts a plugged in nomad jukebox to user space and
# optionally runs a client program.
# Written by Linus Walleij 2004, based on the "usbcam"
# script by Nalin Dahyabhai.
DEVICEOWNER=root
DEVICEPERMS=0666
PROGRAM="cd ~; gnomad2 --display=localhost:0"

if [ "${ACTION}" = "add" ] && [ -f "${DEVICE}" ]
then
    # New code, using lock files instead of copying /dev/console permissions
    # This also works with non-gdm logins (e.g. on a virtual terminal)
    # Idea and code from Nalin Dahyabhai <nalin@redhat.com>
    if [ "x$DEVICEOWNER" = "xCONSOLE" ]
    then
        if [ -f /var/run/console.lock ]
        then
            DEVICEOWNER=`cat /var/run/console.lock`
        elif [ -f /var/lock/console.lock ]
        then
            DEVICEOWNER=`cat /var/lock/console.lock`
        else
            DEVICEOWNER=
        fi
    fi
    if [ -n "$DEVICEOWNER" ]
    then
        chmod 0000 "${DEVICE}"
        chown "${DEVICEOWNER}" "${DEVICE}"
        chmod "${DEVICEPERMS}" "${DEVICE}"
        # Then run an optional program - this does not work yet.
        # su "${CONSOLEOWNER}" -c "${PROGRAM}"
    fi
fi
Now, when i connect my nomad then this script change permissions to the correct file in /proc/bus/usb and all work fine.
 
Old 09-03-2005, 10:59 AM   #4
xavierh
Member
 
Registered: Feb 2004
Location: Denton, TX
Distribution: Mandriva 2005 LE
Posts: 221

Rep: Reputation: 30
Thumbs up Great POST

the recommendaitons htat you mentioned also worked with Mandriva LE 2005
 
Old 09-06-2005, 10:22 PM   #5
vt_hokie
LQ Newbie
 
Registered: Sep 2005
Posts: 1

Rep: Reputation: 0
This worked out great for me. Thank YOU!!
Also...make sure to reconnect the device after making these changes, since they won't take effect immediatly (I learned this the hard way )
 
Old 12-19-2005, 02:20 AM   #6
op4latino
LQ Newbie
 
Registered: Oct 2005
Posts: 4

Rep: Reputation: 0
I don't get it.

nomad.usermap was already in etc hotplug usb
nomadjukebox was already in etc hotplug usb, too (I omited the slashes because it sees I don't have enought privilegies in this forum)
and is executable

I don't get the "I had to change two lines on this last file, i do the following:" part

Here's my nomadjukebox
Code:
#!/bin/sh
# Lifts a plugged in nomad jukebox to user space and
# optionally runs a client program.
# Written by Linus Walleij 2004, based on the "usbcam"
# script by Nalin Dahyabhai.
DEVICEOWNER=root:audio
DEVICEPERMS=0666
PROGRAM="cd ~; gnomad2 --display=localhost:0"

# Special quirk for SuSE systems using "resmgr"
# ...
if [ -f /sbin/resmgr ]
then
    /sbin/resmgr "${ACTION}" "${DEVICE}" desktop usb
    exit 0
fi

# This is for most other distributions
if [ "${ACTION}" = "add" ] && [ -f "${DEVICE}" ]
then
    # New code, using lock files instead of copying /dev/console permissions
    # This also works with non-gdm logins (e.g. on a virtual terminal)
    # Idea and code from Nalin Dahyabhai <nalin@redhat.com>
    if [ "x$DEVICEOWNER" = "xCONSOLE" ]
    then
	if [ -f /var/run/console/console.lock ]
	then
	    DEVICEOWNER=`cat /var/run/console/console.lock`
	elif [ -f /var/run/console.lock ]
	then
	    DEVICEOWNER=`cat /var/run/console.lock`
	elif [ -f /var/lock/console.lock ]
	then
	    DEVICEOWNER=`cat /var/lock/console.lock`
	else
	    DEVICEOWNER="nobody"
	    DEVICEPERMS="666"
	fi
    fi
    if [ -n "$DEVICEOWNER" ]
    then
        chmod 0000 "${DEVICE}"
        chown "${DEVICEOWNER}" "${DEVICE}"
        chmod "${DEVICEPERMS}" "${DEVICE}"
	# Then run an optional program - this does not work yet.
	# su "${CONSOLEOWNER}" -c "${PROGRAM}"
    fi
fi
I tried to edit the "root:audio" for just "root" and for my username and nothing

I'm using kanotix 2005-4 rc17 and gnomad2 2.8.1-1

Thanks

Last edited by op4latino; 12-19-2005 at 02:22 AM.
 
Old 12-20-2005, 12:47 PM   #7
bad_zeppelin
LQ Newbie
 
Registered: Sep 2005
Location: Odense, Denmark
Distribution: Pardus 2007.1
Posts: 10

Rep: Reputation: 0
thanks very much for this script.

also, as i use creative nomad zen touch i added a last line:

# Creative Nomad Jukebox Zen Touch
nomadjukebox 0x0000 0x041e 0x411b 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
 
Old 02-09-2006, 06:07 PM   #8
Jagunco
LQ Newbie
 
Registered: Feb 2006
Posts: 1

Rep: Reputation: 0
What about Mandriva 2006?

Hi folks.

I'm having the same problem with gnomad2 and Zen Xtra here. I have Mandriva 2006, and there's no '/etc/hotplug' around.
How can I have gnomad2 working for all users?
Thanks in advance.

P.S. - My USB pendrive works just fine here.
 
Old 08-22-2006, 08:41 PM   #9
mhurtz1
LQ Newbie
 
Registered: Aug 2006
Distribution: Fedora Core 5
Posts: 13

Rep: Reputation: 0
I read that on FC5 hotplug has been replaced with udev. If that's the case how do you apply this fix to FC5?
 
Old 02-02-2007, 02:20 PM   #10
gnat_x
LQ Newbie
 
Registered: Feb 2007
Location: NYC
Distribution: Debian (etch)
Posts: 1

Rep: Reputation: 0
an updated approach for distros using udev

I've seen this thread in a few google searches that i did whilst trying to get my Creative Zen Vision:M working with gnomad2 under Debian (etch).

First of all, as of this writing libmtp is NOT in the debian repositories, so you will need to compile that from source as well as compile the gnomad2 package from source. I won't cover that here, as its off topic to this thread and you can find good resources elsewhere.

I am assuming that you have everything set up properly and can run gnomad2 as root, and when you do it sees your device.

The old example above uses a solution dependent on hotplug, however in Etch, as in other distros (probably the FC5 and Linspire2006 comments above), this is now handled by udev. That means you need to make sure that udev has the proper rules sets.

First check a few of the common places:
Code:
ls -l /etc/udev/rules.d/
and
Code:
ls -l /etc/udev/
What you are looking for is (depending on your device) libnjb.rules, or libmtp.rules.

In my case libmtp.rules was missing. A file by that name should have been created when compiling the lib, so try 'locate libmtp.rules' to find your copy.

I had to edit a line in mine as well, so for my device I changed:
Code:
# Creative Zen Vision:M (DVP-HD0004)
SYSFS{idVendor}=="041e", SYSFS{idProduct}=="4151", SYMLINK+="libmtp-%k", MODE="666"
to
Code:
SYSFS{idVendor}=="041e", SYSFS{idProduct}=="413e", SYMLINK+="libmtp-%k", MODE="666" GROUP="audio"
Once you have done this, you will need to restart udev, in Debian this is achieved with:

Code:
sudo /etc/init.d/udev restart
At this point you should be able to use gnomad2 as any user in the 'audio' group.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Gnomad2 for SUSE 10.0 Happeren SUSE / openSUSE 7 11-24-2005 09:56 AM
Gnomad2 with resmgr Kashra Linux - Software 5 10-16-2005 01:29 PM
GNomad2 dougbarrett Linux - Newbie 9 07-04-2005 04:37 AM
Help with Gnomad2 linmith Linux - Software 13 04-29-2005 11:06 AM
Gnomad2 ? RobNyc Linux - Software 5 03-20-2005 12:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration