Thursday, December 20, 2012

Get iperf3 (new version) source code

There is a new version of iperf, iperf3 at code.google.com/p/iperf/. I am not sure if it is any better than iperf2 but it is cool to have a new source to play with. Anyways if you want to build this code on Ubuntu you may encounter a failure due to missing libraries.

Here is a quick review of my attempt to build this tool.

1. Download the latest beta code
user@localhost:~$ wget http://iperf.googlecode.com/files/iperf-3.0b4.tar.gz

2. Extract the code
user@localhost:~$ tar -xvzf iperf-3.0b4.tar.gz

3. With most source code you then have to run the configuration tool for the makefile to be properly built

user@localhost:~$ cd iperf-3.0b4/
user@localhost:~/iperf-3.0b4$ ./configure
This is the output that I got
./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for ranlib... ranlib
checking whether ln -s works... yes
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /usr/bin/ld option to reload object files... -r
checking how to recognize dependent libraries... pass_all
checking for ar... ar
checking for strip... strip
checking for ranlib... (cached) ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for ANSI C header files... (cached) yes
checking for uuid_create... no
checking for uuid_generate... no
checking for uuid_generate in -luuid... no
configure: error: libuuid is not available
What I noticed is that libuuid is not available. So how do we find where we can get libuuid? A google search lead me to this page:
www.debian-administration.org/article/334/Finding_which_package_contains_a_file
and the apt-file tool

4. So let us use apt-file and figure it out and then install the necessary library.
4a. If you don't have apt-file follow the guide available at the link above to install it and prepare, or just do the following
user@localhost:~/iperf-3.0b4$ sudo apt-get install apt-file && sudo apt-file update

4b. Search using apt-file for libuuid
user@localhost:~/iperf-3.0b4$ apt-file search libuuid
cruft: /usr/lib/cruft/filters-unex/libuuid1
drizzle: /usr/lib/drizzle7/libuuid_function_plugin.so
drizzle-dbg: /usr/lib/debug/usr/lib/drizzle7/libuuid_function_plugin.so
fp-units-base-2.4.4: /usr/lib/fpc/2.4.4/units/x86_64-linux/uuid/libplibuuid.a
fp-units-base-2.4.4: /usr/lib/fpc/2.4.4/units/x86_64-linux/uuid/libuuid.o
fp-units-base-2.4.4: /usr/lib/fpc/2.4.4/units/x86_64-linux/uuid/libuuid.ppu
fpc-source-2.4.4: /usr/share/fpcsrc/2.4.4/packages/uuid/src/libuuid.pp
libdata-uuid-libuuid-perl: /usr/share/doc/libdata-uuid-libuuid-perl/changelog.Debian.gz
libdata-uuid-libuuid-perl: /usr/share/doc/libdata-uuid-libuuid-perl/copyright
libuuid-perl: /usr/share/doc/libuuid-perl/changelog.Debian.gz
libuuid-perl: /usr/share/doc/libuuid-perl/copyright
libuuid-tiny-perl: /usr/share/doc/libuuid-tiny-perl/changelog.Debian.gz
libuuid-tiny-perl: /usr/share/doc/libuuid-tiny-perl/copyright
libuuid1: /lib/x86_64-linux-gnu/libuuid.so.1
libuuid1: /lib/x86_64-linux-gnu/libuuid.so.1.3.0
libuuid1: /usr/share/doc/libuuid1/changelog.Debian.gz
libuuid1: /usr/share/doc/libuuid1/copyright
libuuidm-ocaml-dev: /usr/share/doc/libuuidm-ocaml-dev/README
libuuidm-ocaml-dev: /usr/share/doc/libuuidm-ocaml-dev/changelog.Debian.gz
libuuidm-ocaml-dev: /usr/share/doc/libuuidm-ocaml-dev/copyright
libuuidm-ocaml-dev: /var/lib/ocaml/lintian/libuuidm-ocaml-dev.info
libuuidm-ocaml-dev: /var/lib/ocaml/md5sums/libuuidm-ocaml-dev.md5sums
libuuidtools-ruby: /usr/share/doc/libuuidtools-ruby/changelog.Debian.gz
libuuidtools-ruby: /usr/share/doc/libuuidtools-ruby/copyright
libuuidtools-ruby-doc: /usr/share/doc/libuuidtools-ruby-doc/changelog.Debian.gz
libuuidtools-ruby-doc: /usr/share/doc/libuuidtools-ruby-doc/copyright
libuuidtools-ruby1.8: /usr/share/doc/libuuidtools-ruby1.8/changelog.Debian.gz
libuuidtools-ruby1.8: /usr/share/doc/libuuidtools-ruby1.8/copyright
libuuidtools-ruby1.9.1: /usr/share/doc/libuuidtools-ruby1.9.1/changelog.Debian.gz
libuuidtools-ruby1.9.1: /usr/share/doc/libuuidtools-ruby1.9.1/copyright
mingw-w64-dev: /usr/i686-w64-mingw32/lib/libuuid.a
mingw-w64-dev: /usr/x86_64-w64-mingw32/lib/libuuid.a
mingw32-runtime: /usr/i586-mingw32msvc/lib/libuuid.a
pandora-build: /usr/share/aclocal/pandora_have_libuuid.m4
uuid-dev: /usr/lib/x86_64-linux-gnu/libuuid.a
uuid-dev: /usr/lib/x86_64-linux-gnu/libuuid.so
wine1.4-amd64: /usr/lib/x86_64-linux-gnu/wine/libuuid.a

I look at this list and choose uuid-dev

4c. Install the chosen package
user@localhost:~/iperf-3.0b4$ sudo apt-get install uuid-dev

5. Re-run ./configure to confirm success
If no other errors run make to build the tool.

6. user@localhost:~/iperf-3.0b4$ make
Now you can look in the src directory for iperf3 which is a compiled version you can use on the same architure of linux...enjoy the iperf tool

Here is a good site on how to use iperf basics linhost.info/2010/02/iperf-on-windows/. Note: it was written with iperf2 on Windows. Perhaps I will write a quick guide, later, regarding my primary use case for iperf, validating VPN performance.

Monday, December 10, 2012

Proper upstart script for the No-IP DNS Update Client

Updated script again, better error handling and readability. Only looked at it due to a little bit of rebuilding my HTPC which runs this tool.
#!/bin/bash
### BEGIN INIT INFO
# Provides:          noip2
# Required-Start:    networking
# Required-Stop:     networking
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: starts instance of noip2
# Description:       No-IP DUC (DNS Update Client) start stop service script
### END INIT INFO
#
# copy to /etc/init.d
# run "update-rc.d noip2 defaults" to install
# run "update-rc.d noip2 remove" to remove
#
# Version 1 by Craig Lorentzen
# Version 2 - Added LSB INIT INFO
# Version 3 - Improved error handling and readability
# Version 4 - Added status (to check if the service is running and with what PID

NAME=noip2
PATH=/usr/local/bin
DAEMON=$PATH/$NAME
PID=$(/bin/pidof -s $DAEMON)

do_start()
{
        echo "Starting $NAME."
        echo
        if [ $PID ]; then
                echo "   WARNING: $NAME is already running."
                echo
                PID=
        else
                $($DAEMON)
        fi
}

do_stop()
{
        echo "Stopping $NAME."
        echo
        if [ $PID ]; then
                kill $PID
                PID=
        else
                echo "   WARNING: $NAME is not running."
                echo
        fi
}

do_status()
{
        if [ $PID ]; then
                echo "$NAME is running as $PID"
        else
                echo "$NAME is not running"
                echo
        fi
}

case "$1" in
        start)
                do_start
        ;;
        stop)
                do_stop
        ;;
        restart)
                echo "Restarting $NAME."
                do_stop
                do_start
        ;;
        status)
                do_status
        ;;
        *)
                echo "     Usage: $NAME (start|stop|restart|status)"
                echo
                exit 1
        ;;
esac

exit 0

If you have a No-IP Dynamic DNS account, free at no-ip.com Then you likely want to use the DUC (Dynamic Update Client) to automate the process of keeping it up-to-date. No-IP provides a client for Windows, Mac, and Linux. I have an Linux host running 24x7 at my house, so I decided to try the Linux version.

