WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Baffled by wbar  (Read 6727 times)

Offline mbrijun

  • Newbie
  • *
  • Posts: 16
Baffled by wbar
« on: December 06, 2011, 11:16:42 AM »
Hi,

I am building minimalistic Citrix client. Instead of using a window manager, I figured I could use the wbar to launch the selected few apps. However, for love nor money, I cannot figure out how to configure it properly. So far I have seen the following files with configuration:

/mnt/sda1/tce/xwbar.lst
/usr/local/tce.icons
/home/tc/.wbar
/usr/share/wbar/dot.wbar

In reality, I would need to remove all existing wbar items and add 2 new ones - one to launch the Citrix client and another one to power off the machine. What would be the proper way of achieving this? This multitude of config files confuses me.

Thank you.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11038
Re: Baffled by wbar
« Reply #1 on: December 06, 2011, 11:21:44 AM »
For such a static config, I would recommend to ignore our system and launch wbar yourself with its standard config file. An example can be found in the wbar sources.
The only barriers that can stop you are the ones you create yourself.

Offline jamtat

  • Jr. Member
  • **
  • Posts: 58
Re: Baffled by wbar
« Reply #2 on: December 29, 2011, 05:07:13 PM »
I'm trying to do something along these lines as well (using 4.2), though not quite so extreme. wbarconf allows me to get rid of the few items I don't want in wbar, so deleting items is all well and good.

But I haven't yet puzzled out how to add items, namely applications I've installed. The combination of loop-mounted filesystems, the changing nature of TC (I think 4.2 may differ from prior releases in where wbar files are located), and the fact that I'm new to wbar is enough to make a fella's head spin. On top of all that, I've noted that items might be present in the wbar under one WM (flwm), but absent under a different WM (evilwm) that runs on the same machine.

I've found the thread http://forum.tinycorelinux.net/index.php/topic,12188.0.html , which seemed promising. But I do not find files under my system in the locations where the posters say they're to be found. Another sort of workaround seems to be described in the thread http://forum.tinycorelinux.net/index.php/topic,6762.0.html , though it looks a bit too kludgy and I'm hoping there might be a more elegant solution.

Can anyone suggest some more coherent way of adding items to wbar? Can anyone point me to a file from which wbar reads information that causes it to determine what should be included? Meantime I'll take a look at the wbar sources to see what the config file should look like and whether curaga's suggestion might work for my purposes.

Thanks,
James

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: Baffled by wbar
« Reply #3 on: December 29, 2011, 05:37:50 PM »
wbar entries conform to the free desktop file and wbar entries are created after reading "your_app.desktop"  file.    Samples can be found in /tmp/tcloop/your_app/usr/local/share/applications/

Some info here http://forum.tinycorelinux.net/index.php/topic,12188.msg65417.html#msg65417

An alternative method here http://wiki.tinycorelinux.net/wiki:creating_custom_command_icons_in_wbar  (note: I don't believe this alternative method is recommended, but may get you out of a bind in a hurry)

I prefer the first method (not exactly a "how to" unfortunately but might help understand the process) which is preferred and recommended when creating extensions. 
Unfortunately I can't find an up to date "how to" in the wiki.   Know that the *.desktop file mentioned earlier is the key, I think almost all apps have one, while not all desktop files specify an icon. see http://wiki.tinycorelinux.net/wiki:iconmenuinfo

However it is easy to add an icon entry to a desktop file.  Simply unpack the app, add the icon and entries then repack the extension and reboot :)
« Last Edit: December 29, 2011, 06:12:38 PM by coreplayer2 »

Offline jamtat

  • Jr. Member
  • **
  • Posts: 58
Re: Baffled by wbar
« Reply #4 on: December 29, 2011, 05:48:15 PM »
Thanks for your reply, coreplayer2. I did actually just try the http://wiki.tinycorelinux.net/wiki:creating_custom_command_icons_in_wbar method right before reading your post. That was successful so I do have at least that one kludgy way to do this. I'll take a look at the other link you've provided now as well.

James

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: Baffled by wbar
« Reply #5 on: December 29, 2011, 05:49:39 PM »
sorry I'm not fast enough, I keep adding to my above post.. lol

Ok I think I'm done hacking up the last post..
« Last Edit: December 29, 2011, 06:07:53 PM by coreplayer2 »

Offline jamtat

  • Jr. Member
  • **
  • Posts: 58
Re: Baffled by wbar
« Reply #6 on: December 29, 2011, 06:07:44 PM »
Well, actually, it's not working. I guess that's because, though there is an ondemand directory present, I haven't yet installed any app as an ondemand one. Which is why this method seems kludgy. I do know about *.desktop files and their structure. I just don't know for sure how they relate to wbar. The pop-up menu definitely uses them. But are they also used by wbar? Any further information you could provide will be appreciated.

James

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: Baffled by wbar
« Reply #7 on: December 29, 2011, 06:08:59 PM »
yes it is relevant to desktop menu's and wbar.

Ok will repeat this link from above, although it might not be clear the wiki does infact confirm it
http://wiki.tinycorelinux.net/wiki:iconmenuinfo
« Last Edit: December 29, 2011, 06:16:05 PM by coreplayer2 »

Offline jamtat

  • Jr. Member
  • **
  • Posts: 58
Re: Baffled by wbar
« Reply #8 on: December 29, 2011, 06:15:09 PM »
Well, actually, it's not working. I guess that's because, though there is an ondemand directory present, I haven't yet installed any app as an ondemand one.
Ummm, actually I think it's because a crucial step was left out of the wiki entry describing how to do this: the file needs to be chmod'ed executable (755). I found that out by installing an ondemand app, which still did not cause the entry I'd manually created to show up in wbar work (to execute the program when clicked upon). I examined the two files in the /ondemand directory and discovered that the one I'd installed through TC was 755, while the one I'd manually created was not executable. chmod'ing my manually-created file caused it to execute when clicked on in wbar.

James

Later edit: I actually just conducted a test to see whether any ondemand app actually needs to be installed for this to work. NO ondemand app needs to be installed. As long as there's an ondemand directory under the /tce directory on your mounted HD partition, and as long as the file you create there is executable, this method appears to work.
« Last Edit: December 29, 2011, 11:36:53 PM by jamtat »

Offline jamtat

  • Jr. Member
  • **
  • Posts: 58
Re: Baffled by wbar
« Reply #9 on: December 29, 2011, 07:11:54 PM »
I prefer the first method (not exactly a "how to" unfortunately but might help understand the process) which is preferred and recommended when creating extensions. 
Unfortunately I can't find an up to date "how to" in the wiki.
Well, why don't we find someone who knows how to do it and have them explain in this thread? What's written in that thread doesn't make a whole lot of sense to me. If it does to you, perhaps you could interpret?

The way the menu works and the *.desktop files it was looking for was fairly straightforward: most of them were in ~/.local/share/applications. But where are the *.desktop files that wbar looks for supposed to be located? I have no problem creating the files themselves. I just don't know where to locate them for the benefit of wbar.

James

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Baffled by wbar
« Reply #10 on: December 29, 2011, 10:05:18 PM »
Both the desktop menu and wbar read the the exact same your_app.desktop file located in /usr/local/share/applications/

Assuming you already have a menu item, simply modify the existing desktop file to include the name of the icon and a second line with it's location. As shown in the wiki links above or in a similar installed app which has a wbar icon.

Maybe the missing link is in how to make an extension or modify the one you have.
« Last Edit: December 29, 2011, 10:15:10 PM by coreplayer2 »

Offline jamtat

  • Jr. Member
  • **
  • Posts: 58
Re: Baffled by wbar
« Reply #11 on: December 29, 2011, 11:29:54 PM »
Thanks for your reply, coreplayer2. On my qemu testbed install of 4.2, though there is a firefox.desktop file in /usr/local/share/applications, and though there is within that file a valid path specified for firefox.png (in /usr/loca/share/pixmaps), no firefox item appears in wbar (note: those paths actually contain symlinks to files that are really located in /tmp/tcloop). Again, this is under an alternate WM, evilwm. Could the fact that no firefox item appears in wbar have to do with the alternative WM I'm using?

James

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: Baffled by wbar
« Reply #12 on: December 29, 2011, 11:53:17 PM »
That's interesting!!

I understand where you are coming from now,  there is clearly a missing link in the wm's.  One which most other wm's have and one which evilwm hasn't.  perhaps you're considering reproducing the method by which system icons are added, which is different than extension icons.  I remember looking into that myself once.. 

Now we are above my pay grade so I suggest comparing the core code to see how the system icons are added or comparing both wm's then find and add the missing code if possible.  That's how I'd approach the problem, which seems to be more work than is needed as a compliant and minimal wm is only a few kb more in size..  I'm sure you have a reason but evilwm seems too minimalistic to be usable (for me anyhow)..

« Last Edit: December 30, 2011, 12:08:35 AM by coreplayer2 »

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11568
Re: Baffled by wbar
« Reply #13 on: December 30, 2011, 12:51:59 AM »
Hi jamtat and coreplayer2
If you are adept at reading scripts, this may be of some use to you. These are located in  /usr/bin/:
desktop.sh
wbar_mv_icon    wbar_setup.sh   wbarconf
wbar.sh         wbar_rm_icon    wbar_update.sh
If you don't mind using  flwm_topside  as your window manager:
flwm_topside_makemenu     flwm_topside_ondemand
flwm_topside_initmenu     flwm_topside_menu_common  flwm_topside_restart

Offline roberts

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: Baffled by wbar
« Reply #14 on: December 30, 2011, 12:58:15 AM »
The title to this thread is misleading as it has to do with user's choice of WM, evilwm.
As obviously supported WMs work as expected.

To make evilwm work as expected read on.

evilwm does not have a complete set of interface files. It is missing evilwm_initmenu and evilwm_makemenu
Since evilwm does not use a menu both of these two interface files can be empty via a touch, however both should be executable +x.

With the existence of these two missing interface files, freedesktop items will be parsed and icons extracted for wbar.
10+ Years Contributing to Linux Open Source Projects.