Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I seldomly have X installed on any of the servers I setup and I'm looking for a frontend to yum that will work from the terminal. I'm sure I'm not the only one finding the yum CLI a tad annoying. An interface similar to the 'pirut' one is what I have in mind, but just ncurses based or something.
I've been searching around for something like this to make life a little easier, but I've had no luck in finding anything useful. Does anyone know if anything like this even exists?
Don't know of one I'm afraid. However I only use CLI yum and I don't find it annoying. One thing that helps is keeping this file handy:
Code:
yum list all > all-yum.log
so you can quickly grep it for installed and available packages. If you really wanted to you could also make a file with the output of yum info [package] for all packages - it'd be quick to write the script, take a while to run, but then you've got all the info and it would be quicker to grep that than to use pirut.
Yeps, curses interface would be super. I'm no programmer though, I just recently started playing around with Python to see if I can get started on programming, but I'm teaching myself and it is going extremely slow. I have no clue about writing anything like that.
Just assuming that something like this doesn't exist and then telling someone to write it himself doesn't answer the original question.
I've been thinking of writing this for a while, so now's as good a time as any.
Code:
yum list all > all-yum.txt # create list of all available and installed packages
# write results of yum info [package name] to yum-info.txt, for all packages.
# NR>13 at the beginning of this line is because all-yum.txt has 13 lines at the top
# which don't begin with package names. Yours may vary - edit the number to suit.
yum info $(gawk 'NR > 13 && (! /Available Packages/) {match($1, "^[^.]+", A); print A[0]}' all-yum.txt | uniq) | gawk '! (/^Loaded plugins:/ || /^No Presto metadata/ || /^Excluding Packages in/ || /^Finished/ || /^Setting up and reading/)' > yum-info.txt
Want to search for video-related packages? It's as easy as
Code:
grep -iC20 video yum-info.txt | less
Output (more or less):
Code:
Installed Packages
Name : RealPlayer
Arch : i586
Version : 10.1.0.914
Release : 20050511
Size : 11 M
Repo : installed
Summary : RealPlayer
URL : http://www.real.com/
License : RPSL, EULA
Description: RealPlayer is a media player with the aim of providing solid media
: playback locally and via streaming. It plays RealAudio, RealVideo,
: MP3, 3GPP Video, Flash, SMIL 2.0, JPEG, GIF, PNG, RealPix and
: RealText and more. The RealPlayer 10 for Linux builds on top of the
: popular open-source Helix Player.
I think that's exactly the same description you'd see from Pirut, and I happen to think it's far preferable to using either pirut or a hypothetical ncurses repo browser (it's much quicker), but maybe I'm a bit of a CLI junkie!
Edit: actually a better way to search the file is with this function
Code:
search-yum-info () {
gawk 'BEGIN {RS="\n\n"; IGNORECASE=1} /'$1'/ {print $0 "\n"}' ~/yum-info.txt
}
$ search-yum-info video
Installed Packages
Name : RealPlayer
Arch : i586
Version : 10.1.0.914
Release : 20050511
Size : 11 M
Repo : installed
Summary : RealPlayer
URL : http://www.real.com/
License : RPSL, EULA
Description: RealPlayer is a media player with the aim of providing solid media
: playback locally and via streaming. It plays RealAudio, RealVideo,
: MP3, 3GPP Video, Flash, SMIL 2.0, JPEG, GIF, PNG, RealPix and
: RealText and more. The RealPlayer 10 for Linux builds on top of the
: popular open-source Helix Player.
Installed Packages
Name : ekiga
Arch : x86_64
Version : 2.0.11
Release : 2.fc8
Size : 13 M
Repo : installed
Summary : A Gnome based SIP/H323 teleconferencing application
URL : http://www.ekiga.org/
License : GPLv2+
Description: Ekiga is a tool to communicate with video and audio over the
: internet. It uses the standard SIP and H323 protocols.
Installed Packages
Name : fbset
Arch : x86_64
Version : 2.1
Release : 24.fc7
Size : 60 k
Repo : installed
Summary : Tools for managing a frame buffer's video mode properties
URL : http://users.telenet.be/geertu/Linux/fbdev/
License : GPL
Description: Fbset is a utility for maintaining frame buffer resolutions. Fbset
: can change the video mode properties of a frame buffer device, and
: is usually used to change the current video mode. Install fbset if
: you need to manage frame buffer resolutions.
...
All the flexibility of a gui and more, in a few easy lines. You can tell I've got work I'm avoiding...
I'm fairly familiar with how to do all this from the CLI by now. The reason I am asking if anyone knows about a text based frontend for yum is because I want to avoid having to spend time on piping output to files and parsing them for whatever. People familiar with text based installers should know what the screens for package selection look like. Those are the pictures coming to mind when I think about a text based frontend for yum.
So in essence I'm looking for a text based frontend for yum where:
(1) you can see at a glance which packages are already installed,
(2) you can view a group in more detail (in the text installer you press F2 and you can see the group's packages),
(3) you can easily select/deselect packages for installation/removal (in the text installer you press spacebar to add/remove an asterix between two square brackets, something like this:[*]),
(4) a search function would be handy (though I can do without this), and
(5) if possible, see a package's description somehow (though I can do without this too.)
Basically "pirut" for the terminal. If anyone knows about something like this I'd appreciate it if you can let me know. (I'm not looking for instructions on how to do it from the CLI.)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.