http://www.no-ip.com/downloads.php?page=linux

This tool used to be in the Ubuntu repositories but has been removed, so No-IP provides the source to be compiled, however, they don't provide a good start script and do not use the upstart method to install the automatic starter. So I decided to create a proper script to follow the upstart method. I understand that this script is not following all LSB standards, however, it should do what people need after following the process that No-IP Provides to compile and install.

Thursday, November 22, 2012

Mac OS X: Disable auto iTunes load on Audio CD insertion

If any of you have been frustrated as I was by not being able to configure iTunes to ignore inserted Audio CDs I have found the solutions. What we do is configure the CD and DVD handling preferences to not load iTunes. Here is how:
Access the 'CDs & DVDs' System Preferences Page
Apple->System Preferences, CDs & DVDs
Original Screenshot:

Now select Ignore for the option when inserting an Audio CD. We can also see that we can accomplish similar changes for DVDs and Picture CDs. Hope this helps others as it helped me.

Tuesday, October 16, 2012

Latest GIMP for Ubuntu

If you are interested in keeping up-to-date with GIMP (the GNU Image Manipulation Program) on your Ubuntu install, look no further than the otto-kesselgulasch/gimp PPA (Personal Package Archive)

Process:
sudo add-apt-repository ppa:otto-kesselgulasch/gimp
sudo apt-get update
sudo apt-get install gimp
One command at a time, or add a double ampersand (&&) between each item and concatenate it onto one line.

I find GIMP to be a good professional style image manipulation program, however, it doesn't beat simple tools like IRFanView for simple resize/cropping activities. I found this PPA useful, so just posting for others.

Thursday, May 31, 2012

Mac OS X 10.7 show the Users Library

http://osxdaily.com/2011/07/04/show-library-directory-in-mac-os-x-lion/

Show User ~/Library in OS X Lion

Launch Terminal from Spotlight or Launchpad -> Utilities, and enter the following command to show or hide the directory:
chflags nohidden ~/Library/

The users Library folder will immediately become visible again. Reverting this back to the standard Lion setting is simple too:
Hide User ~/Library in OS X Lion (default setting)

This returns to the default setting of hiding the user Library directory:
chflags hidden ~/Library

Changes take effect immediately again, and Library becomes invisible to the user.

Update: temporary one-off solutions are also available for quick access to User Library in Lion

Wolfenstein: Enemy Territory Available for Windows/Mac/Linux

Mac install instructions taken from http://forums.warchestgames.com/showthread.php/14517-ET-OSX-2-60d?p=383459&viewfull=1#post383459 Tested and working for me too (MacBook Pro 15-inch, Late 2011).
-----
How to run Wolfenstein ET on OS X Lion: (Tested on Macbook Pro 2011)

1. Download (Wolfenstein Enemy Territory 2.60d)
2. Drag the Wolfenstein ET folder to your Applications folder.
3. Run the punkbuster installer.
4. In ~/Library/Application Support/ create "Wolfenstein ET" folder and therein "etmain" folder.
5. Download a punkbuster etkey
6. Put the etkey in the following location: ~/Library/Application Support/Wolfenstein ET/etmain
7. In ~/Library/Application Support/Wolfenstein ET/etmain/ create a file: "autoexec.cfg"
8. Paste the two lines of this file:

seta r_colorbits "32"
set r_allowExtensions 0

9. Run ET.

10. Set screen resolution via the following commands in the game console (press ~ after launching the game to view game console):

/r_customwidth XXXX
/r_customheight XXXX
/r_mode -1
-----

Here is the proper link to download WolfET for Any OS
http://www.splashdamage.com/content/download-wolfenstein-enemy-territory

I'll see you on the battlefield. Enjoy!!!

Monday, May 28, 2012

AppCleaner

For those who are interested in cleaning out all traces of an Apple "App" when removed from the OS.

http://www.freemacsoft.net/appcleaner/

Sunday, May 27, 2012

com.apple.quarantine

If you are like me, you may have gotten annoyed in both Windows and Mac OS X by the warning window.

Mac OS X Example Screenshot

