Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts

Tuesday, December 23, 2008

Ubuntu: Reset Gnome Panels

I've been customizing my gnome panels, and I happened to mess them up pretty bad. However, I found an awesome way to reset the gnome panels back to the default here.

gconftool --recursive-unset /apps/panel
rm -rf ~/.gconf/apps/panel
pkill gnome-panel


W

Friday, September 12, 2008

Ubuntu: Volume Problems

Recently, my audio has been much softer than it has been when I first installed Ubuntu. Even if I turn my volume up completely, the audio was only at a normal volume. I found this odd because before, when I turned it up, it would blast my ears off.

I managed to find out why! If you go to your Volume Control, Edit > Preferences, and select PCM. Then turn the PCM volume up to the desired level. Mine, for some reason, was set at a very low volume.

I'm not quite sure what happened, as I never played with my settings. My only guess is that some particular update fooled with the settings.


W

Thursday, July 17, 2008

Gedit

As promised, here is a list of the plugins that I have been using for gedit:

- change case
- code comment
- document statistics
- embedded terminal
- file browser pane
- indent lines
- insert date/time
- join/split lines
- line tools
- modelines
- rails hot commands
- rails hotkeys
- regex search (files)
- reopen tabs
- session saver
- snap open
- snippets
- spell checker
- split view 2
- todo list
- word completion

Wow! That's a long list. I've also enhanced my snippets for my personal use. I suggest you do the same. They do wonders in saving time ;)

If you got any gedit setups, leave a comment. It would be nice to see the variety of setups!


W

Tuesday, July 15, 2008

Gentoo + Vim

To my dismay, when I was using Gentoo, Vim was not installed. Sad as I was, I attempted to rectify this problem. No worries... a simple 1-liner:

emerge -av vim

and I'm happy once again ^^


W

Saturday, July 12, 2008

Uploading large file to nginx server

If you upload a file over 1M in size to a nginx server, you might get a "Request Entity Too Large" (413) error.
We can overcome this problem by specifying the client_max_body_size in nginx.conf

nano /etc/nginx/nginx.conf

under "server {"
add the following line

client_max_body_size 5M

this will change the max file size to 5M, you can change that number to whatever you like.


J

Tuesday, July 1, 2008

VMWare Server Fix

I managed to find a solution to my previous problem after updating my Ubuntu. It's quick and it also retains all the states of the virtual machines ^^

https://answers.launchpad.net/ubuntu/+question/36849

And just in case the link ever dies:

sudo apt-get install vmware-server-kernel-source
cd <temp dir>
tar xvjf /usr/src/vmware-server.tar.bz2
cd modules/vmware-server-kernel/
export KPKG_DEST_DIR=<where the deb package should go> # otherwise fakeroot won't work
export KVERS=`uname -r`
fakeroot debian/rules binary-modules
sudo dpkg -i $KPKG_DEST_DIR/vmware-server-kernel-modules-`uname -r`*.deb
cd -
rm -r modules
sudo /etc/init.d/vmware-server restart

Enjoy!


W

Tuesday, June 24, 2008

Ubuntu Gutsy Update + VMware Server

Sorry for not posting anything for quite a while now. Been super busy with some other stuff.

Just wanted to vent a little. I believe yesterday, or the day before, there was an update to Ubuntu Gutsy. All is well, except when I tried to run VMware Server today, it wouldn't start! I checked the logs and said there was something to do with /dev/vmmon. After a quick Google search, I discovered that the new update had broken VMware Server! NOOOOOOOOOOOO!!!!!! This sucks!

A solution I found was to not use the repository version of VMware Server, as it is old anyways. I'm not sure if I want to go through the trouble of reinstalling it manually on a 64-bit machine though... I guess I'll wait and see how long it takes them to fix it T.T


W

Wednesday, June 4, 2008

Ubuntu + AMD64 + Flash

Well, apparently, this combination just doesn't go well together. I'm running Gutsy right now, and having a horrible time with Flash. I've already tried using the install script given in the Ubuntu forums, only to have it half working. Sometimes, everything plays, sometimes, nothing plays. I can usually get YouTube working, but there are some Flash sites that just don't work.

I was recently trying to play a .swf file by simply dragging it into FireFox. To my dismay, I ended up with a gray screen. Sucks!

I finally found a workaround... at least for .swf files. I downloaded the Windows Flash Player 9 Projector content debugger (standalone player) from the Adobe site. I then created a launcher using the command:

wine /path/to/standalone_player

BAM! It works wonderfully. However, still no hope for the stuff that is online T.T


W

Monday, May 26, 2008

Ubuntu: .docx files

OpenOffice is amazing when it comes to opening up .doc files created from Microsoft Word. However, there's a slight problem when it comes to opening .docx. Simply put, OpenOffice doesn't recognize it!

Don't worry though... there's always a solution! Check this out and follow the instructions posted by stuporglue.

Enjoy!


W

Thursday, May 22, 2008

Remote Host Identification has Changed

