Add Repositories
http://ubuntuguide.org/wiki/Ubuntu_Edgy#How_to_add_extra_repositories

Usefull Repos for HArdy ?

Port installed packages to another PC

First, let’s make the list of installed packages

dpkg --get-selections | grep -v deinstall > installedpackages

Copy this file and /etc/apt/sources.list to the new PC and do

sudo apt-get update
sudo apt-get dist-upgrade
sudo dpkg –set-selections < installedpackages
sudo apt-get dselect-upgrade

Change disk checking/fsck at boot frequency

diskcheck freq every 100 boots voor /home and /

sudo tune2fs -c 100 /dev/sda2 (= /home )

sudo tune2fs -c 100 /dev/sda1 (= / )
sudo tune2fs -c 100 /dev/sda4 (= /data )

Numlock on at login

  • Via Synaptic, install numlockx,
  • in file /etc/kde3/kdm/Xsetup

#! /bin/sh

# Xstartup - run as root before session starts
/usr/bin/X11/numlockx on <--toevoegen
  • See status of caps & numlock: install keybled

Install VMware server
sudo -i

apt-get install build-essential
download
VMware-server-1.0.5-80187.tar.gz  and extract it  to the desktop
download
vmware-any-any-update-116.tgz  and extract it to the desktop
cd Desktop/vmware-server-distrib
./vmware-install.pl Keep all the defaults and do everything until it asks if you want to compile the kernel then say no
cd Desktop/vmware-any-any-update116/
gcc -o update update.c
./runme.pl make sure to say yes to compile kernel and follow defaults
cp /lib/libgcc_s.so.1 /usr/lib/vmware/lib/libgcc_s.so.1/
cp /usr/lib/libpng12.so.0 /usr/lib/vmware/lib/libpng12.so.0/

Setup Vmware USB Support:

sudo kate /etc/init.d/mountdevsubfs.sh
Uncomment the last 4 lines
#
# Magic to make /proc/bus/usb work
#
#mkdir -p /dev/bus/usb/.usbfs
#domount usbfs "" /dev/bus/usb/.usbfs -obusmode=0700,devmode=0600,listmode=0644
#ln -s .usbfs/devices /dev/bus/usb/devices
#mount --rbind /dev/bus/usb /proc/bus/usb




Poweroff-Restart knop
  • Right click in panel
  • add applet to panel / non KDE application / configure button
  • Executable = sudo / Command line arguments = shutdown -h now

sudo allows normal users to execute certain root-only commands.

Which users are authorized to run which commands is specified in the /etc/sudoers file.

This should only be edited with the command visudo. For example, suppose I wanted to add a group of users who are allowed to shut down the machine. So I first want to add a group called "shutdown" (run these commands while root) groupadd shutdown Then I need to edit the /etc/group file to add users to the "shutdown" group. I just tack the usernames at the end of the shutdown line, separated by commas, e.g. shutdown:x:407:user1,user2,... Whatever users I put there will be able to shut down the computer (so choose wisely). Now I need to configure sudo to allow members of the "shutdown" group to actually invoke the assorted shutdown commands provided in linux.

Run visudo and add the following lines %shutdown ALL=(root) NOPASSWD: /sbin/reboot %shutdown ALL=(root) NOPASSWD: /sbin/halt %shutdown ALL=(root) NOPASSWD: /sbin/shutdown

This allows the "shutdown" group to run /sbin/reboot, /sbin/halt, and /sbin/shutdown AS IF THEY WERE ROOT.

Change the bootmenu


/boot/grub/menu.lst

Streaming video in Firefox

sudo apt-get install mozilla-mplayer

Make applications start automatically when you login

1. Go to your home folder
2. Click on
View at the top and then click on Show Hidden Files
3. go to
.kde folder.
4. go to
autostart folder
5. click on the
K-menu button, bottom left on the screen
6. drag application into the autostart folder
7. chose the
Link Here option

 

OO Calc

Wijzigen van de locale zodat citibank csv's kunnen verwerkt worden

Tools>Options>Languages>Language Settings, Locale Setting=Dutch(Begium)
If this is "Default", the locale of your operating system is assumed.

Sluit OO Calc, de volgende maal dat je opstart kan je de Citibank csv's importeren.


Sound in tvtime

In hardy, use this:
gst-launch-0.10 alsasrc device=hw:1,0 ! audio/x-raw-int,rate=32000 ! volume volume=5 ! autoaudiosink
But make shure all needed grstreamer plugins are loaded, otherwise the command will popup a number of errors.
Following list is probably overkill, but I have to figure out which ones are really needed
gstreamer-tools                    install
gstreamer0.10-alsa                install
gstreamer0.10-ffmpeg                install
gstreamer0.10-gnonlin                install
gstreamer0.10-pitfdll                install
gstreamer0.10-plugins-bad            install
gstreamer0.10-plugins-bad-multiverse        install
gstreamer0.10-plugins-base            install
gstreamer0.10-plugins-base-apps            install
gstreamer0.10-plugins-good            install
gstreamer0.10-plugins-ugly            install
gstreamer0.10-plugins-ugly-multiverse        install
gstreamer0.10-pulseaudio            install
gstreamer0.10-tools                install
gstreamer0.10-x                    install

 

Edit the K-menu tvtime item en voeg dit toe na het tvtime programma
tvtime ; arecord -D hw:2,0 -r 32000 -c 2 -f S16_LE | aplay -

