Friday, August 27, 2010

On/Offline dictionary for Linux:GoldenDict

Even though there is a dictionary application for Linux, it only works online for default. It is possible to make it work offline with "dictd", but still its use is limited, as it can't show a pop-up window in other application.

I recommend GoldenDict. It works with many other dictionary formats. Moreover, it has a "snap windows function", which calls a pop-up windows with the definition. It can be used with many dictionary data files, and also with online dictionaries and wikipedia.

Thursday, August 19, 2010

Disable auto launching, make VirtualBox work with iTunes 9.2

Disable applications from launching automatically:
On Ubuntu 10.04, this setting can be changed in the preference window of Nautilus. See the Media tab.

Make VirtualBox work with iTunes 9.2:
ps. How to show all the USB devices dimmed in grey

Enable VT-x/AMD-v in settings of Virtual Machine. Reboot, enter the BIOS, find Virtualization tab, enable Virtualization extension. Then it will Boot Then, TURN OFF the PC - Turn on again. (Don't reboot, turn the PC off. I don't know what is exactly different, but rebooting doesn't seem like turn on the virtualization function.)
Now launch VirtualBox and run the virtual machine. Go to /home/user_name/.VirtualBox/Machines/virtual_machine_name/Logs, then open VBox.log file. Search the word "VT-x". See if it reads as activated. If it is successfully enabled, you're good to go with iTunes 9.2!
If you don't have virtualization function in your BIOS, then it seems worth to install VMWare. But it seemed quite complicated to install it on Linux.

information from Ubuntu forum

Sunday, August 8, 2010

Finding Files using text command on Linux

Added: Well, for a general search, "Search for files..." applet works like a charm, moreover it's super fast.


As I use more a text command, I clearly feel that it's faster than using GUI. For example, to find files, with Nautilus (it's like explorer on Windows or finder on Mac), not only it takes a lot of time, but it won't also show me full path that I need.

With 'find' command on Terminal, there's no such a hassle any more, and needless to say, it's much more powerful.


The Unix command "find" is quite powerful, and if you know how to use it you can find pretty well anything. The basic syntax is "find ". Options include criteria for your search, actions to take on files found, etc. I'll give you a couple of examples then point you to the man page for detailed usage and more interesting examples.
You want to find every file in ~/mydir and all its subdirectories, recursively, with a file extension of .htm (or .HTM or .Htm...) and delete it. I've seen a lot of attempts like rm -rf ~/mydir/*.htm which really don't come close. The correct solution is
find ~/mydir -iname '*.htm' -exec rm {} \;

"-iname" says that you want to do a case-insensitive search on the filename. '*.htm' is in single quotes to prevent bash from expanding the *, which will produce unexpected results. The rest of the command says to remove any file matching the query. The "{}" will be replaced by the filename (with path) returned by the search, and "\;" will separate one rm command from the next. Nearly every -exec option should be terminated with a "\;".
Now you want to fix permissions. For some reason, there seem to be directories in your home directory that you don't have permission to enter. You know that the operative bit for directories is the execute bit. You know that "chmod -R +x ~" will add the execute bit to every file and directory in ~ (or $HOME), but you only want to operate on directories - BritneySpearsOopsIDidItAgain.avi doesn't need to be executable. This is solved with:
find ~ -type d -exec chmod +x {} \;

where "-type d" of course means directories.
Finally, you want to make a playlist out of all the mp3 and ogg files in your home directory.
find ~ -type f \( -iname '*.mp3' -o -iname '*.ogg' \) > mynewplaylist.m3u

We group the -iname parameters in parentheses and separate them with -o (the "OR" operator) to say that any match must be a file, AND it must be named .mp3 OR .ogg (case-insensitive) to be returned. We redirect the output to a new file called mynewplaylist.m3u, and presto! We have a playlist.


Use "checkinstall" instead of "make install" to make uninstall easy.

Sometimes, some application is not ready as a package. In this case, many site just recommend to use:

./configure
sudo make
sudo make install

In some case, it is possible to uninstall with

sudo make uninstall

but, many cases, it comes back with error. According to Mr. C,
"Many makefiles created with autoconf create dummy rules such as:

uninstall: uninstall-recursive

where no uninstall-recursive target is defined. They are no-ops."

As a result, to uninstall, it is necessary to delete folders made from "make install". That's why it is better to use "checkinstall". Install checkinstall with aptitude, then,

./configure
sudo make
sudo checkinstall

The application will be installed, and a .deb file will be made. Now uninstall is easy!

Mplayer, non-free-codecs, and libdvdcss2, and more codecs for Chromium

Since they days I used to use Mac, I have thought the default setting of mplayer shows better video quality than that of VLC. But I normally use both of them in case that one of them can't play a video. VLC is easy to install, just find it in Ubuntu Software Center or in Synaptics. I thought maybe I would go for only with VLC this time, but I wanted SMplayer's better UI, so I decided to install mplayer again since I deleted it.

I also wanted to install more codecs for such as wmv, ra, and etc. So I installed "non-free-codecs", then I installed for encrypted DVD playback, installed "libdvdcss2". These are in medibuntu repository, so make sure to add medibuntu repository before trying to install them.

Mmm, yes, SMPlayer's UI pleases me more than that of VLC.
***
I like Last.fm, for their big song data and being free to listen to songs. Right after I installed Chromium, a web browser on which Google Chrome is based, I installed Last.fm music player extension. But it didn't play songs, not even on a Last.fm page, so I thought there must be missing codecs. I installed "chromium-codecs-ffmpeg-extra" and all work fine.

Saturday, August 7, 2010

Minitube: YouTube client without flash

*Too bad, there are a lot of videos which doesn't have mp4 file. As a result, minitube doesn't show a lot of videos.

Mnitube seems a cool app which let view Youtube videos. It doesn't use flash thus low memory usage required. Anyway I don't like flash, so I thought give a try. Unfortunately, even though I intalled it from Ubuntu Software Center (it seems like the same thing with Synaptics), it didn't show me videos. Googled, I found I need Qt framework network version.

On a terminal, type:
sudo apt-get install libqt4-network phonon-backend-gstreamer gstreamer0.10-ffmpeg gstreamer0.10-plugins-bad
After rebooting, it worked perfectly! As I enjoy comments on Youtube, it would be great if the developer implements a view-comments function, but as he's working on the app to make it simple, maybe it's already good as it is.

Friday, August 6, 2010

Keyboard Shortcuts in Ubuntu 10.04

Workspaces
  • Ctrl + Alt + Left/Right/Up/Down arrow – move to the workspace in the given direction
  • Ctrl + Alt + Shift + Left/Right arrow – move the current window to the workspace in the given direction
  • Super + E - “expo” effect, shows all workspaces (move windows with left mouse button, zoom to a workspace with right mouse button)
Window Management
  • Super + W – “scale” effect, shows all windows in current workspace (left click selects window, middle click closes window, right click zooms window)
  • Super + A – “scale” effect, shows all windows
  • Alt + F10 – toggle maximize current window
  • Alt + F9 – minimize current window
  • Ctrl + Alt + D – toggle show desktop
  • Alt + Middle mouse button – resize window
  • Alt + Left mouse button – move window
  • Alt + Right mouse button – window menu
  • Alt + F7 – move current window (without holding down mouse button)
  • Alt + F8 – resize current window (without holding down mouse button)
  • Alt + Tab – switch windows on current workspace
  • Ctrl + Alt + Tab – switch windows on all workspaces
  • Alt-F1  launch applications menu
  • Ctrl-L  shortcut for opening locations (in Nautilus)
  • F9 – Toggle side pane in Nautilus
Accessibility
  • Super + Mouse wheel scroll – zoom screen
  • Super + Middle mouse button – draw rectangle to zoom to
  • Super + N – invert colours of current window
  • Super + M – invert colours of screen (Compiz is configured for this shortcut, but the messaging indicator seems to have taken it over so it doesn’t work)

Linux Web Magazine, Repositories, Ubuntu themes

I was looking for a free linux magazine, and found full circle Linux magazine. So far they published 39 magazines, and I want to definitely try the magazine, as it seems like they have a consistency.
***
I got familiar with the concept of the repository with iPhone jailbreaking. It is basically register a pool (server) to your host, so that it can find and install applications from it. So after I installed Ubuntu, I wanted to register decent repositories. I googled a little bit, and it seemed like getdeb.net and medibuntu repositories are quite important.

For getdeb, quote:
Go to System-Administration-Software Sources, Third-Party Software tab, Add:
deb http://archive.getdeb.net/ubuntu lucid-getdeb apps Add the repository GPG key, open a terminal window and type:
wget -q -O- http://archive.getdeb.net/getdeb-archive.key | sudo apt-key add -
and for medibuntu, add
deb http://mirrors.ucr.ac.cr/medibuntu/ lucid free non-free
deb-src http://mirrors.ucr.ac.cr/medibuntu/ lucid free non-free

I'm not sure if I need deb-src repo, so i didn't install it. There's one more thing to do before finish, type on Terminal to authentificate the medibuntu repo (from Ubuntu Geek):
sudo apt-get --yes -q --allow-unauthenticated install medibuntu-keyring
***

For themes, check Bisigi project.
add repository: sudo add-apt-repository ppa:bisigi && sudo aptitude update
install: sudo aptitude install bisigi-themes
Or, install each theme separately. 
***
I read aptitude is better than apt-get, as it checks out dependency of the application, and remember it, but I still find a lot of people use apt-get and want to know why. Also I wonder the exact happenings during the installation, and its meaning. As soon as I understand them, i will post it here.





Thursday, August 5, 2010

How to uninstall applications on Linux

quote:
It depends on which distribution you are using.

1) For (*.rpm) based distributions like Redhat, Fedora Core, SUSE, Madrake, etc, use this to get the exact program name first because, the program name is not exactly same as the the rpm file name.

rpm -qa | grep programname

Then use this to remove it.

rpm -e programname

2) For (*.deb) based distributins like Debian, Ubuntu, Mepis, etc,  to remove the program but, keep the configuration files for the program, use this

dpkg -r programname

To remove everything including configuration files, use this

dpkg -P programname

3) For (*.tgz) based distribtion like Slackware, use

pkgtool

and select the package which you wish to remove. There are more options available for Slackware which I don't remember right now. Hope this helps.

Firefox does not start after upgrade

quote:
1) Hmm.

Any firefoxes running, maybe as zombie after a crash.

What does:

ps aux | grep firefox

2) sudo dpkg-reconfigure firefox

3) In case if you still face problems starting firefox, you can remove the firefox lock file & start fireox. The lock file should be located at /home/username/.mozilla/firefox/

Under here there should be a folder with random characters. Default like for example o6yxa08d.default in my case. You should find the file "lock". Removing it and starting firefox will work.

Asian language input Ubuntu 10.04

The easiest way of typing Asian language might be using iBus.
1) Run Language Support under System - Administration
2) Change Keyboard Input Method System to ibus
3) Add languages preferred in IBus Preference under System - Preference

But I prefer SCIM, because it has better Japanese keyboard support: you can use Zenkaku/Hankaku key to change Japanese and English.
1) Install SCIM Input Method Setup at Ubuntu Software Center or Synaptics
2) Install Hangul Input Method Engine for SCIM
3) Install SCIM IMEngine module for Anthy
4) Change Keyboard Input Method System to SCIM-bridge in Language Support

When it doesn't work refer to below. from,
http://ubuntuforums.org/showthread.php?t=1473443 , post #3

quote:
I just wanted to add an alternative solution to fix a broken scim where the toolbar refuses to appear, even though the daemon is running.

As zaphod777 has suggested, first get the language/locale settings sorted out.

Then create or edit the following file:-
/etc/X11/Xsession.d/74custom-scim_startup
Code:

export XMODIFIERS="@im=SCIM"
export GTK_IM_MODULE="scim"
export XIM_PROGRAM="scim -d"
export QT_IM_MODULE="scim"

and sudo chmod 644 that file.

At least, the above worked for me.

Cheers.
_______

It worked like a charm for me.