2011 September

[How To] Change LightDM Background in Ubuntu 11.10

vim /etc/lightdm/unity-greeter.conf
search for background
source

By WladyX on 30 September, 2011 | Ubuntu | A comment?

squid X-forwarded-for logs

logformat squid [%{%d/%m/%Y-%H:%M:%S}tl] %un %{X-Forwarded-For}>h through %>a %Ss/%03Hs %rm/%Hs %ru %Sh/%h

cache_access_log /var/log/squid3/access.log squid

also

By WladyX on | General | A comment?

Add disk in vmware without reboot

echo – - – > /sys/class/scsi_host/host0/scan

By WladyX on | VMware | A comment?

NFS Server and Client Configuration in Ubuntu

Install NFS Server in Ubuntu

sudo apt-get install nfs-kernel-server nfs-common portmap

When configuring portmap do =not= bind loopback. If you do you can either edit /etc/default/portmap using the following

sudo vi /etc/default/portmap

or use the following command

sudo dpkg-reconfigure portmap

Restart Portmap using the following command

sudo /etc/init.d/portmap restart

NFS Server Configuration

NFS exports from a server are controlled by the file /etc/exports. Each line begins with the absolute path of a directory to be exported, followed by a space-seperated list of allowed clients.

You need to edit the exports file using the following command

sudo vi /etc/exports

Here are some quick examples of what you could add to your /etc/exports

For Full Read Write Permissions allowing any computer from 192.168.1.1 through 192.168.1.255

/files 192.168.1.1/24(rw,no_root_squash,async)

Or for Read Only from a single machine

/files 192.168.1.2 (ro,async)

save this file and exit

A client can be specified either by name or IP address. Wildcards (*) are allowed in names, as are netmasks (e.g. /24) following IP addresses, but should usually be avoided for security reasons.

A client specification may be followed by a set of options, in parenthesis. It is important not to leave any space between the last client specification character and the opening parenthesis, since spaces are intrepreted as client seperators.

Now you need to restart NFS server using the following command

sudo /etc/init.d/nfs-kernel-server restart

If you make changes to /etc/exports on a running NFS server, you can make these changes effective by issuing the command

sudo exportfs -a

Install NFS client support in Ubuntu

sudo apt-get install portmap nfs-common

This will install all the required packages for nfs client

Mounting manually

Example to mount server.mydomain.com:/files to /files. In this example server.mydomain.com is the name of the server containing the nfs share, and files is the name of the share on the nfs server

The mount point /files must first exist on the client machine.

Create files directory using the following command

sudo mkdir files

You need to mount the share using the following command

sudo mount server.mydomain.com:/files /files

Now you may need to restart services using the following command

sudo /etc/init.d/portmap restart
sudo /etc/init.d/nfs-common restart

Mounting at boot using /etc/fstab

If you want to mount using fstab file

sudo vi /etc/fstab

In this example my /etc/fstab was like this

server.mydomain.com:/files /files nfs rsize=8192,wsize=8192,timeo=14,intr

Change “servername.mydomain.com:/files”, and “/files” to match your server name,share name, and the name of the mount point you created.

Firewall Ports for NFS

If you have a firewall you need to make sure ports 32771, 111 and 2049 are open
Testing Your Configuration

Use the following command in terminal to test

mount /files

the mount point /files will be mounted from the server.

Other info:

#showmount -e server -> To know the filesystem exported by that server and to whom.
#showmount -a server -> To list the clients currently mounted the exported filesystem.

source

 

By WladyX on | Network, Ubuntu | A comment?

Ubuntu Font Family

By WladyX on | Style | A comment?

Sendmail flush queue

sendmail -q -v

source

By WladyX on 29 September, 2011 | Mail | A comment?

Installing Cygwin/X

Cygwin/X packages are located in the X11 category.

  • xorg-server (required, the Cygwin/X X Server)
  • xinit (required, scripts for starting the X server: xinit, startx, startwin (and a shortcut on the Start Menu to run it), startxdmcp.bat )
  • xorg-docs (optional, man pages)
  • X-start-menu-icons (optional, adds icons for X Clients to the Start menu)
  • You may also select any X client programs you want to use, and any fonts you would like to have available.
  • You may also want to ensure that the inetutils or openssh packages are selected if you wish to use telnet or ssh connections to run remote X clients.

source

By WladyX on | General | A comment?

Make pg_hba.conf Changes Activate Without Restarting Postgres

su - postgres
vi /var/lib/pgsql/data/pg_hba.conf
pg_ctl reload -D /var/lib/pgsql/data/

source

By WladyX on | General | A comment?

DBeaver – free universal database tool

Supported (tested) databases:

  • MySQL
  • Oracle
  • PostgreSQL
  • IBM DB2
  • Microsoft SQL Server
  • Sybase
  • ODBC
  • Java DB (Derby)
  • Firebird (Interbase)
  • HSQLDB
  • SQLite
  • Mimer
  • H2
  • IBM Informix
  • SAP MAX DB
  • Cache
  • Ingres
  • Linter
  • Any JDBC compliant data source

download

By WladyX on | Cool Apps, Mysql | A comment?

Programmatically open tab in gnome-terminal, execute command, and have tab stay open

cat /usr/local/bin/run-in-new-tab
#! /bin/bash

window=”$(xdotool search –class gnome-terminal | head -1)”
xdotool windowfocus $window
xdotool key shift+Up
xdotool type “$*”
xdotool key Return

source

By WladyX on 28 September, 2011 | Gnome, Scripts | A comment?