Saturday, 22 March 2014

Principles of GUI's

I had a few thoughts a while back about GUI's like Microsoft Windows and what principles they should follow.

* Ease of switching between applications
* Each user "command" should only have one interpretation and be read by only one program. For example, if you are scrolling a page by clicking the middle mouse button, another application shouldn't use that mouse click to do something else.
* Lack of excess flexibility and useless information. For example, you do not need to be able to position desktop or folder icons at arbitrary pixel locations. This could apply to the window paradigm itself - moving non-maximized windows around is not that fun. Another example is the dotted outline around the active widget - could be an icon, or a command button. Only used for keyboard input and worries the user whether they will accidentally activate a command.
* Uninterruptability - I.e. one program should not be able to become more prominent, taking up the screen and redirecting input commands to itself (maybe interrupting a sequence of commands intended to be received by another program/interface). An example is "splash screens" for programs. Another is the Windows Start Menu - several times when Windows has been starting up the Start Menu has disappeared while I'm trying to use it.
* Non-persistence of "high-energy" states. For example, desktop icons selection. Desktop icons should only be highlighted when the user is immediately about to do something with them. Otherwise there is a constant worry that they will accidentally rename or delete something with a single mouse click or key press.
* Lack of pointless distractions ("Unused icons in your system tray have been hidden.").

It was some time ago that I thought about this and there could have been others.

Keyboard auto-repeat

I figure that keyboard auto-repeat isn't always desirable.

Take a web browser for example. You press and hold the down button, and the page scrolls down, and then stops, and then starts again and continues scrolling until you lift the button.

It should be more like a video game: start scrolling down, smoothly, as soon as the key is depressed, and cease scrolling as soon as it is lifted.

In X11, the server sends events to programs - KeyPress and KeyRelease. If autorepeat is on many of these events are generated for one (physical) keypress. You can turn it off with "xset -r". I'd like to try only turning it on for the arrow keys, but there isn't an easy way to do this - you have to turn on autorepeat, and then turn it off for all keys except the ones you want to leave it on for.

Friday, 1 November 2013

Notes on Slackware 14.0 upgrade

I upgraded from version 13.37 to 14.0 of Slackware, bringing me up-to-date. This time I used the slackpkg program, and it went quite smoothly. I followed the instructions at http://docs.slackware.com/howtos:slackware_admin:systemupgrade.

In short,

  • Edit /etc/slackpkg/mirrors to add the address of a mirror of 14.0
  • Blacklist kernel packages in /etc/slackpkg/blacklist
  • Run "slackpkg update" to download new package list
  • Then it was running "slackpkg upgrade slackpkg", "slackpkg upgrade glibc-solibs", "slackpkg install-new", and "slackpkg upgrade-all".
  • "slackpkg clean-system" to delete old packages, making sure not to delete any packages I've installed separately from the Slackware distribution. This is done in conjunction with reading "CHANGES_AND_HINTS.TXT".
Then I needed to check new configuration files under /etc. "slackpkg new-config" can be used to move these files across. I needed to keep the Internet connection settings in /etc/rc.d/{rc.inet1.conf,rc.wireless.conf} and /etc/wpa_supplicant.conf. Also /etc/inittab for the behaviour of Ctrl+Alt+Del.

I downloaded and installed kernel packages manually and rerun lilo after adding lines to /etc/lilo.conf:

image = /boot/vmlinuz-huge-smp-3.2.29-smp
  root = /dev/sda3
  label = Linux_slack14
  read-only
  append = "acpi_osi=Linux"

The last line is needed on my craptop for the screen dimming keys to work.

I previously used ndiswrapper to get my wireless card to work, but I thought I would try the Linux drivers instead. I had several modules blacklisted in "/etc/modprobe.d/blacklist.conf", and running "modprobe b43" made the wlan0 interface show up. I've used wireless since then with few problems. [1]

Next steps are to carefully remove files in /etc/modprobe.d according to CHANGES_AND_HINTS.TXT, use the generic kernel with an initrd instead of the huge kernel, and look through old configuration files (saved as "*.orig") to see what has changed and if I want to keep anything else.

Biggest change has been the upgrade to fvwm 2.6.5. When I tried this before I would get random crashes, but I haven't had any so far.

[1] I don't know why I couldn't get this working before - I suspect it would have worked but I was doing something else wrong, e.g. with ifconfig, wpa_supplicant or dhcpcd. I spent so long trying to get wireless to work that I stopped playing with it as soon as I got it to work with ndiswrapper.

Wednesday, 14 August 2013

Notes on upgrade from Slackware 13.1 to 13.37

I recently upgraded from Slackware 13.1 to 13.37. 13.37 is not the latest version (14.0 is), but by only upgrading one release at a time I'm less likely to have problems.

I downloaded the files with


wget --no-parent -nH --cut-dirs=3 -r -nc (path)

Options mean
--no-parent - Don't download linked files above the directory in the given path
-nH - Don't create local directory called ftp.slackware.com etc.
--cut-dirs - Don't create local directories based on first 3 directories in path.
-nc - Don't download existing files - useful if wget is interrupted.

I had to download and compile the ndiswrapper Slackbuild. I had problems compiling it - I think I ought to have compiled it before installing all the new Slackware packages.

I found the screen went blank when I rebooted! It turned out that the brightness on my laptop screen was only turned down. (See http://www.linuxquestions.org/questions/slackware-14/black-screen-on-bootup-after-a-few-lines-slack-13-37-a-882680/page2.html.) I haven't fixed this yet; all I do is use the laptop function keys to turn the brightness up.)

The instructions for creating an initrd were unclear: I found I had to run

mkinitrd -c -k 2.6.37.6-smp -m ext3

(I was missing the "-smp" part.)

I had some problems with X11. My mouse pointer wouldn't move. I had to delete /etc/X11/xorg.conf. The keyboard was in US mode now, and I had to copy a keyboard layout file (90-keyboard-layout.conf) to /etc/X11/xorg.conf.d.

I found "xset m" would no longer set the pointer speed for my Synaptics touchpad. I had to use a program called "synclient" instead. I copied a settings file to "/etc/X11/xorg.conf.d/50-synaptics.conf". There was some subtle and annoying behaviour such as taps taking too long to be recognized and sometimes getting middle clicks, which I fixed with adding the following lines to 50-synaptics.conf:

        Option "FastTaps" "on"
        Option "MinSpeed" "0.5"
        Option "MaxSpeed" "10"
        Option "AccelFactor" "0.05"
        Option "EmulateTwoFingerMinZ" "1000"
        Option "EmulateTwoFingerMinW" "1000"

I had some broken behaviour with fvwm. Apparently Unicode locales are broken in versions (2.4.*) (even though it worked before.) It could have been something to do with the fonts changing as well.

The new version of Thunderbird would no longer highlight folders with new messages. I managed to get something acceptable by changing "~/.thunderbird/h0eadjtl.default/chrome/userChrome.css" to:

/*
 * Do not remove the @namespace line -- it's required for correct functioning
 */
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* set default namespace to XUL */

treechildren::-moz-tree-cell-text(folderNameCol, newMessages-true) {
  color: red !important; }

Avoiding YouTube channel deletion popup

Sometimes when using YouTube, I have been getting an annoying pop-up which stops me watching a video.

-
You have an unused YouTube username

You no longer need your channel [channel name] to use most features on YouTube. Would you like to remove your channel?

No, I don't need it (Recommended).
You can create a new name on YouTube if need one at any time [sic]

Yes, I need my username
You will need to update your channel and create a new Google+ page
-

Neither option is desirable. Reading what some people had posted about this led me to believe that this would end up deleting my YouTube favorites. The second option looks like a hassle I can't be bothered with.

(See http://productforums.google.com/forum/#!topic/youtube/0L9pH1HZFao.)

I remember a similar pop-up before with YouTube, one asking me to use my real name on my YouTube channel. I couldn't work out which option I was supposed to pick in order to say "no!"

For the time being, I can get rid of this pop-up by refreshing the page. When I am logging in to YouTube, I have re-type "youtube.com" in the location bar to stop the pop-up coming up again.

Friday, 14 June 2013

crackxls 0.3 released

crackxls 0.3 has been released. Download it at https://github.com/GavinSmith0123/crackxls2003/tags. This version supports breaking encryption on Microsoft Word 97/2000/2002/2003 documents for the first time.


Windows users may just want to download "crackxls2003.exe" from https://github.com/GavinSmith0123/crackxls2003.

Sunday, 9 June 2013

crackxls2003 - Initial support for Microsoft Word

I've added initial support for scanning Microsoft Word files to the crackxls2003 program.

It is on the "msword" branch of the git repository, which is at https://github.com/GavinSmith0123/crackxls2003/tree/msword.

As with Excel files, it will only work for the RC4 method of decryption, which was used in Office XP and some earlier versions.

There is no support yet for decrypting Word documents, only scanning for their encryption keys. I haven't tried it, but it is likely that the trial version of "guaword" would be able to decrypt a file given the encryption key, as this was true for Excel files for "guaexcel", another program from the same developer.

Adding decryption support may not be that difficult, and I may manage it in the next week or so.