setfacl

Before I forget, I would like to keep it here.

setfacl -Rm group:SOME_GROUP_NAME:r-x /foo
· %2008/%02/%22 %10:%Feb · DongInn Kim · 0 Comments

Screen shortcuts

Key Action Notes
Ctrl+a c new window
Ctrl+a n next window I bind F12 to this
Ctrl+a p previous window I bind F11 to this
Ctrl+a ” select window from list I have window list in the status line
Ctrl+a Ctrl+a previous window viewed
Ctrl+a S split terminal horizontally into regions Ctrl+a c to create new window there
Ctrl+a X Close the current region among the split regions
Ctrl+a :resize resize region
Ctrl+a :fit fit screen size to new terminal size Ctrl+a F is the same. Do after resizing xterm
Ctrl+a :remove remove region Ctrl+a X is the same
Ctrl+a tab Move to next region
Ctrl+a d detach screen from terminal Start screen with -r option to reattach
Ctrl+a A set window title
Ctrl+a x lock session Enter user password to unlock
Ctrl+a [ enter scrollback/copy mode Enter to start and end copy region. Ctrl+a ] to leave this mode
Ctrl+a ] paste buffer Supports pasting between windows
Ctrl+a > write paste buffer to file useful for copying between screens
Ctrl+a < read paste buffer from file useful for pasting between screens
Ctrl+a ? show key bindings/command names Note unbound commands only in man page
Ctrl+a : goto screen command prompt up shows last command entered
· %2008/%02/%14 %14:%Feb · DongInn Kim · 0 Comments

Restore grub

Sometimes, you may mess up with your grub and you can not even boot up your system because of the broken grub.

Here is a simple way to restore or re-setup grub.

  1. Boot up your system with the first install CD or DVD to go to the rescue mode (e.g., linux rescue)
  2. Let the rescue mode mount your linux partition(your root(/) partition) to /mnt/sysimage.
  3. chroot /mnt/sysimage
  4. grub-install /dev/hda ⇐ if your grub is not installed/messed up, try to reinstall it
  5. grub
  6. root (hd0,1) ⇐ The first number indicates the disk and second one is for the boot partition
  7. setup (hd0)
  8. quit
  9. And get out of the rescue mode and then boot up your system without your installation CD / DVD
· %2008/%01/%13 %16:%Jan · DongInn Kim · 0 Comments

SSH Tunneling

This is a very useful thing to remember when I need to run a remote X application on a local machine. Especially, when I need to test a web server which is not open to the public.
Before using ssh-tunneling, I had to setup ssh X-forward which is not safe at all and then run the web browser on the ssh-connected machine. :-( This causes a really heavy traffic.

ssh -C -o CompressionLevel=9 -L 5901:localhost:5901 USER@hostname

Where

  • USER needs to be replaced with your real username available on the server which you try to connect
  • hostname is the hostname of your server. Of course, it can be just an IP address.
  • 5901 can be any other ports to tunnel. 5901 is used for VNC

There is another good example to do ssh-tunneling for accessing the secondary remote host so that we don't have to do “ssh” twice (e.g., first ssh to the first remote host and then second ssh to the second remote host).

ssh oscar.osl.iu.edu -L 10000:192.168.0.101:22 -g

After setting up the ssh-tunneling like this, run the following command to access the second host directly.

ssh -p 10000 localhost
· %2007/%11/%02 %09:%Nov · DongInn Kim · 0 Comments

Running the remote X applications on Apple

There are three things that you have to consider to make your remote X applications work on your Apple machine.

  1. The server side configuration of SSH to allow “X11Forwarding=yes” on /etc/ssh/sshd_config (most linux boxes)
  2. Turn on “X11” terminal application
  3. Set the “DISPLAY” environment if it is not setup yet
         export DISPLAY=127.0.0.1:0.0
       or
         setenv DISPLAY 127.0.0.1:0.0
    

And then you can ssh into your remote machine and run any X applications.

I have to run ssh with ”-Y” or ”-X” option (mostly -Y) to get this thing to work and if possible, ”-X” should not be used for your security.

Older entries >>

blog/linux.txt · Last modified: 2007/03/16 11:06 (external edit)
Back to top
Open Systems Lab
Indiana University Computer Science Department
Lindley Hall 215
150 S. Woodlawn Ave.
Bloomington, IN 47405-7104

chimeric.de = chi`s home Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0