Jump to content
Sign in to follow this  
Bruno

Tips for Linux Explorers

Recommended Posts

D*** SMALL LINUX HD INSTALL

 

ATTENTION: These instructions are for the HD install of version 1.0 and before ( some parts even before 0.4.8 ).

Versions beyond 1.0 are so easy to install that they do not need any intructions, just find the menu entrie for the installer and follow the wizard.

 

DSL HD install . . . . really simple, just boot it as Live CD but don't download firebird yet, and as it is booted up, just open a console ( "rxvt" as it is called in DSmall ) and type:

sudo dsl-hdinstall

 

When asked, just type the partition you want to use ( partitioning is already done so you can skip that part. )

 

Also installing Lilo is not what you want.

 

When finished, reboot into Mandrake to adapt Lilo.

 

See Tip about Multiboot Lilo for moving the vmlinuz-2.4.20-xfs to a DSmall directory you will make in /boot from Mandrake.

 

These are the entries for /etc/lilo.conf:

- - - - - - -

image=/boot/DSmall/vmlinuz-2.4.20-xfs (this is the path to the vmlinuz you moved)

. . . label="DamnSmall"

. . . root=/dev/hdb9 (hdb9 should be the hdb you used)

. . . vga=788 (use the same number here as Mandrake)

. . . read-only

- - - - - - - -

# /sbin/lilo

is the last action to check if all is well . . . and write the new lilo to the MBR

 

NOTE: Next versions can be installed and booted without changing lilo as long as the kernel-version ( vmlinuz ) used in DSL stays the same.

 

Reboot:

 

Then boot in DSmall . . . . that should go smooth . . . Now there are 2 more things to do:

 

1). There are 3 lines in /usr/X11R6/bin/startx that should be removed: ( in the DSmall terminal "rxvt" )

$ sudo vi /usr/X11R6/bin/startx ( DSL uses the "sudo" prefix for root commands )

< i > ( to put vi in insert mode )

 

These lines should be deleted:

export TEMP=/var/tmp

export TMP=/var/tmp

export TMPDIR=/var/tmp

 

( put the cursor on the lines to remove and press the delete key )

 

Save and close the file:

Esc

ZZ

 

2). We will save the start-up settings:

$ sudo xsetup.sh

 

Follow the on screen instructions and the job is done !

 

UPDATE: In the new version 0.4.8: 1). the adaption of startx ( temp directories ) and 2). xsetup, are not needed anymore. The HD install script was adapted.

 

B) Bruno

 

PS: It is possible to add packages with MyDSL . . . see Tip MyDSL

Share this post


Link to post
Share on other sites

RSS FEEDS ( Linux related )

 

Here are a few RSS feeds you can add to your RSS-reader:

( Firebird has an extension for RSS feeds here )

 

Distrowatch Latest News: http://www.distrowatch.com/news/dw.rdf

Distrowatch Latest Distro's: http://www.distrowat...om/news/dwd.rdf

Distrowatch Latest Packages: http://www.distrowat...om/news/dwp.rdf

Slashdot: http://slashdot.org/slashdot.rss

Freshmeat: http://freshmeat.net/backend/fm.rdf

also: http://www.freshmeat...fm-releases.rdf

or Freshmeat-search: http://freshmeat.net...xml/?q=xml feed

Linux magazine: http://www.linux-mag.com/lm.rss

Linux.com: http://www.linux.com/index.rss

NewsForge: http://newsforge.com/newsforge.rss

LinuxJournal: http://www.linuxjournal.com/news.rss

KDE: http://dot.kde.org/rdf

Linux Today: http://linuxtoday.co...ckend/biglt.rss

SourceForge: http://sourceforge.n.../rss_sfnews.php

The Register: http://www.theregist...ys/slashdot.rdf

Lockergnome PenguinShell: http://lockergnome.c...enguinshell.php

Think Geek: http://www.thinkgeek.com/thinkgeek.rdf

The Linux Documentation Project: http://www.karakas-o...pwn/latest.html

Linux compatible has several, look: Here

MozillaZine - http://mozillazine.org/contents.rdf

Mozilla - http://www.mozilla.org/news.rdf

FootNotes (GNOME news) - http://www.gnomedesk...org/backend.php

gDesklets - http://gdesklets.gno...top.org/rss.php

Rssnewsapps: http://rssnewsapps.z...vis.com/msw.xml

Rssnewsapps extreme: http://rssnewsapps.z...com/extreme.xml

Rssnewsapps tech: http://rssnewsapps.z...is.com/tech.xml

Arstechnica: http://arstechnica.com/etc/rdf/ars.rdf

OSnews: http://www.osnews.com/files/recent.rdf

Geeknews: http://www.geeknewz....m...on=rdf&id=1

Geeknews: http://www.geeknewsc...l.com/index.xml

neowin: http://www.neowin.ne...d.php?page=main

Wired.com: http://www.wired.com.../0,2610,,00.xml

Rss.com http://rss.com.com/2547-1_3-0-20.xml

The Register: http://www.theregist...ys/slashdot.rdf

 

B) Bruno

 

PS: if you know another feed , please send me a PM . . :ermm: . . . and I will add it to the list.

Share this post


Link to post
Share on other sites

INSTALLING JAVA PLUGIN

 

Installing Sun´s Java can pose a bit of a problem. Sun does have it´s own view on packaging software, not only for Star Office but even worse for Java, that is why I collected some bits and pieces that can help.

Download it here: www.java.com/en/download . . . get the 'jre-6u11-linux-i586.bin' ( not the rpm ) the package that ends on ".bin"

 

CD to the directory you downloaded jre-6u11-linux-i586.bin ( your version might have different numbers )

 

first:

# chmod a+x jre-6u11-linux-i586.bin

and run the file:

# ./jre-6u11-linux-i586.bin

( don't forget the dot at the beginning, no space after the /)

 

You will get a license agreement before it will start and install the package.

 

After the install you will have to make a link from the java plugin to the /usr/lib/mozilla/plugins directory ( check the path, for example in SUSE 10.1 it is /usr/lib/browser-plugins ) .

The java plugin ( libjavaplugin_oji.so ) will most likely be located in /usr/lib/jvm/java-1.6.0-sun-1.6.0.11/jre/plugin/i386/ns7/libjavaplugin_oji.so ( Also in this case: check the path ).

# ln -s /usr/lib/jvm/java-1.6.0-sun-1.6.0.11/jre/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/mozilla/plugins

 

Other browsers will look for their plugins in /usr/lib/mozilla/plugins too !

( Exception: Depending on the version of Firefox you additionally need to put a link to the libjavaplugin_oji.so in your /firefox/plugins directory too )

 

Now restart your browser, type 'about:plugins' in the address bar and see if java is listed.

 

B) Bruno

Share this post


Link to post
Share on other sites

VI ( Revisited )

 

There has been a Tip a while ago about the vi-editor and emacs, but because of popular demand here is a more elaborate version of the vi Tip, but first a quote from previous Tip:

All configuration files in Linux are written in plain English, easy to read and to adapt. We use a text-editor to write or make changes to those files.

The two most popular, powerful and "difficult" editors that you will find in every distro are Vi and Emacs. They both have "syntax-highlighting" to make writing and editing code easy.

 

NOTE: Vi and Emacs fans fight bitter religious wars over which is better

 

The vi-editor . . the exercise

( Vim is an iMproved version of Vi )

 

Because many people have problems with the vi-editor I will try to set up a lesson-exercise-detailed explanation about the bare basics.

 

To be able to change most config files that your system depends on, the vi-editor is your best tool, not really simple to learn, but very effective and safe.

 

Sure other editors like "kedit" are easier to manage, but there are situations where you will have no GUI and Vi is the only one that works without the GUI in text-mode, so you will have to learn how to handle it. ( Yes you could use emacs too, but I prefer Vi )

 

The biggest problems for novice users are:

 

1). The difference between "insert-mode" and "command-mode"

With the vi-editor you can do two things, edit text and give commands . . . . to switch between the two modes two keys are important:

The "i" key to put vi in "insert mode" ( modern vi versions will then show the text "INSERT' on the bottom line ) and the Esc key to put the editor back in "command-mode" ( to save the file ). As soon as you hit the Esc key the text "INSERT" on the bottom line will be gone.

 

2). Correctly saving a file:

If you make a mistake when saving a file, or close vi before the file is saved, you will end up with a swap-file ( mostly marked with the .~ extension ) and the original file. The original one will not have the changes you made and the swap file is useless. Trying to reopen the original one will result in an error message. The best/easiest way to resolve this is to manually delete the .swap ( or .~ ) file. After that you can open the original file again and the error message will be gone.

 

Resuming:

After opening a file in vi you press the i key, and only then you can start writing/editing. When you are finished writing, you press the Esc key to put vi back in command mode and give the command ZZ to save the file. ( Also the command :wq <Enter> will do the same job, take what you prefer as long as it works. )

 

EXERCISE

 

Now we will do an exercise to be sure you can handle vi as easy as eating French Fries ( please follow all instructions to the end )

 

To make a new file called "tessst" you type in a console after the prompt:

$ vi tessst

You will get an empty consoles screen as vi starts with an empty file. Vi always starts in "command-mode" so to put it in "insert-mode" we have to give the command:

 

" i "

 

In most modern versions of vi you will see the text "INSERT" on the bottom line of the console. ( if you're not sure just hit the i-key again )

Now type:

 

The quick brown fox etc. etc.

 

After typing the text you go back to the "command-mode" by pressing the Esc-key.

"Esc"

 

And you will see the text "INSERT" disappear. ( again if you're not sure just hit Esc again )

Now hold down the Shift key ( !! not the Ctrl !! ) and give the command ZZ

 

ZZ ( or :wq < Enter > )

 

Now vi should close and you should get your prompt back in the console.

We will check if the text we wrote was correctly saved:

$ cat tessst

( cat is for reading only )

 

This should show: "The quick brown fox" line.

 

Now we will open the same file again:

$ vi tessst

You see it does not make a new file this time but it opens the existing one ( use a new name, it will open a new file; use an existing name, it will open the existing file )

 

We put vi in "insert-mode" again:

" i "

 

and are able to add another line of text:

 

The stupid dog did not notice the clever fox

 

Now we save the file again:

< Esc >

< ZZ >

 

And again we have a look to see if the changes were saved:

$ cat tessst

Again we open the file to add a 3rd line:

$ vi tessst

 

< i >

 

I think I've got the idea now . .

 

< Esc >

< ZZ >

 

And check the file again:

$ cat tessst

Now to finish off we are going to have a look ( GUI ) in your home directory . . . there should only be ONE file called "tessst" . . . if there are more of them and even with the extension tessst.swap or tessst.~ you know you made mistakes and will have to do the exercise again ! Delete all the tessst files and start reading again at the top of this post . . .

If you made No mistakes, you passed the test and deserve a pat on the back !

 

NOTE: Have a look Here how you can tweak vi to your own preferences.

Rute pointed me to "vimtutor". A worthwhile exercise. Teachs by doing.

I found this to be a usefull help for Vim.

Here is another really good tutorial: First Steps: VI

 

And a good overview of all the commands: Advanced Vi Cheat Sheet

 

B) Bruno

 

Disclaimer: for those who know their way around vi, I know there is an "Ex-mode" too and 10 pages to fill with additional commands . . . . but I did try to keep things ultra simple for the ones doing their first steps in our all time favorite vi-editor.

Share this post


Link to post
Share on other sites

THE TREE

 

The / File System

 

A simplified overview of the file system, with only the most important subdirectories and an absolute minimal description:

 

/bin ( most programs for the user with normal user permissions )

 

/boot ( where you can add extra kernels for multi booting )

 

/dev ( Contains all the special files (nodes) used to access hardware and other device drivers )

 

/etc ( most of the config files )

 

/home

/home/lost and found ( where things end up after a "scandisk" due to an improper shutdown )

/home/bruno ( here opens "home" icon, konqueror and the console )

/home/bruno/tmp ( where I download/store my ISO's )

/home/bruno/downloads ( other downloads, directory made by user )

/home/bruno/documents ( documents )

 

/initrd ( nearly empty )

 

/lib ( all the libraries needed for the programs to run )

 

/lost and found ( where things end up after a "scandisk" due to an improper shutdown )

 

/mnt ( where devices are mounted )

/mnt/win_c ( if you dualboot windows )

/mnt/cdrom /mnt/floppy

 

/opt ( some 3rd party programs that got there at install like Acrobat Reader)

 

/proc ( a direct reflection of the system kept in memory )

 

/root ( where konqueror opens as root )

/root/drakx ( only in case you run Mandrake )

/root/tmp

 

/sbin ( most executables that need root permission )

 

/tmp ( system temp files )

 

/usr

/usr/bin ( most executables for programs with user permission )

/usr/local/bin ( programs the user installs himself )

 

/usr/src ( for extra kernel sources and downloaded rpm's )

 

/var

/var/log ( all the log files, and there are many)

 

More elaborate info see:

$ man hier

 

B) Bruno

Share this post


Link to post
Share on other sites

MD5SUM TRICK

 

0Here is a clever trick Jason ( linuxdude32 ) brought to my attention:

 

For doing the checksum, if both the .ISO file and the .md5 file are downloaded to the same directory:

( first "cd" to that directory )

$ md5sum -c damnsmall-0.4.8.md5

W

 

ill return to the screen:

damnsmall-0.4.8.iso : OK

 

Then you can immediately do:

$ cdrecord dev=/dev/hdc damnsmall.iso

( NOTE:The dev=/dev/hdc can be different on your system, see Tip cdrecord )

 

This burns the ISO to a fresh CD, then if you leave the CD in the burner and reboot, you will be in the new D Small Linux the minute after.

 

B) Bruno

 

NOTE: This fancy trick works only if both iso and md5 file are in the right condition . . . . if not, you better try it the old way:

$ cat name_of_ file.md5$ md5sum name_of_file.iso

And compare the two strings you get from those commands.

Share this post


Link to post
Share on other sites

SU AND ROOT ( the difference )

 

There have been questions , what is the difference between "su" and "root" . . well, the difference is minimal but still very important.

 

As you login as "root" right from booting the system, all the privileges are set to root, what makes your system more vulnerable to your own mistakes and those wishing to enter your system.

As you login as normal user, the privileges are limited, thus it's safer. To be able to do administrative tasks you can temporally login as root using "su" in a console/terminal, that way the root privileges are limited to the actions you do in the console ( and the applications you start from the console ). So the rest of the system is still in "normal user" mode, and this makes it safer.

We do use the same password for "su" and "root", but typing "root" and the root-password at the console/terminal does not get you in "su" ( SuperUser ) mode.

 

Rmind me that next time we should have a talk about the "sudo" file . . .

 

B) Bruno

Share this post


Link to post
Share on other sites

SUDO

 

Members that use D Small Linux or VectorLinux know there is a prefix to a command called "sudo" to perform commands as root without having to log in as root, or using "su" and <password>. Pretty convenient, not 100% bullet proof, but still . . . . if you're the only user and behind a decent firewall . . . .

 

Alright here is the trick, imagine you want to do "mount /dev/hda7 /mnt/loop" and you know this command has to be given as root, you don't have to "su" but:

$ sudo mount /dev/hda7 /mnt/loop

 

You simply add sudo before the command, and only for that specific command you are "temporary root", now that is simple, isn't it ?

Well that part indeed is simple, but "sudo" does not work out of the box like that on most distros, you first have to change the "sudoers" file. Editing the sudoers file does NOT work with:

# vi /etc/sudoers

 

No you have to give it a special command:

$ su
< password >
# visudo

 

And you will get this:

# sudoers file.#

# This file MUST be edited with the 'visudo' command as root.

#

# See the sudoers man page for the details on how to write a sudoers file.

#

# Host alias specification

# User alias specification

# Cmnd alias specification

# Defaults specification

# User privilege specification

root ALL=(ALL) ALL

