TinyURL widget - shorten your URL's for free!

Enter a long URL to make tiny:

Saturday, August 2, 2014

How to find apt in Ubuntu

So I was looking for the Xerces-c Compiler library so I could run blahtex and make a nicer epub for my poker book (below)




















because I wrote it with LaTex using Olaf's cool poker card style file.

The biggest problem with package management tools like yum and apt / apt-get  for linux and their databases of really what are source files is a very simple problem; over time the developers - all eager beavers - change the names or upgrade versions of that same library set and that causes people constant problem of finding the right packages to install.   The Linux user community is so large and effective that this is a constant problem.  Lots of people take on old software and make it better. Just try installing GCC and see what I mean.  Half my Google searches are a direct result of not knowing the name of the packages.

So today while working on my ubuntu machine, I found a way to search the database for a fragment that might make sense. 

  • apt-cache search libxerces

  • I was able to look into the database and find this:


     apt-cache search libxerces

    libxerces2-java - Validating XML parser for Java with DOM level 3 support
    libxerces2-java-doc - Validating XML parser for Java -- Documentation and examples
    libxerces2-java-gcj - Validating XML parser for Java with DOM level 3 support (native code)
    libxerces-c-dev - validating XML parser library for C++ (development files)
    libxerces-c-doc - validating XML parser library for C++ (documentation)
    libxerces-c-samples - validating XML parser library for C++ (compiled samples)
    libxerces-c2-dev - validating XML parser library for C++ (development files)
    libxerces-c2-doc - validating XML parser library for C++ (documentation)
    libxerces-c28 - validating XML parser library for C++
    libxerces-c3.1 - validating XML parser library for C++
    So if you are looking into a Debian/Ubuntu based distribution with apt then try the apt-cache search.

    Thursday, July 31, 2014

    Font OMS/jkp/m/n/10=jkpsy at 10.0pt not loadable: Metric (TFM) file not found Error Latex Fedora 18

    I was compiling the kpfonts into a LaTeX document on Fedora 18 and got the following errors:

    ...

    Font OMS/jkp/m/n/10=jkpsy at 10.0pt not loadable: Metric (TFM) file not found
    Font T1/jkp/m/n/10=jkpmn8t at 10.0pt not loadable: Metric (TFM) file not foun
    Font OT1/jkp/m/n/8=jkpmn7t at 8.0pt not loadable: Metric (TFM) file not found
    Font OT1/jkp/m/n/6=jkpmn7t at 6.0pt not loadable: Metric (TFM) file not found


    ...

    The full log entries look like this

    (/usr/share/texlive/texmf-local/texmf-compat/tex/latex/kpfonts/t1jkp.fd
    File: t1jkp.fd 2007/01/24 Fontinst v1.928 font definitions for T1/jkp.
    )
    ! Font T1/jkp/m/n/10=jkpmn8t at 10.0pt not loadable: Metric (TFM) file not foun
    d.
    <to be read again>
    relax
    l.24 \begin{document}
    I wasn't able to read the size data for this font,
    so I will ignore the font specification.
    [Wizards can fix TFM files using TFtoPL/PLtoTF.]
    You might try inserting a different font spec;
    e.g., type `I\font<same font id>=<substitute font name>'.

    ! Font T1/jkp/m/n/8=jkpmn8t at 8.0pt not loadable: Metric (TFM) file not found.
    <to be read again>
    relax
    l.24 \begin{document}


    I saw some posts claiming to install texlive-fontrecommend like this:

    sudo yum install texlive-collection-fontsrecommended texlive-times


    but they were updated and installed. The packages I installed were all wildcard * font packages like this:

    sudo yum install texlive-collection-fonts*

    then I ran

    sudo texhash

    and for Lyx I reconfigured and it worked.








    Friday, July 11, 2014

    Printing JPEG files to Epson XP-400 printer

    So I was trying to print out my tickets for the Rockstar Mayhem concert when the Windows machine I was trying to use stalled.

    http://rockstarmayhemfest.com/dates/phoenix-az-2

    So I used Fedora on my laptop to save the day.

    I couldn't get the pdf ticket files to print on the networked Epson XP-400.

    Instead, I loaded them into GIMP and exported them to JPEG format.  Unfortunately, that didn't work.


    In the Epson printer manual,
    (https://files.support.epson.com/pdf/xp400_/xp400_ug.pdf )
    it says:

    You can insert memory cards in your product containing files that meet these specifications.
    File format JPEG with the Exif version 2.3 standard Image size 80×80 pixels to 9200×9200 pixels
    Number of files Up to9990

    So I re-exported them and made sure they were in unoptimized uninterlaced format JPEG.  That worked, they were recognized.

    So convert PDF to raw JPEG, and load them onto an SD ram card and you can get the printer to print out pages.

    Wednesday, January 29, 2014

    USB Keyboard problems on the Dell Optiplex 9020 - use the mini-DIN ports!


    I had a problem getting the boot menu and the system menu to appear while rebooting a Dell Optiplex 9020.

    According to the manual here, the System menu in BIOS comes up with the F2 key and the boot menu comes up with the F12 key. But when I plugged a USB keyboard in, I could not get those options to appear before it booted Windows.

    I noticed mini DIN keyboard and mouse connectors on the back; Why would a brand new computer have a really old interface? So, I found a mini-DIN keyboard and plugged it in. It works, now you can get the data to the BIOS before the DOS / Windows takes over.

    My diagnosis is that the BIOS does not initialize the USB device in the proper sequence early enough so that you can use the keyboard in time, perhaps that's why they included mini-DIN interfaces? Great design feature, Dell!

    Friday, January 10, 2014

    Simple way to add doxygen to your GNU Autotools project

    [Edited with changes in Autotools 2016...]

    I tried Oren Ben-Kiki's doxygen support here and got some errors when trying doxygen generation inside a directory that wasn't source code directory because of the way it's configured. So here is my simple version:


    1. inside top source dir execute:

    doxygen -g

    to generate Doxyfile.

    2. copy that to Doxyfile.in

    3. edit Doxyfile.in with the following variables inserted where it makes sense:

    PROJECT_NAME = @PACKAGE@
    PROJECT_NUMBER = @VERSION@
    OUTPUT_DIRECTORY = doxygen
    down halfway in the doxygen.in file change
    INPUT = @SRC_SUBDIRS@

    Then, inside configure.ac insert:
    SRC_SUBDIRS = src
    # shell script to find directories
    for FILE in `ls -d src/*`
    do
    case "$FILE" in
    autom4te* ) continue ;; #
    doxygen* ) continue ;; # exclude doxygen dir
    *Makefile* ) continue ;; # exclude doxygen dir
    m4*) continue ;; #
    * )
    SRC_SUBDIRS+=" $FILE"
    esac
    done
    at the bottom of configure.ac:

    AC_SUBST([SRC_SUBDIRS])

    and make sure you add the target doxygen file (it will start with doxygen.in and generate doxygen)

    # OUTPUT STAGE
    AC_CONFIG_FILES([Makefile Doxyfile])

    Then inside your Makefile.am add:


    EXTRA_DIST += Doxyfile.in

    # simple doxygen target
    dox: Doxyfile.in
    doxygen Doxyfile


    # clean up the extras including doxygen
    clean-local:
    cd ${top_srcdir}
    rm -rf doxygen


    now when you
    make clean

    it will remove the doxygen directory.
    When you

    make dox

    it will run doxygen and make html and latex outputs. You will need to configure other changes to the doxygen to get specific output but this will get you started fast...

    GNU Autotools make dist-bz2

    If you are making a GNU autotools / automake package, the make command to make a bzip2 compressed distribution tarball is make dist-bzip2

    Friday, November 22, 2013

    Can't locate Autom4te/ChannelDefs.pm in @INC (@INC contains:


    I got this error trying to run autotools on ubuntu raring:

    Can't locate Autom4te/ChannelDefs.pm in @INC (@INC contains: /home/dave/share/autoconf /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .) at /home/dropship/bin/autoheader line 42.
    BEGIN failed--compilation aborted at /home/dropship/bin/autoheader line 42.

    uname -a

     Linux dropship 3.5.0-34-generic #55-Ubuntu SMP Thu Jun 6 20:18:19 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux


    Solution:

    The answer is who has access to the /usr/share/autoconf folders and root has the default access.

    If you can't see them, then sudo autoscan instead of autoscan and so on...

    then run:

    sudo autoconf
    sudo automake etc. 


    OR

    add your compiling user into the root group.