Showing posts with label howto. Show all posts
Showing posts with label howto. Show all posts

Monday, 20 August 2018

Setting up Java and Geany

In order to program in Java, you may want to follow the instructions and videos that I have prepared. They are simle and straightforward, and have no audio to keep the video lean and to prioritise video quality.

Videos show tutorials for both Windows 10 and macOS.

Setting up your Java programming tools, in order (JDK first, then Geany)
  1. Download and install Java Standard Edition Development Kit, version 8. You will have to agree to using their cookies and accept their License Agreement, then download the right JDK for your system (most likely Mac OS X x64 or Windows x64). Link: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
  2. Now download and install Geany from https://www.geany.org/download/releases. You will need to choose between Windows binaries (e.g. "geany-1.33_setup.exe - Full Installer including GTK 2.24 runtime") and macOS X binaries (e.g. "geany-1.33_osx.dmg - Geany and Geany-Plugins combined").
The following screen casts may help you:

Friday, 15 July 2016

How to install MySQL Workbench in Ubuntu

Installing MySQL Workbench in Ubuntu is very straightforward, but not always easy to come across.

Hope this quick tutorial helps get the job done without wasting time.

Let us take the most direct approach, using the Terminal to install what we need in order to use MySQL Workbench.

sudo apt-get update sudo apt-get install mysql-server mysql-workbench -y

The above will ask you to type your (user) password. If you have not used the terminal much, be aware that nothing will appear on screen as you type your password. This is a security measure and it is normal.
When the download and installation of the two packages finish, you will be presented with the following screen:

Enter a password that you will easily remember. You may use your Ubuntu user password if you want, but bear in mind that this will be the root password for the MySQL server; this is a individual service and its password is independent from the rest of your Ubuntu system. So you could use any password you want, just make sure you do not forget it!

Now you can open the Workbench, using the search function of your desktop or by typing mysql-workbench in the Terminal.
Next we need to connect to the MySQL service so we can start using the Workbench. You should see a Local instance under MySQL Connections in the main Workbench initial window.

When you click on the Local instance icon/rectangle, it will ask you for the root password of the MySQL service that you set during the installation.
If you do not want to enter the password every time, just save it to the key chain.

If you want to set up MySQL in other platforms, check the following links:
And that's all, folks! Happy SQL'ing

Thursday, 5 January 2012

Gnome 3 Window Buttons

Ah, the polemic, the flame wars... Whatever.

I'm using XFCE, Gnome, and Unity at the moment, while keeping a close eye on KDE (my first and most loved desktop, until they released version 4 (which now looks like it's ready for mass consumption, but I'm still nostalgic about the power and speed of KDE 3) and Gnome 2.

I actually find Gnome 3 nice, but not "tweakable" enough. I hope it won't take too long until it's as customisable as Gnome 2 used to be... Talk about fixing what's not broken and breaking it in the process...

Anyway, what I hate the most about Gnome 3 and its Shell:
  1. The (lack of) window buttons: why remove the maximise, minimise, and menu? Doesn't make sense to me...
  2. The lack of themes, colour sets, font configuration, etc... customisation and personalisation out of sight.
  3. It isn't as light as Gnome 2 (at least it doesn't feel as light and nimble as its predecessor IMO)
So what to do?
Number 3: Use XFCE, LXDE, or Ubuntu 11.04 in Gnome classic mode.
Number 2: Wait until the stuff is available. :(
Number 1: Check this out --

You'll need to install (if you haven't got it yet in your system) gconf-editor first.

Invoke it within the terminal or press the ALT and F2 keys simultaneously, and type gconf-editor at the prompt.

Now navigate to desktop > gnome > shell > windows and change the button_layout key to menu:minimize,maximize,close as shown in the screenshot below:


After you log out and log back in, your windows will have the proper buttons. Of course you could make whatever changes as you see fit. The long description is very useful.

Screenshot taken on openSUSE Edu Li-f-e 12.1, yours may differ. It's a brilliant distro that is enticing me to go back where it all started for me (in terms of Linux addiction): SUSE.

Friday, 30 December 2011

Sound Blaster Audigy on Ubuntu

