Archive

Archive for September, 2007

Printing Long Strings in GDB

September 27th, 2007 No comments

I had to hunt too long to find this (and I never seem to remember it) and I’m always trying to print strings that are too long and thus truncated, with the interesting parts appearing after the “…”

set print element 0

Not particularly intuitive.

Categories: Uncategorized Tags:

Screen vs Ctrl-z

September 27th, 2007 2 comments

Amazing the stuff you forget:

Many years ago, I knew there was a really easy way to detach and reattach sessions in Unix (HP-UX at the time).  But in recent years with Linux, I’ve been using “screen” which was always overkill for simple job control.

While reacquainting myself with emacs, I found myself accidentally hitting ctrl-z and poof, to my horror, my edit session disappeared! But a ps showed emacs was still running. A bit of googling showed that emacs was indeed still alive and well and could be retrieved with fg followed by the job number. jobs -l displays a list of current background jobs.

For more, check out job control in man bash.

Categories: Uncategorized Tags:

Minimal X11 Client on CentOS 5

September 22nd, 2007 No comments

To run X client apps remotely on CentOS5 from your X server requires installation of a couple of small packages.

yum install xorg-x11-apps — installed with dependancies to get basic X11 client components. Also includes xeyes and xclock, useful for testing.

yum install xorg-x11-xauth — needed for ssh authentication.

ssh -X [email protected]
xclock

Categories: Uncategorized Tags:

Compiz and Shift-Backspace

September 11th, 2007 No comments

I don’t know what moron thought it would be a good idea to kill compiz/xgl on shift-backspace but I regularly hit this combination while editing code. Most uncool.

Add this to startcompiz to fix:

xmodmap -e “keycode 22 = BackSpace BackSpace Terminate_Server” &

See previous post for a complete sample startcompiz.

Categories: Uncategorized Tags:

My StartCompiz

September 11th, 2007 No comments

After messing around for a while, my startcompiz (actually startxgl) file looks like this:

#!/bin/sh
Xgl :1 -fullscreen -ac -dpi 96 -br -accel glx:pbuffer -accel xv:pbuffer &
sleep 4
export DISPLAY=:1compiz --replace &
gtk-window-decorator --replace &
xmodmap -e "keycode 22 = BackSpace BackSpace Terminate_Server" &
exec gnome-session
Categories: Uncategorized Tags:

Feisty with Compiz Fusion

September 11th, 2007 No comments

There are a couple of CompizFusion on Feisty recipes floating around but this is the best I’ve found. I also like that it uses the Gutsy repo instead of a 3rd party, since we’re all going to be using Gutsy sooner or later.

This works well on my ATI-based Thinkpad T60P. If you’re using nVidia look here.

Also check out the official Ubuntu community docs here.

Categories: Uncategorized Tags: