Tiny Core Base > TCB Tips & Tricks

Step-by-step instructions how to add or remove wbar entries (tcl-3.3)

<< < (4/5) > >>

AbNoRMiS:
as far as i can remember, opt is backed up only since version 4.1

AbNoRMiS:

--- Quote from: jur on July 12, 2010, 07:57:27 PM ---
3. Restart X to have the new entries effected.


--- End quote ---
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+

redisded:
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.

Misalf:

--- 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.

--- End quote ---

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: ---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


--- End code ---

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: ---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


--- End code ---

redisded:
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.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version