October 17, 2014

Mounting SD Card From Android Phone To Ubuntu Via USB Cable

For quite a few days, I wasn't able to figure out why my Ubuntu 10.04 (I know I am living in the Stone Age :( ) wasn't able to mount my SD Card on connecting my Android phone with a USB cable. Actually, it did show the storage device under Computer, but it wasn't accessible.



I tried a few mount commands, and tried to find out if fdisk and df list my storage device.

1.  varsha@varsha-laptop:~$ sudo fdisk -l

Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x85efe600

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1         995     7990272   27  Unknown
/dev/sda2   *         995        1008      102400    7  HPFS/NTFS
Partition 2 does not end on cylinder boundary.
/dev/sda3            1008        8841    62914904    7  HPFS/NTFS
/dev/sda4            8841       38914   241560577    f  W95 Ext'd (LBA)
/dev/sda5            8841       28470   157673472    7  HPFS/NTFS
/dev/sda6           28470       33450    39999488   83  Linux
/dev/sda7           33450       38430    39999488   83  Linux
/dev/sda8           38430       38914     3885056   82  Linux swap / Solaris

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0057434e

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1      121601   976760000    c  W95 FAT32 (LBA)

2. varsha@varsha-laptop:~$ df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda6             39371384   6950168  30421244  19% /
none                   1462988       344   1462644   1% /dev
none                   1467232       764   1466468   1% /dev/shm
none                   1467232       236   1466996   1% /var/run
none                   1467232         0   1467232   0% /var/lock
none                   1467232         0   1467232   0% /lib/init/rw
/dev/sda7             39371384  20018336  17353076  54% /home
/dev/sdb1            976521568 528405952 448115616  55% /media/Transcend
/dev/sda5            157673468  65527264  92146204  42% /media/84A2A2ADA2A2A362
/dev/sda2               102396     25700     76696  26% /media/System Reserved
/dev/sdb1            976521568 528405952 448115616  55% /media/sdcard

As you can see above, it is quite difficult to tell which my SD card is. I went through a lot of Ubuntu blogs and forums; yet no outcome.

Finally, thanks to myubuntu.com, I came across the package mtp-tools. I installed it using the command - 

sudo apt-get install mtp-tools

My phone was already connected. So, I unplugged the cable from the USB port, and connected it again. Then from Computer, I clicked on my phone name. Then, finally to my pleasant surprise, the browser led me into the directory with a view to all the files and folders on the SD Card. I tried copying files to and fro, and it worked like charm! Make sure it is connected as a USB storage, and copying files to/from the computer is turned on.


March 17, 2011

Solving Blank Screen Of Death In Windows7

This is not a Linux-related problem and not my department in actual, but I happened to solve a problem on a Windows 7 machine of a college junior. She got the Blank Screen of Death after login, which was due to a wrong value in a registry key. So, here it goes.

1. I found a forum: http://social.technet.microsoft.com/Forums/en/w7itprogeneral/thread/5b94b775-992e-4f48-b3ff-c89b3cf45e82

2. I tried many of the solutions listed there, but only one, two actually, came to aid.

i) Press Alt+Ctrl+Del and start the Task Manager. Create a new task and write explorer.exe. You get your desktop back.

ii) Obviously you do not want to do this every time you start your computer. For this, from the Start menu, click on Run or start the Task Manager, and type regedit. When prompted, give Administrative permission, to fiddle with the registry entries. Next, go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon in the left pane. Click on the folder Winlogon, and you can see a list of Registries on the right pane. Double click on Shell. It's default value must be Explorer.exe. Set to this value if there's something else.

3. Logoff or restart after making the necessary changes, and on login, hope you get your desktop without having to do any extra efforts next time.



February 7, 2011

Mukti'11 Comes To An End

One more year and one more Mukti passes by. This was yet another wonderful fest, but unfortunately our last Mukti in college. Nevertheless, the zeal was no less. We had exciting events and awesome workshops by eminent FOSS personalities from Red Hat and KDE. Here is a briefing of our last FOSS Festival of NITDGP.


Day 1:

After not much ado, our fest kick-started, with a small inauguration ceremony at the Lords arena, graced by our new Director Prof. T.K. Sinha, Dean of Administration Prof. A.K.Mitra, Dean of Students' Welfare Prof. G.Sanyal, the GLUG faculty advisors Prof. A. Dutta and S. Nandi and many other professors. Soon later, we had an RPM Packaging Workshop by Rahul Sundaram from Red Hat. Followed the Python Workshop by Kushal Das, Red Hat, and then Hack The Code Prelims in the arena. End of Day 1.


