How do I set a system-wide proxy in Lubuntu (or LXDE)?

System-wide proxies in Lubuntu or LXDE must be set via environment variables

Lubuntu uses the lightweight LXDE desktop environment which does not contain a graphical settings tool to set systemwide proxies (unlike the default Ubuntu desktop environment, Unity).

The proxies must therefore be set via configuration files. This is a relatively simple procedure, and screenshots of the editor are provided to assist you.

 

1. Set up the proxy/proxies for most programs

  • Open the /etc/environment file with gksudo leafpad (or your favorite editor). This file stores the system-wide variables initialized upon boot.
  • Add the following lines, modifying appropriately. You must duplicate in both upper-case and lower-case because (unfortunately) some programs only look for one or the other:
    http_proxy=http://myproxy.server.com:8080/
    https_proxy=http://myproxy.server.com:8080/
    ftp_proxy=http://myproxy.server.com:8080/
    no_proxy="localhost,127.0.0.1,localaddress,.localdomain.com"
    HTTP_PROXY=http://myproxy.server.com:8080/
    HTTPS_PROXY=http://myproxy.server.com:8080/
    FTP_PROXY=http://myproxy.server.com:8080/
    NO_PROXY="localhost,127.0.0.1,localaddress,.localdomain.com"
  • Screenshot: after running gksudo leafpad /etc/environment:

    enter image description here

    2. Then, set up the proxies for apt-get and Update Manager

  • These programs will not obey the environment variables. Create a file called 95proxies in /etc/apt/apt.conf.d/, and include the following:
    Acquire::http::proxy "http://myproxy.server.com:8080/";
    Acquire::ftp::proxy "ftp://myproxy.server.com:8080/";
    Acquire::https::proxy "https://myproxy.server.com:8080/";
  • Screenshot: after running gksudo leafpad /etc/apt/apt.conf.d/95proxies:

    enter image description here

3. Logout and Reboot

Finally, logout and reboot to make sure the changes take effect.

Copy from http://www.techques.com/question/24-155459/How-do-I-set-a-system-wide-proxy-in-Lubuntu-%28or-LXDE%29

 

Advertisements
By dbglory Posted in Linux

Lubuntu 13.10 – Install VirtualBox guest additions

Prerequisities:

Steps

1) Installing Vbox guest addition using VBox option, where we choose from the virtualbox menu “Devices” and then Install guest additions does not work directly. So run terminal and log in as the root with choosen password (sudo su). Then:

apt-get update
apt-get upgrade
apt-get intstall dkms

2) Mount the CDROM media with the additions (for example through VBox Devices menu).

3) Open terminal and copy run script from the cdrom (named VBOXADDITIONS_4_2.18_88780 in my case) to somewhere where we are able to run it

cp /path_to_your_cd_rom/VBOXADDITIONS_4_2.18_88780/VBoxLinuxAdditions.run /root/
cd /root
./VBoxLinuxAdditions.run

4) Now we have to reboot Lubuntu linux to complete guest additions installation complete.

By dbglory Posted in Linux

CentOS / Redhat Apache mod_ssl Configuration

The mod_ssl module provides strong cryptography for the Apache Web server via the Secure Sockets Layer (SSL) and Transport Layer Security (TLS) protocols. How do I install and configure mod_ssl under CentOS / Fedora / Redhat Enterprise Linux?

mod_ssl is the SSL/TLS module for the Apache HTTP server. You can use self signed certificate or 3rd party SSL certificate. This module provides SSL v2/v3 and TLS v1 support for the Apache HTTP Server. It was contributed by Ralf S. Engeschall based on his mod_ssl project and originally derived from work by Ben Laurie. This module relies on OpenSSL to provide the cryptography engine.

Step #1: Install mod_ssl

Type the following command as the root user to install mod_ssl, enter:
# yum install mod ssl Continue reading

How to Create a SSL Certificate on Apache for Ubuntu 12.04

What the Red Means

The lines that the user needs to enter or customize will be in red in this tutorial!

The rest should mostly be copy-and-pastable.



About SSL Certificates

A SSL certificate is a way to encrypt a site’s information and create a more secure connection. Additionally, the certificate can show the virtual private server’s identification information to site visitors. Certificate Authorities can issue SSL certificates that verify the server’s details while a self-signed certificate has no 3rd party corroboration. Continue reading

How To Upgrade To PHP 5.4 on Ubuntu

I am pretty sure I’ve mentioned  that among my various other duties at work, I manage the network security program as well. One of the things we have to do on a regular basis, which I think all companies should do, is perform frequent penetration tests on our public web servers. It is good to find your holes, and plug them up before the bad guys do. I mean, you hear about it all the time where companies report security breaches where millions of their users credit cards are stolen. If they were performing regular scans, they may have been able to prevent that. Continue reading

Joining MP3 music files to a single track

Joining MP3 files can be rather simple task with a cat command. Suppose we have a directory with multiple MP3 files. The following cat command will join all MP3 files in a current directory to a single file called out.mp3:

$ cat *.mp3 > out.mp3

If we wish to join only specific files we can name them on a command line separately:

$ cat file1.mp3 file2.mp3 > out.mp3 Continue reading 
By dbglory Posted in Linux

Delete Files Older Than x Days on Linux

The find utility on linux allows you to pass in a bunch of interesting arguments, including one to execute another command on each file. We’ll use this in order to figure out what files are older than a certain number of days, and then use the rm command to delete them.

Command Syntax

find /path/to/files* -mtime +5 -exec rm {} \;

Note that there are spaces between rm, {}, and \; Continue reading

By dbglory Posted in Linux

Vi[m]

Vi is an one of two powerhouse text editors in the Unix world, the other being EMACS. While obtuse, vi is extremely powerful and efficient. There may be times when vi is the only text editor available, so it helps to at least know the basics.

On Mac OS X (and Linux), vi is symlinked to vim (vi improved), a more modern free software version. Vim It is the default editor when changing a crontab.

If you gave vi a whirl and don’t see the beauty of it, give the nano editor a try. It also ships with Mac OS X. Continue reading

By dbglory Posted in Linux

Turn off Automatic updates in Ubuntu 11.10

One thing Ubuntu lovers like about Ubuntu is that it is “user friendly”, to me, it is “user friendly” only if the user doesn’t know what he is doing.

As an example I have automatic updates, it may be convenient that your operating system search for updates for you (If you do not know how to do it, or do not want to do it by yourself). But it is also annoying to have a pop-up appearing when you are working, just to remember you something you already know. I prefer to turn off automatic update feature. Continue reading

By dbglory Posted in Linux

How to Pass Arguments to Shell Script

Like UNIX commands, shell scripts also accept arguments from the command line.
They can, therefore, run non interactively and be used with redirection and
pipelines.

Positional Parameters:

Arguments are passed from the command line into a shell program using the
positional parameters $1 through to $9. Each parameter corresponds to the
position of the argument on the command line. Continue reading 
By dbglory Posted in Linux