Categotry Archives: loni

0

Configuring APC (American Power Conversion) UPS Support for Linux

by

This was an old article from June 23, 2009 that was somehow lost.

Installing APC (American Power Conversion) UPS (Un-interruptible Power Source) Support for Ubuntu Linux

(debunking the half truths)

Information garnered from: apcupsd.org

first step

sudo apt-get install apcupsd

1. HALF-TRUTH: Problem
2.6 kernels use udev and some distributions to not configure it to automatically create /dev/usb/hiddev?? as they should, causing apcupsd to fail to locate the UPS.
Workaround

Edit the file /etc/udev/rules.d/50-udev.rules, and add the following:

KERNEL=”hiddev*”, NAME=”usb/hiddev%n”

This results in a boot time error in Ubuntu, and doesn’t work.

TRUTH: This doesn’t work, don’t use it.

——–

2. HALF-TRUTH: Problem
On some systems such as Slackware 10.0, no USB devices will show up (see the next section).
Workaround

Add the following to rc.local

mount -t usbdevfs none /proc/bus/usb

TRUTH: mount requires root access:

nwayno@H:/$ sudo mount -t usbdevfs none /proc/bus/usb
[sudo] password for nwayno:
mount: unknown filesystem type ‘usbdevfs’

And that didn’t work, but here’s why:

From man mount (output)

Earlier, usbfs was known as usbdevfs.
So the mount really should look like this:

sudo mount -t usbfs none /proc/bus/usb

3. Verifying Device Detection and Driver

To make sure that your USB subsystem can see the UPS, just do this from a shell prompt:

cat /proc/bus/usb/devices

and sure enough, this is what I got:

T: Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=1.5 MxCh= 0
D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=051d ProdID=0002 Rev= 1.06
S: Manufacturer=American Power Conversion
S: Product=Back-UPS BR 800 FW:9.o2 .D USB FW:o2
S: SerialNumber=QB0351236370
C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr= 24mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=00 Prot=00 Driver=usbhid
E: Ad=81(I) Atr=03(Int.) MxPS= 6 Ivl=10ms

This is what my apcupsd.conf file looks like:

Important things to change in the following:

UPSNAME WaynoUps # name for ups
UPSCABLE usb # type of cable
UPSTYPE usb # yes it’s usb
NISIP 0.0.0.0 # this is what made networking work chg from localhost
DEVICE

nwayno@Homer:/etc/apcupsd$ cat apcupsd.conf

#—– BEGIN /etc/apcupsd/apcupsd.conf —–
## apcupsd.conf v1.1 ##
#
# for apcupsd release 3.14.4 (18 May 2008) – debian
#
# “apcupsd” POSIX config file

#
# ========= General configuration parameters ============
#

# UPSNAME xxx
# Use this to give your UPS a name in log files and such. This
# is particulary useful if you have multiple UPSes. This does not
# set the EEPROM. It should be 8 characters or less.
UPSNAME WaynoUps

# UPSCABLE
# Defines the type of cable connecting the UPS to your computer.
#
# Possible generic choices for
are:
# simple, smart, ether, usb
#
# Or a specific cable model number may be used:
# 940-0119A, 940-0127A, 940-0128A, 940-0020B,
# 940-0020C, 940-0023A, 940-0024B, 940-0024C,
# 940-1524C, 940-0024G, 940-0095A, 940-0095B,
# 940-0095C, M-04-02-2000
#
UPSCABLE usb

# To get apcupsd to work, in addition to defining the cable
# above, you must also define a UPSTYPE, which corresponds to
# the type of UPS you have (see the Description for more details).
# You must also specify a DEVICE, sometimes referred to as a port.
# For USB UPSes, please leave the DEVICE directive blank. For
# other UPS types, you must specify an appropriate port or address.
#
# UPSTYPE DEVICE Description
# apcsmart /dev/tty** Newer serial character device,
# appropriate for SmartUPS models using
# a serial cable (not USB).
#
# usb Most new UPSes are USB. A blank DEVICE
# setting enables autodetection, which is
# the best choice for most installations.
#
# net hostname:port Network link to a master apcupsd
# through apcupsd’s Network Information
# Server. This is used if you don’t have
# a UPS directly connected to your computer.
#
# snmp hostname:port:vendor:community
# SNMP Network link to an SNMP-enabled
# UPS device. Vendor is the MIB used by
# the UPS device: can be “APC”, “APC_NOTRAP”
# or “RFC” where APC is the powernet MIB,
# “APC_NOTRAP” is powernet with SNMP trap
# catching disabled, and RFC is the IETF’s
# rfc1628 UPS-MIB. You usually want “APC”.
# Port is usually 161. Community is usually
# “private”.
#
# dumb /dev/tty** Old serial character device for use
# with simple-signaling UPSes.
#
# pcnet ipaddr:username:passphrase
# PowerChute Network Shutdown protocol
# which can be used as an alternative to SNMP
# with AP9617 family of smart slot cards.
# ipaddr is the IP address of the UPS mgmt
# card. username and passphrase are the
# credentials for which the card has been
# configured.
#
UPSTYPE usb
DEVICE

