Archive

Archive for the ‘Guinea Pigs’ Category

Blast from the Past: Getting KDE on openSUSE is like playing Jenga

February 2nd, 2017 No comments

This post was originally published on October 16, 2009. The original can be found here.


As part of our experiment, everyone is required to try a different desktop manager for two weeks. I chose KDE, since I’ve been using GNOME since I installed openSUSE. However, I’ve found that while trying to get a desktop manager set up one wrong move can cause everything to fall apart.

Switching from GNOME:

This was fairly simple. I started up YaST Software Management, changed my filter from “Search” to “Patterns”, and found the Graphical Environments section. Here I right clicked “KDE Base System”, and selected install. Clicking accept installed the kdebase and kdm packages, with a slew of other KDE default programs. Once this was done, I logged out of my GNOME session, and selected KDE4 as my new login session. My system was slightly confused and booted into GNOME again, so I restarted. This time, I was met with KDE 4.1.

My Thoughts on KDE 4.1:

As much as I had hated the qt look [which I erronously call the ‘quicktime’ look, due to its uncanny similarity to the quicktime app], the desktop was beautiful. The default panel was a very slick, glossy black, which looked quite nice. The “lines” in each window title made the windowing system very ugly, so I set out to turn them off. Its a fairly easy process:

KDE Application Launcher > Configure Desktop > Appearance > Windows > Uncheck the “Show stripes next to the title” box.

Once completed, my windows were simple and effective, and slightly less chunky than the default GNOME theme, so I was content.

Getting rid of the openSUSE Branding:

openSUSE usually draws much ire from me – so its not hard to imagine that I’d prefer not to have openSUSE branding on every god damn application I run, least of all my Desktop Manager. From YaST Software Management I searched for openSUSE and uninstalled every package that had the words “openSUSE” and “branding”. YaST automatically replaces these packages with alternate “upstream” packages, which seem to be the non-openSUSE themes/appearances. Once these were gone, things looked a lot less gray-and-green, and I was happy.

Oh god what happened to my login screen:

A side effect of removing all those openSUSE packages my login screen took a trip back in time, to the Windows 3.1 era. It was a white window on a  blue background with Times New Roman-esque font. After a bit of researching on the GOOG, I found out that this was KDE3 stepping up to take over for my openSUSE branding. Uninstalling the package kde3base or whatever the shit it’s called forced KDE4 to take over, and everything was peachy again.

Installing my Broadcom Wirless Driver

In order to install my driver, I followed this guide TO THE LETTER. Not following this guide actually gave YaST a heart attack and created code conflicts.

KMix Being Weird

KMix magically made my media buttons on my laptop work, however it occasionally decided to change what “audio device” the default slider was controlling. Still, having the media buttons working was a HUGE plus.

Getting Compositing to Work

I did not have a good experience with this. Infact, by fucking around with settings, I ended up bricking my openSUSE install entirely. So alas, I ended up completely re-installing openSUSE. Regardless, to install ATI drivers, follow the guide here using the one-click install method worked perfectly. After finally getting my drivers, turning on compositing was simple:

KDE Application Launcher > Configure Desktop > Appearance > Desktop > Check the “Enable Desktop Effects” box.

From KDE4.1 to KDE4.3

While KDE was really working for me, the notifications system was seriously annoying. Every time my system had an update, or a received a message in Kopete  an ugly, plain, slightly off center, gray box would appear at the top of my screen to inform me. Tyler informed me that this was caused by the fact that I wasn’t running the most recent version of KDE4. A quick check showed me that openSUSE isn’t going to use KDE4.3 until openSUSE 11.2 launches, however you can manually add the KDE 4.3 repositories to YaST, as shown on the openSUSE KDE Repository page.

After adding these repositories, I learned a painful lesson in upgrading your display manager. Do not, under any circumstances, attempt a Display Manager upgrade/switch untill you have an hour to spare,  and enough battery life to last the whole time. I did not, and even though I cancelled the install about 60 seconds in, I found that YaST had already uninstalled my display manager. Upon restart, I was met with a terminal.

From the terminal, I used the command line version of YaST to completely remove kdebase4 and kdm from my system. After that, re-installing the KDE4.3 verison of  kdm from YaST in the terminal installed all the other required applications. However, there are a shitload of dependency issues you gotta sort through and unfortunately the required action is not the same for each application.

KDE4.3

KDE4.3 is absolutely gorgeous, I’ve had no complaints with it. KMix seems to have reassigned itself again, but it assigned itself correctly. Removing the openSUSE branding was the same, but by default the desktop theme used is Air. I prefer the darker look of Oxygen, so I headed over to my desktop to fix it by following these steps:

Desktop > Right Click > Plain Desktop Settings > Change the Desktop Theme from Air to Oxygen.

Concluding Thoughts

Now that all these things are sorted out, I’m surprisingly impressed with KDE, and I might even keep it at the end of this test period for our podcast.

Let me know if you’ve ever had to change desktop managers and your woes in the comments!

get rid of that openSUSE shit:

KDE4.1
uninstall openSUSE branding, except the KDM one maybe?

uninstall kde3base or whatever the shit it’s called. this makes stuff wicked.

KDE4.3
This might have all been unessecary. since installing KDE4.3, I did it all again to no avail. Rightclick desktop, plain desktop settings, theme: oxygen. Then hooray its fine?

Blast from the Past: The Search Begins

January 26th, 2017 No comments

This post was originally published on July 29, 2009. The original can be found here.


100% fat free

Picking a flavour of Linux is like picking what you want to eat for dinner; sure some items may taste better than others but in the end you’re still full. At least I hope, the satisfied part still remains to be seen.

Where to begin?

A quick search of Wikipedia reveals that the sheer number of Linux distributions, and thus choices, can be very overwhelming. Thankfully because of my past experience with Ubuntu I can at least remove it and it’s immediate variants, Kubuntu and Xubuntu, from this list of potential candidates. That should only leave me with… well that hardly narrowed it down at all!

Seriously... the number of possible choices is a bit ridiculous

Seriously… the number of possible choices is a bit ridiculous

Learning from others’ experience

My next thought was to use the Internet for what it was designed to do: letting other people do your work for you! To start Wikipedia has a list of popular distributions. I figured if these distributions have somehow managed to make a name for themselves, among all of the possibilities, there must be a reason for that. Removing the direct Ubuntu variants, the site lists these as Arch Linux, CentOS, Debian, Fedora, Gentoo, gOS, Knoppix, Linux Mint, Mandriva, MontaVista Linux, OpenGEU, openSUSE, Oracle Enterprise Linux, Pardus, PCLinuxOS, Red Hat Enterprise Linux, Sabayon Linux, Slackware and, finally, Slax.

Doing a both a Google and a Bing search for “linux distributions” I found a number of additional websites that seem as though they might prove to be very useful. All of these websites aim to provide information about the various distributions or help point you in the direction of the one that’s right for you.

Only the start

Things are just getting started. There is plenty more research to do as I compare and narrow down the distributions until I finally arrive at the one that I will install come September 1st. Hopefully I can wrap my head around things by then.

Ripping DVDs on Ubuntu 14.04

January 24th, 2017 No comments

Remember DVDs? For those of you too young to have had to deal with the hassle of physical media, DVDs were how us old folks got all of our movies and TV seasons before Netflix existed. These days, I’ve got boxes of the things gathering dust in closets. I hadn’t thought about them since the last time I moved until last night, when my wife asked if I could make her Yoga DVDs available on our home Plex server.

I mean… yes? Sure, why not? Can’t be too hard right? Now all I need is a computer with a DVD drive…

After realizing that one of our laptops still has the appropriate hole in the side of it, I slid one of her disks into the slot, and listened while the machine made all sorts of noises and did… nothing at all.

At first, I thought maybe the drive was broken. So I dug through a drawer to find an old CD (another ancient fossil of a format, kids), and confirmed that the drive did, in fact, work. Physical capability confirmed, I figured that I might be running up against some kind of format issue, and did some Googling.

My cursory research turned up a helpful  page in the Ubuntu Documentation that provides instructions for installing the libdvdread4 package, which includes a set of libraries that allow Ubuntu machines to read DVDs. For Ubuntu 14.04, the instructions look something like this:

~$ sudo apt-get install libdvdread4
~$ sudo /usr/share/doc/libdvdread4/install-css.sh

After this, I had to restart my computer. I’m not sure why, but assumed that it had something to do with the fact that hardware is involved. Once it came back from its brief nap, it happily mounted the DVD that I had left in the drive.

The next step was to install Handbrake from the Ubuntu Software Centre. This is a handy little utility with a tropical-themed logo that can convert damned near any video format to nearly any other. I’ve used it in the past to shrinkify video for playback on my iPhone with great success.

If you open up Handbrake and use the Source button to choose your DVD, it will scan the disc, find the titles available, and show ’em in a dropdown box. Simply select the one that you want to rip, give it a reasonable file name, choose where to put the file on your machine, select High Profile from the presets box on the right hand side of the window, and press the big Start button up at the top.

If yoga were this easy, I’d be exercising instead of writing this article

Pleased with my progress, I returned to my wife, told her that I had made her yoga DVDs available, and asked when she was going to start sporting abs as tight as Jillian Michael’s. She was not impressed. You can’t win them all.

Categories: Jon F, Ubuntu Tags: ,

Blast from the Past: Installing Gnome Do with Docky on openSUSE

January 19th, 2017 No comments

This post was originally published on September 28, 2009. The original can be found here.


Before I switched to Windows 7 for my laptop, I used a a dock software called RocketDock to manage my windows and commonly used desktop shortcuts. I liked being able to see my whole desktop ever since I found a good wallpaper site. Back when I rolled Ubuntu, I installed this application called Gnome Do. It’s a Quicksilver like program that just works. However, the newest feature of Gnome Do that I loved was its Docky theme. It puts a dock similar to RocketDock on the bottom of your screen, and integrates it’s OS searching features right into the dock.

I decided to install the application from YaST, the default system administration tool. It indexes a fairly large number of repositories, and it did have Gnome Do. A few minutes later I had the app running, but unfortunately the version was way out of date. Gnome Do is on roughly version 0.8.x, and YaST gave me 0.4.x.

So off I went trying to find a .rpm for Gnome Do that would install. I was met with a lot of failure, with a ton of dependencies unable to be resolved and so on. Next I tried the openSUSE file from Gnome Do’s homepage, but for some reason the servers were down and I was unable to install that way either.

Frustrated and not knowing what to do next, I decided to hop on IRC and see if anyone in #SUSE on irc.freenode.net could help me out. They told me about this service called Webpin. There I found a .ymp [which is an openSUSE specific installer file like a .deb or .rpm] for Gnome Do, and a ymp for Gnome Do’s plugins. Downloading and opening the files installed the programs without any problems. The last step I had to take to enable Docky was to install compiz and enable desktop compositing. After that, a quick trip to Gnome Do’s preference dialog allowed me to use the Docky theme, and I was up and running!

Blast from the Past: The Distributions of Debian

January 12th, 2017 No comments

This post was originally published on August 21, 2009. The original can be found here.


Like many of the other varieties of Linux, Debian gives the end user a number of different installation choices. In addition to the choice of installer that Tyler B has already mentioned, the Debian community maintains three different distributions, which means that even though I’ve picked a distribution, I still haven’t picked a distribution! In the case of Debian, these distributions are as follows:

  1. Stable: Last updated on July 27th, 2009, this was the last major Debian release, codenamed “Lenny.” This is the currently supported version of Debian, and receives security patches from the community as they are developed, but no new features. The upside of this feature freeze is that the code is stable and almost bug free, with the downside that the software it contains is somewhat dated.
  2. Testing: Codenamed “Squeeze,” this distribution contains code that is destined for the next major release of Debian. Code is kept in the Testing distribution as long as it doesn’t contain any major bugs that might prevent a proper release (This system is explained here). The upside of running this distribution is that your system always has all of the newest (and mostly) bug free code available to users. The downside is that if a major bug is found, the fix for that bug may be obliged to spend a good deal of time in the Unstable distribution before it is considered stable enough to move over to Testing. As a result, your computer could be left with broken code for weeks on end. Further, this distribution doesn’t get security patches as fast as Stable, which poses a potential danger to the inexperienced user.
  3. Unstable: Nicknamed Sid after the psychotic next door neighbour in Toy Story who destroys toys as a hobby, this is where all of Debian’s newest and potentially buggy code lives. According to what I’ve read, Sid is like a developer’s build – new users who don’t know their way around the system don’t generally use this distribution because the build could break at any time, and there is absolutely no security support.

I’m currently leaning towards running the Testing distribution, mostly because I like new shiny toys, and (I think) want the challenge of becoming a part of the Debian community. Since we’ve been getting a lot of support from the various development communities lately, perhaps some of our readers could set me straight on any information that I might have missed, and perhaps set me straight on which distribution I should run.

KWLUG: Vigrant (2017-01)

January 11th, 2017 No comments

This is a podcast presentation from the Kitchener Waterloo Linux Users Group on the topic of Vigrant published on January 9th 2017. You can find the original Kitchener Waterloo Linux Users Group post here.

Read more…

Categories: Linux, Podcast, Tyler B Tags: ,

Shove ads in your pi-hole!

January 8th, 2017 No comments

There are loads of neat little projects out there for your Raspberry Pi from random little hacks all the way up to full scale home automation and more. In the past I’ve written about RetroPie (which is an awesome project that you should definitely check out!) but this time I’m going to take a moment to mention another really cool project: pi-hole.

Pi-hole, as their website says, is “a black hole for Internet advertisements.” Essentially it’s software that you install on your Raspberry Pi (or other Linux computer) that then acts as a local DNS proxy. Once it is setup and running you can point your devices to it individually or just tell your router to use that instead (which then applies to everything on the network).

Then as you’re browsing the internet and come across a webpage that is trying to serve you ads, pi-hole will simply block the DNS request for the ad from really resolving and instead return a blank image or web page meaning that the site simply can’t download the ad to show you. Voila! Universal ad blocker for your entire network and all of your devices! Even better – because you’re blocking the ads from being downloaded in the first place your browsing speeds can sometimes be improved as well.

Pi-hole dashboard

You can monitor or control which domains are blocked all from a really nice dashboard interface and see the queries come into pi-hole almost in real time.

After running pi-hole for a week now I’m quite surprised with how effective it has really been with removing ads. It’s legitimately pleasant being able to browse the web without seeing ads everywhere or having ad blockers break certain websites. If that sounds like something you too might be interested in then pi-hole might be worth taking a look.


This post originally appeared on my personal website here.

Blast from the Past: Of filesystems and partitions

January 5th, 2017 No comments

This post was originally published on August 25, 2009. The original can be found here.


Following from my last post about finalizing all of those small little choices I will now continue along that line but discuss the merits of the various filesystems that Linux allows me to choose from, as well as discuss how I am going to partition my drive.

Filesystem?

For a Windows or Mac user the filesystem is something they will probably never think about in their daily computing adventures. That is mostly because there really isn’t a choice in the matter. As a Windows user the only time I actually have to worry about the filesystem is when I’m formatting a USB drive. For my hard drives the choices are NTFS, NTFS, and.. oh yeah NTFS. My earliest recollection of what a filesystem is happened when my Windows 98 machine had crashed and I had to wait while the machine forced a filesystem check on the next start up. More recently FAT32 has gotten in my way with it’s 4GB file size limitation.

You mean we get a choice?

Linux seems to be all about choice so why would it be surprising that you don’t get to pick your own filesystem? The main contenders for this choice are ext2, ext3, ext4, ReiserFS, JFS, XFS, Btrfs and in special places Fat16, Fat32, NTFS, and swap.

Ext2

According to the great internet bible, ext2 stands for the second extended filesystem. It was designed as a practical replacement for the original, but very old, Linux filesystem. If I may make an analogy for Windows users, ext2 seems to be the Linux equivalent to Fat32, only much better. This filesystem is now considered mostly outdated and only really still used in places where journaling is not always appropriate; for example on USB drives. Ext2 can be used on the /boot partition and is supported by GRUB.

Ext2 Features

  • Introduced: January 1993
  • File allocation: bitmap (free space), table (metadata)
  • Max file size: 16 GiB – 64 TiB
  • Max number of files: 10^18
  • Max filename length: 255 characters
  • Max volume size: 2 TiB – 32 TiB
  • Date range: December 14, 1901 – January 18, 2038

Ext 3

Ext3 is the successor to ext2 and removed quite a few of the limitations and also added a number of new features, most important of which was journaling. As you might have guessed it’s full name is the third extended filesystem. While ext3 is generally considered to be much better than ext2 there are a couple of problems with it. While ext3 does not have to scan itself after a crash, something that ext2 did have to do, it also does not have a an online defragmenter. Also because ext3 was primarily designed to shore up some of ext2’s faults, it is not the cleanest implementation and can actually have worse performance than ext2 in some situations. Ext3 is still the most popular Linux filesystem and is only now slowly being replaced by its own successor ext4. Ext3 can be used on the /boot partition and is fully supported by GRUB.

Ext3 Features

  • Introduced: November 2001
  • Directory contents: Table, hashed B-tree with dir_index enabled
  • File allocation: bitmap (free space), table (metadata)
  • Max file size: 16 GiB – 2 TiB
  • Max number of files: Variable, allocated at creation time
  • Max filename length: 255 characters
  • Max volume size: 2 TiB – 16 TiB
  • Date range: December 14, 1901 – January 18, 2038

Ext4

Ext4 is the next in the extended filesystem line and the successor to ext3. This addition proved to be quite controversial initially due to its implementation of delayed allocation which resulted in a very long time before writes. However ext4 achieves very fast read time thanks to this delayed allocation and overall it performs very well when compared to ext3. Ext4 is slowly taking over as the defacto filesystem and is actually already the default in many distributions (Fedora included). Ext4 cannot be used on the /boot partition because of GRUB, meaning a separate /boot partition with a different filesystem must be made.

Ext4 Features

  • Introduced: October 21, 2008
  • Directory contents: Linked list, hashed B-tree
  • File allocation: Extents/Bitmap
  • Max file size: 16 TiB
  • Max number of files: 4 billion
  • Max filename length: 256 characters
  • Max volume size: 1 EiB
  • Date range: December 14, 1901 – April 25, 2514

ReiserFS

Created by Hans ‘I didn’t murder my wife’ Reiser, in 2001 this filesystem was very promising for its performance but has since been mostly abandoned  by the Linux community. It’s initial claim to fame was as the first journaling filesystem to be included within the Linux kernel. Carefully configured, ReiserFS can achieve 10 to 15x the performance of ext2 and ext3. ReiserFS can be used on the /boot partition and is supported by GRUB.

ReiserFS Features

  • Introduced: 2001
  • Directory contents: B+ tree
  • File allocation: Bitmap
  • Max file size: 8 TiB
  • Max number of files: ~4 billion
  • Max filename length: 4032 characters theoretically, 255 in practice
  • Max volume size: 16 TiB
  • Date range: December 14, 1901 – January 18, 2038

Journaled File System (JFS)

Developed by IBM, JFS sports many features and is very advanced for its time of release. Among these features are extents and compression. Though not as widely used as other filesystems, JFS is very stable, reliable and fast with low CPU overhead. JFS can be used on the /boot partition and is supported by GRUB.

JFS Features

  • Introduced: 1990 and 1999
  • Directory contents: B+ tree
  • File allocation: Bitmap/extents
  • Max file size: 4 PiB
  • Max number of files: no limit
  • Max filename length: 255 characters
  • Max volume size: 32 PiB

