BozoSort

yet another CS blog

Browsing Posts in Tips

I like Ubuntu. I like Chrome. I like being able to middle click my mouse wheel to scroll webpages. Unfortunately, Google decided that such a combination of nice things was just too great for the world. Fortuantely, there’s an extension to remedy this called AutoScroll. It is available in this hidden little corner of the internet: AutoScroll for Google Chrome – Works on Linux!

If you use Webmin to manage your server, you will eventually come across upgrades which will seem to ‘break’ your install. After upgrading, you’ll lose the ability to log in, and it seems as though the whole thing is just borked. In reality, you just need to restart the webmin daemon. Since this only happens when you reboot or start it manually, you’ll need to either reboot or start it manually.

At the command line, type (as root):

# /etc/webmin/start

After logging in you can verify the upgrade was successful and make sure that webmin starts upon system boot, just in case.

There are existing instructions on how to connect an Ubuntu (or any Gnome-Network Manager) machine to the University of Texas restricted campus wifi, but they are several years out of date. The interface has changed quite a bit over the past few years, and now no longer provides some default settings that the UT instructions relied on previously.

Here are the proper settings for the “updated” Network Manager:

Wireless Security: WPA & WPA2 Enterprise
Authentication: Tunneled TLS
Anonymous Identity: anonymous
CA Certificate: [the one you downloaded]
Inner Authentication: MSCHAPV2
Username: [your UT EID]
Password: [your corresponding password]

Network Manager UT WiFi

There are also instructions on the UT Helpdesk site for using wpa_supplicant to get yourself connected, but I strongly recommend not using that. I also don’t recommend using KDE’s network manager, as it sucks. hard. I have never tried to use Wicd, but I imagine if you use the same settings it will work just as well.

This guide is intended to help users who are trying to set up a printer on a linux machine, and then be able to print to that printer from a different linux machine

Whoever designed cupsys (Apple) must be pretty bad at making easy to use interfaces. By default, the cups web portal blocks.. everybody from accessing it, which makes setting up and using your printers over the network quite difficult. I mean really, how useful is a “403 Forbidden” anyway? The least they could do is give some better instructions on how to set the stupid thing up, but apparently the brief summaries provided in the man pages are enough to set everything up without any confusion what-so-ever.

So, if you’re in a position where you just installed cups daemon on your server, and you can’t even get to the configuration pages, I highly suggest taking a look at this configuration file.

But wait.. what’s so different about this config file and what do I need to do to make it work for me?

This particular cupsd.conf turns of every “safety feature” that is enabled by default in the standard cupsd.conf file. With this file, all you need to do is navigate to the print server on port 631 using your favorite web browser to setup your printer and drivers, among other things. To make it work for you, you need to edit every  Allow 192.168.1.0/24 so that it matches your own little dhcp world. Actually, if you’re using a Linksys router, or many of the other common routers, this file will probably work of the box for you. (If you’re thinking, “wait, my router is 192.168.1.1, so do I need to adjust?” Then the answer is no, you do not. The /24 takes care of that for you.)

Tip: before editing the file, I strongly suggest making a backup first. That way, if you really buggar things up, you can start with a fresh file rather than having to uninstall and reinstall cupsys altogether. To make a quick and easy backup, run the command:
sudo cp /etc/cups/cupsd.conf /etc/cups/cupsd.conf.original
In the event of catastrophic failure, restore the file with:
sudo cp /etc/cups/cupsd.conf.original /etc/cups/cupsd.conf

After you fix the cupsd.conf, you need to make the changes take effect by restarting the cupsd daemon. This is done easily by running the command:
sudo /etc/init.d/cupsys restart
If you see any errors, you probably made a typo in the config file. Fix them before moving on..

Now, navigate to the setup page by putting the local address of the host machine followed by :631 .
For example, my particular server is at 192.168.1.112, so to get to the setup pages I would navigate to http://192.168.1.112:631 . Hopefully you don’t have any issues with drivers for your particular printer. I did, but fortunately Brother (the best printer company in the history of the world) posts all of their linux drivers online with easy to follow install instructions. (Just involves using the dkpg tool for debian based systems, or the rpm equivalent for distros that use rpms).

If you can print the Test Page from the web-portal, you’re almost there. We also need to add the printer on the machine we plan to use on a daily basis and send print jobs from. Here’s the catch: on this mid – October day in 2009, it is not possible to use graphical tools in GNOME to make this happen. The “Add Printer” tools are extremely misleading in this aspect. If you look in the attached picture, you can see that I can see the network printer from the built in GUI tools, and even change its settings, but I cannot actually set that as a printer to print to(!).


So Close, Yet So Useless

So Close, Yet So Useless


So instead, on our own local machine, we need to edit /etc/cups/client.conf and tell it the address of the print server. All we need to do is add the line: ServerName 192.168.1.112 , adjusting the address to the assigned address of your own server of course. For a one-liner command to accomplish this:
sudo cat "ServerName 192.168.1.112" > /etc/cups/client.conf
If that command doesn’t work, just open it with vim or nano or emacs and add the line by hand..

I’m not exactly sure which service needs to be restarted to make the changes to this file take effect, so I just rebooted my own computer which worked perfectly :p .

If you still have trouble, leave a comment with a good description of your setup and I’ll at least try to help, but no promises! The forums of your respective distro are probably going to be the most helpful, or maybe LinuxQuestions.org.

**Bonus**
Setting up a windows machine (assuming Vista or 7) to use your linux hosted printer is actually super easy. Click Start -> Control Panel -> Hardware and Sound -> Add Printer -> Network Printer -> The printer I want isn’t listed
Then, copy and paste the URL for your printer into the “Select shared printer by name” box. (Click through the picture to see a larger version)


Windows Printer Forms

Windows Makes it Easy


WordPress Appliance - Powered by TurnKey Linux