# POLLTIME
# Interval (in seconds) at which apcupsd polls the UPS for status. This
# setting applies both to directly-attached UPSes (UPSTYPE apcsmart, usb,
# dumb) and networked UPSes (UPSTYPE net, snmp). Lowering this setting
# will improve apcupsd’s responsiveness to certain events at the cost of
# higher CPU utilization. The default of 60 is appropriate for most
# situations.
#POLLTIME 60

# LOCKFILE # Path for device lock file. Not used on Win32.
LOCKFILE /var/lock

# SCRIPTDIR # Directory in which apccontrol and event scripts are located.
SCRIPTDIR /etc/apcupsd

# PWRFAILDIR # Directory in which to write the powerfail flag file. This file
# is created when apcupsd initiates a system shutdown and is
# checked in the OS halt scripts to determine if a killpower
# (turning off UPS output power) is required.
PWRFAILDIR /etc/apcupsd

# NOLOGINDIR # Directory in which to write the nologin file. The existence
# of this flag file tells the OS to disallow new logins.
NOLOGINDIR /etc

#
# ======== Configuration parameters used during power failures ==========
#

# The ONBATTERYDELAY is the time in seconds from when a power failure
# is detected until we react to it with an onbattery event.
#
# This means that, apccontrol will be called with the powerout argument
# immediately when a power failure is detected. However, the
# onbattery argument is passed to apccontrol only after the
# ONBATTERYDELAY time. If you don’t want to be annoyed by short
# powerfailures, make sure that apccontrol powerout does nothing
# i.e. comment out the wall.
ONBATTERYDELAY 6

#
# Note: BATTERYLEVEL, MINUTES, and TIMEOUT work in conjunction, so
# the first that occurs will cause the initation of a shutdown.
#

# If during a power failure, the remaining battery percentage
# (as reported by the UPS) is below or equal to BATTERYLEVEL,
# apcupsd will initiate a system shutdown.
BATTERYLEVEL 5

# If during a power failure, the remaining runtime in minutes
# (as calculated internally by the UPS) is below or equal to MINUTES,
# apcupsd, will initiate a system shutdown.
MINUTES 3

# If during a power failure, the UPS has run on batteries for TIMEOUT
# many seconds or longer, apcupsd will initiate a system shutdown.
# A value of 0 disables this timer.
#
# Note, if you have a Smart UPS, you will most likely want to disable
# this timer by setting it to zero. That way, you UPS will continue
# on batteries until either the % charge remaing drops to or below BATTERYLEVEL,
# or the remaining battery runtime drops to or below MINUTES. Of course,
# if you are testing, setting this to 60 causes a quick system shutdown
# if you pull the power plug.
# If you have an older dumb UPS, you will want to set this to less than
# the time you know you can run on batteries.
TIMEOUT 0

# Time in seconds between annoying users to signoff prior to
# system shutdown. 0 disables.
ANNOY 300

# Initial delay after power failure before warning users to get
# off the system.
ANNOYDELAY 60

# The condition which determines when users are prevented from
# logging in during a power failure.
# NOLOGON [ disable | timeout | percent | minutes | always ]
NOLOGON disable

# If KILLDELAY is non-zero, apcupsd will continue running after a
# shutdown has been requested, and after the specified time in
# seconds attempt to kill the power. This is for use on systems
# where apcupsd cannot regain control after a shutdown.
# KILLDELAY 0 disables
KILLDELAY 0

#
# ==== Configuration statements for Network Information Server ====
#

# NETSERVER [ on | off ] on enables, off disables the network
# information server. If netstatus is on, a network information
# server process will be started for serving the STATUS and
# EVENT data over the network (used by CGI programs).
NETSERVER on

# NISIP
# IP address on which NIS server will listen for incoming connections.
# This is useful if your server is multi-homed (has more than one
# network interface and IP address). Default value is 0.0.0.0 which
# means any incoming request will be serviced. Alternatively, you can
# configure this setting to any specific IP address of your server and
# NIS will listen for connections only on that interface. Use the
# loopback address (127.0.0.1) to accept connections only from the
# local machine.
#NISIP 127.0.0.1
#
# change ip from local host to any interface GU 07/07/2009
#
NISIP 0.0.0.0

# NISPORT default is 3551 as registered with the IANA
# port to use for sending STATUS and EVENTS data over the network.
# It is not used unless NETSERVER is on. If you change this port,
# you will need to change the corresponding value in the cgi directory
# and rebuild the cgi programs.
NISPORT 3551

# If you want the last few EVENTS to be available over the network
# by the network information server, you must define an EVENTSFILE.
EVENTSFILE /var/log/apcupsd.events

# EVENTSFILEMAX
# By default, the size of the EVENTSFILE will be not be allowed to exceed
# 10 kilobytes. When the file grows beyond this limit, older EVENTS will
# be removed from the beginning of the file (first in first out). The
# parameter EVENTSFILEMAX can be set to a different kilobyte value, or set
# to zero to allow the EVENTSFILE to grow without limit.
EVENTSFILEMAX 10

#
# ========== Configuration statements used if sharing =============
# a UPS with more than one machine

#
# Remaining items are for ShareUPS (APC expansion card) ONLY
#

# UPSCLASS [ standalone | shareslave | sharemaster ]
# Normally standalone unless you share an UPS using an APC ShareUPS
# card.
UPSCLASS standalone

# UPSMODE [ disable | share ]
# Normally disable unless you share an UPS using an APC ShareUPS card.
UPSMODE disable

#
# ===== Configuration statements to control apcupsd system logging ========
#

# Time interval in seconds between writing the STATUS file; 0 disables
STATTIME 0

# Location of STATUS file (written to only if STATTIME is non-zero)
STATFILE /var/log/apcupsd.status

# LOGSTATS [ on | off ] on enables, off disables
# Note! This generates a lot of output, so if
# you turn this on, be sure that the
# file defined in syslog.conf for LOG_NOTICE is a named pipe.
# You probably do not want this on.
LOGSTATS off

# Time interval in seconds between writing the DATA records to
# the log file. 0 disables.
DATATIME 0

# FACILITY defines the logging facility (class) for logging to syslog.
# If not specified, it defaults to “daemon”. This is useful
# if you want to separate the data logged by apcupsd from other
# programs.
#FACILITY DAEMON

#
# ========== Configuration statements used in updating the UPS EPROM =========
#

#
# These statements are used only by apctest when choosing “Set EEPROM with conf
# file values” from the EEPROM menu. THESE STATEMENTS HAVE NO EFFECT ON APCUPSD.
#

# UPS name, max 8 characters
#UPSNAME UPS_IDEN

# Battery date – 8 characters
#BATTDATE mm/dd/yy

# Sensitivity to line voltage quality (H cause faster transfer to batteries)
# SENSITIVITY H M L (default = H)
#SENSITIVITY H

# UPS delay after power return (seconds)
# WAKEUP 000 060 180 300 (default = 0)
#WAKEUP 60

# UPS Grace period after request to power off (seconds)
# SLEEP 020 180 300 600 (default = 20)
#SLEEP 180

# Low line voltage causing transfer to batteries
# The permitted values depend on your model as defined by last letter
# of FIRMWARE or APCMODEL. Some representative values are:
# D 106 103 100 097
# M 177 172 168 182
# A 092 090 088 086
# I 208 204 200 196 (default = 0 => not valid)
#LOTRANSFER 208

# High line voltage causing transfer to batteries
# The permitted values depend on your model as defined by last letter
# of FIRMWARE or APCMODEL. Some representative values are:
# D 127 130 133 136
# M 229 234 239 224
# A 108 110 112 114
# I 253 257 261 265 (default = 0 => not valid)
#HITRANSFER 253