# Uncomment to allow people in group wheel to run all commands

# %wheel ALL=(ALL) ALL

# Same thing without a password

# %wheel ALL=(ALL) NOPASSWD: ALL

# Samples

# %users ALL=/sbin/mount /cdrom,/sbin/umount /cdrom

# %users localhost=/sbin/shutdown -h now

 

So to be able to use the "sudo" prefix on the most used commands, just delete the two # marks ( this action is called un-commenting the line ) on these two:

# %users ALL=/sbin/mount /cdrom,/sbin/umount /cdrom[/size]
[size=4]# %users localhost=/sbin/shutdown -h now

 

If you want a more drastic approach, in most cases, in most distros ( not in Slackware by default ) you are part of the "wheel" group, so "un-commenting" the next two lines will give you passwordless access to all commands:

# %wheel	ALL=(ALL)	ALL
# %wheel	ALL=(ALL)	NOPASSWD: ALL

 

You save the sudoers file the same as you do the vi-editor:

Esc

ZZ

 

If you want to know more about sudo and the sudoers file:

$ man sudo

 

An extract of the man page on security:

sudo tries to be safe when executing external commands. Variables that

control how dynamic loading and binding is done can be used to subvert

the program that sudo runs. To combat this the LD_*, _RLD_*,

SHLIB_PATH (HP-UX only), and LIBPATH (AIX only) environment variables

are removed from the environment passed on to all commands executed.

sudo will also remove the IFS, ENV, BASH_ENV, KRB_CONF, KRBCONFDIR,

KRBTKFILE, KRB5_CONFIG, LOCALDOMAIN, RES_OPTIONS, HOSTALIASES, NLSPATH,

PATH_LOCALE, TERMINFO, TERMINFO_DIRS and TERMPATH variables as they too

can pose a threat. If the TERMCAP variable is set and is a pathname,

it too is ignored. Additionally, if the LC_* or LANGUAGE variables

contain the / or % characters, they are ignored. If sudo has been com-

piled with SecurID support, the VAR_ACE, USR_ACE and DLC_ACE variables

are cleared as well. The list of environment variables that sudo

clears is contained in the output of sudo -V when run as root.

 

To prevent command spoofing, sudo checks "." and "" (both denoting cur-

rent directory) last when searching for a command in the user's PATH

(if one or both are in the PATH). Note, however, that the actual PATH

environment variable is not modified and is passed unchanged to the

program that sudo executes.

 

For security reasons, if your OS supports shared libraries and does not

disable user-defined library search paths for setuid programs (most

do), you should either use a linker option that disables this behavior

or link sudo statically.

 

sudo will check the ownership of its timestamp directory (/var/run/sudo

by default) and ignore the directory's contents if it is not owned by

root and only writable by root. On systems that allow non-root users

to give away files via chown(2), if the timestamp directory is located

in a directory writable by anyone (e.g.: /tmp), it is possible for a

user to create the timestamp directory before sudo is run. However,

because sudo checks the ownership and mode of the directory and its

contents, the only damage that can be done is to "hide" files by

putting them in the timestamp dir. This is unlikely to happen since

once the timestamp dir is owned by root and inaccessible by any other

user the user placing files there would be unable to get them back out.

To get around this issue you can use a directory that is not world-

writable for the timestamps (/var/adm/sudo for instance) or create

/var/run/sudo with the appropriate owner (root) and permissions (0700)

in the system startup files.

 

sudo will not honor timestamps set far in the future. Timestamps with

a date greater than current_time + 2 * TIMEOUT will be ignored and sudo

will log and complain. This is done to keep a user from creating

his/her own timestamp with a bogus date on systems that allow users to

give away files.

 

Please note that sudo will only log the command it explicitly runs. If

a user runs a command such as sudo su or sudo sh, subsequent commands

run from that shell will not be logged, nor will sudo's access control

affect them. The same is true for commands that offer shell escapes

(including most editors). Because of this, care must be taken when

giving users access to commands via sudo to verify that the command

 

does not inadvertantly give the user an effective root shell.

 

Also see /usr/share/doc/sudo for more examples and information.

 

B) Bruno

Share this post


Link to post
Share on other sites

FORMATTING FLOPPY or ZIP-DISK

 

Floppy:

 

Formatting a floppy in Linux has a lot more options then you might suspect . . The normal way to do it is:

$ fdformat /dev/fd0u1440

 

But, and here is the fine print, you can also get more bytes on your floppy:

$ fdformat /dev/fd0u1722

 

( for 1722kB, but even up to 1920 kB is possible )

 

Here are all the formats:

fd0u1440 fd0u1722 fd0u1840 fd0u720 fd0u830

fd0u1040 fd0u1600 fd0u1743 fd0u1920 fd0u800

fd0u1120 fd0u1680 fd0u1760 fd0u360 fd0u820

 

NOTE: For a Mandrake 9.2 boot floppy you will need a 1722kB floppy

See also: Making a Boot Floppy

 

Zip

 

Now for the zip disk, usually on /dev/sda, for making a Linux native filesystem:

# mke2fs /dev/sda

 

Or make a DOS FAT filesystem:

# mkfs -t fat /dev/sda

 

Most distro's have these commands too ( they all have to be run as root ):

mkfs.ext2

mkfs.ext3

mkfs

mkfs.bfs,

mkfs.cramfs

mkfs.minix

mkfs.msdos

mkfs.vfat

 

See "mkfs.vfat --help" for the full info on those commands.

 

So, that was pretty simple wasn't it ?

 

B) Bruno

Share this post


Link to post
Share on other sites

HARDWARE DATABASES

 

You might not be aware of it, but these days lots of hardware is supported in Linux. The general rule is: don't be the first on your block to get the latest hardware, as it takes a few months for programmers to make Linux-compatible drivers, because often the manufacturers are only focused on Windows drivers.

 

To help you with your research on the compatibility of your hardware, here is a list of links to hardware databases.

 

General:

http://www.karakas-o...nk-o-matic.html

http://www.linuxcomp...patibility.html

http://www.linuxhardware.org/

http://hardware.linuxfaqs.de/

http://linuxtoday.co...20-008-05-NW-HW

http://linuxresource...dware/index.php

http://hwdb.parisc-linux.org/

http://www.linuxhardware.net/

 

Distro specific:

http://wwwnew.mandri...om/en/hardware/ ( Mandrake )

http://hardware.redh...l/?pagename=hcl ( RedHat )

http://cdb.novell.com/ ( SuSE )

 

Modems:

http://www.devidal.t...hris/winmodems/

http://www.linmodems.org

 

Pcmcia cards:

http://pcmcia-cs.sou...SUPPORTED.CARDS

 

WLAN adapters:

http://www.linux-wla...dapters.html.gz

 

Laptops:

http://www.linux-laptop.org/

http://www.e-laptop.com/linux/

http://tuxmobil.org/mylaptops.html

 

Printers:

http://www.linuxprin...rinter_list.cgi

 

USB devices:

http://www.qbik.ch/u...ces/devices.php

 

This will give you plenty of information before you spend your hard earned money on hardware.If you know of any other good sites, send me a PM and I will add it to the list.

 

B) Bruno

Share this post


Link to post
Share on other sites

BOOT/RESCUE CD

( replacement for the boot floppy )

 

Because some new computers don't have a floppy-drive anymore, new versions of "mkrescue" have the option to make a bootable rescue.iso you can burn to CD and use instead of a boot floppy.

 

I tested this in a few distros and up to now only Slackware 9.1 and Mandrake 9.2 have a version of "mkrescue" ( 2.3 ) that has the --iso option. Mandrake 9.1, Redhat 9 and SuSE 8.2 still have an older version of mkrescue that did not include the --iso option, but I'm sure the future versions will have it too.

 

Making a boot-CD is mainly important for the new Mandrake 9.2 that needs a 1722kB floppy to make a boot-floppy, and rumors are spreading that over-sized floppies are not very stable.

 

NOTE: "mkrescue" only works if you use Lilo as bootloader because it reads the info from /etc/lilo.conf

 

