Showing posts with label tips. Show all posts
Showing posts with label tips. Show all posts

Monday, October 17, 2011

How to disable the guest account in Oneiric

Ubuntu 11.10 now ships with the guest account available at the LightDM login screen.

This new feature isn't really a security issue, since by default using it requires physical access, and it is confined with an AppArmor profile. If an attacker has physical access to your laptop, all bets are off.

The guest account can be disabled by editing /etc/lightdm/lightdm.conf and adding "allow-guest=false" to the "SeatDefaults" section.

Sunday, November 7, 2010

Netbook screen resolution

I love my Dell Mini 9.

I'm back from UDS in Orlando, and have once again spent a whole week on my Mini 9. It's got a webcam so I can call home, and has bluetooth so I can use an external mouse without plugging in a dongle when the need arises. Although I've tried netbooks with 92% keyboards, I'm not ready to sacrifice portability by adding the extra 2 inches required to fit them. The keyboard on the Mini 9 has the perfect feel for such a small keyboard, and I've gotten quite used to it.

The only thing I can't quite get used to is the native screen resolution: 1024x600 is not a lot of screen real estate to work with.

The other day I was looking at the xrandr documentation, and I noticed it supports screen scaling. I now regularly use the following command:

xrandr --output LVDS1 --scale 1.25x1.25

This scales my 1024x600 netbook screen to 1280x750, which is really cool when trying to view large web pages, or any other application that uses a lot of screen space. The downside of this is a slight blurriness that is, in my opinion, an acceptable trade-off.

Unfortunately it doesn't look like there's a way to set scaling in the GNOME Monitor Preferences tool.

Thursday, October 7, 2010

Stuck on dial-up (Updated)

My mother has been a happy Ubuntu user ever since I installed Dapper to solve the countless problems she was having with Windows Me. Since her computer is starting to age, and she's a 5-hour drive away, I bought her a brand new computer for her birthday, which I've been installing with Lucid this week.

Problem is, she is still stuck on Dial-Up internet access no matter how hard she's tried to get broadband from the local phone and cable companies.

Unfortunately, NetworkManager still doesn't have 56K modem support, so a few steps are necessary to setup Ubuntu for dial-up.

Since her phone line is noisy, I purchased a reliable modem that doesn't need special drivers to work in Linux, along with an appropriate USB-to-serial adaptor.

Once I made sure the modem was visible by searching through dmesg for the right serial port, and testing it with minicom, I performed the following steps:

  1. Installed the gnome-ppp package
  2. Added her user to the "dip" group so gnome-ppp could spawn the pppd daemon
  3. Configured gnome-ppp with the phone number, username and password provided by her ISP

Once that was done, connecting to the Internet worked great, except for a single problem: Firefox would always start up in "Work Offline" mode. It turns out Firefox uses NetworkManager to figure out if an Internet connection is available when it starts. To fix this:

  1. Type "about:config" in the Firefox URL bar
  2. Search for the "toolkit.networkmanager.disable" key
  3. Switch it to "true"

I'm looking forward to seeing her go from Hardy to Lucid this weekend!

Updated 2010-10-22:

So, I ran into a couple of extra difficulties when I actually installed her new computer. It seems her ISP uses CHAP or PAP to authenticate which wasn't the case when I tried connecting with my ISP at home. Gnome-PPP uses WvDial to perform the actual dialing, and WvDial tries to add the necessary authentication information itself to the /etc/ppp/pap-secrets and /etc/ppp/chap-secrets files. Problem is, those files are owned by root and are 600 by default. The pppd man page states "this file should be owned by root and not readable or writable by any other user. Pppd will log a warning if this is not the case.", so this isn't an easy problem to solve. Since I didn't want her running gnome-ppp as root, I changed both files' ownership to root:dip and permissions to 660. This allowed gnome-ppp to authenticate to her ISP, even though pppd is logging a warning.

The second problem I encountered was that Evolution would always come up as offline. Like Firefox, it integrates with NetworkManager to check if the computer is online. Unfortunately, unlike Firefox, Evolution doesn't seem to have a way to disable NetworkManager integration. Since time was limited, and I knew she wouldn't be using the Ethernet port on her computer, I simply disabled NetworkManager entirely by editing the /etc/init/network-manager.conf file.

My stepfather owns a Dell Vostro laptop with Lucid on it, and uses it to connect to the high-speed wireless network at work. He asked me if I could get a modem for his laptop so he could use Dial-Up when at home. I'm not sure how I will be able to handle this for now, as disabling NetworkManager won't be an option in his case...

Friday, February 26, 2010

Canadian tax software and Linux

Well, it's tax time again!

This used to be the part of the year I would dread. Not because I feared how much income tax I would need to pay, but because I knew I would have to get Windows running in a VM or on a spare computer in order to use tax preparation software.

I would get heartburn from wondering if the new flavour-of-the-day copy-protection mechanism the software used would actually work in a VM, and if it would let me open up my files again after reinstalling it if something went wrong. Top that off with the fact that trusting your important data to Windows is like locking your safe with duct tape, and I'd be popping Rolaids like candy.

Are all the security updates installed?
Every time I open "Windows update", it manages to find some more.

Is my antivirus software properly installed and working?
What if I got malware while purchasing the antivirus software online, before I installed it? Which one do I choose?

Oh great, the new version of the tax software uses Internet Explorer to update itself.

Luckily, a couple of years ago I discovered UFile.ca, a web-based tax preparation application. They even officially support Linux! It's quite refreshing to see a Tux logo right next to the Windows and Mac logos. It's even easier to use than the software I was previously purchasing!

Of course, it's web-based, so it's up to you to decide if you're willing to accept handing over your tax information to a third party. In my case, the decision was easy: I get to decide who can see my tax information, which is a lot better than hoping no one could see it.

Goodbye heartburn!

Tuesday, August 18, 2009

My God! It's full of stars!

Ever try hooking up a server or firewall with multiple network cards? You stand in back of it wondering which RJ45 port is eth0, which one is eth1...

Here's a little tip: you can make network card lights blink with the ethtool command:


ethtool -p eth0


You can make each card blink for 30 seconds in order with something like:


for net in eth0 eth1 eth2; do ethtool -p $net 30; done

Sunday, November 2, 2008

Launchpad search plugins for Firefox

If you work a lot with Launchpad, there is a package in the Ubuntu repos that adds Launchpad integration into the Firefox search box. The package is called "firefox-launchpad-plugin":

Launchpad firefox integration
Mozilla Firefox Launchpad integration add quick search for:
- Ubuntu bugs on Launchpad
- Ubuntu specifications on Launchpad
- Ubuntu packages on Launchpad
- Ubuntu support tickets on Launchpad
- People and team on Launchpad

Sunday, October 26, 2008

Adobe Reader fonts

Here's another PDF tip while I'm at it: how to fix broken fonts in Adobe Reader in Ubuntu Hardy and Intrepid.

It seems Adobe Reader doesn't use font-config by default. If you open a pdf file that uses Arial or some other font that is installed in font-config, Reader will still replace it with a generic Adobe Sans font. To turn on font-config support, modify the /usr/bin/acroread launcher script and uncomment the following two lines:

ACRO_ENABLE_FONT_CONFIG=1
export ACRO_ENABLE_FONT_CONFIG

Discovering QPDF

A friend of mine asked for help removing the restrictions on a PDF file he made a while ago. It seems he misplaced his original source file because of disk bloat and all that was left was a PDF file he created for the print shop. Of course, he couldn't remember the password he had used when he created the file.

A quick look through google came up with a simple solution: qpdf, available in universe:

QPDF is a program that can be used to linearize (web-optimize),
encrypt (password-protect), decrypt, and inspect PDF files from
the command-line.

Here's the command line that removed the PDF restrictions:

qpdf --decrypt infile.pdf outfile.pdf