Pages

Showing posts with label Bugs. Show all posts
Showing posts with label Bugs. Show all posts

Saturday, January 12, 2013

Missing power option in Ubuntu 12.04

There is a feature/bug in Ubuntu 12.04 that does not let you choose actions on critical battery. I finally found a solution to the problem
gsettings set org.gnome.settings-daemon.plugins.power critical-battery-action 'nothing'
As it turns out the option can be set if you use the non-GUI method. For those who wish that the laptop suspends instead of hibernate (defult action). You should use
gsettings set org.gnome.settings-daemon.plugins.power critical-battery-action 'suspend'
NOTE: sudo is not required

Thursday, October 27, 2011

Setting up network proxy in Ubuntu

Method 1: (Graphical)
Note: You probably need this method in order for the synaptics packet manager or the updates to work.
If you are using the Internet behind a proxy, then in order for apt and other Internet related services to work you need to configure an Internet proxy. You can do this using System/Preferences/Network Proxy. After setting the IP and port click on Apply system wide. It will ask for your password twice. You are done.
A note on the above method: This method works but when un-setting the proxy you may run into bugs, so this method is not recommended.

Manual Method (recommended)
You can set the proxy manually in the terminal (note: This method only works for applications that run in the terminal).

export http_proxy=http://192.168.1.1:8080
ftp_proxy=ftp://192.168.1.1:8080

Replace the IP and port in example with your proxy's IP and port.
Then you can test the connection using

wget www.yahoo.com
rm index.html

If wget is able to download the page it means your proxy has been configured correctly, the rm in the above command has been used to delete the test page downloaded using wget.
To unset the proxy

unset http_proxy
unset ftp_proxy

A known bug:
apt-get does not work when used with sudo, if you see that the downloading is getting stuck and not proceeding at all. You should probably use the following method


sudo su
export http_proxy=http://192.168.1.1:8080
apt-get install 

Additional notes:
If you have opened up multiple tabs of terminal,you would have to set proxy in each tab independently. This proxy setting does not hold once you close terminal.

Permanent method:
If you wish to setup proxy permanently, i.e. whenever you open up terminal the proxy is already set; then you need to make changes to your ~/.bashrc file as super user.

sudo gedit ~/.bashrc

When a window pops up enter the following lines at the very end of the file

export http_proxy=http://192.168.1.1:8080
export ftp_proxy=ftp://192.168.1.1:8080

Now you can either restart the terminal or

source ~/.bashrc

In order to remove the proxy in the future just simply comment/remove the lines you added

Special case: If you want to set proxy for all users, not just your own user, then you need to make changes mentioned above in the /etc/bash.bashrc

Sunday, August 15, 2010

Ubuntu suxs when you get to know it well! Its a nightmare

Make sure you do this

sudo dpkg-reconfigure adduser

Give "no" for an answer

Also don't forget to add this line to ~/.profile

umask 077

Then you may also want to do this

cp ~/.profile /etc/skel

this will change the default (pathetic) rights on files created by a user form 755 to 700. Note: this change will only be for users that are added after you made this change.

Or instead of changing and copying the ~./profile into etc/skel you may just simply change /etc/profile. At the end of this file you would find umask 022 change it to 077. Enjoy :)
Reference:
http://ubuntuforums.org/showpost.php?p=4461165&postcount=4

Tuesday, July 27, 2010

Hiberrnate, resume and restart issues in Ubuntu 10.04 : dell inspiron 1545

For those of you who are having problems with suspend and resume with your laptops using Ubuntu 10.04 here is a quick fix:

download and install uswsusp
Code:
sudo apt-get install uswsusp
Now you can try suspend and hibernate by giving the following commands
Code:
sudo s2disk
sudo s2ram --force
These will hopefully work. If they do not, you need to back up the following two files
Code:
sudo cp /usr/lib/hal/scripts/linux/hal-system-power-hibernate-linux /usr/lib/hal/scripts/linux/hal-system-power-hibernate-linux.bak
sudo cp /usr/lib/hal/scripts/linux/hal-system-power-suspend-linux /usr/lib/hal/scripts/linux/hal-system-power-suspend-linux.bak

Now replace the code in the following file
Code:
sudo gedit /usr/lib/hal/scripts/linux/hal-system-power-hibernate-linux
with:
#!/bin/bash
/usr/sbin/s2disk
And the code in
sudo gedit /usr/lib/hal/scripts/linux/hal-system-power-suspend-linux
with:
#!/bin/bash
/usr/sbin/s2ram --force

To fix the restart problem:
sudo apt-get install kexec-tools

Now
sudo gedit /etc/default/kexec
and make sure that load kexec is set to true.


Now restart your PC and enjoy :)

After following the above steps you will find that you can hibernate the PC when you click the hibernate button, but it will not hibernate once the battery runs low. For this you need to do a little bit of tweaking to make things right, first launch the global configuration editor
gconf-editor
Now navigate to apps/gnome-power-manager/general and uncheck use_time_for_policy.




Now you may wish to manually adjust the critical battery levels. For me the defaults were a bit too low :) To do so navigate to apps/gnome-power-manager/thresholds and adjust the percentages to your liking. I have set the percentage_action to 7, percentage_critical 10 and percentage_low at 20. Now when you have tweaked to your hearts content, click on close. Enjoy :) Happy hibernating!

Thursday, July 22, 2010

Dell 1545 wireless and Ubuntu

As it turns out wireless network does not work on Dell 1545 in Ubuntu. Here is a simple solution

Ubuntu:
------
Go to System->Administration->Hardware Drivers
Choose the Broadcom STA wireless driver
Activate

Sometimes the driver does not show up in the Hardware Drivers choices. In
this case, try reinstalling the driver from the GUI or shell like this:

From the GUI:
Package Manager (System>Administration>Synaptic Package Manager). Click the
Reload button in the upper left corner of Synaptic to refresh your index then
search for and reinstall the package named bcmwl-kernel-source.

Code:
sudo apt-get update
sudo apt-get --reinstall install bcmwl-kernel-source

in case the package was not already installed try
Code:
sudo apt-get install bcmwl-kernel-source


In either GUI or text case, after reinstalling, reboot your machine.

Or you may wish to download and manually install the driver from this link http://www.broadcom.com/support/802.11/linux_sta.php


Ndiswrapper method

If you don not have luck with the above method or you have a different device then you can try the Ndiswrapper technique. A detailed walk-through is given here https://help.ubuntu.com/community/WifiDocs/Driver/Ndiswrapper. For the curious, basically Ndiswrapper allows you to install and use windows drivers on Ubuntu. Good ain't it :D