Printing HP Deskjet 1000

I was having trouble printing to my HP Deskjet 1000. When printing a test page, the print job would appear to work, without any error message in /var/log/cups/error_log . however, nothing would print from the printer.

Turned out to be a simple solution, I had to install hplip and hpijs

yum install hplip hpijs

apt-get install hplip hpijs

Odd that the (graphical) system configuration tool did not suggest installing those drivers.

Posted in Fedora, Linux | 4 Comments

Set a hostname in Fedora

I know I have not been very active lately, but I came across a convenient command line tool to set a host name in Fedora. While it is possible to set a host name by manually editing a few system files, I recently came across a command that makes it even easier.

sudo hostnamectl set-hostname $new_hostname

Just set “$new_hostname” to your desired host name.

Posted in Fedora, Linux | Leave a comment

Selinux and confined users

I admit to a paranoid streak and have been confining my users with selinux.

I confine almost all users as user_u

/usr/sbin/semanage login -a -s user_u $user

Users who need admin access I confine as staff_u

/usr/sbin/semanage login -a -s staff_u $user

There are 2 minor annoyances with this method.

First I like regular users to be able to ping. This is enabled as a boolean.

setsebool -P selinuxuser_ping on

And second, although staff_u can use sudo, they are still restricted by selinux. To allow unlimited access, add or edit /etc/sudoers.d/sudo to read

%user ALL=(ALL) TYPE=unconfined_t ROLE=unconfined_r ALL

Change “%user” to the user name you wish to allow unconfined root access.

Posted in Fedora, Linux | 4 Comments

Sound on Intel 811b

With recent kernels the sound on my netbook skips.

Sound card:

Intel Corporation System Controller Hub (SCH Poulsbo) HD Audio Controller [8086:811b] (rev 07)

After many attempts and much google searching, the solution has been to edit /etc/pulse/default.pa and add tsched=0 to the line load-module module-udev-detect

load-module module-udev-detect tsched=0
load-module module-detect tsched=0

Posted in Linux | 2 Comments

command line spell checking

I often edit files with command line tools such as vim and personally find spell checking invaluable.

Two high yield tips I have found:

VIM spell checking

vim has built-in spell checking functionality. I add this to ~/.vimrc

These options are a little more than just spell checking mind you:

" Show line numbers
set number

" Prevent vim from emulating vi
set nocompatible

" Syntax highlighting
syntax on

" Set automatic indentation
set autoindent
set smartindent

" Set tabs at 4 spaces
set tabstop=4
set shiftwidth=4

" Show matching [] and {}
set showmatch

" Spell check on
set spell spelllang=en_us
setlocal spell spelllang=en_us

" Toggle spelling with the F7 key
nn <F7> :setlocal spell! spelllang=en_us<CR>
imap <F7> <C-o>:setlocal spell! spelllang=en_us<CR>

" Spelling
highlight clear SpellBad
highlight SpellBad term=standout ctermfg=1 term=underline cterm=underline
highlight clear SpellCap
highlight SpellCap term=underline cterm=underline
highlight clear SpellRare
highlight SpellRare term=underline cterm=underline
highlight clear SpellLocal
highlight SpellLocal term=underline cterm=underline

" where it should get the dictionary files
let g:spellfile_URL = 'http://ftp.vim.org/vim/runtime/spell'

Those options highlight and underline misspelled or unrecognized words.
Some keyboard shortcuts to navigate and correct words

]s – move to next misppelled word
[s - move to previous misspelled word
z= - show list of correction options

4]s skip to 4th mispelled word, etc.

vim1
vim2

See vim spelling documentation for details.

Aspell

Aspell provides very similar functionality if you wish to spell check a document.

aspell check README

You then navigate with the keyboard

i – ignore
a – add to (user) dictionary
[0-9] – replace options
r- replace x1
R – replace all

In the event you need to revert changes, aspell saves a copy of the original document with a ~ at the end, in this example, README~

aspell

LanguageTool

