Saturday, September 5, 2009

Printing to a Windows printer via Samba in Slackware

You want to print from a Slackware machine to a printer that is connected to a Windows machine on the same LAN. To achieve this, Windows host must have a share for this printer with a specified share name. Then it is easy to configure a Windows printer from a GNU/Linux client (Slackware machine) via SAMBA and CUPS.






One can share files and printers between GNU/Linux and Windows machines over a network via SAMBA. CUPS provides a portable printing layer for UNIX-based operating systems such as GNU/Linux and Mac OS X. Latest Slackware release (Slackware 13) includes both "samba'" and "cups" packages. If you did not install these packages while installation, install them from the main tree in the installation DVD. Make sure that samba and cups run at startup by making /etc/rc.d/rc.samba and /etc/rc.d/rc.cups executable.

# chmod 755 /etc/rc.d/rc.samba
# chmod 755 /etc/rc.d/rc.cups

Create a samba configuration file by;

# mv /etc/samba/smb.conf-sample /etc/samba/smb.conf

Now you need to start samba and cups services by;

# /etc/rc.d/rc.samba start
# /etc/rc.d/rc.cups start

To configure a Windows printer properly via Samba and CUPS, you need to know the name of the work group of the Windows printer host (not always required), NET-BIOS host name of the Windows printer host (always required) and share name of the Windows printer (always required).

You can view shared printers and disks on a Windows machine by smbclient command with below options.

$ /usr/bin/smbclient -L net-bios_host_name_of_the_windows_machine -N

For my case, ertan is the NET-BIOS host name of my Windows box.

bash-3.1$ smbclient -L ertan -N

Domain=[ERTAN] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]

Sharename Type Comment
--------- ---- -------
IPC$ IPC Uzak IPC
D$ Disk Varsayılan değer
Belgelerim Disk
print$ Disk Yazıcı Sürücüleri
HpDeskjet1280 Printer HP Deskjet 1280
ADMIN$ Disk Uzak Yönetici
C$ Disk Varsayılan değer
Domain=[ERTAN] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]

Server Comment
--------- -------

Workgroup Master
--------- -------
bash-3.1$

Connect to CUPS administration panel by typing http://localhost:631/ into your favorite browser and add Windows printer to CUPS as following.

Add New Printer --> 
Name: Specify a name
Location: Specify a location
Description: Enter a description
Device: Windows Printer via SAMBA
Device URI: smb://server/printer
or
smb://workgroup/server/printer

or

smb://username:password@server/printer

or

smb://username:password@workgroup/server/printer

Manufacturer and Model Name: Choose driver

For Device URI (Uniform Resource Identifier), insert the correct server and printer share name. If system needs wokgroup, username and password, insert them correctly also.

(workgroup: Name of the work group of the Windows printer host
server: NET-BIOS host name of the Windows printer host
printer: Share name of the Windows printer
username:password: Username and password authorized to use the shared printer on the Windows machine)

For manufacturer and model type, variety of drivers will be listed, because Slackware includes "Gutenprint" (formerly Gimp-Print) driver package.

Finish printer installation verifying root user name (root) and password (root's password) and print a test page to check whether your samba network printer installation successfully performed or not.

Saturday, August 29, 2009

Slackware 13.0 is released!

After one of the most intensive periods of development in Slackware's history, the long awaited stable release of Slackware 13.0 is ready. This release brings with it many major changes since Slackware 12.2, including a completely reworked collection of X packages (a configuration file for X is no longer needed in most cases), major upgrades to the desktop environments (KDE version 4.2.4 and Xfce version 4.6.1), a new .txz package format with much better compression, and other upgrades all around -- to the development system, network services, libraries, and major applications like Firefox and Thunderbird. We think you'll agree that this version of Slackware was worth the wait. Also, this is the first release of Slackware with native support for the 64-bit x86_64 architecture! Major kudos to Eric Hameleers for all of his work, especially on the 64-bit port.

More details may by found in the official announcement and in the release notes.

Please consider supporting the Slackware project by picking up a copy of the Slackware 13.0 release from the Slackware Store. The discs are off to replication, but we're accepting pre-orders for the official 6 CD set and the DVD. The CD set is the 32-bit x86 release, while the DVD is a special edition dual-sided disc with the 32-bit x86 release on one side and the 64-bit x86_64 release on the other. And, we still have T-shirts and other Slackware stuff there, so have a look around. Thanks to our subscribers and supporters for keeping Slackware going all these years.

Thanks are again due to the Slackware crew, the developers of slackbuilds.org, the community on linuxquestions.org, Slackware IRC channels, and everyone else who helped out with this release.

Have fun, and enjoy the new stable release!

Pat and the Slackware crew

Source: http://www.slackware.com

Tuesday, August 11, 2009

Enabling color support of "ls" in Bash

I have noticed that executing ls command in "Terminal" and "Xterm" does not give me colorful output as in "Konsole". To get colorful output in these X terminals in bash, add below lines to your ~/.bashrc file and restart X terminal.

# enable color support of ls and add handy aliases
if [ "$TERM" != "dumb" ]; then
eval "`dircolors -b`"
alias ls='ls --color=auto'
alias dir='ls --color=auto --format=vertical'
alias vdir='ls --color=auto --format=long'

fi

To enable the same function for your root shell, add above lines to /root/.bashrc file.




Sunday, July 19, 2009

Booting Slackware with GRUB (GNU Grand Unified Bootloader)

GRUB is an alternative bootloader to LILO. As you know, Slackware comes with LILO as default. Slackware has legacy version of GNU GRUB package in /extra section. This package also includes Ken Robotti's 'grubconfig' tool similar to 'liloconfig' tool. Now we are going to simply remove LILO package and install GRUB package (I assume that you have configured 'slackpkg' utility).

# removepkg lilo
# slackpkg install grub

Run grubconfig by:

# grubconfig



I prefer expert GRUB setup menu.



Start to create GRUB config file with a GRUB header.



Choose frame buffer console size.



Select GRUB target location. I had installed LILO onto the master boot record of my hard drive. Choosing GRUB install location as MBR overwrites LILO.



Choose the GRUB files save location. This is the location where /boot directory is located. In my case, /dev/sda1 is the root partition of my Slack and consists of /boot directory.



Add your Slackware partition with Linux option. Using Linux and Other options, you can add other operating systems you have to GRUB configuration file.



Finally install GRUB with Install option.

You can change GRUB VGA resolution for more readable booting by editing /boot/grub/menu.lst file.

# nano /boot/grub/menu.lst

# GRUB configuration file '/boot/grub/menu.lst'.
# generated by 'grubconfig'. Sun Jul 19 01:55:59 2009
#
# The backup copy of the MBR for drive '/dev/sda' is
# here '/boot/grub/mbr.sda.3676'. You can restore it like this.
# dd if=mbr.sda.3676 of=/dev/sda bs=512 count=1
#
# Start GRUB global section
#timeout 30
#color light-gray/blue black/light-gray
# End GRUB global section
# Linux bootable partition config begins
title Slackware-current on (/dev/sda1)
root (hd0,0)
kernel /boot/vmlinuz root=/dev/sda1 ro vga=794
# Linux bootable partition config ends
title --- For help press 'c', type: 'help'
root (hd0)
title --- For usage examples, type: 'cat /boot/grub/grub.txt'
root (hd0)

Find vga=xxx part in /boot/grub/menu.lst file and replace xxx with a suitable VGA code from the below table.




Sunday, July 12, 2009

Slackware for ARM

Slackware has a new official port for the ARM architecture, by the name of ARMedslack, which has recently released the port of Slackware version 12.2.

ARMedslack began in 2002 by Stuart Winter, with the primary goal of providing a full Slackware port for ARM desktop machines - initially targeting the Acorn StrongARM RiscPC, and later embedded devices.

Slackware ARM now supports native installation using the regular Slackware installer on the ARM Versatile board (via the QEMU emulator) and the recently announced embedded device: the Marvell SheevaPlug.

Slackware ARM version 12.2 is built for armv4, little endian, "legacy" ABI. A new port to the EABI is already underway and expected to be available in "-current" form within a few months.

The project's homepage has more details.

Source: http://www.slackware.org/