[Ubuntu] HOWTO: Restore GRUB (if your MBR is messed up)

October 31, 2009

Don’t forget that this method, as described, puts GRUB back on the MBR (master boot record) of the hard drive instead of in the root parititon. This is fine for most people, but not if you already have an alternative boot manager.

In other words, if you use something like Boot Magic or System Commander, the commands you’ve just read will overwrite what you’ve got.

If you’ve installed GRUB into the Root Partition instead of the MBR, the commands are a little different. Here’s are the instructions that I have for my system:

How to Restore the Grub Menu after a Re-Ghosting:

1. Boot from a Live CD, like Ubuntu Live, Knoppix, Mepis, or similar.

2. Open a Terminal. Go SuperUser (that is, type “su”). Enter root passwords as necessary.

3. Type “grub” which makes a GRUB prompt appear.

4. Type “find /boot/grub/stage1″. You’ll get a response like “(hd0)” or in my case “(hd0,3)”. Use whatever your computer spits out for the following lines.

5. Type “root (hd0,3)”.

6. Type “setup (hd0,3)”. This is key. Other instructions say to use “(hd0)”, and that’s fine if you want to write GRUB to the MBR. If you want to write it to your linux root partition, then you want the number after the comma, such as “(hd0,3)”.

7. Type “quit”.

8. Restart the system. Remove the bootable CD.

Hope this helps. Since I use Norton Ghost to make regular backups and restores (I do a lot of testing), I do this all the time…

[Ubuntu] HOWTO: localhost subdomains

October 1, 2009

Creating subdomain(s) in any web development environment is essential. For example, I have 2 projects going on at the same time and developement is concurrent. And subdomains were not created. So we have this scenario:

  • http://localhost/alphaproject/
  • http://localhost/betaproject/
  • http://localhost/phpmyadmin/

As you can see, I am assuming a Apache/PHP/MySql developemnt stack. 3 localhost urls that will be frequently accessed. Imagine what will happen when you want to access beta project? You “control+t” a new browser tab, and type in “localhost” only to have the url bar showing its history of the above 3 urls. Then you press the down arrow key to access the required url.

Waste of keystroke I will say. Now we create subdomains and we have:

  • http://alphaproject.localhost/
  • http://betaproject.localhost/
  • http://phpmyadmin.localhost/

So now when we want to access beta project? Type in “beta” and simply selected the required “remembered” url. Save some keystrokes and it will save up a a sizable amount of effort over time.

So how to create subdomain in Ubuntu?

Simple, I will cover the basic steps here. (Windows users, sorry, not here my friends).

Edit /etc/host and add the following line

127.0.0.1 alphaproject.localhost

Create a new configuration file in /etc/apache2/sites-available/alphaproject using

gksudo gedit /etc/apache2/sites-available/alphaproject

In this configuration file, have the following:

<VirtualHost *>
    DocumentRoot /home/username/alphaproject/
    ServerName alphaproject.localhost
    <Directory /home/username/alphaproject/>
        Options Indexes FollowSymLinks MultiViews +Includes
        AllowOverride None
        Order allow,deny
        allow from all
    </Directory>
</VirtualHost>

Save the file, and run the following:

sudo a2ensite alphaproject

Finally restart the Apache Server. Which I assume you should be using Apache2.

sudo /etc/init.d/apache2 restart

And by going to http://alphaproject.localhost/ you should be able to access you newly created subdomain.

On a ending note, phpmyadmin does come installed as a package but default to http://localhost/pma which I do strongly encourage users to change it to http://pma.localhost/

Think of the key strokes you be saving. And yes, do name your subdomain smartly, try picking each subdomain to have a different starting character.

How to display a local file in the browser?

August 28, 2009

1) For “static” files, you can use R class and use the browser to
render them
2) For runtime-generated files or “out-of-resouces” class, you can’t
use file:// URIs anymore
2)a) A possible solution: manually open the file and provide file
content as string, mimetype and encoding
2)a)issue) WebView must be used calling loadData method, which doesn’t
allow load content from network (so you can’t make it render external
images)
2)b) Another possible solution: create a content provider which
returns file content, mimetype and encoding by accessing a content://
URI. Theorically you can use WebView calling loadUrl method, which
renders the page correctly

[Android] Developing Orientation-Aware Android Applications

August 23, 2009

ost modern, self-respecting mobile operating systems in today’s market support different screen orientations based on the position of the device. Android is no exception. While this feature is often taken for granted, it’s something on which developers spend extra time, ensuring that their applications work flawlessly regardless of screen orientation. This article will show you how screen orientation works in Android and some techniques to make your life easier.

Default Behavior for the Android G1

Create a new Android project and name it OrientationAware. For today’s current Android device (which at the time of writing is the T-Mobile G1), the screen orientation changes only when the keyboard is opened or closed. When the keyboard is closed, the screen is displayed in portrait mode; when it is opened, the screen orientation changes to landscape.

To test the concepts discussed in this article, connect the G1 to your computer. In Eclipse, press F11 to deploy the application that you have just created to the G1. Figure 1 shows the UI of the application when the keyboard is closed. When the keyboard is opened, the orientation changes automatically to landscape mode, as shown in Figure 2.


Figure 1. Portrait: Here’s the device display in portrait mode.

Figure 2. Landscape: Here’s the device display in landscape mode.
Figure 3. Error: This is an activity that does not know how to react to a change in orientation.

Reacting to changes in screen orientation is important because it affects the look of your UI. The left side of Figure 3 shows an application designed to display in portrait mode. However, if special care is not taken to adapt the UI for landscape mode, it will look like the right side of Figure 3 when the device changes to landscape mode.

There are three general techniques you can employ to handle changes in screen orientation:

  • Anchoring: The easiest way is to “anchor” your views to the four edges of the screen—when the screen orientation changes, the views can anchor neatly to the edges.
  • Centralizing: Like anchoring, if your activity has only a few views, you might want to consider centralizing your views so that they are always displayed in the center of the screen.
  • Resizing and Repositioning: Anchoring and centralizing are simple techniques to ensure views can handle changes in screen orientation. The ultimate is resizing each and every view according to the current screen orientation.

Anchoring and Centralizing
Anchoring and centralizing can be easily achieved by using RelativeLayout. Consider main.xml (see Listing 1), which contains five Button views embedded within the element.

Observe the following attributes found in the various Button views:

  • layout_alignParentLeft: This aligns the view to the left of the parent view.
  • layout_alignParentRight: This aligns the view to the right of the parent view.
  • layout_alignParentTop: This aligns the view to the top of the parent view.
  • layout_alignParentBottom: This aligns the view to the bottom of the parent view.
  • layout_centerVertical: This centers the view vertically within its parent view.
  • layout_centerHorizontal: This centers the view horizontally within its parent view.

Figure 4 shows the activity when viewed in the portrait mode.


Figure 4. Portrait Mode: The image shows the activity in portrait mode.

Figure 5. Landscape Mode:. This is what it looks like when all views are aligned appropriately.

When the screen orientation changes to landscape mode, the four buttons are aligned to the four edges of the screen and the center button is centered in the middle of the screen with its width fully stretched (see Figure 5).

Manual Repositioning

If you want to manually reposition each view in your activity when the screen orientation changes, use AbsoluteLayout. Consider the following content in main.xml

:


<?xml version="1.0" encoding="utf-8"?>
<AbsoluteLayout
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    xmlns:android="http://schemas.android.com/apk/res/android"
    >
    <Button
        android:id="@+id/button1"
        android:layout_width="121px"
        android:layout_height="44px"
        android:text="Button"
        android:layout_x="13px"
        android:layout_y="13px"
        >
    </Button>
</AbsoluteLayout>

Here, the activity has only one button view as shown in Figure 6.


Figure 6. Solo: This shows the activity with one view.

Figure 7. Redone: The Button view is repositioned and resized when it is in landscape mode.

When the screen orientation changes to landscape mode, you might want to reposition the button view. In this case, you need to write some code to determine the current screen orientation the activity is in and then manually set the layout parameter of the view to reposition.

To see how this is done, use the code in Listing 2 in Orientation.java.

The above program first checks the current screen size and determines the orientation. It then creates a new LayoutParams object (containing the new position to locate the view) to be used by the Button view.

Figure 7 shows the application in action—the Button view is repositioned and resized when the screen orientation changes to landscape mode.

Using the layout Folder

Apart from writing code, an easier way of customizing the UI based on screen orientation is to create a separate res/layout folder containing the XML files for the UI. To support landscape mode, you can create a new folder in the res folder and name it layout-land (representing landscape). Figure 8 shows that the new folder also contains the file main.xml.


Figure 8. Downloading Data: The layout-land folder contains the UI to be displayed in landscape mode.

Figure 9. Emulate 3G: You can also apply the –land name extension to the drawable folder.

Basically, the main.xml file contained within the layout folder defines the UI for the activity in portrait mode while the main.xml file in the layout-land folder defines the UI in landscape mode. The following shows the content of main.xml under the layout-land folder:


<?xml version="1.0" encoding="utf-8"?>
<AbsoluteLayout
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    xmlns:android="http://schemas.android.com/apk/res/android"
    >
    <Button
        android:id="@+id/button1"
        android:layout_width="150px"
        android:layout_height="60px"
        android:text="Button"
        android:layout_x="280px"
        android:layout_y="180px"
        />
</AbsoluteLayout>

Basically, the main.xml file contained within the layout folder defines the UI for the activity in portrait mode while the main.xml file in the layout-land folder defines the UI in landscape mode. The following shows the content of main.xml under the layout-land folder:


<?xml version="1.0" encoding="utf-8"?&glt;
<AbsoluteLayout
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    xmlns:android="http://schemas.android.com/apk/res/android"
    &glt;
    <Button
        android:id="@+id/button1"
        android:layout_width="150px"
        android:layout_height="60px"
        android:text="Button"
        android:layout_x="280px"
        android:layout_y="180px"
        /&glt;
</AbsoluteLayout&glt;

Using this method, when the orientation of the device changes, Android will automatically load the appropriate XML file.

Besides using the –land name extension on the res/layout folder, you can also use it on the res/drawable folder. For example, the res/drawable-land folder shown in Figure 9 contains images that are designed to be displayed in landscape mode while those in the res/drawable folder are designed to be displayed in portrait mode.

Persisting State Information During Configuration Change

One important concept you need to know when handling screen orientation changes is that when a screen changes orientation, the activity is destroyed and then recreated–the onCreate event is always called when the screen orientation changes. When this happens, the current state of the activity may be lost.

First and foremost, you should name all your views in your activity using the android:id attribute. This attribute is important for applications that change with screen orientation, because when Android destroys activities, it saves state only for named views. For example, suppose a user changes orientation in the midst of entering some text into an EditText view. When this happens, if you’ve named the EditText view using an android:id attribute, Android will persist any existing text inside the EditText view, and restore it automatically when the activity is recreated. In contrast, if the view does not have an android:id attribute, the system will not be able to persist the text, so when it recreates the activity, any already-entered text will be lost.

In addition, note that the onSaveInstanceState event is fired whenever an activity is about to be killed or put into the background. For example, when the orientation is changed, this event is fired so that the current state of the activity can be saved and restored later. This event is similar to the onPause event of the Activity class, but unlike the onPause event (which is called whenever the activity is being placed in the background or being killed), it is not fired when an activity is being unloaded from the stack (since there is no need to restore its state later on).

You can override the onSaveInstanceState event and save the information you need in this event. For example, the following code shows that you can save the string ID into the Bundle object during the onSaveInstanceState event:


    @Override
    public void onSaveInstanceState(Bundle outState)
    {
        //---save whatever you need to persist—
        outState.putString("ID", "1234567890");
        super.onSaveInstanceState(outState);
    }

When an activity is recreated, the onCreate event is fired first, followed by the onRestoreInstanceState event. This onRestoreInstanceState event allows you to retrieve the state that you have saved previously in the onSaveInstanceState event:

    @Override
    public void onRestoreInstanceState(Bundle savedInstanceState)
    {
        super.onRestoreInstanceState(savedInstanceState);
        //---retrieve the information persisted earlier---
        String ID = savedInstanceState.getString("ID");
    }

While you can use the onSaveInstanceState event to save state information, the limitation is that you can only save your state information into a Bundle object. If you need to save more complex data structures, then this is not an adequate solution.

Another event handler that you can use is the onRetainNonConfigurationInstance event. This event is fired when an activity is about to be destroyed due to a configuration change. (Screen orientation changes are considered configuration changes, and by default, all configuration changes cause the current activity to be destroyed). You can save your current data structure by returning it in this event, like this:


    @Override
    public Object onRetainNonConfigurationInstance()
    {
        return("Hello");
    }

Note that this event returns an Object type, which pretty much allows you to return any data type. To extract the saved data, you can extract it in the onCreate event, using the getLastNonConfigurationInstance() method, like this:


    @Override
    public void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        String str = (String) getLastNonConfigurationInstance();
    }

Bypassing the Activity Destruction Process

Suppose you don’t want Android to go through the normal activity destroy-and-recreate process; instead, you want to handle recreating the views yourself. In this case, you can use the android:configChanges attributes on the <activity> element in AndroidManifest.xml

:


<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="net.learn2develop.UIExample"
      android:versionCode="1"
      android:versionName="1.0.0">
    <application android:icon="@drawable/icon"
                 android:label="@string/app_name">
        <activity android:name=".UIActivity"
                  android:configChanges="orientation|keyboardHidden"
                  android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter&glt;
        </activity>
    </application>
</manifest>

The above attribute indicates that you want to handle the flipping of the keyboard and the changes in the accelerometer (sensor) yourself. When a change in orientation occurs, the onConfigurationChanged event will be fired, which you can override to redraw your activity:


    @Override
    public void onConfigurationChanged(Configuration newConfig) {
        super.onConfigurationChanged(newConfig);
        //---code to redraw your activity here---
        //...
    }

Changing the Screen Orientation Based on the Accelerometer

If you want to change the screen orientation automatically based on the positioning of the device, you can use the android:screenOrientation attribute in the AndroidManifest.xml

file:



<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="net.leanr2develop.OrientationAware"
      android:versionCode="1"
      android:versionName="1.0.0">
    <application android:icon="@drawable/icon"
                 android:label="@string/app_name">
        <activity android:name=".Orientation"
                  android:screenOrientation="sensor"
                  android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>
</manifest>

The above specifies that the screen orientation for the Orientation activity is based on the sensor (accelerometer) of the device. If you hold the device upright, the screen will be displayed in portrait mode; if you hold it sideways, it will change to landscape mode.

Changing the Screen Orientation Programmatically

There are times where you need to ensure that your application is displayed only in a certain orientation. For example, suppose you are writing a game that should only be viewed in landscape mode. In this case, you can programmatically force a change in orientation using the setRequestOrientation() method of the Activity class:


package net.learn2develop.OrientationAware;
import android.app.Activity;
import android.content.pm.ActivityInfo;
import android.os.Bundle;

public class Orientation extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        //---change to landscape mode---
        setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
    }
}

To change to portrait mode, use the ActivityInfo.SCREEN_ORIENTATION_PORTRAIT constant:


        setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);

Besides using the setRequestOrientation() method, you can also use the android:screenOrientation attribute on the <activity> element in AndroidManifest.xml as follows to fix the activity to a certain orientation:


<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="net.learn2develop.UIExample"
      android:versionCode="1"
      android:versionName="1.0.0">
    <application android:icon="@drawable/icon"
                 android:label="@string/app_name">
        <activity android:name=".UIActivity"
                  android:screenOrientation="landscape"
                  android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>
</manifest>

The above example fixes the activity to a certain orientation (landscape in this case) and prevents the activity from being destroyed; that is, the activity will not be destroyed and the onCreate event will not be fired again when the orientation changes.

Now, you’ve seen the various ways to handle screen orientation changes in Android and how an activity gets recreated when an activity changes orientation. You should be able to use these methods to persist your state during transition.

Source: http://www.devx.com/wireless/Article/40792/1954

[Sqlite] Copy records from one DB to another

August 20, 2009
sqlite3 db1.db
> attach db2.db as db2;
> insert into table1 select * from db2.table1;
> .quit

[Ubuntu] Compiz Grid Plugin

August 14, 2009

1.

Code:
sudo apt-get install compiz-bcop compiz-dev compizconfig-settings-manager build-essential libtool libglu1-mesa-dev libxss-dev libcairo2-dev git-core

2.

Code:
mkdir ~/compiz

3.

Code:
cd ~/compiz

4.

Code:
git clone git://anongit.compiz-fusion.org/compiz/plugins/grid

5.

Code:
cd grid

6.

Code:
make

7.

Code:
make install

7.1 You may need to enable “Normal” or “Extra” under desktop effects in System->Preferences->Appearance first. (You may also need to chown -R user:user ~/compiz in order to get things to compile.)

8.

Code:
ccsm

9. Check “grid” under “Window Management”. Note you can actually click on the icon and “grid” to bring up keyboard shortcuts for placing the windows where you want them. Do not expect to have new icons come up at the top of the windows (next to minimize/maximize/close), this won’t happen. However, <ctrl><alt><kp 6> is quicker anyway.

10. Play around with what the different control-alt-numeric keypad combos do to get an idea of how to use this. It’s pretty intuitive.

In Ubuntu 9.04 you have to delete the folder ~/.compiz/ first and log in again

Source : http://ubuntuforums.org/showthread.php?t=1148397

[PHP] Debugging a CodeIgniter application with FirePHP

August 13, 2009

FirePHP is an addon for FireBug extension for Firefox browser.

FirePHP extends FireBug functionalities to show log or error messages coming from your PHP application. These messages won’t be printed on the application interface but instead on the FireBug console.

What do you need to integrate this debugging feature in your application :

  1. Firefox browser
  2. FireBug extension
  3. FirePHP extension

The next step is to open Firefox and visit the url where your application is located and activate the Net panel in FireBug, clicking the bottom right Firebug icon in Firefox window.

FireBug Net Panel

The client (the browser), is now ready to accept the debugging messages, we have now to integrate the FirePHP library with the CodeIgniter application on server side :

  • dowload the FirePHP Core Library from here
  • extract the FirePHP.class.php from the archive, rename it to firephp.php and copy in the system/application/libraries directory of your CodeIgniter application

Now you can use FirePHP to debug your code :

  • load the library : $this->load->library('firephp')
  • send debug messages to the FireBug console : $this->firephp->log($myvariable) or $this->firephp->error('Error at this line')

Detailed instructions to use FirePHP are available on FirePHP project website. The most useful method for me are :

  • $this->firephp->log($myvariable) : send a dump of the variable $myvariable on the FireBug console
  • $this->firephp->warn($myvariable) : send a dump of the variable $myvariable on the FireBug console classified as a warning
  • $this->firephp->error($myvariable) : send a dump of the variable $myvariable on the FireBug console classified as an error

Here there is a little example on how you can use FirePHP with CodeIgniter :

<?php
    $this->load->library('firephp');
    $myvariable = array (
      'language' => 'PHP',
      'database' => 'MySQL',
      'blogging platform' => 'WordPress',
      'post' => 'CodeIgniter and FirePHP',
    );
    $this->firephp->log($myvariable);
?>

And this is the output on the Firefox’s FirePHP console :
FirePHP console

The debug messages can be disabled with the method : $this->firepgp->setEnabled(FALSE).
It is also possible to make the messages appear only for specific ip addresses :

<?php
if($this->input->ip_address() =='1.2.3.4')
{
  $this->firephp->setEnabled(TRUE);
}
else
{
  $this->firephp->setEnabled(FALSE);
}
?>

[Ubuntu] Share One Keyboard and Mouse Between Multiple Computers

August 12, 2009

Have multiple keyboards and mice on your desk? With Synergy, you can seamlessly share one keyboard, mouse, and clipboard between multiple systems. Have a laptop to the right of your main display? Just move the cursor off the right edge of the screen and it will appear on the laptop.

QuickSynergy is a graphical application for setting up Synergy servers and clients. I used it to to share my mouse and keyboard between my desktop and Eee PC laptop. Synergy works flawlessly, even when the laptop is on wifi I can’t tell that I’m using a remote mouse and keyboard.

QuickSynergy

Install QuickSynergy from the package quicksynergy (click the link to install), or by running the command below in your terminal:
sudo apt-get install quicksynergy

Open QuickSynergy from Applications->Accessories->QuickSynergy.

On the Synergy server:
In the Share tab, type the hostnames of the clients (you must specify a hostname and not a IP address) into the appropriate boxes to position them around your main display. Click Start and the server will start (QuickSynergy will close). Open QuickSynergy again if you want to stop the server.

On the clients:
In the Use tab, type the IP address of the server. Select the Settings tab and select the Keep synergy running option so you can close the QuickSynergy window without disconnecting. Click Start to connect.

Tips:

  • Find your IP address in System->Administration->Network Tools in the Device tab. (You’ll need to select your network device from the drop down.)
  • Find your hostname in System->Administration->Network in the General tab.

Source : http://tombuntu.com/index.php/2008/09/15/share-one-keyboard-and-mouse-between-multiple-systems/

[Ubuntu] Automount Hard Drive Partitions Everytime You Login to Ubuntu Linux

August 11, 2009

Hello people,

This is Bharath Ram. I wanted to share with you an information I just found. This indeed solved my problem so I thought it would solve yours too.

In ubuntu (and may be in other distros) every time you login you never get your drives auto mounted (don’t you?). This is a real pest especially when you would have set your wallpaper from an external drive or some other reason you want to use external drives for.

I have just found out a solution for this problem. That is no big deal but a small software called “pysdm”. It was there for me in the ubuntu repositories but i seriously don’t know about other distros. Install this software and if necessary open it after install (alt+f2 -> type “pysdm” -> enter) and in the options there say to automount your partition(s) at startup. Now the drives of ur hard disk will be mounted whenever you login. You won’t have to manually/using computer mount them.

Hope this helps

Source: http://sathyasays.com/2008/10/08/how-to-automount-hard-drive-partitions-everytime-you-login-in-linux/

[Ubuntu] How to Mount iso, Bin And Cue Files Directly From Nautilus

August 10, 2009

We have covered the easy way to mount iso images in Windows. This time round, we are going to cover the easy way to mount an iso, bin or cue file in Ubuntu without having to hit the terminal every time.

With the use of fuesiso and nautilus-actions, we can easily create an option in Nautilus to mount the CD images right from the context menu (mouse right click).

Here it goes:

First, install fuseiso and nautilus actions

sudo apt-get install fuseiso nautilus-actions
sudo usermod -a -G fuse username

Change the username to your login name

Logout and back in.

Download the userisomount.sh script to your home folder.

Copy it to /usr/local/bin/ folder and make it executable.

sudo mv ~/userisomount.sh /usr/local/bin/
sudo chown root:fuse /usr/local/bin/userisomount.sh
sudo chmod 754 /usr/local/bin/userisomount.sh

Download the Nautilus Actions Schemas for MOUNTING and UNMOUNTING disk images.

If you are using Ubuntu Jaunty, do the following:1. Open the MOUNTING and UNMOUNTING schemas with gedit

2. Locate the line with the code <default>1.1</default>

3. Replace it with <default>2.0</default>

4. Save and close the files.

Open up Nautilus Actions Configuration (System->Preferences->Nautilus Actions Configuration). Import the two files into Nautilus Actions.

Save and close Nautilus Actions.

In your terminal, restart Nautilus

killall nautilus

You should be able to find a  Mount Disk Image on the context menu of your Nautilus now.

nautilus-context

To mount a iso, bin or cue file, simply right click and choose Mount Disk Image from the menu.

Reference: Ubuntu community documentation


Follow

Get every new post delivered to your Inbox.