Category Archives: Ubuntu Tech Snippets

Ubuntu Tech Snippet #12 – Fix the NVIDIA screen flicker bug in Ubuntu

NVIDIA. Oh how we love to hate thee.

NVIDIA and its proprietary graphics drivers have long been a bane of users on Ubuntu. If you needed performance, then you had to use the proprietary drivers, as Nouveau just couldn’t keep up. However, the NVIDIA drivers can be fickle to install and keep up to date, and often cause graphical issues like black screens or, as this post talks about, screen flickering.

This bug has been around since Ubuntu 8.04 Hardy Heron, and is still present in Ubuntu 14.04.1 – this bug refuses to die. This issue cropped up for me and some other users after a recent kernel upgrade.

There have been numerous attempts to fix it, including going so far as to patch Compiz to attempt to fix this. However, I’m going to be showing you a far simpler method.


Solution:

I originally found this solution over on the Ubuntu forums, you can read that post here and the bug (started way back in September of 2008) on Launchpad.

To fix this you’re going to need the CompizConfig Settings Manager software. If you don’t already have it installed, press Ctrl+Alt+T to open a Terminal:

Screenshot from 2015-01-31 10:34:36

Once that terminal is open, enter sudo apt-get install compizconfig-settings-manager and hit enter. You’ll probably need to enter your password, but once you do it will install. Don’t close the terminal.

Once installed, go ahead and enter sudo ccsm. This will launch CompizConfig Settings Manager. It will show you a warning about the program being very powerful, probably say something along the lines of “With Great Power comes Great Responsibility”. Just click okay:

Screenshot from 2015-01-31 10:35:40

Once it comes up, search for workarounds and select the only option that comes up:

CompizConfig Settings Manager_001

Then, scroll down and select the Force full screen redraws (buffer swap) on repaint option:

CompizConfig Settings Manager_002

Once you’ve done that, you can close Settings Manager, and you’re done! This should have helped if not resolved the screen flicker issue for you!

Obviously, this isn’t an actual solution or bug fix, but it’s a workaround that does its job – stops the dreadful NVIDIA redraw bug from doing it’s horrible deed.

 

Advertisements
Tagged , , , , , ,

Ubuntu Tech Snippet #11 – Speed up your Ubuntu installation with Preload

One of the great time & space conundrums is the need for speed. Everyone wants things, especially their computers, to be fast. And while Ubuntu can be much lighter on system resources than Windows or OS X, any extra speed is awesome and probably accepted by most people.

And so, I present to you Preload. Preload is, according to the manpage (man preload):

“an adaptive readahead daemon that prefetches files mapped by applications from the disk to reduce application startup time.”

Basically, this means that it keeps files loaded that are accessed by applications you commonly use, thus speeding up application startup time.

Note, if you’ve got a smaller amount of RAM (4GB or less) this may not be the best idea for you, as it stores all of the data in RAM – which may lead to slower overall system responsiveness.

However, if you’ve got more than 4GB of RAM or want to try it regardless, here’s the steps:

Tech Tip:

  1. Open Terminal (Ctrl+Alt+T)
  2. Enter sudo apt-get install preload
  3. Hit Enter.
  4. There is no step four

Yeah, it’s that simple.

Of course, if you really want to tweak it, there is a config file stored at /etc/preload.conf.

Conclusion:

What’s this good for? Well, it depends on what you do.

If you’re a developer, video editor, music maker, basically any content creator and are constantly launching a few key programs, then Preload is great. It speeds up launch times for those apps you use all the time and may only launch for a few minutes or seconds at a time.

If you’re just using your system for general work, like writing papers, checking stocks, or balancing a spreadsheet, this may not be as useful and may in fact harm performance, as you’re using up RAM to save a few seconds off the launch of an application that you’re going to leave open for quite a while.

This should work on basically any supported desktop and server Ubuntu release (at the time of writing, this is Desktop: Ubuntu 12.04.5, Ubuntu 14.04, and Ubuntu 14.10 and Server: 10.04.4)

Leave a comment down below telling me what you thought of this article, tell me something you want me to write about, and feel free to share any tech tips of your own!

Tagged , , , , , ,

Ubuntu Tech Snippet #10 – Remove Extra Music Players from the Ubuntu Sound Menu

Tired of pesky music players swarming your sound menu? Sick of all those silly video players making your sound menu take up half your desktop? Well, wait no longer. This Ubuntu Tech Snippet is going to show you how to, in über-l33t fashion, remove the programs that you don’t want hijacking that menu.

Problem:

The Ubuntu Sound Menu is a stupendous idea. Don’t get me wrong – I love this feature and think it should be standard everywhere. It just makes so much sense and make listening to music so much easier, all without the need to keep the music player open.

But there is one key issue, and that’s the fact that basically any music or video player that even sneezes at playing audio can technically plop itself down in this menu. Obviously, if you’re like me and like testing out new software, you are going to end up with a lot of programs filling up the menu, making the menu more of hastle than usual:

ubuntu sound menu - messy

Ubuntu Sound Menu – Look at all those media players…

Solution 1:

Fixing this is a pretty simple solution – uninstall those pesky buggers. Just uninstall the software that’s giving you trouble and you’re good to go – they’ll be removed automatically. Now, this isn’t that great of a solution – read on for the real solution.

Solution 2:

This solution is just a bit harder, involving modifying dconf settings. However, with the help of our trusty tool, dconf-editor, we can fix it! Now, Ubuntu should come with dconf-editor pre-installed – if it is, skip this next step. However, if it isn’t, you can just run the following commands in terminal:

sudo apt-get update 
sudo apt-get install dconf-editor

Once it’s installed go ahead and start it. It’ll look similar to this, though not exactly the same, since I have the Numix GTK3 theme installed:

dconf Editor

dconf Editor

Once it’s open, expand com, then canonical, then indicator, then click on sound. The image below highlights each one:

All the steps, highlighted and numbered. See, it's not that bad!

All the steps, highlighted and numbered. See, it’s not that bad!

Once you’ve got the sound option selected go ahead and double-click on the text next to the label interested-media-players:

interested-media-players

interested-media-players is currently selected

You may have to scroll to the right a bit to see all of the media players that have plunked themselves into your Sound Menu’s digital lap.

You’ll want to locate all of the players you want to keep and not select those. Or, vice-versa, find all the players you don’t want to keep and select just those. Removing the select the entire entry, so select from the first single quote to the comma following the menu item you want to remove.
Don’t remove any of the square brackets anywhere or any of the single quotes and commas on the media players you want to keep.
In my case, I want to get rid of the Rythmbox and Clementine media players, so I’m going to select those and cut (Ctrl + X) them:
 dconf-selected-remove
And there you go! This will take place immediately after you remove the entries and click outside of the text box, no reboot required!
However, there is a caveat. This only removes them so long as you don’t launch those programs ever again, which is extremely unlikely.

Solution for the caveat:

This is pretty simple, again, and it explains why you should have cut the text instead of just flat out deleting it. You’ll need to blacklist the programs, and hey! Guess what! Canonical thought this out and included another entry, just for that!

blacklisted-media-players option - Yay Canonical!

blacklisted-media-players option – Yay Canonical!

Double-click on the text box next to blacklisted-media-players and go to the end of the text entry box and enter a comma (,). Then, just paste in the media players you cut from interested-media-players:

Paste in what you cut previously and you're good to go!

Paste in what you cut previously and you’re good to go!

Again, click outside the text box and the changes will be made automatically. You won’t see any change to the menu at that point, but those players listed won’t ever be allowed to put themselves into the Sound Menu again!

The result of this menu slimming:

Much better - I may even be removing more later

Much better – I may even be removing more later

Conclusion

Not everyone is going to use this, but when I read about it (originally on OMG! Ubuntu!) it was a fix for something that had been bugging me for a while and I figured I’d do a write-up while I fixed it myself!

Leave a comment down below telling me what you thought of this post and/or about any things that have been bugging you about Ubuntu/Unity that you’d like me to post about!

Tagged , , , , , , ,

Ubuntu Tech Snippet #9 – Change out the Unity launcher icon

One of the great things about Ubuntu is that it is so customizable. And one of the most commonly customized features is the theme. I currently run the Numix Circle icon theme with the Numix system theme. You can see an example below:

themes

Numix Circle Circle Icon Theme w. Numix Window theme

This screenshot doesn’t really show off the circle element of the icon theme, but this next screenshot does:

unity launcher w. numix circle

Unity Launcher with the Numix Circle icon theme

As you can see, the application icons are circular (thus, Numix Circle.)

Yay, cool. Icons. What’s the Tech Tip?

If you notice at the top of the panel (second screenshot) the BFB (Big Freakin’ Button) isn’t the normal Ubuntu 14.04 version. It’s a flat, circular version that fits much better with the Numix Circle icon theme than the default:

unity launcher icon 14.04

Unity Launcher Icon – Ubuntu 14.04 Default

Obviously, the first, flat icon would (and does) fit with the theme a lot better. So, I went a-searching on how to change out the Unity launcher icon (aka, the BFB) and found one that fit.

There aren’t any automatic ways to do this. However, the manual process isn’t that complicated, involving just copying and renaming a few files.

The Process

To change out the BFB, open up either Terminal or the file browser. As a side-note, you’ll need the ability to run commands as root via sudo. If you don’t have these rights, this tutorial won’t work for you, sorry 😦 Also, these actions set the icon for the entire system, I have yet to find a user-specific way to do this.

I suggest using Terminal (Ctrl+Alt+T) and that’s what this tutorial will be via, though some people may find the file browser easier. If you do decide to use the file browser, you’ll need to launch it with root privileges, which you can do via pressing Alt+F2 and then entering

gksudo nautilus
If you are using the file browser and run into issues, please feel free to ask for help, I’ll try to help as I can.

In Terminal, you’ll need to get to the directory your replacement icon is in. If you downloaded it via Firefox or Chromium, it’s probably in your ~/Downloads folder.

Get to the folder that the icon is stored in via the command

cd WHATEVERFOLDERITSIN/FILEHERE.png

Make sure the icon you downloaded is an .svg or .png, as those tend to work the best. You can find the file’s location by finding it in the file browser and then right-clicking and selecting Copy.

Menu_081

Then, go into the terminal and type in sudo cp and then select Paste Filename

Menu_082

This will make the terminal look like this:

nate@excelion-Satellite-A105: ~_085

Without pressing enter, press Space and enter the following:

/usr/share/unity/icons/launcher_bfb_new.png

Your terminal should now look like this:

nate@excelion-Satellite-A105: ~_087

Go ahead and press enter, and you should be prompted for your password. Enter it in and then press enter again and it should instantly copy the file. If you’re get an error, make sure you put in all of the file names and paths correctly, maybe you entered cd where it should have been cp (those two are very easy to mix up, believe me, I do it all the time.)

Next, enter the following command:

sudo cp /usr/share/unity/icons/launcher_bfb.png /usr/share/unity/icons/launcher_bfb.bak && 
sudo cp /usr/share/unity/launcher_bfb_new.png /usr/share/unity/icons/launcher_bfb.png

This will create a backup of the original BFB (always, always, always make a backup when messing with system files) and then set your BFB icon as the default BFB icon.

Conclusion

Once you complete all of these steps without any errors, you should log out and back in again, and your new icon should be in place! If you have trouble understanding this tutorial, or get stuck somewhere, or get some strange error, comment down below and I’ll try my best to answer your question for you!

Tagged , , , , , , ,

Ubuntu Tech Snippet #8 – Copy and Paste in Terminal with the keyboard

What’s the big deal?

One of the many things that power users use to be more efficient on their PC is using the mouse as little as possible. The less clicking and movement, the better. At least, that’s how I prefer it. If I’m working on coding or writing (like this blog post, for example!) and I can keep both hands on the keyboard and not have to mess around, clicking on stuff, then I’m far faster.

Thus, this shortcut/tech tip was awesome when I found out about it! Normally, when using the Ubuntu terminal, one would have to right-click and then choose copy or paste. While this may not seem like that much to your average user, being able to lose that extra three/five seconds when doing lots of research, debugging, or simply following instructions on a tutorial, can be a big deal.

How doth this worketh?

This tech tip is quite simple, comprising of two different keystroke combos.

First up, is the terminal version of Ctrl+C. You simply tack on the Shift key in that sequence, so it is now: Ctrl+Shift+C. Basically, it’s the normal keyboard shortcut for copying, with the Shift key added on.

That’s right, it’s that simple. Normally, pressing Ctrl+C in a terminal window would terminate whatever program was being used. Adding that shift key makes it so that the terminal ignores the normal useage of Ctrl+C, and uses it in the GUI fashion.

And the paste shortcut is exactly the same. Simply take the normal paste shortcut Ctrl+V, and add the shift key after the Ctrl key: Ctrl+Shift+V.

Conclusion:

That’s all! While this may not benefit everyone, and it most definitely won’t, I know it will be useful to someone, if even just me.

Make sure to comment down below with any tips of your own you want to submit!

Tagged , , ,

Ubuntu 14.10 Wallpaper Contest Winners Announced!

A little while ago I did a post on my Top 20 Favorite Ubuntu 14.10 Wallpaper Contest Entries. Well, the time has rolled around to where that contest has been closed, and judged, and the winners announced!

While the list of my favorites doesn’t match up image-for-image with the final results, several of my choices have been chosen. Ubuntu 14.10 has a great set of 12 wallpapers from the community. Congratulations to all of the winners! Some of the wallpapers shown below are connected directly to the Flickr page for that photo (the ones that made it that we featured) but most of them aren’t, they’re just thumbnails. There’s a link at the bottom to download all of these in both .zip and .deb files.

Without further ado, here the 12 winners are!

  • xgu472hf2 by lariliikala

    Night

  • Music by Tomáš Kijas

    Music...by tomasino.cz

  • Redes de hilo (Rocky Hills) by Juan Pablo Lauriente

    Redes de hilo

  • Sunny Autumn by Joel Heaps

    Sunny Autumn by Joel Heaps

    Sunny Autumn by Joel Heaps

  • Warm Grasses by dcsearle.t21

    Warm grasses by dcsearle.t21

    Warm grasses by dcsearle.t21

  • Night Seascape by Davor Dopar’s

    Night Seascape by Davor Dopar

    Night Seascape by Davor Dopar

  • Mascot Wallpaper

    Utopic Unicorn  by Bedis ElAchäche

    Utopic Unicorn by Bedis ElAchäche

  • Empty Space by Glenn Rayat

    Empty Space by Glenn Rayat

    Empty Space by Glenn Rayat

  • Kronach Leuchtet by Brian Fox

    Kronach leuchtet 2014 by Brian Fox

    Kronach leuchtet 2014 by Brian Fox

  • Golden Leaves by Mauro Campanelli

    Golden leaves by Mauro Campanelli

    Golden leaves by Mauro Campanelli

  • Sand & horses by M. Siewert

    Horses on sand dunes by Matthias Siewert

    Sand & Horses by Matthias Siewert

  • Life Nomadic by Sal’

    salcantayperu by Life Nomadic

    salcantayperu by Life Nomadic

    These are great wallpapers, the Ubuntu community has done an outstanding job this time around. These will come installed with Ubuntu 14.10, but for those who don’t want to wait, here are the links to the .deb installer and .zip file.

Tagged , , , , , , ,

Ubuntu Flavors 2nd Alpha Released

As many of you may know, the Ubuntu release cycle has various pre-releases along the way starting with first and second Alpha, moving on to first and then final Beta, and then the release candidate. The second Alpha release, which only the flavors take part in (not vanilla), has been released today.

Kubuntu, Lubuntu, Ubuntu GNOME, and Ubuntu Kylin all have been released as second Alpha, though Xubuntu sat this one out. You can now download the updated .iso files for testing from their respective pages, which I will link to later.

As with all pre-release software, it isn’t suggested you replace your current installation on any production machines, as there is still a chance there is a system-breaking bug in the code somewhere. It is also still in the Alpha phase, which means you will almost definitely run into some bug somewhere, so be prepared for bug testing and fixing if you do go ahead try this release out.

Although all releases gain from internal changes, each project has its own special changes. Here’s the most major ones:

Distribution-specific changes:

Ubuntu GNOME 14.10 Alpha 2 has the new GNOME shell 3.12 and two new apps, Weather and Maps, (Hey, that rhymes!) that come installed by default.

Ubuntu Kylin 14.10 Alpha 2 has a new version of the Ubuntu Kylin software center, 0.3.2, and now includes the open-source note-taking application Wiznote to the pre-installed defaults.

Kubuntu 14.10 Alpha 2 has an upgraded version of the KDE platform, the 4.14 beta, which is actually the third beta release in the series, but is only the first change to be made post feature-freeze, and is mainly focused on bug fixes and giving the interface a polish.

If you’re feeling really lucky and adventurous, there are images available for trying out the new Plasma 5 desktop.

and, last, but still the favorite for many people, Lubuntu 14.10 Alpha 2 is pretty mundane, just various stability improvements and some package updates.

Beyond Second Alpha

The next milestone will the the first Beta, which is due for arrival for all flavors (except Vanilla Ubuntu) on the 28th of August. Beyond that is the final Beta, on September 25th, which all flavors and vanilla Ubuntu take part in. And finally, Release Candidate on October 16th, which is the last pre-release before the official release of 14.10 on October 23rd, 2014.

OMG Ubuntu has a great graphic for showing the release schedule visually on their post.

Tagged , , , , ,

Ubuntu Tech Snippet #7 – Find the remaining disk space in all mounted partitions

Many people have several partitions on their systems for different OSes or even different partitions within one OS. This tech snippet is an easy way to find out how many more videos, applications, songs, and documents you have space for.

First off you need to start up a terminal window, you can do this by pressing Ctrl+Alt+T.

terminal

Empty Terminal Window – Open via Ctrl+Alt+T

Next, enter the command:

df
df terminal

Terminal Window running the df command

This brings up the results you see in the image above. However, seeing space available in 1K blocks can be relatively useless for the average user. So, here’s a flag you can add to make the output slightly more understandable:

Clear the terminal screen (clear) and run the df command again, except this time, include the -h flag:

df -h

 

df -h terminal

Terminal window running the df -h command

This flag, which stands for Human readable, takes the 1k blocks from regular df and converts the to slightly easier-to-understand units like Megabytes and Gigabytes. All of the columns remain the same, just the units have changed. As you can see in the screenshot above, I have a 36GB partition with 34GB used and 565MB available.

While not particularly useful for the average user, it is a very handy tool for more advanced Ubunt-ites and for systems (like servers) without GUIs, this becomes a must-have tool.

Tagged , , , , ,

I previously did a Tech Snippet on how to give Firefox native notifications, which you can read here, if you already haven’t. This post is similar to that in that it will show you how to set up native notifications on another application. However, this time it doesn’t require an addon/workaround, it’s a default (albeit un-enabled) setting, on everyone’s favorite open-source media player, VLC.

vlc media player with native notifications

VLC Media Player with Native Notifications – Just started playing a song

VLC is a great piece of software and has the reputation for playing just about anything you throw at it. It has a slew of features, half of which most users don’t even know exist, like screen-recording, audio/video conversion, play YouTube videos, subscribe to Podcasts, play Internet radio, apply effects – both Audio and Video, and even, for your geeky side, play videos in ASCII characters.

Enable Native notifications for VLC on Ubuntu

It’s really pretty simple, it only takes six steps to get this working. Maybe not as simple as installing an addon for Firefox, but still pretty easy. You won’t have to download anything or mess with hidden configuration files, just enter the domain of super-(not)-secret-settings.

First off with VLC open, click on the Tools menu and the select the Preferences menu item.

vlc settings

VLC Settings – Set to All

The preferences window will open, you should look to the bottom-left-hand corner for the Show settings radio buttons. They are labelled Simple and All and you need to change/make sure that it is set to All.

Now, there are a lot of settings you can change. So, instead of playing setting-sweep, we’ll just search for notify. That’ll bring up a much smaller list of results, of which you want to select the Control interfaces option. Then, check the LibNotify Notification Plugin checkbox.

vlc settings - control interfaces

VLC Settings – Control interfaces – Select LibNotify Notification Plugin

And that’s it!


You may notice that my pop up in the first screenshot has just the VLC logo (don’t let the Numix Circle icon through you off,) while the album art shows in the window. I think this may be because VLC isn’t minimized. It does appear if VLC is minimized.

Also, I’ve noticed that the notification will update if new information is found about the current song, and if you skip through several songs in a row the notification will show all of those notifications (changing every few seconds) until they are fully updated. This can be a bit annoying, though if you don’t skip through songs quickly you’ll be fine.

Ubuntu Tech Snippet #6 – Add native notifications for VLC

Tagged , , , , ,

Warning! You WILL want to turn your volume down if you are wearing headphones. You run the following commands at your own risk, I cannot confirm the safety of your ears.

Another Ubuntu Tech Snippet inbound! This one is a bit bizarre, I must say, and rather geeky.

The actual idea is pretty simple, you just run a command in terminal and pipe it through aplay. You can take this and try any commands you want, but the commands I list are the ones that I have heard actually play something more than a two-second electronic squelch.

I originally found out about this on Unix/Linux Stack Exchange. First thing to do is run the command

dmesg | aplay

which runs the dmesg (which, from the man page,  examines or controls the kernel ring buffer) command and then pipes the output into aplay, the command-line music player. In this case there are no flags on the dmesg command, so it just reads all the messages from the kernel ring buffer.

By piping the output from dmesg into aplay you will be getting the audio interpretation of whatever data dmesg returns. It will vary between computers, so don’t blame me if your speakers, earbuds, headphones, or eardrums explode because of the interpretation of raw std data. I didn’t do anything horrendous to my system, so you should be safe. Emphasis being on should – I’ve not tested or researched any chances of damage.

Another fun one to play is

ls -l | aplay

in the home directory, especially if you installed lots of software that has config folders/files in the home directory.

This is a Tech Tip that really has no real application, it’s just fun.


One final thing to try if you suddenly become addicted to raw data musically represented

Run

ls -R | aplay

in your Documents directory and have fun listening to the ear-splitting screeches of your computer’s innards. Because the -R flag on ls recursively lists subdirectories within the currently directory, this command can go on for quite a while. Just a warning.

Ubuntu Tech Snippet #5 – Hear what terminal commands “sound” like

Tagged , , , ,
%d bloggers like this: