Monthly Archives: August 2011

0

Ubuntu /etc/X11/xorg.conf from livecd fixes Debian Video Problems

by

I have been fighting video problems with Debian for a couple of weeks. I corrected the /etc/X11/xorg.conf file here.

If it looks familiar it should! This is the /etc/X11/xorg.conf file from the 64 bit Ubuntu 10.10 Livecd. I put it onto a usb flash drive, used sneaker net (which means I pulled it out of one machine, walked over, and put it into another), and copied it over. Restarted the gdm3 on 64 bit Debian Squeeze. I have full use of the hardware graphics capability and monitor sizes.

Using Ubuntu to fix Debian. Oh! I so love irony.

Thanks Joe for this crazy idea. But it worked!

Wayno

0

Debian DVD with missing device drivers and non-free software installed

by

Let’s face it. Debian != Ubuntu. It can be difficult to configure. But this DVD may help!

Debian DVD

BOTH 32 and 64 BIT SYSTEMS on the DVD (under $5)

The main advantages to this DVD over this free ones you can at the Debian Site are:

1. Comes with the non-free software already on the dvd.

2. Comes with drivers you’d have to hunt up, like the atheros wireless driver.

Order it here

Thanks Joe!

Wayno

0

How to look at email with a telnet client

by

This is pretty easy, but there are some caveats (warnings)

! ! ! W A R N I N G ! DANGER WILL ROBINSON! W A R N I N G ! ! !

Using this method, your userid and password are transmitted unsecured! in the open. For anyone to see. DO NOT ATTEMPT THIS ON A PUBLIC NETWORK. BAD IDEA!!

Why I do this? Sometimes someone sends a very large message to my parents, and they are not on a super fast connection. And they don’t want to spend 20 minutes downloading this, to find out it’s a joke from someone. Easy way to identify who sent the message, and delete the message, without having to spend the time to download it.

Port 110 is the POP (Post Office Protocol) port.

1. So let’s connect to the pop server:


telnet yourisps.mailserver 110

Trying 86.2.12.45…
Connected to yourisps.mailserver
Escape character is ‘^]’.
+OK abdefg InterMail POP3 server ready.

2. And type in the word “user” followed by your userid. I can not emphasize enough. Your userid and password are transmitted unsecured. ONLY DO THIS FROM HOME, NOT A PUBLIC NETWORK!

user youruserid
+OK please send PASS command
pass yourpassword
+OK youruserid is welcome here

3. Okay were logged on, let’s see what we got:

Please note: This is ALL fictitious (fake) information.


list

+OK 2 messages
1 20048503
2 9585
.

4. Okay we have two messages, let’s look at the first one.

The format for the top command is: top message# #linestodisplay

In this case I want to look at message number 1, and only the first line. This will give me the identification of who sent the message.


top 1 1

Sample output:

+OK

Received: from doughboy.dohnut.com ([241.13.148.32])
by eastrmimpi03.cox.net with IMP
id Qlpf1h00v0syt8Y01lpgZb; Thu, 25 Aug 2011 17:49:45 -0400
X-CT-Score: NA
X-Authority-Analysis: v=1.1 cv=IuAmMtz0fBBeZiIhdxTxU86IG4HjPW3u5r/qc1hhkRo=
c=1 sm=1 a=3eZ7Q9b2IqIA:10 a=rkfKbSMykxIA:10 a=MRZ0FHSSkhOHWfuVvhvwPg==:17
a=K3e1NQirAAAA:8 a=kTxl9t5-ZLAzewleIv8A:9 a=QEXdDO2ut3YA:10 a=yMhMjlubAAAA:8
a=SSmOFEACAAAA:8 a=CjxXgO3LAAAA:8 a=rWpkTK4KLj79uxU1I9oA:9
a=mdl0ZD2nbXoXlwIOBxcA:7 a=gKO2Hq4RSVkA:10 a=hTZeC7Yk6K0A:10
a=PIhB4iMt3BeqywaJV8IA:9 a=KQqxNPgzF0kA:10 a=-TsIfCouYY1OzVOR:18
a=2zCILR_UXJjhw6Bkj5wA:9 a=GgDoAz7O_zbXHfmf:18 a=TqMuSDJolXCvaU-DJ8gA:9
a=XsCmn76AzMD1AyMi:18 a=cbLqbakRlVZmJxlxcyMA:9 a=ViQt9kA691hNrGmx:21
a=BM–FZgVJJwMtIjX:21 a=DmoNDgEfHTn6PCMi:18 a=MRZ0FHSSkhOHWfuVvhvwPg==:117
X-CM-Score: 0.00
Received: from doughboy.dohnut.com (localhost [127.0.0.1])
by doughboy.dohnut.com (Postfix) with ESMTP id 895A140B7BF
for ; Thu, 25 Aug 2011 17:49:13 -0400 (EDT)
Delivered-To: youruserid
X-Pobox-Orig-Sender: X-Pobox-Delivery-ID:
12741D6E-CF64-11E0-BF51-DB7D98E6108A-87405395!doughboy.dohnut.com
x-pobox-client-address: 241.13.148.42
x-pobox-client-name: doughboy.dohnut.com
Received: from doughboy.dohnut.com (doughboy.dohnut.com
[241.13.148.42]) by doughboy.dohnut.com (Postfix) with ESMTP id 184CF40B7C1 for
; Thu, 25 Aug 2011 17:48:48 -0400 (EDT)
X-Authority-Analysis: v=1.1 cv=SOlsIBN44tkg4MqIq+y2aLZdhoA3kHpmiRsLue6rfnM=
c=1 sm=0 a=rkfKbSMykxIA:10 a=8m3kUcaNEbPth8vwNQ8PxA==:17 a=K3e1NQirAAAA:8
a=kTxl9t5-ZLAzewleIv8A:9 a=QEXdDO2ut3YA:10 a=yMhMjlubAAAA:8 a=SSmOFEACAAAA:8
a=CjxXgO3LAAAA:8 a=rWpkTK4KLj79uxU1I9oA:9 a=mdl0ZD2nbXoXlwIOBxcA:7
a=gKO2Hq4RSVkA:10 a=hTZeC7Yk6K0A:10 a=PIhB4iMt3BeqywaJV8IA:9
a=KQqxNPgzF0kA:10 a=-TsIfCouYY1OzVOR:18 a=2zCILR_UXJjhw6Bkj5wA:9
a=GgDoAz7O_zbXHfmf:18 a=TqMuSDJolXCvaU-DJ8gA:9 a=XsCmn76AzMD1AyMi:18
a=8FVIF5GNE0wYr8ZW84gA:9 a=zdyBz9CGz3EGURmb:21 a=RR_I2oJlBLEOdRJK:21
a=DmoNDgEfHTn6PCMi:18 a=8m3kUcaNEbPth8vwNQ8PxA==:117
X-Cloudmark-Score: 0
X-Originating-IP: 241.13.148.42
Received: from [241.13.148.42] ([241.13.148.42:49183] helo=poppinfresh) by
cdptpa-oedge01.mail.dohnut.com (envelope-from ) (ecelerity
2.2.3.46 r()) with ESMTP id E6/80-15242-C13C65E4; Thu, 25 Aug 2011 21:48:48
+0000
From: “poppinfresh” To: Subject: Poppin Fresh Ideas
Date: Thu, 25 Aug 2011 16:47:03 -0500
Message-ID: <004c01cc6370$8860e440$9922acc0$@rr.com>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary=”—-=_NextPart_000_004D_01CC6346.9F8ADC40″
X-Mailer: Microsoft Office Outlook 12.0
Thread-Index: AcxjZxAcX4lsVQV6T1OHvfeElRfFQQACM3hw
Content-Language: en-us
X-Pobox-Pass: poppinfresh@dohnut.com is whitelisted

This is a multi-part message in MIME format.
.

5. And we want to delete the offending message

ONCE YOU DELETE THIS MAIL, THERE IS NO GOING BACK. IT IS GONE FOREVER.


dele 1

+OK

6. And logoff


quit

+OK youruserid InterMail POP3 server signing off.
Connection closed by foreign host.
dohboy@willy:~$

0

How to install the nvidia video driver in Debian

by

original post here

Thanks to @jelly-home on #debian for getting me unstuck.

Couple of steps involved. It’s not that hard, but the post above makes it harder then it needs to be.

Let’s make sure the device is NOT black listed first.

