hartvig.de

linux power!


Linux tips and tricks

without comments

Redirect while preserving the “back button” functionality

index.php:

<?php
header(”Location: http://www.hartvig.de”); /* Redirect browser */

/* Make sure that code below does not get executed when we redirect. */
exit;
?>
Batch rename files from htm to html
for file in *.htm ; do mv $file `echo $file | sed ’s/\(.*\.\)htm/\1html/’` ; done

Control remote desktop with local keyboard and mouse

ssh -X 10.0.0.8 “x2x -west -to :0.”

Mount a windows partition in andLinux [adapted from this article]

If you want to mount a Windows Partition with andLinux you have to do the following steps (Lets call the partiton e:\):
1. Go into your andLinux folder (eg. c:\program files\andLinux\), open the file settings.txt and add the line

cofs1=E:\

at the end. Make sure, you have a newline at the end of your settings_static.txt

2. start andLinux
3. open a shell
4. create the folder

/mnt/e

(with the command: mkdir /mnt/e)

5. open the fstab (e.g with the command vim /etc/fstab)
6. insert the Line

1 /mnt/e cofs defaults 0 0

the one at the begining of the line represents cofs1. If you want do add more partitons to access you can precede with cofs2=<partitionlabel> and 2 /mnt/<label> … and so on. (do not use the zero’s. It is used by the andLinux boot script.)

7. restart andLinux
8. now you can access the partition with Windows and andLinux at the same time. Make sure you do not edit the same File with Windows and andLinux at the same time.
9. have fun!

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google

Written by admin

February 25th, 2008 at 5:52 pm

Posted in Uncategorized

Leave a Reply