Showing posts with label Module. Show all posts
Showing posts with label Module. Show all posts

Tuesday, January 24, 2012

Debian Wheezy in VirtualBox - Part 3

v0.2

I finished the previous part having just booted into a nice shiny Gnome 3 desktop in Virtualbox.  It certainly was a change to what I was used to.

Before I get started though, what the Guest Additions do for you are that they allow seamless mouse movement between Guest and Host, and the ability to re-size the Guest desktop.  Just drag and it all works.  Three other features I'll mention in passing here are the ability to mount a DVD drive or ISO image, the ability to use a USB memory stick (after you have introduced it to Virtualbox in the USB section) and the ability to set up a shared folder between the two operating systems.

Gnome 3

I have to say that my initial experience was somewhat jarring.  I sort-of worked out some of the functionality, however it still largely felt like a bad visit to cartoonland.  I think I shall have to let it sit for a while, see if I can find a straightforward set of documentation and then re-visit.

Despite my reservations, I can perhaps see the point of the developers in that new users MAY find it a good experience, though I still wonder.

Xfce

Whilst I had used Xfce a little in the past, I was keen to see how it had developed in the latest incarnation. Those who are used to Debian being associated with "old" software have obviously never visited the "Testing" branch.

I re-did the Netinstall and put Xfce as the desktop of choice so as to see what came with it.  I found the log-in screen a little different to what I was used to (I use gdm and I assume this was different) however it went fine.  I don't care for the Debian starry wallpaper and need to do some reading to see how to replace it for the bootup and login.  The Xfce desktop came up very nicely and I had a great feeling about it right away - I can understand Linus's comments now about abandoning Gnome for Xfce.  I checked the "About" menu option and found it was Xfce 4.8, the latest version.

About now would be a good time for a screenshot, but I won't.  Instead I shall use the wonder of text to describe it (you'll thank me for not exposing you to the starry paper background).

Debian has Xfce set up with three bands by default.
  • Of course there is the desktop in the centre which has three icons at the top left for "Home", "Filesystem" and "Trash".  Right click the mouse and a menu allowing you to create desktop icons or select properties or applications, appears.  
  • Along the top is a panel reminiscent of the Gnome 2 setup.  On the left is a main dropdown menu of applications, then a shutdown button next to it.  On the right at the top are the icons for the default 4 workspaces, the time and the network status.
  • At the bottom is a panel in the centre that works a little like the OSX "Dock".  There are six icons by default.  Minimise Windows, Terminal, File Manager, Web Browser, Find Applications, and an icon that allows you to open any folder in your home folder in either the file manager or terminal.
It is rather pointless talking about standard applications that come with Debian because it is easy to simply use the package manager and install those you like and eliminate those you don't.  I will say though that those that stood out to me were Iceweasel v9.0 (ie the running latest release of firefox) and LibreOffice.  I also like the lack of some of the major applications that come with Gnome by default that I just don't use.

So in contrast with my initial impression of the latest Gnome, I rather like Xfce.  I'll leave this post here (and get back to what I should be doing) and next time I'll talk about some initial customisations I have done to make things just that bit better.


Later ..............

Monday, January 23, 2012

Debian Wheezy in VirtualBox - Part 2

v 0.2

In Part 1 of this post, I talked generally about the requirements for setting up a Wheezy Gnome VM in Virtualbox.  I shall assume that you have the Machine specified, but not installed yet.  I shall also be rash and write these notes from memory.

Installation
  • Start the VM.  If you are using a Windows host, it will politely ask you to tell it where the installation iso is, otherwise, you will need to let it fail, then use the "Device" menu at the top to select the CD netinstall iso image and restart.
  • The standard Debian installer screen is your first port of call.  If you want a Gnome desktop, just continue.  I never bother with the graphical install since it is just a more complex version of the standard text interface.  But then, I like the Slackware installer as well ......
  • To install a desktop OTHER than Gnome, go to "Advanced" and you will find links to a number of alternatives including KDE, Xfce and Lxde.
  • Now you need to simply proceed through the standard Debian installation routine for what you want.  There is an EXCELLENT Debian installation guide at "Howtoforge" entitled "The Perfect Desktop Debian Squeeze" which I strongly recommend.
Installing Guest Additions

If you are using the Gnome 3 desktop,  the initial log-in will be slow while it works out that it cannot use the standard Gnome and will fall back to the "classic" look (which you could also select on log-in the first time).  The steps I followed to get the guest additions installed and Gnome 3 running (I also described the guest additions with Debian in another post - read it and you can tell me where I differ to it):
  • Open a "root" terminal.  I'll describe the commands to type in between the "  " ....
  • "  aptitude install synaptic "   Synaptic is a nice graphical package manager that has its uses.
  • "  aptitude install module-assistant  "   Module assistant is the key to installing guest additions
  • "  m-a prepare "     This gets module assistant to load the dependencies for the guest additions
  • Start Synaptic, search (there is a magnifying glass button for search) for " virtualbox " and mark any installed virtualbox package for removal (they will be marked as guest additions), then " Apply "
  • The tricky bit is coming up
  • You need to mount the "guest additions iso" which is located in the installation directory for virtualbox.  You can either select "install guest additions" from the "device" menu on the VM or you can use the " device " menu and CD/DVD selection to search for the guest additions iso.  In either case, you should make sure it is mounted.  It will appear mounted under " /media/cdrom0 "
  • Once you have it mounted, use the root terminal to "  cd /media/cdrom0 " and to execute the "VBoxLinuxAdditions.run"  as shown in the next part
  • "  bash ./VBoxLinuxAdditions.run "   using the root terminal after changing to the iso.   You need to have the "  ./  " in front of the Vbox..etc because it explicitly tells Linux where the file is.  (ie a period and forward slash).
  • At some stage, it will complain that there are already Guest Additions installed - ignore it because you just deleted them and it has detected the remnants.
  • Once this is completed, reboot the VM and you will now have an accelerated Gnome 3 desktop.
That's it for the moment.

As always, corrections or additions welcome.


Later ................

Thursday, October 27, 2011

Debian Squeeze - X31 and Ati Radeon

v 0.2
27 Oct 11

I was curious how to get the Radeon video card in my IBM X31 laptop working in other than generic mode.  I read the Debian Wiki page on it .. http://wiki.debian.org/AtiHowTo and found it quite interesting.  It seems that in many cases, there is no longer an xorg.conf file but the system probes the hardware on each startup.  I found that the open-source radeon server was already installed and the only thing I needed to do to make the best of it (without using module assistant to install a further module) was to install the non-free firmware.

aptitude install firmware-linux-nonfree

I rebooted and a big improvement ...


Later ....


Debian Squeeze - Webcam

v 0.3
13 Mar 12

Webcam support is built into the Debian kernel.  If your webcam is part of your machine, then very likely it will work out of the box, as in the eeepc.  If however you connect the webcam via USB, then you will have to use module assistant to install the Quickcam-usb module.

Using module assistant is all very straight forward as I've previously written, however you will first need to install the " module-assistant " package.  I found it easiest to simply use it in interactive mode to go through the various steps of preparing, getting the source, compiling and then installing it.

Once that was done - it worked .... except (for the moment) skypeThat I'm still working on.


Later ..


Update 13 Mar:

On revisiting the post, I got Skype sound to work on my Parent's machine by installing the " alsa-oss " package.

I recently installed a Logitech webcam to another machine by installing the Quickcam-usb module as described above, with the sound working in Alsa.

Tuesday, October 18, 2011

Debian Squeeze for my Parents - Skype, Alsa, OSS

v 0.2
18 Oct 11

I was showing my Father how to use Skype on Debian - he was using a headphone / mic setup plugged into the front of the computer - when I discovered that despite the headphones working, the microphone was not.

I played with settings in Skype, then decided to see what the System could provide.  I found settings for "Front Microphone" and "Front Microphone Boost" in the Gnome Alsa Mixer and activated them.  I then found that I could use the microphone, but still Skype refused to use it.

Then I started to wonder.  Does Skype use ALSA?  Or is it wedded to OSS?  I searched the package database and found a package "alsa-oss".  On a whim I loaded it and then all was well.  I cannot say for sure that this fixed things, but it certainly seemed to do the trick.



Later ........

Friday, June 17, 2011

Debian Squeeze - VirtualBox Guest Additions

v 0.3

This post has a number of connections - it ties together a number of the posts I've made today and also my post on Bitcoin mining.  As I posted there, you can let the mining happen in a Windows environment and run a normal desktop, say Slackware or Debian under Virtualbox.  I noted that playing video clashes with Bitcoin mining, but not if you run it in a Virtual Machine.

Slackware already comes with all the required build tools to install Guest Additions and all it requires for that is to mount the Guest Additions ISO and run the script.  Debian needs a bit more.  You need to ensure the kernel headers and the build tools are installed - either by installing Module assistant and then using the command " m-a prepare " or downloading the headers and build tools as described in the previous NVidia driver post.  If you find you need an alternative compiler version, the refer to the post on that.

Finally, just mount the Guest Editions ISO (in its most basic form you can find it in the Virtualbox directory) and then run the appropriate install script on that ISO.  Very simple.


Later.....

Jan 2012

Upon re-reading this, it seems a little spartan - I've detailed the process a little better in my post today on installing Debian Wheezy in Virtualbox...

Rgds

Debian Squeeze - NVidia Video Drivers

v 0.3

I've always found installing video drivers in Debian the easiest if I just use the proprietary drivers.  Sorry to the Debian Purists (hangs his head in shame).  Most of my experience is with NVidia drivers, so I'll stick with that.  First, two page links that pretty well cover what I'm talking about.

http://www.pendrivelinux.com/how-to-install-nvidia-video-card-drivers-in-debian-lenny/
http://www.pendrivelinux.com/upgrading-nvidia-drivers-in-debian-lenny/

The technique described to install the drivers is the pukka one, however you can also just use Module Assistant as "  m-a prepare " to ensure the appropriate kernel headers and the build environment are available.  If you get a message telling you that the available compiler is the wrong one, then you can download the correct one and use one of the two techniques in my previous post to fix the situation.

What you DO need to understand is that you need to have X .. NOT running.  For Squeeze, you will have to check which version of  "gdm" is running in the directory pointed to in the first post and adjust as necessary.  Why don't I give the exact instructions?  Well, first I'm being lazy right now, and second if you can't figure it out from the links and hints above, then maybe you shouldn't be playing with this.

Updating drivers in Debian Stable is not normally a problem, since it is just a repeat of the original installation instructions, however if you are playing with Debian Testing, then when a new kernel is installed, you will lose X as the wrong driver is pointed to in xorg.conf.  To fix this, just replace the proprietary driver name with " nv " or even " vesa " to get back to the Xorg driver and it will be ok for the moment.  Of course you COULD use the opportunity of being dumped into the command line to re-install the drivers and " startx " again, however ...

That's it for the moment.


Later ......

Update.
Squeeze uses " gdm3 " so in the instructions given in the link use that instead of " gdm "

ie to stop X ...  #  /etc/init.d/gdm3 stop

Debian Squeeze - Changing the Default Compiler

v 0.2

Once, when installing the proprietary NVidia drivers in Debian Lenny, I was stumped by the message that the available compiler was different than the one required.  I've seen several techniques to change the default compiler, but the two I've seen that are the most understandable involve changing the symlink or exporting a variable pointing to the required compiler.

Changing the Variable pointing to the Compiler:
 
# export CC=/usr/bin/gcc-4.1
# ./NVIDIA-installer-xxx-whatever


Changing the Symlink:

# ln -s -f /usr/bin/gcc-4.1 /usr/bin/gcc


http://www.linuxquestions.org/questions/debian-26/need-an-older-gcc-version-690246/


Later ...........

Debian Squeeze - Module Assistant

v 0.2

