TWiki
>
CF Web
>
Linux
>
DebianInCS
>
DebianHowTo
(revision 43) (raw view)
Edit
Attach
(This page is getting bulky enough that perhaps we should spin off a new set of pages, one per q and a? -- Main.MikePatterson)<br />or maybe by category (Updates, Display, Printing, etc.) -- Main.LawrenceFolland<br />There is also the option of using the !%TWISTY% variable which hides content until the user clicks a 'show more' link -- Main.DrewPilcher ---+ CSCF Debian Image How To page %TOC% ---++ Find the CSCF Image version: 1 cat /etc/cscf_deb_version ---++ Get latest Debian updates 1 open a root shell 1 optional: check /etc/apt/sources.list. For the CSCF GradPC, it should appear as the following: <pre> deb ftp://mirror.cscf.uwaterloo.ca/debian sarge main non-free deb-src ftp://mirror.cscf.uwaterloo.ca/debian sarge main non-free </pre> 1 enter: apt-get update 1 enter: apt-get dist-upgrade 1 when prompted for configuration options, pressing <enter> for the default is usually a reasonable choice ---++ Desktop Display settings ---+++ Adjust my X configuration: * Using the config utility 1 dpkg-reconfigure xserver-xfree86 * video card driver: i810 ("Generic video driver"), no bus identifier, 8192kb memory - but you can set this in the BIOS) * Keyboard definition: xkb ruleset: xfree86, model: pc104, layout: us, variant: <blank>, options: <blank> * Mouse: device: /dev/gpmdata, emulate 3-button: yes, scroll events from wheel: yes, * Monitor: Identifier: Sync Master 191T, LCD: Yes, * Manually (not recommended) 1 vi /etc/X11/XF86Config-4 ---+++ Change Themes 1 Applications -> Desktop -> Theme ---+++ Other GNOME questions Ironically enough, the <nop>FreeBSD GNOME2 FAQ http://www.freebsd.org/gnome/docs/faq2.html is an excellent resource. ---+++ Use extra (user-defined) fonts This may only apply to truetype fonts. Place the .ttf files in ~userid/.fonts. You may have to run "dpkg-reconfigure fontconfig" as root and/or log out and back in again, although GNOME may pick up on the new fonts immediately. (Thanks to Main.BenKorvemaker) ---++ Thunderbird Configuration ---+++ Assign a Signature 1 create a text file with your signature text 1 Tools -> Account Settings... -> (on main Account Settings tab) "[x] Attach this signature" -> browse to signature text file ---+++ Put a timestamp in your message replies: 1 http://www.mozilla.org/support/thunderbird/tips#beh_replyheader * Note that it mentions putting the indicated code in your =user.js= file. By default, this doesn't exist. Create it in the same directory as =prefs.js= then add the code. You should be able to find your =prefs.js= file in =~/.mozilla-thunderbird/default/???.slt= ---++ Use "roaming" 1 http://www.livejournal.com/users/debaday/23386.html may be useful for network configuration. ---++ Use the Oracle Calendar client 1 This is documented in OracleCalendar. ---++ Use the USB card reader (or some other external USB disk) 1 See http://www.cs.sfu.ca/~ggbaker/personal/cf-linux 1 Short instructions are to plug in the device, and use "sg_map -sd" (part of the sd3 utils package, already present in dist version > 0.7) to see how to address the device. ---++ Use a USB card reader for Package updating and booting 1 See http://d-i.pascal.at/ for installing Debian off of a USB Memory Stick 1 For package updating: 1 Find out what .deb file(s) you need. Browse packages.debian.org, following dependencies for the package you are interested in 1 copy the package(s) to the memory stick 1 on your destination system, run: <verbatim> cd <location of files on USB device> dpkg -i <package1> <package2> ... </verbatim> ---++ Use a CD for Package updating * you need a debian packages CD * as root: <verbatim> apt-cdrom add apt-get update apt-get [upgrade|install|dist-upgrade] </verbatim> ---++ Do Printer Things 1 [[http://www.cups.org/index.php][CUPS]] is usually the answer. Sometimes a fuller answer includes samba. 1 "cupsenable" can be your friend. 1 So can "lpc". ---++ Create an SSH key to save having to enter passwords to connect to other machines ---+++ Create a key: * On local machine: <verbatim> ssh-keygen -t dsa Enter file: id_dsa (default) No passphrase <enter> the files: id_dsa and id_dsa.pub are created in .ssh directory </verbatim> ---+++ Copy key to desired server: ---++++ If you don't already have any keys on the remote server <verbatim> cd ~/.ssh scp id_dsa.pub <servername>:.ssh/authorized_keys </verbatim> ---++++ If you do already have keys on the remote server <verbatim> cd ~/.ssh scp id_dsa.pub <servername>:.ssh/authorized_keys.$HOSTNAME ssh <servername> (enter password) cd .ssh cat authorized_keys.<clienthost> >> authorized_keys </verbatim> ---+++ Change permissions *on the desired server* 1 Log on to the remote server and the execute these commands: <verbatim> chmod 700 .ssh chmod 644 .ssh/authorized_keys </verbatim> 1 Log out 1 Log back in with ssh userid@server -X. It should *not* ask for the password anymore! ---+++ To assign a new passphrase: <verbatim> cd .ssh ssh-keygen -p -f id_dsa -> enter new passphrase </verbatim> ---++ Use ssh host-based authentication This can be used to allow ssh <hostname> to not require a password, similarly to rsh, with authentication of the hostname. I put this on a page of its own: SSHHostBasedAuthentication ---++ Add a splash image to your boot loader ---+++ Downloading a splash image GRUB (the default and recommended boot loader) uses the .xpm.gz image format. To download a splash image, try http://ruslug.rutgers.edu/~mcgrof/grub-images/images/?page=1 (there are a couple of Debian linux splash images you might want to try) Save the image to /boot/grub/ (you must be root to do this!). ---+++ Editing the configuration files Open up in a text editor (as root) the file /boot/grub/menu.lst. Comment out the "Pretty Colours" part (which isn't that pretty :P). Now it becomes: <verbatim> # Pretty colours #color cyan/blue white/blue #color black/light-gray red/light-gray </verbatim> Now add this line after the commented lines: <verbatim> splashimage=/boot/grub/file.xpm.gz # file.xpm.gz is the file you saved previously </verbatim> ---++++ Tip If you don't know which splash image you like best, copy a few over to /boot/grub then add the following lines for each splash image, replacing file.xpm.gz with each of the files you downloaded. <verbatim> title = Change splash image to file.xpm.gz # Adds a new entry to the menu splashimage = /boot/grub/file.xpm.gz # Changes the splash image </verbatim> Save, exit and re-boot. You should get a splash image at boot-up which looks really nice indeed :) Enjoy! ;) ---++ Change the default Desktop Environment to GNOME 1 Log out 1 In the GDM log in manager select the Sessions menu 1 Select the GNOME Session 1 Log in as normal 1 When asked if you wanted the GNOME session to be the default, select Make Default ---++ Change the default GTK theme in GDM 1 Open a root terminal 1 Open the /etc/gdm/gdm.conf file for editing 1 Around line 238, there should be this entry: <verbatim> #GtkTheme=Default </verbatim> 1 Change the Default entry to something you like (I personally like the Industrial theme) and also uncomment it. The line becomes <verbatim> GtkTheme=Industrial </verbatim> 1 Log out and enjoy ;) ---++ Install the Apache2 web server, PHP4 scripting language and <nop>MySQL database 1 Open a root terminal 1 Enter apt-get install apache2 1 Enter apt-get install php4 1 Enter apt-get install mysql-client mysql-server Select the default values during the <nop>MySQL configuration 1 Enter apt-get install php4-mysql 1 Enter apt-get install libapache2-mod-php4 1 Test the installation... * Create a ~/public_html directory * Edit ~/public_html/index.php * Add the following to it: <verbatim> <?php phpinfo(); ?> </verbatim> * Save the file, exit the editor, then open a web browser and go to http://localhost/~yourusername/index.php where yourusername is :) your user name 1 Secure <nop>MySQL - we need to create a <nop>MySQL password for the root user (it's blank by default!) * In the root terminal, enter <verbatim> mysqladmin -u root password YoUrPaSsWoRd </verbatim> where <nop>YoUrPaSsWoRd is the password you want to set. 1 That *should* have done it! Contact me if anything goes wrong and I will try to do my best to help you out! ---++ Install the Nvidia drivers for your video card 1 Follow the guide at http://home.comcast.net/~andrex/Debian-nVidia/installation.html It's a really good guide! *NOTE* I used NVDIST=testing! ---++ Check your network speed and duplex and make them match the switch settings Some hints here are ethtool. Generally speaking network connections are 100/FDX. Ideally the switch port has been forced to that speed. ---+++ Check current settings =ethtool eth0= will always tell you the current network settings of your ethernet card ---+++ Configure your card to 100/FDX You then disable autonegotiation and tell Debian to force the NIC to match: (as root) <pre>ethtool -s eth0 autoneg off speed 100 duplex full </pre> But this will fail badly if the switch port is not at those settings. It depends on the switch and it depends on the network interface manufacturer. * Note that this is a one-time configuration change - it will need to be re-done after a reboot. ---+++ Note about Netgear hubs Some experience has shown that if you are going through a Netgear hub, it will prefer that your PC configuration is set to Autonegotiate and that the port settings on the switch are also set to Auto ---++ Use an APC UPS in Debian Linux with automated shut-down Ever wanted to get your UPS working with Debian? Now's your chance :) Plug in your UPS, connect the computer power cables to it, then power on the computer. Don't connect the USB cable just yet... ---+++ Making sure Debian detects the UPS 1 Open a root terminal and enter: 1 tail -F /var/log/kern.log and then plug in the USB Cable from the UPS 1 You should see something like: <verbatim> Oct 12 07:35:52 heinlein kernel: usb 3-2: new low speed USB device using address 2 Oct 12 07:35:52 heinlein kernel: usbcore: registered new driver hiddev Oct 12 07:35:54 heinlein kernel: hiddev96: USB HID v1.10 Device [American Power Conversion Back-UPS LS 500 FW:16.b3 .D USB FW:b3] on usb-0000:00:1d.2-2 Oct 12 07:35:54 heinlein kernel: usbcore: registered new driver usbhid Oct 12 07:35:54 heinlein kernel: drivers/usb/input/hid-core.c: v2.0:USB HID core driver </verbatim> If not, then you may have a problem with USB on your computer, a cable problem, or an UPS problem... * try updating the BIOS (that worked for us!!) If you do see messages similar to that, you can proceed to the next step. ---+++ Creating the /dev/usb/hid/hiddev devices For some reason, Debian doesn't do that as default, which is weird... 1 Copy/Paste the following lines and save them as make-hiddev.sh <pre>#!/bin/sh mkdir -p /dev/usb/hid mknod /dev/usb/hid/hiddev0 c 180 96 mknod /dev/usb/hid/hiddev1 c 180 97 mknod /dev/usb/hid/hiddev2 c 180 98 mknod /dev/usb/hid/hiddev3 c 180 99 mknod /dev/usb/hid/hiddev4 c 180 100 mknod /dev/usb/hid/hiddev5 c 180 101 mknod /dev/usb/hid/hiddev6 c 180 102 mknod /dev/usb/hid/hiddev7 c 180 103 mknod /dev/usb/hid/hiddev8 c 180 104 mknod /dev/usb/hid/hiddev9 c 180 105 mknod /dev/usb/hid/hiddev10 c 180 106 mknod /dev/usb/hid/hiddev11 c 180 107 mknod /dev/usb/hid/hiddev12 c 180 108 mknod /dev/usb/hid/hiddev13 c 180 109 mknod /dev/usb/hid/hiddev14 c 180 110 mknod /dev/usb/hid/hiddev15 c 180 111 </pre> 1 Open a root terminal, change to the directory where you saved the make-hiddev.sh file and: =chmod +x make-hiddev.sh= 1 ./make-hiddev.sh That should have created the devices for you. You can check with ls /dev/usb/hid/ . ---+++ Installing the APCUPS Daemon Note: This is specific to the APC UPS-es and will not work on other configurations. 1 Open a root terminal 1 apt-get install apcupsd apcupsd-doc * if this fails, try apt-get update ---+++ Configuring the APCUPS Daemon 1 Open root terminal 1 vi /etc/apcupsd/apcupsd.conf and edit the settings according to the comments and http://www.apcupsd.com/manual/config-examples.html I used the Simple USB Example. * Note: the DEVICE line should read: DEVICE /dev/usb/hid/hiddev[0-15] * the default settings configure the UPS to run until it is at 5% power or 3 minutes remaining (whichever is greater). You may wish to choose different parameters. Read the notes in the configuration file for further details. 1 vi /etc/default/apcupsd 1 Change ISCONFIGURED=no to ISCONFIGURED=yes ---+++ Starting the APCUPS Daemon 1 Open a root terminal 1 /etc/init.d/apcupsd start ---+++ Checking UPS logs 1 UPS events are recorded in: * /var/log/apcupsd.events * /var/log/daemon.log * /var/log/syslog ---+++ Done :) Well, that should have done it... Your cool APC UPS should be running properly under Linux. Whenever there's a power failure your computer should automatically shut off. ---++ Add a printer * One of the CS central printers * The CSCF LJ printer * A research group's printer * See, perhaps: http://mumford1.dyndns.org/~bs7452/linuxhelp/cups.html * Following directions at http://www.faqs.org/docs/Linux-mini/Debian-and-Windows-Shared-Printing.html#to_windows_cupsconfig I tried: <pre>williams:~# lpadmin -p ljp-cs-1 -v smb://smb-unix.cs/ljp-cs-1 williams:~# enable ljp-cs-1 williams:~# accept ljp-cs-1 williams:~# lpadmin -d ljp-cs-1 </pre> and then I used a web browser to connect to http://localhost:631 and set up the PPD to use. (You can do that in the first command line with -P, but in Debian all the PPDs appear to be gzipped and I didn't know how to make it point at those instead.) This is an imperfect solution however; it doesn't appear to allow for username/password authentication. That can probably go into the device URI, but may result in plaintext passwords being stored? Following is a list of CUPS packages installed (csc-debversions > 0.7 have these already installed): <pre>[mpatters@williams] ~> dpkg -l | grep cups ii cupsomatic-ppd 20040506-1 linuxprinting.org printer support - transiti ii cupsys 1.1.20final+rc Common UNIX Printing System(tm) - server ii cupsys-bsd 1.1.20final+rc Common UNIX Printing System(tm) - BSD comman ii cupsys-client 1.1.20final+rc Common UNIX Printing System(tm) - client pro ii cupsys-driver- 4.2.6-7 Gimp-Print printer drivers for CUPS ii cupsys-driver- 4.2.6-7 Gimp-Print printer drivers for CUPS ii cupsys-pt 1.2.4-2.1 Tool for viewing/managing print jobs under C ii libcupsimage2 1.1.20final+rc Common UNIX Printing System(tm) - image libs rc libcupsys2 1.1.20final+cv Common UNIX Printing System(tm) - libs ii libcupsys2-gnu 1.1.20final+rc Common UNIX Printing System(tm) - libs [mpatters@williams] ~> dpkg -l | grep foo ii foo2zjs 20040210-2 Support for printing to ZjStream-based print ii foomatic-bin 3.0.1-20040506 linuxprinting.org printer support - transiti ii foomatic-db 20040705-1 linuxprinting.org printer support - database ii foomatic-db-en 3.0.1-20040506 linuxprinting.org printer support - programs ii foomatic-db-gi 4.2.6-7 linuxprinting.org printer support - database ii foomatic-db-hp 1.5-20040621-1 linuxprinting.org printer support - database ii foomatic-filte 3.0.1-20040621 linuxprinting.org printer support - filters ii foomatic-filte 20040506-1 linuxprinting.org printer support - prebuilt ii foomatic-gui 0.6.7 GNOME interface for configuring the Foomatic [mpatters@williams] ~> </pre> One should also make sure one is in the lpadmin group. Again, in CSCF Debian versions > 0.7 this will already be done. ---++ Make a serial port Palm Pilot work * pilot-link is the package. And set up /dev/pilot to point to something like /dev/ttyS0. jpilot is useful too, though there's also gnome and kde ones. Giving people access to /dev/pilot would also be good. Setting the environment variable PILOTRATE to 115200 might be nice.(Main.BenKorvemaker) ---++ How do I burn a CD, including an ISO image? ---+++ Installing XCDRoast The 8.1 Debian installation that came with my machine did not have xcdroast installed. No biggie, we'll install it. Open a root terminal and enter: <pre>apt-get install xcdroast sux </pre> Confirm, if asked, with Yes(Y). This will install xcdroast on your machine. Note: I also installed sux, you'll see why in a moment. ---+++ Setting up XCDRoast Open a non-root terminal and enter the following: <pre>$ sudo tcsh # or sudo bash or su - Enter Password: # xcdroast </pre> Now XCDRoast will start scanning for devices... This takes a while, unfortunately. Just let it do its job... Then click OK. After that, click on Launch X-CD-Roast. Next, click OK again. Click on Setup. Now, go in the HD Settings tab and add the folder where you will keep of your CD Images (ISOs) - Browse, then Add. Save Configuration, then OK, OK and another OK. Now exit that and do the same thing for your userid. ---+++ Burning an ISO Image with XCDRoast 1 Start XCDRoast 1 Click on Create CD 1 Click on Write Tracks and in the right pane it should show all the ISOs in the image folder you set during the Setup section 1 Click on an ISO and then select Add, then Accept Track Layout. It will take you to the write tracks tab 1 Change any of the other settings, or just leave the defaults and select Write Tracks. 1 Your CD Image will be burned :) ---++ Tips for improving KDE Performance See this page: KdePerformance ---++ Customizing KDE for Many Users Such as for student Front-End Servers. See this page: KdeMultiUser ---++ reinstall vendor configuration for a package 1 Try =dpkg-reconfigure packagename= 1 That won't be set up for some packages. Next, try =dpkg install --reinstall packagename= 1 Finally, if that doesn't work, download the package from mirror, and =dpkg -i packagefile.deb= ---++ 'Pin' a package to a particular version despite other upgrades See PinningDebianAndUbuntuPackages ---++ Make ethernet work again after Ubuntu image restores See UbuntuUdevHacks
Edit
|
Attach
|
Watch
|
P
rint version
|
H
istory
:
r45
<
r44
<
r43
<
r42
<
r41
|
B
acklinks
|
V
iew topic
|
Raw edit
|
More topic actions...
Topic revision: r43 - 2013-07-12
-
DrewPilcher
CF
Information in this area is meant for use by CSCF staff and is not official documentation, but anybody who is interested is welcome to use it if they find it useful.
CF Web
CF Web Home
Changes
Index
Search
Administration
Communication
Email
Hardware
HelpDeskGuide
Infrastructure
InternalProjects
Linux
MachineNotes
Macintosh
Management
Networking
Printing
Research
Security
Software
Solaris
StaffStuff
TaskGroups
TermGoals
Teaching
UserSupport
Vendors
Windows
XHier
Other Webs
CSEveryBody
Main
Sandbox
TWiki
UW
My links
People
CERAS
WatForm
Tetherless lab
Ubuntu Main.HowTo
eDocs
RGG NE notes
RGG
CS infrastructure
Grad images
Edit
Copyright © 2008-2025 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback