WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Step-by-step instructions how to add or remove wbar entries (tcl-3.3)  (Read 27075 times)

Offline AbNoRMiS

  • Hero Member
  • *****
  • Posts: 550
  • nothing can be impeccable in this imperfect world
    • @ß№®M!$
Re: Step-by-step instructions how to add or remove wbar entries (tcl-3.3)
« Reply #15 on: March 09, 2012, 02:58:29 PM »
as far as i can remember, opt is backed up only since version 4.1
Basic Design Concept © @ß№®M!$
please forgive my terrible english :)

Offline AbNoRMiS

  • Hero Member
  • *****
  • Posts: 550
  • nothing can be impeccable in this imperfect world
    • @ß№®M!$
Re: Step-by-step instructions how to add or remove wbar entries (tcl-3.3)
« Reply #16 on: March 11, 2012, 06:01:21 PM »

3. Restart X to have the new entries effected.

if i'm not mistaken can simply execute the wbar.sh
to restarting wbar and apply changes
it will be easier and will do it without restart x
again, if i'm not mistaken then this should works in tc4+
Basic Design Concept © @ß№®M!$
please forgive my terrible english :)

Offline redisded

  • Newbie
  • *
  • Posts: 3
Re: Step-by-step instructions how to add or remove wbar entries (tcl-3.3)
« Reply #17 on: March 31, 2016, 07:16:31 AM »
Hello all,

I know this topic is a bit old, but i had the problem of an entry which was present in the menu but not in the wbar.

As this topic is linked on the documentation wiki, I think it could be a good place to give my solution.

I created an entry to connect to a rdp server, but my mistake was, I believe, that I just called it rdesktop, which is also the name of the command to connect my server.

When I realised this, I simply changed the name of my entry (and the icon linked to it) to connect_server, and my entry shown up in the wbar.

So, if you have a script that shows up in the menu, but not in the wbar, just check if its name is not the name of a system command.

Sorry for my poor English...

Redisded.

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: Step-by-step instructions how to add or remove wbar entries (tcl-3.3)
« Reply #18 on: March 31, 2016, 10:34:57 AM »
Quote
I created an entry to connect to a rdp server, but my mistake was, I believe, that I just called it rdesktop, which is also the name of the command to connect my server.

I guess  rdesktop.tcz  was loaded when you tried adding your custom icon?
OnDemand entries are only shown if there isn't already an extension with the same name loaded.

/usr/local/bin/wbar_setup.sh
Code: [Select]
if [ ! -e /etc/sysconfig/noondemandicons ]; then
INSTALLED=/usr/local/tce.installed
ONDEMAND="$TCEDIR"/ondemand
for F in `ls -1 "$ONDEMAND"/*.img 2>/dev/null`; do
  IMG="${F##/*/}"
  APPNAME="${IMG%.img}"
  if [ ! -e "$INSTALLED"/"$APPNAME" ]; then
    if ! grep -qw -m1 "^t: *${APPNAME}$" "${TCEDIR}"/xwbar.lst 2>/dev/null; then
      echo "i: $ONDEMAND/$IMG" >> "$TCEWBAR"
      echo "t: $APPNAME" >> "$TCEWBAR"
      echo "c: $ONDEMAND/$APPNAME" >> "$TCEWBAR"
    fi
  fi
done
fi


Since  rdesktop.tcz  doesn't contain a  *.desktop  file, which would be used to create the menu entry and wbar icon, no wbar icon is shown. Only the OnDemand menu entry from the Window Manager remains.

I guess it might be useful to restrict the exclusion of OnDemand items in wbar based on the existence of a *.desktop file?

Code: [Select]
if [ ! -e /etc/sysconfig/noondemandicons ]; then
FREEDESK=/usr/local/share/applications
ONDEMAND="$TCEDIR"/ondemand
for F in `ls -1 "$ONDEMAND"/*.img 2>/dev/null`; do
  IMG="${F##/*/}"
  APPNAME="${IMG%.img}"
  if [ ! -e "$FREEDESK"/"$APPNAME".desktop ]; then
    if ! grep -qw -m1 "^t: *${APPNAME}$" "${TCEDIR}"/xwbar.lst 2>/dev/null; then
      echo "i: $ONDEMAND/$IMG" >> "$TCEWBAR"
      echo "t: $APPNAME" >> "$TCEWBAR"
      echo "c: $ONDEMAND/$APPNAME" >> "$TCEWBAR"
    fi
  fi
done
fi

Download a copy and keep it handy: Core book ;)

Offline redisded

  • Newbie
  • *
  • Posts: 3
Re: Step-by-step instructions how to add or remove wbar entries (tcl-3.3)
« Reply #19 on: April 01, 2016, 07:46:57 AM »
Hi all,

thanks Misalf for your explanations, indeed, rdesktop.tcz was already loaded.

I have now troubles with the execution of my scripts from the menu or the wbar (nothing happen), I will open a new thread for that if I can't solve it myself, but as this thread will be seen by many persons coming from the documentation, there is at least one question which I believe is interesting to ask here :

Is there a logfile of what's happening when I launch a personnal script from menu or wbar ?

Redisded.
« Last Edit: April 01, 2016, 08:14:29 AM by redisded »

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: Step-by-step instructions how to add or remove wbar entries (tcl-3.3)
« Reply #20 on: April 01, 2016, 08:14:11 AM »
Not for wbar. All of its output goes to  /dev/null .
Error messages from the Window Manager can be seen in  /tmp/wm_errors .
Download a copy and keep it handy: Core book ;)

Offline redisded

  • Newbie
  • *
  • Posts: 3
Re: Step-by-step instructions how to add or remove wbar entries (tcl-3.3)
« Reply #21 on: April 01, 2016, 08:31:17 AM »
Thank you again Misalf !

I found there an error saying my script is not found when I launch it by the menu; However, when I list the tcedir, I can see my scripts...

I have a similar problem with the command source that behave like it would when I source a file from command line, but get a file not found error when I try to source the same file from my script...

This may come from me misunderstanding the principle of busybox.

I will search this way for a while and open a new topic for that if necessary because this is not related to the thread subject anymore.

Redisded.

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: Step-by-step instructions how to add or remove wbar entries (tcl-3.3)
« Reply #22 on: April 03, 2016, 02:19:44 AM »
Normally when you receive an error reporting that the script could not be found, it is most likely referring to the interpreter which is not installed.  Or something simple like the path or file name was wrong.

Check the first line of your script, am assuming the script is written in Bash.  In which case you'll need to install the Bash extension.