Showing posts with label Slackware. Show all posts
Showing posts with label Slackware. Show all posts

Saturday, July 2, 2022

New release of Ada for Slackware 15.0

Finally, after many years of inactivity, a new release is out for Slacware 15.0.

Major changes of this release: contains the Alire; the GNATStudio is using the binary GNAT Studio Continuous Release 20220512, I failed to build it from source due to lots of dependcies and stuck in the Ada langguare server; a build script that boostrap gprbuild and build/install all the basic packages (XMLAda, GTKAda, Florist, AUnit, GNATCOLL, etc).

Thursday, February 3, 2022

Wednesday, July 25, 2018

Slackware Creator Patrick Volkerding needs help

It was sad to know that Patrick (The creator/maintainer of Slackware) is on financial crisis.

It is unfortunate that he do not get his share of income from the store, and now he is

I mean, I'm sitting here in a house with a giant hole in the roof, a broken door sealed with duct tape, and a failed air conditioning condenser that I can't afford to fix, my wife has been driving on a spare tire for weeks, my teeth need serious attention again, and I only just got a machine here with UEFI for the first time (bought a used machine... really out of my budget but it had to be done).

The Slackware community is eager to help and for the time being Patrick gave his PayPal account link before he could setup a proper channel for donation.

Patrick Volkerding's Paypal account: https://www.paypal.me/volkerdi

And please donate if you like Slackware and willing to help.

Patrick has a cafepress account for Official Licensed Slackware Store. Confirmed by Patrick.

Wednesday, October 4, 2017

New Ada for Slackware released

Finally, long after released of GNAT GPL 2017 and GCC in 7.x series in Slackware-current, I got some time to work on the Ada environment for Slackware and got a working version of GPS.

The new release is at GitHub

Thursday, May 4, 2017

GCC 7.1 is out

GCC 7.1 was released on May 2.

I tried it out and recompiled all my Ada related builds, finally I got a stable GPS that does not crash after opening a project file. It still crashed on me, maybe I should revert to an older version?

I have updated my build scripts ada-4-slackware on gitHub. There is still some problems with ASIS 2016, some API changed for the new compiler, will update the build script once got time.

Tuesday, September 13, 2016

Ada programming environment based on GCC 6.2 and GNAT GPL 2016 in Slackware64 14.2

New release of Slackware and new version of GNAT GPL 2016 prompt me to update the Ada programming environment under Slackware.

First, I was trying to use the stock 5.3 compiler, but encounter gnat compiler error when compiling gprbuild. So has to use the FSF GCC 6.2 as the based.

The FSF GCC compiler

At the writing, the latest release of GCC is 6.2.0. First I update the build script to matched what's in the current tree. I have changed the build directory to a fixed location to avoid the random location in the original script. As it is needed for gnat_util build, a fixed location is easier for the script to find the right files. Built and install without problem.

GNAT Environment package

This package contains startup scripts to setup Ada project path environment variable ADA_PROJECT_PATH and GPR_PROJECT_PATH. They will be installed into /etc/profile.d by the doinst.sh.

Also soft link of the GNAT Ada run time libraries are also created in doinst.sh.

XMLAda

For XMLAda GPL 2016, the default build process is making use of gprbuild, which depends on XMLAda. I followed what was done on Arch Linux and created a custom Makefile.SlackBuild. But I installed the package with the following scheme, similar to what GNAT GPL 2016 is doing but with sub-directories for each sub-module:
 usr/include/xmlada
             |- input
             |- unicode
             ...
 usr/lib64/xmlada
           |- input
           |  |- static
           |  `- relocatable
           |- unicode
           |  |- static
           |  `- relocatable
           ...
The document build requires Sphinx, as SlackBuilds.orgprovides all necessary build scripts, it is a matter of installing the relevant packages and dependencies.

GPRBuild

The 2016 version of gprbuild required gprbuild itself. So Similar to XMLAda, a custom Makefile was borrowed from the Arch Linux project and modified to suite the needs of Slackware. A patch was developed for the gprinstall program, so that its default library subdir and library soft link subdir points to lib64 under Slackware64. A gpr library is also created, as it is needed by a few other programs

GNAT_UTIL

The GNAT Util Libraryprovides access to GNAT compiler internals for AdaCore utilities. The latest release is 5.1.0, it is used for our GCC 6.2.0. The build went well.

GTKAda

It does not build very well at the first few builds, it keeps installing libs into /usr/lib in stead of /usr/lib64 on 64-bit system. It seems the generate file still insist on the lib's path. So more sed commands are added to change the lib path to lib64 on 64-bit system. After that, it built without problem with proper installation path.

Aunit

Aunit's build script has no big change from the previous version, except for the version bump.

GNATColl

I used version 16.1 from GitHub. GNATColl compiled OK, with minor problem with lib's installation path, similar to the problem in GtkAda. I always got gpr.gpr problem when compiling GPS, latter I found that not sure why, the installing process of gnatcoll will install a copy of the gpr.gpr project file and related object file and source into its own directory structure with some modification to gpr.gpr and causing error on the project file. I have to manually remove all gpr related files and directories and entries in the manifests file. Then GPS will compile with correct project file.

GPS

After fixing the gprbuild, gpr and gnatcoll libraries, GPS compile without problem. When running GPS, it gave python script warning about pep8 and jedi, after install those two from SlackBuilds.org, everything is working fine.

Florist

No trouble when compile and install florist.

Asis

Asis has no problem to compile and install after fixed the gprbuild install path.

Gnatmem and Ahven

Gnatmem (need to compile the binutils for Slackware 14.2 and use the build tree) and Aheven gave no trouble when compiled for the 2016 version.

All build scripts are available at GitHub.

Friday, November 13, 2015

Running i3 under HiDPI display

I recently got a MacbookPro (early 2015) with retina display for work.  I installed a fresh Slackware64-current on to it with rEFInd as the boot loader.  The process was quite smooth, I used a USB boot image then network install (with a thunderbolt gigabyte adapter).  Some devices/functions are not fully functional but usable for me. Console font is using the kernel built in SUN12x22 font with kernel option "fbcon:font=SUN12x22".

Since this laptop has a 2560x1600 on a 13" display, roughly 227DI, my old setting for i3 did not work well, although I already using xft font for status bar display.  After a few search, I found out xorg server always set DPI 96, that is a bad move in my opinion, as it makes previous valid DPI calculation wrong and still wrong for those cases that the calculation do not fit.  And I have to add a line
xrandr --fbmm 286x179
in .xinitrc file in order to let i3 pick up the correct DPI setting.  OK, now the i3 status bar display fine.  The default dmenu I initially installed does not support xft font, so it looks really small.  Luckily there is a dmenu2 which merged the xft patched.  Remove the old dmenu package and install the dmenu2 package, then add the font parameter to the dmenu_run command in i3's config Latest dmenu works with xft font now. Everything works fine.

I have the following settings in my .Xresources file.
Xft.dpi : 227
Xft.antialias: false
Xft.rgba: rgb

URxvt.scrollstyle: xterm
URxvt.background: black
URxvt.foreground: gray
URxvt.preeditType: Root
URxvt.scrollBar_right: true
URxvt.jumpScroll: true
URxvt.perl-ext-common:  tabbed
URxvt.tabbed.tabbar-fg: 2
URxvt.tabbed.tabbar-bg: 0
URxvt.tabbed.tab-fg:    3
URxvt.tabbed.tab-bg:    0
URxvt.termName: rxvt
URxvt.geometry: 83x27
urxvt.font: xft:DejaVuSansMono:size=8

Xpdf*fontList: -adobe-helvetica-bold-r-normal--0-0-0-0-p-0-iso8859-1
Xpdf.initialZoom: 200

Xcursor.size: 64

With the following, the width should be $((11*COLUMNS+13)) pixels;
! in contrast, the fixed = 6x13 bitmap font is typically used on a
! low-definition screen, giving a width of $((6*COLUMNS+13)) pixels.
XTerm*faceName:  Monospace
XTerm*faceSize:  10
! For xterm menus. This font is large enough, but a bit ugly.
XTerm*font:  -adobe-helvetica-bold-r-normal--0-0-0-0-p-0-iso8859-1
My default terminal is rxvt-unicode, so it works fine. You may notice I have turn antialias off, the font looks sharp, you may see zigzag when looking really close, but for 227DPI, it's very clear without it already.  Most of the document on line regarding GTK+3's HiDPI support is by setting
export GDK_SCALE=2
export GDK_DPI_SCALE=05
I found the program behave a little strange when this kind of scaling in effect.  Font is a little blur than none scale one. For the Gnat Programing Studio (GPS), with the scaling effect, the menu display strangely:
compare with the one without scaling:
I am not sure whether its GTK3' fault or GPS's fault.  I would hope for a GDK_IMAGE_SCALE and only scale image, maybe that will work better.


P.S. After upgrade to kernel 4.4, all the special keys (fn+Fx) works as expected (with pommed-light)

Thursday, September 10, 2015

Building Ada programming environment with GCC 5 and GNAT GPL 2015

I would like to rebuild the Ada programming environment based on GCC 5 and GNAT GPL 2015 in Slackware64 14.1, as Ada 2012 support is more mature in GCC 5.

The FSF GCC compiler

At the writing, the latest release of GCC is 5.2.0.  First I update the build script to matched what's in the current tree.  I would to like to replace the stock Slackware64 14.1's compiler with the new one, but GCC changed the default standard C++ library ABI since 5.1.0.  To make it compatible with GCC 4, a configure switch (--with-default-libstdcxx-abi=gcc4-compatible) was added to the build script.  Also, I have changed the build directory to a fixed location to avoid the random location in the original script.  As it is needed for gnat_util build, a fixed location is easier for the script to find the right files.  I had problem on i586 platform, which I had to explicitly add the --disable-multilib switch to the configuration and remove the conditional test for it.  Built and install without problem.

P.S. Due to GPRBuild will look for GNAT's runtime library as libgnat-5.2.so in stead of libgnat-5.so, build script was modified to create the softlink when packaging the GNAT compiler.  Also created libgnarl-5.2.so from libgnarl-5.so

XMLAda

For XMLAda GPL 2015, the default build process is making use of gprbuild, which depends on XMLAda.  I followed what was done on Arch Linux and created a custom Makefile.SlackBuild.  But I installed the package with the following scheme, similar to what GNAT GPL 2015 is doing but with sub-directories for each sub-module:
 usr/include/xmlada
             |- input
             |- unicode
             ...
 usr/lib64/xmlada
           |- input
           |  |- static
           |  `- relocatable
           |- unicode
           |  |- static
           |  `- relocatable
           ...
The document build requires Sphinx, as SlackBuilds.org provides all necessary build scripts, it is a matter of installing the relevant packages and dependencies.

GPRBuild

The 2015 version of gprbuild required gprbuild itself.  So Similar to XMLAda, a custom Makefile was borrowed from the Arch Linux project and modified to suite the needs of Slackware.  My first build was without error, but it failed to build when trying it for gnat_uitl, complained about:
gnat_util.gpr:21:09: warning: no compiler specified for language "C", ignoring all its sources
gnat_util.gpr:21:09: warning: no compiler specified for language "Ada", ignoring all its sources
Further investigation showed that the default target for gprconfig was wrong, it was set to "Slackware" when generating gprconfig-sdefault.ads in my build script, due to not fully understand what it means.  After set it to "$ARCH-slackare-linux", it still failed on linking, looking for GNAT's runtime library libgnat-5.2.so, which does not exist for a standard GCC build, as it only has libgnat-5.so.  After created a soft link from libgnat-5.so, it builds and working.

GNAT_UTIL

The GNAT Util Library provides access to GNAT compiler internals for AdaCore utilities.  The latest release is 5.1.0, since there are no changes on Ada part of the GCC for 5.2.0, it is sufficient for us.  The build went well except for the initial gprbuild target problem.

GTKAda

GTKAda require Gtk+3 version after 3.8.3, the stock version in Slackware 14.1 is 3.8.2, need to upgrade to a latter version.  The version in Slackware current tree is too new, I settled on the latest 3.8 release 3.8.9 and rebuild the GTK+3 package.  The GL support is turned on for this version, but when building test program, it complained:
gtkada-gpl-2015-src/src/lib/gtkada_gl/static/libgtkada_gl.a(gdkgl.o): undefined reference to symbol 'XFree'
/usr/lib/libX11.so.6: error adding symbols: DSO missing from command line
After patching the testgtk.gpr with linker option to link with -lX11 -lm, it built and run fine.

Aunit

Aunit's build script needed to adapt to gprinstall command, other than that, it built smoothly.

GNATColl

GNATColl compiled OK, with minor problem with libgnarl-5.2.so.

GPS

The IDE compiler could be compiled now given all dependencies had been built.  The build did not go smoothly related to some xmlada library issues, back and forth a few times, finally got it compiled.  When running GPS, it gave python script warning about pep8 and jedi, after install those two from SlackBuilds.org, everything is working fine.

Florist

The florist library changed to use gprinstall, which breaks the install process.  After adjust the build script and patched the Makefile.in generated proper project file for used with others, it built and install fine.

Asis

Asis has little problem for installing to correct path, some patch needed to be re-do, after that, everything built and installed correctly.

Gnatmem and Ahven

Gnatmem gave no trouble when compiled for the 2015 version.  Ahven's 2.6 version changed the build process and I had to create a gpr file for it.  Other than that, there is no big problems.

Where are the build scripts

All build scripts are available at GitHub.

Wednesday, July 29, 2015

Setup guacamole server on Slackware

I encountered the need to access some ssh/telnet/vns server through a client-less HTML5 web app.

Gooling gave me the best product and it is free, the guacamole server.  Looking at the building requirement of it at, I found Slackware by default does not come with all the components needed.  Follow the build procedure in the document, I started with building guacamole-server.

Building guacamole-server

I tried to build all the dependency in except for PulseAudio.  After look through the supported list of needed libraries, FreeRDP, libssh2, have build script at SlackBuilds.org, and libtelnet does not.  After installed FreeRDP and libssh2, I wrote build script for libtelnet, it built and installed without problem.

After I had all the libraries installed, I downloaded the server code guacamole-server-0.9.7.tar.gz.  The package does not come with a ready to use configure command, and have to use autoreconf -fi to bootstrap it.  The configure failed for not finding OSSP UUID library.  Slackware already comes with a uuid library from the util-linux package and it is better than the OSSP one.  So I developed a patched to use the uuid library from util-linux and it works without problem.

Building guacamole-client

The guacamole-client needs to be run under a Java Servlet server.  Luckily, SlackBuilds.org has all I need.  After installed the latest jdk, apache-ant, commons-daemon, apache-tomcat with sbopkg, I had a tomcat server up and running.  I still need to configured /etc/tomcat/tomcat-users.xml to allow to to use the manager GUI. I added the following line to it (of course the user name and password are not the real one I am using ^_^):
<user password="manager" roles="manager-gui" username="manager">
</user>
Guacamole-client needs Apache Maven to build, and SlackBuilds.org has a script for maven.  After installed maven, and with the command mvn package guacamole-client was built and a war file was created in guacamole/target/guacamole-0.9.7.war.  I made it install to /usr/share/lib/guacamole/guacamole-0.9.7.war and had it symbolic links to /var/lib/tomcat/webapps/guacamole.war.  Now I could saw it from Tomcat's manger GUI, accessing it with url http://localhost:8080/guacamole I got a blank screen :(, that was not good.  I have the impression that it should be very easy to setup, now it failed on me.  After reading the documentation again, and again, I realized I failed to setup a user-mapping.xml in /etc/guacamole/.  After follow the example, voila! it showed me the login page, after logged in, I was presented with the entries I had setup earlier in user-mapping.xml.  Links with remote servers are working great!

I am preparing SlackBuilds.org scipts to submit, should not wait too long for them to show up.

Monday, May 4, 2015

Building Ada promgramming enviroment for Slackware

Slackware has finally upgraded the system GCC to 4.9.2 in current. Here I presented my work to compile GPS using FSF's GCC 4.9.2. It is based on my previous attempt to build the environment with GCC 4.7.0. This time lots of things have changed, new GCC and GNAT GPL released and they make the attempt much more easier than previous one. GCC 5.1 has just been released, but Slackware use 4.9.2 in the current branch for now, so we stick with 4.9.2.

The Compiler

There is no need to change the build script any more, but we need some of the compiler internal files. So run the standard build script for GCC.

XMLAda

For this one, I am using the xmlada-for-gps-6.0.1-src.tgz from GNAT GPL 2014, in stead of xmlada-gpl-2014-src.tar.gz. They are almost exactly the same with minor changes.

GPRbuild

I am using the gprbuild-gpl-2014-src.tar.gz. GPRbuild expected some support functions that are not in the FSF GNAT compiler. Namely the "GNAT.Rewrite_Data" package and some low level support functions in os_lib.c. I gather the missing functions from the GNAT GPL 2014 version and make up some packages for it. Then it builds without problem.

GNAT_UTIL

This GNAT Util Library provides access to GNAT compiler internals for AdaCore utilities. It makes the previous effort of trying to mimic what Debian do redundant. In the build script, the source and build directory of the GCC compiler needs to be specified for it to work correctly.
I am using the 4.9.1 one from the sourceforge project. For there is no 4.9.2 version and there are basically no differences for the generation of gnat_util.

GTKAda

With the standard gtkada-gpl-3.8.2-src.tgz, there is nothing special, it builds without problem. One may have to note that currently it does not support GL.

Aunit

Aunit GPL 2014 also builds without too much problem.

GNATcoll

GNATcoll compile without problem with some patches.

GPS

Oh, finally, we could build the IDE. It depends on pygobject3, which could be build using SlackBuilds.org's supply script.

Florist, ASIS, GNATMEM, Ahven

The rests are relatively easy and build fine with the build script. For gnatmem, we need to rebuild the binutils and specified the directory in gnatmem build script.

Other experimental scripts

I have tried to build the Ada-RM, GNAT RM, GNAT user guide to integrated with GPS, it seems working for me.

Where are the build scripts

All build scripts are available at GitHub.

Thursday, November 6, 2014

Run fcgiwrap with nginx under Slackware

I need to do some test on perl CGI scripts, but with NGINX server, it is not supported directly to run those CGI scripts.  Search around, there is this fcgiwrap tool.  It looks exactly like what I need for the simple test.

Fcgiwrap depends on fcgi library, which has a SlackBuild script.  I install the fcgi library with sbopkg, and proceed to write a SlackBuild script for fcgiwrap.  The fcgiwrap is a very simple program, it has only one C file for the main program.  But it needs a spawning parent to control it, the author provide a simple perl script (on the main page of the fcgirwap project.) to spawn the fcgiwrap program.  I also borrow the startup script from Nginx's FastCGI example and modified a little and name it rc.spawn-fcgi.  Both the scripts are included in the SlackBuild package that I have submitted.

After installing it, I add the following section into the server section of nginx.conf file:
  location ~ \.pl$ {
     root /var/www/cgi;
     try_files $uri =404;
            include        fastcgi_params;
     fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
     fastcgi_pass unix:/tmp/cgi.sock;
   }
After started the spawn-fcgi and reload nginx's config, the perl CGI works without problem.

Friday, April 4, 2014

A useful small tool - BASH History Suggest Box

One day, I was reading the updates from freecode.com. I noticed this small utility BASH History Suggest Box, it looks interesting from its screenshot:

I decided to give it a try. It is very useful, it reminds me the history window of 4DOS command line interpreter at the old DOS days.

I thought this tool is quite useful for some people, so I submitted the build scripts for my favorite Linux distribution Slackware to SlackBuilds.org. The build script is not yet shown up on the official SlackBuilds.org, you could not search it yet. It is just updated (2014-04-13), and you could now search from SlackBuilds.org or use sbopkg. You could still download the build script here.

P.S. There maybe segmentation fault on some system for the official 1.2.1 release, a patched from upstream git tree is included in the build script (sigseg.patch), if you are building for other system, you may need to apply the patch first before build.

P.P.S Updated to 1.3, and remove the unnecessary patch in the script. Should be in Willy's tree soon. Note the package name has changed from "hstr" to "hh".

Friday, February 21, 2014

A Slackware banner logo for rEFInd Boot Manager

The default rEFInd boot manager's logo causing the boot screen to have a white background, as rEFInd use the color of banner image's the top left corner pixel as its background color. I would like to have a black one, so I try to create a boot logo for it with a black background.
I would like to have a Slackware logo display on the boot screen, look at the the logos from "Slackware Banners, Logos, Propaganda" page, I like this one

But it is a little small and scaling it up does not look nice, I tried to vectorized it with Potrace but the result does not look good. Searching around for the font use in the image, and found out it is computer modern typewriter text. There is this project Computer Modern Unicode fonts that has the computer modern font converted from Khuth's famous TeX fonts. Now I need to use a vector drawing program, I know inkscape could do it, and proceed to install it and all its dependencies with the help of sbopkg. The installation went well.
Here is the result:

The svg source could be downloaded here.

There is a SlackBuild script for rEFInd now. The logo's png and svg source are included in the build script.

Enjoy ^_^

Monday, February 17, 2014

Install Slackware64 14.1 on a MacBook Pro 5.2

The MacBook feels its ages after upgrading to OS X Mavericks‎, it is slow and I really don't have a usage of the OS X itself. So I start my journey to install my favorite Slackware to it.

There are a few helpful sites that describe the installation of Linux on a MacBook:

Disk Partition

There are some problems that I encounter that is quite unique to this machine. I shrank the OS X partition and created a new 40G FAT partition and boot up the newly burned Slackware64 14.1 DVD. It could not boot using EFI mode, and fallback to the legacy BIOS boot mode.

After boot up, I partition the disk using cgdisk, remove the FAT partition and recreate one for Linux. An interesting thing shows up, after selected my target / partition and the ESP, it ask me whether to include an MSDOS partition to be mounted, with the same device number of my main Linux partition. I ignored it, and proceed to install the "A" and "AP" part only. Then when come to install Lilo, it stucks forever without progress. Google around, does not show any direct related problem. Then I found some mentioning of gpartsync tool, it seems in rEFInd (which I chose as my boot manager), there is one included name "gptsync_x64.efi", turn it on from the config and reboot, it does not work for me. Then I reboot into Linux with the DVD and use fdisk, Och, there is a FAT partition there. To play safe, I repartition the disk again in OS X and redo the installation with both GPT and MBR table matched, it seems fine, except it prompt me with 2 identical Linux partitions for my root mount point, I chose one and ignored the other and proceed. Lilo still complaining about config problem about append command, then I remove the append line use standard text mode only. It finally installed. There must be something wrong for what I have done for the partition, but I don't want to experiment and re-install again.

Booting Up

Since the stock kernel has EFI stub build in, I copy the huge kernel to the EFI/slackware64 and create a refind_linux.conf manually

"Boot with defaults"         "root=/dev/sda4 ro"
I hope rEFInd could pick it up and boot me into Linux directly from EFI. I restart the box, the rEFInd boot manager has the Linux choice show up, boot it, kernel complains about conflicting frame buffer driver between EFI VGA and nouveau and stops. I think it should be able to resolve it with the extra parameter "video=efifb"

I reboot and boot the Linux with BIOS mode and Lilo bring up the system. But I only have one CPU show up, it seems this is a known problem. I install the the rest packages from D, X, XAP, N, L, KDE, TCL, XFCE, Y, etc. Then download the 3.10.20 kernel source and config it to use nouveau driver only for frame buffer. It boots up fine and now I have the two CPU cores available.

There is a long delay (around 30 to 40 seconds) before rEFInd show its menu. This seems a known problem on certain MacBook. I tried the clearing the NVRAM entries method first, but it did not work for me. Then I tried using the fallback filename method, rename EFI/refind to EFI/BOOT and rename refind_x64.efi to bootx64.efi. It seems work, I now got around 6 seconds of delay. Not sure if that is normal, but at least its bearable.

Nouveau and X.org

X does not work, it said DRM is not working. I download the latest binary driver from nvidia, and it seems working fine, except after exit from X.org, I got an black screen and has to blind type commands to shutdown the machine. At system boot, I use efifb for the frame buffer driver. It seems it is a common problem, fellow slackers have the same problem "Cannot access TTYs after installing nvidia drivers on macbook pro".

The touch pad respond badly, almost like not working, google around, it seems the default setting of synaptics does not work well, I ended up with this settings under /usr/share/X11/xorg.conf.d/50-synaptics.conf

Section "InputClass"
 Identifier "touchpad"
 Driver "synaptics"
 MatchDevicePath "/dev/input/event*"
 MatchIsTouchpad "on"
 Option "FingerLow" "10"
 Option "FingerHigh" "20"
 Option "TapButton1" "1"
 Option "TapButton2" "2"
 Option "MinSpeed" "0.65"
 Option "MaxSpeed" "0.85"
 Option "TapButton3" "3"
 Option "VertTwoFingerScroll" "true"
EndSection
MinSpeed of 1 is still too fast when accessing some small links, 0.65 seems reasonable for me.

To handle the hotkeys, I used pommed-light, after a few tweak, I got it compile and running, the sound volume control works. Others are still testing.

Annoying things of the system

The iSight built-in web-cam does not work. At first, the system does not recognize the device at all, listing the usb device as some kind of development board. Even booting back to OS X does not recognize the webcam anymore. Using solution in {CODIUM();}, I manage to get the iSight webcam recognized correctly again under OS X and under Linux, lsusb recognize the device as iSight, but no luck getting it working. I don't really making use of it, so it is not a very big problem for me.

The bootup sound before the boot manger is really annoying, looking around the web, seems there are lots of people complaining. I follow the advice from MacTrast, and tried the 3 methods: overwrite the nvram settings, install a control application to mute the bootup sound, and mute the sound device before power off. Mute the sound before poweroff/reboot does not work too well and it seems does not work from Linux. Set the nvram value to 0 or 80 does not work either. The StartNinja apps seems to work first, but then I drained my battery completely and lost the setting, and I thought it did not work until I try the 2nd time, consider working.

Wednesday, September 11, 2013

Redshift to get some relief for your eyes

I am working in front of computer all day long, and looking at the bright screen hurt my eyes.  I was relied on the plugin ToggleDocumentColors to give me a grey background and black text with browser.  But it does not look good on some web sites and it only works on browser.  Then I came across this Redshift program, and it has a SlackBuilds.org script.  After installing it with sbopkg, found my latitude and longitude and fire up the program, instantly I could feel the stress of my eyes are reduced.

It may take sometime to get used to it as the color on the screen has a little reddish tone.  Unless you are working on graphics or color sensitive work, normal interaction with the web site or application has no problem at all and your eyes got some relief.  Since the discovery of this little tool, I have installed it to all my systems.

It has an GUI front end gtk-redshift that comes with the package.  It will display an icon on your system tray area, allow you to toggle it by a single click.

Highly recommend this little tool to anyone that need to work in front of computers.

Wednesday, July 10, 2013

gvim and i3 not playing too well together

It seems gvim is not playing nicely with tiling manager.  I encountered this bug.

It seems I am not alone with this problem.  To maximize and restore the window each time doesn't seem to be a good workaround.  The workaround I used are from the stackexchange, add the following line into my .vimrc:

set showtabline=2
It always display the tab bar.  Although it wastes some spaces, it gives me a proper displayed window.

Thursday, July 4, 2013

Old PC with a new life in Slackware

One of my home PC died (HP Pavilion Media Center m8530f), and not seeing a great need for a new one, I found my wife's old PC laying in the garage.  It is a brand-less PC with an Asus motherboard P5VDC-MX (an old revision with only 2 RAM slots) couple with Pentium 4 (64-bit enbaled), 1G of DDR RAM, CD-writer and floppy drive!  Oh, it has SATA support also.  That is good as I could reuse the SATA components from the HP PC.  It has been collecting dust for years in the garage, and I was afraid whether it could still boot. 

After cleanup the dust and power up, it run without much problem, its BIOS battery run out, replaced it with the one from the HP PC.  I installed the DVD, multi-card reader and hard drive from the HP PC into this old board. It seems I could not use both IDE channel when SATA is in used (long time to boot and hard drive is not recognize correctly).  I have to disconnect the second IDE channel and have both old IDE drives on the first channel.  Then it boots up fine, even with my previous custom made kernel for the the HP PC.  The on board VGA is too weak, and I solicited an old ATI radeon 9200 SE AGP card from my friend.

