OPW – Forking and Creating a New Branch in Git and GitHub

This week, we are working on getting familiarized with Git and GitHub, and writing up some more detailed documentation to facilitate future deployments of TidePools. I am a complete n00b to Git and GitHub, so here are a few of my notes about them to help me keep things straight. I’m posting them here in the hopes that they may be useful to others, as well.

The TidePools code was recently moved here:

https://github.com/opentechinstitute/TidePools

I was added to the organization as a team member and given permissions to push and pull. I was told that the preferred way to contribute for this project is to add branches, which will then be reviewed before being merged. I didn’t know where to start, and while GitHub’s tutorials are pretty good, I had to read between the lines to figure out how to set up proper branching. Below are the steps I used. I tested functionality by making small modifications to the README file and then checking whether the changes were reflected on GitHub.

The first step was to log in to the GitHub site, go to the TidePools repository on OTI (linked above), click the Fork button at the top, and tell it to fork to g33kgrrl. That creates a copy of the code in my GitHub repositories. Then I make a copy of the forked repository on my local machine:

g33kgrrl@saturn:~/TidePools$ mkdir fork
g33kgrrl@saturn:~/TidePools$ cd fork
g33kgrrl@saturn:~/TidePools/fork$ git clone https://github.com/g33kgrrl/TidePools.git
Cloning into TidePools...
remote: Counting objects: 1788, done.
remote: Compressing objects: 100% (1734/1734), done.
remote: Total 1788 (delta 63), reused 1778 (delta 53)
Receiving objects: 100% (1788/1788), 50.49 MiB | 280 KiB/s, done.
Resolving deltas: 100% (63/63), done.
g33kgrrl@saturn:~/TidePools/fork$ cd TidePools

Continue reading

Advertisements

Disable tapping and scrolling on a Synaptics touchpad

If you have a laptop and run GNU/Linux, you’ll frequently find that certain settings are enabled by default for your built-in touchpad… ones that will either strike you as a wonderful convenience, or drive you up the wall.

“Tapping,” if you’re not familiar with the term, means the computer registers a click on the left mouse button if you tap the touchpad with your finger.  Unfortunately, this touchpad is almost always far too sensitive, which translates into many accidental “clicks” if you don’t move your finger with a feather touch.  (In case you can’t tell by now, I wish they’d disable tapping by default.)

“Scrolling” encompasses 3 types of scrolling:

  • Vertical scrolling means a strip along the right side of the touchpad is used as if it was a scroll wheel.  If there is room to scroll in the existing window, you move your finger up and down along the right-side edge of the pad and the window will scroll up or down accordingly.  This is enabled by default.
  • Horizontal scrolling means a strip along the bottom edge of the touchpad is used like a horizontal scroll wheel.  Again, if there’s room to scroll side to side in the existing window, you move your finger left and right along the bottom edge of the pad and the window will scroll left and right.  This is enabled by default.
  • Circular scrolling will be familiar to many users of mp3 players.  Making a circular motion acts as a scroll wheel.  Clockwise scrolls down, counterclockwise scrolls up.  This must be manually enabled.

Again, these are all features I’d rather disable.  The areas of the touchpad for vertical and horizontal scrolling are designated by invisible lines (whose location can be adjusted), and if you accidentally cross them you’ll be doing a lot of accidental scrolling.

Continue reading

Forcing krfb to disable the background image

The krfb application is used when you want to allow someone to connect to and/or take control of your computer using a VNC client. One thing that can really slow things down is when krfb insists on sending the background image, also called wallpaper. This slows down the connection with gobs of needless extra data from drawing and redrawing the wallpaper every time you open, close, or move a window. It can slow things down to a crawl while the person helping you waits and waits for your screen to refresh in their VNC client so they can see what your system is doing.

This might be a simple matter to fix, if your version of krfb includes a menu option on the Session tab to Always disable background image. But if it doesn’t, as is the case with krfb in openSUSE 11.1, what do you do?

Well, you can manually edit a file called krfbrc , most likely in your ~/.kde/share/config directory.  That is, the absolute path will probably be /home/yourusernamehere/.kde/share/config/krfbrc.  Make sure krfb is closed, then open this krfbrc file with your favourite text editor and add the following line:

disableBackground=true

Save and you’re through! When you launch krfb, it should now start and make a connection without wasting valuable bandwidth on sending the wallpaper over and over again..

Ω

Getting MPlayer to stop stuttering

I recently found a website that plays, for free, the French In Action videos used in my college French courses.  In combination with this other website which plays the audio exercises #1-26 #27-52 from the same series (also for free), it’s an excellent way to learn French.  However, the catch on the audio site seems to be that you have to install Internet Explorer and possibly Windows Media Player – yes, this can be done in GNU/Linux, but that’s another tutorial for another day – and they’re not free software so I avoid them anyway.

Unfortunately, MPlayer stopped and started so badly on my other half’s openSUSE 11.1 system that the videos were impossible to watch.  I don’t remember MPlayer ever being so problematic this way in the past, so I assume something new somewhere has gummed up the works.  Here’s what I did to get it to behave.  Videos take a little longer to start playing because of the extra buffering, but the stuttering is gone.

First, even though setting it to use ALSA audio has worked fine in the past, it doesn’t seem to in this case.  Open MPlayer, right-click in the playback window, and select Preferences from the context menu.

MPlayer preferences

MPlayer preferences

Next, click OK on the little reminder that pops up.  On the Audio tab, select “oss  OSS/ioctl audio output.”

MPlayer oss audio

MPlayer oss audio

Continue reading

Using special characters in GNU/Linux

If you speak a romance language, work with formulas, or deal with currencies other than the dollar, just for a few examples, it’s convenient to be able to type special characters:

à la mode
Joyeux Nöel
€100 = ¥11839
registered® trademark™ ©copyright
30° C
x³(x²) = x⁵
H₂SO₄ sulfuric acid
100 µF capacitor

One simple way to do this is to set a Compose key, that is, a key that designates the next two keystrokes as code for a special character.

You’ll need to open kcontrol, also known as KDE Control Panel.  To do this in KDE 3.5.9 or 3.5.10, go to K menu ->  Control Center.

Expand the Regional and Accessibility category.  Go to Keyboard Layout and click the Xkb tab.  Scroll down until you see Compose Key Position.

Compose key position

Compose key position

Continue reading

Getting Thunderbird to open links in Firefox, not Konqueror

There seems to be some inconsistency of the preconfiguration of Thunderbird between distros, which becomes apparent to distro-hoppers like me.  That is, some of them  automagically open Firefox when you click on a link from your e-mail, and others open something else.  In the case of using KDE, this is usually Konqueror.  I wouldn’t mind this, but there are two factors that in my mind make Konqueror the lesser product.  Konqueror doesn’t properly handle some multimedia, and more importantly, it doesn’t display a page until almost all the images are loaded.  This latter feature contrasts with Firefox, which seems to place a priority on displaying the text as soon as possible and filling in images as they come in… all the sooner I can stop twiddling my thumbs and start reading.  (In case you’re wondering, yes I do have broadband – I’m just impatient.)  I say why wait for the cosmetic stuff when I can start reading now?

There are other ways to do this, but this is my favourite.  All you have to do is make the changes and restart Thunderbird.

Steps 1 & 2 are optional, since most of the time the path to Firefox will be

/usr/bin/firefox

but this unfortunately can vary from distro to distro.  So in the unlikely event that this process doesn’t work the first time, try again including these steps.

1.  Open a Terminal window by going to to K menu -> System -> Konsole

2.  In the Terminal, type

which firefox

This will tell you the path to Firefox, since it can vary from distro to distro.

g33kgrrl@home ~ $ which firefox
/usr/bin/firefox
g33kgrrl@home ~ $

in this illustration it’s the usual path.

Continue reading

Getting AVG update to cooperate

EDIT:  I am no longer recommending AVG for GNU/Linux, for 3 important reasons.

First, Grisoft – the company that develops AVG – has discontinued the graphical user interface (GUI) for their newest GNU/Linux version (8.5, as of this writing).  For GNU/Linux newbies, this means no more pointing and clicking to use your antivirus program – it’s all done at the command prompt.  So this essentially eliminates most newbie usage – and newbies are the ones who need the most protection, since they’re not as savvy about keeping systems free of viruses.  I think this makes AVG nearly useless for many GNU/Linux users, and that Grisoft is exceedingly lame for doing it.  This is made even lamer by the fact that they have simultaneously expanded their services for their Windows version.  Industrial strength mega-lame.

Second, the above boneheaded move will surely mean the demise of AVG for GNU/Linux.  The cynic in me suspects that’s precisely what it was designed to do, so they can bow out of GNU/Linux development with a half-assed excuse.

The third reason is the reason behind the second.  If AVG had been free/libre software – that is, free as in freedom – other developers in the community would be free to look at the source code and develop a GUI (or any other desired features) for it, regardless of what Grisoft decided to do.  As it stands, because AVG is proprietary (closed-source) software, when Grisoft decides to abandon it no one else can pick up where they left off.  What good is freeware (software that doesn’t cost money) if you are always at the mercy of the company that developed it?

Since writing this tutorial, I’ve become much more aware of issues surrounding software freedom.  I’ve left it here because the reasons I cited for needing an antivirus on GNU/Linux are still as valid as ever.  I now recommend clamav antivirus, with either klamav or clamtk to provide a graphical interface.  They’re all free/libre software licensed under the GNU GPL, and they’re usually easily installed through your GNU/Linux distribution’s package manager.  I haven’t test-driven the clamtk GUI, but the klamav GUI is very similar to the one you would see in AVG’s GUI – if it still had one.  Ω

Now, I know what you may be thinking… If I’m running GNU/Linux why do I need an antivirus program?  Isn’t that a Windows thing?

But the fact of the matter is that no operating system is 100% safe from viruses.  Just because GNU/Linux is more secure in general, and less people use it so it’s less of a hacker target than Windows, does not mean you don’t need to worry about it.  Moreover, just because you’re not susceptible to Windows viruses yourself doesn’t mean you can’t still pass them from one Windows user to another as you e-mail and share files with others.  The buck should stop with you.  After all, you don’t want to be the Typhoid Mary of the computing world, do you?  🙂

AVG is a popular, user-friendly, and free (as in beer) antivirus program that can be used on GNU/Linux or Windows.  I highly recommend it.  It’s easy to install, configure, and keep updated.  If you want to get it there is a link in the sidebar.

Now, a commonly reported problem when running AVG antivirus in GNU/Linux is that it opens, but when you click Update to get the latest virus definitions, it stops with an error message: “Sorry you do have permission to execute AVG update.”

I used to remedy this in KDE by right clicking the menu button, opening the Menu Editor, finding the application in the list, going to the Advanced tab, clicking Run as a different user, and typing in root as the username.  Then when you go to run AVG it will prompt you for the root password before starting and complete the update no problem.  But there is a more elegant solution.

AVG creates a user named avg and also a group named avg .  If you add your username to the group avg , then log out and log back in, the changes will take effect and you’ll be able to run the AVG update without trouble.

If you want to do this from the command line, you can type this as root:
usermod -A avg yourloginname
or for you Ubuntu/Kubuntu/Mint users:
sudo usermod -A avg yourloginname
In openSUSE 11.1 it can be done through the GUI by opening System -> Configuration -> Yast , then go to Security and Users, and User and Group Management.  Select your username, click Edit, go to the Details tab, and put a check next to avg and click Ok and Ok.  Other GNU/Linux distributions will keep the settings in whatever control panel they have implemented, but the idea is the same.  Find the user and groups settings and add yourself to the avg group.

See why I prefer the command line?  🙂

Now don’t forget you’ll need to log out and then back in and you’re all set.

Ω