I just reinstalled our main server. When I try to ssh into it I got an error:

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that the RSA host key has just been changed.

Please contact your system administrator.
Add correct host key in /home/user/.ssh/known_hosts to get rid of this message.
Offending key in /home/user/.ssh/known_hosts:1
RSA host key for ras.mydomain.com has changed and you have requested strict checking.
Host key verification failed.

-----------------------------------------------------------

The reason behind this is because your local computer still has the old RSA host key stored in /home/your_account/.ssh/known_hosts.

The easiest way to solve this problem is simply delete that file or you can delete the host entry in the file.


Joseph

Saturday, May 10, 2008

VMware Server: Adding a new HDD

I'm running WinXP through VMware Server (as it comes free and is in the Ubuntu repos!!!). It runs really, really well and am completely satisified with it. However, I wanted to add a new HDD to my VM.

Well, I did the obvious, which was to power down my VM and edit the settings. I went to go add a new vitual HDD and pre-allocated it (all the defaults).

I then powered on my VM and lo-and-behold, no new disk! What?!?!?! Well, I found a very nice little tutorial on YouTube that teaches you how to do it properly. Apparently, there's a few extra steps required inside of WinXP to detect and setup the newly added disk:

http://www.youtube.com/watch?v=z3GciNMYLlo

Hopefully, this'll help anyone that is stuck.


W

Friday, May 9, 2008

Ubuntu + Compiz Fusion plugins

Gutsy Gibbon already has Compiz Fusion packaged with it, but apparently, there are numerous plugins that can be added on as well!

This guy has written a lovely script to get you started:

http://ubuntuforums.org/showthread.php?t=620000

Enjoy!


W

Wednesday, May 7, 2008

Ubuntu + Ekiga

Ubuntu comes bundled with Ekiga, which is a VoIP program. It is something like Skype. I wanted to test this out and see how well it worked. I had a little bit of a problem configuring it though and would like to share my solution.

When using the configuration assistant, I was stuck at step 5, which told me that I had a symmetric NAT. If you don't run into this problem, then the configuration should go smoothly and you should have no problems. Anyways, back to my problem. Ekiga cannot run with a symmetric NAT. If you find any scripts to run in order to get Ekiga working, DO NOT run it. I tried one that I found on a wiki, and I lost my internet connection. It basically changed my iptables. No worries though if you did... just reboot your machine and everything will be reset back to a working state.

The script was made for older versions of Ekiga (much older) and is now of no use. The easiest way to get Ekiga working is to use port triggering on your router:

Service Name: STUN (or anything you like)
Triggering Port: 3478 (UDP)
Inbound Ports: 5000-5100 (UDP)

This should do it. Rerun step 5, and it should not report a Cone NAT. This is now acceptable and you can continue with the configuration.

Enjoy!


W

Friday, May 2, 2008

VMware on Hardy

There is currently no vmware package for hardy (DAMNIT!!). So we gotta do it the hard way.

1. apt-get the following

sudo apt-get install build-essential linux-headers-`uname -r`
sudo apt-get install xinetd

2. download the vmware tarball

just goto the website, it's constantly changing so I wouldn't bother posting it.

3. Get your FREE registration number (this used to cost a fortune, lucky us)

http://register.vmware.com/content/registration.html

4. Extract the tarball somewhere and run it by doing

tar -zxvf xxx.tar.gz
go into the directory
sudo ./vmware-install.pl

5. Now it'll ask you bunch of questions, just keep pressing enter. After awhile, it'll start compiling and fail :)

6. This has something to do with hardy's kernel, but don't worry, there's a patch for it.

wget http://uruz.org/files/vmware-any-any-update-116.tgz
tar -xvzf vmware-any-any-update116.tgz
cd vmware-any-any-update116
sudo ./runme.pl

7. VMware should start compiling and asks you more questions after (just keep pressing enter)

8. Once you've configured your vmware server, you need to link up some libraries

sudo ln -sf /lib/libgcc_s.so.1 /usr/lib/vmware/lib/libgcc_s.so.1/libgcc_s.so.1
sudo ln -sf /usr/lib/libpng12.so.0 /usr/lib/vmware/lib/libpng12.so.0/libpng12.so.0

9. And that's it, you can launch it by typing vmware on your console


J

Monday, April 28, 2008

Hardy Heron Connection Problem

Just upgraded to Hardy two days ago. Is it nice? Yes. Is there any problems with it? Yes.

Installation was fast as usual, took around 20 mins. Video settings, sound card, network card ... are all setup and ready to go after the system rebooted itself. Firefox 3 looks better than ever, however, I can't seem to get a connection?!?

What's more weird is that I can actually goto google.com, but everything else will time out on me!
After hours of searching, some dude suggested that I should decrease the MTU (maximum transmission unit) from 1500 (standard for ethernet) to 1492 by typing the following command

sudo ifconfig eth0 mtu 1492

amazingly, my connection is back to normal! (if anyone know why that is, can you please educate me on this issue? I really like to know the reason behind this!)


J

Friday, April 4, 2008

Gedit