Here is how to make a boot CD for your Mandrake 9.2 ( default kernel ):

$ su
< password >
# mkrescue --iso --initrd /boot/initrd-2.4.22-10mdk.img --kernel /boot/vmlinuz-2.4.22-10mdk

 

If you use a kernel other than the default kernel such as the 4GB RAM kernel you will have to adapt the numbers for intrd and vmlinuz :

# mkrescue --iso --initrd /boot/initrd-2.4.22-21mdk-i686-up-4GB.img --kernel /boot/vmlinuz-2.4.22-21mdk-i686-up-4GB

 

After running the command you will find an rescue.iso file in your /home and can simply burn it:

$ cdrecord dev=0,0,0 rescue.iso

 

That will burn the CD . . . I tested it and it boots fine from the CD ( even quicker than from a floppy )

 

In Slackware 9.1 its even more simple:

$ su
< password >
# mkrescue --iso

 

This will do the trick and read the lines from lilo.conf to know what files to put in the rescue.iso

 

NOTE: With the new kernels and initrd.img becoming larger, the chances are that you will need this technique in other distros soon.

 

B) Bruno

Share this post


Link to post
Share on other sites

PRESS Y WITHIN 5 SECONDS

 

After a system crash or an unclean shutdown, you see in the boot messages: "Press Y within 5 seconds to force the File system check" . . . it seems now that this is only meant for Ext2 filesystems and NOT for Ext3 !

 

( So you should not press Y if you have Ext3 )

 

In case of a hard-reset, init messages indicate the computer was not shut down cleanly, and a message appear: "Press Y within 5 seconds to force the file system check " Actually this is very misleading : if you do it with ext3, it does NOT use the journal and then you will experience system losses. Lots of new users have reported that problem. Now that would be nice to change this message so that people leave the journalisation do the good work. --Eric

 

I do hope that the messages on the screen will be less confusing in next versions.

 

B) Bruno

Share this post


Link to post
Share on other sites

OPEN OFFICE QUICKSTARTER

 

Not yet available for OpenOffice 2.0

 

There is a new version of the Open Office Quickstarter and this one works !

Any OpenOffice document or new file opens in just one or two seconds!

 

Here is the page on Freshmeat: http://freshmeat.net...topic_id=57,131

 

Get the latest .tar.gz file

 

NOTE: Mandrake users can get it in the MCC if they have all the sources configured

 

Simply ./configure, make and make install ( as root ) and the job is done in Slackware. In Mandrake, after compiling, make a link to the application in "/home/bruno/.kde/autostart" that points to "/usr/local/kde/bin/oooqs" and then the quickstarter will be started at every boot.

 

Once in the autostart directory, rightclick on an empty space and select "make new" > "link to application" . . . call it oooqs and on tab 3 give it the command "/usr/local/kde/bin/oooqs". That's it!

 

To start it right now, without rebooting, just click on the link you just made . . . this will put an icon on the taskbar . . . . rightclick the icon and you will see the quickstart menu . .

 

No more complaining about slow starting OpenOffice: really believe me . . under 2 seconds for opening any OOo file . . .

 

B) Bruno

Share this post


Link to post
Share on other sites

MANDRAKE UPDATE CD

 

Owyn wrote and tested the procedure to make an update CD for Mandrake 9.2 ( NOTE: I updated it recently to 10.1 ):

This procedure describes HowTo

- Create a Mandrake 10.1 update CD

 

The procedures have been tested on Mandrake 10.1 (create CD) and Mandrake 10.1 (original ISO).

Any updates will be applied to this initial post. Questions anyone?

 

Note: Last updated 2005-12-14 ( adapted to Mandriva 2006 )

 

To create the CD

# Create the CD - This procedure uses a new temporary directory to download the update files[/color]

# and create the ISO for burning. The recommended ftp site for the files is ftp.nluug.nl.[/size][/color]

#

# Create and change to new directory

mkdir updatetmp

cd updatetmp

# Retrieve the update files using wget. This will create a Mandrake directory tree.

wget -nH --cut-dirs=5 -r ftp://ftp.nluug.nl/pub/os/Linux/distr/Mandrakelinux/official/updates/2006.0/main_updates/[/size]

# wget finished - should have about 378MB of downloaded files.

 

# check the downloads

cd official/updates/2006.0

wget ftp://ftp.nluug.nl/pub/os/Linux/distr/Mandrakelinux/official/updates/2006.0/md5sums

md5sum -c md5sums

# NOTE: the end of the list gives errors for the srpms that you did not download because you do not need them.

 

# Go back to temp directory

cd ../../..

 

# create ISO for burning

mkisofs -R -o update2006.iso official

 

# burn the CD

# first check your recordable device. On my system the device is /dev/hdc

dmesg | grep CD

# Now burn it

cdrecord dev=/dev/hdc update2006.iso[/code]

 

And you should get a list of the updates for your system . . just reply with Y to the question if you want to install them and that is all there is to it.

 

After that you can re-check the sources you had unchecked before you started. And if not yet present configure the regular update source for the additional updates that were posted after the CD was made.

 

B) Bruno

 

Thanks Owyn, now the ones who adopted a dial-up user can make and send them the updates too !

 

The original thread can be found here:http://forums.scotsn...h...f=14&t=3879

Share this post


Link to post
Share on other sites

TAR, Unpacking Packages

 

There are packages in many different formats and I thought you would like to know all the different options for unpacking them:

 

.tar.gz

$ tar -xvzf package_name.tar.gz

( x= extract v=verbose z=(un)compress f=file )

 

.tgz

$ tar -xvzf package_name.tgz

 

.tar.z

$ tar -xvzf package_name.tar.z

 

.tar.bz2

$ tar -jxvf package_name.tar.bz2

( j=bzip2 )

 

.gz

$ gunzip package_name.gz

 

.bz2

$ bunzip2 package_name.bz2

 

So, now if you get a package, no need to right click it and select unpack . . . but choose the more speedy method of the commandline !

( Just for your info, to wrap a package up: "tar -cvzf package.tar.gz file1 file2 file3" where "package" is the name you want the wrap to have, and file1 etc. the files that will be in the package )

 

More info: tar --help

 

B) Bruno

Share this post


Link to post
Share on other sites

URPMI SOURCES MANDRAKE 9.2

 

There are a few sources you can add to the package manager of Mandrake to get extra software.

Some of them everybody can add, a few ( last two ) are only for Club Members.

 

See here how it's done:

Go to a console, log in as 'su' and paste the line after the prompt and hit enter.

Now it should work and get the list . . . be patient, it takes a while.

Then as you get the prompt back, close the console ( Ctrl+d , 2x ).

 

Now that we have added the source to your software manager, we can have a look at all the packages:

 

Go to the MCC --> Software Management --> 'RpmDrake helps you install software packages' ( the icon with the + ). Now you will see the text : 'All packages' under the search-box., 'All packages' 'by group' change the by group in: 'by medium repository' and you will get a list with the sources you can choose from: CD1, CD2, CD3 and also the Update source and the just added source. Click in the little triangle in front of the new source, and a list will fold out with all the packages you can choose from . . . . FUN, MAGIC, BLISS !

 

Here they are: ( Don't click on the links but paste them in a root-console ) YOU HAVE TO BE ON LINE !

 

Contributions:

urpmi.addmedia contrib ftp://ftp.nluug.nl/pub/os/Linux/distr/Mandrake/Mandrake/9.2/contrib/i586 with ../../i586/Mandrake/base/hdlist2.cz

( sometimes gives an error about a not up to date list after an install, but still does the install fine )

 

To remove:

urpmi.removemedia contrib_ftp.nluug.nl_i586_9.2

 

Club Contributions: ( not the same as contrib, free for all )

urpmi.addmedia club.contrib_ftp.join.uni-muenster.de_i586_9.2 ftp://ftp.join.uni-muenster.de/pub/linux/distributions/mandrake-devel/contrib/ppc/../../unsupported/MandrakeClub/9.2/i586/ with hdlist.cz

 

To remove:

urpmi.removemedia club.contrib_ftp.join.uni-muenster.de_i586_9.2

 

PLF Link

urpmi.addmedia plf http://mandrakeusers.com/PLF/mandrake/9.2 with hdlist.cz

 

Cheatcode:

wget http://plf.zarb.org/plf.asc; rpm --import plf.asc; rm -f plf.asc

 

To remove:

urpmi.removemedia plf_ftp.easynet.fr_i586_9.2

 

Thacs RPM's: Link

urpmi.addmedia thacs.rpms http://rpm.nyvalls.se/9.2/RPMS with hdlist.cz

 

El Buho RPM's Link

urpmi.addmedia BUHO http://www.linuxlots.com/~buho/rpms/ with hdlist.cz

 

Eshlarc Link

urpmi.addmedia eslrahc http://www.eslrahc.com/9.2/ with hdlist.cz

 

Chip Cuccio's Link

urpmi.addmedia NORLUG-9.2 http://www.ibiblio.org/pub/mirrors/norlug/mandrake-9.2/RPMS/ with hdlist.cz

 

Cheatcode

lynx -source http://norlug.org/~chipster/public_key.tgz | gunzip -c > norlug_rpms.asc; rpm --import [size=4] norlug_rpms.asc; rm -f norlug_rpms.asc

[/size]

 

Additional pages with links to more sources:

Easy URPMI

TheBix

 

- - - - - - - - - - - - - - - -

Only Club Members:

- - - - - - - - - - - - - - - -

 

Commercial Apps:

urpmi.addmedia club.comm_i586_9.2 http://NICKNAME:PASSWORD@www.mandrakeclub.com/downloads2/comm/9.2/ with ./hdlist.cz

 

To remove:

urpmi.removemedia club.comm_i586_9.2

 

Test RPM's: ( at your own risk )

urpmi.addmedia Club_test http://NICKNAME:PASSWORD@www.mandrakeclub.com/downloads2/test/9.2 with ./hdlist.cz

 

To remove

urpmi.removemedia Club_test_i586_9.2

 

For the last two you have to replace "NICKNAME" and "PASSWORD" . . .

 

Don't forget you have to update your sources on a regular basis with:

# urpmi.update -a

 

Because frequently new packages are added and updated.

 

B) Bruno

Share this post


Link to post
Share on other sites

CHECK CD SCRIPT:

 

Imagine, you did the checksum on the ISO and you burned the CD, still you want to double check the integrity of the files on the CD . . . .

 

Here is a little script that will do the checksum on your CDs. You do need the original checksum to compare with the outcome of this script.

$ vi checkcd

 

< i > ( to put vi in insertmode )

 

and paste the following lines:

#!/bin/sh

#checkcd

 

device=$1

 

blocksize=`isoinfo -d -i $device | grep "^Logical block size is:" | cut -d " " -f 5`

if test "$blocksize" = ""; then

echo catdevice FATAL ERROR: Blank blocksize >&2

exit

fi

 

blockcount=`isoinfo -d -i $device | grep "^Volume size is:" | cut -d " " -f 4`

if test "$blockcount" = ""; then

echo catdevice FATAL ERROR: Blank blockcount >&2

exit

fi

 

command="dd if=$device bs=$blocksize count=$blockcount conv=notrunc,noerror"

echo "$command" >&2

$command

 

< Esc > ( put vi in command mode )

< ZZ > ( save the file )

 

$ su
< password >
# chmod 755 checkcd

 

# ./checkcd /dev/cdrom | md5sum

 

This should give you the md5sum after a minute. Check it with the original and then you're sure the CD is 100% perfect.

 

B) Bruno

 

NOTE: For more information on CDWriting, see the following comprehensive article by Steve Litt here which includes other sniplets of code like the one above and some very interesting concepts: Coasterless CD burning by Steve Litt

Share this post


Link to post
Share on other sites

NOTE: This section should have been placed earlier, it is actually the intro to the Tips about Bash History, Bash Script and many other Tips on the commandline.

 

BASH

 

There are several shells available in Linux, the default shell is the Bourne Again SHell ---a pun on the name of Steve Bourne, who was author of the traditional Unix shell, the Bourne shell.

A shell is a program that takes commands from the user and passes them on to the kernel for processing.

Like all the other shells in Linux, the Bash shell is not only a great tool for the command line, but also a scripting language.

Shell scripting allows you to automate tasks that in a normal way would need typing in a lot of commands.

FYI: Some other shells are: the C shell, or Korn shell (the default on IBM's AIX operating system); the ASH shell ( ash is useful for testing scripts to be sh-compliant ), the TCSH shell ( completely compatible version of the Berkeley Unix C shell ) and the new ZSH shell ( ZSH most closely resembles KSH but includes many enhancements ).

 

As you open a terminal/console you actually open a shell and you are presented with a bash prompt. A Bash prompt typically ends with a $ to show you're logged in as a normal user ( Only in SuSE it ends with > for the user ). A Bash prompt ending with # shows that we are logged in as root ( Same in SuSE this time ).

 

B) Bruno

 

Additional info:

http://www.comptechd...nux_hlbash.html

http://www.oreilly.com/catalog/bash2/

Share this post


Link to post
Share on other sites

THE HOST COMMAND

 

You want your browser to load the bookmarks you have with more speed ? Replace the www adresses with IP numbers . . .

 

How ? Simple as can be, type:

$ host www.distrowatch.com

 

This will give: 66.111.55.60

 

Now put your bookmark to search for http://66.111.55.60

 

Here's a few you can start with:

Freshmeat: http://66.35.250.165

Slashdot: http://66.35.250.150

The Linux Show http://68.166.255.130

Linux-Sound.org http://199.239.233.68

Newsforge: http://66.35.250.177

Linux Documentation Project: http://152.2.210.81

Yo Linux: http://66.218.88.103

Fast Dutch Linux Mirror ( utwente) : http://130.89.175.1

Another one ( nluug ): ftp://192.87.106.122

 

NOTE: The server of Scot's Newsletter Forum does not allow direct lookups by IP , so for that bookmark you will have to use the good old fashioned way

 

If your distro does not come with the host command please install the "bind-utils" package.

 

B) Bruno

Share this post


Link to post
Share on other sites

GRUB ( The Grub bootloader )

 

There are people that like Lilo and there are people that like the Grub bootloader. I have written many Tips about Lilo, so here is to balance out the information: "all you always wanted to know about Grub".

 

To restore Grub to the MBR:

$ su
< password >
# grub-install /dev/hda

 

To setup Grub or add new entries:

Note:

Grub uses its own naming structure for drives and partitions, in the form of (hdn,m), where n is the hard drive number, and m the partition number, both starting from zero. This means, for instance, that partition hda1 is (hd0,0) to Grub, and hdb2 is (hd1,1). Grub doesn't consider CD-ROM drives to be hard drives, so if you have a CD on hdb, for example, and a second hard drive on hdc, that second hard drive would still be (hd1).

 

Also:

Note that GRUB does _not_ distinguish IDE from SCSI - it simply counts the drive numbers from zero, regardless of their type. Normally, any IDE drive number is less than any SCSI drive number, although that is not true if you change the boot sequence by swapping IDE and SCSI drives in your BIOS.

 

Setup Grub:

# grub

 

First, tell Grub where to find the 'stage files' -- you can use Tab to show the alternatives: ( in this example hda4 )

root (hd0,3)

 

Now tell Grub to install into the MBR of hda:

setup (hd0)

 

And close with:

quit

 

Make or adapt the menu.lst: ( And new entries )

# vi /boot/grub/menu.lst

 

# Begin /boot/grub/menu.lst

 

# By default boot the first menu entry.

default 0

 

# Allow 30 seconds before booting the default.

timeout 30

 

# Use prettier colors.

color green/black light-green/black

 

# The first entry is for Linux.

title Linux

root (hd0,3)

kernel /boot/vmlinuz root=/dev/hda4 ro

 

# If you want, a second entry for RedHat

title RedHat

root (hd0,2)

kernel /boot/kernel-2.4.20 root=/dev/hda3 ro

initrd /boot/initrd-2.4.20

 

# You wish to include Windows ?

title Windows

rootnoverify (hd0,0)

chainloader +1

 

Emergency

 

If things go really wrong and you get only a grub prompt you can still boot:

 

For Windows:

grub> root noverify (hd0,0)grub> chainloader +1grub> boot

 

For Linux ( on hda4 like in example above )

grub> root (hd0,3)grub> kernel /boot/vmlinuz root=/dev/hda4 rogrub> boot

 

Well, this was more or less all I can tell you on Grub.

 

More info: http://www.gnu.org/software/grub

 

See also Jasons post "What to do when you get the GRUB prompt" Here

 

 

B) Bruno

Share this post


Link to post
Share on other sites

CONFIGURE X

( How To Get Your X Back )

 

If you have Mandrake, PCLos, SuSE, Ubuntu, Debian or Slackware . . First read the notes for the automatic x setup tools at the end of this post !

 

In case of pure disaster you can lose your X, and mess up your X-Config file. This tells you how to fix that.

In the case of a failing X you get thrown back to the prompt in a text console in runlevel 3, just to check that do:

$ root ( not "su" because you're not logged in as user yet )
< password >
# init 3

 

This because the following actions should absolutely not be done in another run level. ( In Ubuntu and Debian please boot up in "safe mode" )

 

We stay logged in as root and first do:

# Xorg -configure

 

The screen will go black for a few seconds because it will generate an new xorg.conf file, it will put "xorg.conf.new" in root's home directory ( /root ) . . . . so check this with:

# ls /root

 

If the file is there we can first check if it works:

# Xorg -config /root/xorg.conf.new

 

You should get a gray ( or blue ) screen with an X-shaped mouse cursor, this means it's working. If so we get back to the prompt with:

< Ctrl+Alt+Backspace >

 

Now we back up the old file, just to be sure we can compare later if needed:

# cp /etc/X11/xorg.conf /etc/X11/xorg.conf-BACKUP

 

Next we move the new file on its place:

# mv /root/xorg.conf.new /etc/X11/xorg.conf

 

I hope all went smooth up until now, because then we can:

# reboot

 

I know "startx" is possible too, but I do like a "fresh" start

 

NOTES: Automatic X setup tools:

 

1). In Mandrake and PCLos the command is "XFdrake" ( as root ) . . .

 

2). In SUSE just type "sax2" as root on the commandline ( "sax2 -a" will do it automatically )

 

3). In Slack you can try "xorgsetup" ( if that fails then try "xorgconfig" )

 

4). In Debian and Ubuntu ( as root ) "dpkg-reconfigure xserver-xfree86"

 

B) Bruno

Share this post


Link to post
Share on other sites

MANDRAKE 92 INSTALLMUST READ before installing 9.2 Mdk, Warnings, bugreports and install tips

 

There are a few important unresolved issues with the new Mandrake 9.2.

We ask you to read the following with great attenttion:

 

A ). Problems with fried LG CD-ROM Drives and Burners, see this thread. And Mandrake errata: http://www.mandrakel...n/lgerrata.php3

 

B ). Lost Menu Entries after updating and/or adding software, read solution in This post

 

C ). See/read the mandrake errata page: http://www.linux-man.../en/errata.php3

 

D ). Tips for a simple install: ( 5 + 6 + 7 + 8 important for everybody ! )

 

Tips Mandrake 9.2 install ( The simple way ):

 

 

1). Go for all the defaults the installer presents you. ( do check if the partitioner leaves enough space for your Windows )

 

2). Choosing packages: all on the left side the defaults + Gonme and KDE on the right ( If you do not run a server ( you absolutely need the development packages )

 

3). Overview configuration: . . check if there are no items left un-configured ( if so config them )

 

4). Install Lilo in MBR

 

5). Make a boot floppy too ( Problems ? Look here: Formatting floppy 1722kB and Making boot floppy )

 

6). Update after install . . . 100 - 200 MB ( already ! Drakx, Harddrale, KDEbase, Gnomelibs Mplayer and many more) Don´t do all the updates at once, take groups of 4 - 6 at a time and give the process time to finish before closing the MCC ! ( Most US and French mirrors are useless, so pick a update mirror from the Netherlands or Germany)

 

7). After the Install, get more programs in the MCC, the default install, even with all the packages is pretty minimal, there is plenty more on the CD´s you can install with the normal "add software" in the MCC ! ( Don´t forget to run the updates again after installing the new programmes )

8). Install anacron !!!! ( See Cron and Anacron )

 

WARNING: After updating/adding software: do not open the menu for 60 seconds . . it has to be written to cache ( Related to menu problem mentioned above )

 

 

Have FUN !!

 

E). Additional info about making a boot CD to replace the boot-floppy: Look here

 

B) Bruno

Share this post


Link to post
Share on other sites

CHROOT . . . . . . .

 

See UPDATE because of change to udev below

 

With the "chroot" command you can log in as root in another distro located on a different partition so you can give commands as root, as if you were actually booted in that other distro.

This is handy for repair jobs, but also for example if your MBR is messed up and you only have a Live CD you can boot from.

In this example we want to restore Mandrake's lilo to the MBR and Mandrake is on hda7. We boot from the Live CD ( or any other distro on the same computer ) and issue the following commands:

 

First we make sure we are root:

$ su
< password >

 

Then we mount the Mandrake partition:

# mount /dev/hda7 /mnt/hda7

( this assuming that /mnt/hda7 does exist, if not we have to do "mkdir /mnt/hda7" first )

 

Also we have to mount /dev/pts and /proc

# mount -t devpts none /mnt/hda7/dev/pts
# mount -t proc none /mnt/hda7/proc

( NOTE: /dev/pts is only Mandrake, other distro's just use /dev without the pts )

 

Now we can chroot:

# chroot /mnt/hda7

( NOTE: The prompt will change to show you that you are on a different filesystem )

 

And give the command to write the Mandrake lilo to MBR:

# /sbin/lilo -b /dev/hda

 

Log out of the chroot environment:

< Ctrl+D >

 

And we are "normal" root again.

 

We unmount the previously mounted partitions:

# umount /mnt/hda7/dev/pts[/size]
[size=4]# umount /mnt/hda7/proc[/size]
[size=4]# umount /mnt/hda7

 

And reboot to see the MBR working again:

# reboot

 

Hope you will never need this and always have a boot-floppy or boot-CD ready, but in case even those fail . . . . . . .)

 

B) Bruno

 

UPDATE: Because of the recent switch to "udev" in PCLos and Mandrake there are 2 changes in the above:In Mandrake /devpts is gone, so only proc has to be mounted

 

In PCLos the /dev line changed to "mount -t none /dev /dev/hda7/dev -o bind"

Share this post


Link to post
Share on other sites

NVIDIA DRIVERS

 

NOTE: Installing the nVidia drivers is no easy task for novices. At least you will need to be comfortable with the commandline and the Vi-editor ( see Vi revisited because all is done in text mode and you have no GUI while doing this. )

1) Download the drivers ( http://www.nvidia.co...ers/drivers.asp )

 

What it does not say here in these instructions is that you have to be in runlevel 3 to install the drivers . . . . . :

The safest way to do this is to change your /etc/inittab file:

$ su
< password >
# kedit /etc/inittab

 

Change the line: "id:5:initdefault:" in "id:3:initdefault:" and save the file

# reboot

 

2) Type "root" to get root access, cd to the directory where you downloaded the file and type the following:# sh NVIDIA-Linux-x86-1.0-5328-pkg1.run ( adapt package number to the one you downloaded )

 

3) You'll be greeted with the license which asks you to accept or deny it.

 

4) If you had previous GLX drivers and kernel modules installed, such as the RPMs, you will be prompted to remove them.

 

5) Next, the utility will check for and return with either a module if your kernel is supported or a statement that you will need to build a module if your kernel is not supported.

 

6) When you select OK, the utility will either download and install the pre-compiled module or download and compile a module then proceed to install the rest of the driver package.You should receive a message proclaiming the installation was a success. Proceed to the section below before restarting X or rebooting.

 

7) Open your /etc/X11/XF86Config-4 file with the Vi text editor ( one of the few that works in text mode):

 

# vi /etc/X11/XF86Config-4

 

NOTE: when using Xorg the file is /etc/X11/xorg.conf

 

< i > ( put vi in insert mode )

 

Under section "Module" there should be a:

Load "glx"

 

If you have these lines, nVidia advises you to remove them:

 

Load "dri"Load "GLcore"

 

Now scroll down to the 'Graphics device section' ( or sometimes just named 'Device' ). Instead of the default XFree driver:Driver "nv"Change to:

Driver "nvidia"

 

Make the above changes, save the file:

< Esc >

< ZZ >

 

And start the X server with:

# startx

( to test if it works )

 

NOTE 1:

In the "module" section it is sometimes better to replace

Load "glx"

 

With:

 Load "/usr/X11R6/lib/modules/extensions/libglx.so"

 

Anyway that is the way I always set it up in Mandrake.

 

NOTE 2:

If all works well you can change the /etc/inittab file back to "id:5:initdefault:" and reboot.

 

NOTE 3: ( Alternative for the "id:3:initdefault:" part )

If you know what you're doing you can also exit X and go to text mode with:

Press "Ctrl+Alt+F2", then log-in as "root" and type "init 3", then again you have to login as root.

 

When ready type "init 5" to get back to runlevel 5.

 

Additional info:

nVidia README( You might want to print this out because once you are in text mode it will be hard to browse to the site and read it. Contains an extensive FAQ. )

 

B) Bruno

Share this post


Link to post
Share on other sites

ATOMIC CLOCK

 

Some people are obsessed with time, they assure you that every second counts. . . . I have strong doubts about that, and even would like to defend the theory that time is mankind's worst invention . . . . . but, if you absolutely want to update your clock to the correct atomic clock time:

$ su
< password >
# rdate -s clock-1.cs.cmu.edu && hwclock --systohc

 

The first part updates your system time, the second part ( after the && ) updates the BIOS clock, so if you only want your system time updated leave the "&& hwclock --systohc" off.

 

For the real time fanatics we can even automate the process . . . ( well isn't that what computers are for ? )

 

You can add the line above at the end of /etc/rc.d/rc.local to make it update every time you boot. Of course you need a broadband connection that is started during boot for it to be effective.

 

B) Bruno

 

NOTE: You will need to have "rdate" installed ( check your package manager )

 

PS: If you get an odd time, right-click the clock, select "Adjust Time and Date" and check if the timezone is set correctly

Edited by securitybreach
Last Edited by Securitybreach 2013-03-31

Share this post


Link to post
Share on other sites

CDRECORD( NOTE: for the new 2.6 kernel, see the remark in the PS at the end !! ) CDrecord is the default commandline cd burning tool in Linux . . . simple and effective ;)For burning ISO's it's pretty straightforward:

 cdrecord dev=0,0,0 distro.iso

But if you want to burn files and directories to CD it requires a bit more: first we will have to use the "mkisofs" command to make an iso of the files.If you want to use the CD in linux, the following arguments are recommended:

mkisofs -R -r -v -o filename.iso file1 file2 file2 dir1 dir2

-R is for Rock Ridge extensions-r is to preserve the UID/GID info-v is more output so you can see what is going on-o is to set the name of the outputfile ( filename.iso )After making the ISO you can check the content of the ISO with:

isoinfo -f -R -i filename.iso

Now we can burn the ISO to CD, first we have to know the "dev=" numbers:

cdrecord --scanbus

( NOT with 2.6 kernel !! )The output will end like this:

scsibus0:	0,0,0   0) 'LITE-ON ' 'LTR-16102C   ' 'US52' Removable CD-ROM	0,1,0   1) *	0,2,0   2) *	0,3,0   3) *	0,4,0   4) *	0,5,0   5) *	0,6,0   6) *	0,7,0   7) *

And in this case it will show you the numbers are 0,0,0Now we can burn:

cdrecord -v dev=0,0,0 filename.iso

Or we can give a few extra arguments:

cdrecord -v -multi -eject speed=16 dev=0,0,0 filename.iso

This will allow a multisession disk that will be ejected after burning at speed x16Sure, I know, this all seems complicated, and K3b ( the GUI front-end for cdrecord ) looks simpler to use . . . but once you have learned to do it this way you will see that the commandline is better and puts all your computer power in the burning and not in the fancy GUI ;)More about CD and DVD commandline burning, read Here;) BrunoPS: NOTE: For the new 2.6 kernel things have changed for CDrecord . . no more "--scanbus" but now we do "dmesg | grep CD" to determine the device:In Mandrake 10, and probably soon in other distro's with the 2.6 kernel, first do

# dmesg | grep CD

to see what /dev/hd?? your burner is located . . and then:

# cdrecord dev=/dev/hdc filename.iso

That is all . . . .See also: http://forums.scotsnewsletter.com/index.ph...=503&st=255 for the reason why this change is.

Share this post


Link to post
Share on other sites

SLACKWARE TIPS ( 2 )Making poweroff and reboot buttonsIn Slackware when we want to power-off we need to give the command "shutdown -h now" as root in a terminal. ( Because there is no entry for shutdown in the menu B) )We can make a power-off button, but it needs some work, here is how to do that:We need to edit the sudoers file, as root, with vi ( study the Vi editor before you do this, see notes below ! ). . There is a special command to open the sudoers file in vi though . . NOT "vi sudoes", but:

# visudo

This will open the file in vi . . so press "i" to put vi in insert mode an paste the next line at the end of the file: ( you need to do this for every user you will allow to reboot and halt )

bruno ALL=(ALL) NOPASSWD: /sbin/shutdown -h now, /sbin/reboot

Then save and close the file: <Esc> <ZZ> We now gave "bruno" sudo permission to give the commands "sudo /sbin/reboot" and "sudo /sbin/halt" and we can meke special buttons on the tastbar: Rightclick on the taskbar and choose "Add" --> "Special Button" --> "Non-KDE application" . . you will get a little GUI where you can put in the top box ( Executable ):

sudo /sbin/reboot

. . . and press on the icon to change the icon to the one you like B) . . then press OK and you are ready . . . Do the same for

sudo /sbin/shutdown -h now

And every user you did add in the sudoers file will be able to press the buttons and reboot or halt the system.That should do the trick. Have FUN B) BrunoNOTE: More about editing with Vi: Vi ( Revisited ) Tip

Share this post


Link to post
Share on other sites

