

Tips for Linux Explorers
#101 OFFLINE
Posted 14 May 2003 - 12:09 AM
#102 OFFLINE
Posted 14 May 2003 - 05:54 AM

My Hometown ~ Registered Linux User #299965 ~ LFS User #11450
#103 OFFLINE
Posted 14 May 2003 - 05:37 PM
( Also see: Check CD Script )
A few posts back I told you to do the md5sum on the ISO files themselves, just because that is far off the easy way !

However CD's can be checked too, it only takes a little more.
First check if you have "isoinfo" installed on your Linux box.
Type in a console:
$ whereis isoinfo
If it's not installed, look for it on your install-CD's !
Here is how it is done ( my example here is a Slackware 9.0 CD )
Put the CD in your CD-rom player, and type in a console:
$ isoinfo -d -i /dev/cdrom
This will give you something like this:
Quote
System id: LINUX
Volume id: Slack9d1
Volume set id:
Publisher id: Slackware Linux, Inc. <info@slackware.com>
Data preparer id: Slackware Linux, Inc. <info@slackware.com>
Application id: Slackware Linux 9.0 disc 1
Copyright File id:
Abstract File id:
Bibliographic File id:
Volume set size is: 1
Volume set sequence number is: 1
Logical block size is: 2048
Volume size is: 339344
Joliet with UCS level 3 found
Rock Ridge signatures version 1 found
The only important info of this output are these two lines:
Logical block size is: 2048
Volume size is: 339344
Now, leave the CD in the player and type:
$ dd if=/dev/cdrom bs=2048 count=339344 conv=notrunc,noerror | md5sum
BEWARE: change the numbers with the ones you found in the previous output !!
This will produce a new output ( takes several minutes ! )
Quote
339344+0 records out
563c1bfff307a16d45f5da04011f07b6 <===( This is the checksum number ! )
Now go to the mirror you have downloaded your ISO from ( or any other mirror ) and pick up the text-file md5sum. This textfile contains the original number:
Quote
If this number matches the number you found in the output above, you can be sure your CD is integer !
In this case it was, but then I always check the numbers before burning my CD, 'cause that's so much easier and does not turn any blank CD's into coasters !


UPDATE: Recently added to the tips: Check CD Script

My Hometown ~ Registered Linux User #299965 ~ LFS User #11450
#104 OFFLINE
Posted 15 May 2003 - 01:29 PM

#105 OFFLINE
Posted 15 May 2003 - 01:35 PM

My Hometown ~ Registered Linux User #299965 ~ LFS User #11450
#106 OFFLINE
Posted 15 May 2003 - 03:22 PM
If you want to shutdown the services via the console (xterm) or terminal, then login as root....Type in 'ntsysv' You will then get a list of the services. Press F1 for more info. To disable use the space-bar. And finally OK. Reboot and note the changes.....
Via GUI, RedHat has a tool too; ''redhat-config-services"
Btw, the other system-admin tools for RedHat are:
redhat-config-date
redhat-config-httpd
redhat-config-keyboard
redhat-config-kickstart
redhat-config-language
redhat-config-mouse
redhat-config-network
redhat-config-network-cmd
redhat-config-network-druid
redhat-config-network-gui
redhat-config-network-tui
redhat-config-nfs
redhat-config-packages
redhat-config-printer
redhat-config-rootpassword
redhat-config-samba
redhat-config-securitylevel
redhat-config-services
redhat-config-soundcard
redhat-config-services
redhat-config-timeredhat-config-users
redhat-config-xfree86
redhat-control-network
redhat-install-packages
redhat-logviewer
redhat-update-gnome-font-install
redhat-update-gnome-font-install2
Many thanks to our special agent !

PS: Fedora has most of that commands too . . but they start with "system-config-", here they are:
system-config-date
system-config-display
system-config-keyboard
system-config-language
system-config-lvm
system-config-network
system-config-network-cmd
system-config-printer
system-config-rootpassword
system-config-samba
system-config-securitylevel
system-config-services
system-config-soundcard
system-config-time
system-config-users
system-control-network
system-install-packages
**** need to give name of package to install
My Hometown ~ Registered Linux User #299965 ~ LFS User #11450
#107 OFFLINE
Posted 15 May 2003 - 03:37 PM
A lot of you people have a mouse with all those fancy extra buttons: three, four or even seven buttons are common place these days. Makes me wonder where we will end up . . maybe some day the keyboard will be integrated in your mouse!
Anyway, let's get those buttons work for us:
First you need to set up your mouse in XFree86 (When using Xorg the file is /etc/X11/xorg.conf )
$ cat /etc/X11/XF86Config-4
( to check if the file is in the right place, if so: )
$ su < password > # vi /etc/X11/XF86Config-4(open the file in vi )
< i > ( put vi in insert mode )
look for the "input device" mouse section and adapt it to look like: ( line 3, 5 and 6 !! )
Quote
Driver "mouse"
Option "Protocol" "ExplorerPS/2"
Option "Device" "/dev/psaux"
Option "Buttons" "7"
Option "ZAxisMapping" "6 7"
Save and close vi:
Esc
ZZ
After that you need to give the command:
# xmodmap -e "pointer =1236745"
Then make a script in .kde/Autostart:
$ vi /home/bruno/.kde/Autostart/mouse(makes the file "mouse" )
< i > ( put vi in insert mode )
and put the following lines in there:
Quote
Esc
ZZ
Once your wheel works you can test to see the extra buttons with < xev > (place mouse in the square and click the buttons and see what happens).
Then you need to download the program "imwheel" (1.0.0pre1) you can find it Here and install it.
It is a .tar.gz file ( tarball ) see for instructions page 3 of the Tips for Starter!
And make a file .imwheelrc in your /home directory:
$ vi /home/bruno/.imwheelrc
(creates the file )
< i > (puts vi in insert mode )
and add the lines:
Quote
Save and close vi
Esc
ZZ
And make a script to start the imwheel program:
$ vi /home/bruno/.kde/Autostart/imwheel( makes the file in Autostart )
< i >
( puts vi in insert mode )
With the following lines:
Quote
Save and close vi
Esc
ZZ
And that is all my friends, now you can simply restart KDE ( or give the command: imwheel -k -b "67" ) and have fun!

PS: Thanks to Ryan for testing and providing the link!
NOTE: PCLos 9.2 seems to need special treatment, you can read about the solution here: http://forums.scotsn...h...st&p=181607
My Hometown ~ Registered Linux User #299965 ~ LFS User #11450
#108 OFFLINE
Posted 15 May 2003 - 05:27 PM

AKA Fran

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)
#109 OFFLINE
Posted 16 May 2003 - 05:13 AM


My Hometown ~ Registered Linux User #299965 ~ LFS User #11450
#110 OFFLINE
Posted 16 May 2003 - 06:46 PM
Cron-jobs are maintenance jobs performed automaticly on your system every night, once a week or a month. Jobs like "logrotate" ( refreshing log files and zipping up old ones ) updatebd ( updating your "locate-search" database ) and a lot of other databases like the rpm database. Cron comes from the Greek word chronos ( Time )
The program that takes care of this is the Cron-daemon. At a pre-selected time it starts doing the jobs that are to be done. Mostly between 3 and 5 at night because then it does not interrupt the users working hours. (if your computer is off at those times you'll have to install "anacron" that picks up forgotten jobs the next time the computer boots ).
There are cron-jobs system wide, general rules that you should not be messing with. But you can add a series of user specific rules.
The schedule for cron is written in the /etc/crontab file.
Lets have a look at the system corntab:
$ cat /etc/crontab
Will show:
Quote
01 * * * * root nice -n 19 run-parts /etc/cron.hourly
02 4 * * * root nice -n 19 run-parts /etc/cron.daily
22 4 * * 0 root nice -n 19 run-parts /etc/cron.weekly
42 4 1 * * root nice -n 19 run-parts /etc/cron.monthly
The order of codes here is: minute, hour, day-of-month, month, day-of-week, user and command. The * means any value will do. So the first line tells it every ) 01 minutes, of 1 hour, of every day, of every week and every month "run-parts /etc/cron/hourly" The second line tells it to do the daily jobs at 4.02 hrs. The third line to do on day 0 the weekly job at 4.22. The last line to do every 1st of the month the monthly job at 4.42!
If those times are very inconvenient you could change them to your preferences.
O.K so what is in /etc/cron.daily ?
$ cd /etc/cron.daily $ ls
This will show you this:
0anacron - logrotate - makewhatis.cron - msec - rpm - tmpwatch
Those are all little scripts for the tasks to be done.
Just add your script ( backup ? ) and it will run with the other daily tasks. Shell or bash script it does not really matter.
Example: Have a look at the rpm script now that we are in the right directory:
$ cat rpmwill show you:
#!/bin/sh rpm -qa --qf '%{name}-%{version}-%{release}.%{arch}.rpm\n' 2>&1 | sort > /var/log/rpmpkgs
See ? . . . . . . #!/bin/sh on the 1st line and a "simple" command on the 2nd line!
Do explore a little and see what all the hourly to monthly tasks are about.
I only did explain all this to you so you would better understand how things are done by the software you are running !

