RSS Feed

Desktop Environment and Window Manager


As using Arch Linux, the advantage is I can choose any Desktop Environment or any Window Manager. Recently, I have tried several Desktop Environments and Window Managers which are officially supported in Arch Linux. After trying, I learnt the differences and similarities among these Desktop Environments and Window Managers.

Desktop Environment

My primary Desktop Environment is Xfce4. Previously was GNOME 2. Since the release of GNOME 3, I chose Xfce4 as it is more conventional and there a lot of useful goodies (plugins). It is also lighter than GNOME.

LXDE is similar to Xfce4 in the sense of lightness, and it is even lighter. It uses OpenBox (a window manager). The drawback of LXDE is it has less plugins and lack of GUI configuration tool for modifying shortcut key. However, this can be solved by installing obkey.

In my opinion, GNOME3 is just an eye candy. It is nice to demonstrate the visual effects to the users. Because of the window and workspace are quite different, old conventional user like me feels uneasy to use it. Furthermore, there is no way to move the GNOME Dash (left panel). Yet, there are some ways to modify it. Extra configuration of GNOME requires GNOME Tweak Tool.

MATE and Cinnamon are just similar to GNOME2. LXQt is just similar to LXDE.

I tried KDE4 instead of KDE5. In Arch Linux, they are conflicting each other. Thus, I chose the older and smaller version. KDE is quite different from MATE, Cinnamon, and GNOME3. Because KDE uses Qt; latter uses GTK+. As a result, the designs are different. One of the most prominent characteristics I found is the file browser. Nautilus (GNOME), Nemo (Cinnamon), Caja (MATE), Thunar (Xfce4), PCManFM (LXDE), and PCManFM-Qt (LXQt) shares the bookmarks, yet Dolphin does not share with them. (But PCManFM-Qt uses Qt also.)

Enlightenment is another DE. It is quite different from others. It does not use Qt or GTK+, but uses EFL (Enlightenment Foundation Libraries). It has good visual effects. However, a critical problem I faced is the system tray. The system tray uses systray module in Enlightenment. However, the systray does not work properly and seems very buggy. Even worse, the systray is not going to be maintained by the developers. Therefore, alternative such as trayer can be used.

Window Manager

There are a lot of Window Managers as well. There are three categories: stacking, tiling, and dynamic. Stacking window manager is just like Windows, Mac OS X, or any other common Linux distro. The window can cover or on top of another window. Tiling window manager is not common. The windows are all in the same level, that means they are arranged as tile. Dynamic window manager allows user to switch between tiling or stacking or mixed. All the DEs mentioned above are consider stacking. Though we can arrange our windows as tiling in stacking window manager, the design of the window manager itself is still based on stacking.

I tried several window managers. There are some I do not like, especially tiling window managers, because they are almost similar. I tried Window Maker and IceWM, they are impressive, but not my favour.

As LXDE uses OpenBox, we can login with OpenBox without LXDE as a pure window manager. It is interesting to learn that a window manager does not necessary provide any panel (taskbar). The advantage of OpenBox is that you can choose your own panels, such as tint2 or Cairo-Dock. You can just use whatever you like, even Xfce4 panel or LXDE panel.

I tried fluxbox awhile only. It is also a stacking window. But it provides a panel. As a result, we need not to choose our own panel. A very simple ready to use window manager. OpenBox requires customization before truly using it.

The last one I would like to mention is i3. It is a dynamic window manager. A Linux lover should try it. It requires a little time to learn the tiling concept and the hotkeys. Once you know how does it work, you will like it. i3 can be switched to tab mode or tile mode. Furthermore, the windows can be changed to floating windows. Floating window is similar to stacking window, but it is always on top of the tiling window. So, the software such as Pidgin can be set to floating window. Besides that, Pidgin can hide to tray. Sorry, i3 does not have any minimize or maximize. Hide to tray icon is the only solution.

If using i3, you can switch between the window using keyboard, but not using conventional Alt+Tab. You can arrange the order of the windows using keyboard. You can also resize the tile using keyboard. One serious problem I faced is drag and drop between the window. But I believe that this problem can be solved by changing my behaviour of using the window manager. (Strongly influenced by stacking window manager.)

Components

After trying these DEs and WMs, whatever I choose, I will prefer several features. Firstly, hotkeys are important. It should allow me to customize the hotkeys. Panel is important to show the running applications, and system tray is very important to avoid using too much space for the running applications. Showing date, battery status, network connection, and volume control is very important. These show and control the computer status. Workspace (or virtual desktop or pager) is very important. Launcher is important, such as gmrun or GNOME Do. Using a launcher, we can run any application by typing the command. It is different from running a program from terminal emulator. When running a program from terminal emulator, the program is a child process of the terminal emulator. Exiting terminal emulator will also terminate the child processes.

