Howto: Disable any Ubuntu users internet access
This is quite simple and very effective, I have used it a few times, its pretty convenient since it looks as if the internet is broke or something :)
Check it:
Simply:
sudo gedit /etc/network/interfaces
Then lets add the simple iptables rule to the interfaces file when the internet connection starts up...
Simply add this under auto wlan0 or auto eth0 in the interfaces file:
pre-up iptables -A OUTPUT -p tcp -m owner --uid-owner mykidsusername -j DROP
Ok now you can try it out:
type in the terminal:
sudo iptables -A OUTPUT -p tcp -m owner --uid-owner mykidsusername -j DROP
and switch users to the username you blocked and try to access the internet...
p00f there ya go
enjoy
Howto Integrate Windows XP Desktop into Ubuntu Gutsy and Hardy Heron!
Ok this is really really simple and a great feature of VirtualBOX Now you can simply run Windows XP/Ubuntu at the same time concurrently while switching in between windows applications and Linux applications! I can effectively run XP and Ubuntu at the same time on my Intel HT 3.0 ghz 768 meg ram flawelessly and my box isnt even top of the line. Check out some screenshots:
Ok lets keep this quick & simple shall we?
Grab a copy of VirtualBox Here
or wget http://www.virtualbox.org/download/1.5.2/virtualbox_1.5.2-25433_Ubuntu_gutsy_i386.deb
Run your easy package manager or c/p in the terminal:
sudo dpkg -i virtualbox_1.5.2-25433_Ubuntu_gutsy_i386.deb
Grab your XP cd or steal a copy off of suprnova or thepiratebay... who needs to buy a bsod pos Os anyways, were just using xp for business needs or whatever, unfortunately some companies and people feel that we gotta stick with micr0soft or if we want a better solution than wine, here we go...
Add yourself to the vboxusers group.
sudo adduser defcon vboxusers
Now lets get started, open up VirtualBox from Applications->System Tools->VirtualBox and click "NEW" Select OS Type XP and name your VirtualBOX, select the base memory and make a drive, make sure you have 7-10 gigs to spare.
Now make sure you setup your CD/ROM to be bootable and any other settings you see fit...
I basically summarized this because its a GUI and newbie friendly...
Now install pop in your cd or mount your warez xp iso with v-box and fire up the new Virtual Machine. Install XP like normal, and select FAT32 as a filesystem, it seems faster to me. Now once the install finishes, login and click on "Devices"->Install Guest Additions...
This will allow you to integrate XP into the Ubuntu Desktop, and allow you to use share folders, copy/paste between OS's and no capture keys...
Once installed simply reboot and log back into XP. And now lets enable Seamless mode :)
To enable seamless mode, after starting the virtual machine, press the Host key (normally the right control key) together with "L". This will enlarge the size of the VM's display to the size of your host screen and mask out the guest operating system's background. To go back to the "normal" VM display (i.e. to disable seamless windows), press the Host key and "L" again.
I hope you like this easy howto, its pretty cool to show off to friends/family and co-workers and to run proprietary yet needed M$ applications.
Get better sound in Ubuntu with the Brand new OSS 4!
Hell yea, im excited to share this little howto! OSS Has enlightened my life and made my linux/unix experience more desirable, my volume is louder, my sound quality rocks, stereo is actually stereo, surround sound actually works now... I can enjoy more music more!
The OSS project was initially free software, but following the project's success, Savolainen started the company 4Front Technologies and made his support for newer sound devices and improvements proprietary. In response, the Linux community abandoned OSS and development effort switched to the replacement Advanced Linux Sound Architecture (ALSA). Many free software operating systems such as Linux and FreeBSD continued to distribute previous versions of OSS, and continued to maintain and improve these versions.
In July 2007, 4Front Technologies released sources for OSS under CDDL and GPL licenses, now OSS v4
Howto Install:
First lets download OSS 4:wget http://www.4front-tech.com/release/oss-linux_v4.0-1008_i386.deb
Now lets install:sudo dpkg -i oss-linux_v4.0-1008_i386.deb
Wow that was easy...
Now lets blacklist our slow/garbage ALSA drivers...
First we must locate those drivers with a simple cmd:lsmod | grep snd
Thats it, now you should see a list of things starting with "snd"
Now lets open another terminal and:sudo -s
Now lets blacklist the old drivers:
Ok now either use gedit or nano, I prefer mousepad but lets use nano :)nano /etc/modprobe.d/blacklist
Now lets scroll all the way to the bottom of the file and blacklist our snd* drivers
You want your additions to look like this:# blacklist alsa
blacklist snd_intel8x0
blacklist snd_ac97_codec
blacklist snd_pcm
blacklist snd_timer
blacklist snd
Make Sure you save the file :)
Basically we are done, other than a simple reboot and sudo soundon after reboot, mostly soundon isnt necessary.sudo reboot
Have fun and enjoy your better sound drivers :)
References:
OSS Developers Blog
OSS Help Forum
Another Helpful OSS Howto
Great Install Directions and OSS tools
Setup VNC Server for Ubuntu Gutsy Gibbon and Hardy Heron in 3 easy steps
I just did this on Gutsy, and I thought that it might be worth sharing as a simple way to set up a persistent VNC server. If you dont know what VNC is, its similiar to Remote Desktop for wind0ze. This is accessible using regular vnc viewers, and through java-enabled browsers. That's right, you work on your computer through a browser.
1) Install packages | click here for 1 click installsudo aptitude install x11vnc vnc-java
2) Set up password to allow clients to viewx11vnc -storepasswd
3) Open up ports 5800 and 5900 on your firewall
4) Run this command: x11vnc -forever -usepw -httpdir /usr/share/vnc-java/ -httpport 5800
That's it!
And an optional step 5:
5) Add the command from 4) to your sessions, so that it starts at each login
If you want to test it out on a browser, type this in the URL field:
25.542.161.414:5800
Of course, replace the 25.etc. w/ your external IP address.
Addendums to this are welcome, such as how to make it more secure. I just thought it'd be nice to have a quick and dirty tutorial for getting this set up easily.
Easily Setup Seperate /home partition in Ubuntu!
Ok I have almost always had a seperate home partition, excluding the 3-10 times I have completely crashed my system and had to redo it all.
Reasons you should use a seperate home partition:
1. Easy backup/restore.
2. You can simply rm -rf / and pop in a livecd and be able to mount your home partition as /home without deleting users home directories and files.
3. You can use multiple linux Distro's with the /home partition
4. You dont have to worrie about the hassle of re-installing or upgrading ubuntu because everything you need is in your /home directory, you can simply backup all your apt packages via aptoncd.
Howto:
1. Reboot/Boot up your ubuntu live cd.
2. sudo aptitude update && sudo aptitude install gparted ntfsprogs
3. Then, press Alt-F2 and type:
gksudo gparted
4. In GParted, find the partition you want to resize in order to make room for your upcoming /home partition. In this case, I'm resizing /dev/hda5, but your partition may be different. Be sure to keep track of the names of your partitions--these names are very important (/dev/hda1, /dev/hdb1, /dev/sda2, etc.).
5. Right-click on the partition and choose the Resize/Move option.
6. Choose the new size you want.
7. Then, in the new empty space, right-click and select New.
8. Choose to create the partition as Filesystem ext3.
9. When you're satisfied with your new partition layout, click Apply
Once the changes have been applied, make note of the partition name of your new partition and then quit GParted.
Now, my original partition that I shrunk was /dev/hda5, and it created a new partition called /dev/hda7, and my /home folder lives on /dev/hda1. It's very important that you substitute in your own appropriate partition names for the ones I'm using--you most likely will have only two partitions you're dealing with--the one you shrunk and the newly created one.
Ok sweet now that is done, all we gotta do now is setup the new partition to be used...
Now, back in the terminal, I'm going to mount /dev/hda1 and /dev/hda7:sudo mkdir /old
sudo mount -t ext3 /dev/hda1 /old
sudo mkdir /new
sudo mount -t ext3 /dev/hda7 /new
Now we're going to back up the /home directory on the old partition and move it to the new partition:cd /old/home
find . -depth -print0 | sudo cpio --null --sparse -pvd /new/
sudo mv /old/home /old/home_backup
sudo mkdir /old/home
Yes, one of those lines looks really complicated--please type it as is--or, if you're unsure of your typing skills, copy and paste it into the terminal. Believe me--the command is necessary.
Next, we're going to specify to use the new home partition as /home:sudo cp /old/etc/fstab /old/etc/fstab_backup
type blkid in terminal and find /dev/hda7 it will look something like this:
/dev/hda7/: UUID="8b89a5c4-20ff-477c-a49e-c1ccb435bf11" SEC_TYPE="ext2" TYPE="ext3"
Copy the "UUID=8b89a5c4-20ff-477c-a49e-c1ccb435bf11"sudo nano /old/etc/fstab
You'll then be taken to the nano text editor. Add in these lines:# /dev/hda7
defaults,noatime,errors=remount-ro
UUID=8b89a5c4-20ff-477c-a49e-c1ccb435bf11 /home ext3
Then save (Control-X), confirm (Y), and exit (Enter)
After you reboot, you should be now using your new /home partition.
If you find that you are running out of room on your old partition and you're pretty confident everything is working as it should be, then go ahead and delete the backup of home:sudo rm -rf /home_backup
What if this doesn't work?
You know, it really should work, but if you somehow messed up your /etc/fstab and didn't configure it correctly... well, that's why we have a live CD, so we can fix things.
Boot up the live CD, go to a terminal, and type:sudo mkdir /recovery
sudo mount -t ext3 /dev/hda1 /recovery
sudo cp -R /recovery/home_backup /recovery/home
sudo cp /recovery/etc/fstab_backup /recovery/etc/fstab
Create shortcuts in Ubuntu
Hey just ran across an easy way to make symbolic links in ubuntu, I was missing out the the right click create shortcut feature in windows but in Ubuntu its easier...
Howto:
All ya do is simply hold in ctrl and shift and drag then drop a folder/file and it creates a virtual symbolic link ;)
By default, the file manager adds an emblem to symbolic links.
Note:
The permissions of a symbolic link are determined by the file or folder to which a symbolic link points.