Category Archives: Software

Ubuntu Tech Snippet #13 – Get your public IP in terminal

Sometimes when you’re working on a project or are SSHed into a remote server, you need to find out the public IP of the device, without using a GUI web-browser.

I had to do this while working on setting up a script on my server, and came across this neat little command that will grab your public IP and print it nicely out for you to use!

All you have to do is run echo $(curl -s https://api.ipify.org) and you’re good to go!

Output from echo $(curl -c https://api.ipify.org)

Output from echo $(curl -c https://api.ipify.org)

You can also do this programatically. In python you can run this code to get the result as a JSON object:

import requests
session = requests.Session()
ret = session.get('https://api.ipify.org',
                   params={"format":"json"})
print ("Public IP Address:",ret.json()['ip'])

You’ll need to install the Python Requests module. This can be done either via pip. Just run sudo pip install requests. You can technically install it using easy_install, but please, please don’t. Just use pip.

And that’s it!

Thanks for reading! If you have any tips of your own, leave them as a comment down below and I’ll be sure to take a look at them!

Tagged , , , ,

Fixing GPG ERROR NO_PUBKEY on Ubuntu 14.04

I recently was working on installing pipelight-plugin so I could get the Unity3D plugin working on my Ubuntu desktop. Getting that working is another subject, but part way through the installation process I ran into an issue.

Part of what I had to do to install the Pipelight plugin was add a PPA; ppa:pipelight/stable to be exact. Normally, this would be totally fine. After I ran sudo add-apt-repository ppa:pipelight/stable, I ran the usual sudo apt-get update so I would have up to date software lists.

However, at the end of the output from the apt-get update command I noticed that there were a whole bunch of

GPG ERROR NO_PUBKEY : WARNING: The following packages cannot be authenticated!

errors!

This had been happening previously, but it was only the Virtualbox PPA, so I figured that their GPG public key had expired or been removed for whatever reason, and so didn’t give it any more thought. But now there were at least 5, if not 10 of these errors, including for various PPAs that I was fairly certain wouldn’t let their key expire.

Again, I continued working, thinking it strange, but not dangerous. However, then I started seeing

WARNING: The following packages cannot be authenticated!

when I was attempting to install new software or update via apt-get upgrade.

Now I knew something was up. So, I started researching via our ever-present and usually quite useful overlord, Google. While I did come across several Ask Ubuntu answers, it finally took a combination of four different answers (here, here, here, and here) and a Launchpad bug report to come up with the solution.

Basically, there is/was a bug in apt-get where it will return GPG ERROR NO_PUBKEY : WARNING: The following packages cannot be authenticated! for PPAs, even when the key is present on your system.

This leads to the WARNING: The following packages cannot be authenticated! error. From what I have seen, it doesn’t actually cause any issues initially, but it’s still good to resolve issues like these if possible.

So, I tried just running sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys x x x x x replacing the x with the public key number for the various “missing” keys, as recommended by this Q/A.

However, I still got the NO_PUBKEY error, along with a bunch of new ones that all said gpg: keyblock resource '/etc/apt/trusted.gpg.d/X.gpg.gpg': resource limit (replacing X with the various GPG files.)

So, I tried the solution suggested here, running sudo apt-key update followed by sudo apt-get update.

Again, I received the NO_PUBKEY error. So, I moved on to the final Q/A I found. The answer pointed me to Launchpad Bug #1263540, which had two solutions.

The first was to run this series of commands:

  1. sudo apt-get clean
  2. sudo mv /var/lib/apt/lists /var/apt/lists.old
  3. mkdir -p /var/lib/apt/lists/partial
  4. sudo apt-get update

However, this returned the same error. Again.

So, I scrolled down a bit further, and found this comment. This solution is what ultimately resolved the issue for me.

I went into /etc/apt/trusted.gpg.d/ and manually deleted a few of the .gpg files for PPAs I had removed/didn’t use anymore and voilà! running apt-get update worked and apt-get upgrade no longer complained of un-authenticated packages.

As for what was causing this, it turns out that GnuPG has a limit of 40 keys GPG keys. Beyond that, it won’t accept any more.

Because apt-get/add-apt-repository don’t remove old and unused PGP/GPG keys, I had met the 40 key limit. When I removed the few un-used keys it brought the count under 40 and the issue was resolved.

Although there was a fix released for this in October of 2014, it has, for whatever reason, not been back-ported to Ubuntu 14.04, thus causing the issue I was having. According to this Debian bug report the package that contains the fix (libapt-pkg4.12) has not yet been back-ported to 14.04 as of June 2015, so anyone who runs into this issue is going to have to use this workaround in the meantime.

TL;DR: If this happens, then go into /etc/apt/trusted.gpg.d/ as root and delete any .gpg files for PPAs you have disabled. Then, run sudo apt-get update and everything should work again!

Thanks for reading, let me know if you run into any issues down in the comments section and I’ll if I can help!

Tagged , , , , ,

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.

 

Tagged , , , , , ,

Fixing the infamous wallpaper and mouse Ubuntu 14.04 bug

I recently blogged about the trial and tribulations of installing the NVIDIA graphics drivers on my Ubuntu 14.04 system. And, although I had much better performance, my ventures into the underground world of drivers and bugs was far from over.

I had been happily using my deskop with my newly installed NVIDIA drivers – no problems whatsoever. I shut down after a while because I was done with what I was doing and left my PC.

I came back a while later, started up the system, logged in, and it just sat there. I waited about 5 minutes and was becoming really worried, because this computer definitely should not take more the 20 seconds tops to log in. All that was showing up was the wallpaper and the mouse – no Unity menus or anything. I rebooted several times, same thing – wallpaper and mouse, but no GUI.

By this time I was freaking out. The last I thing I wanted to deal with was having to reinstall and lose all the time and effort I had spent getting this system where I wanted it. I booted up the LiveUSB stick I always have with me and started looking at solutions online – all of which required terminal access – something I didn’t have.

I tried everything from installing GRUB Repair to the LiveUSB and using that to add the nomodeset flag to GRUB, to using chroot to attempt to run commands off the LiveUSB to affect my system – neither of which worked.

By that point I actually had to go somewhere, so I had to shutdown the computer and leave it be for ~30 minutes. After I came back I started up the computer and, for whatever strange reason, now had access to the TTYs. I had no clue why waiting half an hour changed something – but it did.

This was quite calming because I knew that once I had access to a TTY I could fix basically anything. I started trying out solutions again. I looked at tons of different posts on various sites, namely Ask Ubuntu, but also the Ubuntu Forums and Launchpad.

I ended up coming across this question, here, and worked my way through those solutions.

I tried resetting the desktop as per the first, second, and sixth fixes listed – none of those work.

I then the third solution, purging and reinstalling ubuntu-desktop, compizconfig-settings-manager, upstart, and unity. I did this via sudo apt-get install --reinstall ubuntu-desktop unity compizconfig-settings-manager upstart – but nothing happened.

I then tried the fifth fix, clearing Unity, and that brought some improvement. I rebooted after running those commands and I had desktop icons back! Yay!

However, it still wasn’t totally fixed, and the only solution left was the fourth one.

I had held off on the fourth fix, because the Xorg-edgers PPA is a bleeding edge repository and so it can be dangerous to system stability. I was trying to fix a problem, not make it worse. However, after working through all of the other solutions, and having no results, I was left with the only choice of adding the repository.

So, I added the repository, ran sudo apt-get update and then ran sudo apt-get install nvidia-340. I rebooted, and had a working system. Because of the fact that I had removed all the configuration files previously, I had lost my background and icons that I had pinned to the dash, but that wasn’t an issue.

I removed the Xorg-Edgers PPA via sudo add-apt-repository --remove ppa:xorg-edgers/ppa -y, just to make sure that I didn’t have any updates in the future to break my PC. Hopefully, this is the last of driver derping I’ll have to do for a while.

Make sure to leave a comment saying what you thought of this post, and tell any experiences you’ve had with drivers and NVIDIA with Ubuntu!

Tagged , , , , , ,

Installation of proprietary NVIDIA drivers on Ubuntu 14.04.1

I recently built a brand new PC – which was awesome – with an i5-4690k, 8GB RAM, and a EVGA GeForce GTX 750 Ti GPU.

Now, for basic work, the open source Nouveau drivers work just fine. However, this system was made to be a high performance video editing & graphics rig – so I wanted to have the best performance possible; and NVIDIA’s proprietary drivers provide the best performance.


Normally, one could simply open up the Additional Drivers tab in Software & Updates, but my system, strangely, said there were no drivers available:

Screenshot from 2014-12-16 17:50:06

This was very strange, as I knew that there should be something listed there.

So, I took to Stack Exchange. The Stack Exchange network, in this case specifically Ask Ubuntu, is an amazing tool and has helped me countless times. I was talking with a couple of more advanced Ubuntu users (if you’re on Ask Ubuntu – Seth & Mateo) and we managed to find a solution – though it was rather hacky to say the least.


Tricks, Traps, and Hackery

When I say the solution was hacky, it’s not hacky in the form that I was piecing together drivers and compiling my own kernel – it’s that it was hacky because of the amount of steps it took to complete what should have been relatively simple.

First off, I tried running updates. That should be the first thing you do when debugging an issue, unless of course there is a known issue with an update that’s even worse. Then you might want to skip the update. That didn’t help any, still nothing was shown.

Next up, I looked around at other solutions to the same problem. As I soon found out, this is actually a fairly common bug in 14.04, with the NVIDIA drivers not showing up. Most of the solutions involved enabling the Xorg-Edgers PPA – something I wasn’t totally comfortable with, since the Xorg-Edgers PPA is a bit bleeding edge and I didn’t want to mess with the black screen bugs it has been known to cause.

So, I went on and decided just to go with the drivers straight from NVIDIA. Granted, they aren’t as community tested as the ones from Ubuntu, but they’d do the trick. So, I downloaded the newest stable .run file from NVIDIA for my GPU (you can access it here, if you need to – I believe this is the page with the newest drivers.)

Once the driver installer had downloaded I tried to run it from a terminal (Ctrl+Alt+T), but got this:

Screenshot from 2014-12-21 13:36:18

Obviously, I had to run the command when an X server wasn’t running. Pretty simple stuff – just pull up a TTY, kill lightdm, and you’re golden! Right? Wrong.

For whatever reason, there was/is a bug with the Nouveau drivers I had that meant I couldn’t access a TTY (nothing displayed), unless I booted with the GRUB flag nomodeset. Again, big deal. Just add the flag and reboot. Well, it’s not that simple. Turns out that when I added nomodeset I did get the TTYs…but my GUI was all messed up. So, I removed the GRUB flag nomodeset and rebooted. No TTYs but a working GUI. I guess it was choose your own poison day at Canonical.

This is where the awesome guys on Ask Ubuntu come in. I popped on over there and we started working together to figure it out.

The first solution that was suggested was running the command sudo init 1 command, which was supposed to take me into single user mode with just a command line – nothing else. However, for reasons unbeknownst to me and the other users trying to help me, I was simply being shown the Ubuntu boot splash and nothing else. Yet another issue.

So, that theory went out the window.

Now, you’re probably wondering – why didn’t you just boot with the nomodeset GRUB flag, install the drivers, and the remove the nomodeset flag? Honestly, I don’t know why I didn’t do that. After trying a few other things with init I booted with that flag, killed lightdm via sudo killall lightdm, and ran the installer. There was actually a warning that came up saying that a script had failed – but I ignored that (one of the other users said they’d had the same thing & just ignored it – no problems).

I removed the nomodeset flag, rebooted, and had a working desktop with decent FPS. Actually, quite awesome FPS – especially compared to my old laptop. Just to give you an idea of the performance increase it gave me – remember that I had said I wasn’t getting more than 20 FPS in Minecraft? Well, a picture is worth a thousand words:

fps

That’s with the render distance set to 14 and the graphics cranked all the way up. I had just barely loaded up the world and so was having lots of chunk updates. Once the world had fully loaded I could get well over 150 FPS stable on render distance 25 & everything fancy.

Now, I know that Minecraft isn’t exactly the crown gem of gaming prowess – far from it actually – but it’s what I had. I don’t game much, so my library is very limited and I don’t have any intensive games.

But yeah, that’s my experience/process with/that I took installing NVIDIA graphic drivers on Ubuntu 14.04.1. Not sure if it’ll help anyone much, but it’s what I had to do and I figured I’d blog about it!

Now, this didn’t actually fix the bug with the Additional Drivers not showing up correctly – I actually had another issue occur later on with Unity not loading correctly (I think I must have rebooted at an…inopportune time) and the solution for that (which I’m also going to be writing about) actually fixed it.

Make sure to comment below with any experiences you’ve had with graphic drivers and tell me what you thought about the post!

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 14.10 has been Released!

That’s right everyone, it’s that time of year again. When the internet is humming and servers are busy serving downloads, a new Ubuntu version is released. And this time… Unicorns!

Yup, the curiously named Utopic Unicorn release, 14.10, is live on the Ubuntu servers and upgrade notices should be sent out to everyone who is set to get them. If you’re curious about how to upgrade, I’ll be doing another post later, explaining how to do it and what to do after upgrading/installing Ubuntu 14.10. You can read it here (post coming soon!)

What’s New?

This release is a bit, well, underwhelming. It’s more of an update, stability, security release, with no major changes to user experience or included software. Kinda sad for a release occurring over the same week as Ubuntu’s 10th birthday.

And this may not be bad, as it, hopefully, means that Ubuntu 15.04 Versatile Vervet will have plenty of features and new stuff!

Obviously, the usual changes occurred; new community backgrounds – though no new default one and the change of the release number and code name through-out the system.

But, beyond that, there isn’t much. For the developers a very useful addition is the inclusion of the Ubuntu Developers Center. This is very useful, as it simplifies the process of installing the Android SDK and all the dependencies and addons and whatnot, with a single command.

There are a few major software release upgrades, namely the upgrades for the default software to:

  • LibreOffice 4.3.2.2
  • Firefox 33
  • Thunderbird 33
  • Nautilus 3.10
  • Evince 3.14
  • Rhythmbox 3.0.3
  • Unity 7.3.1

Also, the Linux kernel has been updated to Linux Kernel 3.16, which offers support for the latest Intel CPUs (Haswell and the upcoming Broadwell architectures, better support for NVIDIA and AMD graphics, and improved audio via the Radeon H.264 video decoder.

Consensus time

All in all, Ubuntu 14.10, in my opinion, is a solid OS that could probably serve as an LTS release. For users worried about stability, 14.10 would be a fine, although the nine month support cycle may be a hastle that users might not want.

There are very few major changes, and, if for no other reason, upgrade because of the wallpapers. This set is probably my favorite yet.


Upgrade anyone?

You can simply upgrade via Update Manager, though you may have to enable upgrade notifications for non-LTS releases. Here’s how you can do that:

Open the Unity dash by pressing the Super button (Windows button for all you non-l33t Ubuntu users). You can also click on it, just so long as you can open the Unity dash.

Once open, search for Software & Updates and select the first option that comes up. This is what it looks like on my system, with the Numix Circle icon set – it will probably look different on your system unless you have the same icon set:

Selection_091

Once the application opens up, click on the Updates tab:

Software & Updates_093

As you can see, on my system the option Notify me of a new Ubuntu version is set to For any new version. If you want to receive a notification when a non-LTS version is released you need to make sure that you have it set the same as I do, For any new version.

Simple Version:

  • Search for and open Software & Updates
  • Click on the Updates tab
  • Find option with the label Notify me of a new Ubuntu version
  • Change the selection in the drop-down menu from For long-term support versions to For any new version

Fresh Install

Of course, you can download the ISO file for Ubuntu 14.10. There are all the usual options available on the Ubuntu site. Here are the links to the Ubuntu 14.10 Desktop (64 bit) Torrent and Ubuntu 14.10 Desktop (32 bit) Torrent

Comment down below with what you think of the Utopic Unicorn and whether or not you’ve upgraded yet, plan to upgrade, or are just going to jump from the current LTS release (14.04 Trusty Tahr) to another future release or the next LTS release (16.04).

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 , , ,
%d bloggers like this: