Linux User Group of Mauritius Promoting open source software in our beautiful island

25Nov/150

Ubuntu GPG error “NO_PUBKEY”

Posted by Ish

Ever bugged by Ubuntu GPG error during updates?

Ubuntu lets you define several software repos in individual files under the /etc/apt/sources.list.d directory. Likewise, one may create a file (e.g varnish-cache.list) with the following content to add the Varnish software repo:

deb https://repo.varnish-cache.org/ubuntu/ trusty varnish-4.1

Upon executing apt-get update Ubuntu will update the software repository lists including that of Varnish. One hiccup that may occur during the update is an error that complains as follows:

W: GPG error: https://repo.varnish-cache.org trusty InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 60E7C096C4DEFFEB

The error says that GPG cannot find the public key “60E7C096C4DEFFEB”.

Public key cryptography is based on pairs of keys, a public key and a private key. The public key is given out to the world; the private key must be kept a secret. Anyone possessing the public key can encrypt a message so that it can only be read by someone possessing the private key. It’s also possible to use a private key to sign a file, not encrypt it. If a private key is used to sign a file, then anyone who has the public key can check that the file was signed by that key. Anyone who doesn’t have the private key can’t forge such a signature.

— Description, courtesy of debian.org

GPG is used to sign packages found on the software repository lists. A private key is used in the signing process. A public key helps to verify whether the package requested has been signed by the corresponding private key. Hence, the public key of Varnish helps to make sure that the requested package is signed by Varnish itself and not someone else. This establishes authenticity.

Apt-key is a utility that retrieves a public key from a keyserver. We, therefore, request the public key of Varnish software as follows:

apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 60E7C096C4DEFFEB

The command produces the following result:

gpg: requesting key C4DEFFEB from hkp server keyserver.ubuntu.com
gpg: key C4DEFFEB: public key "varnish-cache.org repository key <sysadmin@varnish-software.com>" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)

The public key is imported and will be used for signature verification during updates.

The post Ubuntu GPG error “NO_PUBKEY” appeared first on HACKLOG.

18Oct/150

Extend battery life on Linux with PowerTop

Posted by Ish

One of the greatest fun spoilers when loading your favorite Linux distribution on your new laptop is battery life.

Yes, the battery life that goes upto 4 hours with Microsoft Windows could easily drain down to 2.5 hours with a classic Ubuntu installation. A major argument will be that Linux distributions do not come with optimized under-the-hood power settings. We should not forget that most Linux distributions aim to support a majority of computer hardware out of the box. We are surely happy that we do not need to struggle with hardware incompatibility issues, driver versions etc, as it could be the case with a Windows installation. However, the downside is that the Linux kernel could be bloated with “stuffs” not required for your laptop.

In a recent past there was a tool called Jupiter that allowed some handy power consumption optimizations. The project is now discontinued.

Some claim that TLP which was originally designed for ThinkPads, could optimize power consumption on other brands. I had no such luck with an Acer Aspire notebook.

Recently, I tried PowerTop, a power-management utility by Intel that enables a series of powersaving modes in userspace, kernel and hardware. PowerTop can also monitor and identify applications with a high power demand. I’ve used PowerTop to extend the battery life of my ThinkPad from 3.5 hours to 6 hours; a whopping 2.5 hours gain.

Powertop can be installed from the Ubuntu software repository.

sudo apt-get install powertop

At first run, you need to calibrate it so as it gathers as much information about your machine.

sudo powertop --calibrate

This could take up some minutes and the screen would flicker and even turn off for a while. Do not panic, just let it run and go grab a coffee.

Once done, PowerTop will load with an “overview” of your running applications, their power consumption and battery life estimation. Press the “tab” button to navigate through. The “tunables” tab lists a series of settings that have been applied to your system.

powertop-tunables

After the calibration, PowerTop will have a list of measurements that it could use to tune your system every time you launch it. Therefore, next time you may launch PowerTop as follows:

sudo powertop --auto-tune

Ideally, you could also start PowerTop when the laptop boots. Just add the following in the /etc/rc.local file before the exit 0:

# Loading power-saving schemes
powertop --auto-tune

On that note, happy power saving :)

The post Extend battery life on Linux with PowerTop appeared first on HACKLOG.

Tagged as: No Comments
23Feb/150

Reviving an old notebook with Xubuntu

Posted by Ish

Last Sunday I spent some time reviving my old laptops. Had quite some gear lying around and I decided to clean up the trash. I gave my current Acer Aspire running openSUSE 13.2 to my mom, swapped the HP Compaq 6515b with an SSD drive and loaded Xubuntu.

Next in line was a little bit of aesthetics. In fact, while exploring Evolve OS I came across the Numix Project. Thought of giving it a try. Ah, totally worth it.

xubuntu-desktop

The Numix Project offers a collection of GTK themes and icons. Get hands on those as follows:

sudo add-apt-repository ppa:numix/ppa
apt-get install numix-gtk-theme numix-icon-theme

Hit the Appearance dialog and set the Style and Icons as Numix.

xubuntu-numix

