Showing posts with label windows. Show all posts
Showing posts with label windows. Show all posts

Tuesday, September 6, 2016

What are "HKLM" in various Windows help group solutions

There are many Windows behaviors which are governed by modifying specific system internals, e.g. programs that launch once per system startup, or every log in, or for particular users, etc. These typically require changes to the Windows registry (regedit is your frenemy).

When particular keys are mentioned in several online fora, particular registry entry keys are often contracted to arcane acronyms such as "HKLM", "HKCU" etc.


Microsoft has a very good explanation for some important keys. However, they still don't directly explain what the prefix "HK" stands for.

The table below links the informal contractions.
Informal ContractionRegistry hiveSupporting files
HKCCHKEY_CURRENT_CONFIGSystem, System.alt, System.log, System.sav
HKCUHKEY_CURRENT_USERNtuser.dat, Ntuser.dat.log
HKLM\SAMHKEY_LOCAL_MACHINE\SAMSam, Sam.log, Sam.sav
HKLM\SecurityHKEY_LOCAL_MACHINE\SecuritySecurity, Security.log, Security.sav
HKLM\SoftwareHKEY_LOCAL_MACHINE\SoftwareSoftware, Software.log, Software.sav
HKLM\SystemHKEY_LOCAL_MACHINE\SystemSystem, System.alt, System.log, System.sav
HKUHKEY_USERS\.DEFAULTDefault, Default.log, Default.sav
As regards the "HK" prefix, my understanding is that it stands for "Hive Key" since these are registry keys that are backed by a "hive of files".

Thursday, December 5, 2013

Scale your expectations. A humble request to web designers from a mobile user to not restrict user scalability

I browse the web. 

Extensively. 

Both while I'm at work (for work purposes, of course), and when not (which means I'm researching something or reading up on what I should be working on next). In this endeavor, I employ any web capable device I can lay my paws on, be it a desktop (Linux, Windows, Mac), a laptop (MacBook Pro, Macbook Air, Ideapad Yoga, Satellite), a tablet (iPad Air, iPad 2, iPad Mini with Retina display), a smart phone (iPhone), or an e-reader (Kindle e-Ink, word!). And if I'm really, really, really desperate, through the embedded web browser on my TV. 

All of which means, that I experience the web in about as many ways as one possibly can (sorry Lynx hasn't gotten any love in a long, long, long time), and often have to contend with websites not necessarily designed with every browser in mind. I'm normally quite considerate to the web-site designer, especially if I'm using a device that probably isn't very widely adopted (e.g. kindle e-ink or TV browser); it is a special situation created by my choice of non-popular device, and so the onus of consumption is on me. On the other hand, quite often, my medium of consumption is an iPad or iPhone, and I'll land on a website that is "mobile friendly", and yet is infuriatingly ill fit to be browsed on a mobile screen. These are the ones I take strong exception too.

While mobile device capabilities have increased astronomically since the days of the hand-held monochrome LCD "video" games, mobile devices still often remain constrained in their screen real-estate (some necessarily due to their functionality: I can't imagine favoring a device the size of iPad Air as my phone for any length of time over a better sized hand-held). There is a fair number of websites that are still not "mobile friendly", i.e. which were designed with the facilities of a desktop browser and desktop sized screen in mind, and consequently browsing these on a hand-held requires constant panning and zooming. I don't take exception to these.

I don't begrudge these web sites and authors because the non-mobile websites were probably created before the mobile phenomenon, and haven't been updated since (either due to passivity of the original authors, or the lack of funds etc.).

The websites of late where I do take exception, are the ones that profess to be mobile "friendly", and in their efforts to be mobile compatible, go a little too far. I'm talking about the websites that recognize the mobile browser and prevent viewport scaling. What this means is that the user is UNABLE to pinch-zoom and pan to read the material.

I find this decision by web-designers increasingly frustrating. A humble and sincere request to all web-designers and web-masters of the world: PLEASE, PLEASE PLEASE, (emphasis and stress to indicate pleading and not yelling), do NOT limit the scaling, unless there is very good justification for why you need to solidly fix the web-site layout. If the text size isn't big enough, it makes for an incredibly infuriating experience for the reader. 

Just as law makers cannot know all the ramifications of their regulations on the society at large. web-designers too cannot ascertain how their users would prefer to consume their material. Unnecessary and ill-designed restrictions only lead to frustration in the populace.

I understand that not all content creators might be aware their template has this restriction built in. So here's a tip on what "causes" this particular frustration, and how to resolve it.

Website scaling is typically restricted with a meta content tag as below:

meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=no"


notice the maximum-scale and user-scalable fields. 

If a web site does not have a very strong functional need to stay fixed, please consider dropping the maximum-scale property and setting the user-scalable to yes (user-scalable=yes). 

Your mobile users will thank you. I certainly will. 


Saturday, June 1, 2013

Firefox, Gmail, and the flash plug-in

My computer seemed slow. Everything was sluggish even though the "only thing" I was using was the Firefox browser. I did have several tabs open, but none that I knew to be media or script intensive. Yet, there was slowness. A quick glance at the task manager revealed that FlashPlayer plugin was consuming an entire core of my processor, which surprised me, since nothing should've been playing any videos.

So I killed it.

Processor seemed to go idle, things became a little snappier. Nothing seemed to have been affected. How is that possible? Was there a virus or trojan of some sort, I wondered. I got my answer when I tabbed back to my open gmail page. There, on the top, like an epiphany was displayed a bar across the tab: "Flash player plugin has crashed. Click here to relaunch page".

"What?"

Slowly, the wheels of thought groaned into motion: what is it on gmail's page that *might* use flash? Video / web-calling and Chatting seemed possible suspects. So I checked gmail's settings to see what was on, and if anything was using flash. Sure enough, clicking on chat settings showed me the following option:

Sounds:
- Play a sound notification when new chat messages arrive. Requires Flash.

changed to "sounds off". 

Recap: it was Flash player, in the Gmail tab, with the inappropriate chat settings. Clue!


Monday, November 26, 2012

Getting backuppc to work after upgrading to Ubuntu 12.04.1 LTS "PRECISE"

I saw the latest notice saying Ubuntu 12.04.1 LTS was available, so I went ahead and bit the bullet and updated. So far, it's been a positive experience, but I'm sure there will be other things I'll find that broken or that need tweaking. Backupppc is just the first thing I've discovered. I've also seen several backup apps available in the Ubuntu Store, but I'm not yet sure which ones will work for my use-case (backing up windows laptop to server at home).

first things first: this is my current install:

# cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=12.04
DISTRIB_CODENAME=precise
DISTRIB_DESCRIPTION="Ubuntu 12.04.1 LTS"


backuppc version: version 3.2.1

This string is available when you log in to the webadmin page.

During the install, i ended up selecting "Install distributor's version" of config.pl. Everything went nice and dandy till I logged in after the reboot. I found that my laptop was listed as before, but none of the backups were displayed.
This was understandable because I had changed the location of the backups from the default.

By default, backuppc wants to install at: /var/lib/backuppc However, I got a 1TB drive much after I had started backing up, so I moved the entire backup to the following path: /mnt/windowsE/backuppc 

YES, that's a windows NTFS partition. I wanted to do that so that I could have access to the data from native windows as well (backup isn't the only purpose for the drive, it's my media store as well, and keeping it windows, simplifies a whole bunch of other things. NFS / CIFS not withstanding)

 SIDEBAR: following is an excellent starting point for doing this switcheroo http://sourceforge.net/apps/mediawiki/backuppc/index.php?title=Change_archive_directory

However, I hadn't followed the instructions exactly: I manually edited /etc/backuppc/config.pl and changed $topDir to point directly to my new location /mnt/windowsE/backuppc.

It turns out that this is not cool per backuppc because the $topDir path in config.pl is "informational" only, and is used for updating. In the internals, the path is actually hard-coded during installation, and this can lead to various funkiness.

The better method is to set the appropriate path right during the initial install of backuppc, but this was not possible in my case. The alternative is to then mount the desired path on the expected location ("if you can't bring the mountain to Mohammad...")

 I set up my /etc/fstab with the following rule:
/mnt/windowsE/backuppc /var/lib/backuppc bind defaults,bind,uid=114,gid=127 0 0


uid=114 and gid=127 correspond to the userid and gropuid of the dedicated backup user on my machine. These can be retrieved using:
# id -u backup_user
114
# id -g backup_user
127


Also, since the default config.pl had been over-written, my backup method was no longer set to rsyncd. I restored these settings from the previous version (Ubuntu update was nice enough to store this as /etc/backuppc/config.pl.ufc-old).

After the above changes, I issued a reboot so that the system starts up cleanly (though I hate doing that!). Plus it let me see if there would be any issues with backuppc starting by itself at reboot.

None occurred and I'm cooking with gas.

Tuesday, December 23, 2008

Carping about Vista Crap

Vista has been good generally, but I have noticed a few things that had me blowing a gasket, at least early on when I didn't understand what caused the odd behavior.

This might not be a Vista thing per se, but the touch pad scrolling doesn't seem to work reliably. Especially when running applications with elevated privileges ("as administrator"). E.g if the task manager is started with "normal" user privileges (UAC is enabled, of course), the touchpad scrolling works. However, when "view processes from all users" is enabled, the touchpad scrolling stops working. A similar difference in behavior is observed when regedit is started with / without elevated privileges. This leads me to believe that this might have something to do how mouse event messages are received by "elevated" applications.

I doubt, though, that this is a Vista thing because mousewheel scroll seems to work in the same situtation (when using a discrete USB mouse instead of the trackpad). So my blame right now lays with Synaptic.

Second, i see Vista BSOD fairly consistently when I use VPN. After I Idle on VPN for a while (haven't measured exactly how much time), I get a BSOD. I haven't had pause yet to analyze the error code and determine if this is due to a driver or some arcane interaction between Vista and its driver and its power management.

Tuesday, July 1, 2008

Ubuntu gripes

I have had a long running argument with a few friends about the utility of Ubuntu. I started out as a Linux believer / fanatic when in school. I drank hook line and sinker the "academia" spiel about Linux being a better and more productive operating system than WinBlows to end. Till I met a few high respected practising academics and professionals who championed otherwise. Thus I decided to be a good engineer and become OS agnostic. I chose to create, in my head, a wet-ware database about what was good about each OS and use it for that purpose.

But the number of exceptions and uses has become far too much for me to bear and I must purge my knowledge in the pensieve of this blog, so that at a later date, I might refer to it without having to relearn history or reinvent the wheel. Hopefully others can use my experiences as well and make better informed and wiser decisions.

Things I do like about Ubuntu Linux:
1.

Things I don't like about Ubuntu LinSux:

1. Laptops aren't supported very well (I understand there is proprietary support required, but that doesn't mean I have to like shoddy things. I would love it if all hardware manufacturers got their act together and supported Linux all out, but then where's the monetary incentive?)

2. It seems to have an increase load of crapware or malformed experimentware. Take tracerd for instance: it is supposed to be a indexer tool to enhance searches. Nice and fine, except that it sucks. No I mean literally. It sucks all available memory and processing power away from the machine even while it is in use. At least windows products are mature enough to not do that. They may have a whole bunch of other things wrong with them (mem leaks for one, zombied processes etc.) but they tend to not cripple you while you work. Not so trackerd. It happily sucks the life of your hard drive and processing cycles from your tasks while it runs.

3. Hibernation doesn't work right. Now I'd like to accept the Ubuntu apologizer's claim "it's because of the broken M$ ACPI model", but I just can't get myself to do that. Each time the machine resumes from hibernation in windows, stuff comes back normal: the screen works, the sound works yada yada. Not so with Gutsy. NetworkManager is not going to work, in addition to sucking all processing cycles (something that isn't supposed to happen in Linux because of its excellent scheduler and extreme advantages against a micro-kernel architecture). Good luck if sound works right. Oh yeah and keep 'em fingers crossed or else the display might not come on right (though mostly, it does). Somehow ACPI under windows seems to be free from these afflictions.

4. sound card doesn't work right. In Winblows Vastage, when you connect a headphone jack, the audio in the speakers is killed (as expected). In Gutsy Linsux, connected a headphone gives you audio in two places! two for the price of one! so if you wanted to hear some music without disturbing those around you, fat chance! Also audio has never dealt very well with hibernation (see 3 above). Btw, FYI, I am currently using Gutsy as I type and I tend to do a lot of my non-work development in Gutsy.

5. Screen brightness goes to eye burning max each time the system resumes from suspend / hibernation. Have to go to Preferences | Power Management each time and jiggle screen brightness around to reduce it to comfortable levels.

6. (07/07/2008) More hibernation quirks: system resumes fine from suspend when idle, but then immediately hibernates. More here and here

7. Can't join the same wireless network after suspend / hibernate. There is an open bug on this.

8. Using Photoshop under Wine initially had the issue that the clone tool (Alt + Click) wouldn't work because it would always try to move the window. Figured out that this was because of Ubuntu's window manager (Gnome). Easily remedied in this case by changing System | Preferences | Windows | used Super "windows logo" plus click for move.



Things I do like about Windows Vista:

Things I don't like about Winblows WasteYa: