Topic: Openbox restart kills lxpanel and master volume icon disappears?

Each time I make a change to Openbox settings and have to restart Openbox, lxpanel is killed. After this happens, the master volume dissapears from the panel and I have to logout or reboot to get things back. I'm using lxpanel 0.5.3

Thanks.

#! 10 “Statler” r20110207 32-bit & Openbox

Re: Openbox restart kills lxpanel and master volume icon disappears?

The command to get the master volume icon in your system tray is:

volwheel

Does that help?

Re: Openbox restart kills lxpanel and master volume icon disappears?

BTW after making a change to Openbox you do NOT need to restart it; just reconfigure.

Openbox menu > Preferences > Openbox Config > Reconfigure.

Note: ** Please read before posting **

BTW if you wish to contact me, send me an e-mail instead of a PM.

Re: Openbox restart kills lxpanel and master volume icon disappears?

jobester wrote:

The command to get the master volume icon in your system tray is:

volwheel

Does that help?

That does, thanks. And thank you anonymous for reminding me about the reconfigure option in Openbox.

#! 10 “Statler” r20110207 32-bit & Openbox

Re: Openbox restart kills lxpanel and master volume icon disappears?

anonymous wrote:

BTW after making a change to Openbox you do NOT need to restart it; just reconfigure.

Openbox menu > Preferences > Openbox Config > Reconfigure.

Didn't know that either, so i had put lxpanel-restart on Super+P in the rc.xml. neutral smile

Re: Openbox restart kills lxpanel and master volume icon disappears?

Kuno wrote:
anonymous wrote:

BTW after making a change to Openbox you do NOT need to restart it; just reconfigure.

Openbox menu > Preferences > Openbox Config > Reconfigure.

Didn't know that either, so i had put lxpanel-restart on Super+P in the rc.xml. neutral smile

@Kuno:Does restarting Openbox remove your volwheel (master icon) from lxpanel as well? Also, could you please post your rc.xml entry for the lxpanel restart?

Last edited by nabilalk (2010-02-09 10:47:22)

#! 10 “Statler” r20110207 32-bit & Openbox

Re: Openbox restart kills lxpanel and master volume icon disappears?

nabilalk wrote:

@Kuno:Does restarting Openbox remove your volwheel (master icon) from lxpanel as well? Also, could you please post your rc.xml entry for the lxpanel restart?

Just checked: yes, volwheel is also removed.

Original RC.xml snippet:

<keybind key="W-p">
      <action name="Execute">
        <startupnotify>
          <enabled>true</enabled>
          <name>Panel</name>
        </startupnotify>
        <command>lxpanel</command>
      </action>
    </keybind>

EDIT: Just edited rc.xml and put in a second W+p command for volwheel:

<keybind key="W-p">
      <action name="Execute">
        <startupnotify>
          <enabled>true</enabled>
          <name>Panel</name>
        </startupnotify>
        <command>lxpanel</command>
      </action>
    </keybind>
    <keybind key="W-p">
      <action name="Execute">
        <startupnotify>
          <enabled>true</enabled>
          <name>volwheel</name>
        </startupnotify>
        <command>volwheel</command>
      </action>
    </keybind>

Now w+p triggers the panel as well as volwheel-icon to reappear... smile

Last edited by Kuno (2010-02-09 12:42:19)

Re: Openbox restart kills lxpanel and master volume icon disappears?

When you restart Openbox, tint2 gets started again and forgets its tray icons.

Note: ** Please read before posting **

BTW if you wish to contact me, send me an e-mail instead of a PM.

Re: Openbox restart kills lxpanel and master volume icon disappears?

When you restart Openbox, tint2 gets started again and forgets its tray icons.

This problem is not related to lxpanel, xfce4-panel, gnome-panel or tint2 wink
The panel doesn't forget its tray icon. But the tray icon forget to manage the end of the panel (systray manager) and crash.

The bug is clearly in the tray icon and have to be reported to each tray icon application witch disappear after a kill/restart of your panel.

Here some details how to fix it :
http://standards.freedesktop.org/system … atest.html
Chapter "Docking a tray icon" :
The XEMBED specification explains how the embedding application will interact with the embedded tray icon, and how the embedder/embedded relationship may be ended.

Last edited by thil77 (2010-02-09 18:09:09)

Re: Openbox restart kills lxpanel and master volume icon disappears?

thil77 wrote:

When you restart Openbox, tint2 gets started again and forgets its tray icons.

This problem is not related to lxpanel, xfce4-panel, gnome-panel or tint2 wink
The panel doesn't forget its tray icon. But the tray icon forget to manage the end of the panel (systray manager) and crash.

The bug is clearly in the tray icon and have to be reported to each tray icon application witch disappear after a kill/restart of your panel.

Here some details how to fix it :
http://standards.freedesktop.org/system … atest.html
Chapter "Docking a tray icon" :
The XEMBED specification explains how the embedding application will interact with the embedded tray icon, and how the embedder/embedded relationship may be ended.

I read the section on docking the tray icon, and am saddened to say that I have no clue how to implement what is laid out. For now I will try not to restart Openbox and use the reconfigure instead. Plus, I will use Kuno's idea and add lxpanel and volwheel restart to rc.xml.

#! 10 “Statler” r20110207 32-bit & Openbox

Re: Openbox restart kills lxpanel and master volume icon disappears?

@ nabilalk

when I have more time, will try to document what need to be done in the tray icon.

Re: Openbox restart kills lxpanel and master volume icon disappears?

thil77 wrote:

@ nabilalk

when I have more time, will try to document what need to be done in the tray icon.

@thil77: I look forward to learning about that, thank you.

#! 10 “Statler” r20110207 32-bit & Openbox

Re: Openbox restart kills lxpanel and master volume icon disappears?

@ nabilalk

Depending of the level of interaction you want in your tray icon.
The easier way to implement it is to use a toolkit witch manage creation/destruction of tray icon.

Here a sample code found on the web (perl code).
It use Gtk2::StatusIcon class and survive to kill/restart of the panel.
Tray icon show the 'gtk-home' icon.

If you want more details, tell me.

#!/usr/bin/env perl
use strict;
use warnings;

use Gtk2 -init;

sub quit_cb {
   my ($widget, $status_icon) = @_;

   $status_icon->set_visible(0) if $status_icon;
   Gtk2->main_quit();
}

sub popup_menu_cb {
   my ($widget, $button, $time, $menu) = @_;

   if ($button == 3) {
   my ($x, $y, $push_in)
       = Gtk2::StatusIcon::position_menu($menu, $widget);

   $menu->show_all();
   $menu->popup( undef, undef,
             sub{return ($x,$y,0)} ,
             undef, 0, $time );
   }
}

sub activate_icon_cb {
   my $msgBox = Gtk2::MessageDialog->new(undef, 'GTK_DIALOG_MODAL', 'GTK_MESSAGE_INFO',
'GTK_BUTTONS_OK', "Status Icon example!");
   $msgBox->run();
   $msgBox->destroy();
}

my $status_icon = Gtk2::StatusIcon->new_from_stock('gtk-home');

my $menu = Gtk2::Menu->new();
my $menuItem = Gtk2::ImageMenuItem->new_from_stock("gtk-about");
$menuItem->signal_connect('activate', \&activate_icon_cb);
$menu->append($menuItem);

$menuItem = Gtk2::ImageMenuItem->new_from_stock('gtk-quit');
$menuItem->signal_connect('activate', \&quit_cb, $status_icon);
$menu->append($menuItem);

$status_icon->set_tooltip("StatusIcon test");
$status_icon->signal_connect('activate', \&activate_icon_cb);
$status_icon->signal_connect('popup-menu', \&popup_menu_cb, $menu);
$status_icon->set_visible(1);

Gtk2->main();

Last edited by thil77 (2010-02-10 21:40:49)