Search This Blog

Friday, May 25, 2012

Network icon disabled in ubuntu 11.10/12.04


Firstly, stop the network manager service by typing in terminal:

sudo service network-manager stop



Open nautilus in sudo mode by typing in terminal:

sudo nautilus

Goto etc/NetworkManager and open  NetworkManager.conf.
Change the managed value to true:


Restart the Network Manger service by typing in:

sudo service network-manager start

And after that your Network Manger should be back online.

Source: http://solancer.blogspot.in/2011/10/network-icon-disappeared-in-ubuntu-1110.html

Wednesday, May 23, 2012

Jquery Version conflict

 

I am trying to use the Nivo JQuery Slider (http://nivo.dev7studios.com/) and a Scrollable Gallery (http://flowplayer.org/tools/demos/scrollable/index.html).

Now I have run into a problem, basically the Nivo Slider uses this JQuery Library:

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script> 

and the Scrollable Gallery uses this one:

<script src="http://cdn.jquerytools.org/1.2.5/full/jquery.tools.min.js"></script>

When both are enabled, only the thumbnail gallery works (because it's script import is done after the nivo's), when the 1.42 version is enabled only the Nivo works, and when only the 1.2.5 version is enabled only the Scrollable Gallery Works.

What should I do?

Solution:

up vote 5 down vote accepted

use this solution if you cannot use a single jQuery file for both the plugins:

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">
 
var jQuery_1_4_2 = jQuery.noConflict();
</script>
<script src="http://cdn.jquerytools.org/1.2.5/full/jquery.tools.min.js"></script>

To use jQuery 1.4.2, put the code using it in a SEF (Self Executing Function) like this:

(function($){
   
//code using jQuery 1.4.2
   
//here the $variable will be the jQuery object of 1.4.2
})(jQuery_1_4_2)

For jQuery 1.2.5, you can use $ variable directly.

UPDATE: Based on your comment, following is the way to use it.

If you want to use jQuery 1.4.2, use jQuery_1_4_2 object
For example: jQuery_1_4_2("#abc").slider(options)

If you want to use jQuery 1.2.5 use $ or jQuery object
For example: $("#abc").scrollable(options)



Source: http://stackoverflow.com/questions/6332111/jquery-version-conflict


Friday, May 18, 2012

Reliance Netconnect Broadband+ on Ubuntu

Reliance datacard to work perfectly on Ubuntu 10.04

1. First of all open up the terminal and run the following command

sudo apt-get update

2. Now we need to install wvdial so run the following command

sudo apt-get install wvdial

3. Now we need to install libusb-dev so run the following command

sudo apt-get install libusb-dev

4. Now we need to download usb-modeswitch and usb-modeswitch-data so go to the following links

usb-modeswitch usb-modeswitch-data . Download both the files and save them on your computer .

5. Now extract both the files and and go to extracted directories on by one (first go to usb-modeswitch). and run the following command as root

sudo make install

6. Now run the following command

sudo gedit /etc/usb_modeswitch.conf

and it will open gedit and paste the following text in it and save the file

# Configuration for the usb-modeswitch package, a mode switching tool for
# USB devices providing multiple states or modes
# This file is evaluated by the wrapper script "usb_modeswitch" in /lib/udev
# To enable an option, set it to "1", "yes" or "true" (case doesn't matter)
# Everything else counts as "disable"
# Disable automatic mode switching globally (e.g. to access the original
# install storage)
DisableSwitching=0
# Enable logging (results in a extensive report file in /var/log, named
# "usb_modeswitch_"
EnableLogging=1
# Huawei, newer modems
DefaultVendor= 0x12d1
DefaultProduct=0x1446
TargetVendor= 0x12d1
TargetProduct=140b
CheckSuccess=5

Now run the following command and it will again open gedit and paste the above text in it again and save it

sudo gedit /etc/usb-modeswitch.conf

7. Now run the following commands

sudo gedit /etc/wvdial.conf

it will again open gedit and you need to paste the following text in it.

[Dialer netconnect]
New PPPD = yes
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Modem Type = USB Modem
Baud = 460800
New PPPD = yes
Modem = /dev/ttyUSB0
ISDN = 0
Username = 93********
Password = 93*********
Phone = #777
Stupid Mode = 1
Auto DNS = 1
Check Def Route = 1

change the username and password with your 10 digit MDN number given on the box of datacard.
8. Now Save the file and reboot the computer. After reboot plugin your datacard and wait for 5 to 6 seconds . Now run the following command

sudo wvdial netconnect

you should see something like below after running the above command

--> Using interface ppp0
--> local IP address 115.242.127.250
--> remote IP address 220.224.141.129
--> primary DNS address 202.138.97.193


Source: http://harbhag.wordpress.com/2010/09/14/reliance-netconnect-broadband-on-ubuntu/

sudo: must be setuid root

This error means: permissions of the sudoers file has been changed.

Solution:

Boot into Recovery Mode and enter a shell prompt. Then run these two commands.
    chown root:root /usr/bin/sudo  chmod 4755 /usr/bin/sudo


To boot in recovery mode :
Hold the shift key down as soon as you poweron the computer. Silly grub2 hides menu by default unless it detects multiple OS.

Check permissions on this:

Code:
ls -la /etc/sudoers  -r--r----- 1 root root 828 2010-08-03 11:19 /etc/sudoers
To modify if permissions are wrong:
Code:
chown root:root /etc/sudoers
Code:
chmod 440 /etc/sudoers
Source: http://ubuntuforums.org/showthread.php?t=1548164

Tuesday, May 15, 2012

How to Install firefox 12 in ubuntu linux


A. Install Firefox 12 in 5 easy steps

1. Download

Download the release from the official channels page:
www.mozilla.com/firefox/channels/
A 64 bit build is also available in the x86_64 directory of Mozilla's FTP.

This how-to supposes that the downloaded file is saved in the "Downloads" directory situated in your home directory.

2. Extract

The downloaded file is a compressed .tar.bz2 archive. In case you want to Learn more on these extensions: tar, bzip2. To extract this juicy archive, open the Downloads directory. Look for a file named firefox-12.0.tar.bz2, right-click on it and select "extract here".

Alternatively, you can extract the archive from the command line:
cd ~/Downloads/
tar xjf firefox-12.0.tar.bz2

For those interested, here are the tar arguments used in the command:
x : eXtract
j : deal with bzipped file
f : read from a file (rather than a tape device)

The firefox-12.0.tar.bz2 archive can now be deleted.

3. Move to /opt

External programs like LibreOffice, Google Chrome, Adobe reader, ... are all installed in the /opt directory. If you want more info about why /opt, check out these two links:
Where to install my products on linux?
Filesystem Hierarchy Standard

If you already had a previous Firefox version installed in the /opt directory, remove it with the following command:
sudo rm -r /opt/firefox

Now move the firefox directory (which was created in your Downloads folder during extraction) to /opt:
sudo mv firefox /opt/firefox12

4. Set up symbolic links

Depending on you usage pattern, follow the instructions for case 1 OR for case 2.

Case 1: you want to use Firefox 12 as you default browser:

"Backup" the old Firefox launcher:
sudo mv /usr/bin/firefox /usr/bin/firefox-old

Create a symbolic link pointing to the new Firefox version:
sudo ln -s /opt/firefox12/firefox /usr/bin/firefox

No need to update your icons/shortcuts, they should now launch the new version of Firefox.

Your old Firefox version is still installed. If you want to use it, run firefox-old in a terminal or create shortcuts/icons referring to firefox-old.

Case 2: you want to keep using your "old" Firefox by default:

Create a symbolic link pointing to the new Firefox version:
sudo ln -s /opt/firefox12/firefox /usr/bin/firefox12

Launch the newly installed Firefox by running firefox12 in a terminal, or create shortcuts/icons referring to firefox12.

5. Updates & Final

Firefox 12 will manage its own updates independently of your system's package manager, an download subsequent releases. There will be no need to repeat the whole "procedure"... Enjoy Firefox 12!