Categotry Archives: X11

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.

1

Getting x-windows to work over an ssh connection

by

This is something I do so frequently, I don’t even think twice about it.  Yet it does require some tweaking.  So here’s the magic behind getting x-windows to work over an ssh connection.

1.  Let’s make sure you have what we need to get started.  If not already installed, let’s install the openssh-server on both the SERVER and CLIENT machines.

sudo apt-get install openssh-server

2.  Now let’s backup the config files:  (as always the # (octothorpe) is a comment and that, or anything after that does NOT need to be coded!)

cd /etc/ssh  # change to the ssh configuration file directory

3.  First let’s make backup copies of the files:

sudo cp sshd_config sshd_config.org # back up the SERVER config file (WITH D)

sudo cp ssh_config ssh_config.org # copy over the CLIENT  config file (NO D)

4.  Using the editor of your choice, let’s change the files to allow x-11 forwarding.  First the SERVER file

Let’s change the coding!

gksudo gedit sshd_config # edit the SERVER config file (WITH D)

Find the line and make sure it reads:

X11Forwarding yes

There MAYBE an ‘#’ in front of the line, you may need to remove it!

Save the file!

6.  Now we’ll change the client side:


gksudo gedit ssh_config # edit the client side (NO D)

change the lines so they look like:

ForwardX11 yes
ForwardX11Trusted yes

You may need to remove the ‘#’ in front to uncomment.

Save it!

7.  Restart ssh


sudo service ssh restart

8.  Try it!

-X      Enables X11 forwarding.


ssh -X (hostname)

9.  Try to bring up gedit on the client side by simply typing:


gedit

If we did your homework right, gedit will come up on the client machine, running under ssh.  X rides for free.  This is great for remote execution of a programme.  Could be any X programme.

10. The programme will NOT show up on the other computer. However if you want to start something, but let the other person use it,


export DISPLAY=:0.0

You lose control though. (thanks for this tip, Loni)

6

Getting Ubuntu 10.04 Video/Audio to work with an Intel 82815 Chipset

by

The built in speakers on the compaq desktop pro, while they work with WIN XP, don’t work with Ubuntu 10.04. However, if you plugin a set of speakers or earphones into the sound output jack on the back (green) works perfectly.

After installing the LIVECD onto the Compaq Desktop Pro, when I rebooted, everything looked okay. I run the updates. Then rebooted AFTER the updates, and then ran into trouble.

Nothing I tried worked! Then I found the secret! You need to create at LEAST 2 admin accounts Before doing the updates. One that you will do the updates after installing the LIVECD, and one that you will use AFTER you do the updates.

Here’s what’s going on. After installing the LIVED CD the monitor resolution is set to 800×600.

However, after installing the updates, the resolution switches to 1024×768. So that account you did the updates with: worthless!

If you logon after the updates with the second account, your good to go. But you need the snippet from here

I created the following file in /etc/X11/xorg.conf RIGHT AFTER DOING THE UPDATES!

DO NOT TRY TO CHANGE THE RESOLUTION TO ANYTHING BUT 1024×768. IT JUST WON’T WORK!


#
# /etc/X11/xorg.conf
#
Section "Device"
Identifier "Intel Corporation 82815 CGC [Chipset Graphics Controller]"
Driver "intel"
BusID "PCI:0:2:0"
EndSection
#
Section "Monitor"
Identifier "Generic Monitor"
Option "DPMS"
HorizSync 31.5-48.5
VertRefresh 40-70
EndSection
#
Section "Screen"
Identifier "Default Screen"
Device "Intel Corporation 82815 CGC [Chipset Graphics Controller]"
Monitor "Generic Monitor"
DefaultDepth 16
SubSection "Display"
Modes "1024x768" "800x600" "640x480"
EndSubSection
EndSection

If you hose the resolution you can try this.


xrandr --output LVDS --mode 1024x768