One more tweak for the day. Though font anti-aliasing is enabled by default my fonts would not look good in Abiword. To fix the same I ran the Alt + F2 combination and executed xfce4-settings-editor. Went to xsettings and set Lcdfilter’s value to lcdlight.

xfce4-settings-editor

As and when I tweak the box further, I’ll be writing.

The post Reviving an old notebook with Xubuntu appeared first on HACKLOG.

23Feb/150

Reviving an old notebook with Xubuntu

Posted by Ish

Last Sunday I spent some time reviving my old laptops. Had quite some gear lying around and I decided to clean up the trash. I gave my current Acer Aspire running openSUSE 13.2 to my mom, swapped the HP Compaq 6515b with an SSD drive and loaded Xubuntu.

Next in line was a little bit of aesthetics. In fact, while exploring Evolve OS I came across the Numix Project. Thought of giving it a try. Ah, totally worth it.

xubuntu-desktop

The Numix Project offers a collection of GTK themes and icons. Get hands on those as follows:

sudo add-apt-repository ppa:numix/ppa
apt-get install numix-gtk-theme numix-icon-theme

Hit the Appearance dialog and set the Style and Icons as Numix.

xubuntu-numix

One more tweak for the day. Though font anti-aliasing is enabled by default my fonts would not look good in Abiword. To fix the same I ran the Alt + F2 combination and executed xfce4-settings-editor. Went to xsettings and set Lcdfilter’s value to lcdlight.

xfce4-settings-editor

As and when I tweak the box further, I’ll be writing.

The post Reviving an old notebook with Xubuntu appeared first on HACKLOG.

23Sep/140

Geany, themes pack

Posted by Ish

Installed Geany on a fresh Ubuntu machine & I realise it does’t have much to offer as customization. Ran a quick sudo apt-cache search geany yet nothing about the themes. I did an Internet search and then I realised the last time I customized Geany it was using template config files from Codebrainz Github page.… Read more ➡

The post Geany, themes pack appeared first on HACKLOG.

13Sep/140

Ubuntu Global Jam // Linuxfest 2014

Posted by Ish

ubuntu_global_jam_badge_v1The Ubuntu Global Jam (UGJ) – Mauritius happened today at the University of Mauritius. On the same occasion, as Ajay tossed earlier, we had a Linuxfest too. While I decided to put more of my energy in getting gears ready for the Ubuntu Jam, Ajay along with folks from the University of Mauritius Computer Club helped in to get things ready for the Linuxfest.… Read more ➡

The post Ubuntu Global Jam // Linuxfest 2014 appeared first on HACKLOG.

Tagged as: No Comments
3May/140

MSCC – Let’s talk about Scripting

Posted by Ish

It was initially scheduled for last Saturday but upon request MSCC monthly meetup was re-scheduled for today. I thought that would give me sufficient time to craft some cool scripts that I could showcase during my presentation on Bash Scripting. Oh! I was wrong. I either didn’t get enough inspiration or simply I was lazy to write stuffs. Wait! How could I be lazy since I did get time to make some colorful slides. Ahaan … Inspiration then?

Back to topic, this morning Rajnee (a new LUGM recruit) texted & told me she could pick me up before going to the meetup. This was the first time she’d be attending an MSCC meetup. That was too cool, she picked me up around 10h00 & we arrived at the University of Mauritius a little before 10h30. On the way I called Ronny, he had some other priorities and might not show up. We initially planned to spare 15 minutes today & approve the new recruits of LUGM.

At UoM, I called up Yunus to find my way to Phase II, room 2.9. It wasn’t a tough task. I do know a little bit about UoM building layouts. Right infront of room 2.9, I saw Nayar and Aslam waiting. They reached earlier and inquired about the class. Seemed like it was occupied and it would be free as from 10h30. Fair enough for us. A short while later Daniel showed up followed by others.

Others? Who else?

Those who made it today:
Daniel, Nayar, Aslam, Rajnee, Ashmita, Yunus, Jagveer, Adarsh, Nadim, Pritvi, Saif, Jochen and his kids… oh, and me of course.

Ironically, the projector in room 2.9 was black & white. I was like whaaaat? No way. I spent time to make colorful slides, I can’t show those in B&W. We then moved to room 2.10 and 2.11. Same issue. Hopefully, Jochen brought his projector. So, we returned to room 2.9 and used his projector.

I presented my love for Bash first. As I mentioned earlier, due to lack of inspiration, I could not dedicate more time to script examples but I assured the presentation would be beneficial to new folks in Linux, giving them an insight about command-line. I talked about pipes, redirects, standard streams and how these can be coupled with Bash scripting.

My presentation (^^,)

Daniel brought a programmer’s approach and described the limits of scripting, as when should one shift to program something rather than scripting. He also showed us some syntax loopholes in Bash that could leave someone with bad code.

Daniel's slides

In the end, Jochen brought us PowerShell. We went back in history, discussed MS-DOS and Microsoft’s evolution to PowerShell. Yes, Microsoft has been slow on this decision. Questions sprouted along the way as Jochen proceeded with PowerShell talks. I shot about a server having just PowerShell, like no GUI, and yes that’s available with Microsoft Server Core. Pritvi shot about connecting to a headless server using PowerShell. Yes, indeed that’s possible too but it’s not as in SSH (if you might be thinking that way). Jochen also highlighted the similarities with Bash, like having cmdlets (a PowerShell feature) aliased to popular Bash commands like, ls, mv, rmdir, mkdir etc.

After the presentations some of us moved to Bagatelle to have lunch. Meetup thus ended on a happy note over tea, panini, pita bread, sandwiches and pasta.

MSCC Meetup - Presentation on Shell Scripting mscc-scripting-daniel mscc-scripting-jochen mscc-scripting-bagatelle-1 mscc-scripting-bagatelle-2 mscc-scripting-bagatelle-3

Photos taken on mobile by Nadim. Indoor ones came bad due to lighting.

The post MSCC – Let’s talk about Scripting appeared first on HACKLOG.

Tagged as: No Comments
18Apr/140

Ubuntu 14.04 LTS, a first impression

Posted by Ish

Ubuntu 14.04 LTS was released yesterday, 17 April 2014. This falls well with perfect timing for LUGM’s event, the Corsair Hackers Reboot. I did not wait much & downloaded the 64-bit image for a trial & to check new features.

ubuntu-14.04-installInstallation was seamlessly easy as usual. On my Acer Aspire 4741 notebook it took the usual 15 mins. Booting up was fast & furious. Improvement? We could say it, though Ubuntu wasn’t known to be slow at boot-ups.

I shot open a few applications & the noticeable improvement to Unity was the menu embedded in the window’s title bar instead of the top-menu-bar. It’s better than what it was previously but not yet the best improvement of Unity. For example, on a re-sized window the close button is shown on the top-right corner of the windows, however, when maximized the button is moved to the left side of the top-menu-bar. To a regular Ubuntu user this might not be a glitch but to someone who just migrated, this could be an awful experience. I have myself several times closed the wrong window by misinterpreting the left & right close buttons.

ubuntu-14.04-window-menu

Menu embedded in window's title bar

The next thing that should catch the eye is the awful invasion of privacy while using Unity Dash search. I would not want online suggestions when searching for an installed application. It’s a pity to see this thing enabled by default. To disable the online suggestion feature, go to Settings > Security & Privacy and under the Search tab simply turn off “Include online search results” feature. To further fine-tune the search results you may also disable a couple of other stuffs under the Files & Applications tab.

ubuntu-14.04-settings

Click the yellow icon (:

ubuntu-14.04-turn-off-online-search-results

Turning off the online suggestion feature

ubuntu-14.04-fine-tune-search

Fine-tuning search results

Lastly, I updated the software repos & installed my favorite applications. To get 3rd-party software, Canonical Partners repos must be enabled. It’s disabled by default. To enable the same go to Settings > Software & Updates, under the Other Software tab select Canonical Partners. Doing so, software like Skype can be downloaded & installed directly through Ubuntu Software Center or through command line.

One tip though, while installing the usual tons of applications don’t look for acroread. Adobe Reader 9.x has reached end-of-life and thus been removed from the repositories. So far Adobe hasn’t found it necessary/wise to release the latest version for the growing Linux community. Nevertheless, Evince remains a nice piece of software for viewing PDF files.

The post Ubuntu 14.04 LTS, a first impression appeared first on HACKLOG.

Tagged as: No Comments
20Feb/140

Linux, video encoding

Posted by Ish

libav-logoFinally all of LUGM Meetup videos are now on LUGM Youtube Channel. This was the first time “le me” trying video encoding. I had to do my little homework about encoders & all. I was initially baffled to see that each MOV file that Nadim gave me was above 1G in size. That would be too much to upload and I didn’t know if Youtube would accept MOV format. Then I remembered Harish mentioning about x264. A little bit of web mining and I had the required tools.

Oh! Due to some work adaptation, I am currently running Ubuntu 12.04 on my HP notebook. Getting the tools were straightforward using APT on Ubuntu. avconv was already installed, I just needed a couple of extras.

sudo apt-get install x264 libavcodec-extra-53 

Conversion would require something as follows :

avconv -i AMBA0075.MOV -c:v libx264 OpenSSH_1.mp4

This command converted a 1.3G MOV file to approximately 200M MP4. {Smile} Now, Youtube uploading becomes smoother.

A couple of tricks using avconv.

1. To know which formats avconv supports

avconv -formats

2. To check available codecs

avconv -codecs

3. To list video file properties

avconv -i video.mp4

4. Converting FLAC to MP3

avconv -i music_file.flac -threads 8 -c:a libmp3lame -ab 320k -y music_file.mp3

Here’s a list of videos from LUGM Meetup of 15th February 2014

Linux User Group of Mauritius // OpenSSH 6.5 Presentation Part I
Linux User Group of Mauritius // OpenSSH 6.5 Presentation Part II
Linux User Group of Mauritius // OpenSSH 6.5 Presentation Part III

Linux User Group of Mauritius // .mu Domain Presentation Part I
Linux User Group of Mauritius // .mu Domain Presentation Part II

Thanks to Ajay Ramjatan, Nadim Attari and Pawan Babooram for recording the presentations.
Tagged as: No Comments