Jump to content


Tips for Linux Explorers


  • This topic is locked This topic is locked
375 replies to this topic

#26 OFFLINE   Bruno

Bruno

    Le Professeur Pingouin

  • Admin Emeritus
  • 37,904 posts

Posted 25 April 2003 - 09:48 AM

YaST for SUSESuse uses it's own package management system.I call on Zox, Greengeek and ComputerBob to please write us a few lines about it. :P  Bruno

#27 OFFLINE   LilBambi

LilBambi

    Australisches Googler

  • Forum Admins
  • 21,522 posts

Posted 25 April 2003 - 11:08 AM

FYI:Here are some articles on the RedHat site about apt-get and other auto-updaters in relation to RedHat:http://rpm.redhat.co...tware/updaters/
Bambi
AKA Fran

Posted Image
My Public Key for Email :: BambisMusings Blog :: Fran's Computer Services Blog :: MyPassionIsBooks Blog :: 5BuckReview :: CNIRadio
"The Net interprets censorship as damage and routes around it." ~John Gilmore (Time Magazine, Dec 6, 1993)

#28 OFFLINE   Bruno

Bruno

    Le Professeur Pingouin

  • Admin Emeritus
  • 37,904 posts

Posted 25 April 2003 - 11:26 AM

Thanks for your input LilBambi.What distro are u using yourself ? Was it Mandrake or RedHat ? I'm a bit confused now, was sure it was Mandrake. . . ? :P  Bruno

#29 OFFLINE   LilBambi

LilBambi

    Australisches Googler

  • Forum Admins
  • 21,522 posts

Posted 25 April 2003 - 11:48 AM

Bruno, on Apr 25 2003, 11:26 AM, said:

Thanks for your input LilBambi.What distro are u using yourself ? Was it Mandrake or RedHat ? I'm a bit confused now, was sure it was Mandrake. . . ? :P Bruno
Sorry Bruno -- I should have been clear on that point ... Actually it is both ... Mandrake (since 7.0) and RedHat (since 6.0).I am currently using RedHat 7.2 on my alternate computer (through KVM switch) but we have 11 networked boxes here. Mainly with versions of Mandrake and RedHat on them. We also have one Win95 (dualboot) and one Win98se (solo box).  In addition we have a couple freeBSD installations (standalone and dualboot).So the confusion was quite understandable :P
Bambi
AKA Fran

Posted Image
My Public Key for Email :: BambisMusings Blog :: Fran's Computer Services Blog :: MyPassionIsBooks Blog :: 5BuckReview :: CNIRadio
"The Net interprets censorship as damage and routes around it." ~John Gilmore (Time Magazine, Dec 6, 1993)

#30 OFFLINE   Bruno

Bruno

    Le Professeur Pingouin

  • Admin Emeritus
  • 37,904 posts

Posted 25 April 2003 - 01:04 PM

LilBambi, on Apr 25 2003, 05:48 PM, said:

I am currently using RedHat 7.2 on my alternate computer (through KVM switch) but we have 11 networked boxes here. Mainly with versions of Mandrake and RedHat on them. We also have one Win95 (dualboot) and one Win98se (solo box). In addition we have a couple freeBSD installations (standalone and dualboot).
Does that mean I can ask you to write a few lines about easy software install in RedHat ? Please ?And what about freeBSD ? You and ThunderRiver look like the only ones that could be able to shed some light on software install in freeBSD. Do they use RPM ? Tarballs ?See, we have lots of questions in this forum, are hungry for answers, and would appreciate your expertise. :P Bruno

#31 OFFLINE   Bruno

Bruno

    Le Professeur Pingouin

  • Admin Emeritus
  • 37,904 posts

Posted 25 April 2003 - 01:50 PM

INSTALLING SOFTWARE

RPM

RPM stands for RedHat Package Management, but is pretty universal and used in modern Distro's. In many cases a simple click on the RPM icon will open a GUI for easy installation. Sometimes you can even do a test-install to see if all dependencies are correct.

For the commandline we have: ( assuming we want to install samba-2.2.1a-4 )
# rpm -ihv  samba-2.2.1a-4.rpm ( Will install the package )
# rpm -Uhv samba-2.2.1a-4.rpm  ( Will upgrade the package )
# rpm -e samba-2.2.1a-4.rpm  ( Delete the package )
# rpm -l samba-2.2.1a-4.rpm  ( Will list the files in the package )
# rpm -ql samba-2.2.1a-4.rpm ( Will list the files and state the installed version of the package )

Imagine the install returns that there are some libs missing, and you know for sure that they are there: In most cases you can force an install, or tell it to ignore dependencies.
# rpm -ihv  samba-2.2.1a-4.rpm --force
# rpm -ihv  samba-2.2.1a-4.rpm --nodeps

Upgrading:
First have a look what's installed,
# rpm qa | grep samba

this will return,
samba-common-2.2.1a-4
samba-client-2.2.1a-4
samba-2.2.1a-4

uninstall. ( Leave the dependencies as they are )
# rpm -e samba-common-2.2.1a-4 --nodeps
# rpm -e samba-client-2.2.1a-4 --nodeps
# rpm -e samba-2.2.1a-4 --nodeps

install the upgrade, ( With or without --force  or --nodeps )
# rpm -ihv samba-2.2.7-3.7.2.rpm
# rpm -ihv samba-client-2.2.7-3.7.2.rpm
# rpm -ihv samba-common-2.2.7-3.7.2.rpm

B) Bruno

#32 OFFLINE   Bruno

Bruno

    Le Professeur Pingouin

  • Admin Emeritus
  • 37,904 posts

Posted 25 April 2003 - 06:11 PM

INSTALLING SOFTWARE
TGZ ( slack-packages )

Slackware and Slack-based distro's like VectorLinux use .tgz packages.

Using the Midnight Commander, an ancient looking,  but very effective tool, installing slack-packages are a breeze;  su root, highlight the package, press F2 and choose install.

The Midnight Commander ( mc ) is a very powerful program, allowing you to manage files, copy, editing, moving, searching, installing, zipping, unzip, converting from one zip format to another, send files to a remote host, undelete files ( ext2 only ),  link, symlink, chown, chmod, all those actions  can be done with this "Miracle Commander".

MC is available for almost every Linux distro, also Mandrake and RedHat, see install CD's, install it on your computer and have a look, just type  < mc >  in a console for the program to start. ( Warning: it's an ugly ******* compared to modern GUI interfaces ! )

Also you could use the package manager: "pkginstall" like this:
# pkginstall name_of_package.tgz

That will take care of the installation for you

Using RPM's in Slackware means that you have to convert them to .tgz with a tool called rpm2tgz. VectorLinux is less picky it accepts RedHat's rpm's without complaining.

Tar.gz ( tarballs ) can not be used in Slack or Slack-based distro's

Don't forget to check out SWARET if you use Slackware !!

B) Bruno

#33 OFFLINE   Bruno

Bruno

    Le Professeur Pingouin

  • Admin Emeritus
  • 37,904 posts

Posted 26 April 2003 - 03:04 PM

INSTALLING SOFTWARE
TARBALLS ( compiling from source )

Before we start: check if you got a "c" compiler, "gcc" installed on your computer. ( usually if you choose "development packages" during install gcc will be on your system.:
$ whereis gcc

If no gcc is installed, now is the time to do so, the rpm's are on your CD !


IN A NUTSHELL,
Here is what needs to be done to install a tarball package:
Unpack gkrellm.tar.gz ( we take gkrellm as example )
$ tar -xvzf gkrellm.tar.gz
$ cd gkrellm
$ ./configure
$ make
$ su
< password >
# make install

IN DEPTH,
Download the gkrellm-2.0.tar.gz package to your /home directory.
Open a console
# tar -xvzf gkrellm-2.0.tar.gz  ( Will unzip the package to a new directory gkrellm-2.0 )
Note: for .tar.bz2 packages we do < tar -xvjf >, for .tgz packages < tar -xvfz >
# ls ( Check the name of the new directory, it might be gkrellm2 )
# mv gkrellm-2.0 /usr/src  ( Will move it to your sources directory )
# cd /usr/src/gkrellm-2.0  ( Will put you right inside the directory )
# ls ( Will list all the files in the directory )

IMPORTANT: Do read all relevant files like README and INSTALL they contain essential info about dependencies and install instructions. If no special install instructions are given:
$ ./configure
  ( That is dot slash configure )

If any errors occur during the configure process read the config.log, see what went wrong. If it misses a special lib file, see if the file is installed, if not install it and start again. If it is installed but the script can't find it consult the troubleshoot section below.

If configure did not report any errors:
$ make ( Might take some time )
$ su
< password >
# make install ( bingo ! )
Ctrl+d ( back to normal user )
$ cd ( back to home directory )

In the last few lines printed to your screen, make install will tell you where to find the executable, relevant files and doc's. Note this down it saves you searching for it as you want to change the config file for the program.If the compiling was successful you can now run the program by typing "gkrellm" at the prompt. ( most likely the executable will be in your path" /usr/bin or  /usr/local/bin )

If you like, you can remove the sources if you're done "rm -rf gkrellm-2.0" but if you've got enough space on your HD just leave it there, makes  a re-install  ( only "make" and  "make install" ) easy.

Well if you're still there with me, BRAVO !

B) Bruno

#34 OFFLINE   LilBambi

LilBambi

    Australisches Googler

  • Forum Admins
  • 21,522 posts

Posted 26 April 2003 - 05:22 PM

Great tips Bruno!I love Midnight Commander (mc) it really is the Miracle Commander in commandline!
Bambi
AKA Fran

Posted Image
My Public Key for Email :: BambisMusings Blog :: Fran's Computer Services Blog :: MyPassionIsBooks Blog :: 5BuckReview :: CNIRadio
"The Net interprets censorship as damage and routes around it." ~John Gilmore (Time Magazine, Dec 6, 1993)

#35 OFFLINE   Bruno

Bruno

    Le Professeur Pingouin

  • Admin Emeritus
  • 37,904 posts

Posted 26 April 2003 - 05:24 PM

B) Thanks Fran !B) Bruno

#36 OFFLINE   Bruno

Bruno

    Le Professeur Pingouin

  • Admin Emeritus
  • 37,904 posts

Posted 26 April 2003 - 07:50 PM

( just to keep you all interested)

TOPICS STILL ON THE AGENDA

Multi Media Keys under Linux ( tomorrow ! )
Tweaking the prompt
File permissions
Md5sum and iso's
Autostart programs at boot
Bash script
Brief introduction to C
More suggestions anyone ???

B)  Bruno

#37 OFFLINE   greengeek

greengeek

    Forum Fiend

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 1,864 posts

Posted 26 April 2003 - 08:49 PM

B) Any use for the Window's key apart from sticking a small picture of a penguin on it?Joy

#38 OFFLINE   Bruno

Bruno

    Le Professeur Pingouin

  • Admin Emeritus
  • 37,904 posts

Posted 26 April 2003 - 08:55 PM

Bruno, on Apr 27 2003, 01:50 AM, said:

Multi Media Keys under Linux ( tomorrow ! )
Greengeek: this includes the "windows"-key B) Bruno

#39 OFFLINE   Bruno

Bruno

    Le Professeur Pingouin

  • Admin Emeritus
  • 37,904 posts

Posted 27 April 2003 - 01:14 PM

MULTI MEDIA KEYS IN LINUX  

NOTE: Described here are actions for Mandrake, it will work for other distro's too, but names may be slightly different.  

INTRO: These are the 4 steps:
1) use xev for getting the keycodes,
2) make a script mapping the keys,
3) make a new directory in the startmenu for odd actions
4) use kmenuedit to assign the keys to entries in the startmenu.  

1) Open a console and type < xev > ( if nothing comes up, install xev: < urpmi xev > or < urpmi X11R6-contrib > )  xev will open a window, look for the line:

state 0x10, keycode 116 (keysym 0xff20, Multi_key), same_screen YES,  

Now press a key and note down the keycode, repeat this for every key you want to assign an action to ( also volume up/down, right and left "windows" key, logitech-key, any key on your board ! )
A total of 22 Multi Media keys can be mapped.

2) Next step is making a text file in the autostart directory of your window manager ( or put the lines in /etc/rc.d/rc.local )
$ vi /home/bruno/.kde/Autostart/multikeys

( replace "bruno", dot kde )
< i > ( to get vi in insert mode )  
This is the text for that file:

Quote

#!/bin/bash xmodmap -e 'keycode 116=F13'
xmodmap -e 'keycode 229=F14'
xmodmap -e 'keycode 236=F15'
xmodmap -e 'keycode 178=F16'
etc. ( you can use F13 - F35 )
#End script

< Esc >  ( vi back to command mode )
< ZZ >   ( save the file and close )

# chmod 0755 /home/bruno/.kde/Autostart/multikeys
( change permissions for the file )  