Less important components are application menu, startup applications, terminal emulator, file browser, task manager, screensaver or screen lock, notification, and screenshot. Similar to launcher, we can launch the application from the menu. Sometimes I just cannot remember an application name, searching from the menu does help. Startup applications can always be configured, either using DE’s configuration tool, or using .xprofile. There are a lot of terminal emulators. Just install one and bind it with a hotkey, it will be very useful to open a terminal emulator anytime. Similarly, file browser is useful to manage the files: drag and drop, copy-paste, delete, open, rename, etc. Task manager, just like “ps aux” and “top”, allows us to see the CPU usage and kill any process. Screensaver or screen lock allows to protect the current screen from others to view, especially when we are away. A popup notification helps a lot to notify the users for a certain matter, e.g. low battery, reminder, email, etc. Screenshot is just useful for some sharing or project.

In my opinion, with the components and features stated above, any DE or WM will be satisfying.

RIME 中州韵输入法引擎之“五笔朙月流”


又一篇用中文写的。因为这篇反正就是关于中文输入法引擎——RIME中州韵输入法引擎——而写的。这中州韵输入法引擎是从Arch Linux的维基那里看到的。它是一种非常奇特的输入引擎。因为它可以让使用者简单地自制理想的输入法。

在Linux,有好几种中文输入法,谷歌拼音、搜狗拼音、SunPinyin等。其它非拼音输入法也有,如五笔输入法、仓颉输入法。本人虽曾经想学仓颉输入法,但因为太难记难用,最后放弃。因为有些生字不晓得如何读,拼音是没用的,所以最后就学了五笔输入法。

五笔输入法,只要懂得字形就可以输入了。因此用五笔输入比拼音来得准确。比如输入名字,用一般的拼音会出现很多选择,而这些“候选字”要一一看过,是相当的累。而若用五笔输入法,就可以把“候选字”减少到一两个罢了。但本人因为不熟悉五笔输入法,尤其在跟朋友在线对话时,拼音会是基本的思考方式,所以本人用拼音会比五笔来得快。因此,五笔和拼音两种输入法一起使用的话,对我来说就会出现因切换输入法而迟缓和多余动作的问题。因此,最理想的方式就是将两种输入法融合,不需要切换,以五笔为优先,因为五笔输入后,候选字词会比拼音来得少。能够达到这种理想输入法的,就是这个中州韵输入法引擎。

这中州韵输入法引擎,在我用的时候发现有一个字,因为台湾繁体和大陆简体有一些差别,所以中州韵输入法引擎本身的有些字用了不太一样的代码,就是“々”和“𠚤”。但中州韵输入法引擎可以用简单的方法让我解决这个问题。不仅如此,我还借此机会加入“绘文字”。因此,我就先制作了自用的五笔输入法。用这个的话,就可以轻松的输入我要的表情绘文字了😁。

但融合两种输入法,说容易也不是很容易,因为没有完善的说明书。因此本人就在百度贴吧里询问了。经过高人指点,后来就尝试融合。起初有几个问题无法解决,但勉强还是可以使用。后来根据苍颉检字法的制作,终于完成“五笔朙月流”输入法了。用这个输入法,就可以拼音加上五笔,输入人名和跟朋友对话都不成问题了。而且还可以反查五笔代码,即在不知五笔的代码是什么的情况下,还可以反查,这样的话就可以同时学习五笔输入法了。强!

这“五笔朙月”和“五笔拼音”是不同的。五笔拼音无法用拼音输入句子,而这“五笔朙月”就可以做到这点。

源码可在此处下载。

Folders and file naming habits that are useful


I would like to share some of my computer management habits regarding the folder name. Unlike my friends or colleagues, I seldom put the files in the Desktop folder. Because I prefer that my computer desktop is always clean (yet physically, my desktop is messy).

Therefore, there are several folders appeared in my computer, and these folders can be appeared in any other folders.

Firstly, “temp” is my most favourite folder. Any temporary documents or files, that are not very important, they are saved here. The “temp” folder is also appeared in my Download folder. Furthermore, when necessary, “temp2″, “temp3″, and so on will be created. These folders, if they are deleted, normally will not cause any catastrophic effect.

Secondly, “backup” folder. When doing the development, some of the files, I need to backup, I will renamed them suffix with date, then move to the “backup” folder. I do not use version control software, since most of my developments are individual project.

Thirdly, “unsorted” folder. I adopt this concept from Firefox bookmark. In Firefox, all the bookmarks that are not put inside any folder, they are automatically put in Unsorted Bookmarks. I use this folder when, some of the files or documents especially articles that are quite important, but I not yet decided where to put, then I will put them all in the “unsorted” folder. It is not a “misc” (miscellaneous) folder, but just a not yet organized folder. I may (or may not) organize the files in future.

Fourthly, “archive” folder. I adopt this concept from email management recently. There are some files or documents, can be deleted, but they are still worthy to be kept in the computer. And, they are not organized, then I will put them into the “archive” folder.

Finally, “1”, “2”, “3”, …, folders. These folders, I use them to put my favourite files such as photos, movies, songs, etc. The worst movies or songs that I do not like, but still want to keep in my computer, I will use “9” folder. Then the best one is the “1”, followed by “2”. So that, it is easy for me to know which files are important. Moreover, the best of the best files will reside in “0” folder.

As a conclusion, ordering these folders according to the importance: 0, 1, 2, … > backup > unsorted > archived > temp.

Previously, I used the some folders such as “new”. This actually doesn’t many any sense, because there is no way to let me know how new is the “new” folder.

Besides that, there are some file naming habits I am using. Adding date at the end of the file name, such as myfile20150419.docx. This is useful if the file is frequently updated and older content has to be preserved. So that, the file edited yesterday is myfile20150418.docx. By reading the filename, I can know how latest the file is. (Though the word processing software such as LibreOffice Writer allows to save the older version in the file, but this will also increase the file size, and also has the difficulty to compare two files, thus I am using this file naming style.)

Recently, because of reading journal articles, I renamed the PDF files with a keyword at the end. I adopt this style based on the “tagging” (or “labelling”). Normally, we organize our files into the relevant folders already. Yet, the folder itself is not sufficient to give the “brief description” of the file. As a result, I add a keyword to the file name.

Organize the files properly, will reduce the time to search the file. Some users may install the desktop search software such as Google Desktop Search. However, because I used EncFS to encrypt my files, search indexing is troublesome.

Framework or not?


Long time ago, I was learning CakePHP, then followed by CodeIgniter. Due to the restrictions using the framework such as naming convention, strict function calling based on MVC model, I decided to write my own personally framework from the scratch. The experience was very nice. Because I learnt about the caching, MVC architecture, function arguments in PHP, etc. But the development became gradually inactive.

After several years, recently I am trying back CodeIgniter, and now I conclude that, framework, though it is not required, it is strongly recommended. Why?

Faster

Writing PHP web application from the scratch, meaning that you have to write my own libraries, classes, functions, or search for the suitable libraries. If using a framework, what you need to do is just learning, and writing some libraries, classes, or functions that suit to the problem. Assuming you are doing a big project, doing it alone is impractical. That is why you need a group of people to do the project. And, those open source web application frameworks are already build by a group of people. That is why, this reduces a loner’s workload. Hence, this allows the development faster.

Larger

When the development is faster, meaning that the development can target on the higher level development, that is, developing applications instead of modules. Moreover, the project can be even more larger.

(I personally prefer low level studies, yet in the real world market, end user products are more attractive.)

More secure and stable

Like what I have mentioned, doing a project as a loner is totally impractical. Because one cannot do a thorough test to a project. One cannot ensure that most bugs are fixed. One cannot write the libraries for validation, encryption, caching, template engine, etc. Using an existing framework, they are tested. Furthermore, with the community support, the bugs are reported.

Production

If you are targeting on the production instead of research and studies, then framework is a need. From the raw materials to the products, it a long way. Unless it is low level product such as a small library.

 

Just like one would like to learn more about Linux, then he/she may learn to install Linux from the scratch. However, for a company or an organization, installing Linux from the scratch for each computer is unfeasible. Creating our own distro is interesting as we can learn a lot. Yet this will only benefits to ourselves directly, and may benefits to others in the long term. Using an existing distro will benefit to a company or organisation directly, because the distro can be used for work immediately.

So, how to choose a web application framework? Before choosing a framework, the best way is to get the reviews from other users. Then we can try some of them, and “feel” which framework is suitable. Experiencing multiple frameworks allows us to know the similarities and differences between the frameworks. Similarities are usually the common features, differences are the uniqueness. So, let us enjoy the web application frameworks: Ruby on Rails, Django, Express.js, etc.

WINE and CDemu


Previously I posted about installing software/game with different CD/DVD ISO images in WINE. But this method does not work in some installation ISO images. Because these installation will detect for the CD/DVD. The method above does not solve the problem because the installation does not detect the CD/DVD.

Recently, I found a better solution. It is CDemu. It is similar to DAEMON Tools in Windows. It will emulate the optical disc drive in Linux. As a result, it will produce /dev/sr0, /dev/sr1, and so on. Because it is a virtual CD/DVD, thus we have to load the image. It can be easily loaded by using gcdemu.

Once the image file is loaded, we have to mount the image as root. I mount the image to /mnt/cdrom. Then, in WINE, run the winecfg, then it will automatically appear the CD-ROM in Drives tab. In my case, it is E: drive.

Now, I run the installation from WINE, I can detect the image as CD/DVD.

JDownloader 2 BETA Japanese font


Previously I was reluctant to use JDownloader 2 BETA version. The main reason is that I will see boxes when the files contain Japanese characters. But this problem solved now.

As I am using Arch Linux, the JDownloader 2 is installed at /opt/JDownloader. We have to create two files:

  1. /opt/JDownloader/translations/org/jdownloader/gui/translate/GuiTranslation.en_custom.lng
  2. /opt/JDownloader/translations/org/appwork/swing/synthetica/LanguageFileSetup.en_custom.lng

The GuiTranslation.en_custom.lng is a copy of GuiTranslation.en.lng. So that the interface is still using English language. Then LanguageFileSetup.en_custom.lng is a copy of LanguageFileSetup.ja.lng. So that the font is using Japanese language font instead.

Open the JDownloader, change the User Interface language to “English (CUSTOM)”. Restart. Now, I can read the filenames properly.

Linux VS Windows


Recently my friend mentioned to me that, Windows is good enough for him, as long as he can complete his works. Then I argued with him, saying Linux is better. Then he asked me, in what sense. I suddenly don’t have any concrete answer.

As Linux user for several years, I already forgot why am I using Linux instead of Windows. I only remember that Linux is more developer oriented than Windows. There should have some other reasons that convince me to remain Linux user and some reasons make me keen of it. Thus, I have to compare two OSes so that I can give concrete answers next time.

Linux is free and open source. No need to pay for an OS, no need to p2p download and install a pirated version of OS. It is open source, if you are a geek, you may like to learn the source code of Linux.

Linux follows UNIX file system structure. This is a great characteristic I like. The file system structure with a root /, it is also the same thing I know about URL and internet. For Windows, it is still C: drive. And even my students today, they don’t know why it is C:, yet not A: or B:.

A little comparison for Linux and FreeBSD. Though both are UNIX-like OSes, yet I prefer Linux than FreeBSD. Firstly, Linux is more prevailing, such as various distros, various software target on Linux, and the market of Android. Secondly, Linux can be booted in logical partition, it can also be booted in FAT32 pendrive. Thirdly, Linux has a large community. Yet, Windows is just a Windows with Windows users.

Linux has strong shell, bash. Windows has PowerShell, yet I don’t know how powerful it is because I never use it before. Using bash and other commands I can grep, sed, gawk, and find to manipulate text files or binary files. Write the shell script using procedural paradigm with if-else and looping. Running Cygwin or MinGW/MSYS allows to use bash in Windows. Yet as a long term solution, it seems very weird.

Security is better, as Linux usually claims. Windows, due to the large market, hackers always target on it. One thing I don’t like on Windows is hiding the file extension by default. This makes users less aware about the file type. They can hardly differentiate a true image file or true video file from an executable file with image or video icon. They just execute the files without any awareness. In my opinion, Linux users are more computer proficient. This is one of the reasons that contributes to the security of the OS.

I agree that Windows software are more user friendly than Linux. This is because it is commercial software. That is because user friendliness is a factor to attract the users. However, the desktop environments such as KDE and Gnome are also user friendly to perform common tasks, for instance drag and drop. In my opinion, whatever Windows can do, it can also be done in Linux.

I agree there are some limitations in Linux: hardware compatibility and games. Hardware compatibility problem I always faced is the printer problem. However, this can be solved using VirtualBox, print through USB or network. There are games now available on Linux through Steam. However they are not my favourite. Playing games through VirtualBox or VMware does not solve the 3D problems in games. There is no other solution except using dual boot to play the games in Windows.

For true and stable working environment, I prefer Linux, and I will keep promote Linux to the students. Windows, for me, is just a good game console.

Follow

Get every new post delivered to your Inbox.

Join 165 other followers