Search...

9 June 2011

C# Closing A Form In The Constructor

I had an odd need to close an application if a user failed to set some basic user data in a C# application tonight. The flow was that a very simple dialog was displayed during the main windows constructor call and if they dismissed the dialog the application was to end.

After some head scratching I found the only way to do this was with ...

this.BeginInvoke(new MethodInvoker(this.Close));

5 June 2011

Install Dropbox in KDE

I set up a new Linux distro today and the first thing I like to do is install Dropbox.

As a KDE user this is slightly more involved than for those that like to play with Garden Ornaments!

I did post previously a simple guide that showed how to do this but the article has gone! So below is how I set up Dropbox.

First download the Dropbox package. The following two links (32 and 64 bit) should point to the latest builds :


Save the file somewhere in your /home directory and the use an extraction tool to extract the contents into your /home/USERNAME directory. (This should be your /home directory as in /home/andy). This will create a folder called .dropbox-dist (note the . character, this is a hidden folder).

Go to the KDE System Settings application and navigate to the "Startup and Shutdown" node and then the "Autostart" node. Click Add Script and use the file dialog to select the dropboxd file within the .dropbox-dist folder (and yes that is the dropboxd and not dropbox, this is a daemon that will be started on each logon).

Once the dropboxd file name is selected click OK. That is the daemon set up and ready to use.

Now to save logging out and back in again, open your file manager and navigate to the /.dropbox-dist/ directory (once again you will have to enable viewing hidden files and directories to see it), and double click the dropboxd file. This will start the daemon running and will display the Dropbox setup wizard. Within the wizard you can choose to create a new account or connect to your existing account.

openSuse 11.4

Today I have been sorting my work laptops Linux partition.

Up until recently I have been using Kubuntu on Kermit my work laptop. This was down to it being the CD I had to hand when setting the laptop up for some Linux based development work. Kubuntu was OK but it never seemed as fluid as Arch which is the distro I use by choice. When it came to running the upgrade between 10.10 and 4.11, it just failed and bricked the partition. If ever I loved Arch's rolling release model more it was then! So today, wanting a distro that I could just install and use, I opted to try openSuse 11.4. I haven't used Suse since about version 9.3, so it has been a while. So far I am very impressed. It boots fast and looks great. I have set up my standard apps and over the next few days I will get my development environment set up so fingers crossed I can use this for a while without issues.

The KDE implementation seems to be much more polished than Kubuntu. In fact I would say this is the best, most well integrated and polished 4.6 implementation I have seen so far.

The only gotcha I have faced was that the installer defaulted the host name to some standard string. It's easy to fix, open the /etc/HOSTNAME file in your favorite editor as root and change the single entry to the desired host name. Save the file and all is well in the world. Simple fix but it would be nicer if the installer did a better job with regard to this.