3) Specialy for actions like volume up/down, mute, reboot etc. we have to make a new section in the startmenu: ( mail and browser are already in the menu )  
$ menudrake

I made a new directory in "amusement", "toys", called multikeys
The entries made in that directory are:  

Volume up   < aumix -v+10 > ( Command )
Volume down  < aumix -v-10 >
Mute  < aumix -v-50 >
Fwd  < xmms -f >
Rew   < xmms -r >
Play/pause  < xmms -m -t >
Stop xmms  < xmms -s >
Reboot  < shutdown -r now >  ( in MDK 9.1: < reboot > )
Sleep  < xset dpms force standby >
Shutdown  < shutdown -h now >  ( in MDK 9.1 < halt > )
Screensaver < dcop kdesktop KScreensaverIface save >
Lock Screen  < dcop kdesktop KScreensaverIface lock >
( for more commands see < kdocp > )  

Now SAVE menudrake !  

4) In a console type:  
$ kmenuedit

This will bring up a different menu-tool, with in the left pane the entries in the startmenu and down to the right the hotkey assignment.
Simply select the "program" on the left, press: current key "none" and you will get a dialog, press the multi-key you want it associated with, press apply, and you're ready for the fun of your fancy keys. ( Don't forget your mail and browser )  

In kmenuedit you can set any key combination to your favorite programs ( Alt+x for xine, Alt+h for home, Alt+g for gimp, etc.  Warning: the Ctrl key is already used for many shortcuts, see  Control Center --> Look and Feel --> Shortcuts for a complete list. )  

TIP: Get your console under an easy key too. After all it is your most used app !!

B) Bruno

#40 OFFLINE   greengeek

greengeek

    Forum Fiend

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 1,864 posts

Posted 27 April 2003 - 06:20 PM

:blink: Thankyou Bruno, at last some use for those Window's keys!Joy

#41 OFFLINE   Bruno

Bruno

    Le Professeur Pingouin

  • Admin Emeritus
  • 37,904 posts

Posted 27 April 2003 - 07:02 PM

@ Greengeek:  Did you get the stickers ? Send me some . . . . . LOL Glad you're happy !   :blink:  Bruno

#42 OFFLINE   Bruno

Bruno

    Le Professeur Pingouin

  • Admin Emeritus
  • 37,904 posts

Posted 27 April 2003 - 07:11 PM

A ( tiny ) KEYBOARD TIP  

If you want to be able to: ~ " ` ' ^ ´ ¨ change your keyboard settings to "us international"

The only downside is that you'll have to press the key twice in order to get  ~ " ` ^ ´ .  or press the " followed by a space to get the accent  print to screen. There is even a clear difference between ¨ and "  . . the first is pressed twice and the second is the same key pressed once followed by a space . . .  ( only pressing the " prints nothing to screen )

B)  Bruno

#43 OFFLINE   Bruno

Bruno

    Le Professeur Pingouin

  • Admin Emeritus
  • 37,904 posts

Posted 27 April 2003 - 07:20 PM

SHORTHAND  
$ cd ..
( Is shorthand for go back one step in the directory tree )
$ cd ~
( Is for /home/bruno, if you got more then one user ~bruno or ~anna )
$ cd ~/Downloads/Backgrounds
( Is for /home/bruno/Downloads/Backgrounds ) For really fast typing don't forget the tab-key for autocompletion:  
$ cd ~/D "tab-key" /B "tab-key"
( Will give the same as above. )  
B)  Bruno

#44 OFFLINE   LilBambi

LilBambi

    Australisches Googler

  • Forum Admins
  • 21,522 posts

Posted 27 April 2003 - 08:16 PM

Another tip for the cd command:Just type cd at any command prompt and it will take you directly to your /home/username/ directory (meaning the username you used to log in) ... no muss, no fuss  B)
Bambi
AKA Fran

Posted Image
My Public Key for Email :: BambisMusings Blog :: Fran's Computer Services Blog :: MyPassionIsBooks Blog :: 5BuckReview :: CNIRadio
"The Net interprets censorship as damage and routes around it." ~John Gilmore (Time Magazine, Dec 6, 1993)

#45 OFFLINE   havnblast

havnblast

    Discussion Deity

  • Members
  • PipPipPipPipPipPipPipPipPipPipPipPip
  • 4,878 posts

Posted 28 April 2003 - 12:09 AM

Hey guys and gals these are great tips - keep em coming, I have learned lots of neat tricks.Does uprmi work for RH too? - I use apt-get with RedHat

