Saturday, July 26, 2008

How to change the default size of the terminal window in ubuntu

Use the --geometry option in gnome-terminal. So I changed the command of my Terminal launcher to be:

gnome-terminal --geometry=80x48

Friday, July 25, 2008

Setting up an ssh / sftp server in ubuntu

Using OpenSSH: http://www.openssh.com/

sudo apt-get install openssh-server


More information here:
https://help.ubuntu.com/community/SSHHowto
http://tombuntu.com/index.php/2008/02/19/installing-and-using-a-ssh-server/

Edited config file at /etc/ssh/sshd_config and set:
PermitRootLogin no
AllowUsers
Port #####

This site has good tips on SSH server security.

Command to restart ssh server:

sudo /etc/init.d/ssh restart

Setting up SFTP logging:

1) edit /etc/ssh/sshd_config
2) on the line Subsystem sftp /usr/lib/openssh/sftp-server, add a "-l VERBOSE" flag. So the entire line should look like:

Subsystem sftp /usr/lib/openssh/sftp-server -l VERBOSE

SFTP activity will be logged to /var/log/auth.log. For more logging options, see http://www.openbsd.org/cgi-bin/man.cgi?query=sftp-server&sektion=8

Wednesday, July 16, 2008

Sunday, July 13, 2008

Choosing a mouse and keyboard for my HTPC

For input devices for my HTPC, I decided to go with the Gyration Cordless Optical Air Mouse and Compact Keyboard Suite (GC1105CKM). Both the mouse and keyboard connected and worked with Ubuntu Hardy Heron right out of the box. The only thing I needed to setup was the additional mouse buttons and multimedia keyboard keys.

To utilize the extra buttons, I followed the directions here and used xbindkeys:
http://perens.com/works/software/gyration.html

1) I first created an .xbindkeysrc file in my /home directory

xbindkeys --defaults > /home/stchang/.xbindkeysrc

2) I ran xbindkeys-config and added the three additional mouse buttons using the "New" and "Get Keys" buttons in xbindkeys-config

3) For the Command box, I used xvkbd -xsendevent to execute the key sequence that I wanted. For now I have the buttons mapped to do forward/rewinding in vlc:
button3: xvkbd -xsendevent -text "\C\[Left]"
button4: xvkbd -xsendevent -text "\A\[Left]"
button5: xvkbd -xsendevent -text "\C\[Right]"