arecord gives bad quality after some time, so better use

sox -r 32000 -w -t alsa hw:1,0 -t alsa hw:0,0

Attention, for this to work in hardy, you must also install sox & libsox-fmt-all

http://www.linuxtv.org/v4lwiki/index.php/Saa7134-alsa#ALSA_audio_with_other_applications


To get a list of your alsa capture devices, issue

arecord -l
 
To prevent sound cards to change HW address:

sudo kate /etc/modprobe.d/alsa-base
At the end of the file, change like this

# Prevent abnormal drivers from grabbing index 0
options snd_hda_intel index=0
options saa7134_alsa index=1
options snd_usb_audio index=2
MythTV (Mythbuntu package)
 
SOUND 
In backend settings, choose the correct sound & video device.in capture cards
- Video device = /dev/video0
- Audio device = /dev/dsp1

In frontend settings / Configuratie / TV / Opnameprofielen / Software encoders / Live TV
- Codec = uncompressed
- Samplerate = 32000

Don't change settings in kradio or kdetv, they conflict with this, and will make /dev/dsp1 dissapear !!!

EPG (see http://wiki.mythtv.nl//index.php/Grabbers)

- Install tv_grab_nl_py in /usr/bin
- tv_grab_nl_py --configure --> this makes the config file
(HOME}/.xmltv/tv_grab_nl_py.conf,
- edit the file andremove all tv stations you don't need.
- execute tv_grab_nl_py --logos --> this starts the download of EPG data
- sudo apt-get install xmltv-util --> this is needed to make the coupling with mythtv
- In myttv backend config / Video sources / Listings grabber, select "The Netherlands tv_grab_nl_py"
- The nrs in the config file indicate the xml id in myttv channel settings



Add a static IP@ to an ethernet interface

In Kubuntu:

In /etc/network/interfaces

auto lo
iface lo inet loopback
address 127.0.0.1
netmask 255.0.0.0

iface wlan0 inet static
address 10.10.10.10
netmask 255.255.255.0

iface eth2 inet dhcp
auto eth2



iface eth2:0 inet static
address 10.0.0.1
netmask 255.255.0.0
auto eth2:0

Restart the network service: # /etc/init.d/networking restart


In Windows:

http://www.networkworld.com/columnists/2004/110104gearhead.html

Regedit

look under the root key "HKEY_LOCAL_MACHINE" for the subkey:

\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\


Under these subkeys you'll find all of the NICs in your PC listed by their COM Class Identifiers otherwise known as Globally Unique Identifiers (GUID). For example: {A8BF419B-8185-4396-B87A-2B6345BBC8E3}


Be careful to correctly identify which NIC the entry refers to - you'll find multiple GUIDs listed under each NIC in the registry.

When you've got the right one, you need to find the key "IPAddress" and double click on it. In the Edit Multi-String dialog that appears, enter in the Value Data field each of the static IP addresses you want to assign to the NIC, one value per line. Note that the first value - for no reason we can fathom - must be "0.0.0.0".

Now find the "SubnetMask" key and edit it exactly the same way you did the "IPAddress" key, again making sure the first value is "0.0.0.0".


Exit regedit and reboot windows

 

Samba Drive mapping


sudo apt-get install samba 

Contents of smb.conf

---------------------------------------------------------------------------------------------------------------------------------------------------------
[global]
## Browsing/Identification ###
# Change this to the workgroup/NT-domain name your Samba server will part of
workgroup = WORKGROUP

# server string is the equivalent of the NT Description field
server string = %h server (Samba, Ubuntu)
 

[printers]
comment = All Printers
browseable = no
path = /var/spool/samba
printable = yes
create mask = 0700

# Windows clients look for this share name as a source of downloadable
# printer drivers
[print$]
comment = Printer Drivers
path = /var/lib/samba/printers

[HP_OfficeJet_5610]
printable = Yes
printer name = HP_OfficeJet_5610
guest ok = yes
use client driver = yes
path = /var/spool/samba
printing = cups



[DATA]
path = /data/Data
guest ok = yes

[SHARED]
path = /data/Shared
guest ok = yes
read only = no

-------------------------------------------------------------------------------------------------------------------------------------------------------------

Don't forget to set the sticky bit in the properties of your shared folders, otherwise you won't be able to access files that were put there from your linux machine, because the have the properties from the user who put them there  ???
I may be wronh here

smbpasswd nobody (empty passwd, just push enter) 

In windows, map network drive as other user (nobody)

PRINTING: install the cups printer driver on windows machines

If you want to enable colour printing from Windows edit this file before installing:
cups-windows-6.0i386cups6.ppd
as follows:
Replace the lines:
*ColorDevice: False
*DefaultColorSpace: Gray
with
*ColorDevice: True
*DefaultColorSpace: CMYK

If you have already installed the driver edit the CUPS6.PPD file under the C:WINDOWS directory the same way, delete and reinstall the printer.

You should see:
Color: Yes
In the Features box in the printer properties

 

see also http://ubuntuforums.org/showthread.php?t=202605 


NTFS Read/Write     Nothing to do in Hardy

sudo apt-get install ntfs-3g 

 

Backup

 I use rsnapshot from the repo's,
It makes hourly, daily, weekly, monthly, .... backups
and automatically deletes old snapshots.
Here is my rsnapshot.conf  file. it contains comments on how to install & configure it