After installed everything, I recompiled the kernel to match what I had on the PC, and almost everything work except for the sound.  I always got something like:

hda_intel: azx_get_response timeout, switching to polling mode: last cmd=0x12345678
testing with aplay gave the speaker repeating tone.  After searching the net and consult the documents in kernel source, it seems switching to polling mode is not a serious problem at first glance.  But I don't think it is right. Setting probe_mask=1 for the snd_hda_intel module gave no help.  Then I recompiled the module with debug turn on and I saw lines indicate it has MSI turned on, after setting "enable_msi=0" to off, sound is working.

The display has some minor problem, in console, the text is quite dim and it will become dimmer if running after a mc instance.  One thing is strange that if I highlight a few lines in the console with mouse, the brightness of the text will increase depends on how much line I have highlighted.  In X, I have the same problem if I have an xterm on full screen, it will become dimmer, if I have a relatively bright window opened next to it, it will be fine.  Well it is an old PC and usable, so I don't complaint too much ^_^

P.S. when compiling kernel, I feel the age of this PC ^_^ it took almost an hour.  Running Slackware64 14.0 on this old one.

P.P.S. it seems my problem of dim text in console has gone away, it maybe related to the old radeon card/mainboard hasn't been use for years, after a few days of usage, it seems back to normal.

Friday, June 28, 2013

3 days using i3 tiling window manager under Slackware

I have heard about tiling window manager for some time, but lack the initiative to test one.  Recently I finally got fed up with resizing two windows side by side and decided to give titling manager a test.

After some research from the web, I settled on i3 tiling window manager for its simplicity.  With the help from SlackBuilds, I got the window manager installed and run without hassle (I did recompile the cairo with xcb support (from current) and use the latest i3 release version 4.5.1).

It took me a while to get familiar with the key bindings.  Thanks for the good documentation, I got used to it quickly and customized the configuration to suite my own needs.  No longer do I need to fight with the mouse to place the window to gain the last pixel.  Wow, I wish I should try it earlier.  It just simply awesome! Oh, and awesome is another good tiling window manager too ^_^.

I have used various window mangers and DE during the years of using Slackware.  From the beginning, it was fvwm, fvwm2, IceWM, window maker, GNOME, KDE, XFCE, LXDE, blackbox, EDE, E16, E17, fluxbox.  Now I am simply sold to the tiling manager and won't go back to the normal one.

Thursday, June 13, 2013

Problem with wireshark 1.10.0 in Slackware 14

I just tried to compile wireshark 1.10.0 under Slackware64 14.0, using the build script from SBo.

It compiled fine, but running with segmentation fault.  It seems wireshark itself try to use libnl3 but libpcap in Slackwre is using libnl (version 1).  After adding configuration "--with-libnl=1" to force wireshark to use version 1 of libnl, it does not crash anymore.

But it did not use gnutls, it seems the version (3.0.23) in Slackware is too old, it required at least 3.1.10.  Currently, the latest stable version is 3.2.1, but it requires update nettle to 2.7 also.  I ended up update the gnutls lib to 3.1.12 to compile wireshark with tls support.

It seems Slackware-current does not update gnutls library yet, hope next version of Slackware could update the gnutls version to a newer one.

PS. seems nettle 2.7.1/gnutls 3.2.1/wireshark 1.10.0 works fine after I recompiled the 3 packages.

Wednesday, December 5, 2012

GNU indent regression with --blank-lines-after-declarations in 2.2.10

The GNU indent program includes in Slackware 14 has a regression bug.

After searching, it seems there is an unofficial release 2.2.11, which could be located from Debian source.  The release fixed the problem.

After downloaded the source from the above URL and also the Debian tar ball (indent_2.2.11.orig.tar.gz was gunziped, renamed to indent-2.2.11.tar then xzed).  Slackware's official build script was downloaded also.  It was modified to compile the newer version and include patches from Debian:


#!/bin/sh

# Copyright 2008, 2009, 2010  Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
#
#  THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
#  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
#  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
#  EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
#  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
#  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
#  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
#  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
#  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
#  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


VERSION=${VERSION:-2.2.11}
BUILD=${BUILD:-1}

# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
  case "$( uname -m )" in
    i?86) export ARCH=i486 ;;
    arm*) export ARCH=arm ;;
    # Unless $ARCH is already set, use uname -m for all other archs:
       *) export ARCH=$( uname -m ) ;;
  esac
fi

if [ "$ARCH" = "i486" ]; then
  SLKCFLAGS="-O2 -march=i486 -mtune=i686"
elif [ "$ARCH" = "i686" ]; then
  SLKCFLAGS="-O2 -march=i686 -mtune=i686"
elif [ "$ARCH" = "s390" ]; then
  SLKCFLAGS="-O2"
