You are not logged in.

#1 2012-05-02 18:19:49

Gen2ly
Member
From: Sevierville, TN
Registered: 2009-03-06
Posts: 1,529
Website

Discover the package a program belongs to possible?

When I was using Ubuntu, they had a nice bash hook that if you typed a command on the command line and it was not found it would report something like:

 Program [program-name] is not installed.
  Possible canidates:
    program1 - a blah blah
    program2 - tools for...

Is there something like that for Arch?

Last edited by Gen2ly (2012-05-02 20:18:18)


Setting Up a Scripting Environment | Proud donor to wikipedia - link

Offline

#2 2012-05-02 18:21:32

ConnorBehan
Package Maintainer (PM)
From: Long Island NY
Registered: 2007-07-05
Posts: 1,359
Website

Re: Discover the package a program belongs to possible?

Yes, pkgfile in community/pkgtools smile.


6EA3 F3F3 B908 2632 A9CB E931 D53A 0445 B47A 0DAB
Great things come in tar.xz packages.

Offline

#3 2012-05-02 18:34:32

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Discover the package a program belongs to possible?

Offline

#4 2012-05-02 20:47:29

Gen2ly
Member
From: Sevierville, TN
Registered: 2009-03-06
Posts: 1,529
Website

Re: Discover the package a program belongs to possible?

ConnorBehan wrote:

Yes, pkgfile in community/pkgtools smile.

Ah, thanks.  Yeah, when I looked this up I found this tool but  I thought I must have misunderstood its purpose after trying it,.  I did:

pacman -S pkgtools
pkgfile --update
sudo sed -i 's/^CMD_SEARCH_ENABLED=0$/CMD_SEARCH_ENABLED=1/' /etc/pkgtools/pkgfile.conf
sudo -i
source /etc/profile
exit

and then ran udisks (it's not installed) and got, "bash: udisks: command not found.  I have just discovered though that it does work.  I ran this as regular user from tty1 and after I run sudo -i in gnome-terminal it works.  Do you have any idea why it's not working as regular user from gnome-terminal?

Ah, thanks karol.  Hadn't seen this.  Perhaps I'll use it if I can't get pkgfile to work.


Setting Up a Scripting Environment | Proud donor to wikipedia - link

Offline

#5 2012-05-02 21:56:54

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,787
Website

Re: Discover the package a program belongs to possible?

Did you add

source /etc/profile

to your .zshrc/.bashrc?

Worked for me in urxvt as a normal user.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#6 2012-05-04 02:25:47

Gen2ly
Member
From: Sevierville, TN
Registered: 2009-03-06
Posts: 1,529
Website

Re: Discover the package a program belongs to possible?

WorMzy wrote:

Did you add

source /etc/profile

to your .zshrc/.bashrc?

Worked for me in urxvt as a normal user.

Thanks for the idea, WorMzy.  No didn't work.  And unfortunately now (after reboot) it's not working anywhere.  Any more ideas?


Setting Up a Scripting Environment | Proud donor to wikipedia - link

Offline

#7 2012-05-04 07:56:49

xamaco
Member
From: Corsica, France
Registered: 2010-04-05
Posts: 87

Re: Discover the package a program belongs to possible?

pacman -Qo name

Offline

#8 2012-05-05 02:57:56

Gen2ly
Member
From: Sevierville, TN
Registered: 2009-03-06
Posts: 1,529
Website

Re: Discover the package a program belongs to possible?

Yeah, I like the bash discovery method.  pkgtool seem to be broke now, but just tried command-not found and it works great.  Thanks for the reference karol.


Setting Up a Scripting Environment | Proud donor to wikipedia - link

Offline

Board footer

Powered by FluxBB