As of 2016-02-26, there will be no more posts for this blog. s/blog/pba/
Showing posts with label Microsoft Windows. Show all posts

I came across Glances, a system monitoring program written in Python, as its name hints, it enables you to review system information, status, or resource usage in just a few glances. As you can see from the screen shot above, all information in one screen.

  • CPU: Glances probably the only few programs which display the details of what CPU spends time on rather than just a simple percentage of utilization. How much time it's idling or waiting for IO? For example, iowait is an useful information, when disk is busy, more or less it could slow down the system for different reasons and by reading iowait, you know some heavy IO activity is going on.
  • Load average: It's same as uptime gives, the load average of past 1, 5, and 15 minutes.
  • Memory and Swap: Like CPU, more detail is shown, such as buffered, cached, active, or inactive memory. Similar to free command output.
  • Network: Each interface's bandwidth usage, upload and download rates. You can press B to switch unit between bit/second and byte/second.
  • Disk I/O: Read/Write rates on partitions and devices. Not only physical storage devices but also optical devices.
  • Mount points: Similar information you get from df command, such as total size, used space, and available size.
  • Processes: Like htop or top, you can use keys to choose sorting fields.
Glances shows information as much as they can be fitted in terminal window size. You can turn off sections by keys, separately, if you don't need them.

It also support server mode, a client can use XML-RPC call to get the system information in JSON format. It's possible to write your own client if you don't like default text-based client or you can write a GUI or web interface to display the data. It supports Linux, Mac OS, and Windows, although no default client for Windows, it will only runs as server due to no curses module available on Windows platform.

Glances is only one-year-old, first released on December 4, 2011, there are many possibilities for improvements. For example, configuration file for colors or disabling sections by default. Also custom fields for processes, and the list can go on and on.

I was intrigued by its name when I first heard of it and the idea behind this program is useful and simple. You don't need to run several programs to get all information of a system. You can have everything on one screen, even status of multiple systems at same time with client/server mode and terminal multiplexer.

The title of this post doesn't mean anything for real.

About a week ago, someone posted Merging: udev and systemd about Udev and systemd to merge. I don't really care about this merge because:

After udev is merged into the systemd tree you can still build it for usage outside of systemd systems, and we will support these builds officially.

There is no need for me to concern about this, even though there were some stirring discussions over this. As long as I don't need to do extra configuration, then I am okay with it. The only drawback is the tarball will be bigger, don't know how big it would be, never use systemd before and I have no need. But if this will make the development easier, then I won't fuss over it.

One comment on LWN.net mentioned Zawinski's Law:

Zawinski's Law of Software Envelopment (also known as Zawinski's Law) relates the pressure of popularity to the phenomenon of software bloat:
Every program attempts to expand until it can read mail. Those programs which cannot so expand are replaced by ones which can.
Examples of the law in action include Emacs, MATLAB, Mozilla and Opera.

This law is attributed to Jamie Zawinski, who popularized it. It may have been inspired by the humorous Law of Software Development and Envelopment at MIT, which was posted on Usenet in 1989 by Greg Kuperberg, who wrote:
Every program in development at MIT expands until it can read mail.

I found this is pretty amusing and somewhat true, but can MATLAB really read mail? Well, not directly, but you can sendmail for sure. I don't feel surprised when I saw Emacs in the list, though I don't really know if it can read mail or not. But once a while, I would stumble across stuff about the bloat of it.

Two replies mentioned about GNOME5 and The Registry, quite sure it was meant to mock around Windows Registry. They are just for laughter, nothing really serious about it, but that doesn't mean they are not true.

But this comment referred to the future of GNOME did cause me thinking:

For Debian perhaps. However, I don't think this is true for GNOME. The future of GNOME is as a Linux based OS. It is harmful to pretend that you are writing the OS core to work on any number of different kernels, user space subsystem combinations, and core libraries. That said, there may be value in defining an application development platform or SDK that exposes higher level, more consistent, and coherent API. But that is a separate issue from how we write core GNOME components like the System Settings.

It is free software and people are free to port GNOME to any other architecture or try to exchange kernels or whatever. But that is silly for us to worry about.

Kernels just aren't that interesting. Linux isn't an OS. Now it is our job to try to build one - finally. Let's do it.

I think the time has come for GNOME to embrace Linux a bit more boldly.

