init script doesn't launch tpb at startup

Bug #368546 reported by A. Tombol
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
tpb (Ubuntu)
New
Undecided
Unassigned

Bug Description

tpb doesn't start from its init script /etc/init.d/tpb
invoking sudo /etc/init.d/tpb start at terminal starts the daemon
the script itself runs at startup, i checked it by adding an echo after tpb -d

for now, i had to add /usr/bin/tpb to the sudoers file, so i can run it at session start (dirty)
maybe there's a dependency what's not met at the time the script runs?
according to http://www.thinkwiki.org/wiki/Tpb , tpb needs running X to start

there is a closed bug ( https://bugs.launchpad.net/bugs/146987 ) with the same symptoms.
i don't know if it was really fixed then, but if yes, now it's broken again.

Revision history for this message
Joe (joejgarcia) wrote :

The reason that it won't run from startup is because the OSD is on by default. OSD needs an X display and tpb dies saying it can't open display. You would think that it would be as simple as following the instructions in the manual.

       -o, --osd=STATE
               Show on-screen display for volume, mute and brightness. Possi‐
               ble values are on and off. Default is on.

Unfortunately for some reason turning it to off doesn't actually shut it off. Looks like there is something in the code that is forcing this to always be on. Hopefully if you can recompile it so that it is possible to turn it off, it will no longer bomb because it will no longer need the X display to run.

Revision history for this message
Joe (joejgarcia) wrote :

Actually I must have been doing something wrong earlier, the -o off argument works now. I changed /etc/init.d/tpb so that line 16 is

    tpb -c /etc/tpbrc -d

instead of

    tpb -d

In /etc/tpbrc I set MIXER ON as I have to use OSS to control the mixer and I set OSD OFF so that it works on boot. If you want the osd stuff you need to run it from Preferences -> Startup Applications and add it as a new startup app, just make sure you start it with sudo. The tpb program is a horrible hack and the faster thinkpad-acpi can handle the volume buttons in the sys rather than the proc the better.

Revision history for this message
Joe (joejgarcia) wrote :

Nope I stand corrected again. Even if you turn off OSD, it still gives this error.

root@jgarcia-laptop:~# tpb -o off -m on
Unable to initialize xosd. Running without onsceen display.
Can't open display, X may not be running!

Revision history for this message
Karol Szafrański (yoozeq2001) wrote :

After many tests I have develeped a workaround. It's ugly, but it works. I use TPB only for OSD and I wanted it to start with GNOME on Jaunty.
The workaround is to create a script that starts tpb -d (or /etc/init.d/tpb start), call it Default and place it in /etc/gdm/PostLogin. GDM processes this script right after verifying authentication data.
You can even have OSD working on GDM login screen itself. Just put similar call to tpb in Default script in /etc/gdm/Init (just before "exit 0" line).

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

i take this oopurtunity. hope this bug fixed

Changed in tpb (Ubuntu):
status: New → In Progress
assignee: nobody → Mahyuddin Susanto (udienz)
Revision history for this message
Wolfgang Faust (wolfgang42) wrote :

I believe there is a way to change the boot order so that it boots after X11. However, I don't know enough about upstart to figure it out. I will work on this and try to find a fix.

Changed in tpb (Ubuntu):
assignee: Mahyuddin Susanto (udienz) → nobody
status: In Progress → New
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.