XFS

Like JFS, XFS is one of the oldest and most refined journaling filesystems available on Linux. Unlike JFS, XFS supports many additional advanced features such as striped allocation to optimize RAID setups, delayed allocation to optimize disk data placement, sparse files, extended attributes, advanced I/O features, volume snapshots, online defragmentation, online resizing, native backup/restore and disk quotas. The only real downsides XFS suffers from are its inability to shrink partitions, a difficult to implement un-delete, and quite a bit of overhead when new directories are created and directories are deleted. XFS is supported by GRUB, and thus can be used as the /boot partition, but there are reports that it is not very stable.

XFS Features

  • Introduced: 1994
  • Directory contents: B+ tree
  • File allocation: B+ tree
  • Max file size: 8 EiB
  • Max filename length: 255 characters
  • Max volume size: 16 EiB

Btrfs

Btrfs, or “B-tree FS” or “Butter FS”, is a next generation filesystem will all of the bells and whistles. It is meant to fill the gap of lacking enterprise filesystems on Linux and is being spearheaded by Oracle. Wikipedia lists its new promised features as online balancing, subvolumes (separately-mountable filesystem roots), object-level (RAID-like) functionality, and user-defined transactions among other things. It’s stable version is currently being incorporated into mainstream Linux kernels.

Btrfs Features

  • Introduced: 20xx
  • Directory contents: B+ tree
  • File allocation: extents
  • Max file size: 16 EiB
  • Max number of files: 2^64
  • Max filename length: 255 characters
  • Max volume size: 16 EiB

So what’s it all mean?

Well there you have it, a quick and concise rundown of the filesystem options for your mainstream Linux install. But what exactly does all of this mean? Well, as they say, a picture speaks a thousand words. Many people have done performance tests against the mainstream filesystems and many conclusions have been drawn as to what is the best in many different circumstances. As I assume most people would chose either XFS, ext3, ext4 or maybe even Btrs if they were a glutton for punishment I just happen to have found some interesting pictures to show off the comparison!

Rather than tell you which filesystem to pick I will simply point out a couple of links and tell you that while I think XFS is a very underrated filesystem I, like most people, will be going with ext4 simply because it is currently the best supported.

Links (some have pictures!):

EXT4, Btrfs, NILFS2 Performance Benchmarks

Filesystems (ext3, reiser, xfs, jfs) comparison on Debian Etch

Linux Filesystem Performance Comparison for OLTP with Ext2, Ext3, Raw, and OCFS on Direct-Attached Disks using Oracle 9i Release 2

Hey! You forgot about partitions!

No, I didn’t.

Yes you did!

OK, fine… So as Jon had pointed out in a previous post the Linux filesystem is broken down into a series of more or less standard mount points. The only requirements for Fedora, my distribution of choice, and many others are that at least these three partitions exist: /boot for holding the bootable kernels, / (root) for everything else, and a swap partition to move things in and out of RAM. I was thinking about creating a fourth /home partition but I gave up when I realized I didn’t know enough about Linux to determine a good partition size for that.

OK, so break it down

/boot

Fedora recommends that this partition is a minimum of 100MB in size. Even though kernels are each roughly 6MB in size it is better to be safe than sorry! Also because ext4 is not supported by GRUB I will be making this partition ext3.

LVM

I know what you’re thinking, what the hell is LVM? LVM stands for Logical Volume Manager and allows a single physical partition to hold many virtual partitions. I will be using LVM to store the remainder of my partitions wrapped inside of a physical encrypted partition. At least that’s the plan.

swap

Fedora recommends using the following formula to calculate how much swap space you need.

If M < 2
S = M *2
Else
S = M + 2

Where M is the amount of memory you have and S is the swap partition size in GiB. So for example the machine I am using for this experiment has 4 GiB of RAM. That translates to a swap partition of 6 GiB. If your machine only has 1 GiB of RAM then the formula would translate to 2 GiB worth of swap space. 6 GiB seems a bit overkill for a swap partition but what do I know?

/ (root)

And last but not least the most important part, the root partition. This partition will hold everything else and as such will be taking up the rest of my drive. On the advice of Fedora I am going to leave 10 GiB of LVM disk space unallocated for future use should the need arise. This translates to a root partition of about ~300 GiB, plenty of space. Again I will be formatting this partition using ext4.

Well there you go

Are you still with me? You certainly are a trooper! If you have any suggestions as to different disk configurations please let me know. I understand a lot of this in theory but if you have actual experience with this stuff I’d love to hear from you!

Top 10 Antivirus You Must Try on Linux

January 4th, 2017 No comments

Many people use Linux because of its higher level of security, and it’s true that a Linux-based operating system is generally more secure than Windows and Mac, for several reasons. First of all, Linux is not nearly as popular as the Mac or Windows, which means that fewer coders go through the trouble of programming malware that works on this operating system; Windows and Mac users are more often their targets. And second, when using Linux the user generally has rather limited privileges unless they elevate them manually (in order to be able to install software, for example), which means that even in the event that malware does get on your PC, it won’t be as powerful or as “privileged” as on a Windows PC logged into an Administrator account with full privileges.

However, that’s not to say that you’re entirely safe from malware just because you use Linux. You should still be careful about the websites you browse, preferably through a VPN and set your operating system up with some kind of third party antivirus protection. In this article, we’re going to present to you the best antivirus software that you can find for Linux, in our personal opinion, so you can secure your PC and stop worrying about malware doing damage to your system.

1. AVG

One of the most popular anti-virus apps for Windows has an equally good counterpart that you can use on Linux-based operating systems. Sadly, AVG for Linux does not have a graphic user interface, so you’re going to have to know your way around the terminal a bit in order to use it effectively. On the plus side, this means that AVG for Linux is very lightweight and won’t impact your performance at all.

2. BitDefender

BitDefender is downloadable directly from the Linux repository, but unlike AVG it features a nice GUI version (in addition to a command-line version if you like that sort of thing) that makes using BitDefender a breeze. If you want a solid antivirus that will offer state-of-the-art protection to your PC, be sure to check out BitDefender.

3. Comodo Antivirus

Comodo is a powerful, free firewall application that you can use to ward off Internet-based malware from your Linux operating system. Comodo is excellent at detecting and quarantining various types of cyber attacks such as phishing, trojan horses and so on.

4. Sophos

Sophos features a heuristic-based detection system and real-time scanning, and is capable of removing malware written for Android, Windows and even Mac, in addition to Linux. Not only does this protect your own machine from any imminent malware threat, it also makes sure that other computers won’t get infected by dormant virus applications that don’t work on your system, but may work on theirs.

