Tiny Core Linux

Tiny Core Extensions => TCE Q&A Forum => Topic started by: Paulo on March 27, 2013, 12:48:45 PM

Title: Adding entries to wbar
Post by: Paulo on March 27, 2013, 12:48:45 PM
Hi all

I tried to add an entry to /home/tc/.wbar, it worked but once I rebooted (did backup), I saw a quick flash
on the screen about some error and the entry was no longer there.
I rebooted again this time without doing a backup, the error is now gone but the entry is still not there.
This what I appended to the end of .wbar:

Code: [Select]
i: /path/to/an/icon.png
t: Text_to_display
c: exec /path/to/my/script

Can anyone please advise on how to add stuff to wbar?
Thanks.
Title: Re: Adding entries to wbar
Post by: Rich on March 27, 2013, 12:54:48 PM
Hi Paulo
Read the answer about adding menu items here:
http://forum.tinycorelinux.net/index.php/topic,15107.msg86662.html#msg86662
Adding icons to the wbar is just an extension of this technique.
Title: Re: Adding entries to wbar
Post by: Paulo on March 27, 2013, 01:05:44 PM
Thank you Rich, will give it a bash (sorry, pun intended)  :)
Title: Re: Adding entries to wbar
Post by: Paulo on March 27, 2013, 01:56:22 PM
@Rich

OK, it went well (the second time round) but now I have an entry which is non functional.
In http://forum.tinycorelinux.net/index.php/topic,15107.msg86662.html#msg86662 (http://forum.tinycorelinux.net/index.php/topic,15107.msg86662.html#msg86662)
you mention:

Quote
To remove the  oranges~2.desktop  entry, delete the  /usr/local/share/applications/oranges~2.desktop  file, delete
the   Name=  value it created in  /home/tc/.wmx/Applications/oranges, and run  desktop.sh oranges

The problem is, I have no .wmx directory.
Title: Re: Adding entries to wbar
Post by: Rich on March 27, 2013, 02:25:03 PM
Hi Paulo
You do know file and directory names that begin with a  dot  are hidden. If you open a terminal and enter:
Quote
ls -a
do you see it then?
Title: Re: Adding entries to wbar
Post by: Paulo on March 27, 2013, 02:28:30 PM
Hi Rich

I know about the dot meaning hidden files.
I tried in the cli (as you suggested)
Code: [Select]
ls -a
also
Code: [Select]
ls .*  and also via rox running as root.
Nothing, the /home/tc/.wmx folder does not exist.
Title: Re: Adding entries to wbar
Post by: gerald_clark on March 27, 2013, 02:39:30 PM
.wmx/Applications is removed during backup per the /opt/.xfiletool.lst file.
Title: Re: Adding entries to wbar
Post by: Rich on March 27, 2013, 02:46:42 PM
Hi gerald_clark
But he's saying his  /home/tc  directory doesn't have a  .wmx  directory. Is that possible?
Title: Re: Adding entries to wbar
Post by: Rich on March 27, 2013, 03:02:30 PM
Hi Paulo
What does this return:
Code: [Select]
for i in desktop icons tcuser; do cat /etc/sysconfig/$i; done
Title: Re: Adding entries to wbar
Post by: Paulo on March 27, 2013, 03:05:30 PM
Hi Rich

Code: [Select]
for i in desktop icons tcuser; do cat /etc/sysconfig/$i; done
returns:

Code: [Select]
jwm
wbar
tc
Title: Re: Adding entries to wbar
Post by: Rich on March 27, 2013, 03:10:46 PM
Hi Paulo
Maybe the directory has a different name under  jwm, I don't know. When you right click the desktop, do you get a
pop up menu that lists  Applications ? If so, see what this returns:
Code: [Select]
find /home/tc -name Applications
Title: Re: Adding entries to wbar
Post by: gerald_clark on March 27, 2013, 03:11:41 PM
.wmx is part of the flwm window manager extension.
Title: Re: Adding entries to wbar
Post by: tinypoodle on March 27, 2013, 03:18:22 PM
If I understand right, .wmx is a subtree containing 1 distinct shell script per each menu item for flwm (and plays no role with jwm).
Title: Re: Adding entries to wbar
Post by: Paulo on March 27, 2013, 03:22:23 PM
Hi Rich

