Friday 29 February 2008

Ubuntu screen resolution issues - cannot get 1024x768

After installin Xubuntu onto my old IBM thinkpad 600, I was restricted to 800x600 resolution.

What I'm not doing:
Phoning Robin! (just yet)

I checked out the config file for all hardware on the sytem. this file is located in /etc/x11/xorg.conf

Im checking 2 things. First that under 'modes' for the screen section of the file that 1024x768 is listed. This should look something like this:

Section "Screen"
Identifier "Default Screen"
Device "Neomagic Corporation NM2160 [MagicGraph 128XD]"
Monitor "Generic Monitor"
DefaultDepth 16
SubSection "Display"
Modes "1024x768"
EndSubSection
EndSection

The next thing your checking is that the DefaultDepth is 16 (probably 24 as default). This needs to be changed to 16bit to enable the higher res.

Save your changes and reboot. Problem solved!

BT Voyager 1060 Wireless PCMCIA Card on Ubuntu

This will probably work on most/all models of systems. Im using an IBM Thinkpad 600 in this example.

After converting from the dark side to my first release of Linux, namely Xubuntu 7.10, my first problem was installing the wireless card named above.

The Linux kernel version 2.6.22 included in Ubuntu 7.10 uses the bcm43xx driver for Broadcom wireless cards.

The firmware code is still not distributed with Ubuntu and must be downloaded and extracted before bcm43xx will work.

2 files are required in order for the network card to work. These are:

installation file - bcm43xx-fwcutter, which can be found here:
http://archive.ubuntu.com/ubuntu/pool/universe/b/bcm43xx-fwcutter/bcm43xx-fwcutter_006-3_i386.deb


and the firmware, which can be found here:
http://downloads.openwrt.org/sources/wl_apsta-3.130.20.0.o


Once you have the files onto the machine in question, double click on 'bcm43xx-fwcutter' to start the package installer. During installation it will ask you if you would like it to fetch and extract the firmware. This step will fail without an Internet connection so just click 'forward' and then close the the package installer.

Open Applications>System>Restricted Drivers Manager and you will see under the firmware drop down arrow it says Firmware for Broadcom 43xx chipset famiy and under Status it says not in use. Tick the enable the firmware box.

Click enable firmware.

Select use local file and browse to the wl_apsta-3.130.20.0.o firmware file that you downloaded previously anc click open. Click OK to extract the firmware.

If the status has changed to In Use then you are successful.

You can now go into Network Connection and connect to your network.

Hyperlinks on an Excel Userform

Got a problems & Solutions database created in Excel for Standard Life's internal websites. The dasebase is mostly fronted by a userform GUI. Here you can search for a problem, and once a problem is selected a solution is suggested in a textbox underneath.

Problem:

sometimes the solution offered suggests the user to seek more information from a website. For easy use I want a control box to appear when this is the case that the user can click on and it will take you to the website suggested. However I do not want the control box to be visible unless there is a website as part of the solution.

What I'm not doing:

Creating a separate control box for every solution that offers a website for further info.

Solution:

First, I created a control box with the default visible value to false.

Then, I added the following code to the click event of the problem selection box:



Private Sub txtsol_Change()
If Left(txtdetsol, 4) = "http" Then
cmdgo.Visible = True
Else
cmdgo.Visible = False

End If
End Sub




Then added the following code to the contrl box that will take the user to the website:



Private Sub cmdgo_Click()

Dim sTxt As String
Dim x As Variant
txtbox = Me.txtdetsol.Value
x = Split(txtbox, " ")

ThisWorkbook.FollowHyperlink x(0)

End Sub




What this code effectively does is this:-
everytime a problem is selected and the solution appears, the code looks at the solution and says 'if the first 4 letters of this solutoin is "http" then show the link control box'.
The code behind the link control then splits all the text before the first space in the solutions box and creates this text as the hyperlink.

The only downside being that this only works when the web address is the first thing written in the solution. However this is a compromise that will still save alot of time.

Hopefully can further this improvement so that this will happen no matter where the link appears in the solution, whether it be the start, middle or end of a string.

Watch this space...

sage line50 (and all sage products) suck c8ck!

problem: performance problems with sage line50 v11.01.035 (last version before the 2007 release, which we are NOT upgrading to until there is no other choice).

what i am not doing: calling sage, i have tried this before and THEY DONT KNOW... ANYTHING... EVER!


after a recent hardware and network upgrade (all machines hp p4 3ghz, half gb ram, 1gb managed switch) i was hoping the occasional data transfer pauses and slow reporting would dissipate. not so! even scrolling through the admittedly large product db causes stuttering. the helpdesks last offering was that we had an 'unusually large dataset', but im not buying this! so, i will start with two machines (test and server) and see what i can do. im not going into the specifics of this network (no of hosts, whatnot) as generally the network is fairly quiet. ok, ok, i know that the server shouldnt really be used as a desktop, but it is, and does the bulk of the sage work, the other machines occasionally searching products or invoices. so, some figures (just using taskmanager monitors):

steps i have taken to no avail: ensured that the server shared folder is mapped on the test client (to eliminate any unc queries or hostname resolution) and that the mapped address is entered in the 'company' file in the sage program folder, disabled firewalls between test client and server, and sage.ini tweak (enter or change 'Files=100' in the [SG50] section).

general use

server
ram: 240mb available (os and sage running, occasional pop checks)
cpu: 1-15% load, with occasional 25-30% during big saves, but only touching then dropping to zero
network: never over 0.5 %

test
generally the same

test scenario
scroll product list top to bottom, restarting sage each time on test client

server
cpu: 1-5%
network: spikes almost 2.5% coinciding with test client screen stutters

test
cpu: 1-10%
network: spikes 1-2% coinciding with screen stutters

WHY THE STUTTER?

test scenario
scroll product list bottom to top, restarting sage each time on test client

server
cpu: 4-10% (never dropping back to zero during scroll)
network: steady 1%

test
cpu: 15-30% (one 33% spike and slight stutter)
network: steady 2%


WHY NO STUTTER?

can only assume that it is something to do with file caching or something (the fastest cache of info ever, <.5 sec to cache whole db).

im not satisfied with this and will continue to try to improve user experience, but in the meantime will scroll bottom to top and curse sage daily.

Thursday 28 February 2008

s l o w remote desktop

problem: 5-6 sec delay when rdp'ing into domain clients, even on 256 colour setting. big, branded bitmap rendering during logon before user settings kick in and remove background image.

what im not doing: being unreasonable... i mean its normally just in and out, and depending on isp, can take up to a few minutes.


easy reg fix! the key is:

HKEY_USERS\.DEFAULT\Control Panel\Desktop\Wallpaper

and the value (string) just a path to a local file. Unbranded machines value is (none).

Wednesday 27 February 2008

the wee boys edubuntu usplash

problem: when the wee boys edubuntu box starts up, im getting 'cannot display this video mode' when i should be seeing usplash. the live cd displayed nice graphical usplash, but after install, black screen, white font. without getting out this seat (and im listening to the football) hes got an nvidia chipset graphics card and a dell 15" flatscreen monitor of some kind.

what im not doing: risking the install... the wee boy loves his classic arcade games (mame) and his box is now a mythtv backend when he is at his mums (more about this another day). i dont really want to reinstall...


google helps (as always) and first stop is checking the usplash config file:

less /etc/usplash.conf

this reads:

# Usplash configuration file
xres=1280
yres=1024

doesnt match current config (1024x768), so sudo gedit and altered usplash config file. then, the magic:

sudo initramfs-update -u

and sweat for a few seconds... reading lets me understand that as of 2.6 kernels, some initialisation can be shifted from the kernel to userspace, and loaded before initrd's. more reading https://wiki.ubuntu.com/Initramfs

which image?

problem: i have been supplied a cd containing images of products (404 images) and need to copy images matching keywords for further processing.

what i am not doing: clicking through this cd via explorer for 4 hours


normally these images are supplied named by supplier code but this particular one has a brief description as image names. keywords are;

Gleneagles
Edinburgh
Newbury
York
New York
Homestead
Sunset
Devon

now, im not using xcopy as i dont really want a copy of the dir structure (there are a few on the cd) on my target, so;

for /f "tokens=*" %a in ('dir /s /b *glen*.jpg,*edin*.jpg,*bury*.jpg,*york*.jpg,*home*stead*.jpg,*sun*set*.jpg,*devon*.jpg') do copy "%a" "%userprofile%\desktop\%~na.jpg"

and i am down to 79 images, all of which are relevant to this project.