Day 2:

Day 2 started off with Hack The Code Finals, with 10 finalists. Soon followed System Programming Using Python Workshop by Kushal Das. Later we had GUI Programming Using Python Workshop. An over night event FreePL followed up much later.


Day 3:

Day 3 was the most amusing and frivolous day of our three-day fest. During the on-going Creating Fluid User Interface Using QML Workshop by Shantanu Tushar Jha from KDE, we also had an unplanned Photography Workshop by Kushal Das, who is also a professional photographer for many magazines, in the arena. We had tremendous fun, clicking almost everything we could lay our eyes on in the arena.

The idea of having a small DJ Nite by Shreyank Gupta of Red Hat, by a few of our crew members, filled us all with thrill. Shreyank Gupta soon joined in. Being a pass-out of this college, and a GLUG member, he was forced into DJing. He installed the necessary software and started his practice session. Next was his workshop on Ruby On Rails. After it got over, a Valedictory Ceremony followed in the arena.

After the Valedictory Ceremony, Shreyank Gupta was forced onto the stage, where he tried in vain to talk us out of the DJ idea by singing a song, but none would give in. Finally, we had our very own DJ Shrink, although the DJ Nite didn't last for long. All the crew members went frenzy with the dancing and the GPLs and the photography.


Finally, our final Mukti in this college comes to an end.



January 17, 2011

Mukti'11- The FOSS Festival Of NIT Durgapur

The GNU/Linux Users' Group of NIT Durgapur brings to you once again a three-day FOSStertainment, Mukti'11, from 4th-6th February 2011, with numerous events, where you can participate and enjoy working on Open Source platform.

Mukti, last year was a huge success, and we hope, this year too, we'll be able to fulfill all the expectations you FOSS-lovers have.

Just register yourselves and prepare to bag as many prizes as possible.





A brief overview of the various events we have, is as follows:

1. CodeCracker- online coding competition

2. Freemex- online stock market simulation

3. ImaGIMP- online designing contest

4. Quizzing

5. Rush Hour- the gaming contest

6. Open Project- have wonderful FOSS ideas to showcase? Then this is the chance!

7. Brainmesh- website designing contest

8. Hack the Code- debug and rewrite the code

9. InCanity- develop knowledge in C

10. Konfigure- system administration contest

11. Online Treasure Hunt- go explore

12. N-Core- event for core branches

13. Free-PL- go play!

In addition to the already mentioned exciting events, we also bring to you wonderful and interesting workshops by well-known FOSS enthusiasts, Rahul Sundaram, Kushal Das, Shantanu Tushar Jha, Shreyank Gupta, Shilp Gupta.



Everyone, not just NITDGPers, is invited to take part.

We are available at:

Group: http://groups.google.co.in/group/nitdgplug
IRC: Network FreeNode, channel #nitdgplug



December 14, 2010

Installing Hamachi/gHamachi On Ubuntu 10.04

Enable IP Tunneling

1. varsha@varsha-laptop:~$ sudo modprobe tun

2. Add tun to the list of modules.

varsha@varsha-laptop:~$ sudo gedit /etc/modules

3. Add tun to the list on a new line.

4. To verify that we have a valid tunneling node,

i) varsha@varsha-laptop:~$ ls /dev/net/tun
ii) varsha@varsha-laptop:~$ /dev/net/tun


Install Hamachi

1. Download Hamachi from here.

2. Extract the file.

3. cd into the extracted folder.

varsha@varsha-laptop:~$ cd Software/hamachi-0.9.9.9-20-lnx/

4. Install Hamachi.

varsha@varsha-laptop:~/Software/hamachi-0.9.9.9-20-lnx$ sudo make install


Set User Permissions

1. Create group hamachi.

varsha@varsha-laptop:~$ sudo groupadd hamachi

2. Add your user and root to the group hamachi. (My user is varsha.)
i) varsha@varsha-laptop:~$ sudo gpasswd -a varsha hamachi
ii) varsha@varsha-laptop:~$ sudo gpasswd -a root hamachi

3. Change the socket permissions.

varsha@varsha-laptop:~$ sudo chmod 760 /var/run/tuncfg.sock

4. Change the group of the file.

varsha@varsha-laptop:~$ sudo chgrp hamachi /var/run/tuncfg.sock


Start Hamachi

varsha@varsha-laptop:~$ sudo tuncfg

1. Set the initial configuration.

