Author Topic: Openbox right-click menu reloading  (Read 5875 times)

Offline melodie

  • Hero Member
  • *****
  • Posts: 5942
  • XMMP=Jabber, free instant messaging protocol !
    • PCLinuxOS Fr
Openbox right-click menu reloading
« on: August 20, 2011, 11:02:09 AM »
Hi,

If experiencing the menus not refreshed fast enough, please read this. I have just been explained that openbox-menu relying on menu-cache, and menu-cache using gio, which uses fam/gamin, we may want to use a configuration file so that the directory where the desktop files are stocked be polled regularly.

I read here:
http://people.gnome.org/~veillard/gamin/config.html

and created this file for myself, that I placed as "gaminrc" under  ~/.config/gamin (I created the gamin directory, of course).

Quote
# http://people.gnome.org/~veillard/gamin/config.html

# configuration for gamin
# Can be used to override the default behaviour.
# notify filepath(s) : indicate to use kernel notification
# poll filepath(s)   : indicate to use polling instead
# fsset fsname method poll_limit : indicate what method of notification for the filesystem
#                                  kernel - use the kernel for notification
#                                  poll - use polling for notification
#                                  none - don't use any notification
#                                 
#                                  the poll_limit is the number of seconds
#                                  that must pass before a resource is polled again.
#                                  It is optional, and if it is not present the previous
#                                  value will be used or the default.
 
## Examples
# notify /mnt/local* /mnt/pictures* # use kernel notification on these paths
# poll /temp/*                      # use poll notification on these paths
# fsset nfs poll 10                 # use polling on nfs mounts and poll once every 10 seconds

fsset ext4 poll 15


This is a configuration file currently used in Slackware among other distros, but at Slackware instead of having just "ext4" in front of the "fsset" command, there are gvfs, ntfs, ext3 and so on...

I have a question in case someone knows : we have gam_server under /usr/lib and I didn't know how to restart the processes that use it. So I rebooted. Is there a process somewhere that can be restarted so that the new configuration file will be used, instead of doing a full reboot ?

Else, I have also copied a full openbox directory I found under /usr/share/doc, to /usr/share, and it seems to make an effect on how fast the menus are refreshed when un-installing programs and installing new ones, but after I ask the question to the dev of openbox-menu he told me there is no connection as far as he knows.

The idea I got was from seeing this:
http://www.pclinuxos.com/forum/index.php/topic,93031.msg809019.html#msg809019