Some people would have strong concern about it if this is real future of GNOME, especially people who use GNOME and already think GNOME is a colossal environment . Some may like the way it goes as becoming an OS, some may think it should not go that way.

I like the way current Linux is. Yes, things are broken sometimes and you may need to put efforts in it if you really care about. Things are pretty complicated, but by having such goal, can you be sure you won't become another same Linux problem which you think Linux currently is having?

You write code which you think they should be in OS core and bring up the issue across different layers of coding. If you look from another perspective, maybe that's because you shouldn't do things that requires such code? I think this somehow resonates with Zawinski's Law. You program expands to where it shouldn't be to. You definitely know you shouldn't, but you still go there anyway.

I stopped using GNOME for at least three years, it had too many stuff I don't need and don't even know they were sitting in my system. I am not entirely sure what it really is, still a Desktop Environment? Same thought goes to KDE, I think KDE could be even bigger than GNOME.

If GNOME evolves into an OS, I won't object it, but they can't be associated with the name "Linux" at all, even it includes Linux kernel within. It would be a new OS, no way you should call it Linux. It's not Linux, it would've gone from Linux road. Not even a Linux distribution, that GNOME will not be qualified for being titled with "Linux" or "Distribution."

Desktop Environment (DE) is a loose term, you can define it with almost everything included or almost nothing, possibly boiling down to just a Window Manager (WM). In fact, you can even argue what should be in a WM. DE and WM would grow as other programs do, that's one of reason that I switched to DWM. Occasionally, people fork DWM and try to make more smaller version of it. I guess DWM is still too bloated for some.

The true issue I have with GNOME is dependency. Even I don't have GNOME installed, I still have a few packages installed inevitably:
~ $ eix -I gnome --compact
[I] dev-cpp/libgnomecanvasmm (2.26.0(2.6)@10/27/2011): C++ bindings for libgnomecanvas
[U] gnome-base/gnome-common (2.28.0(3)@05/05/2010 -> 3.1.0(3)): Common files for development of Gnome packages
[I] gnome-base/gnome-mime-data (2.18.0@10/18/2009): MIME data for Gnome
[I] gnome-base/libgnomecanvas (2.30.3@10/27/2011): The Gnome 2 Canvas library
[U] gnome-base/libgnomeprint (2.18.6(2.2)@10/18/2009 -> 2.18.8(2.2)): Printer handling for Gnome
[I] gnome-extra/gnome-audio (2.22.2@09/06/2011): Gnome Desktop Sound Effects Package
[I] media-video/gnome-mplayer (1.0.5@01/16/2012): A GTK+ interface to MPlayer
[I] x11-themes/gnome-icon-theme (3.2.1.2@12/31/2011): GNOME default icon theme
Found 8 matches.
I think a couple of them can be un-merged, but just not all.

As a Linux user, more or less, you need to compromise with a few packages or libraries. Linux is a diverse world, for just one task, you may be able to find ten libraries which can do the same job. When you find a program you like, it's possible that it uses a library you don't like.

That's what Linux is and that's the way it has been, but some people don't like that and other don't want any changes to it.

Since a few packages of GNOME on my system, I only concern if the number of depending packages will grow. And if GNOME become an OS, the situation may get complicated.

Luckily, because of open source, if you don't like something, you are allowed to do something about it. Like MATE, a fork and a continuation of GNOME2. Only you need skills instead of a bitching mouth.

Now, looking back at the time when Windows still a program you needed to type win to run it. It was a Desktop Environment, although Wikipedia uses different terms, such Graphical Environment or Operating Environment, even Operating System. But it was never a OS since it didn't handle low-level operations, not I know of. Until Windows 95, things were packed together, Windows became OS since then.

It seems unavoidable that a Desktop Environment would evolve into a full OS, one way or another. It may not be the desires of developers but the users', anyhow, that's the direction, even you don't like it.

Even so, you should be glad that it's a DE, not a program which reads mail.

As a Windows user

Don't you dare to say PC! Damn you, don't even know of the OS you are using.
  1. Search for it, click on first software directory website, go through a few pages, close it, try second website...
  2. Download it.
  3. Double-check with anti-virus software.
  4. Triple-check with another anti-virus software.
  5. Install it while praying that it really doesn't contain any viruses.
  6. Run it.
  7. Figure out which Next button to click...
  8. Job done.

As a Mac OS X user

