Linux For Cynics One user's experiences with Linux

24Jul/150

Ubuntu 14.10 Has Reached End of Life, Upgrade to Ubuntu 15.04 Now

If you are still using 14.10, get with it:

sudo do-release-upgrade

I find the dist upgrade process to be painful enough to use only the LTS releases just to avoid it.

Tagged as: No Comments
8Aug/130

Ubuntu Phone Edge Fundraiser

Tagged as: , No Comments
8May/133

Restart VNC Server via SSH

This is handy if the VNC server isn't working but you can connect via SSH. These instructions are for Ubuntu, which comes with vino-server for VNC.

To kill the currently running vino-server (if it is running), use pkill:

$ pkill vino

Then to start it again,

$ export DISPLAY=:0.0
$ /usr/lib/vino/vino-server &

That works in Ubuntu 12.10. If using something else, replace /user/lib/vino/vino-server with the location of your VNC server.

24Apr/130

Install Wifi Firmware and WPA Support in Debian

Debian is a wonderful distribution but it is a bit strict on what it comes packaged with. Most wifi cards do not have open drivers, so you have to install them from the non-free repos. Here's now to install them and use them with wpa-supplicant.

First, we need to add the non-free Debian repositories. Add these lines to the /etc/apt/sources.list file:

deb http://ftp.us.debian.org/debian/ wheezy main contrib non-free
deb-src http://ftp.us.debian.org/debian/ wheezy main contrib non-free
 
deb http://security.debian.org/ wheezy/updates main contrib non-free
deb-src http://security.debian.org/ wheezy/updates main contrib non-free

Once the non-free repo is added, update and install the driver I need. You might need different firmware:

$ sudo apt-get update
$ sudo apt-get install firmware-iwlwifi

Also get the wireless-tools package:

$ sudo apt-get install wireless-tools

So we have the driver, but now we need to use it!

Since the iwlwifi module is automatically loaded for supported devices, we need to reload this module to access installed firmware:

$ sudo modprobe -r iwlwifi ; modprobe iwlwifi

Now we see if the device has an available interface:

$ sudo iwconfig

Yep! Mine is called wlan0. Connecting to a wpa secured wifi will be covered in the next post.

17Apr/130

Change the Hostname (Computer name) in Ubuntu

Changing your computer's name (also called the system's "hostname") in Ubuntu is simple. You just have to change two files and restart the computer. These instructions also work for Debian and Ubuntu-based distros (like Linux Mint). The files in question are /etc/hosts and /etc/hostname