Update: At the advice of dominiko (see comments) I took LanguageTool for a test drive. LanguageTool does both spelling (with either hunspell or the built in vim spell checker) and grammar checking. I had to use the snapshot of language tool.

This vim plugin works with java-1.7.0-openjdk and will integrate with libreoffice.

I found LanguageTool to be a very nice addition and would advise taking it for a test drive.

LanguageTool

Posted in Linux | 10 Comments

Fun with KDE

Children are so much fun. With the release of Ubuntu 12.04 and Fedora we took a look at Desktop Environments. This time KDE won out hands down, although XFCE was a close second

After they spent most of the weekend playing with the desktop effects you just have to laugh.

KDE desktop

I counted 12 bouncing balls, 6 sets of xeyes, “life”, a doodle, and there is even a note to anyone snooping in on the desktop.

Posted in Linux | 2 Comments

Kwrite spell check

As of Fedora 17 I am using KDE and so am somewhat new to some of the default applications. The default text editor seems to be kwrite and although there is an option for spell checking , there was no dictionary enabled by default.

I was able to enable spell checking by installing enchant-aspell =)

yum install enchant-aspell

Worked for kate as well.

Posted in Linux | Tagged | 3 Comments

How to install ddate

ddate is a ‘fun’ program to display the date in Discordian calendar.

ddate prints the date in Discordian date format.

Example:

Today is Setting Orange, the 14th day of Confusion in the YOLD 3178

Unfortunately, ddate was disabled / removed from util-linux.

Discussion on Arch Linux
Fedora mailing list

If you would like to use ddate, it is rather trivial to compile.

Download the latest util-linux (2.21.2 at the time of this post)

Extract the archive:

tar xzvf util-linux-2.21.2.tar.gz

If needed, install gcc and ncurses headers (ncurses-devel on Fedora or libncurses5-dev on Ubuntu)

#Fedora
sudo yum install gcc ncurses-devel

#Ubuntu
sudo apt-get install gcc libncurses5-dev

Update: I also had to install the pam headers

sudo yum install pam-devel

Compile and install ddate

cd util-linux-2.21.2
./configure --prefix=/usr --enable-ddate
cd misc-utils
make ddate
sudo cp ddate /usr/local/bin

Posted in Linux | Tagged | 8 Comments

Proxmox using iptables in openvz guests

I recently upgraded Proxmox and noticed iptables was not working in the guests.

Turns out a small edit is required to /etc/vz/vz.conf (we need to add some more modules to be used in the openvz guests).

Using any editor, open /etc/vz/vz.conf and change and find the “IPTABLES=” line

Change:

IPTABLES="ipt_REJECT ipt_tos ipt_limit ipt_multiport iptable_filter iptable_mangle ipt_TCPMSS ipt_tcpmss ipt_ttl ipt_length"

To:

IPTABLES="ipt_REJECT ipt_tos ipt_TOS ipt_LOG ip_conntrack ipt_limit ipt_multiport iptable_filter iptable_mangle ipt_TCPMSS ipt_tcpmss ipt_ttl ipt_length ipt_state iptable_nat ip_nat_ftp"

Then reboot (you can probably just re-start your guests).

Posted in Linux | Tagged | 6 Comments

Fedora 17 GMA500 (Poulsbo)

Good news for those of us with the GMA500 (Poulsbo) graphics card !

Fedora 17 ships with the 3.3.4 kernel and my GMA500 works out of the box without the need for any customizations to the boot options. Simply put the .iso onto a flash drive and boot.

Again, the gma500_gfx offers 2d graphics (no 3d). So while gnome-shell is working with llvmpipe, but there is a noticeable performance hit.

While it is novel to see gnome-shell running on the GMA500, I suggest the kde spin (if you want eye candy) or the xfce or lxde spin.

The gma500 should work, with 2d graphics, using the 3.3.4 or higher kernel, on any Linux distribution.

You may need to add (kernel) boot options for suspend or brightness keys. These features are often BIOS dependent.

Posted in Linux | Tagged | 10 Comments