CentOS 6 display driver issues

Posted in Technical on May 18th, 2013 by iyoung – Be the first to comment

Recently after performing a Kernel update my CentOS machine refused to boot. Stopping while “starting jexec services”.

Firstly to get started on the fix you need to be able to boot, so if you restart the machine and at the Grub loader, press ‘e’ to edit your default linux boot option. You then move down to the kernel line and again press ‘e’ to edit. After it says quiet add a 3, this tells the kernel to boot into init 3, no graphical interface.

Once this is done, press enter to save, then press ‘b’ to boot. The machine will boot but to the commandline. From here log in, and then move your XOrg config file out of it’s normal directory to for example /home/yourusername/.

you can then restart your machine with

shutdown -r “now”

the machine will now boot but without hardware acceleration for the graphics.

Once this is done you can then download the latest version of your display driver. For me on a 64 bit machine running an NVidia 8600 GT that was, http://www.nvidia.com/object/linux-display-amd64-304.88-driver.html

Then change the permissions of the download .run file with chmod u+x so you can execute it from the commandline.

As root, open a terminal and run init 3 to drop to the commandline. Then move to the location of the downloaded driver and run it with ./NVIDIAXXXX.run.

Complete all the questions in the set up and I personally chose not to install the 32bit OpenGL compatibility.

Once this is all complete you can restart again and you will notice your res is clearer but if you have multiple monitors it will only be running on one.

Once logged in you can open the NVidia X Server settings GUI and you will see your multiple displays, for me I had to swap them around and explicitly set one to have a position of “Left of” the other screen.

Once done, save the conf, if it wont let you get it to show details, copy the contents then as root save that into your /etc/X11/xorg.conf file then you should be done.


Trial Press Association Gallery

Posted in Uncategorized on March 21st, 2013 by iyoung – Be the first to comment


CPAN download but dont install

Posted in Technical on March 4th, 2013 by iyoung – Be the first to comment

Just a small post about CPAN, if you’ve found you have a server which you don’t want or can’t run CPAN directly on and want to just download the tar of the package you want to install on another machine you can do the following.

On the machine with CPAN access

cpan

get URI::Escape

It will then download and show you where the tar has been downloaded to in the console e.g.

/root/.cpan/sources/authors/id/G/GA/GAAS/URI-1.60.tar.gz ok

Which can then be copied over to the target server and installed.


SWF preview generation

Posted in Technical on February 7th, 2013 by iyoung – 1 Comment

Today I was writing a web service which accepts Flash Shockwave files and needs to store the file, extract it’s textual metadata, index it, generate an XML representation of the metadata then generate preview and thumbnail image representations of the file.

I found some very patchy help online with lots of video nerds bickering with scripters so thought I would outline my pretty simple solution. Firstly to extract the textual metadata about the SWF, I am using Mod Perl, and the brilliant Image::ExifTool module available from CPAN.

Secondly to generate the XML I am just using the standard XML::Writer module along with my own library for creating the DOM for my particular flavour of XML.

Finally to generate the preview images of the SWF files I downloaded and installed swftools on the server. You can download the tar gz from http://www.swftools.org/swftools-0.9.2.tar.gz once downloaded and extracted, run configure, then make and before you run make install, go into the swfs folder within there is MakeFile and MakeFile.in open those, there are a couple of lines in each that run the rm command, they also have -o -L in the line, remove the -o and -L from each and save.

This was an oversight when the tool was packaged and stops it from installing. Once that correction is made you can run make install as root.

Test all was ok by running swfrender against an swf file, e.g. swfrender myfile.swf the result will be a new file in the same folder called output.png, this is the preview snapshot of the swf file which you can use on your website to represent the uploaded swf.

Finally you can use image magick to convert the png into a jpeg.


EPSON – XP-202 WiFi Scanner / Printer

Posted in Technical on December 15th, 2012 by iyoung – 1 Comment

I bought a new, quite cheap, wireless printer / scanner all in one today. A Epson XP-202  really pleased with the sub £50 price tag and so far the performance has been brilliant, 30 pages a minute, nice crisp colour and a great little scanner.

The only downsides so far have been that it requires a USB cable in order to set up and does not include one in the box, this is one of the USB cables with the thicker more firewire looking end on the printer side.

The other slight issue I had was connecting to the scanner part via the network. The printer part set up perfectly fine and worked on the wireless right after set up was complete.

For the scanner, if you are having issues connecting, the first thing you need to do is log on to your router, and click DHCP, you will see two or more IP addresses assigned, one of these has a host name starting with EPSON, make a note of it’s IP address. (On my router I was able to set a static IP for the device which I would recommend).

You then need to go to the EPSON scan settings which is under the EPSON folder in your programs, then you need to delete the scanner it has there and click add to add a new one. Filling in a name of your choice and the IP address noted in the above. Click test and you should see a successful connection.


Mod Perl – Image Magick problems

Posted in Technical on December 5th, 2012 by iyoung – Be the first to comment

I came across an odd issue today, in that I had installed ImageMagick on a server as root, this was via Yum. When I ran the following command as root, I saw no errors and all was as expected:

perl -e ‘use Image::Magick;’

When I switched to the user account under which Apache runs for my Mod Perl application, the command above resulted in:

Can’t load ‘/usr/local/lib64/perl5/auto/Image/Magick/Magick.so’ for module Image::Magick: libMagickCore.so.5: cannot open shared object file: No such file or directory at /usr/lib64/perl5/DynaLoader.pm line 200.
at -e line 0
Compilation failed in require.
BEGIN failed–compilation aborted.
&Image::Magick::constant not defined. The required ImageMagick libraries are not installed or not installed properly.
END failed–call queue aborted.

I used the command ‘ldd’ to check the dependencies for the aforementioned Magick.so shared library and for root I saw the correct long list, for the apache user I saw the following:

ldd /usr/local/lib64/perl5/auto/Image/Magick/Magick.so

linux-vdso.so.1 =>  (0x00007fffeb1ff000)
libMagickCore.so.5 => not found
libm.so.6 => /lib64/libm.so.6 (0x00007f3e3fc27000)
libc.so.6 => /lib64/libc.so.6 (0x00007f3e3f895000)
/lib64/ld-linux-x86-64.so.2 (0x0000003955a00000)

I looked at the location for libMagickCore.so.5 in the output for root and then copied the file into /lib64/ and re-ran the ldd command above and got:

libMagickCore.so.5 => /lib64/libMagickCore.so.5 (0x00007f4b22236000)
libm.so.6 => /lib64/libm.so.6 (0x00007f4b21fb1000)
libc.so.6 => /lib64/libc.so.6 (0x00007f4b21c1f000)
liblcms.so.1 => /usr/lib64/liblcms.so.1 (0x00007f4b219d7000)
libtiff.so.3 => /usr/lib64/libtiff.so.3 (0x00007f4b21772000)
libfreetype.so.6 => /usr/lib64/libfreetype.so.6 (0x00007f4b214d5000)
libjasper.so.1 => /usr/lib64/libjasper.so.1 (0x00007f4b2127c000)
libjpeg.so.62 => /usr/lib64/libjpeg.so.62 (0x00007f4b21057000)
libXext.so.6 => /usr/lib64/libXext.so.6 (0x00007f4b20e45000)
libXt.so.6 => /usr/lib64/libXt.so.6 (0x00007f4b20be0000)
libSM.so.6 => /usr/lib64/libSM.so.6 (0x00007f4b209d7000)
libICE.so.6 => /usr/lib64/libICE.so.6 (0x00007f4b207bb000)
libX11.so.6 => /usr/lib64/libX11.so.6 (0x00007f4b2047c000)
libbz2.so.1 => /lib64/libbz2.so.1 (0x00007f4b2026a000)
libxml2.so.2 => /usr/lib64/libxml2.so.2 (0x00007f4b1ff19000)
libz.so.1 => /lib64/libz.so.1 (0x00007f4b1fd03000)
libgomp.so.1 => /usr/lib64/libgomp.so.1 (0x00007f4b1faf5000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f4b1f8d8000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f4b1f6d4000)
/lib64/ld-linux-x86-64.so.2 (0x0000003955a00000)
libuuid.so.1 => /lib64/libuuid.so.1 (0x00007f4b1f4cf000)
libxcb.so.1 => /usr/lib64/libxcb.so.1 (0x00007f4b1f2b4000)
librt.so.1 => /lib64/librt.so.1 (0x00007f4b1f0ab000)
libXau.so.6 => /usr/lib64/libXau.so.6 (0x00007f4b1eea8000)

After this, Image Magick loaded correctly for the apache user. An alternative to this would be to use lddconfig to add the path to the missing file for the apache user, in my case it had been placed in an odd location so wasn’t appropriate.


Freedom

Posted in Biking, Films, Photography, Travel on November 23rd, 2012 by iyoung – Be the first to comment

Well yet again it seems I have not posted for a very long time. So much going on at work with new technologies that I am learning and massive restructuring as well as an office move!

Anyway, I’m starting to feel I should really devote a bit more time to things which are creative in the classical sense, try to find a real direction for my photography or something new. Starting to feel programming is certainly shifting a lot more towards the purely scientific / engineering and away from the creative as patterns are followed to the letter and enforced through ever increasing layers of frameworks.

Luckily however I have had the chance to work on a great project recently regarding video production, which in turn encouraged me to look into what people were doing out there now, creatively, with access to great video editing tools, cameras and sites such as Vimeo / Youtube.

I found the following short film rather uplifting and I think the more I work in an industry ever increasing in conformity, very appealing.

It’s Better In The Wind – Short Film from Scott Toepfer on Vimeo.


Tortoise SVN – High IO

Posted in Technical on June 27th, 2012 by iyoung – Be the first to comment

Tortoise subversion control can sometimes get a bit carried away with it’s caching, so change the folowing to calm it down.

  • Open the settings, click “Icon Overlays”
  • In the exclude paths type C:\*
  • In the include paths type the path to your code workspace

That is all, then kill the Tortoise SVN cache process, when it restarts it will be less crazed.


JQuery Date Picker Z-Index

Posted in Technical on June 25th, 2012 by iyoung – Be the first to comment

Just a quick little geeky post in case it helps someone. I spent quite a few minutes if not an hour this morning trying to figure out why some J-Query calendars I was using were appearing under some of the other form elements. Apparently the default Z-Index of the calendar’s parent DIV boxes are set to -10.

I know the maximum z-index of the elements on my page so I was able to increase the Z-index in the CSS for the calendars, but one thing that vexed me was the !important keyword. Apparently if you don’t use it it is just ignored.

Here’s an example you could use to make the standard JQuery Date Picker calendars look more acceptable: -

#ui-datepicker-div
{
    font-size: 62.5%;
    width: 17em; 
    padding: .2em .2em 0; 
    z-index:20 !important;
}

Open Office 3.x

Posted in Technical on June 18th, 2012 by iyoung – Be the first to comment

If you have a problem loading Open Office after performing an update or installing after following http://www.openoffice.org/download/common/instructions.html move the user profile from ~/.openoffice.org to another name and then try re-loading. This worked for me after upgrading to 3.4 my copy was freezing on the splash screen in RHEL 6.