Linux

Installing Matlab R2020a on Fedora 32

Installing Matlab R2020a on Fedora 32

In which I need to slightly circumvent the normal installation…

For work purposes I’m currently dual booting into Linux. There will be a post about the reasons why at some point soon. Fedora 32 is excellent but I have found some occasional issues where software I need to install doesn’t quite work out of the box. MATLAB was one such program so here’s how to get it working.

Proper Gradients for MetaPost Pulse Sequences

Proper Gradients for MetaPost Pulse Sequences

In which I improve upon the previous post...

In yesterday's post I talked about using MetaPost to generate Pulse Sequence Diagrams for MRI documents. I have been using this to make nice diagrams for my Thesis. There is one problem, however, with the pulse sequence file provided on Mark's website - it generates square gradients.

Pulse Sequence Diagrams Using Metapost

Pulse Sequence Diagrams Using Metapost

In which I use MetaPost to generate publication quality pulse sequence diagrams...

Pulse sequences are the series of radio-frequency pulses required to generate an MR image. If you are an MR Physicist you will see these a lot and probably wondered how can I generate nice pulse sequences for my thesis, papers etc. Well handily using MetaPost and these files you can!

AjaXplorer on FreeNAS 8.3

AjaXplorer on FreeNAS 8.3

In which I set-up a nice web GUI for my home server...

So I recently invested in a HP ProLiant MicroServer N54L to backup my PC to. Also it should be quite useful as a media server etc. I've installed FreeNAS as my OS but wanted to have a easy-to-use Web interface for accessing my files over my Network. I followed the guide here: http://forums.freenas.org/threads/howto-ajaxplorer-with-nginx-in-plugin-jail-mysql-optional-webdav.10297/ but a few things need changing as always.

Steam on (Gentoo) Linux

Steam on (Gentoo) Linux

In which I install Steam on Linux...

Steam is now officially supported on Linux! I decided to try it out.

Hold your horses!

Firstly - there are only 78 games supported* at the moment. So just be aware some of your faves might not be there yet.

Secondly - if you are running an Nvidia card you need to have x11-drivers/nvidia-drivers version 304.4 or higher installed. Steam will install but it won't get past login if you don't do this. You can solve this on Gentoo quite simply:

  • emerge x11-drivers/nvidia-drivers -avuDN

Installing QT Creator

In which I setup an IDE for my coding...

As with most of my Tinker posts to do with computers this is a guide to something I might need to do again in the future. You can probably find out how to do it online but I struggled with bits and am putting it here for my own and other's reference.

I am currently demonstrating a C++ lab at the University and it's good to be able to run the example code myself ahead of time. Also I am continuing to teach myself C++ as part of Project Euler.

Project Euler

In which I get back into coding in C...

I did a programming course* during my undergrad but it's fallen by the wayside recently. In an effort to improve my coding skills, and my understanding of maths, I have started on Project Euler.

*I took two actually but only had time for the coursework in one - I might upload my program for it later.

Project Euler

Project Euler (http://projecteuler.net/) is a website which sets maths problems and asks you to solve them with programming. There are currently 410 problems for you to solve.

They usually give an example or two and then ask for a harder calculation. Par example, the 6th prime number is 13 - now find the 15,000th.

This has been very helpful for re-learning my coding skills. You have to break down the maths problem into steps and then work out how the hell you would code that. Also it's fun and challenging!

ImageJ and Volume Measurement

In which I describe the complexities of analysing 3D images...

3D image analysis just seems to be one of those things that is harder to do than I'd like it to be.

Before starting it is worth pointing out that with MRI you can acquire volumes in two ways - traditional 2D with multiple slices or a 3D scan. As far as this blog post is concerned these are the same.*

A common measure in clinical MRI is the volume of an organ or part of an organ. After all when someone has brain cancer - "How big is the tumour?" can be a very important question. Here are my experiences of trying to measure volumes on MRI images.

*There are differences between these two methods of acquisition but that would require a whole blog post on it's own.

(Just over) A fortnight of Windows 8

In which I review the Windows 8 experience so far...

So I installed Windows 8 about two and a half weeks ago. In brief - it's a slightly improved version of Windows 7 with a few quirks and a start-up screen that require getting used to. In more detail:

I have a GUI

So following my post earlier today I now have a working xorg.conf and KDE 4.8.3 is running smoothly. Turns out there is an easy to use utility called nvidia-xconfig which I had overlooked and did the job perfectly. Also importantly I now have Chromium (Chrome for Linux if you didn't know) installed :) Time to start tinkering!

KDE 4.8.3 – looking good

I've provided my xorg.conf here in-case it is useful to anyone. This works with a Nvidia GTS 450 linked by HDMI to a Panasonic 42" TX-P42U30B Plasma TV:

# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig: version 295.71 (buildmeister@swio-display-x86-rhel47-04.nvidia.com) Thu Aug 2 20:28:32 PDT 2012

Section "ServerLayout"
Identifier "Layout0"
Screen 0 "Screen0" 0 0
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
EndSection

Section "Module"
Load "glx"
EndSection

Section "InputDevice" 
# generated from data in "/etc/conf.d/gpm"
Identifier "Mouse0" Driver "mouse"
Option "Protocol"
Option "Device" "/dev/input/mice"
Option "Emulate3Buttons" "no"
Option "ZAxisMapping" "4 5" 
EndSection

Section "InputDevice"
Identifier "Keyboard0"
Driver "kbd"
EndSection

Section "Modes"
Identifier "Modes0"
ModeLine "1920x1080@60" 182.28 1920 1952 2640 2672 1080 1102 1113 1135
EndSection

Section "Monitor"
Identifier "Monitor0"
VendorName "Unkown"
ModelName "Unknown"
UseModes "Modes0"
HorizSync 28.0 - 33.0
VertRefresh 43.0 - 72.0
EndSection

Section "Device"
Identifier "GTS450"
Driver "nvidia"
VendorName "NVIDIA Corporation"
EndSection

Section "Screen"
Identifier "Screen0"
Device "GTS450"
Monitor "Monitor0"
DefaultDepth 24
Option "ConnectedMonitor" "DEP-0"
Option "DPMS" "false"
SubSection "Display"
Depth 24
EndSubSection
EndSection

Tom out!

Gentoo 64-bit

So guess what I was up to last night - yes that's right, installing Gentoo.

This was my first time installing Gentoo on 64-bit architecture - the important specs are below:

  • Intel Core i7 2600k Processor (Sandy Bridge - important later)

  • 8 GB DDR3 RAM

  • Asus P8Z68-V PRO/GEN3 Motherboard

  • 250 GB HDD (well 250 GB partition out of the 4 TB in my machine)

  • Nvidia GeForce GTS 450 GPU

  • Blu-Ray recorder drive

Also worth noting that this is a dual boot with Windows 7.

[WARNING - If you're not interested in Linux or computer geekery I expect you will find the rest of this post boring]

I followed the Gentoo documentation found here: http://www.gentoo.org/doc/en/handbook/ I will be noting any differences between that guide and my install here.

Choosing the Right Installation Medium

I downloaded the LiveCD and used that as my initial Linux environment for installing from.

Configuring your Network

All done through DHCP.

Preparing the Disks

I used the standard layout of boot, swap and root partitions but on /dev/sdb2 to /dev/sdb4 because of my dual booting. I set my swap partition to 20 GB following advice I found online. Then annoyingly the LiveCD made me reboot in order to write the changes. The I used the standard filesystems.

Installing the Gentoo Installation Files

The -march option in CFLAGS needs to be native or corei7-avx because of the Sandy Bridge architecture. I used MAKEOPTS="-j5" as it's a quad core processor.

Installing the Gentoo Base System

I selected the default amd64 profile. I set up my USE flags with KDE in mind so -gnome and -gtk were used. I also added the bluray flag.

Configuring the Kernel

I mostly followed the guide but later I had to come back and recompile without some Nvidia options: http://www.gentoo.org/doc/en/nvidia-guide.xml#doc_chap3

Configuring your System

I always set my hostname to be the name of a famous fictional computer - this time I went for Ozymandias (http://en.wikipedia.org/wiki/List_of_fictional_computers#1990s)

I set my locale to be en_GB.UTF-8.

Installing Necessary System Tools

I chose to get syslog-ng, vixie-cron, mlocate, dhcpcd and ppp.

Configuring the Bootloader

I used GRUB and followed the standard set-up except for a timeout of 10 seconds and replacing Windows XP with Windows 7. I also had to ensure to make the boot device hd1,1 and root=/dev/sdb4.

Finalizing your Gentoo Installation

I made my user with nearly all the groups (N.B. games doesn't work - is it depreciated?)

Where to go from here?

By the time I left for work this morning I had also emerged X-org and KDE 4.8.3 and had managed to get startx to not crash while going to a black screen. I'm going to have to work on my xorg.conf this evening and hopefully I'll get a working one running. This will be useful as Googling doesn't currently give a working one for my 42" TV and graphics card via HDMI. I hope people might find that useful :)

Tom out!

P.S. http://www.gentoo.org/