Linguas OS appfinder / menu edit
Forum » tech / scripts » Linguas OS appfinder / menu edit
Started by: tonytraductortonytraductor
On: 1199994059|%e %b %Y, %H:%M %Z|agohover
Number of posts: 2
rss icon RSS: New posts
Summary:
This script will assist the user in finding an application, and adding it to the fluxbox desktop menu.
Linguas OS appfinder / menu edit
tonytraductortonytraductor 1199994059|%e %b %Y, %H:%M %Z|agohover

#!/bin/bash

  1. app finder for Linguas OS (www.linguasos.org).
  2. find apps and enable entry to flux menu
  3. author, Anthony Baldwin / gro.sosaugnil|rotcudartynot#gro.sosaugnil|rotcudartynot
  4. this little scripty is 100% gpl
  1. whoami gives the name of the currently logged in user.

u=$(whoami)

zenity —info —title LingApp —width 500 —text "Greetings, $u! This application will assist you in finding applications and adding them to your Linguas OS Fluxbox desktop menu."

h=$(zenity —entry —title LingApp —width 500 —text "Do you require instructions on how to find applications and them to your menu, enter 'h' for help below. To proceed to find your application, 'f' for find.")

if [ $h = h ]; then

zenity —title LingApp —text-info —width 600 —height 600 —filename="/usr/local/share/lomened"

  1. Don't forget to put lomened text file into /usr/local/share!
  2. probably add a page to the Linguas OS wiki to direct users to as well.

ap=$(zenity —entry —title LingApp —text "Enter the name of the application you wish to find")

loc=$(whereis $ap)

zenity —info —title LingApp —text "If you have entered the correct name for your application, and it is installed, then $ap is here: $loc".

ed=$(zenity —entry —title LingApp —text "Would you like to edit your Fluxbox menu to add this application now? -enter y for yes.")

if [ $ed = y ]; then

kate ~/.fluxbox/menu # will have to edit this to medit !!

exit

else

zenity —info —title LingApp —text "Thank you for using Linguas OS, $usr!"

fi
fi

exit

  1. lomened gives further instructions. It is posted in reply to this script.
unfold Linguas OS appfinder / menu edit by tonytraductortonytraductor, 1199994059|%e %b %Y, %H:%M %Z|agohover
Re: Linguas OS appfinder / menu edit
tonytraductortonytraductor 1199994141|%e %b %Y, %H:%M %Z|agohover
  1. Here are the instructions that LingApp brings up:

Linguas OS Application Finder - How to Edit your Fluxbox Menu
abaldwin / gro.sosaugnil|rotcudartynot#gro.sosaugnil|rotcudartynot

Close these instructions after reading these instructions, LingApp will assist you to find an application and add it to your menu.

  1. (note: I'd like to find a way to enable printing from the zenity text-info dialog…hmmmm.)

In Fluxbox, when you add applications, they will not be automatically added to your fluxbox menu.
LingApp is a handy little script that will help you to find where the applications have bee installed. In most cases, this will be in a location such as
/usr/bin/yourapplication
or
/usr/sbin/application

To add this application to launch from your fluxbox menu, you will have to add it manually. This is easily done by opening the fluxbox menu in a text editor and adding an entry for your application.
Don't forget to save your changes to the menu.

Your fluxbox menu will be in a hidden folder in your /home directory
such as /home/yourname/.fluxbox
You can open it and edit it by entering
medit ~/.fluxbox/menu
in xterm, which will open a text editor and display the menu for editing.

Fluxbox menu entries look like this:

[exec] (name of application) {/path/to/application}

For instance, the menu entry for LingApp is

[exec] (LingApp) {/usr/local/bin/lingapp}

If you don't know where the application is, you can run

whereis 'name of application'
in xterm to find it.
LingApp will do this for you after you close these instructions.
Another means of finding an application on Linguas OS is to use Searchmonkey
which is in your Admin submenu of the Linguas OS Fluxbox desktop menu.

All the same, here is an example, say, if you were trying to find openoffice writer:
You would open xterm or another terminal and do as follows:

user@localhost:~$ whereis oowriter

The terminal would then output this:

oowriter: /usr/bin/oowriter /usr/bin/X11/oowriter /usr/share/man/man1/oowriter.1.gz

You will notice that the first entry is "/usr/bin/oowriter"

This is the command to start openoffice writer (your word processor).
You will see this in the default Linguas OS menu in the "office" submenu.

So, say you have decided to add xmms (winamp for linux) using synaptic, and, now you want to add it to your menu.

You would enter xmms into LingApp, and it would give tell you that xmms is at /usr/bin/xmms.

To add xmms to your fluxbox menu, then, you would add an entry like this

[exec] (xmms) {/usr/bin/xmms}

This would then show up in your menu, and you could start it with a click.

You can add sumbenus, too:

[submenu] (name of submenu)
[exec] (name) {command}
[exec] (name) {command}
[end]

For instance, say you want to add a submenu to your fluxbox menu for multimedia applications, and then add any multimedia applications to that menu.
It might look something like this:

[submenu] (Multimedia)
[exec] (xmms) {/usr/bin/xmms}
[exec] (gxine) {/usr/bin/gxine}
[end]

If you completely mess up the menu, you can run
fluxbox-generate_menu
in xterm to reconstruct something reasonable.
Then you can edit it to customize it again.
Also, I have included an extra copy of the default Linguas OS menu in
/home/yourname/.bktxts
You can move it to /home/yourname/.fluxbox
to restore the default Linguas OS menu.

If you require further assistance, please feel free to ask on the Linguas OS Yahoo! group at
http://tech.groups.yahoo.com/group/linguasos/

Thanks for using Linguas OS!

Anthony Baldwin
gro.sosaugnil|rotcudartynot#gro.sosaugnil|rotcudartynot

unfold Re: Linguas OS appfinder / menu edit by tonytraductortonytraductor, 1199994141|%e %b %Y, %H:%M %Z|agohover
New post
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License