You... uhm... I got nothing to bitch.
  1. Go to App store.
  2. Search for it.
  3. Slide, Slide, and Slide.
  4. Pay for it.
  5. Install it while paying for additional copies for your i[whatever] and i[whocares] and i...
  6. Run it.
  7. Job done.

As a Linux user

Alright, GNU/Linux user, happy?
  1. Search for it with package manager.
  2. Install it.
  3. Run it.
  4. Job done.
or
  1. Search for it.
  2. Download source tarball.
  3. Compile it while joining on #[channel].
  4. Install it.
  5. Run it.
  6. Job done.
or
  1. #!/bin/bash or whatever Shebang line you nerd at.
  2. Code it.
  3. RTFM.
  4. Test it.
  5. RTDFMA (Read The Damn  Fucking Manual Again).
  6. Fix it while cursing why a library sucks.
  7. Run it.
  8. Job done.

Please don't take anything above seriously, just for fun and they may not all be true.

I got the warning message (not error) when I tried to add a file with colon (:) in its filename to a Hg repo. The repo is basically private, I don't intent to publish it to public, but I think it's still worth to resolve the issue even I don't use Windows.

There are some restrictions on file naming on Windows/DOS file systems. The message was added by a patch and there was a bug report related to this issue. I don't know what will happen if you try to clone such repo, but I am guessing files with illegal names will not be updated into working directory.

From that bug report, there is no remapping to work around, so it is best not to use anything may cause issues on different file systems. By default, it's only a warning, you can still commit the addition action.

If you don't want to see such warning, you can update your hgrc by adding:
[ui]
portablefilenames = ignore
which will suppress the warning message. If you want to stop the actions may cause issues, then gives it abort. You can read more about this configuration in man 5 hgrc.

I love this ad:


It's time for a phone to save us from our phones.

But I don't understand how could you not be trapped in this phone again? You still need to use it and you still get caught up.

I always hate phones, not just mobiles. They are so annoying, well, that's what they are for. They have tiny screen, tiny buttons or keyboard. It doesn't matter if it's real buttons or on-screen keyboard, they are just too tiny to type. It doesn't matter if the system is smart enough to correct your typo or any mistakes, because there is no such smart system. If there is, you don't need a phone.

I can't understand why so many people are willing to type or finger scrolling that awkward thing, and think "This is so cool! I could do XYZ on my phone!" Alright, it's cool but it's waste of time. When it's not a time waster, you don't need a phone.

Someday in the future, an ads would be with such tag line: "It's time for not using a phone to save us from our phones."

It does not mean you don't use phone anymore, it means you do not need a phone to do things you used to do on your phone including phoning someone. You do not need a phone to phone. That's really the saver, not having another phone. Another phone, it's just another iteration of an endless loop. You would never be able to get out.

For now, I would rather carrying a 15.4-inch, 6+ lbs laptop with me other than using a light and tiny so-called {smart,i,[insert here yours]}phones.

Please let phone be just phone! You know pressing numbers and hit the call button. That's all you need for a phone.

Remember history often repeats itself! We don't need recreation, we need innovation deep from the foundation.

I downloaded the Windows 7 Ultimate Beta from Microsoft. The hardwares of the machine I used, you can read it here. It's kind of old. I have an ATI Radeon X700 graphics card, but it seems to be broken, that is bad that I could not see the Aero theme. By the way, I have never used Vista, Windows XP is my last experience of Windows operating systems.



The setup runs in 800×600 resolution, I can now hope Windows supports old GeForce4 MX and gives me 1680×1050 after installation. The setup is weird, it gave Upgrade and Custom installation types, but I didn't have any Windows on this computer. I deleted all Linux partitions and create new one. It automatically created 200MB for System type, the rest for Primary type.



The installation needs to restart twice, which I don't understand why would it needs to. At second time reboot, you can set up a new account and enter the product key. The whole process of installation takes less than 30 minutes, this is quite fast.



I am still stuck in 800×600. I tried to set up Internet connection, but it kept saying it couldn't. So I checked up the Device Manager, and found out Ethernet Controller doesn't have driver. I manually installed NVIDIA nForce Networking Controller. I thought this will be working, but it doesn't. Windows 7 has proved me that it's a Windows descendant by a royal Windows tradition when I tried to configure the NIC, I got a Not responding window. The End Process button doesn't work, the only way seems to restart or shutdown. But it just showed me “Shutting down...” Thankfully, this machine has a Reset button. Good job, Microsoft.