1. Open /etc/hosts with sudo (or gksu if you're going to use something like gedit)

$ gksu gedit /etc/hosts

The file will look something like this:

127.0.0.1       localhost
127.0.1.1       current_hostname

Instead of current_hostname you'll see the hostname / computer name. Change it to whatever you want the new name to be. Save and close the file.

2. Open /etc/hosts with sudo (or gksu if you're going to use something like gedit)

$ gksu gedit /etc/hostname

This file just contains the hostname / computer name. Change it to whatever you want the new computer name to be. Make sure it matches the name you put in /etc/hosts. Save and close the file.

3. Restart your computer.

Tagged as: , No Comments
10Apr/130

Determine What Version of a Package is Installed on Ubuntu or Debian

If you want to find out what version of a package you have installed, dpkg will give you information concerning a package, including the version, if you use the "--status" option, like so:

$ dpkg --status packagename

where packagename is the package in question.

Now, it gives a lot more than the version.
For example,

$ dpkg --status openbox

Returns:

Package: openbox
Status: install ok installed
Priority: optional
Section: x11
Installed-Size: 1316
Maintainer: Debian QA Group 
Architecture: i386
Version: 3.5.0-7
Provides: x-session-manager, x-window-manager
Depends: libc6 (>= 2.2), libglib2.0-0 (>= 2.24.0), libice6 (>= 1:1.0.0), libobrender27 (>= 3.5.0), libobt0 (>= 3.5.0), libsm6, libstartup-notification0 (>= 0.7), libx11-6, libxau6, libxext6, libxinerama1, libxml2 (>= 2.7.4), libxrandr2, libxrender1
Pre-Depends: dpkg (>= 1.15.7.2)
Recommends: openbox-themes, obconf
Suggests: menu, ttf-dejavu, python, libxml2-dev
Breaks: menu (<< 2.1.12)
Conffiles:
 /etc/menu-methods/openbox 454ed1e8309e6fc60b0d16894d541dfd
 /etc/xdg/openbox/menu.xml 96647f77053f8d73987a6e2b77b18e8f
 /etc/xdg/openbox/rc.xml da6375c910abc7dfb69f26b6bd7deb70
 /etc/xdg/openbox/environment 34bbf463555dbfb8f97fe957489d73b7
 /etc/xdg/openbox/autostart 2e828424c93a51d910382b53a9729166
Description: standards compliant, fast, light-weight, extensible window manager
 Openbox works with your applications, and makes your desktop easier to manage.
 This is because the approach to its development was the opposite of what seems
 to be the general case for window managers.  Openbox was written first to
 comply with standards and to work properly.  Only when that was in place did
 the team turn to the visual interface.
 .
 Openbox is fully functional as a stand-alone working environment, or can be
 used as a drop-in replacement for the default window manager in the GNOME or
 KDE desktop environments.
 .
 Openbox 3 is a completely new breed of window manager.  It is not based upon
 any existing code base, although the visual appearance has been based upon
 that of Blackbox.  Openbox 2 was based on the Blackbox 0.65.0 codebase.
 .
 Some of the things to look for in Openbox are:
 .
  * ICCCM and EWMH compliance!
  * Very fast
  * Chainable key bindings
  * Customizable mouse actions
  * Window resistance
  * Multi-head Xinerama support!
  * Pipe menus
Homepage: http://www.openbox.org

So, to only see the version, just pipe the output of dpkg -status to grep, for example:

$ dpkg --status openbox | grep 'Version'

will output something like this:

Version: 3.5.0-7

Note, dpkg --status packagename can be replaced with any of the following:

$ dpkg -s packagename
$ dpkg-query --status packagename
$ dpkg-query -s packagename
Tagged as: , No Comments
18Mar/130

List Installed Packages in Debian or Ubuntu

In order to display the list of installed packages, use this command:

dpkg --get-selections

Chances are you have a lot of packages installed, so use grep to find something particular, for example, to see any packaged with the word "gnome" in their name:

dpkg --get-selections | grep gnome

Or, if you want to see how many packages you have installed, you can use the wc program:

dpkg --get-selections | wc

The first number is the number of lines dpkg output, and since there is one line per package, it is the number of packages installed.

4Mar/130

How to Add Wallpapers from Old Ubuntu Versions

My favorite background from Karmic

My favorite background from Karmic

The wallpapers included in Ubuntu are stored in

/usr/local/backgrounds/

. If you want to easily add wallpapers from older versions, like, 9.10 for example, all you need to do is run this command:

sudo apt-get install ubuntu-wallpapers-karmic

For other old Ubuntu versions, replace "karmic" with

  • precise for 12.04
  • oneiric for 11,10,
  • natty for 11.04,
  • maverick for 10.10,
  • lucid for 10.04,
1Mar/130

Install Oracle Java 7 in Ubuntu 12.10

Installing Oracle Java 7 in Ubuntu can be difficult to do by hand. The Webupd8 team has provided a very easy installer in the webup8team ppa. All you have to do is add that ppa:

sudo add-apt-repository ppa:webupd8team/java

And install the oracle-java7-installer:

sudo apt-get update
sudo apt-get install oracle-java7-installer

You might encounter a few dialogue boxes that ask you to agree to license terms.

All done!

After that, you should be able to invoke Java on the command line with java, or by right-clicking on a .jar in Nautilus and selecting "Open with Oracle Java 7 Runtime".

For example, to run a jar, called jdiskreport-1.4.0.jar, just right click on it in Nautilus:
java_naut
Or, in a terminal, type:

java -jar jdiskreport-1.4.0.jar
14Feb/130

Steam for Linux Sale

It's Tux...and things.

Valve is holding a Steam for Linux Celebration Sale! 50-80% off on all Linux games, till 21 Feb, 10 AM PST. Lots of games on that list. Not only that, but it's easier than ever to install Steam on Ubuntu, because Steam is now available in the Ubuntu repos! You can even install it from the Ubuntu Software Center. No scary terminal emulator to scare away new users.

I know what will attract many people to at least install Steam on Linux once is this little fella. That's right.  You get an in-game penguin item in Team Fortress 2 if you play it on Linux before the end of the month. It sounds silly, but TF2 players are silly people, and I know this will drive many of them to install Ubuntu just to get whatever this is.

tuxitem_1

I'm glad Valve is pushing Steam for Linux aggressively. I think targeting Ubuntu is a smart choice as well. However, if they are successful (and I hope they are), this means many, many new and possibly computer illiterate users coming from Windows. I hope the community can accommodate them with patience.

Ubuntu Linux is a great desktop OS. One of the communities that hasn't adopted it is gamers. I'm glad Valve is reaching out to them. If you're one and you haven't given it a whirl, maybe it's time to install Ubuntu & Steam and consider reformatting your Windows partition.

I promise you everything will go better than expected:

tuxitem_3