My Hometown ~ Registered Linux User #299965 ~ LFS User #11450
#111 OFFLINE
Posted 17 May 2003 - 04:58 PM
A few pages ago ( page2 ) I told you about adding your urpmi-sources.
From time to time you have to update your urpmi-sources because packages on those mirrors will change and you will no longer be able to use this clever install utility.
Updating is as easy as 1 2 3 :As root in a console ( while you're on line ) :
# urpmi.update -a
That's all !
But then, it's Saturday night, so I would want to put your head through too much stress !

My Hometown ~ Registered Linux User #299965 ~ LFS User #11450
#112 OFFLINE
Posted 17 May 2003 - 07:21 PM
Sunday is a day to chill-out and listen to a sheer endless stream of music.
Here is a neat little trick for you commandline-lovers that really pays off!
To play ALL mp3's on your computer in random order:
$ mpg123 -Z --list <(locate "*.mp3")Note: the special characters: -- < " * . " they all have to be there !
To stop playing: Ctrl+c ( 2x )
Sure you can play just one song too:
$ mpg123 /home/bruno/music/dylan/To_Ramona.mp3
For more options see "man mpg"
So now you can listen to some music while tweaking your computer !

Have a nice sunday !

PS: A commandline mp3 player uses no GUI thus is extremely easy on systemresources !
My Hometown ~ Registered Linux User #299965 ~ LFS User #11450
#113 OFFLINE
Posted 18 May 2003 - 09:02 AM
I know it's a bit late to come with basic install tips, but it looks like a good thing to give a few guidelines:
If you want to check first if your hardware is supported try a Live CD
1) Don't forget to do a good backup of important data on your computer even if it is on a partition that won't be effected by the install !
2) Make a plan in advance on how you want your partitions done ( see Here ) and what filesystem you want to use ( Ext3, ReiserFS etc. See Here and Here )
3) Do not uses all your free space of the windows partition, you might want to leave some working-space there for adding new programs or temp files ( CD burning programs need at least 700 MB temp ) we don't want to cripple your windows OS.

4) BIOS: Put the entry: PnP aware OS on NO ! ( See Here )
5) BIOS: First boot device: CD-ROM, second Floppy, third IDE-0
6) Connect all printers, scanners, card readers etc. and make sure they are turned on
7) Check out the README and INSTALL text files on your CD
8) Note down the root-password you make during install. ( once you have used it a couple of times you can burn the evidence

9) Install the bootloader Lilo or Grub in the MBR ( it will include your windows options automatically ).
Pin this on the wall, and read it again every time you make a new install !

My Hometown ~ Registered Linux User #299965 ~ LFS User #11450
#114 OFFLINE
Posted 19 May 2003 - 03:52 PM
There are a few commands you can use to get the kernel version , machine number and a couple of other basic info of your computer:
$ cat /proc/version
Will give you a full string of information.
$ uname -mWill give you the machine number ( like i686 )
$ uname -rWill show the kernel version
$ uname -nThe localdomain name
$ uname -sThe system name
$ uname -pThe processor
$ uname -aAll info above in one + date and time

My Hometown ~ Registered Linux User #299965 ~ LFS User #11450
#115 OFFLINE
Posted 19 May 2003 - 04:29 PM
Here is a short one:
We can see what is in a package ( rpm or tar.gz or tgz ) , with the following command:
$ less /home/bruno/downloads/package.rpm( replace "package.rpm" with the name of the file )
We will do more tricks with the command "less" another time !

My Hometown ~ Registered Linux User #299965 ~ LFS User #11450
#116 OFFLINE
Posted 19 May 2003 - 05:36 PM

#117 OFFLINE
Posted 19 May 2003 - 05:48 PM


My Hometown ~ Registered Linux User #299965 ~ LFS User #11450
#118 OFFLINE
Posted 20 May 2003 - 04:12 PM
There was a question in a thread about installing Nvidia drivers about how do I leave X and get the computer in text mode.
There are 2 ways to do that:
EITHER:
Ctrl+Alt+F1 (or F2 to F6 ) Will get you out of X
Alt+F7 will get you back in X
OR:
$ root < password > # init 3 ( will get you in runlevel 3 ) # init 5 ( will get you back in runlevel 5 )
Alt+F7 will get you back in X
Read also the Tip about "Runlevels"

My Hometown ~ Registered Linux User #299965 ~ LFS User #11450
#119 OFFLINE
Posted 20 May 2003 - 05:45 PM
Now, just imagine, you have a sudden strike of growing old, and, you forgot your user password. I know it's hard to figure, but weirder things happen !
The solution however is simple:
$ su < root-password > # passwd bruno( if that is your username, don't use mine )
Type in a new password ( you will likely get an error message, ignore it )
Type in the same password again !
Log out as root and log in as user with your new password !
( I said is was easy ! )
Next time we will attack the forgotten ROOT password ! A bit more complicated but it sure can be done.

My Hometown ~ Registered Linux User #299965 ~ LFS User #11450
#120 OFFLINE
Posted 21 May 2003 - 03:24 PM
Here is part two. Yesterday we had forgotten our user password and disaster strikes again today we forgot the root password.
First, disconnect your PC from the net, pull the cable out !
Step 1: For Redhat and Mandrake:
Then boot from your first install CD and as the very first screen comes up hit F2 and type:
rescue ( For RedHat "linux rescue" )
and the computer will boot in rescue mode.
It will show a few alternatives, select : "mount the existing partitions" and go to the shell/console prompt.
( Booting Mandrake in "failsafe" from the Lilo menu does the same )
Step 1: For SUSE:
Boot from your first install CD and press F1 at the first screen, then choose "Rescue System" from the menu and at the prompt type "root" ( you do not need a password )
Step 1: For other distro's
Boot from the first install CD ( or any Live CD like Knoppix ) and at the bootprompt type:
linux single( For Knoppix: knoppix single )
And it will boot in "single user mode" and you will get an odd looking prompt like "sh-2.05b#"
Alternative for step 1
Sure with most Live and Rescue CDs you can also just boot in the live version, mount the partition and, as root, make changes to the files indicated below:
Step 2
# cd /etc( if you boot from knoppix first cd to the partition your lost-password-distro is on )
We need to change two files; "passwd" and "shadow":
# vi passwd( opens the file )
< i > ( puts vi in insertmode )
This is the first line:
root:x:0:0:root:/root:/bin/bash
Make it:
root::0:0:root:/root:/bin/bash
So just get writ of the "x" do not touch the ":" ( colons )
Save the file:
Esc
ZZ
Second file to be changed:
# vi shadow( open the file )
< i > ( insert mode )
The first line is a long scrambled line of characters, just make it:
root:::: ( four colons ! )
Save the file
Esc
ZZ
Now you can reboot your computer. Log in as normal user, open a console and type:
$ su# passwd
And set the new root password.
Log out as root:
Ctrl+d
And the job is done
WARNING: Only after setting your new root password it is safe to connect your computer to the internet or local network again !!

My Hometown ~ Registered Linux User #299965 ~ LFS User #11450
#121 OFFLINE
Posted 21 May 2003 - 03:59 PM
Step by step instruction
Because installing Firefox is different from all other install-routines I made a step by step instruction for it.
- Download the file to your "/home/bruno" directory
You can get the lastest file Here
( Get the one that has Linux and does NOT have "installer" in the name )
After downloading it go to your home directory, open a terminal/console and type
$ su < password > # mv firefox* /usr/local/bin/ # cd /usr/local/bin/ # tar -zxvf firefox*
-Log out root: Ctrl+d
-Type "kmenuedit" and you'll get a GUI where you can add an entry in --> Internet --> Web Browsers.
( NOTE: kmenuedit is for KDE based distros . . for distros that use the Gnome desktop use either "alacarte" or the "gnome-menu-editor" )
- Make a new menu entry, call it Firefox and fill in as command: /usr/local/bin/firefox/firefox
-Save
-Close Menudrake
-Close the console
-And have a look in your "menu" it should be there !
( you can drag a shortcut from the menu on your desktop or "taskbar" )
-If everything works okay you can delete the .tar.gz package from /usr/local/bin:
# rm /usr/local/bin/*.tar.gz
Happy browsing !

PS: See comments ( and extra tips ) on these instructions Here
Edited by securitybreach, 25 March 2013 - 11:26 AM.
My Hometown ~ Registered Linux User #299965 ~ LFS User #11450
#122 OFFLINE
Posted 21 May 2003 - 07:09 PM
( most of these only in Mandrake)
As you klick on the Home icon on your desktop konqueror will open and show you the contents of /home. Right clicking on an empty space and selecting ¨new¨ will give you a context menu with several choices, at the bottom you will see the most interesting ones: ¨Link to application¨ and ¨Link to harddisk¨.
Lets start with the last one, imagine you want to access your windows partition very often, a direct link to your ¨C¨ drive might come in handy.
Rightclick, select ¨new¨ and choose ¨harddisk¨ , a window will pop up, on the first tab you fill in ¨Win C¨ and on the last tab you look for the partition of your C-drive. Click O.K. And youre done !
Now the ¨link to application¨, Lets suppose that you want to be able to start your favorite game while browsing your /home directory you can do the same as above but you have to know the ¨path¨ to the application.
Rightclick on an ISO file and you can directly choose to burn it to CD
Rightclick on a zipped file and you can unzip it.
Rightclick a directory or file to zip it.
Drag a file, link or directory on the ¨Desktop icon¨ and it will put a link on your desktop.
Point with your mouse to a sound file ( wav, mp3, ogg ) and you´ll hear music. ( if preview is enabled, see below )
Next to all this fun you can choose preview in the ´view¨ menu to have thumbnails from all your pictures, text documents, html files etc.
Put a music CD in your drive, click on the yellow star in the side bar and you can rip the CD to ogg files in seconds.
Acces the KDE ftp sites by clicking on the globe in the same sidebar.
Konquror is a great FTP client and sure you can use konqueror to browse the net too.
There is much much more to tell about konqueror. Send me tips in a PM and I´ll edit them in the text.

My Hometown ~ Registered Linux User #299965 ~ LFS User #11450
#123 OFFLINE
Posted 22 May 2003 - 04:06 PM
If you have enough space on your linux partition you can make a full backup of your Windows ! ( no Ghost-image needed )
And easy to restore if you ever need to. ( would not be the first time would it ? )
Here is what we do, first we have a look if we have enough space:
$ df -h | grep /win
Look at the second number, the first is the total space, the second the used space the third is the available space on your C drive.
Then do a:
$ df -h
To see where there is enough space in your /home or /backup partition.
Now the fun starts :
$ cp -p /mnt/win_c /home/bruno/backup/(or wherever you want to save the backup)
That´s it ! Easy as pie. Backup is made, you´re safe from fatal injuries.
To restore: Delete all the files on your C partition ( do this in Linux ) and:
$ cp -p /home/backup/win_c /mnt/
and tell it to overwrite the existing win_c if it asks you !
You can also restore just one file ( registry ) or just all the \system files.
NOTE: The -p argument preserves the time and date stamps of the files.
To save space you could also compress the files, time and date will stay in tact without any added argument:
Quote
Another alternative is to use tar to create a compressed image of your Windows partition:
$ tar -cvzf win_backup.tar.gz /mnt/win_c
This command will do it because the -z parameter will automatically use gzip to do the compression.
To restore you simply do "tar -xvzf win_backup.tar.gz"

My Hometown ~ Registered Linux User #299965 ~ LFS User #11450
#124 OFFLINE
Posted 23 May 2003 - 04:05 PM
Now after 59 tips, for once we will go into something more complicated, I´ll keep it short because there are other people who can explain this far better to you.
The command:
$ dmesg >message.txt
This will make a text file in your home directory, a long file of messages where in case of troubles with your computer you could look for information.
A good site to help you understand those debug messages is:
http://linuxgazette....59/nazario.html
My advice: execute the command and give the text file a glance, just so you know what ¨dmesg¨ can do for you. As long as your computer runs O.K. don´t bother with the fineprint, but in case of serious problems go in there head first !

PS: there is more interesting things to read on that site.
My Hometown ~ Registered Linux User #299965 ~ LFS User #11450
#125 OFFLINE
Posted 25 May 2003 - 02:17 PM
Bruno, on May 22 2003, 04:06 PM, said:




'freedom...is actually the reason that men live together in political organisations at all. Without it, political life as such would be meaningless. The raison d'Être of politics is freedom, and its field of experience is action'.
My Flickr Photo Blog
del.icio.us bookmarks
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users