Often, in Debian, when you install a module from source, install proprietary Video Drivers (I'm looking at you Nvidia), or the Guest Additions in VirtualBox, you need some or all of the current Kernel Headers, the appropriate Compiler and the appropriate source code.  Module assistant can make it easy for you to do some or all of those things.  For example you can use it to download and prepare the kernel headers and make sure the build tools are available before you manually run another script, or you can use Module Assistant to prepare all available modules for you to choose which one to compile and install.  The Debian Wiki has an excellent run-down on using Module Assistant both in command line and interactive mode.  It also has a complete listing of available modules for the Debian kernel.

http://wiki.debian.org/ModuleAssistant

Each of the tasks I mentioned above is deserving of its own post, even if it is short so as to make it all easier to find, however they are all interwoven.  An additional post I'll make is how to change the default gcc compiler version, since sometimes this is needed - as it was with the installation of the Lenny NVidia drivers.


Later ...........

Thursday, June 16, 2011

Debian Squeeze - HDMI Audio

v 0.2.1

I was having an email discussion with a colleague who was getting into Debian.  He had installed Squeeze on his machine and then became stumped because there was no Audio being transmitted from the NVidia GTX460 Video card.  Ultimately, his solution involved a visit to Debian Backports and the installation of the proprietary NVidia driver.

Here is his email to me:


"I have everything up and working.:-)) yay!

It turns out that the gtx460 graphics card's GPU only recognized certain codecs that became valid after the 2.6.35 kernel or something like that. This page
 http://www.nvnews.net/vbulletin/showthread.php?t=159346 
has a good article on alas hdmi troubleshooting for nvidia.

I back ported the 2.6.38 kernel and the sound outputs magically appeared, however the nvidia graphics driver done the "debian way" didn't want to play, so I installed the proprietary drivers straight from nvidia. In hindsight, I think it may have had something to do with the nouveau graphics drivers the new version of debian comes with as I needed to blacklist them in the mod probe.d directory.

Anyway, it's working as advertised with all the bells and whistles, so thanks for pointing me in the right direction..."

Posted in the hope someone will benefit.


Later ......

Saturday, January 15, 2011

Debian - Bad Module, Apt, Rescue Mode

v0.2
I spent a rather frustrating hour today fixing a self-inflicted non-X-booting Debian system.  On the good side, I learnt some more and gained an appreciation for being able to use the command line.

In a flash of irresponsibility, I thought I'd install the nvidia 3d module the Debian Way - without doing the research but just using a "she'll be right" approach.  The module compiled and installed.  I rebooted.  When X started, all I got was a blank screen with a flashing underline cursor at the top left.

Bother!

Ctl-Alt-Backspace would not kill X
Ctl-Alt-Del gave me a reboot.


Rescue Mode

When you boot a Debian system, at the Grub screen, each Kernel choice has two entries - the normal boot entry, and under that a "Rescue Mode" kernel choice which allows you to boot (eventually) to a root prompt.  The boot process finishes with an invitation for you to enter the root password, or to press Ctl-D.  Entering the root password drops you to a root prompt # .


Modules

Drivers are called "modules" in Linux and are loaded for the Kernel to get access to them.  Once I was in the root prompt above, I checked to see if the nvidia module was indeed causing the trouble.

# lsmod

The list streamed up above the page, so pipe the output of lsmod to a pager, like "more"

# lsmod | more

Better - and there was the nvidia driver in the list.  now to remove the module

# rmmod nvidia

Check the module list, and it is not there.  So reboot.  The system was as before, so the module commands only do a temporary job.

To cut a long story short, I did the brute force approach.  I found the module in
" /lib/modules/ (kernel-name) /nvidia/nvidia.ko"
and renamed it to nvidia.ko.bak.  When I rebooted, the system worked as before.


Xorg

In the past, when I've been confronted with something like this, I've simply edited the xorg.conf file to change the video driver back to the default "vesa" or "nv".  When I looked at doing this, there WAS no xorg.conf any more.  I'd heard a little about this, but not paid too much attention.  Another project - update my knowledge of Xorg.


Apt / Aptitude

Now the bit that would have saved me a lot of trouble.  Debian has a wonderful package management system.  I have only been really worried about using the graphical tool "synaptic", because it is easy to pick up the basics with.

However in the case I was faced with, there was no graphical interface and I hadn't learnt very much of Aptitude either.  It would have been easy to just search for the nvidia packages and then remove them.  Two minutes work.

So the lesson is - learn the command line and learn the command line Apt tools.  They will save you an awful lot of frustration and time.


Later .....