So I downloaded a Windows XP driver for nForce2 from nVidia website (it's categorized as Legacy), it doesn't have Vista version. However, this still doesn't work for NIC (other devices seem to work). I found nf123xp stuff, which has newer drivers than from nVidia's website. The file I downloaded is NF123LR1.0. While installing these newer drivers, boom! BSOD! Another royal tradition. I then tried again, it happened on installing audio driver. I resolved it by manually installing.



Now, finally, I can connect to Internet. I installed Kaspersky software from the three suggestions on Windows 7 website, also updated the system. I tried to install nVidia GeForce4 MX (Integered using 128 MB shared memory) 93.71 driver for XP/2K, which I downloaded from nVidia, but installer said “this is not Windows!” How hilarious! But I can still install it manually.



Oh, yeah! I got 1680×1050 after rebooted. I just downloaded Steam, and Kaspersky warmed me that it detected Worm.P2P.generic. So, I uninstalled Kaspersky. However, the games are not playable, I guess that is driver problem.



I feel Windows 7 is just a pretty Windows XP, nothing more except you have to keep click on Yes and Allow buttons to make sure your system is more “Secure.” I encountered troubles with driver issues, they are not supported officially, even though they are working. If you want to try Windows 7, make sure you have a sticker on your hardware. Buying a pre-installed computer might be a better way.






I read this Howto about WordGrinder. I give it a try, it's easy to compile, just need a little change. You will need:





yum install gcc ncurses-devel lua-devel lua-filesystem


Then run ./pm install to install, I got an error from linker:



gcc "-Wall" "--std=c99" "-Os" "-s"  -o ".pm-cache/34-1-utils" ".pm-cache/1-utils.o" ".pm-cache/2-main.o" ".pm-cache/3-lua.o" ".pm-cache/4-word.o" ".pm-cache/5-bit.o" ".pm-cache/6-screen.o" ".pm-cache/32-31-7-

_prologue.o" ".pm-cache/33-dpy.o" "-lm" "-lncursesw" "-llua5.1"

/usr/bin/ld: cannot find -llua5.1


I do install lua, but the name isn't right for Fedora. So, I opened the pmfile for "lua5.1", it's at line 215 in the version 0.3.2. I changed it to "lua". Now, I have WordGrinder.



But there is a problem, I couldn't make text italic or underlined, maybe I don't know how to use that? Anyway, here is a screenshot of what I get from WordGrinder and exported HTML result:





By the way, it also provides binary package for Windows users!



Updated: I got it! RTFM! wordgrinder README.wg. You can press CTRL+SPACE to enter selecting mode, then press CTRL+I to italicize the text.

Original Paint

I am a GIMP user, wouldn't try Paint or Paint-like before. I read a tweet today about this, so I give it a try.

First of all, let me quote this:

Original is the best -- Yu-Jie Lin.

Yes, I couldn't agree with this any more because that is said by me. Anyway, if you are the MS Paint fan, then run it with WINE. I have done this, the steps is quite easy:
  1. Installing WINE
  2. Copy paint.exe and mfc42u.dll from installed Windows system. Or, extract them from Windows Setup CD. You will need cabextract to uncompress the paint.ex_ and mfc42u.dl_ files.
  3. (Optional) Copy gdiplus.dll to ~/.wine/drive_c/windows/system32. I don't see this on Windows Setup CD. If you don't have gdiplus.dll, then you can only save/load BMP format.
  4. Running paint.exe.
Here is the screenshot of my recent masterpiece :) created in MS Paint:

You can download this PNG image, I wonder if is anyone interested. I run Paint on WINE-1.1.5 and Fedora 9. The dlls are from Traditional Chinese Windows, the paint.exe is from Dell Windows Reinstalling Setup CD. Both are Windows XP. I extracted paint.exe from Setup CD because the Chinese characters can't be display, they all are displayed as blocks and I don't know how to fix that.

Paint-alternative on Linux

Here is a list of Paint-alternative applications on Linux, maybe they are not really like MS Paint. Just give them a try.
None of them I tried, so you are on your own to discover.

Lastly, when I searched for those alternatives, I found this testiminal video via this Uncyclopeida page:



Enjoy it!