You are not authenticated, login.
text: sort by
tags: modified
type: chronology
{589} is owned by tlh24.
hide / / print
ref: -0 tags: gtk.css scrollbar resize linux qt5 date: 09-16-2021 15:18 gmt revision:2 [1] [0] [head]

Put this in ~/.config/gtk-3.0/gtk.css make scrollbars larger on high-DPI screens. ref

.scrollbar {
  -GtkScrollbar-has-backward-stepper: 1;
  -GtkScrollbar-has-forward-stepper: 1;
  -GtkRange-slider-width: 16;
  -GtkRange-stepper-size: 16;
scrollbar slider {
    /* Size of the slider */
    min-width: 16px;
    min-height: 16px;
    border-radius: 16px;

    /* Padding around the slider */
    border: 2px solid transparent;

.scrollbar.vertical slider,
scrollbar.vertical slider {
    min-height: 16px;
    min-width: 16px;

scrollbar.horizontal slider {
min-width: 16px;
min-height: 16px;

/* Scrollbar trough squeezes when cursor hovers over it. Disabling that

.scrollbar.vertical.dragging:dir(ltr) {
    margin-left: 0px;

.scrollbar.vertical.dragging:dir(rtl) {
    margin-right: 0px;

.scrollbar.horizontal.slider.dragging {
    margin-top: 0px;
undershoot.top, undershoot.right, undershoot.bottom, undershoot.left { background-image: none; }
undershoot.top, undershoot.right, undershoot.bottom, undershoot.left { background-image: none; }

To make the scrollbars a bit easier to see in QT5 applications, run qt5ct (after apt-getting it), and add in a new style sheet, /usr/share/qt5ct/qss/scrollbar-simple-backup.qss

/* SCROLLBARS (NOTE: Changing 1 subcontrol means you have to change all of them)*/
  background: palette(alternate-base);
  margin: 0px 0px 0px 0px;
  margin: 0px 0px 0px 0px;
  background: #816891;
  border: 1px solid transparent;
  border-radius: 1px;
QScrollBar::handle:hover, QScrollBar::add-line:hover, QScrollBar::sub-line:hover{
  background: palette(highlight);
subcontrol-origin: none;
QScrollBar::add-line:vertical, QScrollBar::sub-line:vertical{
height: 0px;
QScrollBar::add-line:horizontal, QScrollBar::sub-line:horizontal{
width: 0px;
subcontrol-origin: none;

hide / / print
ref: -0 tags: berkeley airbears2 configuration linux debian 8.1 date: 08-13-2015 23:42 gmt revision:1 [0] [head]

hide / / print
ref: -0 tags: debian linux github persistent ssh authentication date: 07-27-2012 01:40 gmt revision:1 [0] [head]

If you don't want to repeatedly enter in your username/password for github when commiting, you'll want to enable an RSA authetication key.

-- http://www.debian.org/devel/passwordlessssh run

(with no options).

-- then https://help.github.com/articles/working-with-ssh-key-passphrases

 ssh-keygen -p 
with your github passphrase (I'm not totally sure this is essential).

For me, pull and push aftwerard worked without needing to supply my password. Easy!

hide / / print
ref: Laubach-2003.03 tags: cluster matlab linux neurophysiology recording on-line data_analysis microstimulation nicolelis laubach date: 12-17-2011 00:38 gmt revision:4 [3] [2] [1] [0] [head]

IEEE-1215970 (pdf)

  • 2003
  • M. Laubach
  • Random Forests - what are these?
  • was this ever used??

follow up paper: http://spikelab.jbpierce.org/Publications/LaubachEMBS2003.pdf

  • discriminant pusuit algorithm & local regression basis (again what are these? lead me to find the lazy learning package: http://iridia.ulb.ac.be/~lazy/


Laubach, M. and Arieh, Y. and Luczak, A. and Oh, J. and Xu, Y. Bioengineering Conference, 2003 IEEE 29th Annual, Proceedings of 17 - 18 (2003.03)

hide / / print
ref: -0 tags: hauppauge pvr linux TV-tuner WinTV-HVR-1950 date: 03-30-2011 21:39 gmt revision:4 [3] [2] [1] [0] [head]

This site has all the info you'll need: http://klk64.com/wintv-hvr-1950/

Note that this outputs an mpeg stream, so you'll need to mplayer /dev/video0 (composite input) or mplayer /dev/dvb/adapter0/dvr0 (antenna/cable ATSC input) to see images; xawtv and others won't work with it. Also note that it does not have a vertical blanking information (?) VBI (/dev/vbi) interface - so scan needs to be redirected to /dev/NULL, as mentioned on the page above.

To switch to composite input, use: v4lctl setinput composite. To switch to full resolution, v4lctl snap jpeg 640x480 ~/test.jpg seems to do the trick (also can switch to QVGA this way, if you like)

To read from the device programmatically, the code available here worked out of the box: http://web.me.com/dhoerl/Home/Tech_Blog/Entries/2009/1/22_Revised_avcodec_sample.c.html (well, it didn't terminate -- there is no end to that file :-) -- but it wrote the images fine!)

hide / / print
ref: -0 tags: nvidia linux driver vmalloc multiple cards grub date: 02-09-2011 13:49 gmt revision:2 [1] [0] [head]

http://www.nvnews.net/vbulletin/showthread.php?t=141845 -- when running multiple nvidia cards on one linux computer with a 32-bit kernel, you may run out of kernel memory while loading the video drivers. To fix this, pass vmaloc=256M to the kernel prior boot - e.g. by editing /boot/grub/menu.lst (grub 1) or /boot/grub/grub.cfg (grub 2)

If you want to make the change permanent with all kernels, edit


and add vmalloc=256M to the end of

linux   ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args}

see also the Nvidia driver release notes

hide / / print
ref: -0 tags: openGL GLEW extensions nvidia Cg Linux date: 12-03-2010 23:47 gmt revision:0 [head]

http://www.gamedev.net/community/forums/topic.asp?topic_id=432583 -- bump, it helped me solve a problem with cgGLGetLatestProfile() failing!! (the class I was using to examine openGL extensions was writing to the openGL supplied string)

hide / / print
ref: notes-0 tags: usbmon decode chart linux debug date: 07-12-2010 03:29 gmt revision:3 [2] [1] [0] [head]

From this and the USB 2.0 spec, I made this quick (totally incomprehensible?) key for understanding the output of commands like

# mount -t debugfs none_debugs /sys/kernel/debug
# modprobe usbmon
# cat /sys/kernel/debug/usbmon/2u

To be used with the tables from the (free) USB 2.0 spec:

hide / / print
ref: -0 tags: linux keyboard international characters symbols date: 10-01-2009 14:09 gmt revision:1 [0] [head]

Need to type international symbols and characters on your keyboard, e.g. for writing in another language? Do this:

 cp /usr/share/X11/locale/en_US.UTF-8/Compose ~/.XCompose 
xmodmap -e 'keycode 115 = Multi_key  Multi_key  Multi_key  Multi_key'
xmodmap -e 'keycode 116 = Multi_key  Multi_key  Multi_key  Multi_key'

Where 115 and 116 are the windows keys on my keyboard. (You can find this out for your keyboard by running 'xev');


  • <windows key> s s -> ß ("Wie heiße du?")
  • <windows><shift><~> a -> ã ("Eles estão bons")
  • <windows><shift><"> u -> ü ("Bücher")
  • <windows><,> c -> ç ("almoço")
  • <windows><=> c -> € ("Custa-la €2")


And now for something completely unrelated but highly amusing, at least in title: Optimal Brain Damage

hide / / print
ref: -0 tags: convert m4b to mp3 linux date: 09-11-2009 17:16 gmt revision:0 [head]

Recently I got an audiobook in m4b format, but I wanted to play it on my mp3 (only!) device. So, had to convert it. To do this, on my Debian Lenny box I first:

 apt-get install ffmpeg libmp3lame30 libfaad0 libavcodec51 

The last one seems to be the most important, nothing works even though libavcodec51 wold seem to have nothing to do with mp3 encoding... Then used a bash script:

for i in *.m4b; do
        ffmpeg -i "$i" -acodec libmp3lame "${i%m4b}mp3";

to convert all the m4b files in a directory. Later, I used easytag to add tags to the mp3s so they would show up properly on the device {770}. Simplest way to get this to work was to just change the name of the containing folder to Artist - Title; didn't want to manually change the tags on all the mp3's, and I didn't find a 'apply all' button.

hide / / print
ref: notes-0 tags: linux rsync date: 06-17-2008 17:36 gmt revision:2 [1] [0] [head]

simple backups to an external usb disk:

rsync --verbose --progress --stats --recursive --times --perms --links --del --ignore-errors /home/tlh24/ /media/usb0/


  • the --del flag tells rsync to delete files in the target prior to writing them, not to delete the source files.
  • --times tells rsync to preserve file modification times.
  • for the --ignore-errors, see: http://lists.samba.org/archive/rsync/2004-June/009891.html - I was getting an IO error when trying to copy ~/.dbus etc.
  • otherwise, it's just rsync <options> <source> <dest> or so.

hide / / print
ref: bookmark-0 tags: blackfin BF537 uClinux webserver USB2 vmware date: 11-21-2007 22:32 gmt revision:0 [head]

http://www.camsig.co.uk/ -- blackfin is hot like chernobyl. 1" sq 600mhz webserver etc.

  • uses NET2272 high-speed USB-2.0 peripheral from PLX technology.
  • has a 10/100 ethernet mac w/o magnetics
  • 99 GBP
  • specsheet - no power consumption figures
  • attaches with a rubberized compression connector - no solder required!
  • Develop programs with a VMware virtual appliance (openSuSE 10.2) - brilliant! (though the download is HUGE ... and hosted by amazon)

hide / / print
ref: notes-0 tags: blackfin LED kernel module linux BF537 STAMP tftp BF537 bridge date: 11-13-2007 17:59 gmt revision:4 [3] [2] [1] [0] [head]

so, you want to control the LEDs on a BF537-STAMP board? You'll need a linux box with a serial port, then will need to do a few things:

  1. get the blackfin build tools:
    1. download the RPM file from blackfin.uclinux.org and use alien (if you are on debian, like me) to install it.
    2. installation instructions
  2. get uClinux distribution and compile it. http://blackfin.uclinux.org/gf/project/uclinux-dist/frs/
    1. unpack it to a local directory
    2. 'make menuconfig'
    3. select your vendor & device
    4. make sure runtime module loading is enabled.
    5. 'make' (it takes much less time than the full linux kernel)
    6. this will result in a linux.bin image, which uBoot can use.
  3. you need to set up a tftp server for uboot, see http://linuxgazette.net/125/pramode.html
  4. attach the blackfin stamp to the serial port on your computer. configure kermit with:
    set line /dev/ttyS1
    set speed 57600
    set carrier-watch off
    set prefixing all
    set parity none
    set stop-bits 1
    set modem none
    set file type bin
    set file name lit
    set flow-control none
    set prompt "Linux Kermit> " 
    (this is assuming that your serial port is /dev/ttyS1)
  5. power on the stamp, at the uBoot prompt press space.
  6. issue the following commands:
    set serverip
    set ipaddr
    tftpboot 0x1000000  linux
    bootelf 0x1000000 
    to get the device to boot your new uClinux image from SDRAM. your IP addresses will vary.
    1. note: you can boot any ELF image at this point; for example, the 'blink' example in the blackfin tool trunk SVN, 'make' produces a ELF file, which can be loaded into SDRAM via tftp and executed. I'm not sure what part of L1 uboot uses for its instruction, but conceivably you could load into L1 / data ram and execute from there. see also {403} you would do something like:
set serverip
set ipaddr
tftpboot 0x1000000  blink
bootelf 0x1000000 
  1. at the uCLinux prompt : ifconfig eth0
  2. write a simple kernel module, for example:
    #include <linux/module.h>
    //#include <linux/config.h>
    #include <linux/init.h>
    #include <linux/fs.h>
    #include <asm/uaccess.h>
    #include <asm/blackfin.h>
    #include <asm/io.h>
    #include <asm/irq.h>
    #include <asm/dma.h>
    #include <asm/cacheflush.h>
    int major;
    char *name = "led";
    int count = 0;
    ssize_t led_write(struct file* filp, const char *buf, size_t size, loff_t *offp)
    	printk("LED write called "); 
    	if (size < 2) return -EMSGSIZE;
    	if (!buf) return -EFAULT;
    	printk("led_write called with: %s ", buf); 
    	if(buf[0] == '0') {bfin_write_PORTFIO_CLEAR(1<< 6); }
    	else{ bfin_write_PORTFIO_SET(1<<6); }
    	return size;
    int led_open(struct inode *inode, struct file *file){
    	printk("led opened"); 
    	return 0; 
    int led_release(struct inode *inode, struct file *file){
    	printk("led released"); 
    	return 0; 
    struct file_operations fops = {
    	 .owner = THIS_MODULE,
    	.read = NULL,
    	.write = led_write,
    	.open = led_open,
    	.release = led_release
    int __init init_module(void)
    	// Set PF2 as output -- clear the FER bit.
    	bfin_write_PORTF_FER(bfin_read_PORTF_FER() & (~(1 << 6))); 
    	bfin_write_PORTFIO_SET(1<< 6);
    	bfin_write_PORTFIO_DIR(bfin_read_PORTFIO_DIR() | (1<<6)); 
    	major = register_chrdev(0, name, &fops);//hope it succeeds!
    	printk("registered, major = %d ", major); 
    	printk("portF = %d", bfin_read_PORTFIO()); 
    	printk("portF_FER = %d", bfin_read_PORTF_FER()); 
    	printk("portF_DIR = %d", bfin_read_PORTFIO_DIR()); 
    	return 0;
    void __exit cleanup_module(void)
    	unregister_chrdev(major, name);
    	printk("led: cleanup "); 
  3. write a makefile for this module, for example:
            make -C /uClinux-dist/linux-2.6.x/ M=`pwd`
  4. setup apache on your computer, e.g. 'apt-get install apache2'
  5. 'ln -s' your build directory to /var/www/, so that you can wget the resulting kernel module
  6. rm led.ko
    wget (for example)
    insmod led.ko
    rm /dev/led
    mknod /dev/led c 253 0
    chmod 0644 /dev/led
    echo 1 >> /dev/led 

hide / / print
ref: notes-0 tags: iceweasel firefox acroread uninstall debian linux mozplugger date: 11-10-2007 04:39 gmt revision:1 [0] [head]

Adobe acrobat reader 7.0 leaks a prodigious amount of memory on my linux system (Debian Etch, stable). However, some pdfs will only open in acroread, so i want to keep the application around for occasional use. Because of the memory leaks, it is not good to have it loaded by default by iceweasel / firefox (evince or xpdf is better). To do this:

  1. quit your browser (not sure if this is necessary, but perhaps it is a good idea).
  2. open /etc/mozpluggerrc and comment out (#) all the sections that reference acroread. There are 3 macro lines, as well as one line in in the pdf / x-pdf content handling list.
  3. goto ~/.mozilla and remove pluginreg.dat ; do the same for ~/.mozilla/firefox
  4. go to /usr/lib/iceweasel/plugins and move / remove / rename nppdf.so (if it is there) (this is what tripped me up for a while - i had to look at the automatically-generated pluginreg.dat to figure out that acroread was being loaded without mozplugger via this plugin).

that's it! :)

hide / / print
ref: bookmark-0 tags: embedded linux eCos ARM intellectualProperty IP MIPS Xscale MIT date: 10-08-2007 17:55 gmt revision:0 [head]

hide / / print
ref: notes-0 tags: jtag fpga linux xilinx date: 08-21-2007 19:58 gmt revision:5 [4] [3] [2] [1] [0] [head]


  1. need the include files as well as the jtag tools.
    1. I installed the include files in a subdirectory of the jtag folder called openwince-include
    2. you will need (for debian) libreadline5-dev
  2. need to edit openwince-include/brux/flash.h - remove the address argument to detectflash().
  3. rm config.h
  4. CFLAGS=-g (for debug)
  5. ./configure --with-include=/home/tlh24/jtag/openwince-include
  6. make clean
  7. make
  8. cd src
  9. sudo gdb jtag
  10. jtag> cable parallel 0x378 DLC5 (for the xilinx parport-III)
  11. jtag> detect (..shit)
  12. jtag> quit (switch to another terminal..)
  13. cd /usr/local/share
  14. mkdir jtag
  15. cd jtag
  16. sudo cp -R ~/jtag/data/* .
  17. gdb> run
  18. jtag> cable parallel 0x378 DLC5
  19. jtag> detect
IR length: 22
Chain length: 3
Device Id: 00000001010000110100000010010011
  Manufacturer: Xilinx
  Unknown part!
Device Id: 00000101000001000110000010010011
  Manufacturer: Xilinx
  Unknown part!
Device Id: 00000101000001000101000010010011
  Manufacturer: Xilinx
  Unknown part!
chain.c(110) Part 0 without active instruction
chain.c(133) Part 0 without active instruction
chain.c(110) Part 0 without active instruction

Pictures from the ragged stone user manual explain the pin numbering and orientation of the 2mm 14 pin dual row jatag header (compatable with Xilinx parallel port JTAG programmer & hence linux's jtag tools)

hide / / print
ref: notes-0 tags: fonts Debian Linux date: 07-31-2007 17:11 gmt revision:0 [head]

some cool fonts --

> sudo apt-get install ttf-bitstream-vera ttf-dejavu ttf-bpg-georgian-fonts ttf-dustin ttf-f500 ttf-freefont ttf-gentium ttf-isabella ttf-junicode ttf-kacst ttf-khmeros ttf-mgopen ttf-sjfonts ttf-staypuft ttf-summersby t1-xfree86-nonfree ttf-xfree86-nonfree ttf-larabie-deco ttf-larabie-straight ttf-larabie-uncommon

hide / / print
ref: notes-0 tags: ipod linux mount date: 06-13-2007 20:03 gmt revision:1 [0] [head]

The data partition on a HFS+ iPod ("Mac formatted iPod") is the third partition. The first is a partition table, the second has the OS, and the third is data.

sudo mount -t hfsplus /dev/sdc3 /mnt/ipod

hide / / print
ref: bookmark-0 tags: linux dual boot grub chainloader windows date: 05-31-2007 16:55 gmt revision:0 [head]


hide / / print
ref: bookmark-0 tags: eeg oss openeeg recording linux date: 0-0-2007 0:0 revision:0 [head]


hide / / print
ref: notes-0 tags: Firefox MathML fonts Linux STIX date: 0-0-2006 0:0 revision:0 [head]

okay, so i spent some time on this and eventually realized that linux doesn't (can't) have all the symbols of the windows fonts used in MathML (for example the pitchfork symbol). The general solution, as per http://mcelrath.org/Notes/MathML, is not so difficult:

  1. install the tex and Mathematica fonts
  2. install opensymbol Debian package, which includes an (incomplete) symbol.ttf font. (the symbol.ttf from windows seems not to work??)
  3. uncomment the lines in /usr/share/firefox/res/fontEncoding.properties:
encoding.symbol.ttf = Adobe-Symbol-Encoding encoding.symbol.ftcmap = mac_roman
  1. some uncommon symbols like the hat and pitchfork are still missing. however, fc-cache | grep Symbol reads:
OpenSymbol:style=Regular Standard Symbols L:style=Regular Symbol:style=Regular
  1. hmm.. .it appears that I have another symbol font.
cd /usr/X11R6/lib/X11/fonts/Type1 sudo rm Symbol* sudo mkfontscale sudo mkfontdir fc-cache ... still there (and the pitchfork still doesn't work :( ) Well, STIX fonts should be out soon, as of Jan20 2006 they have < 400 glyphs to go.

hide / / print
ref: notes-0 tags: linux rename files add extension date: 0-0-2006 0:0 revision:0 [head]

pretty simple, to add a .mp3 to all files in a directory (e.g. if they originally were on an old mac):

     rename 's/(.*)/$1.mp3/' *
the expression in quotes is just a perl regular expression

hide / / print
ref: bookmark-0 tags: linux command line tips rip record date: 0-0-2006 0:0 revision:0 [head]


hide / / print
ref: bookmark-0 tags: OpenGL shaders vertex pixel fragment GLSL Linux programming C++ date: 0-0-2006 0:0 revision:0 [head]


easy to compile on my debian system - all the development libraries had debian packages!

also of interest :

hide / / print
ref: bookmark-0 tags: Linux device_drivers memory virtual_memory PCI address_translation date: 0-0-2006 0:0 revision:0 [head]


hide / / print
ref: bookmark-0 tags: debian linux sarge apache2 subversion install ssl date: 0-0-2006 0:0 revision:0 [head]

http://mattl.co.uk/apache2subversiondebianhowto.html pretty good. SSL and subversion seems to cause problems with apache2 on this 'unstable' Debian build - it complains of a BAD MAC header after a deterministic number of bytes are transmitted. Therefore I moved to port 80 from 443.