GREAT LINUX LINKS From Windows to Linux: The bottom Line Linux Tips For Windows People Win to Linux Intro to Linux Windows / Linux equivalents: The table of equivalents ALL important Linux Links: YoLinuxLoads of Linux LinksLinuxLinks.comEit.in Research and Linux LinksArcturus Helpful Linux LinksLinux Command Line Cheat Sheets Major Distros DistroWatch PCLos Mandriva Red Hat Fedora Ubuntu Knoppix Debian SUSE Gentoo Slackware D*** Small Linux Mepis VectorLinux Lindows Info on Major distros DistroWatch Major Distros LinuxIso Cheap CDs ( for those on dial-up ) CheapBytes OS Heaven.Net CheepLinux (UK) Lankum.com (AUS) Munnikes (NL) LinuxCD (FR)LinuxCDs.com.ar (AR)Pre-installed Linux computers: Seascape.usLinux.v2w.orgIbexpc.comSystem76.comMagiansystems.comLinuxcomputersystems.comLinuxcertified.comPenguincomputing.comEmperorlinux.comDamnsmalllinux ( Mini ITX )Axiomtech.co.uk ( UK )Dnuk.com ( UK )Xtops.de ( Germany )MandrivaStore( France )Linux-service.be ( Belgium )Lxer.com ( A large list of addresses )Best mirrors: Ibiblio NLuug UTwenteBittorrent Downloads: The Linux Mirror ProjectLinux ISO torrentHardware Databases: Linux Printing.org Linux Compatible Tuxedo.orgLinModems Winmodems are not modems Linux Hardware.org Pa-Risc LinuxMandriva HW Database Red Hat HW Database SUSE HW DatabaseUbuntu Hardware SupportPCLos Hardware DatabaseLinux INcompatibility ListLinux Laptop: Linux-Laptop.nete-laptop.com Battery Powered Mini-HOW TOTuxMobil Installation GuidesLinux Search: Google-Linux Linux Sound: Linux-Sound Linux Printing: Linux-Printing Printing with CUPSLinux supported HP printers Linux Games: Linux-Games The Linux Counter: The Linux Counter Podcasts Linux LogLinuxQuestions.org PodcastThe Linux Link Lug RadioPodcast Alley ( additional links )Linux News: Linux Pipeline Linux.com NewsforgeSlashdot Linux Today Tux.org Just Linux Freshmeat (software) Think Geek OS newsLWN.net Kuro5hinPCBurnBack issues Penguin ShellTuxMagazineLinuxgazette.net ( Online Linux Magazine )Software: Free Software FoundationGNU projectRPM Find.net ( Search engine RPMs )RPM pbone.net ( Search engine RPMs )Freshmeat SourceForgeBerlios SourcewellIceWalkersLinuxSoft.czOpenOffice.org Apache Linux Games Kernel.org Samba Penguin Liberation Front Thac's RPMsXimian Linux Packages ( Search engine Slackware ) Thread Mandrake PackagesThread Slack Packages Thread SUSE PackagesThread Fedora SourcesThread Debian sourcesUltimate Boot CD: The Ultimate Boot CD ( Full of very nice tools )Linux Books: RuteO'ReillyO'Reilly - commandsFree Linux eBooks (.pdf) The Linux Documentation Project ( tldp ): The Linux Documentation ProjectHowTo's: nVidia on 2.6 kernelJet Blackz Xscreensavers manuals The Gimp TutorialsGimp Savvy Gimp Tutorials Gimp Tutorials Pointer Page GimpGuru.org The RRU Gimp Tutorial Tigert Gimp Tutorials My First Mutt Bash prompt Howto Knoppix HD install Howto Super Man Pages IBM main Linux page IBM tutorials Linux Headquarters SUSE Linux networking commands YoLinux Tutorials Firewall How To LinuxDoc Firewall How To Slackware 9.1 installAll kinds of How-To's from Mines.eduLinuxnewbieguide.orgSecurity: PC Flank ShieldsUp Top 20 Threats Rootkitinfo Download Chkrootkit Chkrootkit software Security info Symantec F-Prot AV Software for Linux Mandrake info: MandrivaLinuxMandrivaStore MandrivaExpert MandrivaClub MandrivaSecure Installing from harddrive Penguin Liberation Front lair Easy URPMI Thac's RPMS for MDK9.2 Mandrake Linux tips for free Mandriva Hardware Database SuSE info: SUSE Products SUSE Support SUSE Downloads SUSE Updates SUSE Games IBM and SuSE SUSE Hardware Database Debian info: Debian General reference Debianhelp.co.ukApt-get Backports Jigdo Debian Doc Slackware info: Slackware.orgUserlocal.comAudioSlack.orgSlackPackages.netDroplineGnomeThe U.R. Slackware Book ProjectFedora Core info: User DocumentationThe Unofficial Fedora FAQ - core 1 - 5SELinux FAQsRH Hardware DatabaseAll Great Fedora LinksUbuntu info: Community DocumentationCommon QuestionsRoot/SudoUbuntu Hardware SupportAll Great Ubuntu Links Windowmanagers: X Windowmanagers KDE.org KDE-Look.org Dot KDE.org Gnome Tux images: Jane's Penguin Page The LWN Penguin Gallery The World Famous Tux Gallery A Complete History of Tux - so Far Linux Penguins on the web Icons: Art Gnome.org Gentoo Icons DigitalGarage Tux 'n Tosh KDE-Look.org Wallpapers: CT wallpapersLinuxArt.com LinuxSoft.czSoftscape Digital Blasphemy DeviantArt Deskmod ArtUproar Customize.org This page of links was made with the cooperation of many forum members in this thread. If you have some links to add please post your links in that thread ;)Thanks to all who posted their links.:D Bruno

Share this post


Link to post
Share on other sites

CUPSCUPS (Common UNIX Printing System) can be used instead of the default LPR printing system. And there is a good chance if your printer does not work with LPR it will with CUPS.In a post from Striker we found a good way to set it up:

If you use CUPS,you must make sure the lpd service is stopped and the cups service is started:If I remember well, I had to be root for this :/sbin/service lpd stop/sbin/service cups startAlso if there's a services configuration tool in Slack, use it to configure your system to start the cups service automatically (and disable the lpd service if it is running).After the cups daemon is started, open a web browser and connect to the cups server:http://localhost:631 Then you have to add the printer in the Cups Configuration Interface.When you did get that far, it's probably working, so we go on: to add a printer, click Manage Printers and then the Add Printer button.It'll ask for username and a password. I did have to use root as the username and my rootpassword .
NOTE: If you see your printer in the cups drivers list, but not the exact version number of the printer, you could try a few other versions at random, and most of the time you will be able to find a version number that will use the same drivers. This is not ideal and the quality may not be 100% but at least you will be able to print. ;)Now, once you have set up CUPS you will notice it will print in KDE programs, but not in OpenOffice . . . Here is a trick you can try, type in a console:
/usr/lib/openoffice/program/spadmin

( Check the path because this is the one for Mandrake 9.2 . . . . "/openoffice/program/spadmin" is the fixed part you can "locate" )You will get a dialog where the generic printer is preselected . . . . click on properties . . . you will see that the command is "lpr" . . . . . replace that with "kprinter -stdin" . . . . and save.Why ? Koffice and KDE are just configured to use CUPS and not "lpr" . . :)NOTE: You might have to clear the printer lpr queue first, delete the old jobs that are not finished and still blocking the process ( even after a reboot ):

$ lprm -

( "lprm" will remove the active job, "lprm -" will remove all jobs )All info on CUPS and printing: CUPS Quick Start at Linuxprinting.orgB) Bruno

Share this post


Link to post
Share on other sites

APROPOSBecause Linux knows so many commands you can impossibly remember them all, that is why there are a few tricks available to help you.We already know from previous tips that if you type the first few characters of a command and press the <tab> key, it will autocomplete the command or give a list of options.Also we had the whatis command a few tips ago this showed a line of text explaining what a command was for.Here is another clever command: "apropos". Imagine you know only a part of the name or description of a command, let's take an example like "alsa"

$ apropos alsa

Returns to the screen:

aconnect	   (1) - ALSA sequencer connection manageralsaconf	   (8) - configuration tool for the Advanced Linux Sound Architecturealsactl	   (1) - advanced controls for ALSA soundcard driveralsamixer	  (1) - soundcard mixer for ALSA soundcard driver, with ncurses interfacealsaplayer	  (1) - plays various sound filesamixer		(1) - command-line mixer for ALSA soundcard driveraplay		(1) - command-line sound recorder and player for ALSA soundcard driveraplay [arecord]   (1) - command-line sound recorder and player for ALSA soundcard driverarecord	   (1) - command-line sound recorder and player for ALSA soundcard driverarecord [aplay]   (1) - command-line sound recorder and player for ALSA soundcard driveraseqnet	   (1) - ALSA sequencer connectors over network

Well, that is pretty cool isn't it ?? . . . . . . . cool ?:

$ apropos coolSmalledit-3.17.7 [smalledit] (1) - Stripped down version of Cooledit - a full-featured text editor for the X Window Systemcooledit	   (1) - 3.17.7 - Full featured text editor for the X Window System, Version 11coolicon	   (1) - 3.17.7 - Icon manager with graphical icon configuration and drag and drop support. Written under the Coolwidget librarycoolman	   (1) - 3.17.7 - Man page reader for the X Window System based on the Coolwidget library

Have fun exploring ! :DB) Bruno

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×
×
  • Create New...