Thursday, April 18, 2013

The day I lost root privileges

I have (K)ubuntu 12.04 Precise Pangolin installed on my Fujitsu Lifebook UH75/J (I've discussed about it in one of my previous posts). Needless to say, the experience was nice. It was the first time I ever used KDE as my primary DE for everyday use. I had used KDE on my desktop, but never thought about using it full-time, as I only switched to it whenever Unity felt a little boring.

Anyway, fast forward a couple of weeks, and suddenly I found myself unable to run commands with root privileges (with the `sudo' command). Every command which I prefix with `sudo' gets denied with a message telling me I was not in the sudoers file and that the incident shall be reported (gee, I wonder to whom they actually report these to). Frustrated, I've decided to log in directly as root with `su'. Then I remembered that Ubuntu, for some odd reason, does not allow logging in as root by default.

Instinctively, I turned to searching for solutions online. One solution told me to log in to Recovery Mode, log in as root from there, and then add myself back to the sudoers group. But even if I managed to do that, I still haven't answered one important question. How and why was I removed from the sudoers group in the first place? I don't remember intentionally nor accidentally revoking my own sudo privileges from myself. While trying out the solutions I have found, I thought of the reasons for my disappearing privileges in the background.

Then the realization hit me. I don't recall exactly how, but I remembered how exactly I lost my user privileges when I saw a command telling people how to add themselves into the `sudo' group (the group of users in an Ubuntu system who has sudo privileges). Quickly, I used the `groups' command to check what groups in my notebook I'm part of, then the horror showed up in my face:

aldo : vboxusers

Then I remember it all now. I was trying to get Virtualbox to work on my new ultrabook some time ago, and one of the things I had to do was to get USB devices to work from the host machine to the guest machines. It would involve having me put myself in the special `vboxusers' group, but because I don't really memorize console commands that well unless I have to use them a lot, I used a variant of the `useradd' command, which puts me in the vboxusers group ONLY, instead of appending the vboxusers group to the groups in which I belong to. I forgot that the `gpasswd' command was a much better solution when it comes to adding groups. I'll try to keep this in mind since I'll probably be administrating other people's boxes in the future. Screwups increase exponentially in severity the more users become affected by one's mistake.

Since Ubuntu doesn't allow root logins unless you were to go to recovery mode, I've decided to reboot into recovery mode, however, there was a conflict with the inteldrmfb and Vesa VGA drivers. After more frantic Googling, I removed `nomodeset' temporarily from the launch options of the recovery boot and I was immediately put into recovery mode. I proceeded to login as root, checked out all the available groups in `/etc/group' and `/etc/passwd', then added myself to the sudo group and other groups which I think I should be part of.

After rebooting, I was relieved to find that I now have my sudo privileges back. The world seems strange when you don't have root privileges, doesn't it?

I haven't told you about my Plan B: In case I get tired of fixing my problem, which usually never happens, I would replace Ubuntu with openSUSE since I was itching to try it out, and since I have quite a lot of free time this Philippine summer to reconfigure my system. However, since I have already fixed the problem, I don't feel the need to replace Ubuntu anytime soon. Perhaps I'll just move when another seemingly insurmountable problem arises.

Monday, April 8, 2013

Fujitsu Lifebook UH75/J Review

I have acquired a new Fujitsu Lifebook UH75/J ultrabook computer recently, and depending on how I look at it, I can view the said acquisition as either a blessing or a curse. In essence, the UH75/J is an engineering marvel of mixed emotions, and I shall explain why in further detail as we move on.

*Note: I'm not going to go into the technical specs of the UH75/J in this blog post. You can just Google for them yourself. Also, I'm not going to touch on every aspect of the ultrabook here as well, I'm just going to write about the stuff that I think deserves some attention.

Basics

Essentially, the Lifebook UH75/J is the Japanese counterpart of the Lifebook U772. Both are almost the same in terms of internal specifications, although the U772 comes with more powerful configuration options than mine, or maybe I'm just not aware if the same is available for my UH75/J. Both use variants of new Ivy Bridge mobile processors, a required trend for similar products of its generation touting the "Ultrabook" Intel branding.

My UH75/J comes equipped with an Intel Core i5 3317U, with its four cores usually clocked at around 1.70GHz, which is surprisingly adequate despite ARMv7 processors on mobile phones slowly encroaching towards that clock rate. The memory supplied is the de-facto standard for mid-range computers at the time of this writing, which is 4GBs f DDR3. Sadly, the RAM isn't possible to be upgraded due to the nature of ultrabooks to completely lock down their internals, supposedly to make sure that everything will fit in their tightly slender cases.

The ultrabook is capable of WiFi 802.11 wireless connectivity as well as WiMAX connections, but because of the unavailability(?) of WiMAX connections in the Philippines, I'm not so sure if I would ever benefit from the latter. The ultrabook does not possess a native wired ethernet adapter, probably because it wouldn't fit on the sides of the ultrabook, and in its place is a proprietary port where you could plug in the ethernet dongle provided with the laptop.

The UH75/J comes with a webcam on top of the screen, although I don't really find the need to use it. It also comes with a fingerprint scanner, in case you're too lazy to type your passphrase everytime you need to authenticate with your laptop.

It has Windows 8 preinstalled, though I'm not sure if I would ever use it for work. I'd most likely boot into Windows just to play some games.

Construction

The screen size of the UH75/J is 14" in diameter diagonally, with an aspect ratio of 16:9, with stuff rendered in the screen's native resolution of 1366x768. It is also weighs only a bit more than a pound, and it's just as thin as all the other laptops out there with the "Ultrabook" branding. The bulk of the UH75/J is squeezed into a magnesium alloy shell which presumably keeps the body rigid while maintaining its light weight. That's great, because it would suck if my ultrabook's body suddenly depressed under the weight of my hands, or swayed around like a real book if I was carrying it around with my hand.

One thing that's disappointing about the design was that the notebook's only fan was positioned directly above the spot where one's legs would most likely be holding the laptop up, which degrades the fan's performance while the ultrabook is placed upon one's lap. But that's probably just the sad truth about laptops in general: they don't really perform well on people's laps.

Another major disappointment, and I must say is the worst part of the UH75/J, is its keyboard. No, it's not because the keyboard is in the Japanese layout (you can easily switch keyboard layouts in Windows and Linux), it's just that the keyboard feels so awkward to type on due to the fact that there is very little room for the keys to depress onto once pressed, leaving very little feedback for your fingers to feel whenever you hit a key, unless you type with more than enough force on the keys like I do. I did get familiar with the keyboard after a few days of usage, but it still feels awkward for me sometimes. It's probably just because I'm used to the amazing keyboard that my Thinkpad X60s has.

It comes with a clickpad (a touchpad that does not have any external buttons but rather relies on "zones" around the clickpad that can be programmed as left, right and middle buttons) that isn't too great or isn't too bad, though it is quite troublesome to configure in Linux.

Windows 8

The UH75/J is a Japanese laptop, so obviously Windows 8 came in almost completely translated into Japanese. I'm not really that good in understanding Japanese, though I can read Kana, nevertheless, it didn't take me much effort to install the English language packs into Windows 8 and enable them. However, the system utilities (which I think are just bloatware) pre-installed by Fujitsu are hard-coded into Japanese, but I don't think I'd be using them anyway anytime soon.

Microsoft Office 2010 comes pre-installed by default, although like Windows, everything is rendered in Japanese. A little tweaking will make Office translate the tooltips into English when you hover over something, however, so I don't really mind.

Gaming Capability

I don't think the UH75/J was ever built with gaming in mind, because of its integrated Intel HD 4000 graphics card. However, the GPU appears to be capable of handling most games that doesn't reach the graphics requirements of games like Far Cry 3 and Crysis 3. I've tested games such as Dota 2 and Team Fortress 2 and the UH75/J appears to handle them quite well on medium level settings. I've also tested Payday: The Heist on the UH75/J and I'm getting an FPS range on about 21-35 depending on what's going on, on the lowest settings.

Installing Linux

As with every machine and box that I own which isn't primarily used for gaming, I installed Linux on the UH75/J, with Kubuntu (the KDE variant of Ubuntu) as my distro of choice. Additional steps had to be made to make Linux boot on the laptop, however. First, I had to delete the other NTFS partition Fujitsu had allocated for the laptop that it doesn't even use (this could presumably used for user media), then shrank the partition Windows 8 is installed on until it was just about 100GB (should be enough for Windows and a few games, I don't really work on Windows). Then I turned off Secure Boot in th UH75/J's BIOS settings. The BIOS is also conveniently written in Japanese, however, it's trivial to set the language to English. Once Secure Boot is disabled, I was now able to boot into Kubuntu through a USB drive. I created three new partitions in place of the empty, unallocated space: a 30GB ext4 partition for the root install, 8GB for swap, and the rest for my home directories, so that I can easily distro-hop without any problems.

Surprisingly, Kubuntu worked with the laptop without needing extensive configurations to make stuff work. The Intel GPU's was predictably resolved immediately by Ubuntu thanks to Intel's efforts to keep the Linux GPU drivers open-source and regularly maintained. Sound is working perfectly, with both playback and recording crystal clear. The proprietary ethernet dongle that came with the UH75/J also worked without a hitch. Wireless is working very well as well, although I wasn't able to test the WiMAX capabilities of the ultrabook under Linux.

The only major problem that I have with the UH75/J in Linux is probably the 

Getting the fingerprint scanner to work in Linux requires some work, but it's not too hard. All you need is to install fingerprint-gui and then follow the instructions to get it working. Most desktop environments should be able to take advantage of fingerprint-gui in their logons.

I'm thinking of migrating into another distro once I'm tired of Kubuntu, but not because things aren't working very well with Ubuntu, of course. I won't be migrating to something hardcore like Arch Linux or Gentoo yet, until I can finalize that everything can work properly under mostly automated configurations.

Battery life

The UH75/J has good enough battery life on its own, although because the battery is non-replaceable, extensive care of the battery should be considered. I usually just keep it plugged in at home, and then run it off the batteries every once in a while. Hopefully its capacity will retain after a year of usage.

Verdict

The UH75/J is a laptop for people who are looking for a good performing Japanese ultrabook, although people who aren't are better off looking at its international variant, the U772, or just look at other ultrabooks altogether, since most of them outperform the UH75/J in many aspects, most importantly the keyboard. The UH75/J can also be somewhat pricey, though that's the same story for every ultrabook anyway.

Monday, November 26, 2012

NaNoWriMo 2012 Winner

If you check the handy little sidebar that I have on the right hand side of my blog, you'll notice that there's a little box there that says that I "won" the NaNoWriMo. Well, winning isn't really that much of a correct term to use to describe someone who has successfully gone through the trouble of churning out fifty thousand words in a matter of thirty days, because if it is, then everybody who finishes a five kilometer run would be considered winners. I know some people who might consider successfully forcing themselves to traverse five kilometers in a row on foot to be "winning", but I disagree.

Anyway, my novel, PH:2086 is far from finished, and also very far from having a well-strung together plot. To be honest, after the time and quota pressures of the NaNoWriMo was removed from me like a bomb collar on my neck, I have noticed that I am not really up to adding more stuff into the novel anymore. Or maybe it's because I've recently taken up drumming and I'm very much occupied with practicing at every spare moment that I can get.

I'm not a fan of leaving things unfinished, though, so I will set some personal goals for me to pursue so that I can manage to rack up to eighty thousand to one hundred thousand words, which is the average and most accepted word count for most novels. I have the feeling that I won't be able to compress every bit of the story into one novel however, so I'm thinking of making a sequel once I finish the manuscript.

I also have another novel in the works besides PH:2086, and it's something that I have been working on way before the NaNoWriMo. Hopefully I can get that done as well. Perhaps some excellent time-juggling is in order.