Mount ntfs drive on Linux
1. Install ntfs-3g.
2. Create a folder in /media or /mnt (mkdir /media/windows)
3. Use fdisk -l to get the name of the NTFS drive (example: dev/sda1)
4. Add the drive into /etc/fstab so it mounts automatically.
/etc/fstab
/dev/sda1 /media/windows ntfs-3g defaults 0 0
Using X with SSH
I was working on the school computers from home trough SSH and needed to use X. Using the “-X” parameter gave me error messages when I used the keyboard mouse if I remember correctly. This worked without any error messages though.
ssh -Y -l user server
Burn DVD in Linux using dvd+rw-tools
Install dvd+rw-tools with your package manager or download it from here. And then invoke the following commands…
Format disc where /dev/dvd is the device name:
dvd+rw-format -force /dev/dvd
Burn the directory (/home/user/stuff) onto the DVD:
growisofs -Z /dev/dvd -R -J /home/user/stuff
More information:
http://fy.chalmers.se/~appro/linux/DVD+RW/
Recover lost partitions with Testdisk
By mistake, I deleted some of my partitions and totally messed up my partition table a couple of days ago, removing the possibility of booting up my computer at all. Luckily, I found a open source program called Testdisk.
Testdisk is a free data recovery software that can recover lost partitions and make partitions bootable again. Here’s how I recovered my Windows XP partition using a Ubuntu live-CD.
First, I enabled all uncommented repositories in /etc/apt/sources.list.
sudo su
nano /etc/apt/sources.list
Then I updated the package repository list and installed Testdisk:
apt-get update
apt-get install testdisk
When it’s installed, you can start it by typing its name in the terminal. You’ll be asked to create a log file (optional). After that, choose analyze and Intel/PC partition. Your partition table will be shown, wait until it’s analyzed. After the analyze is done, you can also choose to make a deep scan which is recommended. If you decide to recover a partition, just click the right arrow button so the current selection turns green and continue by pressing Enter. You’ll be asked to write this partition on the partition table. Do this.
That’s all, that worked for me at least. I only have some weird problems with my boot manager right now, but the partition is fully bootable.
Using SDL in Debian Linux
Update the repository list and install SDL using apt.
apt-get update && apt-get install libsdl1.2-dev
For other sub libraries (optional) I used the command “apt-cache search sdl” to get the name of the rest of the dev packages. For example libsdlimage-dev or libsdlnet-dev.
Compile SDL application in g++
When I compiled my SDL_net application in Linux, this worked like a charm.
g++ -o appname file.cpp -lSDLmain -lSDL_net
Simple Ubuntu speed-up tweak
I recently searched around for some Ubuntu speed-up tips in order to speed up my Ubuntu computer. I found an interesting thing, it’s considered a bug that slows down the application start-up time and performance considerably.
The tweak/bug
Open the /etc/hosts file as root using any texteditor and replace the following line:
127.0.0.1 localhost
With the name of your computer:
127.0.0.1 localhost computername
Read more about the bug at this site: https://bugs.launchpad.net/ubuntu/+source/gnome-desktop/+bug/94048
leave a comment