I would be interested if more users try both solutions (openbox directory and gaminrc configuration file, and tell me what you can observe.

Regards,
Mélodie

melodie at swissjabber dot ch - IRC #pclinuxos-fr sur freenode

Offline jlf001

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 519
Re: Openbox right-click menu reloading
« Reply #1 on: August 20, 2011, 12:32:46 PM »
Hi Mélodie,

Your gaminrc configuration file seems to work.  I  don't have a full openbox directory under /usr/share/doc.

Jeff

Offline melodie

  • Hero Member
  • *****
  • Posts: 5942
  • XMMP=Jabber, free instant messaging protocol !
    • PCLinuxOS Fr
Re: Openbox right-click menu reloading
« Reply #2 on: August 20, 2011, 03:39:59 PM »
Hi Mélodie,

Your gaminrc configuration file seems to work.  I  don't have a full openbox directory under /usr/share/doc.

Jeff


We usually erase all files but HTML directory from /usr/share/doc to gain space, so no wonder...

...
I enclosed openbox directory with all it's files in a tar.bz2 archive here.


I would be interested if you could compare the results (what best results ?) from both methods ? I thought seeing the output of "openbox-menu" command in console once the .cache/menu directory erased, that a full "openbox" directory was expected to be found in /usr/share

...

Therefore I'm interested to get more feedbacks : should I ask the package maintainer of openbox (now Gseaman took the job) to take care that the openbox directory should be in /usr/share ? Or should I provide an all made gaminrc file with polling configured ? Or should I ask for a change in the gamin package so that the polling would be default provided ?

Theses are the questions I am wondering, which bring me to ask theses comparisons from all the testers.

Thanks !
Mélodie



« Last Edit: August 20, 2011, 03:45:41 PM by melodie »
melodie at swissjabber dot ch - IRC #pclinuxos-fr sur freenode

Offline Yankee

  • Hero Member
  • *****
  • Posts: 1477
  • In theory, theory=practice, in practice ???
Re: Openbox right-click menu reloading
« Reply #3 on: August 20, 2011, 07:20:10 PM »

I would be interested if more users try both solutions (openbox directory and gaminrc configuration file, and tell me what you can observe.


Put the /openbox directory in today and installed over a dozen programs.
Just have to look at them once in PCManFM>Applications and they're OK.
Made a menu for multimedia and probably need one for games, the pipe
menu might not have them both.   Pretty heavy usage and it could be
working better but not worse.

Have a good one.
ASUS EeePc 900HA netbook  1.6 Ghz Atom CPU  1GB RAM
160 GB internal HD    Seagate 250 GB USB portable drive 
Intel ‎Mobile 945GSE Integrated Graphics Controller
Atheros AR242x/AR542x Wireless Network Adapter
Intel (N10/ICH7 Family) High Definition Audio
Dynex 5-Button Wired Optical Mouse
LXDE

Offline melodie

  • Hero Member
  • *****
  • Posts: 5942
  • XMMP=Jabber, free instant messaging protocol !
    • PCLinuxOS Fr
Re: Openbox right-click menu reloading
« Reply #4 on: August 21, 2011, 03:41:07 AM »
Put the /openbox directory in today and installed over a dozen programs.
Just have to look at them once in PCManFM>Applications and they're OK.
Made a menu for multimedia and probably need one for games, the pipe
menu might not have them both.   Pretty heavy usage and it could be
working better but not worse.

Have a good one.

I find it more and more difficult to understand your way of talking, but I will try my best...

a) you can't talk about the directory /openbox because the / at the beginning means that it would be located at the root of the system, just under /

so you can talk about the directory openbox, or openbox/ if you want to show this is a directory (with files in it eventually).

Quote
Made a menu for multimedia and probably need one for games, the pipe menu might not have them both.  

It looks to me that you didn't understand how pipe-menus works. openbox-menu uses the lib menu-cache from the Lxde project. The lib menu-cache reads the desktop files that are copied to /usr/share/applications by the package manager while installing a new program.

If a program does not appear in the right menu section, you can go shout after the packager of the program ! :D

But first you should go to the directory where the desktop files are located : /usr/share/applications, as I just said, then open the related destkop file with a text editor, and look at the line which starts with the word "Categories".

Example, the vlc.desktop file (installed vlc yesterday to replace smplayer and mplayer, for a change)

Code: [Select]
[Desktop Entry]
Version=1.0
Name=VLC media player
Comment=Read, capture, broadcast your multimedia streams
Name[bn]=VLC মিডিয়া প্লেয়ার
Comment[bn]=আপনার মাল্টিমিডিয়া স্ট্রীম পড়ুন, ধরে রাখুন এবং ছড়িয়ে দিন
Name[ca]=Reproductor multimèdia VLC
Comment[ca]=Reproduïu, captureu i difoneu fluxos multimèdia
Name[de]=VLC Media Player
Comment[de]=Wiedergabe, Aufnahme und Verbreitung Ihrer Multimedia-Streams
Name[es]=Reproductor multimedia VLC
Comment[es]=Lea, capture y emita sus contenidos multimedia
Name[et]=VLC meediaesitaja
Comment[et]=Multimeediafailide taasesitamine, lindistamine ja edastamine
Name[fi]=VLC-mediasoitin
Comment[fi]=Toista, tallenna ja lähetä multimediaa
Name[fr]=Lecteur multimédia VLC
Comment[fr]=Lire, capturer, diffuser vos flux multimedia
Name[gl]=Reprodutor multimedia VLC
Comment[gl]=Lea, capture e emita os seus fluxos multimedia
Name[hu]=VLC médialejátszó
Comment[hu]=Multimédiás adatfolyamok olvasása, mentése, szórása
Name[it]=Lettore multimediale VLC
Comment[it]=Legge, acquisisce e trasmette i tuoi flussi multimediali
Name[km]=កម្មវិធី​ចាក់​មេឌៀ VLC
Comment[km]=អាន ចាប់យក ប្រកាស​ស្ទ្រីម​ពហុមេឌៀ​របស់​អ្នក
Name[nl]=VLC Mediaspeler
Comment[nl]=Uw multimediastreams afspelen, opnemen en uitzenden
Name[nn]=VLC mediespelar
Comment[nn]=Spel av, ta opp og send ut multimedia
Name[pa]=VLC ਮੀਡਿਆ ਪਲੇਅਰ
Comment[pa]=ਆਪਣੀ ਮਲਟੀਮੀਡਿਆ ਸਟਰੀਮ ਪੜ੍ਹੋ, ਕੈਪਚਰ ਤੇ ਬਰਾਡਕਾਸਟ ਕਰੋ
Name[pt_BR]=Reprodutor de Mídias VLC
Comment[pt_BR]=Reproduza, capture e transmita os seus fluxos multimídia
Name[sv]=Mediaspelaren VLC
Comment[sv]=Allmän uppspelare av film och musik
Name[sk]=VLC media player
Comment[sk]=Naèítavajte, zaznamenávajte, vysielajte svoje multimediálne streamy
Name[ru]=Медиаплеер VLC
Comment[ru]=Универсальный проигрыватель видео и аудио
Name[pl]=VLC media player - odtwarzacz multimedialny
Comment[pl]=Odczytywanie, przechwytywanie i nadawanie strumieni multimedialnych
Name[lt]=VLC leistuvė
Comment[lt]=Groti, įrašyti, siųsti įvairialypės terpės kūrinius
Name[ja]=VLCメディアプレイヤー
Comment[ja]=マルチメディアストリームの読み込み、キャプチャー、ブロードキャスト
Name[wa]=Djouweu d' media VLC
Comment[wa]=Lét, egaloye, evoye vos floûs multimedia
Name[zh_CN]=VLC media player
Comment[zh_CN]=为您读取、捕获或发送多媒体流
Exec=vlc %U
Icon=vlc
Terminal=false
Type=Application
Categories=AudioVideo;Player;X-MandrivaLinux-Multimedia-Video;Qt;
MimeType=video/dv;video/mpeg;video/x-mpeg;video/msvideo;video/quicktime;video/x-anim;video/x-avi;video/x-ms-asf;video/x-ms-wmv;video/x-msvideo;video/x-nsv;video/x-flc;video/x-fli;application/ogg;application/x-ogg;video/x-ogm+ogg;audio/x-vorbis+ogg;application/x-matroska;video/webm;audio/webm;audio/x-mp3;audio/x-mpeg;audio/mpeg;audio/x-wav;audio/x-mpegurl;audio/x-scpls;audio/x-m4a;audio/x-ms-asf;audio/x-ms-asx;audio/x-ms-wax;application/vnd.rn-realmedia;audio/x-real-audio;audio/x-pn-realaudio;application/x-flac;audio/x-flac;application/x-shockwave-flash;misc/ultravox;audio/vnd.rn-realaudio;audio/x-pn-aiff;audio/x-pn-au;audio/x-pn-wav;audio/x-pn-windows-acm;image/vnd.rn-realpix;video/vnd.rn-realvideo;audio/x-pn-realaudio-plugin;application/x-extension-mp4;audio/mp4;video/mp4;video/mp4v-es;x-content/video-vcd;x-content/video-svcd;x-content/video-dvd;x-content/audio-cdda;x-content/audio-player;video/x-flv;
X-KDE-Protocols=ftp,http,https,mms,rtmp,rtsp,sftp,smb
X-Desktop-File-Install-Version=0.18

The submenu "Video" has been created as soon as a program with a correct destkop file is installed. You don't need to do anything special for that.

If you need to explain more precisely what you are thinking about, please explain ?
« Last Edit: August 21, 2011, 03:43:14 AM by melodie »
melodie at swissjabber dot ch - IRC #pclinuxos-fr sur freenode

Offline Yankee

  • Hero Member
  • *****
  • Posts: 1477
  • In theory, theory=practice, in practice ???
Re: Openbox right-click menu reloading
« Reply #5 on: August 21, 2011, 06:06:06 AM »

 you can't talk about the directory /openbox because the / at the beginning means that it would be located at the root of the system, just under /

so you can talk about the directory openbox, or openbox/ if you want to show this is a directory (with files in it eventually).
  

The files are in usr/share/openbox were they're supposed to be.  I thought my attempt
at shorthand would be OK.   
ASUS EeePc 900HA netbook  1.6 Ghz Atom CPU  1GB RAM
160 GB internal HD    Seagate 250 GB USB portable drive 
Intel ‎Mobile 945GSE Integrated Graphics Controller
Atheros AR242x/AR542x Wireless Network Adapter
Intel (N10/ICH7 Family) High Definition Audio
Dynex 5-Button Wired Optical Mouse
LXDE

Offline melodie

  • Hero Member
  • *****
  • Posts: 5942
  • XMMP=Jabber, free instant messaging protocol !
    • PCLinuxOS Fr
Re: Openbox right-click menu reloading
« Reply #6 on: August 21, 2011, 06:14:34 AM »
I thought my attempt at shorthand would be OK.

Excuse my poor English : could you rephrase that, because I don't understand "shorthand".

PS: have you also tried to use a gaminerc file ?

melodie at swissjabber dot ch - IRC #pclinuxos-fr sur freenode

Offline Yankee

  • Hero Member
  • *****
  • Posts: 1477
  • In theory, theory=practice, in practice ???
Re: Openbox right-click menu reloading
« Reply #7 on: August 21, 2011, 06:29:56 AM »
I thought my attempt at shorthand would be OK.

Excuse my poor English : could you rephrase that, because I don't understand "shorthand".

PS: have you also tried to use a gaminerc file ?



Shorthand is usually a shorter way of saying something or a secretarial notation.
So when I said /openbox was OK I really meant in "longhand" that /usr/share/openbox
was working OK.   Sorry if something like that is confusing from time to time.   I
can't speak any French,   saying bonjour is about as far as I can get.

No, about trying the gaminerc file yet, not enough time yet.

Working on another response in just a few minutes, trying to be as complete
as possible.

Thanks for your response.


ASUS EeePc 900HA netbook  1.6 Ghz Atom CPU  1GB RAM
160 GB internal HD    Seagate 250 GB USB portable drive 
Intel ‎Mobile 945GSE Integrated Graphics Controller
Atheros AR242x/AR542x Wireless Network Adapter
Intel (N10/ICH7 Family) High Definition Audio
Dynex 5-Button Wired Optical Mouse
LXDE

Offline Yankee

  • Hero Member
  • *****
  • Posts: 1477
  • In theory, theory=practice, in practice ???
Re: Openbox right-click menu reloading
« Reply #8 on: August 21, 2011, 06:38:30 AM »

It looks to me that you didn't understand how pipe-menus works. openbox-menu uses the lib menu-cache from the Lxde project. The lib menu-cache reads the desktop files that are copied to /usr/share/applications by the package manager while installing a new program.

If a program does not appear in the right menu section, you can go shout after the packager of the program ! :D

But first you should go to the directory where the desktop files are located : /usr/share/applications, as I just said, then open the related destkop file with a text editor, and look at the line which starts with the word "Categories".


The below code is from /usr/share/applications and is the file for Clementine.
I would like to put this in category "Multimedia".  However some other category
created by the program would be fine in the menu, but none was created for
several sound or video programs I installed.   I installed them last night and
checking this morning there is not a submenu for video or sound in the
right-click menu.   By installing Clementine a menu-submenu for Sound
is normally created and should have been created but was not, I understand.
Other programs I installed were put into their menus OK.   Hope the below
code is enough info.

Code: [Select]
[Desktop Entry]
Version=1.0
Type=Application
InitialPreference=15
Name=Clementine
GenericName=Clementine Music Player
Comment=Plays music and last.fm streams
Exec=clementine
TryExec=clementine
Icon=application-x-clementine
Terminal=false
Categories=AudioVideo;Player;Qt;X-MandrivaLinux-Multimedia-Sound;
StartupNotify=false
MimeType=application/ogg;application/x-ogg;application/x-ogm-audio;audio/aac;audio/mp4;audio/mpeg;audio/mpegurl;audio/ogg;audio/vnd.rn-realaudio;audio/vorbis;audio/x-flac;audio/x-mp3;audio/x-mpeg;audio/x-mpegurl;audio/x-ms-wma;audio/x-musepack;audio/x-oggflac;audio/x-pn-realaudio;audio/x-scpls;audio/x-speex;audio/x-vorbis;audio/x-vorbis+ogg;audio/x-wav;video/x-ms-asf;x-content/audio-player;
Encoding=UTF-8
X-Desktop-File-Install-Version=0.11
ASUS EeePc 900HA netbook  1.6 Ghz Atom CPU  1GB RAM
160 GB internal HD    Seagate 250 GB USB portable drive 
Intel ‎Mobile 945GSE Integrated Graphics Controller
Atheros AR242x/AR542x Wireless Network Adapter
Intel (N10/ICH7 Family) High Definition Audio
Dynex 5-Button Wired Optical Mouse
LXDE

Offline melodie

  • Hero Member
  • *****
  • Posts: 5942
  • XMMP=Jabber, free instant messaging protocol !
    • PCLinuxOS Fr
Re: Openbox right-click menu reloading
« Reply #9 on: August 21, 2011, 06:52:45 AM »
I installed Clementine, and knowing it is a music collection manager I looked for it in the Sound section; guess what ? I found it right there:




And now "they" are all going to be jealous seeing my beautiful right-click menus with icons. ;D ;D
melodie at swissjabber dot ch - IRC #pclinuxos-fr sur freenode

Offline Yankee

  • Hero Member
  • *****
  • Posts: 1477
  • In theory, theory=practice, in practice ???
Re: Openbox right-click menu reloading
« Reply #10 on: August 21, 2011, 07:06:31 AM »
And now "they" are all going to be jealous seeing my beautiful right-click menus with icons. ;D ;D

Try a game install if you have time, perhaps PokerTH.   
I can create new menus for "multimedia" and "games"
with obmenu and create new items for those with obmenu.
Don't think Openbox is doing those categories today automatically.

Must run and get some coffeeshop coffee automatically.


FF
ASUS EeePc 900HA netbook  1.6 Ghz Atom CPU  1GB RAM
160 GB internal HD    Seagate 250 GB USB portable drive 
Intel ‎Mobile 945GSE Integrated Graphics Controller
Atheros AR242x/AR542x Wireless Network Adapter
Intel (N10/ICH7 Family) High Definition Audio
Dynex 5-Button Wired Optical Mouse
LXDE

Offline jlf001

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 519
Re: Openbox right-click menu reloading
« Reply #11 on: August 21, 2011, 07:06:52 AM »
Hi All,

Here's what I've done.  I set up two separate instals in virtualbox, one with gaminrc option and the other with the the files from Mélodie, that I put into the /usr/share/openbox directory I created.  After installing and removing several different applications, here's what I see:

The gaminrc options seems to cause the openbox menu to update faster.  The menu updates after two or three right clicks.

The /usr/share/openbox directory option does not seem to have any effect on updating the openbox menu.  After 5 or six right clicks, the menu was not updated.  I finally, ran the openbox-menu command from the terminal to update the menu.

Jeff

Offline melodie

  • Hero Member
  • *****
  • Posts: 5942
  • XMMP=Jabber, free instant messaging protocol !
    • PCLinuxOS Fr
Re: Openbox right-click menu reloading
« Reply #12 on: August 21, 2011, 07:11:55 AM »
 
I can create new menus for "multimedia" and "games"
with obmenu and create new items for those with obmenu.
Don't think Openbox is doing those categories today automatically.

a) You create sort of shortcuts with obmenu;
b) Openbox does not create any menu, it provides default menus with entries for applications you generally don't have and without entries for the applications you have;

