Expat-IT Tech Bits




Search this site:


/ (289)
  Admin/ (123)
    Apache/ (10)
      HTTPS-SSL/ (4)
      PHP/ (3)
      performance/ (2)
    Cherokee/ (1)
    LAN/ (4)
    LVM/ (6)
    Monitoring/ (2)
      munin/ (2)
    SSH/ (6)
    SSL/ (1)
    Samba/ (1)
    VPN-options/ (7)
      OpenVPN/ (1)
      SSH-Proxy/ (3)
      Tinc/ (1)
      sshuttle/ (1)
    backups/ (17)
      SpiderOak/ (1)
      backuppc/ (5)
      dirvish/ (1)
      misc/ (6)
      rdiff-backup/ (1)
      rsync/ (1)
      unison/ (2)
    commandLine/ (24)
      files/ (8)
      misc/ (10)
      network/ (6)
    crontab/ (1)
    databases/ (15)
      MSSQL/ (2)
      MySQL/ (8)
      Oracle/ (3)
      PostgreSQL/ (1)
    dynamicDNS/ (2)
    email/ (11)
      Dovecot/ (1)
      deliverability/ (1)
      misc/ (1)
      postfix/ (7)
      puppet/ (1)
    iptables/ (3)
    tripwire/ (1)
    virtualization/ (9)
      VMware/ (1)
      virtualBox/ (8)
  Coding/ (14)
    bash/ (1)
    gdb/ (1)
    git/ (3)
    php/ (5)
    python/ (4)
      Django/ (2)
  Education/ (1)
  Hosting/ (27)
    Amazon/ (18)
      EBS/ (3)
      EC2/ (10)
      S3/ (1)
      commandline/ (4)
    Godaddy/ (2)
    NearlyFreeSpeech/ (3)
    Rackspace/ (1)
    vpslink/ (3)
  Linux/ (31)
    Android/ (1)
    Awesome/ (3)
    CPUfreq/ (1)
    China/ (2)
    Debian/ (8)
      APT/ (3)
      WPA/ (1)
    audio/ (1)
    encryption/ (3)
    fonts/ (1)
    misc/ (6)
    remoteDesktop/ (1)
    router-bridge/ (3)
  SW/ (45)
    Micro$soft/ (1)
    browser/ (2)
      Chrome/ (1)
      Firefox/ (1)
    business/ (28)
      Drupal/ (9)
      KnowledgeTree/ (6)
      Redmine/ (2)
      SugarCRM/ (7)
      WebERP/ (2)
      WordPress/ (1)
      eGroupware/ (1)
    chat/ (1)
    email/ (1)
    fileSharing/ (2)
      btsync/ (1)
      mldonkey/ (1)
    graphics/ (2)
    research/ (2)
    website/ (6)
      blog/ (6)
        blosxom/ (3)
        rss2email/ (1)
        webgen/ (1)
  Security/ (15)
    IMchat/ (2)
    circumvention/ (2)
    cryptoCurrency/ (1)
    e-mail/ (4)
    greatFirewall/ (1)
    hacking/ (1)
    password/ (1)
    privacy/ (2)
    skype/ (1)
  Services/ (1)
    fileSharing/ (1)
  TechWriting/ (1)
  xHW/ (14)
    Lenovo/ (1)
    Motorola_A1200/ (2)
    Thinkpad_600e/ (1)
    Thinkpad_a21m/ (3)
    Thinkpad_i1300/ (1)
    Thinkpad_x24/ (1)
    USB_audio/ (1)
    scanner/ (1)
    wirelessCards/ (2)
  xLife/ (17)
    China/ (9)
      Beijing/ (5)
        OpenSource/ (3)
    Expatriation/ (1)
    Vietnam/ (7)


  • 2019/06
  • 2016/07
  • 2016/05
  • 2016/02
  • 2016/01
  • 2015/12
  • 2015/11
  • 2015/06
  • 2015/01
  • 2014/12
  • 2014/11
  • 2014/10
  • 2014/09
  • 2014/07
  • 2014/04
  • 2014/02
  • 2014/01
  • 2013/12
  • 2013/10
  • 2013/08
  • 2013/07
  • 2013/06
  • 2013/05
  • 2013/04
  • 2013/02
  • 2013/01
  • 2012/12
  • 2012/10
  • 2012/09
  • 2012/08
  • 2012/07
  • 2012/06
  • 2012/05
  • 2012/04
  • 2012/03
  • 2012/01
  • 2011/12
  • 2011/11
  • 2011/10
  • 2011/09
  • 2011/08
  • 2011/07
  • 2011/06
  • 2011/05
  • 2011/04
  • 2011/02
  • 2010/12
  • 2010/11
  • 2010/10
  • 2010/09
  • 2010/08
  • 2010/07
  • 2010/06
  • 2010/05
  • 2010/04
  • 2010/03
  • 2010/02
  • 2010/01
  • 2009/12
  • 2009/11
  • 2009/10
  • 2009/09
  • 2009/08
  • 2009/07
  • 2009/06
  • 2009/05
  • 2009/04
  • 2009/03
  • 2009/02
  • 2009/01
  • 2008/12
  • 2008/11
  • 2008/10
  • 2008/09
  • Subscribe XML RSS Feed

    Creative Commons License
    This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

    This site has no ads. To help with hosting, crypto donations are accepted:
    Bitcoin: 1JErV8ga9UY7wE8Bbf1KYsA5bkdh8n1Bxc
    Zcash: zcLYqtXYFEWHFtEfM6wg5eCV8frxWtZYkT8WyxvevzNC6SBgmqPS3tkg6nBarmzRzWYAurgs4ThkpkD5QgiSwxqoB7xrCxs

    Sun, 05 Jan 2014

    /Linux/misc: How to Make Gnome3 Usable

    I am one of the many who abandoned Gnome after the transition to Gnome3[1]. All the other desktops (KDE, XFCE, LXDE) that I use are configured to have six workspaces, mapped to Ctrl-F1, F2, F3, and Ctrl-1, 2, 3. And I put specific applications in each of those workspaces, which I always want to be able to access with the same keyboard shortcuts. Default Gnome3 behavior is to "disappear" a workspace once the last app in that workspace is closed, causing all workspaces above to shift down one keyboard shortcut. Simply unacceptable.

    But now I have a fix[2]. Put this in ~/.xsession:

    gsettings set org.gnome.shell.overrides dynamic-workspaces false
    gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-5 "[\"2\"]"
    gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-6 "[\"3\"]"

    [1] https://www.gnome.org/gnome-3/
    [2] http://jeffbastian.blogspot.com/2012/06/static-workspaces-and-keyboard.html

    posted at: 09:02 | path: /Linux/misc | permanent link to this entry

    Thu, 12 Dec 2013

    /Linux/misc: Sending (Big) E-mails to Your Kindle

    I have a lot of interesting things stacking up in my e-mail client (RSS feeds, mailing lists, etc.) that I am not getting around to. Particularly difficult to get to are the long ones.

    Queue my Kindle, while on public transit....

    First copy the mail files to a temporary directory. (Personally, I use claws-mail and maildir, so that is as simple as copying the e-mails to there own folder, and then copying that folder in /tmp.)

    Then cd into that temporary directory, and strip out the text portions of those e-mails:

    munpack -t *

    This places the text portion of each maildir file into a file named "part{name-of-file}". Then add ".txt" to each file by running this script:

    for file in part*; do mv $file $file.txt; done

    Now import these txt files in calibre (tagging appropriately) and send them to your Kindle. (Note that this is probably only really worthwhile for BIG e-mails.)

    posted at: 04:01 | path: /Linux/misc | permanent link to this entry

    Fri, 20 Jan 2012

    /Linux/misc: Running and Installing Debian from a USB Stick

    So unbelievably easy[1]:

    cat debian.iso > /dev/sdX

    I grabbed the latest net install[2] ISO, did the above, popped it into my new laptop, hit F12 during boot to get the boot menu, and picked the USB option. Never had such a swift and painless install....


    And then there was Ubuntu Lucid. Not so easy. The ISO will not boot from USB per the above. After a bit of flailing around, it seems the easiest way (and so far the only way) that has worked for me is to use usb-creator, which is packaged with Lucid. And only works with X, there is no console version.

    Yes, that means you need a running Lucid desktop to do this. Lame. The package that needs to be installed is usb-creator-gtk. Note that you can invoke it from the following menu:

    System --> Administration --> Startup Disk Creator

    but that did not work for me either, there were errors. What I did was installed the sux package, logged into root in a terminal by invoking sux, and then invoked usb-creator-gtk as root. Then it worked, and the USB stick booted.

    [1] http://www.debian.org/releases/stable/i386/ch04s03.html.en
    [2] http://www.debian.org/CD/netinst/

    posted at: 02:51 | path: /Linux/misc | permanent link to this entry

    Sun, 13 Sep 2009

    /Linux/misc: Removable Storage Should Always Mount on the Same Mount Point

    I am writing this as of the kernel 2.6.30/udev era, on Debian testing.

    I have a an external USB hard drive that I use all the time. When I boot from scratch, the default udev configuration always assigns the first partition to /dev/sda1. However, when I suspend and then resume, udev likes to put it somewhere else, /dev/sdb1 for instance. Therefore an /etc/fstab entry of the following variety:

    /dev/sda1 /mnt/usbfat vfat user,exec,dev,suid,rw,umask=0000 0 0

    will not always work because there is no guarantee the partition will get /dev/sda1 every time. The solution is to identify the partition by its label in /etc/fstab. First assign a label to the partition.

    For a FAT partition, use the mtools package. First configure mtools by adding the following line

    drive x: file="/dev/sdb1"

    to /etc/mtools.conf. (This of course assumes that the drive is being assigned currently to /dev/sdb1, which you can verify in /var/log/syslog.) Then write the label to the partion:

    # mlabel x:
    Volume has no label
    Enter the new volume label : USBFAT1

    For an ext2/ext3 partition, use:

    # e2label /dev/sdb1 USBEXT1

    For KDE users, and probably Gnome users as well, this is already enough, it should automount on insertion to the same mount point every time. If you are using a window manager with fewer bells'n'whistles, you probably need to explicitly specify the mount point. There are two ways to set up /etc/fstab. Edit /etc/fstab to contain ONE of the following lines:

    LABEL=USBFAT1 /mnt/usbfat vfat user,exec,dev,suid,rw,umask=0000 0 0


    /dev/disk/by-label/USBFAT1 /mnt/usbfat vfat user,exec,dev,suid,rw,umask=0000 0 0

    Unplug your USB drive, wait a few seconds, then plug it back in. Now type:

    mount /mnt/usbfat



    posted at: 01:51 | path: /Linux/misc | permanent link to this entry

    Thu, 16 Apr 2009

    /Linux/misc: 101 Things You Can Do On Linux But Not on Microsoft Windows

    I might not make it all the way to 101, but I will give it a go:

    1. You can update almost all system software (except for the kernel) without rebooting.

    2. In fact, Linux can be kept running for months through many updates, without a single shutdown or reboot or system crash. Server administrators literally do this all the time.

    3. Go for years without having to re-install your computer. "Bit rot" does not exist in Linux. It will keep booting and working without deterioration through an endless succession of minor and major software updates, until your hard drive finally fails (don't forget to make periodic backups!!).

    4. Take no specific precautions against viruses / trojans / worms / malware, and go for years without seeing one infect your computer. (I have gone ten years, most of that a full-time Linux user.)

    5. If your screen is locked-up, your system is not necessarily crashed. It might be just the X-Window Server that is hosed. First try to restart the X-server with Ctrl-Shift-BackSpace. If the keyboard is not responding, try to login to the machine from another computer with SSH[1] and restart the Window manager (kill the "X" process). Either of these options would be better for your hard drive then killing the power.

    6. Not enough memory to run everything you want to run at the same time? Run a piece of software on another (UNIX / Linux) computer and display its window on the computer you are sitting at. Just login to the other computer from a terminal using "ssh -X", start the program from the command line of the terminal that is now talking to the other computer, and its window will pop up right where you are sitting.

    7. Trivially run a web server or e-mail server on your desktop. Most Linux distributions install most servers with defaults that have it running almost instantly, out of the box. Little or no configuration required.

    8. If you are experiencing system problems, see the low-level error logs that your system is producing (and Microsoft Windows invariably hides) in the files contained within the /var/log/ directory.

    9. Trivially get the source code for any sofware running on your computer, and (non-trivially) fix / change it, if you so desire.

    10. Have a complete functioning computer system that will do most of what most people need, where all installed (Open Source[2]) software is completely free, and legally so.

    11. (For common Linux distributions[3]) Install and update all of the above software, both system AND USER PROGRAMS, from one single unified software archive. (No chasing all over the internet to find software....)

    12. For software that is not available in the free archives, find almost anything else you want, also for free, in other archives that may or not be legal in the jurisdiction where you live. Add these to your list of archives, and updating all installed software continues to be a simple one-step process.

    13. If you have problems with a given piece of software, usually it is easy to find and send a bug report to the programmers who work on it. If the problem you are reporting is serious, or the fix very simple, they will probably give you a quick reply.

    14. Have your main computer be a zippy Linux install, that the latest bloated version of Microsoft Windows cannot even be installed on, let alone run on. In 2008, my fastest machine is a Pentium III 1.1 GHz with 256M of memory. I am a power user so the memory is a bit light, I need to spend some more money on this machine that I bought for just over US$200.

    15. Build your own Linux router[4] (wired, wireless, or both, just need to somehow provide the requisite number of network cards) with the latest and greatest up-to-date software using an almost worthless Pentium One laptop. All you need are two PCMCIA card slots so that you can plug in two network cards.

    16. Have multiple IDENTICAL copies of files or directories in different places. Edit one copy and all are changed, because all the copies are POINTING TO THE SAME CONTENT on the disk. In the Unix world, there are actually two slightly different ways to do this: "symbolic" links and "hard" links.

    17. Choice: choose and install different "kinds" (distributions[5][6][7]) of Linux specializing in special needs: speed, mimimum use of disk space, "bleeding edge" vs. stable software, education, etc....

    18. More choice: from within any installed Linux distribution, choose from a long list of different window managers, allowing one to choose between desktops that are radically different in appearance and function.

    [1] http://www.openssh.com/
    [2] http://en.wikipedia.org/wiki/Open_source_software
    [3] http://distrowatch.com/
    [4] http://blog.langex.net/index.cgi/Linux/router-bridge/build-your-own-router.html
    [5] http://en.wikipedia.org/wiki/List_of_Linux_distributions
    [6] http://www.linux.org/dist/list.html
    [7] http://distrowatch.com/

    posted at: 00:54 | path: /Linux/misc | permanent link to this entry

    Wed, 08 Oct 2008

    /Linux/misc: Linux Desktop Memory Requirements Still Very Light

    For the vast majority of Linux software, 256 Meg is RAM is quite sufficient, and memory is not a bottleneck.

    However, I find myself using at least three pieces of software that are outrageous memory hogs, and in fact having any two of them running at the same time causes swapping and brings my 256 Meg machine to its knees. Unfortunately, all three are essential applications, so I just spent a few dollars to upgrade to 640 Meg (which so far seems to be enough to 100% avoid noticeable swapping).

    The three offenders are:

    1. Firefox[1]: Due to its good multimedia support and many useful plugins, Firefox is the current de facto standard browser in the Linux world. I keep trying to move to other browsers, but I always end up coming back to Firefox.
    2. Miro[2]: the best internet television / download client / video library I can find. I look forward to seeing 2.0, and hope it will be less of a resource hog.
    3. Trader Workstation[3]: Interactive Brokers proprietary Java trading app. I am just thankful they are providing a good multi-platform piece of software, and do not plan on giving them a hard time because it just happens to be a bloated and memory-hungry Java app. I wish all banks and brokerages were so friendly towards non-Micro$oft users.

    [1] http://www.mozilla.com/en-US/firefox/
    [2] http://www.getmiro.com/
    [3] http://www.interactivebrokers.com/en/p.php?f=tws&ib_entity=llc

    posted at: 10:53 | path: /Linux/misc | permanent link to this entry