So after playing around with Gedit for a while, I'm loving it. It's super fast and there are so many nice plugins to make it very similar to an IDE. There are some things that aren't present, such as refactoring, but that never worked properly in RadRails anyways!

Before, I mentioned that there was no SVN or debugging support. As I continue to develop using Gedit, I have not encountered any problems with this. I'm currently using SVN from the terminal and it's perfectly fine. Lucky I've had experience with using CVS in the terminal ;) Also, I installed a graphical diff program called Meld so that I don't have to look through the classic diff. I haven't had to do too much diffing, so I can't say too much about it.

As for debugging, I realized that for RadRails, I was already using ruby-debug, which runs straight off the terminal! So far, for what little debugging that I have had to do, I found the terminal easier to work with. It requires a bit more typing though (compared to the mouse clicking in RadRails). However, it works... unlike RadRails. The debugger in RadRails was very unpredictable and I could never access the variables without some sort of error popping up. It was so annoying! I'm quite happy with the terminal, so for now, I'm sticking with it.

Apparently, there are new plugins still being developed for Gedit as it gets more popular. Perhaps someone, in time, will come out with an SVN plugin or a debugger plugin. We'll just have to wait and see ;)

In the meantime, I'm super happy with my current setup. There are little things here and there that are bugging me, such as when I hit the home button, it jumps to the beginning of the line, rather than the beginning of the words. I'm hoping there's a configuration that I just haven't found yet.

After playing with it some more, I'll post up the plugins I have installed.


W

Monday, March 31, 2008

Textmate: Ubuntu style!

If you've ever watched any railscasts, most of them use something called Textmate to edit their files on a Mac. Apparently, it's suppose to be really good.

Well, recently, I've been getting really fed up with Aptana and RadRails. There are lots of things that bug me, like the wait time to save a file and especially the wait time to copy/paste things. It's just horrible. Furthermore, RadRails decides to crap out on me every so often. There are so many errors in the background that I run out of memory. So far, there doesn't seem to be a fix.

Enough of that... I'm moving on to better things, like a Textmate clone: a revved up version of Gedit! Apparently, you can easily make Gedit behave very similarly to Textmate! I followed this guide and so far, everything is smooth.

I haven't tried developing yet. I just installed everything. I'll let you guys know how it goes... but I'm anticipating I'll like this more than RadRails. Only downside is the loss of the SVN plugin and a debugger... I wonder...


W

Sunday, March 30, 2008

Ubuntu beats out Mac and Vista

The results are final from the 3-day-long hack-fest and guess who came out on top? Yup, that would be Ubuntu!

A hacking contest was held in Vancouver recently which featured 3 laptops, 1 was a MacBook Air, the other a Vista, and the 3rd was an Ubuntu.

The first to be compromised was the MacBook Air. Amazingly, Vista held its ground until the 3rd day, where it was finally pwned.

More details can be found here:

http://dvlabs.tippingpoint.com/blog/2008/03/28/pwn-to-own-final-day-and-wrap-up


W

Friday, March 21, 2008

Ubuntu + Postfix

So I researched a little bit about setting up an email server. I at least got something going, as I could send email out. However, I am still using my ISP's server as a relay host, as they block port 25.

On Ubuntu, I set up Postfix by following the documentation.

Then, to use a relay host, I simply went into /etc/postfix/main.cf and entered the server's address into the relayhost variable.

A quick reload of the Postfix server:

>sudo /etc/init.d/postfix reload

and all was right with the world.

To set up POP3 and IMAP, take a look at the following documentation.

Enjoy!


W

Wednesday, March 19, 2008

Bugzilla: Round 2 (continued)

So what happens when your ISP blocks port 80 and 25. Well... Bugzilla cannot be accessed and emails cannot be sent... kinda useless then huh?

Changing the apache listening port from 80 to something else is quite easy:

>sudo gvim /etc/apache2/ports.conf
Change the 'Listen' port to your own preference
>sudo /etc/init.d/apache2 stop
>sudo /etc/init.d/apache2 start

That should fix the port 80 problem.

Now for the port 25 problem. I originally tried to get sendmail to use an alternate port for sending emails. However, this attempt was unsuccessful. I also tried installing postfix, but nothing worked. I then tried to connect to an external smtp server like smtp.gmail.com:587. However, this required TSL to be enabled, and I couldn't find any settings in Bugzilla that would support it. Interestingly enough though, I found a patch to add username/password to the SMTP configurations that will be included in the next Bugzilla:

https://bugs.launchpad.net/ubuntu/+source/bugzilla/+bug/133903

I then found out that my own ISP, Shaw, had an email server. I hope I'm not using it illegally, but there is no authentication required for mine. I ended up setting configuration to use SMTP rather than sendmail, and added the SMTP server from Shaw. I then restarted apache2 for safe measures, and VOILA! Bugzilla with emails!

Obviously, this is a workaround which uses an external SMTP server, but it works! Maybe if I have more time, I will play with sendmail and see if I can get it to work. In the meantime... I'm happy!


W