Subscribe: The Big Byte
Added By: Feedage Forager Feedage Grade A rated
Language: English
beta  device  error  file  google  home xxxxxxx  home  integer  linux  music beta  music  org  root  service  terms  user 
Rate this Feed
Rate this feedRate this feedRate this feedRate this feedRate this feed
Rate this feed 1 starRate this feed 2 starRate this feed 3 starRate this feed 4 starRate this feed 5 star

Comments (0)

Feed Details and Statistics Feed Statistics
Preview: The Big Byte

The Big Byte

Life, the universe and everything. The state of the world, from the perspective of one in it.

Updated: 2018-03-22T21:59:56.738+10:00


Linux Printer Drivers - Fuji Xerox DocuPrint P255 dw


The Fuji Xerox DocuPrint line of printers are not officially supported on Linux. But it is possible to get them working under Ubuntu Linux using the PPD file from the Windows Drivers.

Here's how I got my Fuji Xerox DocuPrint P255 dw working under Ubuntu 12.10:

  1. First, download the Windows PostScript Printer Drivers from the Fuji website:
  2. Extract the zip file to a local directory.
  3. Find the folder which matches your architecture - x64 for 64-bit machines, or x32 for 32-bit machines.
  4. Inside this folder you'll find a .cab file. Open this with your favourite archiver (I used Ark), and extract the contents.
  5. One of the extracted files is called "fxtpn1a.ppd". This is the PPD file you'll need to install the driver on Linux.
    NOTE: You may need to run dos2unix over this file, to convert from Windows to Unix line endings. I also had to correct one line which was supposed to begin with an asterisk, but had a single space preceding it at the start of the line.
  6. Under Ubuntu settings, open Printers, and click "Add".
  7. Find the network printer, and connect using AppSocket/HP JetDirect.
  8. When asked for a driver, choose "Local Driver", and "Provide PPD file".
  9. Browse to the PPD file extracted earlier, and click through the rest of the wizard to finish adding the printer.
  10. Print a test page to verify the drivers are working properly.

Secure VPN Services


I've been looking recently at options for a secure VPN connection to the US or Europe. There are many websites which treat traffic from Australia differently to other countries, and it helps to be able to test sites from different locations. In particular, when using CloudFlare I'd like to be able to check if my website is up & running for users in America, not just the local Oceania area.

One of the best services I found was Super VPN Service. They offer VPNs for anonymous surfing with an IP address located in the United States or Germany. They include a torrent VPN service, and even a free account with the following features:
  • Connection using PPTP&L2TP protocol.
  • Servers are located in United States and Germany
  • Unlimited amount of traffic
  • High speed internet connection
  • 128 bit encryption
  • Works for PC on Windows /Linux/Mac OS
  • Works for mobile phones with Android/Windows/Mobile/iPhone/Blackberry/Symbian platform
That's a pretty full featured service, and the free option sounds like it would do me fine. What VPN service do you use, and how much does it cost per month?

Google Music Terms of Service


I just got an invite to Google Music Beta =D Of course, I read through the entire terms and conditions before signing up (doesn't everyone?) They were quite interesting, so I've posted them here for your interest. Note at the bottom there is a section for "Gracenote", a music data provider which has partnered with Google for this enterprise. I wouldn't be surprised if Google acquires Gracenote (or a similar company) some time down the track. It's not often that Google licenses the core data set for one of their services from a third party.Listed below is the Google Music Beta Terms of Service, current as of 7th June 2011.Additional Terms of Service for Music Beta by GoogleLast modified: May 10, 2011Thank you for your interest in Music Beta by Google! By using Music Beta by Google ("Music Beta" or the "Service"), you accept and agree to be bound by the Google Terms of Service, the Google Privacy Policy, and theMusic Beta by Google Privacy Policy, each of which is incorporated into this agreement by this reference, as well as these Additional Terms of Service for Music Beta by Google (collectively, the "Terms"). It is important for you to read each of these documents, as they form a legal agreement regarding your use of the Service between you and Google Inc. ("Google") whose principal place of business is 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States. This document explains how your agreement with Google is made up and sets out some of the terms of that agreement. Capitalized terms not otherwise defined in these Additional Terms have the meaning given to them in the Google Terms of Service.The Music Beta Service and Your MusicMusic Beta is a Service as defined in Section 1.1 of the Google Terms of Service and is provided to you for your personal, non-commercial use solely in connection with lawfully acquired music files from your personal collection that you choose to make available to yourself through the Service, including all data comprising, describing, or associated with each music file that you choose to upload, such as audio data, metadata, and album art for each selected file (whether referring to individual uploaded files or to your entire uploaded library, "Your Music"). Music Beta consists of (a) Google-provided server space that you can use for storage of Your Music, and (b) software applications and related web sites and services that allow you to upload, manage, access, and play back Your Music through a web browser or through any supported, Service-enabled device. To the extent that you use the Music Application for Android devices in conjunction with Music Beta, those uses are governed by the Terms, including these Additional Terms.Trial Service Availability and LimitationsMusic Beta is a trial or "beta" Service from Google that requires you to register with your new or existing Google account. It is available free for a limited time to residents of the United States (including its territories and protectorates) who have received an invitation from Google and accept the invitation by signing into their Google account to register for use of the Service. As a beta Service, certain limits on storage or usage may apply; these limits may be set or changed by Google at any time, at Google's discretion, and you agree that you will not attempt to obstruct or prevent the application of those Service limits at any time, or to manipulate your usage of the Service to avoid or circumvent them. You can find more information about applicable Service limits through the Music Beta Help Center.Third Party FeesMusic Beta is available without charge from Google; however, you may incur access or data fees from third parties (such as your internet provider or mobile carrier) in connection with your use of the Service. You are responsible for all such third-party charges for your use of Music Beta on or through third party services and devices.Privacy and Your Personal InformationSection 7 of the Google Terms of Service governing Music[...]

$100 Free Google Adwords Credit - from Hong Kong to Australia


Mail from Hong Kong
Today I received a letter from Google. The postmark and return address were both labeled "Hong Kong". Naturally I was more than a little curious as to what Google might be sending me from Hong Kong. As it turns out, the letter wasn't anything to do with Hong Kong at all.

The envelope contained a $100 gift card from Google Adwords, and a letter signed by Lucinda Barlow, Head of Marketing for Google Australia. Not Hong Kong. Either Google Australia uses Hong Kong for some of their mailouts, or they're sending out a global campaign and attaching local signatures depending on the destination. Either way, it's pretty crazy that mail sent to Australia comes from Hong Kong.

The full letter transcript is below:
Come back to AdWords and get $100 in free advertising

Hello from Google!

We understand how important it is for a business to stand out online - and that's one of the main reasons small businesses use Google AdWords everyday. Over the past year, we've made a lot of changes to make AdWords easier to use, and to help ensure your online ad campaigns deliver the results you expect. We hope you'll try AdWords again and are giving you $100 to get started.

There are a lot of things you can do to make your campaign more successful - refine your keywords, change your bid, or maybe try a new headline. We'd like to recommend the AdWords Online Classroom ( It's a free resource that offers a series of video tutorials covering quick tips designed to help you get the most out of AdWords.

The first step is redeeming your $100 and reactivating your campaign. Then, it's just a matter of time, and a little bit of effort, before you start attracting new customers to your business.


Lucinda Barlow
Head of Marketing, Google Australia

Reset buttons - useful or not?


I've seen quite a few blogs posts lately complaining about the HTML Reset button. You know, the one that often sits beside the "Submit" button. I think everyone must have accidentally hit Reset at least once. So what's the use of it? Personally I have never seen a web form where a Reset button is necessary. And I have accidentally hit Reset many times - especially when it's placed in the position you normally find the Submit button.

This afternoon I wrote up a quick Google Chrome extension to hide all Reset buttons. Are you sick of accidentally clicking the wrong button? Try out the extension and let me know what you think.(image)

Google AdMob Earnings Checker (Chrome Extension)


Earlier this week I wrote up my first Chrome extension - the AdMob Earnings Checker. It's really easy to build extensions for Chrome - basically just stick a bunch of HTML and Javascript in a zipped folder, upload it and you're done. It took me less than an hour to build this guy (taking reference from a similar extension for AdSense).

The hardest part was actually decoding the AdMob page with the JQuery parser - take a look at the source of your AdMob sites page and you'll see what I mean. Not valid HTML by any means. I had to manually strip some tags in order to get JQuery to accept it as pseudo-html. Once I got over that difficulty though, it was pretty straight forward.

So if you develop Android apps, or operate any kind of mobile website using Google's advertising services, you might like to check out the extension. Any feedback would be appreciated!(image)

PHP Error: Permission denied in Unknown at line 0 [FIX]


I was setting up a quick PHP test in my home directory today, but when I tried to load my file (http://localhost/~david/test.php) I encountered a strange error:

Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0 Fatal error: Unknown: Failed opening required '/home/david/public_html/test.php' (include_path='.:/usr/share/php5/PEAR:/usr/share/php5') in Unknown on line 0

My code was pretty simple - no "include" or "require" statements anywhere, and perfectly valid syntax. This puzzled me for some time - it appeared as if PHP was trying to "require" my test file in itself. As it turns out, that wasn't too far from the truth.

This error was simply caused by Apache (and therefore PHP) not having read permissions to my PHP file. So it could tell that the file was there (otherwise I would get a 404 error), but when PHP tried to open the file for reading it failed, due to my file permissions (in this case, 007). To fix the problem, I simply had to run:

chmod 777 /home/david/test.php

After this my PHP code ran perfectly. It's worth knowing that this kind of error can occur - it might save a lot of Googling like I had to do!

Note: Normally I wouldn't change the permissions on a PHP file to 777 (everyone has full access, including write). However, in this case it was just a simple test page running on localhost, so I wasn't too worried about security.(image)

[FIX] qt-facetrainer does not generate model for user (pam-face-authentication on openSuSE)


I was setting up the pam-face-authentication module using opencv on openSuSE today (following this guide). The installation process went well, using the one-click-install package. However, after running qt-facetrainer and adding the correct entries to /etc/pam.d/sudo I encountered the following error:

david@laptop:~> sudo -s
> Camera 0
mmap: Invalid argument
munmap: Invalid argument
munmap: Invalid argument
munmap: Invalid argument
munmap: Invalid argument
Unable to stop the stream.: Bad file descriptor
munmap: Invalid argument
munmap: Invalid argument
munmap: Invalid argument
munmap: Invalid argument
 Face Verification Pluggable Authentication Module Started
Biometrics Model not Generated for the User.
Giving Up Face Authentication. Try Again=(.
root's password:
root's password:
sudo: pam_authenticate: Authentication token manipulation error
The fix turned out to be simple. Instead of running qt-facetrainer as myself, I had to run it as root (kdesu qt-facetrainer). This generated a face model for the root user, which allows me to authenticate myself as root using sudo. I still encounter the munmap errors, but I am now able to authenticate myself for su and sudo using face recognition!(image)

Testing Google Instant


Google Instant was released today, for a certain subset of users only. Google announced in their blog post that Google Instant is a new means of "googling". Instant search means that you only have to type a few letters of your search query, and Google search will instantly show you search results (before you press the enter key). As you enter more letters, the search results will instantly update, without having to reload the page. This search system was developed using JavaScript in the front end, along with Google's highly developed and fast search system behind it all. Query times of 0.3 seconds are very significant when your search results are updating as every character is typed!

Please note: This post is a test for Google Instant. I went to, typed in "testing" and one of the top suggestion results was "testing google instant". I'll test and see if this blog post appears in the results quickly.(image)

Book Review - The Shadow Of The Bear (Regina Doman)


The Shadow of the Bearby Regina Doman The Shadow of the BearDescriptionWhen Bear, a mysterious young man, lands on Blanche and Rose Brier's doorstep in New York City, the two sisters have conflicting opinions on whether or not he is dangerous. Even as Blanche learns to trust him, her fears that Bear's friendship threatens their family prove terrifyingly true. A modern retelling of the classic Brothers Grimm fairytale.Read more on Amazon... Personal ReviewThis book is a classic - one that I've read many times and will read again. The adaptation of the fairy tale "Snow White and Rose Red" is set in modern New York City, and fits in very well with this environment. But don't think this is just a children's fairy tale - anyone who has read Chesterton or is versed in classical literature will appreciate the quotes that come up throughout the story in casual conversation. The characters are engaging and varied - some are drug dealers, some classical poets, while others appear to be both! And surprisingly all the dialog sounds natural, despite dealing in some depth with many aspects of faith and life.Some of the topics covered in a unique and realistic manner include modesty, judging people, revenge and peer pressure. You might think that having such a strong Christian moral the storyline would be weak - quite the opposite! The action and events in this story themselves make for a great read, the moral values simply add to this book's appeal.Anyone from early teens on would definitely enjoy reading this book, although older teens would have a greater appreciation of the relationship aspects. This book is suitable for younger readers than Waking Rose or The Midnight Dancers (which deal with relationships at a higher level).Violence (6/10) There are some moderately violent scenes in this book. However, the level of violence seems appropriate to the story, and adds a level of realism without being overly graphic.Some of the violent aspects include:A gang of boys attack a boy and girl, and the girl is thrown to the groundOne character is nearly asphyxiatedA girl is forced into a car, and held against her willPeople are held at gunpoint several timesOne character is shot and wounded (not life-threatening)A character threatens suicideAnyone from early teens onward should be able to handle the level violence in this book. More conservative parents might wish to read the book first though, to be sure.Immorality (6/10) One of the major themes of this book is drug dealing. While innocent characters are sometimes suspected of illicit dealings, it's always very clear that using or handling drugs is wrong.Some high school students are smoking cigarettes without permission or adult supervision. These are students with a bad reputation, and it's obvious that what they're doing is wrong.In once scence, a boy is alone with a girl and tries to force a kiss (nothing further ensues though). This particular issue is handled very well, and later on in the book the girl gives a marvelous treatise on morality and character.Language (1/10) The language is exceptionally clean throughout this book, a remarkable achievement considering some of the characters involved.SN Themes (3/10) The characters' moral struggles feature prominently in this book, but no real supernatural themes. A Catholic church is regarded as "sacred" but this feature isn't dwelt on. There is a brief scene where the number "666" is used by the "bad guy".Overall, the story is very light on supernatural elements, despite it's strong moral content. It's written as a fairy tale, and can be read as such.Catholic PerspectiveCatholics will love this book. The author has portrayed strong Catholic values in a way that makes sense. Anyone who comes from a Catholic background will find a lot to relate to.But The Shadow Of The Bear also has strong appeal [...]

Symfony 'String could not be parsed as XML'


I was receiving this error on my symfony project (using the sfWhoIsOnline plugin):

[28-Aug-2010 21:50:54] PHP Fatal error:  Uncaught exception 'Exception' with message 'String could not be parsed as XML' in /home/xxxxxxx/plugins/sfWhoIsOnlinePlugin/lib/sfWhoIsOnlineUserFacade.class.php:38
Stack trace:
#0 /home/xxxxxxx/plugins/sfWhoIsOnlinePlugin/lib/sfWhoIsOnlineUserFacade.class.php(38): SimpleXMLElement->__construct('')
#1 /home/xxxxxxx/plugins/sfWhoIsOnlinePlugin/lib/filter/sfWhoIsOnlineFilter.class.php(14): sfWhoIsOnlineUserFacade::registerUser(Object(myUser))
#2 /home/xxxxxxx/cache/frontend/prod/config/config_core_compile.yml.php(1026): sfWhoIsOnlineFilter->execute(Object(sfFilterChain))
#3 /home/xxxxxxx/plugins/sfDoctrineGuardPlugin/lib/sfGuardRememberMeFilter.class.php(56): sfFilterChain->execute()
#4 /home/xxxxxxx/cache/frontend/prod/config/config_core_compile.yml.php(1026): sfGuardRememberMeFilter->execute(Object(sfFilterChain))
#5 /home/xxxxxxx/cache/frontend/prod/config/config_core_compile.yml.php(990): sfFilterChain->execute()
#6 /home/xxxxxxx/cache/frontend/prod/config/config_core_compile.yml.php(1026): sfRenderingFilt in /home/xxxxxxx/plugins/sfWhoIsOnlinePlugin/lib/sfWhoIsOnlineUserFacade.class.php on line 38
[29-Aug-2010 00:06:48] String could not be parsed as XML
[29-Aug-2010 02:14:47] String could not be parsed as XML

Turns out, SimpleXMLElement can't handle empty strings or badly encoded documents well. As a patch of sorts, I replaced the code at line 38 in the sfWhoIsOnlineUserFacade class with the following lines (original lines in bold):

/* Begin Hack to fix error 'String could not be parsed as XML' */
try {
$xml = new SimpleXMLElement($xmlString); // <-- Original line 38  
$instance->fromXml($xml);                // <-- Original line 39
} catch (Exception $e) {
sfContext::getInstance()->getLogger()->crit('sfWhoIsOnline failed to create SimpleXMLElement');
sfContext::getInstance()->getLogger()->crit('xmlString: '.$xmlString);
/* End Hack */


Undelete a Linux file


Undelete! | Atomic Object, Software Design & Development:
How to undelete a file removed with the 'rm' command on Linux
"grep -a -B 25 -A 100 'some string in the file' /dev/sda1 > results.txt(image)

Install phploc on openSuSE 11.3 [HOWTO]


Once you've got PEAR installed, run these commands (as root):

pear channel-discover
pear channel-discover
pear install phpunit/phploc

At first I was getting errors:

phpunit/File_Iterator requires PEAR Installer (version >= 1.9.1), installed version is 1.9.0
phpunit/phploc requires package "phpunit/File_Iterator" (version >= 1.2.0)
No valid packages found
install failed

But running:

pear upgrade-all

fixed all the errors.(image)

Use ssh-copy-id on a non-default port


ssh-copy-id has known problems with handling non-standard ports (e.g. connecting to a different port than 22). To overcome this issue, use a command like:

$ ssh-copy-id "user@host -p 6842"


[FIX] Migrate Windows Server 2003 to VMWare ESXi fails to boot - white non-flashing curser


I recently used VMWare Standalone Converter to migrate a physical Windows Server 2003 machine to a Virtual machine Infrastructure host. However, the machine would not boot up on ESXi 4. All that appeared on the screen was a white, non-blinking cursor at the top left of the screen.

Turns out, after a lot of troubleshooting, that ESXi can't handle virtual IDE drives - they must be SCSI, either LSI Logic or Bus Logic. After following this guide to setup SSH on ESX server, I then followed the instructions at the VMWare help site to convert the virtual IDE disk to SCSI (with LSI Logic controller). I used vi to edit the required file, as nano is not available on ESXi.

After the conversion was complete, the machine booted perfectly.(image)

Symfony / sfGuardUser: MySQL errno: 150 Failing Query "ALTER TABLE sf_guard_user......."


I've been trying to link up my symfony project (using Doctrine) to sfGuardPlugin with profiles. However, when trying to rebuild the schema and insert sql, I encountered the following error:

SQLSTATE[HY000]: General error: 1005 Can't create table 'phoenix.#sql-740_d7' (errno: 150). Failing Query: "ALTER TABLE sf_guard_user_profile ADD CONSTRAINT sf_guard_user_profile_user_id_sf_guard_user_id FOREIGN KEY (user_id) REFERENCES sf_guard_user(id)". Failing Query: ALTER TABLE sf_guard_user_profile ADD CONSTRAINT sf_guard_user_profile_user_id_sf_guard_user_id FOREIGN KEY (user_id) REFERENCES sf_guard_user(id)

This isn't an incredibly useful error message. Turns out that it's to do with the way MySQL handles cascading constraints. To cut a long story short, there's more info in the links posted below, but basically you need to remember that "type: integer" does not mean it will be stored as INTEGER in MySQL. As a matter of fact, "type: integer" in a schema.yml file translates into a "BIGINT(20)" in MySQL - which means when you add a constraint to a normal INTEGER field, it fails.

To store an integer value in schema.yml, use "type: integer(4)". This will translate into a type of INTEGER in MySQL.

Explained in a comment I found:
Something you might be interested in, that took me quarter an hour. integer(11) in schema.yml does not result in int(11) in MySQL, but instead you have to write integer(4) in your schema.yml. integer integer int/serial integer(1) tinyint smallint/serial integer(2) smallint smallint/serial integer(3) mediumint int/serial integer(4) int int/serial integer(5) bigint bigint/bigserial However, in my case integer without a number resulted in BIGINT.

More info:*-%28errno%3A-150%29 (especially see the last comment)

WeReward brings incentive advertising to iPhone


This is a Sponsored Post written by me on behalf of IZEA. All opinions are 100% mine.

(image) WeReward ( is a new iPhone app from Izea (the makers of PayPerPost and Sponzai, among various similar services).

Their latest offering is basically a way for iPhone users to make money by performing small, easy-to-do actions on their mobile device. The application integrates with Facebook, Twitter and Foursquare, and offers a variety of incentiv-ized postings.

According the the official website:
Earn WeReward points by completing tasks and checkins at your favorite businesses with your iPhone. Each point is worth a penny, earn 1,000 points and cashout to PayPal.
1000 points is equal to $10 at that conversion rate, which is pretty decent. Of course, it will take a long time to make much money when you're getting paid one penny for each tweet/checkin/share. But it all adds up.

The key to this application succeeding is the location-based relevance. Because offers are tailored to your location, many of the offers you see will actually be useful. In fact, your friends may find your posts helpful, because in many cases they are things that you would already be posting about anyway.

If you can get paid to do stuff that's useful to your friends, and takes little or no extra effort on your behalf, what's the catch? Nothing, really. If you're prepared to take a small amount of time and risk your reputation posting advertisements on your profile, there's nothing else that could really go wrong. Personally I would do it - provided the offers are relevant.

If you have an iPhone you can Download the App today - it only takes a minute. I'd love to hear your feedback (as I don't have an iPhone myself - I use Android). It's something I would definitely use myself, and helps to progress the whole micro-payments infrastructure. Interesting also that they use PayPal for payments. This is a sensible choice, but given MasterCard's entry into the market is something that could change relatively quickly.

Check out the video of how it works in action:
(object) (embed)
(image) (image)

Javascript Card Guessing Game - Sample Code


I've been doing some coding in Javascript lately, and thought I would share some of the code I've been writing. Hopefully some of it will be useful for anyone looking for some sample code in Javascript, or examples of looping, keeping tallies, or writing basic functions.

Without further ado, here is the code. It's a simple playing card guessing game.
Javascript Card Guessing Game(image)

Android: Using Accelerometer to Calculate Total Force


I'm in the process of building an app that calculates how far you could throw something, based on the speed you swing your phone. This involves tracking your phone's movement as you swing it, and calculating the total maximum force involved. I couldn't find any examples on how to do this, so I've mocked up a bit of a tutorial below.

How do we get the accelerometer values?

private SensorManager mgr=null;

private SensorEventListener listener=new SensorEventListener() {
        public void onSensorChanged(SensorEvent e) {
            if (e.sensor.getType()==Sensor.TYPE_ACCELEROMETER) {
                //Total acceleration will be sqrt(x^2+y^2+z^2)
                double netForce=e.values[0]*e.values[0];    //X axis               
                netForce+=e.values[1]*e.values[1];    //Y axis
                netForce+=(e.values[2])*(e.values[2]);    //Z axis (upwards)
                netForce = Math.sqrt(netForce) - SensorManager.GRAVITY_EARTH;    //Take the square root, minus gravity
                Log.d("ForceCalculator", "Net force:"+netForce+"");
        public void onAccuracyChanged(Sensor sensor, int accuracy) {
            // unused

This will create and register an event listener for the accelerometer. This listener then calculates the net force.

This calculation is pretty self-explanatory. It involves three components - X axis, Y axis, and Z axis. To calculate the magnitude of these vector components, we simply take the square root of their combined squares:
netForce = sqrt( x^2 + y^2 + z^2 )
The only point to note is that we then subtract the acceleration due to gravity (approx. 9.8m/s^2). Otherwise we could have a resting acceleration of +9.8.

Full code will be coming later, when I've got some more time to play around with it. For now, this should show you how to get net force using the accelerometer. Still to come is code to calculate maximum force over a specified period of time, with threshold starting and finishing velocities.(image)

How to lock & unlock the KDE4 screensaver from command line


Here are two DBUS commands you can use to start or stop the KDE4 screensaver (previously known as kscreensaver or kscreenlock) from the command line.
Enter one of the following two commands into your linux shell (bash):

dbus-send --type=method_call --dest=org.freedesktop.ScreenSaver /ScreenSaver org.freedesktop.ScreenSaver.Lock

Unlock without password:
dbus-send --type=method_call --dest=org.freedesktop.ScreenSaver /ScreenSaver org.freedesktop.ScreenSaver.SetActive boolean:false

Both these commands work with the latest KDE 4.3.5(image)

HOW TO Install MetaTrader 4 on Linux


How to run Meta Trader 4 on Linux using WINE. Sign up for an account at a forex broker, and download their MT4 installer. I used Easy-Forex, but this procedure should work for any version of Meta Trader 4.x.Install wine on your linux machine (I used wine 1.1.44 on an openSuSE 11.2 machine). Also download winetricks (used to install additional libraries required by MetaTrader).If you haven't used wine before, run 'winecfg' to create your installation directory. You can then click 'OK' to exit the dialog, or have a look around at the options (I used the defaults).Start up a Windows computer, and copy all the files in C:\WINDOWS\Fonts into the wine directory (/home/username/.wine/drive_c/windows/Fonts)Run winetricks to install mfc40 and mfc42:  sh ./winetricks mfc40 mfc42Run the MetaTrader installer executable.   wine ./mt4setup.exeThat's it! You should now be able to run MetaTrader4 by clicking on the icon on the desktop, or running the following command in your Linux shell:wine /home/username/.wine/drive_c/Program\ Files/yourmt4installdirectory/terminal.exeIf you have any more problems or questions, please contact me by leaving a comment. MetaTrader is running fine for me under openSuSE 11.2 with the latest WINE from the repositories, once MFC40, MFC42 and the correct fonts had been installed.More information: you first start MetaTrader4, it might take a while to initialise. You'll see something like the following in the shell output:fixme:reg:GetNativeSystemInfo (0x58c4c8) using GetSystemInfo() fixme:toolhelp:CreateToolhelp32Snapshot Unimplemented: heap list snapshot MetaQuotes Language 4 compiler version 4.00 build 224 (14 May 2009) Copyright 2001-2009, MetaQuotes Software Corp. Exp file "Z:\home\david\.wine\drive_c\Program Files\MT4 at easy-forex\experts\MACD Sample.ex4" produced - 0 error(s), 0 warning(s)Xlib: extension "Generic Event Extension" missing on display ":1000.0". fixme:reg:GetNativeSystemInfo (0x58c4c8) using GetSystemInfo() fixme:toolhelp:CreateToolhelp32Snapshot Unimplemented: heap list snapshot MetaQuotes Language 4 compiler version 4.00 build 224 (14 May 2009) Copyright 2001-2009, MetaQuotes Software Corp. Exp file "Z:\home\david\.wine\drive_c\Program Files\MT4 at easy-forex\experts\Moving Average.ex4" produced - 0 error(s), 0 warning(s)Xlib: extension "Generic Event Extension" missing on display ":1000.0". fixme:reg:GetNativeSystemInfo (0x58c4c8) using GetSystemInfo() fixme:toolhelp:CreateToolhelp32Snapshot Unimplemented: heap list snapshot MetaQuotes Language 4 compiler version 4.00 build 224 (14 May 2009) Copyright 2001-2009, MetaQuotes Software Corp. [...]

Dual Monitor VNC on Ubuntu - with scaling


To get dual-monitor remote desktop over VNC working withUbuntu, I had to install x11vnc. With the default VNC server, only half of my desktop would appear with the other half blacked out. Also, the whole two screen layout would not fit within my VNC client window.Ultimately this is the command I came up with the start the VNC server:

x11vnc -xinerama -xwarppointer -scale 3/4 -noxdamage -ncache 10

The first two arguments setup dual screen mode. The next one (-scale 3/4) scales the screen to 3/4 of it's original size (the scaling is done server-side). The -noxdamage argument prevented some annoying server errors that were appearing. And the -ncache 10 option enables client-side pixel caching, which speeds up things considerably.


openSuSE 11.2 sound on HP dv7t-1000 - ALSA, Pulseaudio, and JACK


It took a lot to get this setup. I made the mistake of installing PulseAudio, and had to uninstall it before my sound would work in the slightest. But even then, I had jerky sound. The solution was to make some edits to my /etc/modprobe.d/50-sound.conf so that it appears as follows:
options snd-hda-intel model=hp-m4 enable_msi=1
# u1Nb.Jqboh86TqAC:82801I (ICH9 Family) HD Audio Controller
alias snd-card-0 snd-hda-intel
After making these changes, and restarting my computer, the sound worked again. I could start JACK with Rosegarden with no troubles (after doing the standard realtime permissions fix).

Some links:

ebay USB MIDI Interface on Ubuntu Linux (1a86:752d)


I recently bought a USB MIDI interface off ebay. It was just a generic, pretty cheap made-in-china kind of model, with a red, orange and green light. It lit up red when I plugged it into my (Linux) computer, but showed up in lsusb as "Unknown" device:
root@theta:~# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 003: ID 0461:0010 Primax Electronics, Ltd
Bus 005 Device 002: ID 045e:0040 Microsoft Corp. Wheel Mouse Optical
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 003: ID 046d:09b8 Logitech, Inc.
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 008 Device 004: ID 1a86:752d Unknown
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Turns out, even though it's listed as an unknown device, it still worked as a MIDI input. I just started up JACK Audio Server, Rosegarden, and ZynAddSubFx for an organ simulation. Then i plugged in the MIDI In and Out ports to my keyboard, hooked up the connections in JACK and it all worked!

Being USB of course, there was some delay, and for some peculiar reason no keys below Middle C would work for me. But it works well on Sibelius!(image)