c) I provided PCLinuxOS Openbox with openbox-menu, the pipe-menu program for Openbox based systems, because I found it practical, and wanted to get in PCLinuxOS what I just had got in Archlinux at that time, then share it with the PCLinuxOS community;

Last but not least : you ought to try to avoid confusing Openbox, the window manager, with the additional programs done by other developers to enhance it's use. :)

Get good coffee ! ^^

melodie at swissjabber dot ch - IRC #pclinuxos-fr sur freenode

Offline jlf001

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 519
Re: Openbox right-click menu reloading
« Reply #13 on: August 21, 2011, 07:13:02 AM »

And now "they" are all going to be jealous seeing my beautiful right-click menus with icons. ;D ;D


Yes, I'm jealous!! :)

Jeff

Offline melodie

  • Hero Member
  • *****
  • Posts: 5942
  • XMMP=Jabber, free instant messaging protocol !
    • PCLinuxOS Fr
Re: Openbox right-click menu reloading
« Reply #14 on: August 21, 2011, 07:17:45 AM »

And now "they" are all going to be jealous seeing my beautiful right-click menus with icons. ;D ;D


Yes, I'm jealous!! :)

Jeff

Oh are you ? As we are waiting for the package Galen sent to Textar's dropbox, and as we don't have yet the new openbox-menu that allows displaying the new Openbox feature.

This install of mine has become a test install with the new Openbox compiled by hand... and the new openbox-menu as well.  :)


melodie at swissjabber dot ch - IRC #pclinuxos-fr sur freenode