5. Rootkit Hunter

If you have a rootkit problem and want to get rid of it, this nifty little open-source application is what you need. It’s command-line only unfortunately but it’s really not that hard to learn, and it’s as lightweight as they get. Rootkit Hunter uses SHA-1 hash comparison to hunt down malware, and includes a portable version that you can use on any Linux PC without installing it.

6. ESET Antivirus

ESET is a paid antivirus solution for malware on Linux machine that features proactive malware detection and very low resource use, so you won’t even notice is running in the background. The onboard GUI is sleek, easy to use and intuitive, but powerful enough so you can customize the software to your needs.

7. F-PROT Antivirus

F-PROT antivirus comes in a free home version and an enterprise one for commercial use. A powerful and lightweight anti-virus application for Linux that detects various types of malware such as Trojans, boot sector viruses and so on.

8. Avast

One of the most popular free anti-virus programs on the market today. Avast features a solid, easy to use GUI so you don’t have to fiddle around with terminal commands, and has a variety of additional features such as real-time protection, an anti-rootkit shield and even e-mail protection.

9. ClamAV

An open source, commandline-based anti-virus solution for Linux that features a minimalistic GUI for scanning purposes only. You can download the ClamAV package directly from the Linux repository by typing “$sudo apt-get- install clamav clamtk” into the terminal.

10. Chkrootkit

Another powerful anti-rootkit checker for Linux-based operating systems that sadly is only controllable via a commandline interface. On the plus side, though, this software is usable from a live CD, so in case that your system is too far gone to actually boot up, you can use it with a live version of Linux in order to exterminate the virus infection without actually having to start your system.


Thomas Milva is 28 and has been in an Information Security Analyst for over four years. He loves his job, but he also loves spending his time in nature, because he’s working from home, which sometimes means not getting enough fresh air. He also regularly writes for wefollowtech.com, where he often comments on the latest web trends in his articles. Thomas currently lives in Baton Rouge with his dog, two fish and his girlfriend.

Download YouTube videos with youtube-dl

December 31st, 2016 No comments

Have you ever wanted to save a YouTube video for offline use? Well now it’s super simple to do with the easy to use command line utility youtube-dl.

Start by installing the utility either through your package manager (always the recommended approach) or from the project GitHub page here.

sudo apt-get install youtube-dl

This utility comes packed with loads of neat options that I encourage you to read about on the project page but if you just want to quickly grab a video all you need to do is run the command:

youtube-dl https://www.youtube.com/YOUR_REAL_VIDEO_HERE

So for example if you wanted to grab this year’s YouTube Rewind you would just run:

youtube-dl https://www.youtube.com/watch?v=_GuOjXYl5ew

and the video would end up in whatever directory your terminal is currently in. Can’t get much easier than that!

Categories: Linux, Tyler B Tags: ,

Happy New Year!

December 31st, 2016 No comments

Yeah I know technically this is going up a day early but so what? 😛

From all of us at The Linux Experiment we want to wish you all the best in 2017!

 

Categories: Tyler B Tags:

Fixing Areca Backup on Ubuntu 16.04 (and related distributions)

December 30th, 2016 No comments

Seems like I’m at it again, this time fixing Areca Backup on Ubuntu 16.04 (actually Linux Mint 18.1 in my case). For some reason when I download the current version (Areca 7.5 for Linux/GTK) and try and run the areca.sh script I get the following error:

tyler@computer $ ./areca.sh
ls: cannot access ‘/usr/java’: No such file or directory
No valid JRE found in /usr/java.

This is especially odd because I quite clearly do have Java installed:

tyler@computer $ java -version
openjdk version “1.8.0_111”
OpenJDK Runtime Environment (build 1.8.0_111-8u111-b14-2ubuntu0.16.04.2-b14)
OpenJDK 64-Bit Server VM (build 25.111-b14, mixed mode)

Now granted this may be an issue exclusive to OpenJDK, or just this version of OpenJDK, but I’m hardly going to install Sun Java just to make this program work.

After some digging I narrowed it down to the look_for_java() function inside of the areca_run.sh script located in the Areca /bin/ directory. Now I’m quite sure there is a far more elegant solution than this but I simply commented out the vast majority of this function and hard coded the directory of my system’s Java binary. Here is how you can do the same.

First locate where your Java is installed by running the which command:

tyler@computer $ which java
/usr/bin/java

As you can see from the output above my java executable exists in my /usr/bin/ directory.

Next open up areca_run.sh inside of the Areca /bin/ directory and modify the look_for_java() function. In here you’ll want to set the variable JAVA_PROGRAM_DIR to your directory above (i.e. in my case it would be /usr/bin/) and then return 0 indicating no error. You can either simply delete the rest or just comment out the remaining function script by placing a # character at the start of each line.

#Method to locate matching JREs
look_for_java() {
JAVA_PROGRAM_DIR=”/usr/bin/”
return 0
# IFS=$’\n’
# potential_java_dirs=(`ls -1 “$JAVADIR” | sort | tac`)
# IFS=
# for D in “${potential_java_dirs[@]}”; do
#    if [[ -d “$JAVADIR/$D” && -x “$JAVADIR/$D/bin/java” ]]; then
#       JAVA_PROGRAM_DIR=”$JAVADIR/$D/bin/”
#       echo “JRE found in ${JAVA_PROGRAM_DIR} directory.”
#       if check_version ; then
#          return 0
#       else
#          return 1
#       fi
#    fi
# done
# echo “No valid JRE found in ${JAVADIR}.”
# return 1
}

Once you’ve saved the file you should be able to run the normal areca.sh script now without encountering any errors!


This post originally appeared on my personal website here.

Resizing and Correctly Orienting Images with Mogrify

December 30th, 2016 No comments

Lately, I’ve been publishing woodworking tutorials over on my own blog, and I’ve found myself needing to resize and correctly orient images taken with my iPhone prior to posting.

If you want to do anything with images on Linux, the best place to start is with ImageMagick, an all-in-one utility that does just about everything under the sun with images, and has fantastic documentation to boot.

After a bit of research, I came up with this command:

mogrify -auto-orient -resize 584×438 -strip -quality 85% *.jpg

Here’s a rundown of exactly what this does:

  • mogrify modifies the images in the source directory. This command will overwrite your image files, so use it on a copy of them if you care to keep the original sized images
  • auto-orient fixes image orientation. When you take a picture with your iPhone, it writes the image directly to storage in the orientation that the image sensor was in at the time the image was taken, and then writes that orientation information to the image’s metadata. This makes taking pictures faster, because the phone doesn’t have to rotate the image prior to writing the file, but can cause images to show up in all sorts of creative orientations, depending on the software tool chain that you use to get the image onto your website
  • resize resizes the image to the specified size (expressed in pixels). If the image can’t be resized to the exact dimensions specified, it will be taken to the nearest possible dimensions, while maintaining aspect ratio, so the end image won’t be all stretched out
  • strip removes all metadata from the final images. This is handy for privacy, since you probably don’t want the GPS coordinates of your home being published online, but also removes the pesky orientation metadata, which is good, because the auto-orient command already acted on it, and you wouldn’t want an image to be double-rotated at display time
  • quality specifies the quality of the final jpg. I’ve found that 85% works well, but if you’re quality-conscious, you could set this too 100% and it won’t take much extra time to convert the images
  • *.jpg executes the command against all .jpg images in the current directory

So there you have it! A simple one-line command that rotates and resizes images prior to posting them. Oh, and if you’re the type that tends to forget complicated command-line syntax, don’t forget about the history command:

jon@IDEAPAD-UBUNTU:~$ history | grep mogrify
1691 mogrify -auto-orient -resize 584×438 -strip -quality 85% *.jpg
1696 history | grep mogrify

It’s an easy way to find that pesky command that you know you’ve used in the recent past, without resorting to looking up all of the command line switches again.

Cheers, and happy image uploading!

This post was adapted from the original post on my blog at jonathanfritz.ca

Categories: Jon F, Linux, Open Source Software Tags:

Blast from the Past: Linux Media Players Suck – Part 1: Rhythmbox

December 30th, 2016 No comments

This post was originally published on May 5, 2010. The original can be found here.


The state of media players on Linux is a sad one indeed. If you’re a platform enthusiast, you may want to cover your ears and scream “la-la-la-la” while reading this article, because it will likely offend your sensibilities. In fact, the very idea behind this series is to shake up the freetards’ world view, and to make them realize that a decent Winamp or iTunes clone need not be the end of the story for media management and playback on Linux.

This article will concentrate on lambasting Rhythmbox, the default jukebox software of the GNOME desktop environment. Subsequent posts will give the same treatment to other players in this sphere, including Banshee, Amarok, and Songbird (if I can find a copy that will still build on Linux). If you’re a user of media players on Linux, keep your own annoyances firmly in mind, and if I don’t mention them, please share in the comments. If you’re a developer for one of these fine projects, try to keep an open mind and get inspired to do better. A media player is not a hard thing to build, and I do believe that together, we can do better.

For the remainder of this article, please keep in mind that I am currently running Rhythmbox under Kubuntu 9.10, so you’ll see it rendered with qt widgets in all of my screen shots. This doesn’t affect the overall performance of the app, but leads nicely into my first complaint:

  1. Poor Cross-Platform Support: There are basically two desktop environments that matter in the Linux world, GNOME and KDE. Under GNOME, Rhythmbox has a reasonably nice icon set that is comparable to other media players. Under KDE, the qt re-skinning replaces those icons with a horrible set of mismatched images that really make the program look second-rate:
    Isn't this shit awful?

    As you can see, these icons look terrible. Note that there isn’t even an icon for ‘Burn’ and the icon for ‘Browse’ is a fucking question mark.

    This extends to the CD burning and help features too. They rely on programs like gnome-help and brasero to work, but don’t install them with the media player, so when I try to access these features under KDE, I just get error messages. Nice.

    Honestly, who packaged this thing?

    This is just plain stupid. Every package manager has the concept of dependencies, so why doesn’t Rhythmbox use them?

  2. The Player Starts in the Tray: Under what circumstances would it be considered useful for a media player to automatically minimize itself to the system tray on startup? It doesn’t begin to play automatically. The first thing that I always do is click on the tray icon to maximize it so that I can select some music to start playing. Way to start the user experience off on the wrong foot.
  3. Missing Files View: This one is just plain stupid. Whenever I delete a file from my hard drive, it shows up under the ‘Missing Files’ view, even though my intent was clearly to remove the file from my library. Further, I use Rhythmbox to put music on my BlackBerry. Whenever I fill it with music, I first delete the files on it. Those files that I deleted from my mobile device? Yeah, they show up under ‘Missing Files’ too, as if they were a legitimate part of my library! So this view ends up being like a global garbage bin that I have to waste my precious time emptying on occasion, and serves no useful purpose in the mean time. Yeah, I deleted those files. What are you going to do about it?

    Seriously, why the hell are these files in here?

    As you can see, I’ve highlighted the fact that Rhythmbox is telling me that these files are missing from my mobile device. No shit.

  4. Shared Libraries that I can’t Play: So we’ve known for awhile now that Apple broke the ability to connect to iTunes via the DAAP protocol, and that it’s not possible to connect to a shared iTunes library from Linux. If that’s the case, why does Rhythmbox still show these libraries as available? And how come it shows my library under this node? Why would I listen to my own shared library? Finally, I’ve found that even if I’m running Rhythmbox on another machine, I still can’t connect to my shared library. This feature seems to be downright broken – so why is it still in the build?
  5. The GUI and Backend are on One Thread: I keep about half of my music collection as lossless FLAC files. When I want to rip these files to my portable media device, they need to be converted to the Mp3 format. Turns out that Rhythmbox thinks it appropriate to transcode these files on the same thread that it uses to update its GUI, so that while this process is taking place, the app becomes laggy, and at times, downright unusable. Further, the application doesn’t seem to give me any control over the bitrate that my songs are transcoded to. Fuck!
  6. Lack of Playlist Options: Smart playlists in Rhythmbox are missing a rather key feature: Randomness. When filling the aforementioned mobile device with music, I would like to select a random 4GB of music from my top rated playlist. But I can’t. I can select 4GB of music by most every criteria except randomness, which means that I get the same 600 or so songs on my device every time I fill it. This is strange, because I can shuffle the contents of a static playlist; But I cannot randomly fill a smart playlist. Great.

    If you have a device that has a small amount of memory, this feature is essential

    It’s funny; I really want to like Rhythmbox, but it’s shit like this that ruins the experience for me

  7. Columns: What the fuck. Who wrote this part of the application? When I choose the columns that are visible in the main window, I can’t re-order them. That’s right. So the only order that I can put my columns in is Track, Title, Genre, Artist, Album, Year, Time, Quality, Rating. Can’t reorder them at all, and I have to go into the preferences menu to choose which ones are displayed, instead of being able to right-click on the column headers to select them like I can in every other program written in the last 10 years. This is just ridiculous. I know that the GTK+ toolkit allows you to create re-order-able columns, because I’ve seen it done.

    This is just so incredibly backward. I mean, columns are a standard part of the GTK+ toolkit, and I've seen plenty of other apps that do this properly.

    Why, for the love of God, can’t these be re-ordered?

  8. The Equalizer is Balls: No presets, and no preamp. So I can set the EQ, and my settings are magically saved, but I can only have one setting, because there doesn’t appear to be a way to create multiple profiles. And louder music sounds like balls, because I can’t turn down the preamp, so I get digital distortion throughout my signal. It would be better to just not have an equalizer at all.

    I mean, it works. But...

    I mean, it works. But…

  9. Context Menus Don’t Make Sense: Let’s just take a look at this context menu for a moment. There are three ways to remove a song from a playlist. You can Remove the song, which just removes it from the playlist, but not from your library or your hard drive. Alternatively, you can select Move to Trash, which does what you might expect – it removes the song from the playlist, the library, and your computer. I’ve got a problem with the naming conventions here. The purpose of Remove isn’t well explained, and confused the hell out of me at first. In addition, when browsing a mobile device that you’ve filled with music, the GUI breaks down even further. In this case, you can still hit Remove, which seems to remove the song from Rhythmbox’s listing, but leaves the file on the device. So now I have a file on my device that I can’t access. Great. The right-click menu also has the ability to copy and cut the song, even though there is no immediately obvious way to paste it. For that functionality, you’ll have to head up to the Edit menu.

    The right-click context menu

    I’m starting to run out of anger. The 10,000 papercuts that come along with this app are making me numb to it.

  10. No Command Line Tools: Now, normally, this wouldn’t bother me too much. A music library is something that’s meant to have a GUI, and doesn’t generally lend itself to working from the command line. In this case however, command line access to Rhythmbox would be really handy, because I’d like to set up a hot key on my keyboard that will skip songs or pause playback. Unfortunately, there’s no way to do that within the software, and it doesn’t have any command line arguments that I can call instead. Balls.

There you have it, 10 things that really ruin the Rhythmbox experience. While using this piece of software, I felt like the developers worked really hard to build something that was sort of comparable to Apple’s iTunes, and then stopped trying. That isn’t good enough! If we want to attract users to our platform of choice, and keep them here, we need to give them reasons to check it out, and even more to stick around. If I say to you that I want to have the best Linux media player, you tend to put the emphasis on the word Linux. Why not just make the best media player? GNOME is on at least half of all Linux desktops, if not more. Why hinder it with software that gives people a poor first impression of what Linux is capable of? Seriously guys, let’s step it up.

 

10 Things You Must Know About Linux Security

December 29th, 2016 No comments

Millions of users that opt out for using Linux operating system for two decades now, all on the grounds that it is much safer than most others on the market. While it’s true that Linux is less susceptible to security breaches, it is not impenetrable (no system on the planet is), which is why users should get acquainted with some security precautions that can protect their devices even more. The main topic of this article are 10 things you must know about Linux security, and we’ll try to bring this topic closer to home and closer to everyday use of your OS.

1. It All Starts with Updates

Even if you were using the most secure operating system on Earth, it still wouldn’t do you much good unless you keep it up to date. Linux distributions are usually very easy to manage when it comes to the matter at hand and we wholeheartedly suggest you setting up automated updates so that you can rest assured that everything is under control. Also, remember to keep all your apps updated as well, because cybercriminals use them as the back entrance for installing malicious software.

2. Separate Disk Partitions

This is computer security 101 and Linux is not an exemption from the rule. The fact that Linux offers more safety doesn’t mean that you can’t downgrade it by being negligent when it comes to protecting your security. As soon as you’ve set up Linux, be sure to separate disk partitions, so that you have a few different ones for different purposes. This is a form of insurance in case anything goes wrong with a program or a virus starts running rampant. Chances are bigger that the threats will stay contained only on one partition, so you don’t have to eliminate all the data from your device, but just what’s on a particular partition.

3. Security Enhanced Linux

SELinux is one of the main reasons why this operating system is considered to be so bulletproof, but it can also prove to be a bit overbearing. This is a security mechanism that comes in the kernel and it will be extremely careful for you not to stumble on anything malicious on the internet and sometimes it will be too careful. However, shutting it down completely can result in complete security failure of the OS and you don’t want to do that. It would be wise to at least have SELinux in permissive mode, where it won’t enforce its security policy, but it will actively inform you if there’s something you should be worried about.

4. Make Use of the Firewall

Maybe you’re not familiar with the fact that Linux has a very efficient firewall, but now that you know, you should use it all the time. The component is called iptables and it grants you significant amount of control when it comes to keeping your network traffic in check. The firewall is usually disabled by default, but you can turn it on easily enough, depending on which distro of Linux you’ve got.

5. Old Passwords

Using old passwords is a recipe for potential disaster, because it makes it much easier on hackers to get into your device and wreak havoc. Linux has a solution for this problem – it restricts any account from using any of the past five passwords that have been used. If you do try to reuse one of your old passwords, it will simply show an error page and request a new one.

6. Security Software

Many people think that it’s an overkill to have security software on top of already very secure Linux, but it can bring no harm. Having an antivirus program can hardly be a bad thing and if all other system defenses fail, it will be there to save the day. Furthermore, if you’re concerned about your privacy when browsing the internet, consider getting a VPN service to encrypt activities on the web and prevent surveillance.

7. Manual Account Lock

If there are users of the device that don’t inspire trust or simply won’t be using their account for a while, you can lock down their account in the OS. If the user of the locked account tries to access it, he/she will only get an error page saying that the account isn’t available. Bear in mind that the lock account option is only available for root user.

8. Think about Browser Security

Browsers are always potential security weak links unless you tend to them. No matter what browser you use, hackers can find a way to slither between the cracks, which is why you should take full advantage of security plugins that abound for any browser there is.

9. Encrypting Your Hard-Disk

This is great prevention for any unfortunate event of your laptop getting stolen or lost. Choosing to encrypt all the essential data on your device prevents anyone from misusing it and you can rest assured that no unauthorized person can reach your confidential information, because they’ll need FDE password that only you know. The best thing is that this encryption won’t in any way slow down your computer’s performance.

10. You Need Strong Password

This is another security 101 tip, which many Linux users forget about because they believe that the OS’s security can’t be breached. If you use simple and weak passwords, then a simple brute force attack can have your security crumbling down. Don’t gamble with this aspect of your safety and have a strong password for your Linux OS.

If your computer’s security is one of your primary concerns, then using Linux will definitely give you some peace of mind. Just remember that you also have to put some effort into securing your device even more so that your OS becomes a fortress against cybercriminals.


Thomas Milva is 28 and has been in an Information Security Analyst for over four years. He loves his job, but he also loves spending his time in nature, because he’s working from home, which sometimes means not getting enough fresh air. He also regularly writes for wefollowtech.com, where he often comments on the latest web trends in his articles. Thomas currently lives in Baton Rouge with his dog, two fish and his girlfriend.

vi(m) or emacs? Neither, just use nano!

December 29th, 2016 No comments

There is quite a funny, almost religious, debate within the Linux community between the two venerable command line text editors vi or Vim and Emacs. Sure they have loads of features and plugins but do you really need that from a command line editor? I think for the most part, or perhaps for most people at least, the answer is no. Instead I’m going to do something really stupid and publicly state, on a Linux related website, that you should ignore both of those text editors and instead use what many consider an inferior, more simplistic one instead: nano.

Sure it doesn’t have all of the fancy bells and whistles but honestly half the time I’m using a command line editor it’s just to change one line of text. I don’t generally need the extra fluff and when I do I can always use a graphical editor instead. Besides it’s so easy to use… just look at how easy it is to use:

Create/edit a file:

  1. Open the file in nano
  2. Make your changes
  3. Save the changes

Open the file:

nano doc.txt

Make your changes:

Admit it, it's true!

Admit it, it’s true!

 

Save your changes:

No complicated key combinations to remember – it’s all listed at the bottom of the screen. Want to save, “Write Out,” your changes? Easy as Ctrl+O and then Enter to confirm.

Sooooooooo easy to use

Sooooooooo easy to use

So let’s all come together, stop the fanboy wars, and all embrace nano as the best command line text editor out there! 😛

 

Categories: Linux, Open Source Software, Tyler B Tags: , , ,

Going Linux Podcast (Still Going)

December 28th, 2016 No comments

Way back in the early days of The Linux Experiment I came across an excellent podcast called Going Linux which offered beginners advice for those people trying out Linux for the first time or just wanting to know more about Linux in general. I so happy to see that the podcast is still going strong (now at over 300 episodes!) and wanted to mention them again here because they were very helpful in our original experiment’s goal of Going Linux.

Their mascot might actually be better than ours!

Please do check them out at http://goinglinux.com/ or subscribe to their podcast by following the steps here.

 

Categories: Podcast, Tyler B Tags: ,

Blast from the Past: Going Linux, Once and for All

December 28th, 2016 No comments

This post was originally published on December 23, 2009. The original can be found here.


With the linux experiment coming to an end, and my Vista PC requiring a reinstall, I decided to take the leap and go all linux all the time. To that end, I’ve installed Kubuntu on my desktop PC.

I would like to be able to report that the Kubuntu install experience was better than the Debian one, or even on par with a Windows install. Unfortunately, that just isn’t the case.

My machine contains three 500GB hard drives. One is used as the system drive, while an integrated hardware RAID controller binds the other two together as a RAID1 array. Under Windows, this setup worked perfectly. Under Kubuntu, it crashed the graphical installer, and threw the text-based installer into fits of rage.

With plenty of help from the #kubuntu IRC channel on freenode, I managed to complete the Kubuntu install by running it with the two RAID drives disconnected from the motherboard. After finishing the install, I shut down, reconnected the RAID drives, and booted back up. At this point, the RAID drives were visible from Dolphin, but appeared as two discrete drives.

It was explained to me via this article that the hardware RAID support that I had always enjoyed under windows was in fact a ‘fake RAID,’ and is not supported on Linux. Instead, I need to reformat the two drives, and then link them together with a software RAID. More on that process in a later post, once I figure out how to actually do it.

At this point, I have my desktop back up and running, reasonably customized, and looking good. After trying KDE’s default Amarok media player and failing to figure out how to properly import an m3u playlist, I opted to use Gnome’s Banshee player for the time being instead. It is a predictable yet stable iTunes clone that has proved more than capable of handling my library for the time being. I will probably look into Amarok and a few other media players in the future. On that note, if you’re having trouble playing your MP3 files on Linux, check out this post on the ubuntu forums for information about a few of the necessary GStreamer plugins.

For now, my main tasks include setting up my RAID array, getting my ergonomic bluetooth wireless mouse working, and working out folder and printer sharing on our local Windows network. In addition, I would like to set up a Windows XP image inside of Sun’s Virtual Box so that I can continue to use Microsoft Visual Studio, the only Windows application that I’ve yet to find a Linux replacement for.

This is just the beginning of the next chapter of my own personal Linux experiment; stay tuned for more excitement.

This post first appeared at Index out of Bounds.

 

Help out a project with OpenHatch

December 27th, 2016 No comments

OpenHatch is a site that aggregates all of the help postings from a variety of open source projects. It maintains a whole community dedicated to matching people who want to contribute with people who need their help. You don’t even need to be technical like a programmer or something like that. Instead if you want to lend your artistic talents to creating icons and logos for a project, or your writing skills to help them out with documentation – both areas a lot of open source projects aren’t the best with – I’m sure they would be greatly appreciative.

So what are you waiting for? Get connected and give back to the community that helps create the applications you use on a daily basis!

Blast from the Past: Automatically put computer to sleep and wake it up on a schedule

December 26th, 2016 No comments

This post was originally published on June 24, 2012. The original can be found here.


Ever wanted your computer to be on when you need it but automatically put itself to sleep (suspended) when you don’t? Or maybe you just wanted to create a really elaborate alarm clock?

I stumbled across this very useful command a while back but only recently created a script that I now run to control when my computer is suspended and when it is awake.

#!/bin/sh
t=`date –date “17:00” +%s`
sudo /bin/true
sudo rtcwake -u -t $t -m on &
sleep 2
sudo pm-suspend

This creates a variable, t above, with an assigned time and then runs the command rtcwake to tell the computer to automatically wake itself up at that time. In the above example I’m telling the computer that it should wake itself up automatically at 17:00 (5pm). It then sleeps for 2 seconds (just to let the rtcwake command finish what it is doing) and runs pm-suspend which actually puts the computer to sleep. When run the computer will put itself right to sleep and then wake up at whatever time you specify.

For the final piece of the puzzle, I’ve scheduled this script to run daily (when I want the PC to actually go to sleep) and the rest is taken care of for me. As an example, say you use your PC from 5pm to midnight but the rest of the time you are sleeping or at work. Simply schedule the above script to run at midnight and when you get home from work it will be already up and running and waiting for you.

I should note that your computer must have compatible hardware to make advanced power management features like suspend and wake work so, as with everything, your mileage may vary.

This post originally appeared on my personal website here.