varsha@varsha-laptop:~$ hamachi-init -c /etc/hamachi

2. Start Hamachi.

varsha@varsha-laptop:~$ sudo hamachi -c /etc/hamachi start

3. Set your nick.

varsha@varsha-laptop:~$ hamachi -c /etc/hamachi set-nick nickname.

Replace nickname with the desired nick.

4. Log into Hamachi.

varsha@varsha-laptop:~$ sudo hamachi -c /etc/hamachi login


Use Hamachi

1. To create your own network,

varsha@varsha-laptop:~$ sudo hamachi -c /etc/hamachi create network password


Replace network and password with the desired network name and password.

2. To join an existing network,

varsha@varsha-laptop:~$ sudo hamachi -c /etc/hamachi join network password


3. Go online on the network, you just created.

varsha@varsha-laptop:~$ sudo hamachi -c /etc/hamachi go-online network



Install gHamachi

1. Download the file from here.

2. Extract the file.

3. Run the executable file ghamachi.

varsha@varsha-laptop:~$ ./ghamachi


[Source: http://www.supware.net/other-fun-stuff/hamachiubuntuhowto/]




November 7, 2010

A Trick In Nokia

Most of you like downloading applications for your mobile phone, but in my case I can't do that due to some subscription problem. So, what I generally do is download the applications on my laptop and then transfer to my phone. But I am extremely particular about the location of the application- I don't want it to be just anywhere, but in the Applications menu, which is not really possible, whether you use Bluetooth or data cable.

This is a trick I tried out in my Nokia 2700 mobile phone. I am not sure for how many of you this will work. I presume you use Linux (my distro Ubuntu). Create a folder called Applications beforehand inside Gallery. Via Bluetooth, browse and open the Gallery on your phone, and copy the application files into the folder you created. On your phone, open the folder- it will be empty (even though you copied the application files into it). Now go to Applications menu from the main menu, and hopefully you'll find the application there.

It worked for me.

Note: This works via Bluetooth, and not data cable.




September 25, 2010

Installing Wordpress 3.01 In Ubuntu 10.04

Wordpress is an Open CMS and often used for blogging.


Installation

1. Make sure you have Apache, MySQL and phpMyAdmin installed.

2. Download the source from the Wordpress website.

3. Extract the source mv it to /var/www/.

4. Next, we need to create a database for Wordpress. This can be done using phpMyAdmin or MySQL.

(a) Using phpMyAdmin,

i) Log in to phpMyAdmin, and enter a database name of your choice, for example wordpress. Click Create.

ii) Go to Privileges, and see if there's a user for wordpress. If not, then create one. Click on Add a new user, and enter a user name and a password for the user. Make sure you have Use text field: selected in the drop down menu.

iii) Click Go.

iv) GO to Privileges again and click the Edit icon in the last column Action of User overview for wordpress.

v) Under Database-specific privileges, select wordpress from the Add privileges to the following database drop down menu. The page refreshes. Click Check All to select all privileges, and click Go.


(b) Using MySQL,

i) varsha@varsha-laptop:/var/www$ mysql -u root -p
Enter password:


ii) mysql> CREATE DATABASE wordpress;

iii) Assuming you are creating a user wp_user for the database wordpress (you may use a different username),

mysql> CREATE USER wp_user;


iv) Choose a password of your choice.

mysql> SET PASSWORD FOR wp_user = PASSWORD("password");


v) mysql> GRANT ALL PRIVILEGES ON wordpress.* TO "wp_user"@”localhost” IDENTIFIED BY "password";

vi) mysql> FLUSH PRIVILEGES;

vii) mysql> EXIT


Configuration


1. Go to the wordpress directory.

varsha@varsha-laptop:~$ cd /var/www/wordpress

2.We need a configuration file for Wordpress.

varsha@varsha-laptop:/var/www$ sudo cp wp-config-sample.php wp-config.php

varsha@varsha-laptop:/var/www$ sudo gedit wp-config.php

Go to the 19th line and make changes accordingly.

// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'wordpress');

/** MySQL database username */
define('DB_USER', 'wp_user');

/** MySQL database password */
define('DB_PASSWORD', 'password');

/** MySQL hostname */
define('DB_HOST', 'localhost');

Save and exit.

3. Open your browser and in the address bar type: http://127.0.0.1/wordpress/. You'll get a Wordpress Welcome page. Enter a Site Title, Username, Password and Your E-mail. Check Allow my site to appear in search engines like Google and Technorati, if you opt for it. Click Install Wordpress.


Installation complete!