Sunday, May 31, 2009

Java Basics Using Qt Jambi Tutorial


We've already used variables in our previous examples. Variables are identifiers that store values in your computer memory. There are four types of variables:

  1. Instance variables – variables with unique values.

Ex. int wheels=4;

  1. Class variables – variables with fixed value.

Ex. static in numSteeringWheel =1;

  1. Local variables – can only be accessed inside a method block when placed inside it.

Ex. public void accelerate(){

int currentSpeed =20;


  1. Parameters – variables inside method or constructors and exception handlers.

Ex. public static void main(String[] args) //args is the parameter with a String type of method main.

to be continued...

Saturday, May 30, 2009

Java Basics Using Qt Jambi Tutorial

String Builder Class

You can use this class to append or insert strings (just like concatenating strings, "String.concat()").


String s =”hello”; //declare assign string “hello” to s.

StringBuilder sb=new StringBuilder(s); //creates an instance of class StringBuilder and puts the string s to sb StringBuilder.

sb.insert(4,”o”); //would insert the “n” inside the string “hello” and will be “helloo”.

sb.append(“world”); //will make “hello” string to “helloworld”.

Note: Append will always put the string at the end of the original string.

to be continued...

Friday, May 29, 2009

Java Basics Using Qt Jambi Tutorial


Number class is used so you can utilize its methods for conversion or when an argument of a method expects an object.

Example of converting numeric values to numeric types using number class:

Number num=10; //create number data type

int numInt = num.intValue(); //convert Number to int data type


Example of converting string to integer using integer class:

String s=”20”; //declare string variables to “20”

int numInt=Integer.parseInt(s); //converts string s to integer numInt

System.out.println(numInt); //print the int


From the previous example, we declared a string variable String s=”20”; The “20” Here is a string since it is enclosed by “”, which signifies it is a string not an integer or number and it is accompanied by the keyword String. We can also say String s=”hello there!”

Getting the Length of a String


String s=”hello!”; //declare s as String and assign it to “hello!”

System.out.println(s.length()); //s.length since we assigned “hello!” to s, we access the String class method length to get the length of the string. System.out.println() prints the string.

Concatenating Strings or Joining Strings


String s=”helloˍ̱̱̱“; //(“ˍ̱̱̱” is a space) declare s as string and assign s to “helloˍ̱̱̱

System.out.println(s.concat(“world!”)); //concatenates or joins the string from s (which is hello) to “world!”, then prints the joined string.

Another way is,

String s=”helloˍ̱̱̱“ + “world!” //by using + to join or concatenate strings.

String Formatting


double doubleVar = 10.5; //declare and assign double 10.5.

int intVar=20; //declare, assign intVar to 20.

String stringVar=”hello!”; //declare and assign string var to “hello”

String fs; //declare fs as String.

fs=String.format (“The value of double var is %f, while the value of the “ + “integer variable is %d, and string is “+ “%s', doubleVar,intVar,stringVar); //Use method format of String class %f to assign the variable doubleVar, %d to intVar, %s to stringVar. These %f,%d,%s are called format specifiers which replaces the value in sequence after the (“”,)


int i =10; //declare and assign value 10 to I;

String s = String.valueOf(i); //converts I to String using valueOf().

Note: you can use valueOf when converting to byte,integer,double,float,long and short.


String s =”20”; //declare and assign string “20” to s.

integer a = Integer.valueOf(s); //converts s(20) to Integer a.

Getting Parts of a String


String s = “hello world!”; //assign “hello world” to s as string.

String ss = s.substring(5,10); //returns “world”

0 1 2 3 4 5 6 7 8 9 10

h e l l o w o r l d

Note: Just remember the 5 is inclusion, and 10 is exclusion.

Other Methods You Can Use:

indexOf() //returns the index number of the string or char specified.

charAt() //returns the character where the index is specified.

trim() //removes the leading and trailing spaces.

toLowerCase() //returns a copy of string to lowercase.

toUpperCase() //returns a copy of string to uppercase.

to be continued...

Thursday, May 28, 2009

Java Basics Using Qt Jambi Tutorial

Java Basics

Primitive Data Types (Numeric types, character types, boolean types)

  1. Numeric Types

    1. Integer

      1. byte (8 bit)

      2. short (16 bit)

      3. int (32 bit)

      4. long (64 bit)

    2. Real Numeric Types

      1. float (32 bit)

      2. double (64 bit)

  2. Character Types

    1. char (16 bit Unicode) which means it is fit for Internationalization and Localization.

  1. Boolean Data Types (boolean)

    1. true

    2. false

to be continued...

Wednesday, May 27, 2009

Java Basics Using Qt Jambi Tutorial

Java Main Program

Explaining Java Language By Example

Now, that you have successfully create, run your first Qt Java Program, let's go and look at the details on how it works.

package helloworld; //packages make your classes and interfaces unique by grouping of related types (classes, interfaces, enumerations, and annotations).

import com.trolltech.qt.gui.*; //this imports the package so that we could use the classes and methods.

public class Main { //this creates a class called Main (should be the same name of the saved file

public //modifiers static //associated with outer class void //return type main//function name (String[] args){ //this is the method or function which every main application must contain.

Qapplication.initialize(args); //this initializes the Qt Application with args as the java JAR name which is Main.jar

Note: As you will notice when using the Qt Framework, classes starts with “Q” such as QApplication, QWindow, etc.

QMainWindow window = new QMainWindow(); //creates an instance of the class QMainWindow since we created a MainWindow in Qt designer which is (public void setupUi(QMainWindow helloworldMainWindow)).

Ui_helloWorldMainWindow ui = new Ui_helloWorldMainWindow(); //creates an instance of (public class Ui_helloWorldMainWindow).

ui.setupUi(window); //calls the method setupUi of class Ui_helloWorldMainWindow and parses window to QmainWindow in (public void setupUi(QMainWindow helloWorldMainWindow)) as an argument.; //calls the window (QMainWindow) method show which shows the window.

QApplication.exec(); //executes the method exec of the QApplication Main.jar.

to be continued...

Tuesday, May 26, 2009

Java Basics Using Qt Jambi Tutorial

How To Launch The Application?

  1. Create an empty file called where your resides.

  2. Copy and paste the source code:

package helloworld;

import com.trolltech.qt.gui.*;

import helloworld.*;



* @author jun


public class Main {


* @param args the command line arguments


public static void main(String[] args) {

// TODO code application logic here


QMainWindow window = new QMainWindow();

Ui_helloWorldMainWindow ui = new Ui_helloWorldMainWindow();





Note: Your must contain: package helloworld in the first line of the source code.

  1. Create the Manifest.txt file:

Note: Manifest file should contain the libraries needed and should have a new line or carriage return after the last line.

Manifest-Version: 1.0

Ant-Version: Apache Ant 1.7.0

Created-By: 10.0-b22 (Sun Microsystems Inc.)

Main-Class: helloworld.Main

Class-Path: /path/to/qtjambi-linux32-gpl-4.4.3_01/qtjambi-4.4.3_01.jar /path/to/qtjambi-linux32-gpl-4.4.3_01/qtjambi-linux32-gcc-4.4.3_01.jar

X-COMMENT: Main-Class will be added automatically by build

  1. Make the JAR file:

    Create a directory inside your source folder according to the package name. Then, put the *.class files inside the folder.

$javac cfm [package name].jar Manifest.txt [source/folder]/*.class

$javac cfm helloworld/helloworld.jar Manifest.txt helloworld/*.class

The source folder must be the package name: “helloworld”

  1. Run the JAR file:

$java -jar Main.jar


$java -Djava.library.path=[/path/to/qtjambi/lib/]:[/path/to/qtjambi-gcc/jar] -jar [/path/to/jar]

Note: Use this if haven't included the Manifest.txt file when running JAR files created using NetBeans.

to be continued...

Monday, May 25, 2009

Java Basics Using Qt Jambi Tutorial

The Basics

Using Qt Designer:

  1. First, we need to set-up the Java environment:

    1. run this then re-login:

$sudo bash -c "echo JAVA_HOME=/usr/lib/jvm/java-6-sun/ >> /etc/environment"

    1. Or, go to your home directory, view hidden files and copy this code to your .bashrc file:

export JAVA_HOME=[path to java directory]

Usually, the path is “/usr/lib/jvm/java-6-sun”.

    1. Or, using Nautilus, create empty file and name it Qt_Jambi_Designer.

    2. Copy and paste this inside the file:

export JAVADIR=/usr/lib/jvm/java-6-sun

sh [path/to/ in qt jambi]

    1. Save the file and make it executable.

  1. In Linux, you create a launcher having a command: [path/to/ in qt jambi]. In Windows, Go to Start->Programs->Qt->Qt Designer.

  2. Launch Qt Designer. Choose Main Window then press Create.

You will see the widget box on the left (where the line edits or textboxes, push buttons, or command buttons in Visual Studio). In the middle of the Main Window or Form where you place widgets to create your applications and what it would look like. On the right, is the property editor where you modify or edit the values like Name of the Main Window, Title or Name of push buttons, etc.

  1. Designing the Application:

    1. On the widget box display widget category, click label and hold left mouse button the drag to the Main Window.

    2. Place a Push Button (Buttons Category) and double-click on the push button label and change it to Hello World.

    3. You may resize it by clicking in the small boxes (handles) and drag. Go to property editor Qlabel category and delete Textlabel, you may also change the object name to helloWorldLabel or helloWorldPushButton.

    4. On the Qt Designer Menu, click on the form and preview. As you can see a preview of what your app will look like. (The Hello World button does nothing yet because we haven't put some code or assign Signals and Slots).

    5. Assign Signal and Slots using Qt Designer

      1. Click the Hello World push button and click the + button below the Signal/Slot editor on the right of the designer.

      2. Assign the values:

        1. Sender->hello world push button.

        2. Signal->pressed

        3. Receiver->helloworld label

        4. Slot->hide()

      3. Then Add + Another Signal/Slot:

        1. Sender->helloworld push button

        2. Signal->released

        3. Receiver->hello world label

        4. Slot->show()

    6. Running the App in Preview

      1. Form->Preview

      2. Click the button and see what happens.

When you press the button and hold, the label will disappear (hide) and when you release the left-mouse button, the label hello world will show again.

Where is the code?

This is where our IDE or editor comes in.

  1. Save the Main Window: File->Save as HelloWorld.jui (it must be jui not ui).

  2. Open the terminal or console window inside your folder where HelloWorld.jui resides.

  3. Go to your Qt Jambi you extracted then copy the location of your bin folder where juic executable resides: $[path/to/juic]juic HelloWorld.jui

  4. You will see HelloWorld.jui to

  5. Launch your editor and open

There is the Java generated code!

to be continued...

Sunday, May 24, 2009

Java Basics Using Qt Jambi Tutorial

First Steps:

Choosing An Editor:

Now that we successfully installed Java and Qt Jambi, it is time to choose an editor or IDE (Integrated Development Environment).

Choosing an IDE is up to you, since there are several available on the Internet for download. One is Netbeans from Sun Microsystems (Oracle), Eclipse from IBM (which has an available Qt plugin on Qt website, so it will be easier to design the interface or GUI right inside Eclipse, and also I use). Before, when starting out to program, it is recommended to use a simple editor like Gedit or Kate (In Linux) or Activestate's open source Komodo Edit, which is free for download

Flash movie here

to be continued...

Saturday, May 23, 2009

Installing Java and Qt Jambi

Java on Linux:

Using Synaptic or package manager:

  1. Install or mark: sun-java6-jdk

  2. Choose Java Virtual Machine:

    1. $sudo update-alternatives- -config java

    2. Enter the number that corresponds to Sun Java then Enter.

  3. Testing if Java is installed properly:

    1. $java then press Enter. It will print the version.

Qt Jambi on Linux:

  1. Download (32 bit) and Eclipse IDE Integration:

Java on Windows:

  1. Download and Install JDK version 6(or better).

Qt Jambi on Windows:


  2. Eclipse IDE Integration:

Flash movie here

to be continued...

Friday, May 22, 2009

Java Basics Using Qt Jambi Tutorial


Who This Book Is For:

For those who want to learn Java using QT4 framework called Qt Jambi.

History Lesson:

Java is a programming language created by a small group called the “Green Team” in 1991 led by James Gosling. See

Qt is a cross-platform application framework which means it can run on any platform(Windows,Linux,MacOSX, even on mobile phones) founded by Trolltech in 1994 by Erik Eng and Haavard Nord. Nokia acquired Trolltech in June 2008 and renamed it to Qt software as a group in Nokia. QtJambi is released under two licenses: The GPL, LGPL, and a commercial license. Which license to use, please refer to this link:


Java is a programming language that is:*

  1. Simple, Object Oriented, and Familiar (Easy to grasp).

  2. Architecture Neutral and Portable (Write your code once and deploy on different OS and hardware architectures).

  3. Robust and Secure (Java manages memory for you, and has a built-in protection against viruses).

  4. High Performance (Multi-threading is supported).

  5. Interpreted, Threaded, and Dynamic (Can download code modules from any network).

Based on white-paper by James Gosling and Henry Mcgilton link:

Qt is an application framework that is:*

  1. Qt supports the development of cross- platform GUI applications with its “write once, compile anywhere” approach. Using a single source tree and a simple recompilation, applications can be written for Windows 98 to XP and Vista, Mac OS X, Linux, Solaris, HP-UX, and many other versions of Unix with X11. Qt applications can also be compiled to run on embedded Linux and Windows CE platforms. “Therefore, it save costs and development resources (since you write code once, number of developers are reduced for platforms).”

  2. Qt introduces a unique inter-object communication mechanism called “signals and slots”. “Get to market faster (Qt's Signal & Slots allowed parts of Qt apps to talk to other parts in a very state and controlled way).”

  3. Qt has excellent cross-platform support for multimedia and 3D graphics, internationalization, SQL, XML, unit testing, as well as providing platform-specific extensions for specialized applications.

  4. Qt applications can be built visually using Qt Designer, a flexible user interface builder with support for IDE integration.

  1. Focus on core values (can achieve an identical look and feel across each operating systems (OS)).”

Based on Qt 4.5 white-paper:

to be continued...

Wednesday, May 20, 2009

Realtime Kernel in Ubuntu 9.04

Real-Time Support

After you've got the kernel by installing linux-rt, linux-headers-rt, you still need to set up real-time access for your applications.

All you have to do for this is give your audio group permissions to access the rtprio, nice, and memlock limits. To do this, you just need to run these commands, which will add some lines to the file /etc/security/limits.conf:

sudo su -c 'echo @audio - rtprio 99 >> /etc/security/limits.conf'
sudo su -c 'echo @audio - nice -19 >> /etc/security/limits.conf'
sudo su -c 'echo @audio - memlock unlimited >> /etc/security/limits.conf'

These value are suggested by The memlock line determines how much of your memory can be locked by audio processes. Some recommend setting this as half of your total memory (RAM, in KB). See Florian Paul Schmidt's page.

In Intrepid and Januty Beta, you have to create a user group named "audio" and add your user name (and other users of the workstation if needed) to this group. You can do that very simply in "System / Administration / User Group".

Restart the workstation and it is ok.

reference here:

Tuesday, May 19, 2009

Using Nautilus File Manager Instead Of Dolphin In KDE 4

I'm having problems with dolphin when I sudo dolphin, or use root privileges opening it, and then logging out will hang your computer and would have to reboot. :( A workaround to this is using Nautilus as your file manager in KDE 4.

1.Install Nautilus using Synaptic, or System Settings->Add and Remove Software.
2.System Settings->Default Applications->File Manager and choose Open Folder, then Apply.
3.That's it!

I also found out that this fixes the bug in Quick Access widget in Plasma on the panel.

Sunday, May 17, 2009

How To Play Videos On Your Firefox Web Browser

1.Open Synaptic and install mplayer and mozilla-mplayer and uninstall totem-mozilla. I'm assuming that you have totem installed as default.
2.You would need to install video, audio codecs like windows media video and quicktime movies. In the US and other countries, you would need to buy these for a small amount in store website like Fluendo codecs.
3.That's it!

Saturday, May 16, 2009

How To Use Compiz Desktop Effects

1.Install compizconfig-settings-manager in Synaptic.
2.Then, run this in System->Preferences->CompizConfig-Settings-Manager.

To enable the cube, check Desktop Cube, Rotate Cube, Cube Reflection and Deformation, then you could use it by holding ctrl-alt left-mouse button.

How To Use Compiz Desktop Effects

1.Install compizconfig-settings-manager in Synaptic.
2.Then, run this in System->Preferences->CompizConfig-Settings-Manager.

To enable the cube, check Desktop Cube, Rotate Cube, Cube Reflection and Deformation, then you could use it by holding ctrl-alt left-mouse button.

To customize, or change the top and bottom photos of the cube or cube caps, click Cube Reflection and Deformation->Cube caps->Appearance. Click New in top image files and bottom image files and choose your own picture. That's it!

Wednesday, May 13, 2009

How To Switch From Kwin To Metacity Window Compositor

1.Install fusion-icon. Run it, right-click on the taskbar select window manager.
Note: Kwin is for KDE and Metacity is for Gnome, if you are like me who installed both desktop managers. :)

Monday, May 11, 2009

How To Put Application Shortcuts On The Desktop In KDE 4

From Kmenu, drag the icon to the desktop (Before, I used Folder View Plasma Widget to put shortcuts, but I still experience bugs, so it's better to put it on the desktop itself).

For 3.0 To Use KDE 4 Theme

1.Run Synaptic, and uninstall That's it!

Note: In doing this, you might lose some of it's feature in KDE integration.

Saturday, May 9, 2009

Audio Recording Using Ubuntu 9.04 Within Budget Part 4

  1. Editing In Audacity

I use Ardour for multi-track recording, like for example recording different instruments and vocals on separate tracks to create a song, and adding effects for each track. You can also use Ardour for sends and inserts as demonstrated on the video tutorial I listed in my previous blog. But, I find it more convenient editing the whole song when exporting it to a wav file in Audacity, or mastering (This is by preference, you can also use other sound editor) because of the noise removal feature. You can also add effects, adjust volume, amplify, compression and every LADSPA plugins in Ardour is also available in Audacity.

Since we are using JACK as our sound server, we should also use this for Audacity: First, make sure JACK is running using the JACK control by pressing Start. Run Audacity->Edit->Preferences->Playback and Recording Device: JACK Audio Connection Kit. Then, File->Import->Audio, and select the wav file you exported from Ardour.

    • Removing Noise

Once you have imported the sound file, you can remove background noise, or hiss by using the Noise Removal feature. First, select the sound noise sample we need to remove by click dragging the mouse on the sound wave on the timeline. Then, Effects->Noise Removal, then click Get Noise Profile. After that, select the region which you want to apply noise removal by click dragging the sound wave on the timeline. Effects->Noise Removal then click Ok.

For more info, visit these links. You can also find video tutorials here:

  1. Conclusion

Now that we learned making our own recording studio within budget, keep in mind these are only the basics. There are a lot to learn from other sources or links I have provided where you can create music, podcasts, ringtones and other masterpieces. Linux maybe free, because we have the freedom to fly! :)

Friday, May 8, 2009

Audio Recording Using Ubuntu 9.04 Within Budget Part 3

  1. Recording Your First Audio

Now that you have sound coming from the mic to your mixer, it's time to check for sound coming from the mixer to your sound card in your computer. First, you must install linux-rt and linux rt-headers, linux image-rt, linux restricted-modules-rt, Ardour, Audacity, qjackctl (This is for your JACK sound server that we need for Ardour and Audacity) and LADSPA plugins: swh-plugin, tap-plugins, caps, etc. After installation, Go to Applications->Sound & Video->Jack Control, for we need to configure JACK first. Click Setup, then follow the recommended settings given below:

    • Server Path: /usr/bin/jackd

    • Driver: ALSA

    • Check Realtime, No Memory Lock.

    • Frames/ Period: 1024

    • Sample Rate: 48000

    • Timeout (msec): 5000

    • Audio: Duplex

After this, press Start. If there are errors, probably you must uncheck realtime if not available, or the driver should be OSS.

If pressing the Start button works, then Ardour should be ready for recording. But before you run Ardour, make sure that if realtime is enabled, you must run Ardour in root, meaning running it with “gksu /usr/bin/ardour2”, then entering your password.

Run Ardour2. In New Session, enter a Name for your audio project. You may choose other folders for your Create Folder In (recommended). Then, click New.

The first thing to do, is to Add a Stereo Track. Below the master track, right-click, then choose Stereo then click Add. Alternatively, you may also add tracks in Track->Add Track/Bus. You would see the track added named “Audio 1”. Change this to a more appropriate name like, “rhythm guitar,” or “vocals.”

Now, to record, click the red button of the track. You must see two blue bars coming up and down. If not, open your ALSA mixer or Volume Control by right-clicking the speaker icon your panel. Click Preferences, and check Capture Recording and Input Source, then close. In Options, choose Stereo Mixer, and on the Recording tab, click the mic icon below. Then check whether there is signal coming from the sound card in Ardour.

Open your mic, click the red button on the transport panel, and hit Play. You must see the playhead moving to the right, with sound waves recording. Click Stop, press the “go to start session” button, and hit the Play button, and you will hear the audio recorded.

Where to go from here? Check out this video tutorial, or read the ardour manual:

to be continued...

Audio Recording Using Ubuntu 9.04 Within Budget Part 2

  1. Putting It All Together

Now that you have all the requirements, we move on to setting it up for recording.

First, install your sound card inside the cpu using the available pci slot. Second, put your analog mixer beside the cpu and connect the RCA cables from left and right record out of the mixer to line in of your sound card. Some would prefer to use the mic in of the sound card because of the mic boost feature of drivers, but it will record only mono, and we like higher quality so, put it to line in to record stereo instead.

Then, connect your mic cables to the mixer, the mic and mic stand. Turn on your mixer and mic, and check whether there is sound from your mic by looking at the volume level meter of your mixer after you put your faders up from the mic channel, gain, then master faders.

to be continued...

Thursday, May 7, 2009

Audio Recording Using Ubuntu 9.04 Within Budget Part 1


The goal here is to minimize background noise as much as possible yet attain high-quality sounding audio within budget.

  • Computer:

    • Pentium 4 or better.

    • At least 16 bit Duplex Sound Card. Duplex means you can record while playback sound. You can check this by installing Audacity->Edit->Preferences->Audio I/O->Overdub is checked, and see if it can record while playing the first track.

  • Software:

    • Ardour, for multi-track recording. In order to use the potential of your CPU, it is recommended that you install linux realtime: System->Administration->Synaptic. Check linux-rt and linux-rt headers.

    • Audacity, for post-production editing or mastering.

  • Audio Mixer:

    • 8 channels minimum is good, but the more, the better (depends on how many instruments to record simultaneously).

    • Analog is what I use and it's cheaper, but Digital is preferred. If analog, you may need stereo RCA cables to connect to your sound card, while digital mixers might be USB, but depends on compatibility with Linux, so you must be sure it works before you buy. The difference between the two is that analog only takes one track while digital can record more than one track simultaneously.

    • Nowadays, you can buy portable mixers in tight budget that sounds professional.

  • Sources:

    • Microphone. Can't emphasize the importance of sound source, for this is critical of having high-quality sound. Dynamic mics are cheaper than condenser mics. The difference between the two is that dynamic mics are less sensitive to sound, therefore less background noise. Usually, condenser mics are for professional studios with good insulation.

    • Mic Stand. Buy a mic stand tripod, which I recommend.

    • Mic Cables. Be sure to buy stereo jacks, balanced cables with insulation to avoid noise. 3-5 meters is ok.

to be continued...

Tuesday, May 5, 2009

How To Auto Mount Drive In Ubuntu 9.04

1.System->Authorization->Storage->Mount File Systems Of Internal Drives.
2.Explicit Grant your user name then click must be on active session and local console.
3.System->Preferences->Start-up Applications, add this line to the command box: gnome-mount -d (your device drive) eg. /dev/sda1 (then your mount point) eg. /media/disk.
4.That's it!

Change somethings in Gnome and Nautilus

Originally Posted by rausuar View Post
Hi all,

I was wondering how could I change the following in the Ubuntu desktop (Intrepid latest updates):

1) Change the color or put a background to Nautilus lateral panel? you know, the one where the file tree appears, not where the files appear (which is easy to change)...

2) Change or restore the upper right corner icon of the foot, which moves when something is loading in Nautilus?... it seems the icon theme i am using is not very well fitted with it and i like the one that comes by default (but only that one)

3) Change the size of all the icons in the gnome desktop?, I think the size specially of some document thumbnails is excessively big...

Thanks for the help!!
1) Open a Nautilus window (Places>Home)

* click edit
o click "Backgrounds and Emblems"
+ drag and drop the texture or picture of your choice into the frame.

2) There is a way, but I have forgotten it; theming is talked about a bit at
3) Easiest of all:

* Open a Nautilus window (Places>Home)
o Click Edit
+ Click Preferences
# On the "Views" Tab choose a different "Default Zoom Level"

GL and Have fun.
Rob aka starcannon

Monday, May 4, 2009

Splash Screen Won't Show Up, Or Booting In Text Mode

1.Create a swap partition.
2.$sudo mkswap /dev/(swap partition) e.g. sda1
3.$sudo swapon -U (UUID given by mkswap)
4.$sudo gedit /etc/initramfs-tools/conf.d/resume. The UUID should match UUID in mkswap
5.$sudo gedit /etc/fstab. Add swap line: UUID=(swap UUID) none swap sw 0 0
6.$sudo update-initramfs -u -k all
7.Reboot. That's it!

Sunday, May 3, 2009

Package/Update Install error

A process is using the file "config.dat" which apt needs to access. To find out which process is using it, and eventually end it, use this command line:

$fuser -v /var/cache/debconf/config.dat

Saturday, May 2, 2009

How to Set Removable Drive Label

How to set the label depends on what file system the partition has., for Et2/Ext3 partitions you can use the "e2label"-command:

sudo e2label device newlabel

Friday, May 1, 2009

how to repair boot sector?

Thanks for your reply but I stumbled on the answer myself: Load Ubuntu Ver 8.04 disk and restart computer wait for disk to load then using down arrow scroll to "Boot from first Hard Disk" and press return Ubuntu should now load and seems to repair boot sector at same time. Remove disk.My dual boot is now working perfectly.

(I haven't tried this yet though; this just came from the forums. :)