Yes there is a pop-up menu but strangely it does not display the new entry I have made.
It runs perfectly and icon is displayed in wbar, but not listed in the pop-up menu, yet others like FireFox17 are,
which is what I modeled my entry on.

When I type this:

Code: [Select]
find /home/tc -name Applications
Nothing is returned.

In case it makes a difference, my jwm version is vsvn-456 with compiled options:
confirm icons png shape xft xinerama xpm xrender
system config: /usr/local/etc/system.jwmrc
Title: Re: Adding entries to wbar
Post by: Paulo on March 27, 2013, 03:34:09 PM
By the way, just did a reboot with backup and my addition to wbar is not persistent.

EDIT:

Ignore, forgot to add it to .filetool.lst

EDIT 2:

I see that when one adds an entry to wbar, it's placed as the last item on the right hand side but after a reboot
it's placed alphabetically after any tinycore-SomeName.desktop.
Title: Re: Adding entries to wbar
Post by: gerald_clark on March 27, 2013, 03:37:25 PM
Re-read reply #6.
Title: Re: Adding entries to wbar
Post by: Rich on March 27, 2013, 03:40:53 PM
Hi Paulo
I don't use  jwm  so I'm not familiar with it. Maybe check out some of the  .jwmrc  directories under  usr/share/jwm/tce/
Title: Re: Adding entries to wbar
Post by: Rich on March 27, 2013, 03:55:45 PM
Hi Paulo
You could also look the makemenu script for clues:
Code: [Select]
less `which jwm_makemenu`
Title: Re: Adding entries to wbar
Post by: AmatCoder on March 27, 2013, 04:12:09 PM
Yes there is a pop-up menu but strangely it does not display the new entry I have made.
It runs perfectly and icon is displayed in wbar, but not listed in the pop-up menu, yet others like FireFox17 are,
which is what I modeled my entry on.

Applications pop-up menu is generated by every window manager with xxx_makemenu scripts. Example: jwm_makemenu or openbox_makemenu

It read *.desktop files from /usr/local/share/applications/ and generates a custom menu.
Title: Re: Adding entries to wbar
Post by: Paulo on March 27, 2013, 04:27:23 PM
@gerald_clark

Is there any reason as to why .wmx is included in .xfiletool.lst by default before I take it out?

@Rich

I will look at:
Code: [Select]
less `which jwm_makemenu`
@AmatCoder

Quote
It read *.desktop files from /usr/local/share/applications/ and generates a custom menu.

That is what I also understood, but it does not do it until a reboot or a restart of the X server for some reason.
(B.T.W. Thank you very much for gtkdialog.tcz, works very well).
Title: Re: Adding entries to wbar
Post by: AmatCoder on March 27, 2013, 05:17:30 PM
Quote
It read *.desktop files from /usr/local/share/applications/ and generates a custom menu.

That is what I also understood, but it does not do it until a reboot or a restart of the X server for some reason.

_makemenu scripts are executed by tce-load when install. You can force it with:

Code: [Select]
tc@box:~$ desktop.sh foo
tc@box:~$ jwm_restart

where 'foo' is the name of desktop item in /usr/local/share/applications i.e. foo.desktop

EDIT:
Alternatively:
Code: [Select]
tc@box:~$ jwm_makemenu foo
tc@box:~$ jwm_restart

if you don't want add an icon from 'X-FullPathIcon' field to wbar.
Title: Re: Adding entries to wbar
Post by: Paulo on March 27, 2013, 06:14:08 PM
Thanks AmatCoder those are handy bits of information.
What I also do if I don't want to use wbar is to make the .desktop file as per normal but just keep it in a directory,
rox will show the associated icon and when I click on it it will run what ever is in the Exec= line.
Very handy to run cli apps in aterm or even gtkdialog scripts.