সোমবার, ১৬ সেপ্টেম্বর, ২০১৩

Live Blogging on how my proxy setting on Ubuntu is working back in the office

Following is a brief description of how I followed up with proxy

11:45 am: At home, I cleared  the setting in Dropbox preference for proxy setting. Then it worked. Now back in the office I put those manually. And Dropbox started to work again.

11:50 am: Chromium is not working. So what I do is
sudo vim /etc/chromium-browser/default
#Add proxy server detais in the following form
export http_proxy="http://rushadf:0302@127.0.01:3128/"

What I do is just remove the '#' sign to uncomment  "export....." command. But chromium is still not working.

12:01 am: Now I start following the instruction from the last post to see whether it make any changes. But before that let me see whether I can get synaptic to work in here.

12:06 pm: Got Synaptic to work  just fine. Just manually entered proxy information in Synaptic Preference and it worked just fine. But strange apt-get does not work.

12:11pm: Now let's follow the instructions from here:

sudo vi /etc/bash.bashr

Add your proxy server details in the following format

export http_proxy="http://username:password@proxyhost:port/"

export ftp_proxy="http://username:password@proxyhost:port/"
Since I already worked on this yesterday, I had those commented out when I got home. Now I uncomment those and they work just fine.

Chromium browser works!!!!!!!!!!!!!!

12:35 PM update: Chromium browser is not actually working. I just got fooled by the appearance of the website from the tabs. But whenever I put a new link or address they won't work.

Now let's check whether apt-get works or not.  "apt-get" is still not working. What we do now?

12:25 pm:  Let's try this tip from the same source as above:

Some releases sudo is configured in such a way that all environment variables all cleared when running the command. To keep the value for your http_proxy and fix this, you need to edit /etc/sudoers, run:

visudo 

Then find a line that states:

Defaults env_reset

and add this after it: 

Defaults env_keep = "http_proxy ftp_proxy"
Nah! apt-get is still not working.  What to do now?

12:29 pm:  I just check to see what's the output of this command:  echo $http_proxy
It returns a blank line.

12:39 pm: Now this is really strange. When  comment out the "Defaults env_keep = "http_proxy ftp_proxy" command, the chromium browser works back again. That's weird!

"apt-get" is still not working.

12:47  PM  :  Well, apt-get finally works after I  remove the "#" from the /etc/apt/apt.conf file in front of the following that starts like "Acquire::http::Proxy  "http://rushadf:0302@127.0.0.1:3128";

Seems like everything is working now again in the proxy setting.

To sum it up: To set the proxy work which is behind an ISA server what I do is the following from this site:

Install cntlm  and follow the instructions from the above site up to 1.4. Now to set-up proxy for different programs, I just repeat from the beginning what I have done today.


রবিবার, ১৫ সেপ্টেম্বর, ২০১৩

Proxy setting in Ubuntu is a real pain!

This is a very simple procedure to set up proxy in Lubuntu taken from here:

edit /etc/bash.bashrc by the following command

<code>
sudo vim /etc/bash.bashrc
export http_proxy="http://rushadf:0302@127.0.01:3128/"
export ftp_proxy="http://rushadf:0302@127.0.01:3128/"
</code>
To keep the value for http_proxy,you need to edit /etc/sudoers

<code>
visudo
</code>

Then find a line that states:
Defaults env_reset
and add this after it:
Defaults env_keep="http_proxy ftp_proxy"

for chromium:

sudo vim /etc/chromium-browser/default
#Add proxy server detais in the following form
export http_proxy="http://rushadf:0302@127.0.01:3128/"

It seems this is all there it is. Too good to be true?

Then what are those gsettings command?

gsettings set org.gonome.system.proxy.http host '172.16.4.84'
gsettings set org.gonome.system.proxy.http port '3128'
gsettings set org.gonome.system.proxy.http host '172.16.4.84'
gsettings set org.gonome.system.proxy.http host '172.16.4.84'
gsettings set org.gonome.system.proxy mode 'manual'
gsettings set org.gonome.system.proxy mode 'none'

# I also don't quite understand the difference between ~/.bashrc and /etc/bash.bashrc. But they have different line numbers.

Here I review some the proxy commands in Lubuntu that needs to be remembered:


cat /etc/environment

# The above command gives what is in environment variable

env | grep -i proxy

# This is anothe useful command to to look at which give all the proxy
# environment.

export http_proxy=

#Above command sets a null value for http_proxy.We can check whether that worked by the following command.

echo $http_proxy

#It should return a blank line.

শুক্রবার, ১৩ সেপ্টেম্বর, ২০১৩

It's All About Linux and Linux

I probably spend a good portion of a day and half on figuring out how installing Linux on my Samsung netbook. I wanted to find a suitable distro for my atom under-powered machine and thought I would give "Lubuntu" and "Easypeasy" a try. But the problem that I ran into is that I was unable to create a bootable USB drive with UNetbootin  which is one of the most excellent tools available for installing and trying out Linux distros. But in the Samsung, I did not find the option to boot from USB, as a result, it all failed. Then I tried to install it from the hard disk, the image .iso file but it did not work due to a well known but which prevents the distro to install if the live disk created by UNetbootin is in the same disk. It gives an error by stating to unmount the CDROM. This comes along because the USB acts as CDROM and since it is in the same disk as where we are trying to install the distro, the error comes along.

But there is a way out to do exactly that which I did not try. Here is the link:

http://community.linuxmint.com/tutorial/view/171

What I did is that found a way to activate USB boot option in Samsung by disabling the fast bios option in BIOS setup. Then I fired up unetbootin and  created Live CD for Lubuntu. Then freed up some space from the logical drive by using disk management in Windows 7. Then when I rebooted, the netbook nicely booted into untebootin boot window where you have the option to try it before installing. Anyway I liked it already so I went to direct installation. It went smoothly and I was ecstatic. But then I got greedy!

I freed up a little bit more space from my logical drive and installed Easypeasy in the same manner. But alas, what happened is that my Windows7 was gone from GRUB list. Then following the instructions on this page:

http://askubuntu.com/questions/83771/recovering-grub-after-installing-windows-7

Specially these simple commands worked just find to recover GRUB with windows on it:
To recover grub:
  1. Open the live version.
  2. Open the terminal and run sudo fdisk -l to see where Linux is installed.
  3. Run sudo mount /dev/sdaX /mnt where x is the number you have found Linux word in
  4. Run sudo grub-install --root-directory=/mnt /dev/sda to install grub.
  5. Run sudo update-grub to update grub and if this command didn't work run it after rebooting.
  6. Reboot.