Cannot run tpb as normal user

Bug #158262 reported by Viktor Kazakov
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tpb (Ubuntu)
Expired
Low
Unassigned

Bug Description

Binary package hint: tpb

tpb requires root privileges to access device /dev/nvram. Thus, it should be more convenient for users to install tpb as system service.

Revision history for this message
Y Giridhar Appaji Nag (appaji) wrote :

Anybody in the "nvram" group can run tpb.

Revision history for this message
Viktor Kazakov (kvs16) wrote :

OK

Anyway, how's about installing tpb as system service?

Revision history for this message
Viktor Kazakov (kvs16) wrote :

I see that you intended to start tpb as system service as there is tpb script inside /etc/init.d (and in debian/ directory of the package).

The problem is: tpb service does not come up at system startup (for a yet unknown reason, I'll figure it out).

After system came up, the script works, but:
  - with "/etc/init.d/tpb start" you can easily start as many instances of tpb as you want. It doesn't check if tpb instance is already running;
  - no way to stop tpb with "/etc/init.d/tpb stop"

Revision history for this message
Jag Dragon (jagdragon-deactivatedaccount) wrote :

To run tpb as a normal user, the user must be in the nvram group (As stated above). This can be done by running the command:
   sudo adduser <username> nvram

To fix up the init script so that the stopping works, simply add the following line to the stop) part of the switch. The file I have attached is a demonstration of this.
   killall tpb

Finally, to make the program run on startup, navigate through the menu System->Preferences->Sessions and add a new startup program. Name it "Thinkpad Button" and the command should be "tpb -d".

I could not get the init script in /etc/rc2.d/S99tpb (symbolic link to /etc/init.d/tpb) to work though.

Daniel T Chen (crimsun)
Changed in tpb:
importance: Undecided → Low
Revision history for this message
A. Tombol (atombol) wrote :

I added my user to the nvram group, and still can't run tpb, only with sudo.
Why doesn't it start at all, if it's in the init scripts?

Revision history for this message
A. Tombol (atombol) wrote :

ls -l /dev/nvram says:
crw-r----- 1 root kmem 10, 144 2009-04-27 00:46 /dev/nvram

it seems that its group is kmem, that's why I can't read it with my user added to nvram
for now, I added /usr/bin/tpb to sudoers, so it can be run without a password, and added
tpb -d to run at session start

Revision history for this message
A. Tombol (atombol) wrote :

i filed a new report for the init script issue: https://bugs.launchpad.net/bugs/368546

Revision history for this message
Dean Loros (autocrosser) wrote :

Problem is still there with a current install of Karmic.

Revision history for this message
rusivi2 (rusivi2-deactivatedaccount) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. The issue that you reported should be reproducible with the live environment of the Desktop CD development release - Maverick Meerkat. It would help us greatly if you could test with it so we can work on getting it fixed in the next release of Ubuntu. You can find more about the development release at http://www.ubuntu.com/testing/. Thanks again and we appreciate your help.

Revision history for this message
Mahyuddin Susanto (udienz) wrote :

i take this opportunity

Changed in tpb (Ubuntu):
status: New → In Progress
assignee: nobody → Mahyuddin Susanto (udienz)
Revision history for this message
Anton M. (anton-melnikov) wrote :

I use Maverick (amd64). Problem with /dev/nvram privileges was solved by including user to 'nvram' group (created by this package) and creating follofing udev rule:

KERNEL=="nvram",GROUP="nvram",MODE="0660",OPTIONS="last_rule"

I put it to /etc/udev/rules.d/05-tpb-nvram.rules. I think it must be in package itself (not sure about exact file name).

Also, file /etc/devfs/conf.d/tpb is obsolete and could be removed from package.

Changed in tpb (Ubuntu):
status: In Progress → New
assignee: Mahyuddin Susanto (udienz) → nobody
Revision history for this message
Thomas Hotz (thotz-deactivatedaccount) wrote :

Can you test this with a supported Ubuntu version please? Thank you!

Changed in tpb (Ubuntu):
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for tpb (Ubuntu) because there has been no activity for 60 days.]

Changed in tpb (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.