Tuesday, November 17, 2009

Print Page - Customize Xfce 4.6 logout dialog

Print Page - Customize Xfce 4.6 logout dialog: "In a terminal emulator, Xfce terminal, xterm no matter which one:
Code:

xfconf-query -c xfce4-session -np '/shutdown/ShowSuspend' -t 'bool' -s 'false'

and
Code:

xfconf-query -c xfce4-session -np '/shutdown/ShowHibernate' -t 'bool' -s 'false'"

Friday, November 13, 2009

Intel PRO1000/VT Quad Nic IGB Driver - Untangle Forums

Intel PRO1000/VT Quad Nic IGB Driver - Untangle Forums: "How to compile the Intel IGB driver for an Intel Pro1000/VT quad port NIC.

These directions are based on a clean install of Untangle 6.0.2
lines beginning with -- need to be type in the terminal

Install a fresh copy of Untangle 6.0.2

Add your repositories

-- vi /etc/apt/sources.list

deb http://archive.debian.org/debian sarge main contrib non-free
deb http://user:metavize@updates.untangle.com/untangle stable main premium upstream

save your file with by pressing esc : wq and press enter

Note: you'll need the headers for the current kernel you are running. If you are not running Untangle 6.0.2, you may have a different Kernel. To determine your kernel version, issue a uname -a command. In my case it's 2.6.22-15


-- apt-get update
-- apt-get install make gcc linux-headers-2.6.22-15-untangle


download your nic drivers and untar

-- tar -xf igb-1.3.8.6.tar
-- cd igb-1.3.8.6
- cd src
-- make clean
-- make install
optional: modprobe igb or just reboot

You should see the additional nics in the web interface under Config->Network->Interfaces. I also then removed the 2 additional apt sources added in this document. I'm not sure if this step was necessary, but figured why not.

Also, some say that you need to add the driver/module to /etc/modules, but in my case I didn't have to. To verify that it is working, you can just issue an ifconfig -a and see the new interfaces."

Wednesday, November 4, 2009

HowTo Achieve "Ubuntu-Desktop-Minimal" - Ubuntu Forums

HowTo Achieve "Ubuntu-Desktop-Minimal" - Ubuntu Forums: "#!/bin/bash ####################################################################### # Ubuntu-Desktop-Minimal: Post-install script to install only the bare # essentials of an Ubuntu Desktop. ####################################################################### echo '[*] Installing Gnome Essentials' sudo apt-get -y install gnome-core gdm network-manager-gnome fast-user-switch-applet \ human-theme x11-xserver-utils tangerine-icon-theme gnome-themes-ubuntu ubuntu-artwork \ jockey-gtk gnome-screensaver gnome-utils echo '[*] Installing Application Essentials' sudo apt-get install -y gcalctool tsclient"

Saturday, October 31, 2009

Bring window to the front instead of launching new instance [Archive] - Ubuntu Forums

Bring window to the front instead of launching new instance [Archive] - Ubuntu Forums: "I want a launcher on my panel for Thunderbird (for example). But I want this launcer to check if an instance of Thunderbird is already open on the desktop: if it is open, then I just want to bring that window to the front; otherwise, I want to just launch Thunderbird. These days (with dapper), I think that t-bird just behaves this way without needing to mess around like this. But I'll illustrate with t-bird.

To do this, I first installed wmctrl from the universe repostirories. This is a command-line utility that can list open windows, bring them to the front etc. Then I wrote a script, using wmctrl. Then I created a launcher on the panel, which just runs the script. For thunderbird, the script looked like this (excluding the annotations in blue):

#! /bin/bash

WINTITLE='Mail/News' # Main Thunderbird window has this in titlebar
PROGNAME='mozilla-thunderbird' # This is the name of the binary for t-bird

# Use wmctrl to list all windows, count how many contain WINTITLE,
# and test if that count is non-zero:

if [ `wmctrl -l | grep -c '$WINTITLE'` != 0 ]
then
wmctrl -a '$WINTITLE' # If it exists, bring t-bird window to front
else
$PROGNAME & # Otherwise, just launch t-bird
fi
exit 0


Save this script as 'my-tbird-script' and make it executable. Click on panel, and create a 'Custom Application Launcher ... '. Make the command point to your script. Give it the t-bird icon. Change WINTITLE and PROGNAME to adapt your script to any other application.

As I said, for t-bird this is redundant now, I believe. For gnome-terminal, it is a bit tricky, because the title-bar doesn't have a 'signature' that makes it easily recognizable in the list of windows. You can work around that by changing your default profile in terminal so that the title bar always contains 'Terminal'."

Thursday, October 29, 2009

How To Install Squid in Ubuntu Linux | e-HealthExpert.org

How To Install Squid in Ubuntu Linux | e-HealthExpert.org: "note - to see only the lines that aren't blanks or don't start with a # use: sudo grep '^[^#]' /etc/squid/squid.conf"

Simple howtos

Simple howtos: "Connect to VNC behind NAT
Suppose a Windows client with VNC listening on port 5900 has to be accessed from behind NAT. On client cliwin to gate:

# ssh -R 15900:localhost:5900 user@gate

On client cliadmin (from host to gate):

# ssh -L 5900:localhost:15900 admin@gate

Now the admin can connect directly to the client VNC with:

# vncconnect -display :0 localhost"

Wednesday, October 28, 2009

help creating a cron job (ssh tunnel) - Ubuntu Forums

help creating a cron job (ssh tunnel) - Ubuntu Forums: "help creating a cron job (ssh tunnel)
i need to establish and keep alive a reverse ssh tunnel. but i only want to do this over the weekend. i need to establish the connection late friday night, and terminate the connection late sunday night.

here is the script i'm using to establish the connection:
Code:

#!/bin/sh

# $REMOTE_HOST is the name of the remote system
REMOTE_HOST=my.home.system

# $REMOTE_PORT is the remote port number that will be used to tunnel
# back to this system
REMOTE_PORT=5000

# $COMMAND is the command used to create the reverse ssh tunnel
COMMAND='ssh -N -R $REMOTE_PORT:localhost:22 $REMOTE_HOST'

# Is the tunnel up? Perform two tests:

# 1. Check for relevant process ($COMMAND)
pgrep -f -x '$COMMAND' || $COMMAND

# 2. Test tunnel by looking at 'netstat' output on $REMOTE_HOST
ssh $REMOTE_HOST netstat -an | egrep 'tcp.*:$REMOTE_PORT.*LISTEN' \
> /dev/null 2>&1
if [ $? -ne 0 ] ; then
pkill -f -x '$COMMAND'
$COMMAND
fi"