# Battery charge needed to restore power
# RETURNCHARGE 00 15 50 90 (default = 15)
#RETURNCHARGE 15

# Alarm delay
# 0 = zero delay after pwr fail, T = power fail + 30 sec, L = low battery, N = never
# BEEPSTATE 0 T L N (default = 0)
#BEEPSTATE T

# Low battery warning delay in minutes
# LOWBATT 02 05 07 10 (default = 02)
#LOWBATT 2

# UPS Output voltage when running on batteries
# The permitted values depend on your model as defined by last letter
# of FIRMWARE or APCMODEL. Some representative values are:
# D 115
# M 208
# A 100
# I 230 240 220 225 (default = 0 => not valid)
#OUTPUTVOLTS 230

# Self test interval in hours 336=2 weeks, 168=1 week, ON=at power on
# SELFTEST 336 168 ON OFF (default = 336)
#SELFTEST 336

#—– END /etc/apcupsd/apcupsd.conf —–

————-

4. Testing

HALF-TRUTH: Run apctest by invoking it with no arguments.

It will read your installed apcupsd.conf configuration (so it knows where to find the UPS) and then it will present you with the following output:

nwayno@H:/etc/apcupsd$ apctest

Could not create apctest.output: Permission denied
2009-06-22 18:18:59 Could not create apctest.output: Permission denied
apctest 3.14.4 (18 May 2008) debian
Could not create apctest.output: Permission denied
Checking configuration …
Could not create apctest.output: Permission denied
Attached to driver: usb
Could not create apctest.output: Permission denied
sharenet.type = DISABLE
Could not create apctest.output: Permission denied
cable.type = USB_CABLE
Could not create apctest.output: Permission denied

You are using a USB cable type, so I’m entering USB test mode
Could not create apctest.output: Permission denied
mode.type = USB_UPS
Could not create apctest.output: Permission denied
Setting up the port …
Could not create apctest.output: Permission denied

TRUTH: apctest requires ROOT access

nwayno@H:/etc/apcupsd$ sudo apctest

2009-06-22 18:16:59 apctest 3.14.4 (18 May 2008) debian
Checking configuration …
Attached to driver: usb
sharenet.type = DISABLE
cable.type = USB_CABLE

You are using a USB cable type, so I’m entering USB test mode
mode.type = USB_UPS
Setting up the port …
Hello, this is the apcupsd Cable Test program.
This part of apctest is for testing USB UPSes.

Getting UPS capabilities…SUCCESS

Please select the function you want to perform.

1) Test kill UPS power
2) Perform self-test
3) Read last self-test result
4) Change battery date
5) View battery date
6) View manufacturing date
7) Set alarm behavior
8 ) Set sensitivity
9) Set low transfer voltage
10) Set high transfer voltage
11) Quit

Select function number: 11

2009-06-22 18:17:14 End apctest.
nwayno@H:/etc/apcupsd$

5. HALF Truth:

and the client machine side: (SuSE)

## apcupsd.conf v1.1 ##
UPSCABLE ether
UPSTYPE net
LOCKFILE /var/lock
DEVICE server-network-address:3551
UPSCLASS standalone
UPSMODE disable
POLLTIME 10

infact it won’t work as is:

Change POLLTIME to NETTIME

so the file on the CLIENT looks like:

## apcupsd.conf v1.1 ##
UPSCABLE ether
UPSTYPE net
LOCKFILE /var/lock
DEVICE 192.168.0.102:3551
UPSCLASS standalone
UPSMODE disable
NETTIME 10

NOTE: You may need to bring down the firewall on the server side:

sudo ufw disable

6. and if we did our home work right — pulling the plug:

Broadcast Message from root@H (somewhere) at 17:09 (SERVER/UBUNTU)

Power failure on UPS WaynoUps. Running on batteries. (SERVER/UBUNTU)

Broadcast Message from root@P (somewhere) at 17:09 (CLIENT/SuSE)

Power failure on UPS WaynoUps. Running on batteries. (CLIENT/SuSE)

Broadcast Message from root@H (somewhere) at 17:10 (SERVER/UBUNTU)

Power has returned on UPS WaynoUps… (SERVER/UBUNTU)

Broadcast Message from root@P (somewhere) at 17:10 (CLIENT/SuSE)

Power has returned on UPS WaynoUps… (CLIENT/SuSE)

(thanks to Loni/lornix.com) for her assistance in figuring out why the client side wouldn’t work.

ADDENDUM: thanks Loni

11

Stabilizing an atheros ar9485 (ath9k) connection in Linux (Wheezy)

by

If you search the internet, one of the issues that seems to come up a lot, are connectivity issues with the atheros AR 9485 card.

I am configuring a new laptop, an HP Pavilion G6-2323DX for my Mom. I ran into many issues that caused me to have to do hokey pokey.

This is pure hokey pokey. But it does work.

The operating system I am using is Debian/Wheezy V 7 RC 1 (64 Bit)

If you do a uname -a I get back:

Linux AnnLin 3.2.0-4-amd64 #1 SMP Debian 3.2.41-2 x86_64 GNU/Linux

Let’s just step by step check things.

1. let’s see if Linux see’s the card:


lspci | grep Wireless

You will get back a line like:

02:00.0 Network controller: Atheros Communications Inc. AR9485 Wireless Network Adapter (rev 01)

That means Linux sees it, but of course it is NOT configured.

2. Let’s see if the driver (ath9k) is loaded. We will use modprobe.


modprobe ath9k

if the device driver is loaded, it will just return a prompt. That’s a “good thing” as Martha would say.

3. Let’s look to make sure the wpa-supplicant programme is installed. The WPA supplicant provides wireless protected access (encryption) for our connection.


dpkg -l | grep supplicant

and you should get back:

ii wpasupplicant 1.0-3+b2
amd64 client support for WPA and WPA2 (IEEE 802.11i)

We’re good!

4. Now let’s modify /etc/network/interfaces


cd /etc/network # go to network interfaces
sudo cp interfaces interfaces.org # make a backup copy
sudo nano interfaces

You will get back something like this:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

#define the network interface for the wireless lan card
iface wlan0 inet dhcp
wpa-ssid MyHome
wpa-psk MyPass

wpa-ssid is the name of the wireless network you are trying to connect to. wpa-psk is the password for that network. Yup plain text!

The iface line defines wlan0 so it has access to the internet, and gets it’s ip address dynamically (dhcp).

The card interface is STILL not up!

5. Bring up the interface!


sudo ifdown wlan0; sudo ifup wlan0;

you will get output that looks like:

ifdown: interface wlan0 not configured
Internet Systems Consortium DHCP Client 4.2.2
Copyright 2004-2011 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Listening on LPF/wlan0/20:16:d8:e5:32:b4
Sending on LPF/wlan0/20:16:d8:e5:32:b4
Sending on Socket/fallback
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 8
DHCPREQUEST on wlan0 to 255.255.255.255 port 67
DHCPOFFER from 192.168.1.1
DHCPACK from 192.168.1.1
bound to 192.168.1.4 — renewal in 37985 seconds.

6. AND NOW THE HOKEY POKEY PART 1!

Install wicd (Wireless Interface Connection Daemon)


sudo apt-get install wicd

once that is installed, REMOVE the gnome network mangler!


sudo apt-get purge network-manager-gnome

7. HOKEY POKEY PART 2!

Reboot the machine. After re-booting bring up the interface.


sudo ifdown wlan0; sudo ifup wlan0;

It should look like this:

Wicd

8. HOKEY POKEY PART 3!

now go back to /etc/network/interfaces and remove (or comment out with a # in front the wpa-ssid, and wpa-pskid for the wlan card. so just: iface wlan0 inet dhcp and whatever else was there — just not the wpa information.


cd /etc/network # go to network interfaces
sudo nano interfaces

9. Restart the network:


sudo /etc/init.d/networking restart

you will get back something like this:

[….] Running /etc/init.d/networking restart is deprecated because it may not[warnnable some interfaces … (warning).
[….] Reconfiguring network interfaces…Internet Systems Consortium DHCP Client 4.2.2
Copyright 2004-2011 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/wlan0/20:16:d8:e5:32:b4
Sending on LPF/wlan0/20:16:d8:e5:32:b4
Sending on Socket/fallback
DHCPRELEASE on wlan0 to 192.168.1.1 port 67

this basically makes sure we don’t have any errors in /etc/network/interfaces

10. HOKEY POKEY PART 4

Reboot once again, and this time the interface should come up automatically. Screensaver engagement should not knock the connection offline.

And that’s what it’s all about!

I have to thank 3 people for all their help. Joe, Loni and Frances.

Wayno

0

Congratulations, Loni!

by

Loni and the Kitty

Loni and the Kitty

A welcome contributor to this site, and personal friend Loni, is leaving soon for a new job in the big city.

Thank you for all your assistance, tutoring, and mentoring. Loni always made me work to find the right answer. Sometimes it was RTFM. But she always pointed me in the right direction.

On behalf of all the followers and subscribers to pkill-9, I think you.

Yes, it was Loni after all, who came up for the name of this website!

Thanks old friend,

Wayno

0

old.pkill-9.com is now part of the Creative Commons Community

by

Knowledge should ALWAYS be free. As such, I am passing all the contents of this website into the Creative Commons Community.

This work is now licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. Share and share alike.

Thanks Joe and Loni for your wisdom, guidance, and mentoring spirit.


Creative Commons Logo

6

de-smurfing youtube (or why are all the people on youtube blue?)

by

It’s a Blue World. Thanks to this awesome flashplayer bug!

I am running 64 bit Debian Squeeze. And well, when I went to watch an episode of hak5 I had smurf vision!

Darren and Shannon from Hak5 as Smurfs

Darren and Shannon from Hak5.org as Smurfs

Hey guys. I didn’t know you drank too much blueberry juice. Who knew?

This is what’s currently installed:


dpkg -l | grep flashplugin

output look like:

ii flashplugin-nonfree 1:2.8.2 Adobe Flash Player – browser plugin

Yes, that’s in the Debian 64 bit multimedia repo.

EASY FIX!

1. This is from VirtualNexus (comments below)

For videos with reversed colors in youtube

Using the editor of your choice, add a file called /etc/adobe/mms.cfg and insert the following line:


EnableLinuxHWVideoDecode = 1

2. Restart your browser.

Darren and Shannon magically de-smurfed

Hey guys. Glad to see you’re off the blueberry juice!

Thanks Loni, for the title! Thanks VirtualNexus for this easy fix!

Wayno

2

Finding and installing 64 bit Firefox and Thunderbird for Debian

by

Let’s face it. Rebranded software (Icedove for Thunderbird and Iceweasel for Firefox) on Debian works, but they are UBER old. And if you are trying to get 64 bit versions of Firefox and Thunderbird. Good luck!

IceWeasel (rebranded Firefox Version 3!) is pre-installed. However Icedove does NOT come pre-installed.

The programmes on the mozilla site, are 32 bit critters. Which don’t always work in a 64 bit environment.

As a minimum, if you want to use the 32 bit Firefox or Thunderbird off the mozilla site, you will need to have at least the following 32 bit libraries installed on your 64 bit system:


sudo apt-get install ia32-libs
sudo apt-get install ia32-libs-gtk

Fortunately, I ran into Diopter on #debian on freenode.org

Here is where the latest stable 64 bit version are stored:

NOTE: IF YOU GET A 404 NOT FOUND, IT MEANS THAT THEY HAVE TAKEN THE SITE OFFLINE FOR AWHILE. TRY AGAIN LATER.

For the latest stable 64 bit Firefox

For the latest stable 64 bit Thunderbird

I have had some issues with the stable releases. So I use the nightly builds.

Nightly build for 64 bit Firefox (unstable)

Nightly build for 64 bit Thunderbird (unstable)

1. Once you have them downloaded, lets untar them to the right directory.


cd /usr/local

2. Now untar:


sudo tar -xjvf ~/Downloads/(name of file goes here)

-x says we want to extract the tar
-j says it is a bzip2 file
-v says we want verbose (lots of) output
-f says use archive mode

3. Rename the old “firefox” (icedove) in /usr/bin
NOTE that the # and anything that follows is a comment and does not need to be coded.


cd /usr/bin # go to /usr/bin directory
sudo mv firefox firefox.icedove

4. Now create a link to the new Firefox we just installed. I want it system wide so we need to create a symlink in /usr/bin to where the files are stored.

As always the octothorpe (# is a comment and need NOT be coded)

For Firefox:


cd /usr/bin #change to the usr/bin director
sudo ln -s /usr/local/firefox/firefox .

or /usr/local/thunderbird/thunderbird

NOTE: THE PERIOD AT THE END IS SIGNIFICANT. IT SAYS PLACE THE PROGRAM (SYMLINK) RIGHT HERE!

5. to confirm that you have everything right:


which firefox

and you will get output that looks like:

/usr/bin/firefox

(or thunderbird)

If you go to /usr/bin and do an ls -l you will see:

lrwxrwxrwx 1 root root 26 May 5 19:01 firefox -> /usr/local/firefox/firefox

(or thunderbird)

Thanks Joe and Loni!

Wayno

0

Why wifi may NOT work on an Android

by

Okay so I am new to the Android platform (as of this week). But for the life of me could NOT figure out why my wifi connection to my home network wouldn’t work.

I checked all the usual things. Signal strength, another network (thanks Jason whoever you are, for having an open unsecured network I could connect too), etc.

My friend Matt suggested this Android Application:

Wife Analyzer

Which is pretty handy for finding those other networks, channels, etc.

What I discovered however, was that I was 1 character off in my password. That’s why it would authenticate, connect, and then drop!

So having a password like: K00lJerkBe1b3r is different from:
K00lJerkBe1B3r

(It’s a song I don’t like, plus an artist I don’t like – make great passwords — please don’t use this one, even if you don’t like Justim Beiber too!

But anyway, that turned out to be my issue.

After getting the password fixed, I was then able to complete a 3.5 minute Skype call to my bud Tony in Pahonics

Thanks Matt, Tony, and Loni!

Wayno

0

A mini guide on converting from Ubuntu to Debian

by

How to convert from Ubuntu to Debian

This article will encompass a LOT of previous posts. This is NOT recommended for n00bs.

1. While you are downloading the Debian iso, it would be a good first step to backup /home/ and /etc/.

2. You can find simple rsync backup/restore scripts here.

3. Once the debian iso is downloaded, you should md5sum check it first. You can find the debian cd iso image checksums here.

4. Burn the iso (not copy to a cd – why this is NOT for n00bs) to a cd or dvd, depending on what you downloaded.

5. Installing from the DVD is quite different then Ubuntu. This is NOT a live cd, so you can’t experiment first.

The rest of this article will ass/u/me that you were able to install Debian sucessfully. Configuring Debian, requires some work!

1. The first thing that bit me in the buttocks (can we say that here?) – is rebranded software. You won’t find Firefox or Thunderbird. Instead you will find re-branded software. So icedove instead of Thunderbird, and IceWeasel instead of Firefox. Those are in the Debian Repositories. The problem with re-branded software, is that it is NOT upstream compatible. You can always choose to install the branded stuff (Firefox/Thunderbird) from the Mozilla site. If you need 64 bit Firefox or Thunderbird you can get find that here.

NOTE: the following code block assumes sudo (#3 below is fixed:)

As always anything with an octothorpe (#) is a comment and need not be coded.


sudo apt-get install icedove # get the re-branded thunderbird
sudo apt-get install iceweasel # get the re-branded firefox

2. The second thing is .profile so you will want to deal with that next.

3. Next, was how to easily do sudo in debian

By default – sudo does NOT work in Debian. And as you know, you get sort of used to using sudo in Ubuntu. There are some crazy ideas on how to fix this, but this is pretty easy and straight forward.

4. You probably need java run time

Guess what? That does NOT come pre-installed on Debian! You can easily add the java runtime environment (jre) for Debian.

5. if you need to restart the gdm in Debian, it’s gdm3 NOT gdm as in Ubuntu. So


sudo service gdm3 restart

6. By default, /usr/sbin is NOT in your path in Debian, but is in Ubuntu. How to fix? This was a little more complicated then I thought. But Joe had a neat fix! (so none of the system tasks are available – things like I dunno gparted, vsftpd, useradd, etc — are not accessible.)

By default, when Linux comes up, it executes /etc/profile. Within /etc/profile it sources /etc/profile.d/bashrc.local.sh

What do I mean by “sources?” Joe explains:

Executing a script is the normal way to do it. The script executes, then it exits, and it’s environment is gone forever.

When you source a script, you execute all the commands in the script and (it) remain(s) in the environment – keeping all changes made to same.

execute: /path/to/script.sh

source: source /path/to/script or more succinctly:

. /path/to/script

And that is what the following script does/ It uses a function called pathmunge to add the missing paths:


# /etc/bashrc.local.sh for Linux
#
# Local environment variables
#
export ORGANIZATION="Mirai Consulting"

#if [ $SHELL == '/bin/bash' ]; then

#
# Set prompt and aliases to something useful for an interactive shell
#

case "$-" in
*i*)
#
# Set prompt to something useful
#
case "$is" in
bash)
set -p
if test "$UID" = 0 ; then
PS1="u@h:w> "
else
tty=`tty`
PS1=`uname -n`': $PWD n(tty${tty#/dev/tty}): bash: ! > '
fi
;;
esac

case $TERM in
xterm)
PROMPT_COMMAND='echo -ne "�33]0;${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}�07"'
;;
screen)
PROMPT_COMMAND='echo -ne "�33_${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}�33\"'
;;
*)
PROMPT_COMMAND=''
;;
esac

# fix broken non-root path -

pathmunge () {
if ! echo $PATH | /bin/egrep -q "(^|:)$1($|:)" ; then
if [ "$2" = "after" ] ; then
PATH=$PATH:$1
else
PATH=$1:$PATH
fi
fi
}

#
# Path manipulation
#

pathmunge /sbin
pathmunge /usr/sbin
pathmunge /usr/local/sbin
pathmunge $HOME/sbin

unset pathmunge

set histexpand
export HISTCONTROL=ignoredups

alias ltr='ls -latr'
alias ll='ls -laFL'
alias lll='ll | less'

alias cls=clear
alias f=finger

sudo=''

alias maillog='$sudo tail -20 /var/log/mail.log'
alias postlog='$sudo grep postfix /var/log/mail | tail -40'
alias poplog='$sudo grep pop3-login /var/log/mail | tail -40'
alias msgs='$sudo tail -20 /var/log/messages'
alias krnl='$sudo tail -20 /var/log/kernel'
alias cmo='ls -Lltr /var/spool/mail'
alias psu='ps -FHu'
alias mqt='mailq|tail'
alias dmesg='/bin/dmesg|tail -40'

/bin/rm -f ~/.project
set `date`
echo "" >> ~/.project
echo " $LOGNAME logged in on `hostname` $1 $2 $3 $4" >> ~/.project
echo "" >> ~/.project

esac

#[ -r /etc/dircolors.sh ] && . /etc/dircolors.sh

alias addkey="sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys"

#fi

7. If you have Skype you will probably need to fix that as well.

This is just a first cut draft on the differences I noted between Ubuntu and Debian.

Thanks always to Joe and Loni.

1

Monitoring CPU and Motherboard Temperatures in Linux

by

And so I asked Loni:

is there a way to look at motherboard/cpu temps via an ssh connection?

She said sure!


sudo apt-get install lm-sensors
sudo sensors-detect
sensors

Restart kmod:


sudo /etc/init.d/kmod start

And you will get output that looks something like:

it really was that easy –

Adapter: SMBus I801 adapter at 3000
in0: +1.26 V (min = +0.00 V, max = +3.32 V)
Vcore: +1.14 V (min = +0.00 V, max = +2.99 V)
+3.3V: +3.33 V (min = +0.00 V, max = +4.38 V)
+5V: +5.10 V (min = +0.00 V, max = +6.64 V)
+12V: +12.06 V (min = +0.00 V, max = +15.94 V)
fan1: 2132 RPM (min = 0 RPM)
fan2: 0 RPM (min = 0 RPM)
fan3: 0 RPM (min = 0 RPM)
fan4: 657 RPM (min = 0 RPM)
temp1: +60.0°C (low = -127.0°C, high = +127.0°C)
M/B Temp: +41.0°C (low = -127.0°C, high = +127.0°C)
temp3: +48.0°C (low = -127.0°C, high = +127.0°C)
cpu0_vid: +0.000 V

Joe

for me I got:

sensors
acpitz-virtual-0
Adapter: Virtual device
temp1: +50.0°C (crit = +75.0°C)

k8temp-pci-00c3
Adapter: PCI adapter
Core0 Temp: +75.0°C
Core0 Temp: +72.0°C
Core1 Temp: +74.0°C
Core1 Temp: +73.0°C

(Yes I do have a dual core 64 bit AMD System)

Ahh as always. YMMV (your mileage may vary) applies!

Thanks Loni and Joe

Yup supposed to be 110F/43C here later this week!

Wayno

1 2 3