egrep -r -i “black” /etc/modprobe.d/* | grep -i “nv”

1. Go into the Synaptic Package Manager (System/Administration/Synaptic Package Manager) and add the Debian Non-Free Software as shown.

Debian Non-Free Software

NOTE: At this point I jump to command line, but the following could be done in Synaptic as well.

2. Install the nvidia Dynamic Kernel Module Support

Note: this assumes sudo works on your debian box, or you will have to su root


sudo apt-get install nvidia-kernel-dkms

Before we reboot, let’s fix X.

3. We need to change xorg.conf, so it loads the proper driver.

As always anything the begins with an octothorpe (#) is a comment and does NOT need to be coded.


cd /etc/X11 # change to the X directory
ls

if there IS an xorg.conf file (I did NOT have one) make a backup copy:


sudo cp xorg.conf xorg.conf.bkup

Now edit or create xorg.conf file:


sudo nano xorg.conf

and the contents need to be:


Section "Screen"
Identifier "Default Screen"
DefaultDepth 24
EndSection

Section "Module"
Load "glx"
EndSection

Section "Device"
Identifier "Default Device"
Driver "nvidia"
Option "NoLogo" "True"
EndSection

Control + o to write, control + x to exit.

NOTE: If this /etc/X11/xorg.conf file looks familiar, it should! This is the same file off of 64 bit Ubuntu 10.10 Livecd. (Ubuntu to fix Debian!)

And then reboot.

4. to confirm the correct driver:


grep -i glx /var/log/Xorg.0.log

and you should get output that looks like:

(II) “glx” will be loaded. This was enabled by default and also specified in the config file.
(II) LoadModule: “glx”
(II) Loading /usr/lib/xorg/modules/extensions/libglx.so
(II) Module glx: vendor=”NVIDIA Corporation”
(II) NVIDIA GLX Module 195.36.31 Thu Jun 3 08:59:25 PDT 2010
(II) Loading extension GLX
(II) Aug 21 14:27:19 NVIDIA(0): Support for GLX with the Damage and Composite X extensions is
(==) Aug 21 14:27:20 NVIDIA(0): Enabling 32-bit ARGB GLX visuals.
(II) Loading extension NV-GLX
(II) Initializing extension GLX

Enjoy video goodness!

Thanks jelly-home

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.

6

How to install Java 1.7 for Ubuntu/Debian (apt-get) and Fedora (rpm)

by

Many apps, applets, games, and more are written in, or use Java to run. Java is very important, and widely-used. With this article, I will show you how to install the latest JRE/JDK (1.7.0) on Ubuntu/Debian, and Fedora.

original article here:
and 64 bit java install directions from Oracle

Ubuntu:

1. Download the JRE (Java Runtime Environment) / JDK (Java Development Kit) 7 from here:

The file type for Ubuntu is the .tar.gz
Note: The JDK is for developers. Do not download unless you plan on programming in Java.

2. Unpack (or untar, or extract) the .tar.gz file in the desired directory. Type:


tar -zxvf filename

3. Install Java 1.7 to alternatives. Type:


sudo update-alternatives --install /usr/bin/java java /your/java/directory/jre/bin/java 3

Note: Replace /your/java/directory/, with the directory where you extracted the .tar.gz

4. Choose your Java version using alternatives. Type:


sudo update-alternatives –config java

Then choose the option that points to your Java 7 directory.

Note: If you have chosen the JDK, your javac will not be updated. Typing the javac -version command will return the previous Java’s version javac. I do not know how to fix this.

5. Configure the Java browser plugin.

You will have to use a symbolic link to configure the plugin.

Type:


ln -s /your/java/directory/jre/lib/your system architecture/libnpjp.so /your/brower/plugins/directory

Note: /your/java/directory/ is wherever you extracted the .tar.gz

Also, /your system architecture/ is the architecture type of the Java .tar.gz file you downloaded. This will either be i386, or amd64. If you are unsure which, open a file manager, go to your Java directory, and go to the jre/lib/ directory. If a folder entitled amd64 is there, you have the x64-bit version. If not, you have the x32-bit.

Another thing to note, the /your/browser/plugins/directory/ is your browser’s plugins directory. Example: if you are using Mozilla’s Firefox, your plugins directory is /usr/lib/mozilla/plugins/

6. Test the plugin. Restart your browser, and go to

Java Tester

Click the Java Version button. If the pink box says Java 1.7.0 from Oracle, you have configured the plugin correctly.

Installing Java 1.7 goodness for Ubuntu. Enjoy 🙂

Fedora:

1. Download the .rpm installer from Oracle here:

2. Install. You can do this by:

A) Using the Open With feature of your browser

B) Going to the directory of the download in a file browser, right-clicking the file, and selecting the Open with Software Install option

C) Typing (as root)


rpm -ivh filename

The browser plugin should be configured by the installer.

Java 1.7 goodness for Fedora. Enjoy 🙂

Jack