#46 OFFLINE   Bruno

Bruno

    Le Professeur Pingouin

  • Admin Emeritus
  • 37,904 posts

Posted 28 April 2003 - 01:02 PM

NOTE FROM THE EDITOR:  :lol:  :)  :) Looking up a specific topic is made easy: I'm editting an up to date index in the first post on this thread.   :)  Bruno

#47 OFFLINE   Bruno

Bruno

    Le Professeur Pingouin

  • Admin Emeritus
  • 37,904 posts

Posted 28 April 2003 - 01:49 PM

PARTITIONS  

There have been several questions in other threads about partitions. LilBambi gave some good suggestions, let me try to make an overview:  

For the current situation on your HD:
$ df -h
  

( partitions their sizes and space usage )
Do note down on what hda? lives what partition, this might come in handy at re-install, repartition and crash recovery.
( hda is the first HD, hdb the second, hdc the third etc. etc. hda1 is the first primary partition, hda5 the first logical partition  on the first HD )

Everything in one partition is not a good idea, at least you should have a separate /home partition and give it space enough to grow. The clever thing about a /home partition is that when you do a re-install or upgrade you can leave it as it is, saving all your personal settings, mail, addressbook etc.

The minimum number of partitions and their size are ( if you have 5G to spare and full install of modern distro ) :
3 G for /
1+ G for the /home partition
500 MB for the /swap ( more swap is waste )

( Sure you can do with a lot less, some distro's are happy with -500MB and still have X )

A more comfortable partition table is ( 10G to spare ):
5 G for /
4+ G for
/home
500 MB for /swap

A "deluxe" and more complicated partition table is ( 15+ to spare ):
2 G for /
4 G for /usr
1 G for /var ( a lot of writing is done in the /var/log's )
500 MB for /swap
5+ G for /home
7+ G for /backup ( storage )  

Any extra space could be added to /home and /backup.  

B)  Bruno

Thanks to LilBambi  ;)

NOTE: An important note from Prelude76:

Quote

SuSE users should have a fairly large /opt partition, as this is where most 3rd party apps get installed.


#48 OFFLINE   LilBambi

LilBambi

    Australisches Googler

  • Forum Admins
  • 21,522 posts

Posted 28 April 2003 - 02:10 PM

Bravo Bruno!

Excellent outline of partition sizes. That certainly gives folks a great starting point and they can adjust percentage wise as needed for their specific needs.

BTW: df -h is my favorite one ... puts those sizes in to human easily readable format ;)

Great idea on putting an Index in the first posting for easy searching!
Bambi
AKA Fran

Posted Image
My Public Key for Email :: BambisMusings Blog :: Fran's Computer Services Blog :: MyPassionIsBooks Blog :: 5BuckReview :: CNIRadio
"The Net interprets censorship as damage and routes around it." ~John Gilmore (Time Magazine, Dec 6, 1993)

#49 OFFLINE   Bruno

Bruno

    Le Professeur Pingouin

  • Admin Emeritus
  • 37,904 posts

Posted 28 April 2003 - 02:14 PM

Oef, blush . . . thanks Fran  :lol:  :)  Bruno

#50 OFFLINE   Bruno

Bruno

    Le Professeur Pingouin

  • Admin Emeritus
  • 37,904 posts

Posted 28 April 2003 - 02:24 PM

FILESYSTEMS  

Most of you are familiar with the Fat16, Fat32 and NTFS filesystem for windows. In linux we have Ext2, Ext3, Reiserfs and Xfs. The last 3 are journaled filesystems, in fact Ext3 is the same as Ext2 but only with a journal  added. A journaled filesystem allows quicker recovery in case of system crash or power faillure.

Reiserfs and Xfs are very new systems partly still under development. I would advice the Ext3. You can easily convert Ext2 ( Linux native ) to Ext3 without re-format or re-install:  
# tune2fs -j /dev/hda?
  ( where you replace the "?" with the number of the partition, see previous text about "partitions" )  

After you have done this for all your partitions you'll have to change the entries in your /etc/fstab :
$ su
< password >
# mcedit /etc/fstab

Change the ext2 in ext3 for the partitions you converted  ( sure you can use vi as editor too ! :) )  There you go !  Now you have a journaled filesystem.

B)  Bruno




1 user(s) are reading this topic

1 members, 0 guests, 0 anonymous users


    Frank Woods