KMBH?

April 26, 2009

getting the internal mic working with skype

Filed under: Uncategorized — mh42 @ 9:49 pm

ubuntuforums.org says:

* Install PULSE audio control (sudo apt-get install gnome-volume-control-pulse)
* Set the Input slider in this to maximum (it is installed as gnome-volume-control-settings)
* Change the Device in gnome-sound-properties to “Playback: HDA Intel – STAC92xx Analog (PulseAudio…”
* Change the Audio Conferencing:Sound capture drop down in gnome-volume-control settings to “PulseAudio Sound Server”
* In Skype – Options:Sound Devices leave Ringing and Sound Out on “HDA Intel (hw:intel,0)”. Set Sound In to “pulse”.

March 5, 2009

Bluetooth GPS mouse Nokia LD-3W

Filed under: Linux — mh42 @ 12:20 pm

Howto get a connection to a GPS mouse via bluetooth:

Requirements: gpsd installed, KBluethooth running

1. Get the address of the BT-device:

hcitool inq

2. Change/add to /etc/bluetooth/rfcomm.conf

rfcomm4 {
#       # Automatically bind the device at startup
bind yes;
#       # Bluetooth address of the device
device 00:02:76:C6:D3:68;
#       # RFCOMM channel for the connection
channel 1;
#       # Description of the connection
comment “Nokia LD-3W”;
}

3. start gpsd with gpsd /dev/rfcomm4 (no immediate connection, you have to start an application first)

4. application to test connection: xgps

rotate

Filed under: Uncategorized — mh42 @ 12:08 pm

Ok, that is copied from different places:

Add the following lines to /etc/rc.local before the “exit 0″ line:

setkeycodes 6f 108
setkeycodes 71 103
setkeycodes 6e 105
setkeycodes 6d 106

Create a file /usr/local/bin/rotate with the following content:

#!/usr/bin/python

import os, sys, re

  # All allowed rotations
rotations = ['normal', 'right', 'inverted', 'left']

  # Keyboard scan codes for arrow keys
scanCodes = {'up': 0x71, 'dn': 0x6f, 'lt': 0x6e, 'rt': 0x6d}

  # Keycodes to use for each rotation
  # 104 = pgup, 109 = pgdn, 105 = left, 106 = right, 103 = up, 108 = down
keyCodes = {
            'normal':   {'up': 103, 'dn': 108, 'lt': 105, 'rt': 106},
            'right':    {'up': 105, 'dn': 106, 'lt': 108, 'rt': 103},
            'inverted': {'up': 108, 'dn': 103, 'lt': 106, 'rt': 105},
            'left':     {'up': 106, 'dn': 105, 'lt': 103, 'rt': 108}
          }

  # Rotations to pick from when no specific rotation is given
preferredRotations = rotations

  # Rotation to use when switched to tablet mode
tabletMode = "right"

  # Tells the program to stay open when in tablet mode and
  # rotate using the orientation sensor
tabletAutoRotate = True

  # Rotation to use when switched to normal laptop mode
laptopMode = "normal"

## If a local xsetwacom is installed, it should probably take precedent (?)
if os.path.isfile('/usr/local/bin/xsetwacom'):
  xsetwacom = '/usr/local/bin/xsetwacom'
elif os.path.isfile('/usr/bin/xsetwacom'):
  xsetwacom = '/usr/bin/xsetwacom'
else:
  ## If it's not one of those two, just hope it's in the path somewhere.
  xsetwacom = 'xsetwacom'

xrandr = '/usr/bin/xrandr'

def main():
  setEnv()

    # list of wacom devices to be rotated
  devices = listDevices()

  if len(sys.argv) < 2:     # No rotation specified, just go to the next one in the preferred list
    cr = getCurrentRotation()
    if cr in preferredRotations:
      nextIndex = (preferredRotations.index(cr) + 1) % len(preferredRotations)
    else:
      nextIndex = 0
    next = preferredRotations[nextIndex]
  else:
    next = sys.argv[1]
    if not next in rotations:
      if next == "tablet":
        next = tabletMode
      elif next == "laptop":
        next = laptopMode
      else:
        sys.stderr.write("Rotation \"%s\" not allowed (pick from %s, tablet, laptop)\n" % (next, ', '.join(rotations)))
        sys.exit(-1)
  setRotation(next, devices)

def runCmd(cmd):
  f = os.popen(cmd)
  l = f.readlines()
  f.close()
  return l

def getCurrentRotation():
  #setEnv()
  try:
    rrv = randrVersion()
    if rrv < '1.2':
      l = [s for s in runCmd(xrandr) if re.match('Current rotation', s)]
      r = re.sub('Current rotation - ', '', l[0])
      return r.strip()
    elif rrv >= '1.2':
      l = runCmd(xrandr) #"%s | grep 'LVDS connected' | gawk '{print $4}' | sed -e 's/(//'" % xrandr)
      l = [x for x in l if re.search(r'(LVDS|default) connected', x)][0]
      l = l.split(' ')[3]
      l = re.sub(r'\(', '', l)

      return l.strip()
  except:
    sys.stderr.write("Can not determine current rotation, bailing out :( ")
    sys.exit(-1)

def setRotation(o, devices):
  #setEnv()
  runCmd("%s --output LVDS --rotate %s" % (xrandr, o))
  wacomRots = {'normal': '0', 'left': '2', 'right': '1', 'inverted': '3'}
  for d in devices:
    runCmd("%s set %s Rotate %s" % (xsetwacom, d, wacomRots[o]))
  setKeymap(o)

def setEnv():
  if os.environ.has_key('DISPLAY'):
    return  # DISPLAY is already set, don't mess with it.

  if os.system('pidof kdm > /dev/null') == 0:
    kdmsts = '/var/lib/kdm/kdmsts'
    if os.access(kdmsts, os.R_OK):
      kdmdata = open(kdmsts).readlines()
      userline = [s for s in kdmdata if re.match(r':0=', s)][0]
      user = re.sub(r':0=', '', userline).strip()
      os.environ['DISPLAY'] = ':0.0'
      os.environ['XAUTHORITY'] = '/home/%s/.Xauthority' % user
  elif os.system('pidof gdm > /dev/null') == 0:
    os.environ['DISPLAY'] = ':0.0'
    os.environ['XAUTHORITY'] = '/var/lib/gdm/:0.Xauth'

def setKeymap(o):
  for sc in scanCodes.keys():
    os.system('sudo setkeycodes %x %d' % (scanCodes[sc], keyCodes[o][sc]))

def randrVersion():
  #setEnv()
  xrv = runCmd('%s -v' % xrandr)[0]
  xrv = re.sub(r'.*version ', '', xrv)
  return xrv.strip()

def listDevices():
  #setEnv()
  dev = runCmd("%s list dev | awk {'print $1'}" % xsetwacom)

  dev = map(lambda s: s.strip(), dev)
  return dev
main()

Then set permissions on this file to 755.

Run visudo and add thThen set permissions on this file to 755.

Run visudo and add the following line to the bottom:

%admin ALL=NOPASSWD: /usr/bin/setkeycodes

keycodes

Key X61 Tablet Scancode
Page up NA
Page down NA
Enter 0×69
Esc 0x6b
Toolbox 0×68
Rotate 0x6c
(Unlabeled) 0×67
Right 0x6d
Left 0x6e
Up 0×71
Down 0x6f

January 18, 2009

My Computer?

Filed under: Linux — mh42 @ 8:20 pm
sudo dmidecode -s system-manufacturer
sudo dmidecode -s system-product-name
sudo dmidecode -s system-version

December 31, 2008

Fan controle

Filed under: Kubuntu 8.04 on X61 — mh42 @ 1:21 pm

The fan of my X61 seems to work permanently on full power.

installed tpfand, tpfan-admin, tpfan-profiles

but for tpfan-admin a lot of gnome packets are needed only for frontend

uninstalled tpfan-admin and -profiles and with

sudo apt-get autoremove

all unnecessary packages are removed

to configure fan-speed: /etc/tpfand.conf

here my current settings (quite conservative i guess but i have no idea which sensor stands for what)

enabled = True
override_profile = True

0. Sensor 0 = 0:0 40:1 43:2 45:3 47:255
1. Sensor 1 = 0:0 46:2 48:3 50:255
2. Sensor 2 = 0:0 46:2 48:3 50:255
3. Sensor 3 = 0:0 43:2 45:3 47:255
4. Sensor 4 = 0:0 27:255
5. Sensor 5 = 0:255
6. Sensor 6 = 0:0 27:255
7. Sensor 7 = 0:255
8. Sensor 8 = 0:0 41:3 44:255
9. Sensor 9 = 0:0 40:3 43:255
10. Sensor 10 = 0:255
11. Sensor 11 = 0:255
12. Sensor 12 = 0:255
13. Sensor 13 = 0:255
14. Sensor 14 = 0:255
15. Sensor 15 = 0:255

hysteresis = 2
interval_speed = 2
interval_duration = 500.000000
interval_delay = 5000.000000

December 30, 2008

Mediabuntu

Filed under: Uncategorized — mh42 @ 7:28 pm

to get non free audio codecs, google earth, skype or acroread add MEDIABUNTU to your repos

December 27, 2008

apt

Filed under: Linux — mh42 @ 2:07 pm

apt-HOWTO

apt-get autoremove

apt-cache search

sudo apt-file update

apt-file search filename

apt-file list packagename


Flash 10-64bit

Filed under: Kubuntu 8.04 on X61 — mh42 @ 1:48 pm

Flash 10 is only supported over backports in Kubuntu 8.10. But it seems that there is no 64-bit version.

To get flash 10-64 working:

  1. uninstall all breviouse flash installaltions
  2. get alpha release from adobe
  3. copy .so-file to /usr/lib/flashplugin-nonfree/
  4. for using with firefox: ln -s /usr/lib/flashplugin-nonfree//libflashplayer.so /usr/lib/firefox-<version>/plugins/

Experience: till now it works fine …

UUID

Filed under: Linux — mh42 @ 1:37 pm

ls -l /dev/disk/by-uuid/

What works what doesn’t …

Filed under: Kubuntu 8.04 on X61 — mh42 @ 1:33 pm

Wifi: Out of the box (except LED)

Docking station: (UltraBase X6 Tablet)

  • only USB ports of docking station work whene docked
  • pressing “undocking” button on Docking station causes complete freeze of linux
  • docking works without problems
Older Posts »

Theme: Silver is the New Black. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.