Thursday, March 17, 2011

Mozilla Thunderbird Corrupted Folder Workaround

In the past 5 years, many colleague of mine have lost their emails (Thunderbird in Linux OS). So I take the step to overcome this. I've taken this post from here, just want to share this because not all people willing to search and read thoroughly long technical article like that. Editing a little bit to give more understanding (for myself, actually :D), so I hope you could understand it as well. Please keep in mind that I done these in Linux, but could be done in Windows as well, with a little adjustment of course :)

Here's a little quote and introduction:
If the corruption is severe, deleting the .msf files won't help much, and compacting the folder may just make it worse. You'll typically run into this only with the Inbox folder. It's much more vulnerable to corruption because many users tend to store lots of messages in it, and they also frequently delete messages in it. That's why it's recommended that you DON'T permanently store messages in your Inbox folder and instead move them to other folders. You can fix the problem by replacing the corrupt folder with a new known good folder into which you copy the messages from the corrupt folder.
Follow these steps:
1. Exit Thunderbird
2. Make a temporary backup of your profile folder (usually in /home/[username]/.mozilla-thunderbird/)
3. Start Thunderbird
4. Create new folder and name it (e.g. "TestFolder")
5. Open your seemingly corrupted folder (e.g. "Inbox"), selected all messages then copy them to your newly created folder
note: In extreme cases (if Thunderbird and/or the computer become extremely sluggish), you may have to choose only a few emails at a time.
6. Verify that all of the messages have been copied
7. Right-click on the new folder, then choose "Compact"
8. Go to you profile folder (/home/[username]/.mozilla-thunderbird/) to see if your new folder looks like it has been compacted. Compare the size with the original folder which you copied the messages.
9. On Thunderbird, check the new folder to make sure you still have all your messages (by looking at the Total message count at right below status bar of Thunderbird)
10. If it looks good, then do the following:
  • Go to profile folder, then rename your old directory (e.g. "Inbox") to "InboxOLD"
  • Delete its .msf file (e.g. "Inbox.msf")
  • Rename the "TestFolder" to "Inbox"
  • Delete "TestFolder.msf"
11. Restart Thunderbird and use as usual

note: This workaround will work ONLY if your seemingly corrupted folder hasn't corrupted at all. If it is corrupted, or already contains a lot of messages, Thunderbird will "hidden" the message and marked it "deleted". So compact-ing will only delete the messages.

Wednesday, March 16, 2011

Terminal Apps for webOS 2.1.0

Thanks to @webosinternals and @metaview for helping me figure this out. You can also see here

You have to install Preware and Internalz on your 2.1.0 webOS device. The simple way is like this:
1. Install Terminus from Preware
2. Run it once, then close it
3. Open Internalz, go to Preferences
4. Change "MasterMode" option to ON
5. Change Newline format under Text Editor option to LINUX
6. Then using Internalz to go to /var/palm/data/jailusers
7. Find the line with terminus in it, change jail_game.conf to jail_palm-native.conf, SAVE it
8. Run Terminus again, and you should see prompt on it
9. You can install Bourne Again Shell package from Preware to add color to your CLI
10. Enjoy! :)

p.s.: Don't forget to send donation for supporting their development projects

Saturday, February 5, 2011

View Your Real X Display Using x11vnc,

I've been manage several servers with different operating systems for a couple of years. I used VNC to remotely view and manage Linux/ UNIX servers through their X displays. If you ever used and configure VNC server at Windows OS, you might find a slight differences with the one at Linux/ UNIX. In windows, you can configure VNC and use it with any display, yet you still can view your real desktop display, the one that you've been and always used. But in Linux/ UNIX, when you configure your VNC server, you can't configure it to connect to your real X display, indeed it always create a new display, so you can't view your existing open applications.

Recently I just found out a very simpe and right Linux/ UNIX application for that purpose, it called x11vnc. X11vnc is a VNC server for real X display, it allows one to view remotely and interact with real X display. With this tools, now I can view and control any X applications running on my server. The usage is very simple either.

First, you must install this tools. For I am using Ubuntu server, this is the command:
server# apt-get install x11vnc

And after it installed, execute this command to run VNC server:
server# x11vnc -display :0
You'll get some notifications upon execute the command, its for security purposes (access password, etc.), just read and customize it according to your server configuration.

After done with above command, you can view X server's display from your client using this command:
client# vncviewer server:0

That's it. If you run the command on server with no errors, right now you can view your real X server's display, with any X application already running on it. Cheers! :)

 

Monday, January 31, 2011

Cygwin: Coloring CLI

I've got this from someone who share it in the internet, so the credit should goes to him/ her :) This is just a note-taking, so I can search it on the archive in the future.

Add these lines to .vimrc file which located on your $HOME directory (or create one if you can't find one):

" Switch syntax highlighting on, when the terminal has colors
" Also switch on highlighting the last used search pattern.
if &t_Co > 2 || has("gui_running")
  syntax on
  set hlsearch
endif

And for your Cygwin CLI, so you can see clearly. Add this line to your .bashrc file on your $HOME directory:
alias ls="ls -CF --color"

That's it.. restart your Cygwin, and you'll find the differences :)