These warnings come from a metadata source that the OS is evaluating. On Windows, Microsoft uses a NTFS feature called Alternate Data Streams. In Windows when you open the file you get a warning...You can click OK and the ADS will remain, or you can uncheck the box "Always ask before opening this file". Unchecking that box and clicking Open/Run will delete the ADS which tells Windows that this file was downloaded from a network location. For more details on the ADS associated with a file, and/or to delete the ADS check out the Sysinternals Streams tool.


In Mac OS X, Apple uses a feature called extended Attributes. You can see that a file has extended attributes via the List Long output (ls -l) and looking for the at (@) symbol.

I downloaded synergy 1.4.8 from http://synergy-foss.org/ as an example
user:~$ ls -l synergy-1.4.8-MacOSX107-x86_64.dmg
-rw-r--r--@ 1 user group 13783645 Apr 25 17:42 synergy-1.4.8-MacOSX107-x86_64.dmg
Now let's see what Extended Attributes are associated with this file.

user:~$ xattr synergy-1.4.8-MacOSX107-x86_64.dmg
com.apple.metadata:kMDItemWhereFroms
com.apple.quarantine

Note: When opening the Disk Image we do not get a warning, however, some of the attributes follow any file copied from the Disk Image. Also, new attributes are added after opening thanks to some checks performed on Mac OS X. Just Notes, I haven't looked into these other items.

I extracted the Synergy.App so that I can use it to example the filewarning

user:~$ xattr Synergy.app/
com.apple.quarantine

If you do not want to receive this warning we need to remove (delete) the Extended Attribute com.apple.quarantine

user:~$ xattr -d com.apple.quarantine Synergy.app/
user:~$ xattr Synergy.app/
#Note: No Output since the one attribute was removed.
user:~$

When I am working with a large amount of data downloaded for tech-support purposes, and I trust the source, I will tend to remove this attribute manually from the Terminal just so that I don't have any trouble with any files not opening.

user:~$ xattr -rd com.apple.quarantine folder/

I hope this helps others dealing with there Mac and improves our knowledge. Thanks to this Macworld Article as the stepping stone to my understanding of Extended Attributes.
http://www.macworld.com/article/1145324/filewarnings.html

Tuesday, May 15, 2012

Get QuickSilver

Get quicksilver
http://www.blacktree.com/

This tool is similar to the built in Spotlight but is a little different. Many people find is more efficient for them.

After installing the tool then use Control+Space to launch and type what you want.

Monday, May 07, 2012

Lock Me Now

Those who have used Windows or Linux before are probably used to the Super+L or Control+Alt+L actions to lock your screen. The utility of this is noticeable when you work in a Cube Farm and need to ensure that no one access your workstation when you are away from it.

By Default the way to Lock the screen, not very intuitive if you ask me, is to hit Control+Shift+Eject on your Mac Laptop. Now how do I map this to a USB keyboard that I use when at the office? Not possible you might say.

Solution:
There are a couple solutions I have tried. One is okay, the other is good. The Okay method, which I do not recommend can be found here
I don't recommend it because it is a little finicky and does not directly address the concern.

The good way is to use Lock Me Now (iTunes Store) it's free. After installing and running it you will find a small lock icon in the System Tray (not sure if this is the proper Apple term). Edit the Preferences to configure the key combination you want and confirm that the Application starts at boot. The only complaint I have is that the "Paus iTunes Music" Option will start iTunes, even if it is not running, so that it can Pause the nothing that is playing.

Another Option Using BetterTouchTool (Read my previous post on how to get BetterTouchTool Setup)
http://www.tech-recipes.com/rx/9930/bettertouchtool-and-mac-os-x-lock-your-mac-with-a-touchpad-gesture-keyboard-shortcut-and-more/

Thursday, May 03, 2012

Mac OS X Manage Login Applications

Log in as the user who wishes to have a login item or as an admin user.
Choose System Preferences from the Apple menu.
Choose Accounts from the View menu.
Click the name of the user.
Mac OS X 10.3.x: Click the Startup Items button.
Mac OS X 10.4 or later: Click the Login Items button.
Click the "Add {+}" button.

Wednesday, May 02, 2012

MD5 sums

