VirtualBox create share folder in Ubuntu Server Guest

Guest: Ubuntu

Host: Ubuntu

1. Install Guest Additions

From the Devices toolbar, click shared folder settings. Once the guest addition is downloaded, insert the disc using Devices > Insert Guest Addition CD

2. Mount Guest Addition CD and Install

sudo mount /dev/cdrom /media/cdrom
cd /media/cdrom

3. Restart

4. Create Shared Folder and Mount It

Text below is shamelessly copied from Ubuntu’s official site:

Creating a shared folder

  • Create a folder on the Host computer (ubuntu) that you would like to share, for example ~/share

  • Boot the Guest operating system in VirtualBox.

  • Select Devices -> Shared Folders…

  • Choose the ‘Add’ button.
  • Select ~/share

  • Optionally select the ‘Make permanent’ option

Prepare the folder

After you run following command, the shared folder will be accessible at ~/host location.

sudo mount -t vboxsf -o uid=$UID,gid=$(id -g) share ~/host

Python 3 Read from Standard Input (stdin) Like C or Java

I will be using Python3 to read from standard input (or console). I will present two ways of doing this.

First Example

Input (data.txt)

First line of input will contain an integer which tells how many of lines (of data) will follow up. In each of the following lines, there will be one integer and and one floating-point (decimal) number, separated by a space:

1 2.3
3 4
5 6.0

Code (

if __name__ == '__main__':
    # Reading the first line and converting it to an integer
    num_entries = int(input())

    # Running a for loop to read each of the following lines
    for i in range(num_entries):
        current_line = input()
        # Getting the two values separated by space in variables `a` and `b`
        a, b = current_line.split()
        a, b = int(a), float(b)
        print(a, b)

Run the program

python3 < data.txt

Second Example

Input (data.txt)

In this example, data file exactly looks like the one from first example, except that the first line is missing. Which means, we do not know how many data to read. We would have to run a while loop to read lines till there is and EoF (End of File) which tells us there is nothing more to read.

1 2.3
3 4
5 6.0

Code (

if __name__ == '__main__':
        # Running a while loop since we don't know how many lines to read.
        while True:
            current_line = input()
            # Getting the two values separated by space in variables `a` and `b`
            a, b = current_line.split()
            a, b = int(a), float(b)
            print(a, b)
    except EOFError:
        # There is nothing more to do when we reach End of File (EOF)


python3 < data.txt

Concluding Notes

  • You can run the programs without saving input data in a file. Just type python3 and then enter data.
  • Be sure to use Python 3 only as the code will not work in Python 2
  • We are using input() built-in method of Python 3 which reads a single line and returns it as a string. So we have to convert them to appropriate data type (int/float).

From MDN Work Weekend @ Paris

Mozilla Developer Network (MDN) has been my first priority of contribution for more than a year. Specially, since I started feeling the way that contribution for the developer documentations and keeping them up-to-date in my native language is of utmost importance. Thanks to Mozilla and specially Ali for inviting me to join the first MDN work weekend at Paris, from March 7 to 9.

For those who don’t know what the MDN is: it is the home of HTML, CSS, JavaScript, Web API and other open-web standards’ documentation! Get Involved!

As a part of preparation, I, with the help of MDN task force members here in Bangladesh, ran a survey to understand how well local developers know MDN, how they use it everyday, and how they contribute to it. I was not able to present the survey result at the work weekend due to insufficient response, but I hope to publish the results soon, as now the survey has got more attention from local audience.

Are you a Bangladeshi web developer or CS student? Help us improve MDN for Bangladeshi developers by taking part in this short survey!

But my journey to Paris was not smooth. First, I got visa valid from the wrong dates and I had to change my flight, so that I have valid visa when I enter Paris. Next, my flight was delayed for bad weather conditions and I missed my connecting flight from Dubai. I had to stay a whole day at Dubai and I received at Paris the next day, at 2 PM in the afternoon! I was so much frustrated that once I thought I would go back from Dubai instead of keep trying. But then, I decided that I have to make most of it, so as soon as I arrived at Paris I checked in to my hotel and walked directly to Mozilla space at Paris.

Experience at Paris Mozilla space was awesome. Though I had very little time, I quickly joined Jeremie’s web literacy map session – experience at the session was wonderful. We had to figure it out what complete new learners must have and would be nice to have in order to make a website! Now, there is this MDN glossary which was a fantastic idea for new learners.

The next day I arrived early at the office. I was trying my best to pick up works. I spent most of the time with Kensie, Kaustav and Priyanka figuring out next steps for Dev Derby contest. I also had some inputs for MDN events as I had run localization sprint in Bangladesh. At afternoon everyone presented their works, it was really amazing to see so many outcomes in just 3 days. At the same time, I also felt bad about my flight incidents for which I missed most of the work weekend.

We had these fantastic dinners at Paris. I met these amazing people whom I’ve always wanted to meet, and having time with them has been the most inspiring thing that have ever happened to me, and I’m thriving to build the local contributor base here in my country for MDN!



Mozilla Awareness Booth at Ahsanullah University

Mozilla Awareness Booth @ AUST, Dhaka

Returned happily from Mozilla Awareness Booth at Ahsanullah University of Science & Technology (AUST), Dhaka. I returned early, Mozilla Bangladesh community fellows are still there, talking to buzzing students, making them aware of Mozilla missions and awesome products, and helping them to connect to us back by our Facebook group & mailing lists.

I’ll congratulate Ratul as this was his first event after being a rep and also Noor vai, Shuvo, Rifaz and Fuad for always being busy in the booth, talking to the students and being so much motivated!

There was little to do for me other them talking to the students about the MDN activities we’re doing here and web-dev stuffs, so I took some photos at the booth. :)

MDN L10N first Event at Bangladesh

Event report: MDN L10N Boost-Up

Yesterday, we participated at long anticipated MDN Localization Boost-Up event. Organized by Mozilla Bangladesh localization team and attended by promising localizers – both new and active Mozillians. Number of new Mozillians was slightly greater than already-contributors – disappointed us a bit but was acceptable as many could not join due to politically unstable situation.

Organizers reached event venue at early 9:00, we prepared venue. People started showing up from 10:30. We maintained this etherpad to keep track of new localizers and who localized what! Took lunch & prayer break at 1:00 PM. Lunch menu was mouth-watering. :-)

Event resumed at 2:00 PM and continued till 4:30 PM. We ended our program by awarding most-effective contributors T-shirts we designed. We took group photo and returned home, with determinations to continue localization effort.

Event photos can be found at our Facebook Page.

And finally, I’d express my gratitude to those without whose support this event would remain a dream: Zobayer for going through all the hassles of arranging the venue and co-ordinating. Noor vai for the T-shirts and banner, Rahid for the food, MAK vai for the coordinations and support and the last-minute banner design, Firoz for the T-shirt designs, Shuvo, and many other volunteers. These guys not only helped arranging the event but made it fruitful with their presence, guiding new contributors to keep  the web open.

PS: Though there were many new mozillians, only 6 registered in the reps page. But I think that’s sufficient to mail Konstantina for a dino. :-P

Related links:

Avro for Ubuntu 13.10

Recently I got Ubuntu 13.10 and was looking for Avro keyboard… but got frustrated seeing no support from the Avro website. Finally, with help from a ticket there and my friend Rafi Kamal, I made Avro working:

1. Download and install Avro Saucy

32 Bit:

64 Bit:

2. Type “Text Entry” from the dashboard

Press windows key to get the dashboard

3. Click the + button and select Benglai (Avro Phonetic)