Showing posts with label behind. Show all posts
Showing posts with label behind. Show all posts

Sunday, August 20, 2017

Unable to add ppa behind proxy

Unable to add ppa behind proxy


While trying to add softwares from sources other than the central debian repository, we may have to add a PPA (Personal Package Archive), so that the software(apt or aptitude) which installs other softwares fetches packages for us from the new location.

The default or normal method to add a PPA via command line is as follows:

sudo add-apt-repository ppa:something

However, if you are behind a proxy, you may not be able to add this way and when you try to do something like this:

sudo add-apt-repository ppa:gnome3-team/gnome3

you may get an error like this:

Cannot access PPA (https://launchpad.net/api/1.0/~gnome3-team/+archive/gnome3) to get PPA information, please check your internet connection.

This may happen even if you have added your proxy using System Settings -> Network -> Network proxy or in /etc/apt/apt.conf or even in /home/$USER/.bashrc. This is because the sudo user is not aware of the proxy set in the places above. This tutorial explains how to make this work to add a PPA the terminal way.

So lets get started. Please note that all commands and text hereon are case-senstive, take care not to make any typos hereon, to avoid messing up your system):

  • Open a terminal using Ctrl + Alt + t
  • Type
    export http_proxy="http://username:password@your proxy":"port"
    export https_proxy="https://username:password@your proxy":"port"
    Remember to replace "username" by your username and "password" by your password, if applicable, "your proxy" by your proxy address like 10.1.101.150 or proxy.college and "port" by something like 3128.
  • Now we have two methods to export these parameter to "sudo" user:
    Method 1:
  • Type sudo visudo
  • Add Defaults env_keep="https_proxy" to the end of the file. (Note that Defaults has a capital "d")
  • Type Ctrl + x and yto save and exit.
    Method 2:
  • Whenever you use sudo command, export the environment variables of the user you are currently using. To do this, when you use sudo, use sudo -E

You are now ready to add PPA using the terminal. Please let me know, via comments, if you face any issues while doing this.
Source: The bug filed regarding this at launchpad.

download file now

Read more »

Sunday, August 13, 2017

Ubuntu Applications Launching Behind Active Window

Ubuntu Applications Launching Behind Active Window


Problem

In Ubuntu distros after 12.04, I started noticing that some applications, such as nautilus and calculator, would appear behind the active window when launched using keyboard shortcuts. This was especially noticeable for people like me who set their windows to always appear in the center of the screen rather than being "smart" and just using any free window space.

Solution

    Launch compiz
    Navigate to the "general options" area.
    the third tab, "focus and raise behaviour", and set "focus prevention level" to "Off".

References


download file now

Read more »