Mac OS X has a really awful MD5 tool. On Linux we have the md5sum tool which outputs the following when you run it against a file

#md5sum file
8c45b25f15362fb3a74959bb7056df5f *file

On Mac we have a wrapper for openssl md5 which provides the bellow output
#md5 file
MD5 (file) = 8c45b25f15362fb3a74959bb7056df5f

On Linux I can then sort the output numerically and then very easily see what files are duplicates. I can also use the wonderful -c option to take in a file containing MD5s and file-names in the same style as the output of md5sum so that I can -c Check that the files are the same.

On Mac OS X neither of these simple and effective uses can be completed without bending over backwards with manual work or coming up with some script to do the same thing. I tried to install md5sum from ports, however, it doesn't exist there. So for now I am stuck with an inferior tool which does not accomplish my goals of using the MD5 hash to both remove duplicate files and confirm that moved files haven't been corrupted.

This Rant is brought to you by Craig

Tuesday, May 01, 2012

Installing Applications

I have seen this problem since even before I got my Mac. Most Mac OS X Applications are packaged in dmg (Disk Image) files. By opening this file the Disk Image is mounted and the contents displayed in Finder. At this point I see some users double-click the Application and run it from there. They then keep this App icon in the Dock. When they do this, everytime they open the App it re-mounts the dmg and runs. This is an incorrect way to install your App and could easily cause problems when you clean up your Downloads folder.

Instead follow these steps
1. Mount the dmg (Open it)
2. Click and drag the App to the Applications folder (or any folder you wish to "Install to")
Mac OS X Apps are pretty cool in that they are a single file containing all needed libraries.
It is an archive that you can even navigate it, not that it is very useful, but you can by right clicking (Secondary Click in Apple lingo) and select "Show Package Contents".
3. Run the App from the folder that you installed it to. Add to Dock if you like.
Use the Finder to confirm that all Disk Images are un-mounted (click the Eject Icon) and then run the App again to confirm you accomplished the above steps and no longer have the OS doing double duty to run the App.

Just a quick tutorial, I hope it helps noobs get used to their Mac.

Monday, April 30, 2012

Get BetterTouchTool

Click here for the home of BetterTouchTool (Direct Download).

BetterTouchTool

Is necessary if you want to make Mac OS X work with the keyboard like Windows 7 and many Linux window managers.

By default after installing BetterTouchTool it will start at login so it should be always available unless you quit it.  I need BetterTouchTool to provide Windows 7 like (actually better than) window snapping. So that when you pull a window to the edge of the screen it automatically makes that window take up a known section of the screen. I generally use Left and Right side (50%) of the screen so that I can work on two things at once.

To enable Window Snapping, first you must enable the Advanced view in BetterTouchTool (BetterTouchTool options are opened via the Control+Alt+Super+O keyboard shortcut). When Advanced in enabled you wil have Gestres, General Settings, and Action Settings. Select the Action Settings tab and check the box for "Window Snapping Enabled" if I remember correctly all of the while dragging options are enabled by default when you enable Window Snapping.

Many Mac OS X users will be happy with this as they may tend to like using a mouse. For me, however, I must be able to do a lot of this without removing my hand from the keyboard.  To add "Gestures" to BetterTouchTool do the following

  1. Select the input device you wish to use for the Gesture
  2. On the bottom right select the action you wish to accomplish (Maximize Window Left)
  3. Click in the Shortcut area, use the input device to record the geture which will affect the action. (Control +Super+Left)
Example from top line of my keyboard shortcuts below.

Keyboard Shortcuts:
Shortcut Action / Shortcut
⌘⌃←
Maximize Window Left
⌥⌃←
Move Window to Next Monitor
⌥⌃→
Move Window to Next Monitor
⌘⌃↓
Restore old window size
⌘⌃↑
Maximize Window
⌘⌥⌃O
Show BTT Preferences
⌘⌃→
Maximize Window Right

Normal Mouse Buttons: Global
Modifiers Gesture Action / Shortcut Notes
(null)
Button 3
⌘[
Back
(null)
Button 4
⌘]
Forward

Happy BetterTouchTool tweaking.

Sunday, April 29, 2012

Home/End

In every OS I have worked with Home/End takes me to the Begging/End of a LINE. In Mac OS X to be different they made it be the Beginning and End of the page.

Control+A/Control+E like in the Terminal can sometimes work instead, however it is not fool-proof and can create a very frustrating environment where you either have to hold the Arrow for an eternity or use your mouse. And like most Linux users I have grown to ignore the mouse for most work.


Update: Linux/Windows Home/End functionality with full support in all text applications is Super+Left/Super+Right. Also, Mac OS X Home/End can be reproduced with Super+Up/Super+Down.

Just learned this today and thought I would share it.

Saturday, April 28, 2012

Enable SSH Access to your Mac

The Apple Mac OS X operating system has SSH installed by default but the SSH daemon is not enabled. This means you can’t login remotely or do remote copies until you enable it.

To enable SSH Access on your mac do the following:
1. Open the 'System Preferences' Tool
2. Open the 'Sharing' preferences tool which can be seen under the‘Internet & Networking’ header
3. Select the checkbox next to 'Remote Login'In the list that appears, check the ‘Remote Login’ option.

This starts the SSH daemon immediately and you can remotely login using your username. The ‘Sharing’ window shows, at the bottom, the name and IP address to user.  From the Shell you can determine your username using 'whoami' and you can confirm your IP Address with the 'ifconfig' tool.

Friday, April 27, 2012

Got Caffeine?

Caffeine is an invaluable tool for doing presentations with a Mac OS X based system Caffeine. Installable via the App Store.

Use Caffeine to disable the Mac from going to sleep or from displaying the screensaver, as needed. Don't keep running back to your Mac to hit a key or unlock from the screensaver.

Thursday, April 26, 2012

"Natural Scrolling"

By Default Mac OS X 10.7 uses "Natural Scrolling. E.g. pulling down on your trackpad (touchpad) pulls the page down (scrolls Up) and pushing up pushes the page up (Scrolls Down). Much like your fingers are manipulating an object on the screen.

For me, this works on iOS devices (iPad/iPhone/iPod) because there is no disconnect between my fingers and the display. However, on a Macbook my fingers are disconnected from the page I am viewing, so when I scroll down I expect the page to Scroll down as well.

To change this behavior
1. Open your System Preferences Panel
2. Select the Trackpad option
3. Select the Scroll & Zoom Tab
4. Uncheck the top box, "Scroll direction: natural"
This change makes the scroll work like all other laptop/desktop OSes.




Wednesday, April 25, 2012

Cut/Copy/Paste

Another example of Apple being different just for the sake of it is in the Super key overload of the Cut, Copy, and Paste operations.

In every other OS we Cut/Copy/Paste in the same way.
Control+X, Control+C, and Control+V

Apple certainly couldn't follow this standard, so instead when we switch between a Mac OS system and Windows/Linux we need to use Super+X, Super+C, Super+V (Super is also known as the Command key on Mac OS (the strange flower) and the Windows Key on most other keyboards).

This difference can be rather distracting and increases the time taken for many users to be able to efficiently use the Mac. Context switching is an expensive operation for users and so is the different contortions your fingers need to make to use this differences.

Finder:
While we are talking about Cut/Copy/Paste, let's talk about the Finder App. Like Windows Explorer or Nautilus in Gnome, this is your file system management Application. Copy/Paste work as normal, however the ability to Cut is disabled. Why is this? Am I not able to move a file in the Apple File System? No on the contrary I can, however, I must use my Mouse to drag the file to a new folder. So again Mac is too focused on using the mouse and that is an expensive operation for me to take my hands off of the keyboard just to move a file.

Alternatively, use the Terminal and the *nix 'mv' command. Should be more efficient for power users. But why Apple, why must you force the use of a mouse on us? The mouse was a great innovation, however, being able to accomplish most things via the keyboard is still more efficient.



---More Apple Rants comming over the the next week or so.

Tuesday, April 24, 2012

New Mac OS X 10.7 Laptop

Hello Readers,

I recently refreshed my work laptop from a Lenovo W500 running Ubuntu to a Macbook Pro running Mac OS X 10.7. As I make my transition expect useful tips and rants regarding how Mac OS X doesn't work the same way as any other OS I have dealt with previously.

Tip #1: Opening Files
In all OSes I have worked with previously, Windows, Linux, Unix...hitting Enter after selecting a file opens it with the default application.
Apple decided that conforming to decades of common practice (Enter opens a file) they have modified this behavior to overload the Super key even further than they already have.
To open a File/Application in OS X highlight it and then hit the keyboard combination Super + Down Arrow. Or you can Double Click like on all other OSes, except that many of us Linux users prefer to keep our hands on the keyboard and ignore the Mouse for most tasks.

More to come.

Friday, February 10, 2012

Gnome-Shell Multimonitor support oddity

If anyone has used Gnome-shell with a second monitor you may have run into an unexpected behavior. The secondary monitor, with a laptop the likely more expensive much better monitor, is statically stuck to the first workspace. It does not follow workspace switching rules like we are all used to in prior gnome releases, and KDE and LXDE and XFCE and all other Desktop Environments I have used. Instead it seems one developer feels that the normal use case for a secondary monitor is to display something static and that it should not follow the rest of the users activity.

http://blogs.gnome.org/alexl/2011/03/22/multimonitor-support-in-gnome-shell/
In most typical cases the external monitor is used to show something static, like always visible information, a presentation on a projector, or a movie on a TV.

I very much disagree with this assessment. The only way I can work effectively in my job is to have the extra space and be able to segment tasks and applications on different workspaces and be able to know that when a switch to a workspace that the entire desktop is how I last left it on that workspace.

Anyways, thanks to a comment in the discussion for this post we have a fix.
http://blogs.gnome.org/alexl/2011/03/22/multimonitor-support-in-gnome-shell/comment-page-1/#comment-1374
Ok guys, here a hint to deactivate the stickyness of the secondary monitor (works for me on natty):

* start gconf-editor
* open /desktop/gnome/shell/windows
* deactivate workspaces_only_on_primary


Unfortunately gnome-shell is still rather unusable for getting work done. I use XFCE as my primary Desktop Environment now...but still install gedit and nautilus because they are better tools than the XFCE alternatives.

Install Java 6 on Ubuntu 11.10

As most people have noticed Canonical is no longer providing the Sun Java Plugin via the Partner repository. It is said this is due to a licensing issue. Anyways, if you want to install and replace OpenJDK on Ubuntu 11.10 please follow the method here (http://www.duinsoft.nl/packages.php)

I find it to be the best way to be up-to-date with Sun Java6.



Previously posted method redacted, but kept for historical purposes.

sudo add-apt-repository ppa:ferramroberto/java
sudo apt-get update
sudo apt-get install sun-java6-jre sun-java6-plugin sun-java6-fonts


You probably also want to remove the existing openJDK and icedtea as well. You can do that with the following command

sudo apt-get remove icedtea-* openjdk-*
-Thanks for the heads-up Derek
I don't remember the exact ones which were installed, however, the above will certainly remove all of them.


EDIT: Note, a newer and better way is available see top of post.

Wednesday, January 18, 2012

Awesome Quick and Easy FTP Server (Anonymous)

Check out this guys post. Very nice
http://www.g-loaded.eu/2008/12/02/set-up-an-anonymous-ftp-server-with-vsftpd-in-less-than-a-minute/

Thursday, January 12, 2012

XBMC Stable (Darhma) For Ubuntu 11.10

Ubuntu 11.10 - Oneiric Ocelot

XBMC 10.1 can be installed from the stable repository provided by XBMC Nathan Rennie-Waldock on Ubuntu 11.10 "Oneiric Ocelot"

sudo apt-add-repository ppa:nathan-renniewaldock/xbmc-old-stable
sudo apt-get update
sudo apt-get install xbmc

Google Translated from
http://www.loggn.de/ubuntu-xbmc-repository-10-1-dharma-und-11-0-pre-mit-und-ohne-pvr/
text reworked by me.

UPDATE: It looks like the PPA is now updated to Eden. Unfortunately Eden has been somewhat unstable for me.

UODATE2: Updated the PPA to the "old stable" for Dharma.