Translate

Archives

Fedora SPICE: Cut and Paste between Guest and Host

If you’re already using SPICE with your Fedora or RHEL guests and you are not using the SPICE guest agent, you should seriously consider installing the spice-vdaguest guest agent. What functionality does spice-vdagent provide? Amongst other things, the following: Move mouse continuously within guest and client without pressing Shift-F12 Copy and Paste between guest and client Automatic guest resolution adjustment while entering fullscreen mode To install spice-vdagent on Fedora 15/16 or RHEL/CentOS 6/6.1: # yum -y install spice-vdagent # chkconfig spice-vdagentd on # reboot A reboot is necessary. See here if you want to information on the SPICE agent protocol.

List packages in RPM Database using C

Here is one way of listing installed RPM packages. It works with all versions of CentOS 5, RHEL5 and up to Fedora 14. #include <stdio.h> #include <stdlib.h> #include <string.h> #include <fcntl.h> #include <unistd.h> #include <rpm/rpmlib.h> #include <rpm/header.h> #include <rpm/rpmdb.h> int main(int argc, char *argv[]) { rpmdbMatchIterator mi; int type, count; char *name; rpmdb db; Header h; rpmReadConfigFiles( NULL, NULL ); if (rpmdbOpen( "", &db, O_RDONLY, 0644 ) != 0) { fprintf( stderr, "ERROR: Cannot open RPM databasen"); exit(1); } mi = rpmdbInitIterator(db, RPMDBI_PACKAGES, NULL, 0); while ((h = rpmdbNextIterator(mi))) { headerGetEntry(h, RPMTAG_NAME, &type, (void **) &name, &count); printf("%sn", name);

Fedora: Specify Repo when Booting Installer

To specify an installation source for Fedora, CentOS, Red Hat or Scientific Linux, use the linux repo= option at the boot prompt: For example: linux repo=cdrom:device linux repo=ftp://username:password@URL linux repo=http://URL linux repo=hd:device linux repo=nfs:options:server:/path linux repo=nfsiso:options:server:/path In these examples, cdrom refers to a CD or DVD drive, ftp refers to a location accessible by FTP, http refers to a URL accessible by HTTP, hd refers to an ISO image file accessible on a hard drive partition, nfs refers to an expanded tree of installation files accessible by NFS, and nfsiso refers to an ISO image file accessible by NFS. See