Yelp or gnome-help in linux mint

About writing shell scripts and making the most of your shell
Forum rules
Topics in this forum are automatically closed 6 months after creation.
Locked
minttux

Yelp or gnome-help in linux mint

Post by minttux »

hi buddies
if you want real yelp (browse man page in gui) and you don't want to redirect to linux mint website docs
i made a simple script
put mn script in your /usr/bin/
so you will have /usr/bin/mn
run it by type mn alone or with doc name parameter like:
$ mn ls
or alone
$ mn
then you see this. enter your command that you want to see man page for it:
Image
then you see:
Image

if you want to have it in your menu in cinnamon you can right click on Menu then click on Edit menu
Image
then go to this path and edit command field and change it to mn:
Image

also you can download this script from this link:
http://www.4shared.com/zip/RgXKCQDZ/mn_online.html

Thanks
D.Rikhtehgaran
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
karlchen
Level 23
Level 23
Posts: 18209
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: Yelp or gnome-help in linux mint

Post by karlchen »

Hello, minttux.

Thank you for sharing your little script with us. :)

Here is the explanation why on Mint launching yelp will launch the default browser and load the Mint documentation:

The Mint makers
+ added their own version of yelp to the folder /usr/local/bin
+ made sure /usr/local/bin will be searched before /usr/bin when following the $PATH variable.
The original yelp executable which will launch the local help system on your disk is still present and lives in /usr/bin.

So there are two trivial approaches to making yelp do what it should do: launch the local help system on your disk:
  1. Change the PATH variable in such a way that /usr/bin will be searched prior to /usr/local/bin.
    Note:
    Doing so will not only affecct yelp, but apt, too, basically any command which lives in /usr/local/bin and /usr/bin in two different versions.
  2. Rename the file /usr/local/bin/yelp to /usr/local/bin/yelp.mint.
    That is all.
    Effect: yelp will do what we expect. Launching yelp.mint will take you to the Mint documentation.
    Side-effects: None
Note:
This second solution has been posted in a different thread by user iveand, not me: Gnome application help does not work in Mint 13 XFCE

Cheers,
Karl
Image
The people of Alderaan have been bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine for 771 days now.
Lifeline
Habitual

Re: Yelp or gnome-help in linux mint

Post by Habitual »

n/m
User avatar
karlchen
Level 23
Level 23
Posts: 18209
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: Yelp or gnome-help in linux mint

Post by karlchen »

Habitual wrote:n/m
Can we get a little bit more verbose translation, please?
Image
The people of Alderaan have been bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine for 771 days now.
Lifeline
User avatar
karlchen
Level 23
Level 23
Posts: 18209
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: Yelp or gnome-help in linux mint

Post by karlchen »

Hm, seems as if I was wrong when I wrote
karlchen wrote:Side-effects: None
About the side-effects see here: [url=http://forums.linuxmint.com/viewtopic.php?p=773411#p773411]Mint help.[/url]

In shorts words:
  • By renaming /usr/local/bin/yelp to yelp.mint we re-enable access to the local helpfiles of our applications
  • But we render menu items useless which simply launch "yelp" without any arguments.
  • The reason is: genuine yelp will fail without a valid commandline argument,
  • Solution:
    Edit the affected Mint Menu item(s) to call yelp.mint and not yelp.
    Note:
    The exact steps how this can be done may be slightly different and depend on the desktop environment in use: Mate, Cinnamon, KDE or xfce.
Image
The people of Alderaan have been bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine for 771 days now.
Lifeline
Locked

Return to “Scripts & Bash”