I had problems getting my Sound Blaster Audigy to output any sound on Ubuntu. My desktop has an AMD/ATI Radeon HD card that has HDMI (which means there's some sound capabilities that make things more confusing) and a web cam that has an in built microphone, also making things more complicated.

Now on to the fix:

First, we need to install gnome-alsamixer

If you like the terminal, type

sudo apt-get install gnome-alsamixer

...Or use Ubuntu's software center or your favourite package manager (such as Synaptic) to get that step done.

Then, find and run it:


Now choose the tab labelled something like "SigmaTel…" and
Enable/check the box beside the text "Audigy Analog/Digital Output Jack":


...And now your sound should be working again!

Credits go to my source: http://bit.ly/FLbY

Friday, 23 December 2011

Sun Java on Ubuntu 11.10

Decided to 'fork' my previous post because since Ubuntu 11.10, Sun/Oracle Java has been removed from Canonical's partner repository. Fortunately, Roberto Ferramosca is providing the appropriate packages in his personal package archive (PPA).

So open your terminal, and let's go:

sudo add-apt-repository ppa:ferramroberto/java
sudo apt-get update
sudo apt-get install sun-java6-jdk sun-java6-jre sun-java6-plugin sun-java6-fonts

And that's it. Hope it's helpful. Now if you want to ensure Sun's JRE & JDK are the default, type in the terminal:
sudo update-alternatives --config java
and select your preferred alternative from the list. To select a Java compiler, type
sudo update-alternatives --config javac
Now on to the testing. You should get the version numbers of the currently installed and default runtime and compiler by typing (in the terminal):
java -version
javac -version

Sunday, 4 September 2011

Windows, Java and Geany

One of these things that happen in the worst possible moment...

If you want to use the nice and simple Geany IDE under Windows, I'd recommend you to install all the programming languages before you install Geany.

In my case, installing Java and then Geany didn't work at all. Geany wasn't able to compile or execute my Java code. Even after uninstalling and reinstalling both Geany and Java in all possible combinations.

Hope this warning will help someone out there.

Note: Newer versions of Geany have been released, they may have overcome this problem, but I still install Geany after JDK (Java Development Kit) to avoid issues.

Friday, 22 July 2011

Ubuntu 11.04 Unstable?

After using Ubuntu 11.04 for a while, on different PCs (desktop, netbook), I noticed some unexpected behaviours (slowdowns, crashes, screen garbage). This most likely is a problem of proprietary drivers (nVidia, ATI/Radeon) and Compiz (the 3D compositing window manager).

The solution, although not the most popular, is simple: when you log in, select Ubuntu Classic (no effects), and you'll have a fast, responsive and stable Ubuntu Linux system. I'm not fussed about losing the eye candy, and have no problem waiting for the next release (11.10), anyway.


Thursday, 7 July 2011

Classic scrollbars in Ubuntu

Thanks to Andrew from Web Upd8, here's a way to disable Ubuntu 11.04's weird scrollbars and revert to the "old" ones. It's a terminal hack, so you need to open it and type the two lines below to make it work. You may or may not have to restart your computer to finalise the changes.
sudo su 
echo "export LIBOVERLAY_SCROLLBAR=0" > /etc/X11/Xsession.d/80overlayscrollbars

Natty Narwhal's new scrollbar...


Source:
http://www.webupd8.org/2011/04/how-to-disable-overlay-scrollbars-in.html

Tuesday, 28 June 2011

Delete USN Journal

Well, this is a technical one. If you're running Windows, you'll notice that defragmentation can sometimes become a pain because of USN journals. Here's how to remove it, using the Command Prompt (Terminal):
FSUTIL USN DELETEJOURNAL /D C:
Of course you may replace C: for whatever journaled drive you want

Sources:
annoyances.org
Wikipedia

Sunday, 1 May 2011

Hack your Ubuntu 11.04


Yes, the new Ubuntu is here!

So it's time to tweak it and personalise it, of course.

I'm quite short on time, so I'll be brief. will do what I can to revisit this post and make it more visual and detailed.

This is what I usually do right after I install Ubuntu:

{ Switch the window buttons back to the right hand side }

press ALT+F2 and type gconf-editor
Press Enter and navigate to /apps/metacity/general/button_layout
Change the button_layout to :minimize,maximize,close

More on:
Top Things to do after installing Ubuntu 11.04 Natty Narwhal

{ Go back to the classic Ubuntu, with Gnome desktop }
"...logout and then after clicking on your username, select Ubuntu Classic Desktop at the bottom of the login screen." Thanks Scottlinux!

[ Optional ]
In the Terminal, type:
sudo apt-get install mc build-essential gnome-themes gnome-themes-extras gnome-themes-more startupmanager shutter

Saturday, 23 April 2011

Python 2.7 Mac OS X uninstall

The complete list is documented at http://bugs.python.org/issue7107. The following steps are done inside a terminal session and assume you know how to use the command line. All the terminal command lines below are single lines, even if they appear as two lines in your web browser or this blog post.

To completely remove Python 2.7 from my Mac OS X 10.6:

Remove the entry from the PATH variable by reverting my .bash_profile, edit or delete the file:
nano .bash_profile (remove the PATH lines added by the Python installer, they are commented, so you'll se them easily)
Remove the Python 2.7 framework:
sudo rm -rf /Library/Frameworks/Python.framework/Versions/2.7
Remove the Python 2.7 applications directory
sudo rm -rf "/Applications/Python 2.7"
Remove the symbolic that point back to the 2.7 framework in /usr/local/bin:
Find them with the following ls command, then remove with sudo rm -rf like in the previous steps.
ls -l /usr/local/bin | grep '../Library/Frameworks/Python.framework/Versions/2.7'
In my case, I typed the following commands following the output of the previous ls line:
cd /usr/local/bin 
sudo rm -rf 2to3 idle idle2.7 pydoc pydoc2.7 python python-32 python-config pythonw pythonw-32 smtpd.py smtpd2.7.py


Information taken from:
http://stackoverflow.com/questions/3819449/how-to-uninstall-python-2-7-on-a-mac-os-x-10-6-4
Credits to the users listed there, especially Ned, who answered the question in such a clear and concise way.

Python on Macs


If you need or want to install and use the latest versions of Python (2.7.1 and 3.2 at the time of writing this post) on Mac OS X, please make sure you read the following web page that contains essential information on what do download and install in order to have a better experience.

http://www.python.org/download/mac/tcltk/

In a nutshell:

"Important
Do not use IDLE or tkinter with the Python 3.2 64-bit/32-bit installer for Mac OS X 10.6 unless you can install ActiveTcl 8.5. Otherwise use the 3.2 32-bit-only installer instead.

Do not use IDLE or Tkinter with the Python 2.7.1 64-bit/32-bit installer for Mac OS X 10.6. Install the 2.7.1 32-bit-only installer instead.

Do not use IDLE or Tkinter with the Apple-supplied Python 2.6.1 in Mac OS X 10.6. Install a newer version of Python 2.6 or later.

Python's integrated development environment, IDLE, and the tkinter GUI toolkit it uses, depend on the Tk GUI toolkit which is not part of Python itself. For best results, it is important that the proper release of Tcl/Tk is installed on your machine." (IDLE and tkinter with Tcl/Tk on Mac OS X)

Saturday, 1 January 2011

Disable hibernation in Windows 7

http://www.sevenforums.com/tutorials/819-hibernate-enable-disable.html

Great tutorial, short and sweet. Why would you want to disable hibernation? To save hard disk space. If your computer has 4 Gb of RAM, the system will create a 4 Gb file in order to be able to hibernate.

Therefore, you'd want to disable hibernation especially if you have a desktop computer and/or don't need to use the hibernation feature, which is mainly aimed at laptops.

In a nutshell, you just need to run the command prompt as administrator(AKA elevated command prompt, see screenshot at the end of this post) and type
powercfg -h off
and then press Enter. That's all, folks!

Right-click on the Command Prompt icon and left-click on "Run as administrator"

Sunday, 7 November 2010

Ubuntu 10.10 and Lenovo Ideapad S10-3

Lenovo Ideapad S10-3

If you have a Lenovo Ideapad S10-3 (depicted above), and you want to test or install shiny new Ubuntu 10.10 on it, you need to take a couple of considerations.
  1. Use UNetbootin to create the bootable USB drive or SD card with Ubuntu 10.10
  2. When booting the flashdrive or SD card, pres TAB key quickly so you may add the following kernel boot parameter (add this to the end of the line starting with the word "kernel"):
intel_idle.max_cstate=0
Install Ubuntu (or any of its variants). You will need to manually add the additional kernel boot parameter once more when you see this screen:


Press the 'E' key as stated and edit the line that contains the words "quiet splash --" (or similar) and add:
intel_idle.max_cstate=0
right before the word "quiet" (after or in the middle may also work, but I did it this way), so it reads
intel_idle.max_cstate=0 quiet splash  --

Now let's see how to permanently change this boot parameter after you have installed Ubuntu to your computer's hard disk.

Open up the Terminal and type
sudo nano /etc/default/grub
You will see something like this:

# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.

GRUB_DEFAULT=0
#GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""
. . .

Change the 9th line so it reads:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash intel_idle.max_cstate=0"

Press Control+X, save the changes by saying Yes (Y key)
Now type the following in the Terminal, and we're done. Next time you'll boot as per normal.
sudo update-grub


Reference:

Friday, 10 September 2010

How to build a PC?

The smart way, of course. Research, learn, design, plan, build, test. Then play Starcraft 2. HA!

Starting guiding question: How computers work? (Howstuffworks.com)

How to select the parts for your Frankenstein PC - from Tom's Hardware (excellent resources IMO):

How to build a PC? (there are many books, magazines, web sites and YouTube videos about this, so get Googling and get some magazines!)
Recommended:

And for the Singapore "Hardware Scene":
Look at their pricelist (you may have to become a member -it's free-) their shootouts, and their product guides (AKA reviews).

Tip: Never go cheap on motherboards or power supplies (PSUs), or you may regret it...

Good luck and happy building.

Friday, 11 June 2010

Change the Firefox cache location

Not necessarily the safest thing to do, I agree, but this is how I set up Firefox on my desktop PCs to avoid fragmentation and keep temporary files separate from my OS, Documents, data, and applications.

  1. Type about:config into the Firefox navigation bar and hit [Enter]
  2. Right click anywhere and select NEW, then STRING.
  3. Enter browser.cache.disk.parent_directory in the first popup box
  4. And then the location in the second popup box, for example: k:\tempintfiles
 If the entry already existed, simply right click on it and select MODIFY and enter your new directory path.

 Information taken from http://www.infohole.com/blog/computing/firefox-cache-location/

Sunday, 8 November 2009

Day 1 with Snow Leopard

Let me start by saying that I'm a fan of clean installs, so don't expect to find any information about upgrading issues here.

So, what you'll find here is a summary of how I've set up Snow Leopard from scratch.

Make Leopard boot in 64 bit mode
For selected Macs models only*, you can enable this. By default, all Macs except Xserves (server machines) boot in 32 bit mode.

*Which models?
Open the Terminal and type the following:
ioreg -l -p IODeviceTree | grep firmware-abi
If you get the following output, you're all set to go. Otherwise, skip this section.
| | "firmware-abi" = <"EFI64">
OK, you're happy. You got the EFI64 message (that means your Extensible Firmware Interface is 64 bit) and (still inside the Terminal, type:
sudo nano /Library/Preferences/SystemConfiguration/com.apple.Boot.plist
Type in your password when asked. A handy text editor will open a configuration file. Carefully, change it so it looks like this:
Kernel
mach_kernel
Kernel Flags
arch=x86_64
So, the idea is to insert the line
arch=x86_64
Right after the "Kernel Flags" section. Press control and X simultaneously, then Y, then return. Now we're done. Restart, then open the Terminal again, and type:
uname -a
If you get something like the following, the magic worked! Congrats!
Darwin xxxxxxx 10.1.2 Darwin Kernel Version 10.1.2: Wed Sep 9 23:09:02 PDT 2009; root:xnu-1486.1.8~1/RELEASE_X86_64 x86_64

2D Dock
Yes, we'll be using the Terminal utility again. Open it, and type
defaults write com.apple.dock no-glass -boolean YES
killall Dock
To set the Dock to a 2D look, or
defaults write com.apple.dock no-glass -boolean NO
killall Dock
To (re)set it to the 3D glassy look. I prefer 2D myself because it's easier to see which apps are open (the little dot).

Install MS Office 2008 without Rosetta
Rosetta provide PowerPC support for Intel Macs, and is not installed by default in Snow Leopard. I find a waste of space and time to install it, so... Guess what! Terminal again. I open it at login, as you may guess.

Obviously, you need to insert the MS Office 2008 DVD into your Mac's optical drive. After that, type inside the Terminal the following:
sudo installer -package /Volumes/Microsoft\ Office\ 2008/Office\ Installer.mpkg/ -target /
Type in your password, and wait. Wait! It takes a while, even on your shiny new Snow Leopard Mac or your recently upgraded system. You will get the familiar prompt back once the installation is done. No nags, no questions asked, just an old fashioned, straightforward install.

Don't run anything yet. First, download and install all available updates first. Just go to http://www.microsoft.com/mac/downloads.mspx to fetch them, then install them.

Adobe Photoshop Elements 6.0
Nothing. You don't have to do anything. It's one of my favourite applications... I would recommend you, however, to run the Adobe Updater before you run any Adobe application. In the case of a default Elements 6.0 installation, you can find it in
Applications > Utilities > Adobe Utilities > Adobe Updater
or similar. Sometimes there's a number after updater showing the version of the utility (i.e. 4, 5)

Best luck and enjoy your Mac!

Optimise Windows 10/11

How to optimise your Windows setup Just in case you need it. If you want a safe and conservative approach, just disable the background apps ...