elif [ "$ARCH" = "x86_64" ]; then
  SLKCFLAGS="-O2 -fPIC"
else
  SLKCFLAGS="-O2"
fi

NUMJOBS=${NUMJOBS:-" -j7 "}

CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-indent
rm -rf $PKG
mkdir -p $TMP $PKG

cd $TMP
rm -rf indent-$VERSION
tar xvf $CWD/indent-$VERSION.tar.xz || exit 1
cd indent-$VERSION
chown -R root:root .
find . \
  \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
  -exec chmod 755 {} \; -o \
  \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
  -exec chmod 644 {} \;

# GCC4 fix
#sed -i -e 's#extern FILE \*output#static FILE *output#' src/indent.h || exit 1

#apply patches from Debian 
for file in $CWD/patches/* ; do
    patch -p1 < $file
done

CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
  --prefix=/usr \
  --sysconfdir=/etc \
  --localstatedir=/var \
  --mandir=/usr/man \
  --infodir=/usr/info \
  --build=$ARCH-slackware-linux

make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG

# I'm not sure why this man page fails, but...
if find $PKG -type f -size 0c -name indent.1 ; then
  ( cd man
    ./texinfo2man ./indent.1.in ./../doc/indent.texinfo > indent.1
    cat indent.1 > $PKG/usr/man/man1/indent.1
  )
fi

# Strip binaries and libraries:
find $PKG | xargs file | grep -e "executable" -e "shared object" \
  | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null

# Compress man pages:
( cd $PKG/usr/man
  find . -type f -exec gzip -9 {} \;
  for i in $( find . -type l ) ; do
    ln -s $( readlink $i ).gz $i.gz ; rm $i
  done
)

# Compress info pages and remove the package's dir file:
rm -f $PKG/usr/info/dir
gzip -9 $PKG/usr/info/*.info*

# Copy program documentation into the package:
mkdir -p $PKG/usr/doc/indent-$VERSION
cp -a \
  AUTHORS COPYING* NEWS README \
  $PKG/usr/doc/indent-$VERSION
chmod 644 $PKG/usr/doc/indent-$VERSION/*

mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc

# Build the package:
cd $PKG
/sbin/makepkg -l y -c n $TMP/indent-$VERSION-$ARCH-$BUILD.txz

As I have installed texlive 2012 in stead of tetex from the stock Slackware, the newer version of texi2html program does not support the -number option anymore, it has changed to two separate options --number-footnotes and --number-sections.

A patched is developed for it to compile with the new texi2html:

--- indent-2.2.11/doc/Makefile.in 2010-01-31 08:25:21.000000000 -0800
+++ indent-2.2.11.new/doc/Makefile.in 2012-12-05 11:40:30.130229271 -0800
@@ -663,14 +663,14 @@
 html-split: @PACKAGE@_toc.html
 
 @PACKAGE@.html: version.texi $(@PACKAGE@_TEXINFOS)
- $(TEXI2HTML) -expandinfo -number -monolithic `if test -f @PACKAGE@.texinfo; then echo @PACKAGE@.texinfo; else echo $(srcdir)/@PACKAGE@.texinfo; fi`
+ $(TEXI2HTML) -expandinfo --number-sections --number-footnotes -monolithic `if test -f @PACKAGE@.texinfo; then echo @PACKAGE@.texinfo; else echo $(srcdir)/@PACKAGE@.texinfo; fi`
 
 @PACKAGE@_toc.html: version.texi $(@PACKAGE@_TEXINFOS)
  case "$(TEXI2HTML)" in \
    *"/missing texi2html") \
-      $(TEXI2HTML) -expand info -number -nomenu -split section `if test -f @PACKAGE@.texinfo; then echo @PACKAGE@.texinfo; else echo $(srcdir)/@PACKAGE@.texinfo; fi` || exit 0 ;; \
+      $(TEXI2HTML) -expand info --number-sections --number-footnotes -nomenu -split section `if test -f @PACKAGE@.texinfo; then echo @PACKAGE@.texinfo; else echo $(srcdir)/@PACKAGE@.texinfo; fi` || exit 0 ;; \
    *) $(RM) @PACKAGE@_*.html ; \
-      $(TEXI2HTML) -expand info -number -nomenu -split section `if test -f @PACKAGE@.texinfo; then echo @PACKAGE@.texinfo; else echo $(srcdir)/@PACKAGE@.texinfo; fi` ;; \
+      $(TEXI2HTML) -expand info --number-sections --number-footnotes -nomenu -split section `if test -f @PACKAGE@.texinfo; then echo @PACKAGE@.texinfo; else echo $(srcdir)/@PACKAGE@.texinfo; fi` ;; \
  esac
 
 install-html-monolithic: @PACKAGE@.html

The compilation went smoothly after applying all the patches and the regression is fixed.