Jump to content

aru

Members
  • Posts

    2022
  • Joined

  • Last visited

Everything posted by aru

  1. veselosky Newbie Joined: 06 Oct 2002 Posts: 2 Location: Atlanta, GA USA Post Posted: Sun Oct 06, 2002 9:29 pm Post subject: Mandrake 9.0 and Galeon _________________________________________________________________ If you are accustomed to browsing man pages or info pages with Galeon, you may have the same trouble I did with Mandrake 9.0. Galeon uses external programs to convert man pages and info documents to html. Apparently version 1.2.5 hard-codes the names of these external programs as "gnome-man2html2" and "gnome-info2html2". Those programs have different names on Mandrake 9.0, so browsing man pages with Galeon fails, and might crash the browser. I corrected this problem by simply creating a symlink to the actual programs as they are named in Mandrake 9.0. ln -s /usr/lib/gnome2-man2html /usr/bin/gnome-man2html2 ln -s /usr/lib/gnome2-info2html /usr/bin/gnome-info2html2 Restart Galeon and things work fine again. -Vince LinuxPunk Frequent user Joined: 27 Sep 2002 Posts: 53 Post Posted: Sun Oct 06, 2002 11:06 pm Post subject: _________________________________________________________________ OR, even better yet, just use the "man" and "info" commands in console! Looks much better that way anyways. Smile Editor's note: This thread was originally posted at the old MUB (Mandrake User Board at club-nihil). This post is the result of a 99% automatic backup, so due to its nature some text may be lost (improbable but possible).
  2. delboy711 Senior user Joined: 03 May 2002 Posts: 412 Location: Wokingham, UK Post Posted: Sun Oct 06, 2002 1:56 pm Post subject: Bizarre Spamassassin Scores _________________________________________________________________ It is very nice having spamassassin in Contrib in 9.0, but after having some obvious spams get past spamassassin I took a look at the score file and found that it differs from the "official" spamassassin scores file in rather strange ways. The scores file can be found in /usr/share/spamassassin/50_scores.cf The scores file in the RPM will for example penalise mails originating from Kmail by 1.634 points instead of the -2.863 points in the 'official' scores file. (A negative score is indicative of non-spam) Another example: The mildly 'spammish' phrase "Congratulations" is scored as 0.218 points in the official score file, but is given a massively non spammish score of -3.077 in the score file in the RPM. In order to revert back to the 'official' scores, just download the spamassassin tar.gz file from www.spamassassin.org and decompress the compressed file (just clicking on it in konqueror is all you need to do this), then copy 50_scores.cf into /usr/share/spamassassin Editor's note: This thread was originally posted at the old MUB (Mandrake User Board at club-nihil). This post is the result of a 99% automatic backup, so due to its nature some text may be lost (improbable but possible).
  3. sminons Newbie Joined: 13 May 2002 Posts: 20 Post Posted: Sat Oct 05, 2002 7:50 pm Post subject: Running your own Mailserver _________________________________________________________________ Ever thought about running your own mailserver?. It gives you a great feeling and fast way of sending emails...right from the command prompt. Checking and sending email is simple and really really fast. All the tools you need for getting your mail system running are available in the Mandrake CDs, but first, there are a few things to note. People can run their mailservers if they have a broadband connection, using a dialup connection would be expensive and not worthwhile. Also, if your ISP is blocking all incoming mails on port 25 , then you wouldnt be able to recieve mails...but you can send mails for sure. First step is to install postfix mail server. The default installation will do just fine and there is no need of any tweaking. This by itself is enough to send and receive mails, but registering your host at some free dynamic IP service gives you your preferred hostname and address. www.no-ip.com is one such service. There are others too. This step decribed above makes sure that we have a valid hostname, even if the IP changes, also it gives our machine a unique name on the net.The next step is to set your hostname to the one you registered above at the service. This can be done by linuxconf.....that's it.For sending mails, fire up the command prompt and type <mailto>. Supply the email address of the desired recipient. Provide the subject. Then type away as you would type a normal email. After writing the mail, to send it...type <Ctrl+D>. There goes your mail...right out your box! To check mail...type <mail> at the prompt. Well...its easy to learn all that. I am a newbie myself, any comments are welcome...there might be other ways. This one worked for me..and I am sharing it. Editor's note: This thread was originally posted at the old MUB (Mandrake User Board at club-nihil). This post is the result of a 99% automatic backup, so due to its nature some text may be lost (improbable but possible).
  4. arusabal Moderator Joined: 17 Apr 2002 Posts: 836 Location: Spain Post Posted: Fri May 10, 2002 2:59 pm Post subject: Bash tips and tricks _________________________________________________________________ This is going to be my tips and tricks tribute to the bash shell, which I believe is the soul of the GNU/Linux OS. I'll post here any useful tips and tricks I'll find focusing to the bash shell. Please feel free to contribute to this section with your own set of tips and tricks. At this time: 1. Bash history tips 2. The unknown $CDPATH variable 3. More on cd (typing errors) 4. Key bindings in bash shell 5. Bash? Please, help me! 6. The revenge of cd Twisted Evil (pushd/popd) 7. A couple of articles on tab completion including the very last features (thanks to frew and tom) 8. Here-Documents 9. First post of "SHELL PARAMETER EXPANSION" series 10. Trick: A fast way to comment-out blocks of script code 11. Using functions instead of aliases at .bashrc 12. A bizarre single-line-command to empty system logs Last edited by arusabal on Sat Oct 12, 2002 4:31 pm, edited 20 times in total arusabal Moderator Joined: 17 Apr 2002 Posts: 836 Location: Spain Post Posted: Wed May 15, 2002 10:04 pm Post subject: _________________________________________________________________ Some bash-history tips The usage of the bash-history feature could be as fun as helpful, also it can save a lot of time if you are one of those who use bash-terminals for everything (if you are not, what the hell are you doing here with Linux Mr. Green ...just kidding Wink ) I'm not going to talk in extent about the usage of bash-history, I only want to show you a couple of tips. If you want to learn more about it you can take a look to the chapter 7 of the Bash Reference Manual (such as ramfree "pointed" long time ago, should be under every linux user's pillow Wink ) Here are the tips: ~]$ !n --Will execute the line n of the history record. ~]$ !-n --Will execute the command n lines back. ~]$ !! --Will execute the last command. As !-1 or "up-arrow + return" ~]$ !string --Will execute the most recent command starting with the given string. In my experience string is just the first characters of the first word of the command, so don't use space characters. ~]$ !?string[?] --Will execute the most recent command containing the given string. The last "?" may be omitted if the string is followed by a new line. So if the string includes space characters or similar close it with "?". This can be used to avoid the error that appears with !string when used with long strings. ~]$ ^string1^string2 --String2 will substitute string1 on the last command. Cool, isn't it? This is equivalent to !!:s/string1/string2/ which is cooler Wink Any one feels a bit like in vi? $HISTIGNORE or How-To improve the history usage: You might want to set up the shell variable $HISTIGNORE to avoid having consecutive duplicate commands or unuseful commands appended to the history list. So you'll get rid of the never ending story of hitting the up arrow trough simple and repetitive commands. Here is an example of usage: export HISTIGNORE="&:l[sl]:[fb]g:exit" Setting this way the $HISTIGNORE, the consecutive duplicated commands, the simple calls to ls, ll, fg and bg commands without arguments, and calls to the exit command will not be appended to the history list, so navigate though it will be much easier. Bash-history has many other interesting things, take a look to the manual! ...and forgive me for the emoticons abuse Rolling Eyes Last edited by arusabal on Thu May 16, 2002 5:38 pm, edited 1 time in total arusabal Moderator Joined: 17 Apr 2002 Posts: 836 Location: Spain Post Posted: Wed May 15, 2002 10:17 pm Post subject: _________________________________________________________________ The un-known $CDPATH shell variable This is a little known, *even to me* (as I discovered it tonight Wink ), shell variable. CDPATH does for the cd built-in command what PATH does for executables. Please try it, you'll get surprised. For example: Code: ~$ export CDPATH=~:/mnt:/usr/share/docs:/usr/src/RPMS:/usr/local/ So once you set it, cd win_c would take you to /mnt/win_c/, or just typing cd HTML would take you to /usr/share/doc/HTML/.... Interesting, isn't it? arusabal Moderator Joined: 17 Apr 2002 Posts: 836 Location: Spain Post Posted: Wed May 15, 2002 10:48 pm Post subject: _________________________________________________________________ More on cd stuff cdspell Have you ever got upset because you need to retype a cd to some directory command just for a little spelling error? Well that can be avoid if you set on the cdspell option. Just open a bash terminal and type: shopt -s cdspell Now if you type: cd /isr/src #<--- notice the 'i' Shocked you'll get [arusabal@paleo /usr/src]$ Linux is so cool! Ofcourse you can set it to your bash_profile file, so every time you open a bash terminal you'll be helped in minor spelling errors Wink arusabal Moderator Joined: 17 Apr 2002 Posts: 836 Location: Spain Post Posted: Sat May 18, 2002 11:21 pm Post subject: _________________________________________________________________ Key Bindings Every one knows how to use the arrow keys to navigate trough history records, how to move forward and backwards along the command line, how to use command completion hitting the tab key, how to use the init and end keys, or other common combinations of keys, but during a bash terminal session you can use many other useful key bindings. Here I show you a list of the, to me, more useful ones: Some common command line editing key-bindings: Ctrl-l (as Ctrl-"L" not 1 or I) Clear the screen (terminal) Same as `clear`, but can be used while writing a command without loosing the typing. Ctrl-k Kill the text from cursor position to the end of the line. Ctrl-x backspace Kill the text form cursor position to the beginning of the line. Ctrl-a Move to the start of the current line. Ctrl-e Move to the end of the current line. Alt-b Move backwards to the start of the current word or the previous. (text mode only, doesn't work in X) Alt-f Move to the end of the current word. (text mode only) Ctrl-r Reverse search history: search backwards starting at current line and moving up incrementally (see some posts above for more info). Some other curious keybindings: Alt-u Uppercase the current word. (text mode only) Alt-l ("L") Down case the current word. (text mode only) Alt-l ("L") Capitalize the current word. (text mode only) There are dozens of keybindings!! The default line editing interface is emacs-like, if you are a vi fanatic you might want to use a vi-style line editing interface, so to switch betwen modes use this options: set -o vi #vi-style set -o emacs #emacs-style Resources: Here are some files you might check: /etc/inputrc #System wide key bindings; you can re-read them any time by clicking ctrl-x Ctrl-r. .inputrc #User's own settings man 3 readline #Full information on Key Bindings and a list of them (many doesn't work on X) arusabal Moderator Joined: 17 Apr 2002 Posts: 836 Location: Spain Post Posted: Mon May 20, 2002 5:33 pm Post subject: Getting help _________________________________________________________________ Bash? Please, help me! You don't have any idea of what shopt does? Are you writing an script and it is reporting a syntax error? Did you ever forget how to use the if command? Use the help sytem!!! There are two ways of getting instant help in bash, the first one is the ultra-known trick of looking into the man bash page Shocked , there you'll find all the info about bash shell/scripting you may need; But although using the man page is a great resource of help and info, this can be some times a bit nasty because that page is one of the looooooong ones Wink . The second way of getting instant help is the help built-in command, this one is a real fast way of getting instant help on all the bash built-in commands and its syntax. Here is an example of its usage: help syntax: help [-s] COMMAND Code: [user@host user]$ help if if: if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else COMMANDS; ] fi The if COMMANDS are executed. If the exit status is zero, then the then COMMANDS are executed. Otherwise, each of the elif COMMANDS are executed in turn, and if the exit status is zero, the corresponding then COMMANDS are executed and the if command completes. Otherwise, the else COMMANDS are executed, if present. The exit status is the exit status of the last command executed, or zero if no condition tested true. [user@host user]$ Also, if you want a shorter output, maybe you only need to refresh your memory with the right syntax of a command, just use the option -s as follows: Code: [user@host user]$ help -s unset unset: unset [-f] [-v] [name ...] [user@host user]$ And finally, if you want a quick reference or a list of all the built-in commands, you'll just need to call help without arguments Wink arusabal Moderator Joined: 17 Apr 2002 Posts: 836 Location: Spain Post Posted: Mon May 20, 2002 6:50 pm Post subject: _________________________________________________________________ The revenge of cd (the directory stack) Lets suppose that you are working in the directory /usr/local/src/some_cool_program_but_with_a_long_name-0.0.123-beta/sou rce/ , you read the README file and then you notice that you have to edit some files in /etc , others in your /home directory, install some dependences form /mnt/cdrom/Mandrake/RPM/ and then go back to the program's source directory to compile it... Arrghh!!!! do I need to type again that long path???? No! you are lucky, there is something cool in the bash shell called the directory stack Cool Lets rewind a bit. We were in /usr/local/src/some_cool_program_but_with_a_long_name-0.0.123-beta/source/ , remember? Then to change to /etc instead of using cd /etc we'll do pushd /etc. Doing such thing the directory where we were is saved on the top of the directory stack. Once we finish all the work, installing, editing..., to go back to the original original directory, we'll only need to execute the command popd, and we'll be back again in /usr/local/src/some_cool_program_but_with_a_long_name-0.0.123-beta/source/ (Cool, isn't it?) Epilogue: The Directory Stack is a list of recently visited directories. There are 4 bash built-in commands dedicated to it: * dirs: Display the list of the currently remembered directories. That is also available from the $DIRSTACK shell variable. * pushd: Adds directories to the stack as it changes the current directory. * popd: Removes specified directories from the stack and changes the current directory to the directory removed. * dir: (not used in mandrake because of the default alias!!). Makes the current directory be the top of the stack, and then executes the equivalent of 'cd dir'. Check the man page (or the help built-in) to navigate through the stack and to check which are the options that those commands accept. frew Senior user Joined: 01 Jun 2002 Posts: 214 Location: Mississippi Post Posted: Sat Jun 01, 2002 10:24 am Post subject: don't forget the tab button _________________________________________________________________ I know you didn't ask for this one, but its a lifesaver once you get used to it. Ever have to type in a program name thats obscure or a filename too? well this should help. say you want to open a file called some_cool_program_but_with_a_long_name-0.0.123-beta.txt and you want to edit it with your favorite editlor. well instead of copy/pasting or typing that whole thing you type vi some<tab> and it will complete it unless there is another file that begins with some. arusabal Moderator Joined: 17 Apr 2002 Posts: 836 Location: Spain Post Posted: Sun Jun 09, 2002 2:32 am Post subject: Re: don't forget the tab button _________________________________________________________________ Thanks frew for your tip! You might want to check the following post with the newer and cooler bash tab completion feature Wink arusabal Moderator Joined: 17 Apr 2002 Posts: 836 Location: Spain Post Posted: Sun Jun 09, 2002 2:36 am Post subject: _________________________________________________________________ bash Autocompletion on Steroids... Really cool!!! Stolen from tom's mandrakeforum article Wink Posted by tom on Saturday, June 08 @ 05:00:00 PDT bash is the standard shell on Linux. If you've ever used it (*grin*), you will know about the auto-completion feature which expands file and directory names in path names upon hitting the TAB key. How about auto-completion for 'rpm', 'tar', 'zip', 'chown', 'mount', 'man', 'cvs', 'ssh', image, document and sound files? No problem ... Get the 2.05a bash RPM from Cooker. Notice that this is a package in development and its use is not supported by Mandrakesoft. Works fine here, though. Get the 'bash-completion-[date]-[rev].noarch.rpm' from Ian Mcdonald's website and install it. OK, let the fun begin ... 1. Getting the right file at once: Code: $ ls d* dictionary.lst dwun-0.96e-1.i386.rpm dwun- 0.96e.tar.gz $ tar tzf d[TAB] auto-completes to the only file of those three which can be listed by 'tar', dwun-0.96e.tar.gz. The same for rpm: Code: rpm -qpl d[TAB] auto-completes to the only RPM archive starting with 'd', dwun-0.96e-1.i386.rpm. This behaviour is preconfigured for a load of file types, including PDF, image and sound files. 2. List options: Code: cvs [TAB] lists all available options to the 'cvs' command. Also works for tar and rpm. 3. Complete arguments: Code: man 5 re[TAB] regexp_table relocated resolv.conf resolver Especially useful with RPM: Code: rpm -e ope[TAB] openssh openssh-server opera openssh-clients openssl 4. List available arguments: Code: ssh [TAB] lists all servers in your .known_hosts file as argument. Also works with scp. Code: mount [TAB] lists all configured mount points. This is but a very short list of the possibilities now open to you. Have a glance at '/etc/bash_completion' to see what commands are covered and try them out, or configure the file to match your personal preferences (it's weekend anyway Wink ). As of version 20020601, some things do not work (yet). The 'service' and 'chkconfig' autocompletion requires an extra patch to bash-2.05a. 'urpmi' and friends are listed in '/etc/bash_completion', but don't work for me. Nevertheless, it's quite an amazing feature, and if you spend any considerable lenght of time on the shell, you really, really *want* this. Smile <end of quote> Nothing to add, seems really, really cool Cool The only thing is that I hope that this feature won't eat my P200MMX resources Confused ... I'm going to try it! arusabal Moderator Joined: 17 Apr 2002 Posts: 836 Location: Spain Post Posted: Sat Jul 06, 2002 9:47 am Post subject: _________________________________________________________________ Here Documents Back with this anarchic tribute, today I'm going to introduce the redirections from "here documents"... (maybe some day I'll make a deeper post talking about redirections, but not today). But, what are the "here documents"? It's just a type of redirection that instructs the shell to read the input from the current source until a line that contains only a previously defined word (whatever word). Every line read up to that point is used as input. This kind of redirection is very useful in bash scripts, but also very helpful in shell mode. The format of the "here documents" is something like this: Code: << word document line 1 document line 2 ... document line n word or: Code: <<- word document line 1 document line 2 ... document line n word When used with '<<-' the "here document" is allowed to be indented; which will be much more pretty inside your scripts Wink Now here comes the fun (a couple of usage examples): *) As a replace of long "echo" strings inside a script . Some times I feel that is somewhat esthetically ugly to use many instances of "echo" or to use "echo -e" filling the text string with dozens of echo tags (n t ...). This is much more pretty: Code: ...your code... function helper() { cat <<- _END Usage: command -[uvhctdsat] file where: -u is required when... -v bla, bla, bla ... more blas ... if you need more help please contact to l_torvalds@linux.org GNU license... bla bla... _END #here ends the here document } ...your code... Doing the same thing with "echo" would have been terribly ugly. With the "here document" your script will be much more elegant. *)Just another example, this time focused to command line: Usage of the here documents as a fast resource of creating multiple input lines when you are working in command line mode. The example shows how to quickly instruct wget to download multiple files from different places: Code: [arusabal@mycomp ~]$ xargs wget -c << _Packages http://www.kernel.org/pub/linux/kernel/people/rml/preempt-kernel/v2.4/ preempt-kernel-rml-2.4.18-5.patch http://www.zipworld.com.au/~akpm/linux/2.4.18-rc1-low-latency.patch.gz http://www.kernel.org/pub/linux/kernel/v2.4/linux-2.4.18.tar.gz _Packages I'm leaving to your imagination other useful implementations of the "here document" concept Note: there is no need at all to use "_" at the beginning of the delimiter word, but I love to do it Cool arusabal Moderator Joined: 17 Apr 2002 Posts: 836 Location: Spain Post Posted: Sat Aug 10, 2002 10:08 pm Post subject: _________________________________________________________________ here is something very interesting for the dyslexics --like me-- that I've just discovered while surfing at http://bulmalug.net (spanish). It's just another key binding to add to the list: Ctrl-t will transpose the two characters close to the cursor For example, if you type a lot, it is quite common to change the order of the characters: Code: $ sl [ctrl-t] will be 'magically' converted to: Code: $ ls arusabal Moderator Joined: 17 Apr 2002 Posts: 836 Location: Spain Post Posted: Mon Sep 09, 2002 1:30 pm Post subject: SHELL PARAMETER EXPANSION (1) _________________________________________________________________ SHELL PARAMETER EXPANSION (1) Squeezing bash variables at maximum! This will be the first post of a series where I'll write about the awesome world of SHELL PARAMETER EXPANSION. If you are usually using expressions such as: [user@host ~]$ find . -regex ".* .*" -exec sh -c 'mv "$0" "${0/ /_}"' '{}' ; Then you probably will find this series of postings unuseful or very basic leveled... I'm not a guru, you know that Rolling Eyes But anyhow, if that's your case, you are very welcome to participate by PM me any suggestions or examples you'll want me to include here Wink If you are staring at the above expression and you have any/many difficulty to understand what the hell is that stuff, but you feel that behind it there is something plenty of fun, then this series of posts is written for you!!! Smile I'll try my best to introduce you the 'Shell Parameter Expansion' bash features in an useful way: with plain explanations and, more important, with as many examples as I'm able to write/find!!! I'll try to post each time a case of shell parameter expansion with useful examples. But as I'm a *lazy guy* I can't say which will be the rate of postings that I'll follow. Notice that this will be a series of posts! so if you feel there is something missed, don't be impatient! everything will be covered at its time! Again feel free to contribute to this series by PM-ing me any useful examples you want to share with all of us Smile ...and sorry for my english arusabal Moderator Joined: 17 Apr 2002 Posts: 836 Location: Spain Post Posted: Sun Sep 29, 2002 12:32 pm Post subject: Trick: A fast way to comment-out blocks of script code _________________________________________________________________ Trick: A fast way to comment-out blocks of script code Very useful for debugging purposes ("Anonymous Here Documents") (I know, it is supposed that I'm writing a "Bash Parameter Expansion Series of Posts" for this thread... but I don't have enough time this days for anything Crying or Very sad ) Very often is useful to comment out blocks of code while you are writing a new script and you want to debug it. There are many ways to do this, the easiest way is to add a '#' character at the very beginning of each single line of the code block. That way means to spend many time editing line by line the code adding that '#' character, and after the test is finished, you'll need to remove, again, line by line the '#'. Certainly there are several ways to improve the commenting with '#'. For example, if you write code with vim, the commands: :<fist line number>,<last line number>s/^/# (To comment a range of lines) :<fist line number>,<last line number>s/^#// (To uncomment them) should do the job in a very fast and efficient manner. But THAT's NOT Bash! So as this is BASH tips&tricks, I propose you a cooler way to comment out blocks of code using just a couple of BASH features combined. Those features we'll need are: the 'Here Documents' and the bash-built-in ':'. The Bash built-in command ':' does nothing apart of expanding arguments and performing redirections. Really, it does nothing, but is very useful in many situations, for example to protect some cases of Parameter Expansion (we will see some examples in future posts), or at loops (it is an equivalent of the command 'true', see it's man page), or here, to use combined with the "Here Documents" to comment-out blocks of code creating an "Anonymous Here Doc". Its return status is always zero (=true). The Here Documents were explained in detail some posts above. Back to the trick, let's suppose we have a script like this: Code: #!/bin/bash var1=something var2=otherthing bla,bla,bla ... more code if [something]; then more things else some more fi other code here while condition; do code done and the end code exit 0 #end of script Now, imagine that something goes wrong with the script, and we think that is due to the "end code", so we want to test just the end code, but not the if block and the while loop, so we can comment those two blocks of code by an "anonymous here document": : << _COMMENTED_BLOCK code line1 code line2 ... _COMMENTED_BLOCK so the at the above script this will be: Code: #!/bin/bash var1=something var2=otherthing bla,bla,bla ... more code : << _COMMENT if [something]; then more things else some more fi _COMMENT other code here : << _COMMENT while condition; do code done _COMMENT and the end code exit 0 #end of script And when we execute the script the code inside the "anonymous here documents" wont be seen by the interpreter (that's not completely true, but explaining it will be beyond this post Wink ). This is a superb way of debugging comfortably and fast long bash scripts. You can also use the "anonymous here documents" to create self-documenting scripts, ie: Code: : << _DOCUMENTATION The utility of this script is to be used as... ... then the parameters used should be... ... TODO: * Add code to do... * Check that thing... ... _DOCUMENTATION so you'll see the documentation only when you open the script in an editor. And that's it. I really hope that this could be of some utility for you! arusabal Moderator Joined: 17 Apr 2002 Posts: 836 Location: Spain Post Posted: Thu Oct 03, 2002 11:53 pm Post subject: Using functions instead of aliases at .bashrc _________________________________________________________________ Using functions instead of aliases at .bashrc This post has been written after a hard complaint by ramfree ( Crying or Very sad ) at help with a bash alias, and thanks to 87GTR who started that thread and joehil for providing a couple of great examples. Very Happy In .bashrc, among other thinks you can place aliases and functions. When you open a new bash session (independently(*) if it is a login session or not) the file .bashrc gets sourced(**). That means that all what you put in there is available for you during the session. Bash aliases are a great way to write simple shortcuts for long commands: alias whops="ps aux | grep -v USER | cut -d' ' -f1 | sort -u" alias lp='lp -d $PRINTER' # Use an environment variable to define the default printer alias netscape='/opt/netscape/netscape' But despite of their inherent advantages, aliases lack of many features that one would desire in some cases, ie: they can't take arguments (I don't mean arguments for the program called by the alias, but arguments to the alias itself): for example: $ alias cd2iso='dd if=/dev/scd0 of=/tmp/$1' will never work because $1 will be expanded to an environmental variable named 1, if any. So: $ cd2iso image.iso will result in "dd if=/dev/scd0 of=/tmp/ image.iso" So in these cases, the concept of function in bash becomes very useful. Shell functions are just a way to group commands using a single name for the group, here you can see that are somewhat related to aliases, but in a deeper sense functions are more related to scripts. Functions can accept arguments, and like in scripts, those arguments became the positional parameters during its execution. Also notice that variables defined inside a function are local variables, so they won't be seen by the parent shell after the function ends its job. Functions are declared using this syntax: Code: [ function ] name() { command-list; } or [ function ] name() { commands ... more commands } So in the above example, if instead of using an alias you use a function, you'll achieve your goal: function cd2iso() { dd if=/dev/scd0 of=/tmp/$1; } # (see the original thread for a slightly different implementation of this function.) and thus: $ cd2iso image.iso will result in: "dd if=/dev/scd0 of=/tmp/image.iso" You can create your functions as complex as you wish (they can be used, in our context -sourced by .bashrc-, as highly available scripts). joehill posted these excellent and useful examples of functions that can be declared within .bashrc: Code: function mp3ren() { for i in *.mp3; do mv "$i" `echo $i | tr ' ' '_'`;done; } function mp3dec() { for i in *.mp3; do lame --decode $i `basename $i.mp3`.wav; done; } And I propose, using "parameter expansion" (***), this correction to avoid the usage of external commands for a "higher" performance: Code: function mp3ren() { for i in *.mp3; do mv "$i" "${i// /_}";done; } function mp3dec() { for i in *.mp3; do lame --decode $i ${i%".mp3"}.wav; done; } To end, just this quote from the Bash Reference Manual: "For almost every purpose, aliases are superseded by shell functions". I really hope that this post had been somehow useful for you! Very Happy (*) To achieve this you'll need to be sure that .bash_profile/.profile sources .bashrc (but that's another history). (**) Bash reads and executes commands from .bashrc but in the current shell not in a subshell. That fact means that its variables, its aliases and its functions are available during the session. (***) I'll post the dedicated series soon (when I'll have more free time) Smile guest72485 Frequent user Joined: 05 Jun 2002 Posts: 56 Post Posted: Fri Oct 04, 2002 10:47 am Post subject: _________________________________________________________________ hey thanks buddy, that was helpful DOlson Moderator Joined: 16 Apr 2002 Posts: 2393 Location: Canada Post Posted: Sat Oct 05, 2002 6:04 am Post subject: _________________________________________________________________ WOOHOO!!!!!!!!!!!!! function mkcd() { mkdir $1; cd $1; } I've always wanted to do that!!!!!!!!! Alias sucks! joehill Senior user Joined: 09 May 2002 Posts: 217 Location: Toronto, Canada Post Posted: Sat Oct 05, 2002 6:44 am Post subject: _________________________________________________________________ sweeeeeeeeeeeet good thinkin monsieur! (i know how much you love that) DOlson Moderator Joined: 16 Apr 2002 Posts: 2393 Location: Canada Post Posted: Sat Oct 05, 2002 7:16 am Post subject: _________________________________________________________________ Haha. I wanted to do that forever. I tried a bash script and everything. Nothing worked properly. arusabal Moderator Joined: 17 Apr 2002 Posts: 836 Location: Spain Post Posted: Sat Oct 05, 2002 8:56 am Post subject: _________________________________________________________________ DOlson wrote: WOOHOO!!!!!!!!!!!!! function mkcd() { mkdir $1; cd $1; } Cool! But this version will be better, since you'll prevent errors caused by the missing of an argument (destination dir): function mkcd() { mkdir ${1?"error; usage: mkdir <new directory>"} && cd $1; } Thanks guys for your posts, but damn! I'm very frustated right now! what about the other 12 articles!!!!!!! you are only interested in the last one. That gives the reason to ramfree Crying or Very sad Laughing ramfree17 Moderator Joined: 18 Apr 2002 Posts: 1262 Location: Philippines Post Posted: Sat Oct 05, 2002 4:21 pm Post subject: _________________________________________________________________ because thats the only one we could use on a day to day basis. Very Happy but dont stop aru, who knows, i might have to use the others someday. but first i have to remember them and that means reading them once again.... hehehehehe.. ciao! cannonfodder Moderator Joined: 16 Apr 2002 Posts: 1056 Location: Rochester, NY, USA Post Posted: Sat Oct 05, 2002 4:54 pm Post subject: _________________________________________________________________ I like this set of alias, its real fun! alias bendover='clear' alias aim='ll' alias kickme='bendover;aim;kickme' Rolling Eyes DOlson Moderator Joined: 16 Apr 2002 Posts: 2393 Location: Canada Post Posted: Sat Oct 05, 2002 8:59 pm Post subject: _________________________________________________________________ arusabal wrote: DOlson wrote: WOOHOO!!!!!!!!!!!!! function mkcd() { mkdir $1; cd $1; } Cool! But this version will be better, since you'll prevent errors caused by the missing of an argument (destination dir): function mkcd() { mkdir ${1?"error; usage: mkdir <new directory>"} && cd $1; } Thanks guys for your posts, but damn! I'm very frustated right now! what about the other 12 articles!!!!!!! you are only interested in the last one. That gives the reason to ramfree Crying or Very sad Laughing I don't make misteaks. arusabal Moderator Joined: 17 Apr 2002 Posts: 836 Location: Spain Post Posted: Sat Oct 12, 2002 4:17 pm Post subject: _________________________________________________________________ A bizarre single-line-command to empty system logs Another day to day "usable" trick Rolling Eyes Today I'm very bored, so after a PM from "ian malcom" about logrotate, my ill mind decided to write a single line command to do the following: 1. Empty all the log files from /var/log, saving just the last 50 lines of each one. 2. Delete the useless (at least for me) *.gz log files. 3. Do it recursively in all the /var/log tree. 4. Must be a single line command. 5. It has to be fun, because I'm bored. Previous status: Code: root@host]# du -sh /var/log 193M /var/log There were 21 directories and 145 files (where 50 were .gz files) The single-line command: Code: root@host]# find /var/log -type f -exec sh -c '[[ "${1##*.}" == "gz"]] && rm $1 || (tail -50 $1 > ${1}.tmp && cat ${1}.tmp > $1 && rm ${1}.tmp)' '{}' '{}'; The result: Code: root@host]# du -sh /var/log 665k /var/log and the tree command shows: 21 directories and 95 files. Despite the command syntax is quite bizarre, you'll must admit that it is coooool!!!! Cool The explanation: First the most difficult here, the trick with find: Instead of executing the commands directly to the "-exec" find flag, which is almost impossible, I open a sh session with a -c flag (just reads and executes commands (and finally exits) from the string '<insert here the code>' , and any remaining argument is seen as positional arguments, that's why there are those '{}' '{}' <-- really only one is needed, but then the argument will be $0 which might confuse with normal positional arguments in scripts). For those who don't know it, '{}' is the way find shows its search results to the -exec part. To end with find, "/var/log" is the searching path and "-type f " means only files. Now the "sh" part (remember that the searching results generated by find are passed one by one as $1 to sh -c): Code: [[ "${1##*.}" == "gz" ]] && rm $1 || (tail -50 $1 > ${1}.tmp && cat ${1}.tmp > $1 && rm ${1}.tmp) The first part, is just a conditional construct: Code: [[ "${1##*.}" == "gz" ]] That code will return true if the string that results in the "parameter expansion" stuff is equal to "gz" (Those gzip compressed log files). The expression ${1##*.} means that if the pattern "*." matches the beginning of our parameter "$1" (ie: "/var/log/cron/errors.3.gz"), then the longest "##" matching pattern is deleted (all the stuff including the last "."), so then returning just the string "gz". if the conditional construct returns true, then the block of code after the "&&" (and) is executed: Code: rm $1 That means deletion of *.gz But if the conditional construct returns false, meaning that the file is not a gzip compressed log file, then the block of code after the "||" (or) is executed: Code: (tail -50 $1 > ${1}.tmp && cat ${1}.tmp > $1 && rm ${1}.tmp) I've put the code between ( ) to avoid problems of interpretation. That block of code means: tail -50 $1 > ${1}.tmp # Save the last 50 lines of $1 to a temporary file named $1.tmp; ie: tail -50 /var/log/messages > /var/log/messages.tmp If that is achieved without error (&&), then: cat ${1}.tmp > $1 && rm ${1}.tmp # overwrite the original file with the contents of the temporary one and finally delete the temporary file. Again, and again: UNIX (GNU/Linux) is so cool!!! joehill Senior user Joined: 09 May 2002 Posts: 217 Location: Toronto, Canada Post Posted: Wed Oct 16, 2002 7:35 pm Post subject: _________________________________________________________________ you are a freaking genius. really. arusabal Moderator Joined: 17 Apr 2002 Posts: 836 Location: Spain Post Posted: Thu Oct 17, 2002 9:16 am Post subject: _________________________________________________________________ Embarassed well, thanks, I'm just a bash junkie ( need bash to live!!! ) joehill Senior user Joined: 09 May 2002 Posts: 217 Location: Toronto, Canada Post Posted: Thu Oct 17, 2002 11:35 am Post subject: _________________________________________________________________ genius, junkie, same thing... rolf Moderator Joined: 16 Apr 2002 Posts: 968 Location: Oakland, CA USA Post Posted: Tue Nov 12, 2002 1:16 am Post subject: a tribute to this thread _________________________________________________________________ Thanks, all, especially arusabal. I had this thread in the back of my mind until today, when, after substantial perusal of bash resources, the answer was revealed in the use of function. What I wanted to do was create an alias for a command line using this neato script for printing addresses, including my return address, on envelopes, giving only a text file containing the 'To' address as argument to: /home/rolf/envelope/envelope <file> | lpr which prints out the envelope as configured in an .enveloperc file, including a bar code, which is handy for mailing invoices for my small handyman business. As we all know, I was not able to use a variable for the text file argument in an alias, despite lengthy trial and error. What is working is to put function e() { /home/rolf/envelope/envelope $1|lpr; } at the bottom of ~/.bashrc and I only have to do, in the directory containing my address files: e <file> to have the envelope printed out. Thanks for this helpful thread Smile arusabal Moderator Joined: 17 Apr 2002 Posts: 836 Location: Spain Post Posted: Tue Nov 12, 2002 5:22 pm Post subject: _________________________________________________________________ You are wellcome rolf Smile Editor's note: This thread was originally posted at the old MUB (Mandrake User Board at club-nihil). This post is the result of a 99% automatic backup, so due to its nature some text may be lost (improbable but possible).
  5. JeroenM Moderator Joined: 16 Apr 2002 Posts: 594 Location: Leuven, Belgium Post Posted: Sat Sep 28, 2002 8:25 pm Post subject: md5sum in windows _________________________________________________________________ before you burn any isos to CD you must first check whether the download was good. that's what a md5sum does. these links point to some places where you can get an application to check your md5sum. http://www.iay.pwp.blueyonder.co.uk/threel...h/tools/md5.htm http://www.acme-ids.org/downloads/windows/.../others/md5sum/ http://www.md5summer.org/ JeroenM Moderator Joined: 16 Apr 2002 Posts: 594 Location: Leuven, Belgium Post Posted: Sat Sep 28, 2002 8:29 pm Post subject: _________________________________________________________________ also discussed at: http://www.club-nihil.net/mub/viewtopic.php?t=5078 ramfree17 Moderator Joined: 18 Apr 2002 Posts: 1262 Location: Philippines Post Posted: Wed Oct 09, 2002 8:38 pm Post subject: _________________________________________________________________ to check the md5sum of an already burnt cd you could try Code: $ cat /dev/cdrom | md5sum >> verify.md5 and manually check the resulting md5sum. this however requires two things: 1) a running linux system with md5sum. if you only have windows then one of those floppy-based distros would do it for you. 2) the correct cdrom /dev device. i have to adjust mine to /dev/hdd to make use of my slave CDROM drive. ciao! Editor's note: This thread was originally posted at the old MUB (Mandrake User Board at club-nihil). This post is the result of a 99% automatic backup, so due to its nature some text may be lost (improbable but possible).
  6. rolf Moderator Joined: 16 Apr 2002 Posts: 968 Location: Oakland, CA USA Post Posted: Sun Sep 22, 2002 5:10 pm Post subject: Installing java and shockwave flash plugins for Mozilla _________________________________________________________________ I came across a method for doing this that seems simpler (by a little bit) than all the typing called for in the instructions I have seen so far. For the Shockwave flashplayer, I ran up against this just last night in rc3. I went to Shockwave, downloaded the linux tarball, called konqueror from a root prompt, made a split window, clicked on the tarball, and dragged the two files from one window into /usr/lib/mozilla-1.1/plugins. I reloaded the page that used flash and it was working. For java, I got the rpm.bin package from Sun. I installed per the intructions and decided to try what I did for Flash: Call konqueror from a root prompt, split the window, go to /usr/java/j2re1.4.1/plugin/i386/ns610 in one window and /usr/lib/mozilla-1.1/plugins in the other, drag the plugin from the java install into the plugins directory, and choose 'Link here'. I only had to reload the open Mozilla window and the plugin showed up in About:Plugins. Cool. The instructions say to restart the browser but this seems to work now without doing so---similarly for the flash plugin. I tried the java-based speed test at www.dslreports.com that always has given me trouble and it worked, which is good enough for me, for now. YMMV. Editor's note: This thread was originally posted at the old MUB (Mandrake User Board at club-nihil). This post is the result of a 99% automatic backup, so due to its nature some text may be lost (improbable but possible).
  7. illogic-al Senior user Joined: 01 May 2002 Posts: 358 Location: Smack dab in the middle of it all. Post Posted: Sat Sep 21, 2002 5:54 am Post subject: WGET RULZ! Use it to download _________________________________________________________________ If you want to download a really large file like one of the Mandrake RCs then use wget. all you have to do is type wget followed by a space and then the url at a console. Kinda like this: Code: wget ftp://mirrors.secsup.org/pub/linux/mandrake/Mandrake-iso/i586/MandrakeLinux-9.0rc3-inst-1.i586.iso then hit enter. It was also be a good thing to find out which of the ftp sites is closer to you (and therefore usually faster). to do this type tracroute at a console follow by the home page of the ftp site (not the whole url to the file) eg Code: traceroute mirrors.secsup.org notice that I didn put the ftp:// part in there or the /pub/linux/mandrake/Mandrake-iso/i586/MandrakeLinux-9.0rc3-inst-1.i586.iso. arusabal Moderator Joined: 17 Apr 2002 Posts: 836 Location: Spain Post Posted: Sat Sep 21, 2002 10:23 am Post subject: Re: WGET RULZ! Use it to download _________________________________________________________________ NEVER forget to use the -c flag in wget (especially if you have a low/unestable connection) because with that flag the download will be resumed at the point it stopped (in case it did) instead of start a completely new download from 0. Also I want to add that wget is fundamental in bash scripts to automate downloads. Here is a little example extracted from a script of mine that attempts to download a new kernel version from "www.kernel.org" (it is used by cron): Code: #!/bin/bash .... #variable declarations and functions, not shown as I just want to show a couple of examples of wget;) KERNEL_URL=$(/usr/bin/wget -O - http://www.kernel.org 2>/dev/null | egrep 'linux-2.4.[0-9]+.tar.gz' | sed 's/^.*http://(.*)".*/1/') KERNEL_WEB=$(basename ${KERNEL_URL}) #Where $KERNEL_URL will return the full url to current stable kernel as: # www.kernel.org/pub/linux/kernel/v2.4/linux-2.4.19.tar.gz #and $KERNEL_WEB is just the name of that kernel (well the tarball name), as: # linux-2.4.19.tar.gz .... # Then my script do a comparision with a config file where it says which # is the last kernel version that I have (it can be done also through 'uname') and if the #kernel at kernel.org ($KERNEL_WEB) is newer the script will attempt to download it: .... /usr/bin/wget -c http://${KERNEL_URL} &> /dev/null .... # then rewrites the config file changing the name of the last kernel and # emails me (also updates a log file... and many other stuff (like in case that it is # not completely download resume next time)... but that's # not the point now;) ) .... #End arusabal Moderator Joined: 17 Apr 2002 Posts: 836 Location: Spain Post Posted: Mon Sep 23, 2002 6:14 pm Post subject: Just a stupid example _________________________________________________________________ today I'm completely bored, so I've made this stupid script: who_is_on_mub I was not sure at all which was the propper place to post it, my first idea was to post it here, as it is just another example of wget usage within scripts, but I also thought that it could perfectly fit at MUB discussion Twisted Evil here is the script: Code: [user@host]$ cat who_is_on_mub #!/bin/bash # Shows the users logged-in at MUB (those not invisible;) ) # Usage: # who_is_on_mub [mub] ---> Will show you who is loged on the Official Board # who_is_on_mub mubs ---> Will tell who is loged in the 'renew' board if [ "${1:-"mub"}" == "mubs" ]; then URL="http://www.mandrakeusers.org/index.php" else URL="http://www.club-nihil.net/mub/index.php" fi echo ""Visible" users logged-in at ${URL%"index.php"}:" wget -q -O - $URL | grep "Registered Users:" | sed 's/.*(Registered Users:*.)/2/' | tr ',' 'n' | sed 's/^.*">?/2/; s/</.*>//; s/<b>(.*)/1 (mod)/' A couple of examples of execution: Code: [user@host]$ ./who_is_on_mub mubs "Visible" users loged at http://www.mandrakeusers.org/: MoonChild thayne (mod) [user@host]$ ./who_is_on_mub "Visible" users loged at http://www.club-nihil.net/mub/: arusabal (mod) darksun lakelover stupid, isn't it? Rolling Eyes I'm very bad with regular expressions, so I'll be very glad if any of you could make a better use of sed in my script, or for example include a line or two to show the total number of users online (hidden and not logged-in). please tell me! mmm, I think I'm going to include this script in my Bash Tips&tricks thread because of that couple of 'parameter expansion' that I've used on it (I still remember that I promise a series of posts about shell parameter expansion Wink ) ***Sorry for my english*** Ludootje Newbie Joined: 12 Jan 2003 Posts: 2 Post Posted: Sun Jan 12, 2003 3:26 pm Post subject: Re: WGET RULZ! Use it to download _________________________________________________________________
  8. prometheus Frequent user Joined: 04 May 2002 Posts: 66 Location: Canada Post Posted: Thu Sep 12, 2002 4:20 am Post subject: Ads ....how to get rid of them. _________________________________________________________________ ok,if u guys r sick of getting the ads load on each page ,i recommend using junkbuster,it is a small program that runs as a proxy server on the local machine and it filters out all the ads ,it doesnt load the image ads,and it blocks cookies..u can always get the latest imagefile,blockfile from www.junkbuster.com and u just follow the links from there... now,by default ,when junkbuster catches an image that is an ad ,it doesnt load it but it puts a 1 pixel image instead,u can change that to make it show "JunkBuster" by setting the tinygif to number 2 in /etc/junkbuster/config now after u get it installed and getting the latest files,it will run on port 8000 by default so u will need to setup yr browser to use proxy and put for http://127.0.0.1 and for Port: 8000 and that's it (leave https,ftp,gopher....empty),but some sites wont load correctly (like hotmail and yahoo) cause it blocks the cookies,so u can just turn the proxy off when u check yr hotmail/yahoo account... Tristan Frequent user Joined: 02 May 2002 Posts: 74 Location: Melbourne, Australia Post Posted: Thu Sep 12, 2002 5:27 am Post subject: _________________________________________________________________ I use webwasher (www.webwasher.com). It's not open source but it's a free download, does the same job as junkbuster/proximitron, and has a nice web interface for administration. Be warned, Opera does not play too nicely with web filtering proxies, and often stall when loading a page. Glitz Senior user Joined: 02 May 2002 Posts: 507 Location: The Great White North Post Posted: Thu Sep 12, 2002 4:45 pm Post subject: _________________________________________________________________ I use Galeon and turn off popups and cookies. That's fine for what I need. If an advertisement just appears somewhere on a page I'm reading I don't particularly care. Glitz. Bluebeard Senior user Joined: 01 May 2002 Posts: 386 Post Posted: Thu Sep 12, 2002 7:53 pm Post subject: _________________________________________________________________ Junkbuster has been superceded by Privoxy from the the same folks. Look it up here: http://www.privoxy.org/ . Bluebeard. prometheus Frequent user Joined: 04 May 2002 Posts: 66 Location: Canada Post Posted: Sat Sep 14, 2002 1:18 am Post subject: _________________________________________________________________ cool,yea privoxy is easier to configure...i downloaded it and i'm using it now,it even shows u statistics of the ads that have been blocked... thanks. Editor's note: This thread was originally posted at the old MUB (Mandrake User Board at club-nihil). This post is the result of a 99% automatic backup, so due to its nature some text may be lost (improbable but possible).
  9. illogic-al Senior user Joined: 01 May 2002 Posts: 358 Location: Smack dab in the middle of it all. Post Posted: Wed Sep 11, 2002 11:35 pm Post subject: KWintv trick _________________________________________________________________ I was fiddadling around with kwintv in SuSE and I found that if I didn't specify a scanning area (i.e. US Bcast, etc) it would start scanning through a whole spectra of numbers. The channels would then show up as MHz as opposed to channel 19 or something like that but the good thing about this is that the channels ALL show up and are really good looking. They're not grainy and still look good in 640x480 fullscreen. Editor's note: This thread was originally posted at the old MUB (Mandrake User Board at club-nihil). This post is the result of a 99% automatic backup, so due to its nature some text may be lost (improbable but possible).
  10. DOlson Moderator Joined: 16 Apr 2002 Posts: 2393 Location: Canada Post Posted: Sun Sep 08, 2002 7:06 am Post subject: Fix crackly sound! _________________________________________________________________ Taken from: http://www.pclinuxonline.com/modules.php?n...rticle&sid=3198 Quote: There is a problem which exists on many systems with VIA 82C686 sound chips where X causes the sound to become crackly. This behavior can be fixed by adding the following to the Device section of /etc/X11/XF86Config-4: Option "PciRetry" "true" This is how mine looks: Section "Device" Identifier "device1" VendorName "nVidia Corporation" BoardName "NVIDIA GeForce3 (generic)" Driver "nvidia" Option "DPMS" Option "PciRetry" "true" I was having a similar issue with sound in RTCW and this little entry fixed all of my sound problems. I hope this may help some of you out there who are experiencing the same problem. Credit for this finding goes to Levi Ramsey who posted this on the Cooker Mailing list. Editor's note: This thread was originally posted at the old MUB (Mandrake User Board at club-nihil). This post is the result of a 99% automatic backup, so due to its nature some text may be lost (improbable but possible).
  11. Sagittarius Newbie Joined: 06 Sep 2002 Posts: 7 Location: CH Post Posted: Sat Sep 07, 2002 10:13 pm Post subject: New RPMs for KDE3 here _________________________________________________________________ Hello, That's my very first message here. I have compiled some KDE3 apps for MDK8.2, they are here on my page, if you are interested in : http://membres.lycos.fr/billery/ - For burning CDs, CDBakeOven is really great, but you'll have to read the notes for a proper installation ; - kgpg lets you encrypt decryp files ; - scribus is for Desktop Publishing ; - kstars works (it does'nt in KDEv3.03 packages), but you'll have to use Kpackage to install it with the overwrite/replace option. - etc. Forgive my english Editor's note: This thread was originally posted at the old MUB (Mandrake User Board at club-nihil). This post is the result of a 99% automatic backup, so due to its nature some text may be lost (improbable but possible).
  12. gmleuty Frequent user Joined: 24 May 2002 Posts: 38 Location: Nottingham (UK) Post Posted: Sat Sep 07, 2002 2:30 pm Post subject: Generating characters with accents using the UK keyboard _________________________________________________________________ I sometimes want to type in French with my UK keyboard, but I don't want to map the whole keyboard to the French layout as I get foxed by AZERTY. I have found two ways of producing characters like à é î ö ñ and ç. (1) Use Mandrake Control Centre to switch to US (International) keyboard layout. This has "dead keys" built in, so that ' followed by e gives é, ` followed by e gives è, ^ followed by e gives ê, @ followed by e gives ë (this is because the " symbol on the American keyboard is on the @ key in the UK keyboard). Under this system ' followed by c gives ç. (2) Keep the UK keyboard layout and use the Compose key, which is the right "Windows" key on my keyboard under Mandrake 8.2: <compose> ' e gives é and so on. For ç the sequence is <compose> , c and not <compose> ' c. For the "tilde" it is of coure <compose> ~ n to give ñ. Mike ramfree17 Moderator Joined: 18 Apr 2002 Posts: 1262 Location: Philippines Post Posted: Mon Sep 09, 2002 3:44 pm Post subject: _________________________________________________________________ original thread is here which i have locked so all comments (and hopefully additional tricks n tips) will fall here. ciao! illogic-al Senior user Joined: 01 May 2002 Posts: 358 Location: Smack dab in the middle of it all. Post Posted: Mon Sep 09, 2002 7:34 pm Post subject: _________________________________________________________________ nícè tip. I was always wondering how to do that. Now I can write protegé the way it was meant to be written. I enabled dead keys with the KDE Control Center though. Went to Peripherals > Keyboard. Then I selected Enable Keyboard Layouts and chose US w/deadkeys as the Primary Layout. Editor's note: This thread was originally posted at the old MUB (Mandrake User Board at club-nihil). This post is the result of a 99% automatic backup, so due to its nature some text may be lost (improbable but possible).
  13. kunderdog Frequent user Joined: 21 Aug 2002 Posts: 100 Post Posted: Fri Sep 06, 2002 8:10 pm Post subject: ALSA installtion instructions _________________________________________________________________ I have read a lot of frustrated sound installation postings, and since it looks like ALSA will be the default sound API for MDK in the future, I thought I would layout how to get it working on MDK 8.2. First of all, heck the alsa-project.org page to make sure your card is supported (see the soundcard matrix). 1. Download the latest "unstable" (0.9rc3) alsa-drivers, libs, utils, oss ("tools" are useful for some cards) 2. untar the files (tar -xjvf alsa-*.bz2, etc). 3. Build and install them in this order: drivers, libs, utils: For the drivers: cd alsa-driver ./configure --with-cards=<your-card-chipset> make make install The "--with-cards" thing is important. As an example, my SBLive has the chipset "emu10k1", so I do "--with-cards=emu10k1". If you have more than one card, separate them wih a comma. Once the driver "make install" is done, DO NOT run ./snddevices at this point, though the README says to. Mandrake's default "devfs" can create devices on the fly, with one slight modification for audio (see below my append to /etc/devfsd.conf). If you have turned off devfs for some oher reason, then that is another isue... For the libs, utils, and oss, etc: cd alsa-* ./configure make make install Great, now add the following block to your modules.conf, here I have again used the emu10k1 by example, just put in the chipset name for your card in all places where it appears: #################################################### ### ALSA configuration block (with OSS/free modules enabled) ### alias char-major-116 snd alias char-major-14 soundcore # card alias for the SBLive! alias snd-card-0 snd-emu10k1 # OSS Free emulation for snd-card-0 alias sound-slot-0 snd-card-0 alias sound-service-0-0 snd-mixer-oss alias sound-service-0-1 snd-seq-oss alias sound-service-0-3 snd-pcm-oss alias sound-service-0-8 snd-seq-oss alias sound-service-0-12 snd-pcm-oss # Options for cards (see 'INSTALL' in alsa-driver directory) # See the alsa 'INSTALL' for the options available on your card options snd snd_major=116 snd_cards_limit=1 options snd-emu10k1 snd_index=0 snd_id=emu10k1 ##################################################### Now, put a comment marker (#) in front of the line in this same modules.conf file which pointed to your old driver. It is listed somewhere in the first few lines (not pictued above), mine looks like this when it is commented out: # alias sound-slot-0 emu10k1 Lastly, add this block to the bottom of you /etc/devfsd.conf file: # added for ALSA permissions, etc LOOKUP snd MODLOAD ACTION snd REGISTER ^sound/.* PERMISSIONS root.audio 660 REGISTER ^snd/.* PERMISSIONS root.audio 660 This assumes that your users are in the group "audio", which you can add them to in the user manager (in the K menu at "Configuration->Other->UserManager). Now devfs will work. And now reboot and you should have sound. One troubleshooting tip, there may be conflicts on some cards with the OLD Mandrake preinstalled ALSA modules. Once you have a clean install of the lastest ALSA, you can simple throw the old ones away...they are all named snd-card-*). Good luck. K kevmccor Newbie Joined: 14 May 2002 Posts: 9 Location: Tyler, TX Post Posted: Sun Oct 06, 2002 2:33 pm Post subject: _________________________________________________________________ Thanks for a great post. Following the directions, I was actually able to get sound again! I had done something like this before, but forgot what I did. When I installed 8.2, I tried the alsa rpm's, but couldn't get it to work. Perhaps my problem was the mixer, but now it is working. For all those like myself, who are not sound program programmers, there are three parts to installation: the alsa program(s), the mixer setup, and the player. The directions for installing alsa work great. After the ./install --with-cards=ens1371 (my card), make, and make install for each of alsa-drivers, alsa-libs, and alsa-utils, one must use a mixer program to "enable" the sound. I added the following to my /etc/rc.d/rc.local: # added for sound amixer set Master 28 on amixer set PCM 16 on amixer set CD 16 on From a terminal window, enter: amixer > ~/amixer.txt Then type: nedit ~/amixer.txt & Then enter: amixer set Master 28 on amixer set PCM 16 on amixer set CD 16 on Then, again enter: amixer > ~/amixer.txt and enter: nedit ~/amixer.txt & compare the Master, PCM, and CD sections Then, after trying alsamixer unsuccessfully, I loaded the xmms rpm's and, from the menu accessed by the leftmost button on xmms, I added to the Playlist the directory /dev/cdroms. Put a music cdrom in the cdrom drive and play. Gee! if only the documentation were there to begin with. Of course, there are other ways to do this, but I hope someone who understands the process --and also how to write directions-- would put a complete post of the whole procedure and get it into the mandrakeuser.org documentation. Thanks again! DOlson Moderator Joined: 16 Apr 2002 Posts: 2393 Location: Canada Post Posted: Sun Oct 06, 2002 6:25 pm Post subject: _________________________________________________________________ I think that making ALSA the only sound system is quote stupid... For SB Live! and Audigy cards, ALSA has nothing on the OSS drivers. They sound tinny, and are delayed, and the only advantage is the soundfonts. I hope this situation REALLY improves. And soon. bvc81 Eric Joined: 04 Jun 2002 Posts: 1014 Location: Houston, Texas Post Posted: Sun Oct 06, 2002 8:19 pm Post subject: _________________________________________________________________ DOlson wrote: I hope this situation REALLY improves. And soon. What sit? I heard something about alsa being the default for 9.0, and there's a alsa and a oss driver for my card (the alsa stinks for me), but the oss is the one being used. What sit? DOlson Moderator Joined: 16 Apr 2002 Posts: 2393 Location: Canada Post Posted: Sun Oct 06, 2002 10:28 pm Post subject: _________________________________________________________________ The situation that SOUND SUCKS ASS in Linux. Show me ONE card that has decent driver support, that has all the features of the Windows drivers, that even supports TRUE surround sound or TRUE 4-speaker output. None that I am aware of. If you think Linux is NOT lacking in the sound area, you're sick. bvc81 Eric Joined: 04 Jun 2002 Posts: 1014 Location: Houston, Texas Post Posted: Mon Oct 07, 2002 12:00 am Post subject: _________________________________________________________________ DOlson wrote: The situation that SOUND SUCKS ASS in Linux. I caught that part. Mine's noticably better in linux but I just have a cheap onboard CS4281,, I've never tried the surround sound stuff. DOlson wrote: If you think Linux is NOT lacking in the sound area, you're sick. Add it to list of areas. I'm not suprised. Hell, if people have to spend days getting their mouse, and keyboard to work right, why should we expect sound to be fabulous. Razz DOlson Moderator Joined: 16 Apr 2002 Posts: 2393 Location: Canada Post Posted: Mon Oct 07, 2002 12:25 am Post subject: _________________________________________________________________ bvc81 wrote: DOlson wrote: The situation that SOUND SUCKS ASS in Linux. I caught that part. Mine's noticably better in linux but I just have a cheap onboard CS4281,, I've never tried the surround sound stuff. DOlson wrote: If you think Linux is NOT lacking in the sound area, you're sick. Add it to list of areas. I'm not suprised. Hell, if people have to spend days getting their mouse, and keyboard to work right, why should we expect sound to be fabulous. Razz I didn't say that we should EXPECT it, I said that it HAS to improve. How could Linux be taken seriously by gamers, pro audio users, or huge music enthusiasts if there are no good sound cards? That said, my card (SB Live! 5.1) runs beautifully with the OSS drivers, and I even get bass and treble controls. kunderdog Frequent user Joined: 21 Aug 2002 Posts: 100 Post Posted: Thu Oct 10, 2002 5:42 am Post subject: CARDS _________________________________________________________________ Fortunately, there are pro-level cards for Linux (though not for gaming, etc), with ALSA support only (and for use with an API called JACK for low-latency situations lilke harddisk recording). Two companies have gotten their act together on this, RME (check ou their page to see the 9652 PCI card, and a very nice HDSP multiface box...18 channels in and out, 96K sampling rate support, 112 dB dynamic range, whoa!), and M-audio. The M-audio cards are cheaper, and have a nice graphical configuration utility (again, ALSA only). I would suggest the Audiophile 2496 for starters. Yes, there are problems, but for my money, Linux has too many other advantages to worry about dolby's latest BS or support for propietary compression CODECS. What make linux great is what makes it unique (sophistacated sound manipulation tools like PD, vspace, SMS, Csound, Cecilia, MixViews...look them up if you are interested). K kunderdog Frequent user Joined: 21 Aug 2002 Posts: 100 Post Posted: Sun Nov 10, 2002 7:15 pm Post subject: Update _________________________________________________________________ Mandrake 9.0 now includes ALSA by default, and the modules.conf layout is a little different (simpler) than it was in 8.2 where all modules needed to be loaded individually. You may also want to install the alsa-lib and alsa-utils rpm. Just do" urpmi alsa-utils alsa-lib". So just to be clear, if you are running 8.2, my directions above will still work, but if you are running 9, please do the following. NOTE-1: If you have sound with OSS and have no need for some of the benefits of ALSA (it allows for multiple cards [clock sync], lower-latency opperation [useful for MIDI, etc], and support for the latest pro audio quality applications), don't bother with ALSA just yet. Eventually, ALSA will replace OSS, but for now both are available and useful. NOTE-2: Many users have had excellent results with autodetection, either during the install, or with the Hardware configuration tools in the Mandrake Control panel (or with sndconfig or alsaconfig). Always look for the simplest solution...your problem may be more easily managed than you think. Here's the manual route. 1. Find out the modules name for your card, usually snd-<chipet_name>, for example, the SBLive's emu10k1 becomes snd-emu10k1. Often, you can simply look at your /etc/modules.conf file and look for references to you sound card. ALL ALSA MODULES USE THE "SND-* PREFIX. See the "sound card matrix" at www.alsa-project.org. 2. Place the following lines in your /etc/modules.conf ( ALWAYS backup these important configuration files before editing!) Code: alias sound-slot-0 <chipset_name> above snd-<chipset_name> snd-pcm-oss So for my Sony's onboard Neomagic 256 card, which uses the driver "snd-nm256" I have: Code: alias sound-slot-0 snd-nm256 above snd-nm256 snd-pcm-oss The "above" line automatically loads OSS emulation, which will create a /dev/dsp and make sound avalibale to OSS dependent apps. If there are old references to sound or to your sound-slots, you may comment them out with "#". Some cards may also have addtional options available. Multi-card setups are possible with additional alias blocks for snd-slot-1,2,3, etc. 3. Place all users in the group "audio" using the user manager in the Mandrake control panel, or with KDE's user manager. This is uneccesarry in some situations, but in multi-user environments this can be useful. 4. Remove any loaded sound modules (list with /sbin/lsmod) with "rmmod <module>", and start/restart ALSA with "service alsa restart". You can also load the modules manually with "modprobe". You will load the main snd-* driver, as well as the "snd-pcm-oss" if you wish to have OSS emulation. Once your /etc/modules.conf is editied, rebooting will accomplish the same thing if, but this is an old M$ habit, best to unlearn. That's it. ALSA mutes all devices by default, so you have to bring up levels with your favorite mixer. If you are having trouble with the new volumes being reset on reboot, you can store the levels manually with "alsactl store <card#>". In most cases this is done automatically. Note that alsactl is a part of the alsa-utils rpm. K scrat Frequent user Joined: 14 Jun 2002 Posts: 28 Post Posted: Mon Nov 11, 2002 12:52 pm Post subject: _________________________________________________________________ Hi Kunderdog, I know there is a way to set up ALSA to use Timidity as a sort of virtual MIDI device, so that apps (Brahms e.g. or the like) speak to ALSA thinking it will forward to the soundcard sequencer, while it's instead using Timidity. Good for people who don't have a soundcard with sequencer, obviously Smile Do you have any hints on this subject ? I am going to try this sooner or later, but any wizardry-tricky-hint would be welcome before I go... Scrat kunderdog Frequent user Joined: 21 Aug 2002 Posts: 100 Post Posted: Mon Nov 11, 2002 3:46 pm Post subject: Some links _________________________________________________________________ Here are a a number of excellent tutorials on setting up MIDI stuff. The second half of this one is good, ignore the ALSA setup section at the beginning since it deals with and older, unsupported version of ALSA. It addresses timidity directly: http://www.linuxfocus.org/English/Septembe...rticle259.shtml And here's one on an app called Muse, very much like Brahms...actually it is my choice over Brahms, have a look and see what you think. http://linux-sound.org/quick-toots/2-muse/...-toot-muse.html And a tutorial on sequancers and softsynths if you are futher interested: http://linux-sound.org/quick-toots/4-seque...tsynths/quick-t oot-midisynth_howto.html These las two are taken from the excellent and ongoing "Quicktoots" hosted at the venerable "linux-sound.org", hosted by Dave Phillips, a rather centrally important person to the Linux Audio community, and a nice as hell guy. K Editor's note: This thread was originally posted at the old MUB (Mandrake User Board at club-nihil). This post is the result of a 99% automatic backup, so due to its nature some text may be lost (improbable but possible).
  14. Bluebeard Senior user Joined: 01 May 2002 Posts: 386 Post Posted: Thu Sep 05, 2002 10:22 pm Post subject: Partitoning for XP before Installing Linux _________________________________________________________________ Partitoning windows NTFS and Fat 32 hints from Alex Aitken at alt.os.linux.mandrake. " XP Pro can swing both ways too. I use NTFS for C: drive and FAT32 for D: and E: to keep compatibility with Win98 which I need for a couple of things that dont work in WinXP and never will (my MP3 player upload software). In fact if I recall even Win2k can happily run under FAT32. The only reason I run NTFS on my C: drive is so that Win98 doesnt see it because that would mean two primary partitions which Win98 wouldnt like. I never understand why people dont partition their drive like I do, C: drive for the OS and D: drive for most games and programs. Its especially useful for dual-boot as it lets me use a single copy of a game between both WinXP and Win98, even those that need registry settings can be install over the top of the existing version so that it installs the registry data and then still you are only using the one copy instead of wasting space on two copies. A lot of applications will happily run this way too, Netscape being one of them (though sharing the profile isnt as easy as it used to be). Rule of thumb, always at LEAST have a FAT32 D: drive that you can use for general storage that almost ANY OS will be able to read/write to. I use D: drive to reinstall Win98 for instance as its much quicker than using the CD plus it means whenever it wants the Win98 CD is automatically finds the files on D: drive so I never actually need the Wni98 CD, I dont even remember the last time I saw it. Alex Aitken" Bluebeard. Editor's note: This thread was originally posted at the old MUB (Mandrake User Board at club-nihil). This post is the result of a 99% automatic backup, so due to its nature some text may be lost (improbable but possible).
  15. qeldroma Frequent user Joined: 07 May 2002 Posts: 128 Location: Berlin, GERMANY Post Posted: Thu Sep 05, 2002 1:40 pm Post subject: i810 GraKa under LM _________________________________________________________________ I had severe troubles getting it working flawlessly. Some things i found out by now: First of all, the graka shares the memory with the mobo. That's why you have to tell the kernel NOT to use all the memory available. - Open /etc/lilo.conf, find the line "append=" and add "mem=xxM", where xx is the available memory reduced by the size of the graka-memory. This is a difficult point, because i810 was build with different memory allocations, so you HAVE TO refer to your manual, to find out how much it needs (4 up to 16 MB). Then you have to look after a kernel-modul called "agpgart", which is needed for the graka. - Open /etc/modules.conf, and look if it is included, else put it in, similar to the other modules. With this, i got some machines working perfectly, one can start the X-Server only once, after killing the X-Server, i can't get it working until a reboot, but could be a technical problem. Editor's note: This thread was originally posted at the old MUB (Mandrake User Board at club-nihil). This post is the result of a 99% automatic backup, so due to its nature some text may be lost (improbable but possible).
  16. scoladon Newbie Joined: 27 Aug 2002 Posts: 11 Post Posted: Tue Sep 03, 2002 12:41 am Post subject: Installing Oracle 9.0.1 on Mandrake 8.2 _________________________________________________________________ Procedure For Installing Oracle 9.0.1 On Mandrake 8.2 N.B. This is not a primer for running the oracle installer nor database creation assistant. Kernel Version: 2.4.18-6mdk I have found that the kernel parameters from the default install of Mandrake 8.2 are sufficient for installing and running Oracle and also the OEM console. Just to check, go to the /proc/sys/kernel directory and issue the following: $ cat sem The output should be: 250 32000 32 128 On my system, the output of "cat shmmax" is 33554432 and the output of "cat shmmni" is 4096. This all works without modification but I am only running Oracle for my own use. As root: Create a dba group. Create an oracle account with primary group set to dba. Create directory /orasw/app/oracle/product/9.0.1 Create directories /u01, /u02 and /u03 chown oracle:dba for all created directories and sub-directories As oracle: Create a shell script, orasetup, in /home/oracle/bin as follows: /***contents of orasetup***/ # Set up Oracle Environment Variables # Ensure that /usr/local/bin is in your current path case "$PATH" in */usr/local/bin*) ;; *:) PATH=${PATH}/usr/local/bin: ;; "") PATH=/usr/local/bin ;; *) PATH=$PATH:/usr/local/bin ;; esac export PATH # Set up the default Oracle instance. ORACLE_SID=MDKP1 ORACLE_HOME=/orasw/app/oracle/product/9.0.1 export ORACLE_SID ORACLE_HOME # Set up OFA variables . orabase # Set up the Oracle NLS environment NLS_LANG=AMERICAN_AMERICA.UTF8 export NLS_LANG ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data export ORA_NLS33 # Set up LD_LIBRARY PATH LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/openwin/lib LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/td/lib:/usr/ucblib:/usr/local/lib export LD_LIBRARY_PATH /***end contents of orasetup***/ Create a shell script, orabase, in /home/oracle/bin as follows: /***contents of orabase***/ ORACLE_BASE=${ORACLE_HOME%/product*} export ORACLE_BASE DBA=$ORACLE_BASE/admin export DBA ORADBA=$DBA/$ORACLE_SID export ORADBA /***end contents of orabase***/ Modify oracle's .bash_profile to call orasetup. i.e. . orasetup. Note that /home/oracle/bin should be in your PATH. Logout and login as oracle. Check that the environment variables have been set: env | grep ORA You should see values for: ORACLE_HOME, ORACLE_SID, ORA_NLS33, ORACLE_BASE and ORADBA. You are now ready to install the software. During the install, you will have to run some scripts as root. I do this by bringing up an XTERM session in another Desktop and su'ing to root. Place the Oracle CD 1 in the cdrom drive and, from oracle's home directory run the following: $ /mnt/cdrom/runInstaller Answer the prompts and when it comes time to select the type of install, choose "Install Software Only". At this time do not create a database. The installer will go off and do its thing. CAVEAT: During the install, you will get an error during the linking process for the oracle executable. When this happens, leave the error window up and, as oracle, go to $ORACLE_HOME/bin and edit the genclntsh file as follows: Comment out the line: LD_SELF_CONTAINED="-z defs" Before: LD_SELF_CONTAINED="-z defs" After: # LD_SELF_CONTAINED="-z defs" Then execute the genclntsh script: $ ./genclntsh When this completes, go back to the installer error window and click "Retry". The link should now complete and the software installation should be successful. Now it is time to create the database. In $ORACLE_HOME/bin, there is an executable called "dbca". This is the database creation assistant. Execute it and answer the prompts. You should place the control files in /u01/oradata/{SID}, /u02/oradata/{SID}, and /u03/oradata/{SID}. The tablespace files should be spread out in the same directories. Take the defaults for the files that go in "bdump", "udump", etc. At the end of database creation, there should be an instance of Oracle running. Log in as the system account just to make sure everything is O.K. $ sqlplus SQL*Plus: Release 9.0.1.0.0 - Production on Mon Sep 2 14:23:20 2002 © Copyright 2001 Oracle Corporation. All rights reserved. Enter user-name:system Enter password:******* Connected to: Oracle9i Enterprise Edition Release 9.0.1.0.0 - Production With the Partitioning option JServer Release 9.0.1.0.0 - Production SQL> If you don't see the above, recheck that you have done everything correctly and if need be, delete all the oracle directories and try again. Maciek Frequent user Joined: 04 Jul 2002 Posts: 86 Location: Perth Post Posted: Tue Oct 01, 2002 4:04 pm Post subject: _________________________________________________________________ I sincerely wish it was that easy... It took me several hours to install Oracle 9i Application Server (1.0.2.1.0) on Mandrake 8.2, of course using JDK 1.1.8 and old glibc. If anyone's interested, I can provide detailed information (as long as I still remember how I did). scoladon Newbie Joined: 27 Aug 2002 Posts: 11 Post Posted: Tue Oct 01, 2002 7:44 pm Post subject: _________________________________________________________________ The Oracle 9i Application Server software is a different beast from the 9i database software. And from everything I have heard, the Application Server is a bit more difficult to install and get running. But if you are just installing the database, I believe my post is valid. Steve Maciek Frequent user Joined: 04 Jul 2002 Posts: 86 Location: Perth Post Posted: Wed Oct 02, 2002 2:56 pm Post subject: _________________________________________________________________ Yes of course, your post is valid. Sorry for misunderstanding, I just said that installing iAS is not as easy as the dbase alone. Even if both use similar dbms (or do they???), the installation differs. By the way, do you know if oracle still provides free cd packs for students (sent by mail)? scoladon Newbie Joined: 27 Aug 2002 Posts: 11 Post Posted: Wed Oct 02, 2002 8:32 pm Post subject: _________________________________________________________________ The Application Server is separate from the database. I'm not sure which version of the RDBMS comes with 9iAS but in general, the AS can talk to different versions of the database meaning it should be able to work with 8.1.7, 9.0.1, 9.2.x etc. The Oracle Technology Network provides a service called "Technology Tracks" where you can purchase a "CD" pack license for $200 which includes the database and development tools for various platforms. You can download whatever you want from that site also but the files are huge. Steve jcwilson Newbie Joined: 14 Oct 2002 Posts: 7 Post Posted: Mon Oct 14, 2002 5:41 pm Post subject: How about Oracle 9.0.2 on MDK 9.0 _________________________________________________________________ This article was good but would it be too much to ask for a similiar dicument for Oracle 9.0.2 on MDK 9.0? Shocked I am new to installing Oracle in a Unix environment and can never get it right. Crying or Very sad I have tried three times already and when I think that I got it, I get errors like the following: When using dbca, I get a java error "Invalid entry size (expecting 'some large number' but got 'some other large number') When I tried to create a blank database from scratch, I get an "ORA -27123: Unable to Attach to Shared Memory Segment" error. scoladon Newbie Joined: 27 Aug 2002 Posts: 11 Post Posted: Mon Oct 14, 2002 10:16 pm Post subject: Oracle on Mandrake 9 _________________________________________________________________ You've got me at a disadvantage. I don't have Mandrake 9 yet nor has Oracle shipped 9.2 to me yet. I believe you are referring to 9.2 and not 9.0.2. Anyway, Oracle is not certifying the database on the desktop distros. Only on the SuSE Server and the Red Hat Server. Possibly one other Linux distro. What this means is that if the libraries are different in Mandrake 9 vs. 8.2 there could be a very difficult problem to overcome getting Oracle installed. I'm sure Linux guru's would have no problem getting the right libraries in place but I don't have that skill set. However, when I get Mandrake 9 and Oracle 9.2 I'll give it a go, but by then you may have already gotten it running or given up entirely. Sorry. Steve Editor's note: This thread was originally posted at the old MUB (Mandrake User Board at club-nihil). This post is the result of a 99% automatic backup, so due to its nature some text may be lost (improbable but possible).
  17. simcon Frequent user Joined: 03 May 2002 Posts: 48 Location: MK-ENG-GB-UK Post Posted: Wed May 08, 2002 3:20 pm Post subject: Here's how to get i810 onboard sound working under mdk8.2 _________________________________________________________________ I have been trying for weeks to get my Analog Devices AD1885 Intel i810 AC '97 integrated sound to work under mdk8.2 and I finally did it. Here's how:- Throughout the following text I have assumed that you are in KDE under mdk8.2 and that you have the konsole open. All typed expressions I have shown inside single-quotes. 1. First go to http://www.alsa-project.org and download the latest stable DRIVER currently 0.5.12a. Extract it into your home folder using 'tar -xjvf alsa-driver-*', then change into the folder using 'cd alsa-driver-*'. 2. Still in the console type './configure --with-cards=intel8x0' at which point you may get a configure error like this, if not go to step 3:- checking for kernel version...expr: syntax error expr: syntax error expr: syntax error failed (probably missing /usr/src/linux/include/linux/version.h) What you have to do here is edit the version.h file as root, so type 'su' and type your root password, then type 'kedit /usr/src/linux/include/linux/version.h' and edit the line that reads '#include <linux/rhconfig.h>' and change it to '#include </usr/src/linux/include/linux/rhconfig.h>', save it and exit kedit. Now go back to step 2 and repeat the configure process. You can stay logged in as root unless you don't want to. 3. Type 'make' in the console. You will get a message saying 'ALSA modules were sucessfully compiled'. At this point if you are not logged in as root you must do so by typing 'su' and entering the root password. Now type 'make install' to complete the drivers installation. 4. Type './snddevices' to run the ALSA script that creates the sound devices in the /dev folder. 5. Type 'kedit /etc/modules.conf' and delete the line that reads 'alias sound-slot-0 i810_audio' and add the following lines:- # ALSA portion alias char-major-116 snd options snd snd_major=116 snd_cards_limit=1 alias snd-card-0 snd-card-intel8x0 # OSS/Free portion alias char-major-14 soundcore alias sound-slot-0 snd-card-0 alias sound-service-0-0 snd-mixer-oss alias sound-service-0-1 snd-seq-oss alias sound-service-0-3 snd-pcm-oss alias sound-service-0-8 snd-seq-oss alias sound-service-0-12 snd-pcm-oss Save the file and exit kedit. 6. Type 'exit' to logout root and type 'aumix' to get a gui mixer. You need to unmute the settings from the menu, but in my aumix the unmute tick mark is reversed so that it is ticked when unmuted! Set all of the sliders to around 75% and quit aumix. 7. Finally shutdown the computer so that it turns off, then boot it up again and you should now have sound Smile The above is basically a summary of various documents linked to below:- http://www.exocore.com/technologies/linux/...810/i810-6.php3 http://marc.theaimsgroup.com/?l=mandrake-c...30065120030&w=2 Enjoy your sound, Ciao Simon Constable Last edited by simcon on Thu May 09, 2002 10:36 pm, edited 2 times in total joehill Senior user Joined: 09 May 2002 Posts: 217 Location: Toronto, Canada Post Posted: Thu May 09, 2002 5:28 pm Post subject: got sound, just low volume _________________________________________________________________ hey there, my problem is a little different but i wonder if it is related. i too have the integrated sound card, but i get sound no problem, it's just that i cannot adjust the system volume. i am told by the KDE help that i need to adjust the volume in the "mixer" controls, but in my mixer controls there is no volume control. also, harddrake shows no info for the soundcard. is it possible the ALSA drivers would help me, or am i wasting my time with that? thanks all, simcon Frequent user Joined: 03 May 2002 Posts: 48 Location: MK-ENG-GB-UK Post Posted: Thu May 09, 2002 10:24 pm Post subject: _________________________________________________________________ Well I use kmix under KDE and I found that my PCM (wave) sound was controlled by a combination of PCM and PHONO OUT!!! And that the master volume slider made no difference. I have no idea why this would be as my colleague assembled my computer and I am not sure how it is wired up internally. If you have sound then you are fine. You don't need to compile the latest ALSA drivers, but I am not sure what you mean by 'no volume control' in the mixer? In kmix you will have 11 sliders, with the master volume on the left followed by PCM and speaker etc. I assume that you know there is a mixer accessible from Multimedia->Sound->Sound Mixer in the K menu? Once you have set the sliders you must save the current settings as default from the kmix menu. joehill Senior user Joined: 09 May 2002 Posts: 217 Location: Toronto, Canada Post Posted: Fri May 10, 2002 3:36 am Post subject: _________________________________________________________________ heh heh, so many menus, options, two things called control panel...my head is spinning... yup, you got it, thanks, i missed that in the multimedia menu, i was looking at the Configuration -> KDE -> Sound -> Mixer, totally useless as far as I can tell. BTW, you notice when you reply on this board what you type goes past the edge of the text field, but there's no bottom slider? i never had that in Explorer, but then it crashed every five muddafuggin minutes... thanks, man! CloakedPenguin Frequent user Joined: 03 May 2002 Posts: 119 Location: Tampa, FL Post Posted: Fri May 24, 2002 9:26 pm Post subject: Re: Here's how to get i810 onboard sound working under mdk8. _________________________________________________________________ simcon wrote: What you have to do here is edit the version.h file as root, so type 'su' and type your root password, then type 'kedit /usr/src/linux/include/linux/version.h' and edit the line that reads '#include <linux/rhconfig.h>' and change it to '#include </usr/src/linux/include/linux/rhconfig.h>', save it and exit kedit. Now go back to step 2 and repeat the configure process. You can stay logged in as root unless you don't want to. Okay problem here. I get the error message: kedit: command not found Any help you can give me would be great CloakedPenguin Frequent user Joined: 03 May 2002 Posts: 119 Location: Tampa, FL Post Posted: Sat May 25, 2002 4:34 am Post subject: Re: Here's how to get i810 onboard sound working under mdk8. _________________________________________________________________ well for me it's gedit.... I followed the directions to a T and still no sound Crying or Very sad simcon Frequent user Joined: 03 May 2002 Posts: 48 Location: MK-ENG-GB-UK Post Posted: Sat May 25, 2002 9:38 am Post subject: _________________________________________________________________ Ok then so I need to know what chipset you have exactly. Dump here the following:- what sndconfig calls your sound device. what the kmix tab calls your sound device. the contents of your /etc/modules.conf file. what Windows calls your sound device. If you can't run kedit then I assume you didn't install KDE? This isn't a problem, but I assumed people would know this and modify my tutorial accordingly, so you propably can't access the kmix program either. One problem I will have is that I don't use Gnome so I'm not that proficient with sound under it. Still I expect someone else here is. Anyway, get me the above info and I'll see if I can help you further Razz Ciao CloakedPenguin Frequent user Joined: 03 May 2002 Posts: 119 Location: Tampa, FL Post Posted: Sat May 25, 2002 5:58 pm Post subject: _________________________________________________________________ Okay it's a C-Media AC97 Audio Device. Thats what windows calls it. This is what modules.conf says (I changed this per your instructions) alias usb-interface usb-ohci # ALSA portion alias char-major-116 snd options snd snd_major=116 snd_cards_limit=1 alias snd-card-0 snd-card-intel8x0 # OSS/Free portion alias char-major-14 soundcore alias sound-slot-0 snd-card-0 alias sound-service-0-0 snd-mixer-oss alias sound-service-0-1 snd-seq-oss alias sound-service-0-3 snd-pcm-oss alias sound-service-0-8 snd-seq-oss alias sound-service-0-12 snd-pcm-oss above snd-card-intel8x0 snd-pcm-oss probeall scsi_hostadapter ide-scsi alias eth0 sis900 running sndconfig in the terminal, i get the error "sndconfig: command not found" Also I know that it is an SIS7012 Intel AC97 Direct Sound w/ Yammaha synthesizer Anything else? simcon Frequent user Joined: 03 May 2002 Posts: 48 Location: MK-ENG-GB-UK Post Posted: Sun May 26, 2002 11:46 am Post subject: _________________________________________________________________ sndconfig has to be run as root, so type su in a console, enter your root password and then run sndconfig. If it still is unknown then you'll have to install it as it's not installed by default. It's on the Mandrake CDs. I need to know what is says Smile Ciao CloakedPenguin Frequent user Joined: 03 May 2002 Posts: 119 Location: Tampa, FL Post Posted: Sun May 26, 2002 3:48 pm Post subject: _________________________________________________________________ Okay here is what it says: Silicon Integrated Systems [sis] | SiS7012 PCI Audio Accelerator Thats it. Thanks simcon Frequent user Joined: 03 May 2002 Posts: 48 Location: MK-ENG-GB-UK Post Posted: Tue May 28, 2002 8:24 am Post subject: _________________________________________________________________ Well I/we seem to have exhausted most things here. You could try reading this from the old forum, but pay attention to the end where he get's it working and not to kernel compilation:- http://www.mandrakeuser.org/mub/viewtopic....c=10775&forum=4 Really you should be up and running by now Confused Keep trying because it's probably just something miniscule left to do. Also search some more on the old forum for SiS7012 i810 AC 97 etc. Ciao for now simcon Frequent user Joined: 03 May 2002 Posts: 48 Location: MK-ENG-GB-UK Post Posted: Wed May 29, 2002 10:43 am Post subject: _________________________________________________________________ Here are some resources for you:- http://www.alsa-project.org/~goemon/ lists your sis 7012 and recommends the intel8x0 driver so we're on the right track. Take a look here too http://www.alsa-project.org/alsa-doc/alsa-howto/ Ciao CloakedPenguin Frequent user Joined: 03 May 2002 Posts: 119 Location: Tampa, FL Post Posted: Thu May 30, 2002 1:50 am Post subject: _________________________________________________________________ ACK I think my brain has finally fried! I've gone to the ALSA link and I've read all that and it's GREEK to me! Confused ::banging head into desk:: I don't understand what I'm doing wrong!!!! ARG!!!!!!!!! thank you for all your help I really appreciate it! I guess I'll just have to live without sound Crying or Very sad Editor's note: This thread was originally posted at the old MUB (Mandrake User Board at club-nihil). This post is the result of a 99% automatic backup, so due to its nature some text may be lost (improbable but possible).
  18. Tristan Frequent user Joined: 02 May 2002 Posts: 74 Location: Melbourne, Australia Post Posted: Wed Aug 28, 2002 1:34 am Post subject: Dealing with SPAM _________________________________________________________________ I've got a dialin account which I access at home with my MDK8.2 box. I receive 30-50 emails a day and about 3 of them are not spam. A lot of them are bogus "undeliverable mail" types, you open them and there is the offer to extend your elbow etc Shocked The problem is getting worse, and I've been looking at ways of dealing with it. 1 - Use email filters in sylpheed (or whatever your client is). Trouble is you have to download the mail first. 2 - Use a program like popcheck (http://www.algonet.se/~staham/linux/programs.html) to view and manually delete email on the server, without having to download it. This works very well and is fast. However it requires manually checking each email subject line. If you get huge amounts of spam it can be time consuming. 3 - Automatically delete spam on the server. I recently installed mailfilter (http://mailfilter.sourceforge.net/ index.html), and it is really excellent. You define simple regexp rules for denying spam, and allowing non- spam. When you run mailfilter it connects to your pop3 server, compares the mail to your rules, and deletes the spam. Simple and effective! My service provider thoughtfully runs spam-assassin which marks nearly all spam as ***SPAM***, which makes mailfilter's task even simpler. Mailfilter also keeps a log file so you can keep track of what's deleted. I now routinely run a small script to deal with email... ##### # 1 - Auto delete spam. aterm -e mailfilter # 2 - Manually delete any missed spam. #These missed spams allow you to refine your mailfilter rules aterm -e popcheck (plus login details) # 3 - Download and read the real email. sylpheed ##### Hope this helps all of you spam sufferers! PS I originally (mistakenly) posted this in the networking section, sorry about that. ramfree17 Moderator Joined: 18 Apr 2002 Posts: 1262 Location: Philippines Post Posted: Wed Aug 28, 2002 4:35 am Post subject: _________________________________________________________________ moved the duplicate thread in offtopic. nothing i can do for the comments there. but i cant do anything about the existing comments there so ill unlock it when i get the time and connection. ciao! Editor's note: This thread was originally posted at the old MUB (Mandrake User Board at club-nihil). This post is the result of a 99% automatic backup, so due to its nature some text may be lost (improbable but possible).
  19. pantropik Frequent user Joined: 26 Jun 2002 Posts: 58 Location: Florida, USA Post Posted: Thu Aug 22, 2002 10:33 pm Post subject: Make OpenOffice.org's UI Look Great _________________________________________________________________ If you're using a bytecode-enabled freetype (such as Ranger's or Texstar's), you probably noticed what a HUGE improvement it made to the default look of your system -- well, after a bit of tweaking, anyway. You probably also noticed that OpenOffice.org was still incredibly ugly. The actual text used in your document might look nice, but the user interface elements (dialog boxes, menus, the navigator and style list, etc) still look awful -- jagged and almost unreadable on my laptop. To fix it, fire up OO.o. Now click Tools -> Options -> Select OpenOffice.org in the tree view of the dialog that pops up. Under OO.o, select Font Replacement. Next, click the box next to "Apply Replacement Table". In the Font pull-down box, manually type in "Andale Sans UI" (minus the quotes, of course). You can NOT select this font in the box, it's not there and must be entered manually. Next, pick a replacement font in the "Replace With" drop-down box. I suggest Helvetica (it looks great for me) but you should experiment til you get a look you like. Just click the checkmark by the "Replace With" box. Then, down beneath, make sure you've checked "Always" and "Screen". Click OK and see what the new user interface looks like. Repeat these steps until you find a font that doesn't look awful (though almost anything is an improvement over Andale Sans, IMNSHO). In my case this made a HUGE difference. On my laptop, OO.o was so ugly I didn't even want to use it, until I stumbled across this. Thrawn Newbie Joined: 30 Jul 2002 Posts: 11 Location: Austin, TX, USA Post Posted: Sun Sep 08, 2002 3:40 am Post subject: _________________________________________________________________ Is there any way to make the replaced font be anti-aliased? Maciek Frequent user Joined: 04 Jul 2002 Posts: 86 Location: Perth Post Posted: Tue Oct 01, 2002 4:07 pm Post subject: _________________________________________________________________ Yes, for example use a TrueType font. One way to find out if your favourite font is TT is to open a font dialog (eg. in KDE Control Centre) and choose a font with (Xft) next to it, but then again, it may differ from system to system. Editor's note: This thread was originally posted at the old MUB (Mandrake User Board at club-nihil). This post is the result of a 99% automatic backup, so due to its nature some text may be lost (improbable but possible).
  20. Bluebeard Senior user Joined: 01 May 2002 Posts: 386 Post Posted: Wed Aug 21, 2002 7:56 pm Post subject: Getting More out of Google _________________________________________________________________ It seems that many times the only help that can be given is to search Google. There are ways to maximize the time spent searching by using the Advanced search option and filling out the search form. Usually this means that you only need to use the "exact phrase" option and changing the search terms around. The Advanced search also gives you the option of selecting the number of responses to give. Set this at 100 and your searching will be much faster. Bluebeard. spiedra Senior user Joined: 30 May 2002 Posts: 686 Location: Orlando, FL Post Posted: Wed Aug 21, 2002 9:49 pm Post subject: _________________________________________________________________ You can also add linux to the address which will give you better results, i.e. http://www.google.com/linux ramfree17 Moderator Joined: 18 Apr 2002 Posts: 1262 Location: Philippines Post Posted: Thu Aug 22, 2002 12:09 am Post subject: _________________________________________________________________ if you are using opera in linux, use the short cuts provided. lets say you want an IMAP mail client in linux then you will have to type in the address bar Code: x IMAP +"mail client" where x is the shortcut for google.com/linux. you could replace x with g to use the normal searching engine. i still couldnt figure out how to simulate the 'language' option in the advance section. anybody in the know? ciao! pantropik Frequent user Joined: 26 Jun 2002 Posts: 58 Location: Florida, USA Post Posted: Fri Aug 23, 2002 8:13 am Post subject: _________________________________________________________________ Ew, Opera! That's not FREE SOFTWARE! How dare it be mentioned in polite company?? Razz Sorry, couldn't resist. Anyway, I don't use Opera since Konqueror does pretty much everything I need. Don't look so surprised, at least I didn't say lynx ... Anyway, if ya wanna be really productive, try Code: Open Konqueror. Click Settings -> Configure Konqueror -> Enhanced Browsing. There you'll see lots of stuff. For instance, Google is the default "Fallback" search engine, but you'll see a HUGE list of other searchable resources you can query from inside Konqueror. For instance, to query google, you simply type gg:<your query> into the address bar (or a panel command box, or the Alt-F2 command box) and hit enter. Up pops Google. But since ramfree isn't satisfied with that, we'll make a new one. Click on "Add..." Add the following in the dialog box that pops up: Search Provider Name: Google Linux Search URI: http://www.google.com/linux?q={@} URI Shortcuts: whatever you want that isn't already used, separated by commas. For instance: URI Shortcuts: gl,linux Then click OK, Apply, and close the Settings dialog. If you typed it right you can now type linux:blah blah blah or gl:blah blah blah into Konq's address bar (or any command box) and query Google Linux directly. Even if you don't create a new one, take a peak at all the options ... heck, you can even (no joke) type tel:blah blah blah and search the Austrian Online Telephone Book ... Have fun. :-) ramfree17 Moderator Joined: 18 Apr 2002 Posts: 1262 Location: Philippines Post Posted: Fri Aug 23, 2002 3:53 pm Post subject: _________________________________________________________________ pantropik wrote: Ew, Opera! That's not FREE SOFTWARE! How dare it be mentioned in polite company?? Razz Sorry, couldn't resist. Anyway, I don't use Opera since Konqueror does pretty much everything I need. Don't look so surprised, at least I didn't say lynx ... have you ever tried surfing with mouse-gestures (the one with mozilla is not up to par) and how about going back and forth visited pages using only one or two fingers (z and x). so what if i have to sacrifice a little screen estate for some ads? give me something that will surpass opera's ease of use and speed and im willing to replace it in my heart. Very Happy ciao! pantropik Frequent user Joined: 26 Jun 2002 Posts: 58 Location: Florida, USA Post Posted: Fri Aug 23, 2002 6:39 pm Post subject: _________________________________________________________________ Actually, I've used Opera and I did like the mouse gestures. Basically, Konqeror works for me and I'm just too lazy to use Opera (even though it's arguably better) when Konq is right there, it's set up as the default, etc. Hmmm .... I think I just demonstrated perfectly why Internet Explorer (being "right there" and the default in Windows) took over the web. It doesn't matter to a lot of people what's "better", just what's THERE. As for the ads in Opera, there's only one and it's totally unobtrusive. And once you head over to Options and customize the advertising the ads it does display are generally pretty relevant instead of the random crap you have to stare at all over the web. Not to mention the fact that if you have 10 Konq windows open and Konq crashes, you're just out of luck. If the same thing happens in Opera you can restart (usually) with all your windows open again where you left off, which is very cool. Joe Newbie Frequent user Joined: 22 Aug 2002 Posts: 38 Post Posted: Mon Aug 26, 2002 11:33 pm Post subject: _________________________________________________________________ Fast and easy try Dillo 6.6 @ http://dillo.cipsga.org.br/ Free with no ads. Editor's note: This thread was originally posted at the old MUB (Mandrake User Board at club-nihil). This post is the result of a 99% automatic backup, so due to its nature some text may be lost (improbable but possible).
  21. arusabal Moderator Joined: 17 Apr 2002 Posts: 836 Location: Spain Post Posted: Tue May 07, 2002 6:28 pm Post subject: Migrating partitions to reiserfs _________________________________________________________________ Migrating to reiserfs (tiny howto) This is just what I did some time ago when I migrated from ext2 to reiserfs, but it can be applied to any migration from one fs to another (except ext2 to ext3, which can be done in one step) Also this is my answer to a similar question in other thread, but since I feel that this info can be useful to some of you I've decide to put it here. The advantages of using reiserfs over ext2/ext3 are obvious: Speed improvement, better usage of disk space (with saves than can vary from 10-40%), journaling, enhances of security, fs encryption available... Check the http://www.namesys.org page, the home page of the reiserfs project, for any info you might need. Follow this steps at your own risk if you want to migrate a partition from ext2 to reiserfs. Be sure that you understand all those steps, what they do and what are its potential risks: This is an example of migrating a partition (ie /usr, which could be /dev/hdb5 in your partition table) from ext2 to reiserfs: 1. Change to run level 1: Code: ~]# init 1 2. Copy all the files of the /usr directory to somewhere where you've got enough space. You need to keep the structure and the attributes of the archives, so use the option -a: Code: ~]# /bin/cp -a /usr /tmp/ Doing that you'll create a new dir: /tmp/usr which will hold all the /usr files. 3. Format the /dev/hdb5 partition (/usr) using mkreiserfs: Code: ~]# /sbin/mkreiserfs /dev/hdb5 Now there is no way back Twisted Evil 4. Edit the /etc/fstab file to tell the mount system that now that partition is reiserfs and not ext2... This step is as easy as changing the word ext2 to reiserfs in the /dev/hdb5 line. Also you may want to change the 5th and 6th parameters to 0 0. 5. Now remount the brand new reiserfs partition: Code: ~]# /bin/mount -a Or just (/bin/mount /dev/hdb5) 6. And at the end restore the /usr data: Code: ~]# /bin/cp -a /tmp/usr / After all is not as difficult as one may think at first, right? Wink Follow this steps if you want to migrate any of your partitions to reiserfs. BUT DON'T DO IT, if you try to migrate the root partition, that's very, very dangerous, and you MUST know what you are doing... so to avoid damage I won't tell you how to do it (just a clue... boot from the cdrom and be sure that all the needed commands are available from the CD) Happy hacking (use this info at your own risk) http://comic.escomposlinux.org (sorry I couldn't resist!) Editor's note: This thread was originally posted at the old MUB (Mandrake User Board at club-nihil). This post is the result of a 99% automatic backup, so due to its nature some text may be lost (improbable but possible). Edited: the comic-image has been reposted and I've done some little editing ;)
  22. ramfree17 Moderator Joined: 18 Apr 2002 Posts: 1262 Location: Philippines Post Posted: Wed Aug 14, 2002 4:50 pm Post subject: Reinstalling operating systems in 5 minutes. _________________________________________________________________ use partimage. the one included in 8.2 DE works just fine. i recently acquired a 60GB maxtor (keep your mouth shut JM, i think i read from somewhere how you feel about maxtor drives Very Happy ) that corrupts windows (yey!). unfortunately windows couldnt be driven off in this pc so i will have to reinstall it and waste a few hours in the process. why not image it? and so off i go... - make sure that you have re-installed your other os on the most 'pristine' but usable state that you could. in my case it was loaded with updated drives, zonealarm, MS office, opera and an antivirus making them all installed in drive c (/dev/hda1). - reinstall your bootloader. that frigging os wiped it again and im making sure it does it for the last time. Twisted Evil . use your installation disc to mount a rescue kernel and reinstall your favorite bootloader (LiLo in my case). - log-in, su to root (NEVER, and i mean absolutely NEVER log in as root!) and unmount the partition that you will image Code: # umount /mnt/win_c or Code: # umount /dev/hda1 . (make sure you have installed the partimage when you do the next step. Very Happy ) - issue Code: # partimage -M -d save /dev/hda1 /path/to/saved.image meaning * -M means you wont backup the MBR. this makes it work for me and omitting this one produces an error. * -d means no comments. omit this one if you are the forgetful type. * save is the partimage directive * the other two parameters is the target partition and destination file. now for the fun part: restoring the image - log-in, su to root (NEVER, and i mean absolutely NEVER log in as root!) and issue the following Code: # partimage restore /dev/hda1 /path/to/saved.image/code] you could read the manpage of partimage (recommended action as it is a short manpage. Smile )for more options but the one i did restored the image in about 3 minutes. and i dont have to hunt for the installation discs just to reinstall the bootloader! Cool ciao! [color=red] [b]DOlson[/b] Moderator Joined: 16 Apr 2002 Posts: 2393 Location: Canada Post Posted: Wed Aug 14, 2002 10:25 pm Post subject: Re: Reinstalling operating systems in 5 minutes. _________________________________________________________________ [/color] Uhhh... Maxtor drives work just fine for me, but then JM probably thinks WD drives are the best thing since induced vomitting... Anyhow, all jesting aside, this is very similar to Norton Ghost, but I am just wondering if I can make a bootdisk with this program on it, so that I can just boot from a disk or CD and reimage my drive that way. If not, then how are you supposed to backup your Linux install, since you can't unmount it while it's running? But maybe this is all in the manpage. Sometime, I may give this all a go and post a quick tutorial on my website because I am still a huge fan of Norton Ghost, and have never thought to look for an alternative... Anyhow, ttyl. [color=red] [b]spider[/b] Frequent user Joined: 21 Jul 2002 Posts: 65 Post Posted: Thu Aug 15, 2002 3:54 am Post subject: _________________________________________________________________ [/color] but when I used partimag to backup my root partition which is 3.5G, it took me about an hour! I use bz2 compression. is that the reason? [color=red] [b]cannonfodder[/b] Moderator Joined: 16 Apr 2002 Posts: 1056 Location: Rochester, NY, USA Post Posted: Thu Aug 15, 2002 4:10 am Post subject: _________________________________________________________________ [/color] DOlson, take a peek at the download page for partimage and you will see a link to a downloadable ISO image containing partimage... [color=red] [b]ramfree17[/b] Moderator Joined: 18 Apr 2002 Posts: 1262 Location: Philippines Post Posted: Thu Aug 15, 2002 4:23 am Post subject: _________________________________________________________________ [/color] [b]spider wrote:[/b] [i]but when I used partimag to backup my root partition which is 3.5G,it took me about an hour! I use bz2 compression. is that the reason? [/i] hehehe, the title is [b]Reinstalling[/b] which i think implies restoring from backup. Wink and yes, bz2 compression is the slowest. using gzip compression is acceptable though (tradeoff between speed and image size). [b]ScapeGoats wrote:[/b] [i]Anyhow, all jesting aside, this is very similar to Norton Ghost[/i] that's the idea. but doesnt norton ghost require you to boot in dos or something ( i havent use it, and using partimage was my first try at imaging so that's a statement on how easy its usage is Very Happy )? if that is the case then ill stick with partimage since the mess-up with my harddrive cant touch my linux system Cool and i can restore windows from there. ciao! [color=red] [b]spider[/b] Frequent user Joined: 21 Jul 2002 Posts: 65 Post Posted: Thu Aug 15, 2002 8:12 am Post subject: _________________________________________________________________ [/color] Thanks , it's the point Wink [color=red] [b]DOlson[/b] Moderator Joined: 16 Apr 2002 Posts: 2393 Location: Canada Post Posted: Thu Aug 15, 2002 10:45 am Post subject: _________________________________________________________________ [/color] I use Norton Ghost to restore my Windows partition. This keeps Grub in my MBR. Works great. But Partimage is sounding nice... Gonna get that ISO. Thanks cannonfodder! [color=red] [b]cannonfodder[/b] Moderator Joined: 16 Apr 2002 Posts: 1056 Location: Rochester, NY, USA Post Posted: Sun Aug 18, 2002 2:40 am Post subject: _________________________________________________________________ [/color] Your welcome Smile I believe partimage supports MBR restoring. Gotta warn you all though, there have a been a few times where I've restored a win2k and it wouldn't work. Not sure why. Same partition/hard drive. [color=red] [b]michael[/b] Frequent user Joined: 14 Jul 2002 Posts: 92 Post Posted: Sun Sep 01, 2002 8:50 pm Post subject: maxtor HD 60gb it ...!! _________________________________________________________________ [/color] I have maxtor 60gb it work find with me and I have no problem with it. [color=red] [b]ramfree17[/b] Moderator Joined: 18 Apr 2002 Posts: 1262 Location: Philippines Post Posted: Sun Sep 01, 2002 9:37 pm Post subject: Re: maxtor HD 60gb it ...!! _________________________________________________________________ [/color] linux runs fine but windows barfs every now and then. Smile ciao! [color=red] [b]Vdubjunkie[/b] Newbie Joined: 07 Sep 2002 Posts: 19 Post Posted: Sat Sep 07, 2002 11:46 am Post subject: _________________________________________________________________ [/color] Twisted Evil Maxtor, WD, Seagate, IBM, Quantum are all very good drives. Drives have come a long way! However, I mean for your life, STAY AWAY from FUJITSU drives like the life of your OS and/or data depended on it.. it does! by the way.. on the subject. thanks for pointing out this util. Will have to check it out. [color=red] [b]ramfree17[/b] Moderator Joined: 18 Apr 2002 Posts: 1262 Location: Philippines Post Posted: Mon Sep 09, 2002 3:40 pm Post subject: _________________________________________________________________ [/color] this is where it is stated that your mileage might vary. if some has found WD drives very good, i for one find fujitsu drives fairly good. i still have my 2GB fujitsu drive that serves as my portable floppy from and to work. i dont own a car and commute (and in here that means a lot of tension on the drives) and the drive is still fine. its been with me for 4 years now... ciao! [color=red] [b]cybervegan[/b] Newbie Joined: 10 Oct 2002 Posts: 6 Location: Wirral, UK Post Posted: Mon Oct 14, 2002 6:36 pm Post subject: What about DD? _________________________________________________________________ [/color] I have used DD to do this kind of thing successfully for years. Proably doesn't have all the features of partimg but does the trick: to backup an entire disk drive image to tape (or another disk for that matter)... dd if=/dev/hda bs=1048576 of=/dev/st0 to restore from backup... dd if=/dev/st0 bs=1048756 of=/dev/hda If you want to get smart, you can do: dd if=/dev/hda bs=1048576 | gzip > /dev/st0 gunzip < /dev/st0 | dd if=/dev/st0 bs=1048756 of=/dev/hda works for me! [i][b]Editor's note:[/b] This thread was originally posted at the old MUB (Mandrake User Board at club-nihil). This post is the result of a 99% automatic backup, so due to its nature some text may be lost (improbable but possible).[/i]
  23. delboy711 Senior user Joined: 03 May 2002 Posts: 412 Location: Wokingham, UK Post Posted: Mon Aug 05, 2002 9:48 pm Post subject: Finding Files with slocate _________________________________________________________________ Old Linux/Unix hands will already know this one, but it is so darned useful to newbies that it justifies a Tip. Most newbies (me included) assume the best way to find a file is to use the Tools>Find File facility in konqueror, and are then disappointed at how long it takes to find a file. In fact the best file locator is a command line utility called 'slocate' To use it, install the slocate RPM (ML8.2 Powerpack users have a problem here because it is not on your CDs. Go to www.rpmfind.net and download it) Now in a terminal enter su to become root then :- updatedb This will create a database of every file on your computer. A cron job will be run daily automatically to keep the database up to date, so you will only be able to find files created before you switched your computer on in the morning. To find a file enter slocate string Any filename containing the string will be displayed almost instantly. You will never want to use a GUI based file locator again Very Happy Priest Newbie Joined: 28 Jun 2002 Posts: 4 Post Posted: Fri Aug 09, 2002 8:27 pm Post subject: _________________________________________________________________ 'locate' is also linked to slocate, so you can use locate file if that's easier arusabal Moderator Joined: 17 Apr 2002 Posts: 836 Location: Spain Post Posted: Sat Aug 10, 2002 10:01 am Post subject: Re: Finding Files with slocate _________________________________________________________________ delboy711 wrote: Now in a terminal enter su to become root then :- updatedb Also, you don't have to worry about that update because it is done automatically by cron every night at 4:00 am (/etc/cron.daily/slocate.cron) If do you think that such hour is a bit intempestive then change the default behavior editing the file /etc/crontab cannonfodder Moderator Joined: 16 Apr 2002 Posts: 1056 Location: Rochester, NY, USA Post Posted: Sat Aug 10, 2002 6:15 pm Post subject: _________________________________________________________________ Another useful feature of slocate (locate) is the ability to tell it to ignore specific file systems. For example, I have about 4 fat32 (vfat) partitions that contains stuff I don't need to search. Do a man slocate and look at the parameters to see how to do this.. remember a fat32 volume is vfat in linux. frew Senior user Joined: 01 Jun 2002 Posts: 214 Location: Mississippi Post Posted: Sat Aug 10, 2002 7:25 pm Post subject: _________________________________________________________________ I personally find s/locate the best "find" tool on linux. I want to emphasize this to n00bs to linux: use less gui's. I am glad my first box didn't have a lot of ram, that way it forced me to use command line tools. for instance: when I tried to use konquerer to uncompress a tar.gz it took over 2 hours (it was the kernel.) Fortunately I knew the man command and I did a man tar and figured out how to do it in a console, much faster, much better. I know this was kinda've a rant and off topic, but it is important for anyone in linux to learn to use basic tools like this. (No offence if you are not a n00b and you use a full on GUI) DOlson Moderator Joined: 16 Apr 2002 Posts: 2393 Location: Canada Post Posted: Sat Aug 10, 2002 7:42 pm Post subject: _________________________________________________________________ I agree frew. I use Blackbox for minimal gui, in fact, most of my file managing is all cli now too. But anyhow, updatedb is necessary if you install an rpm or whatever and then want to find a particular file right away. So remember BOTH commands, noobs. I usually just use slocate -u and locate. arusabal Moderator Joined: 17 Apr 2002 Posts: 836 Location: Spain Post Posted: Sat Aug 10, 2002 8:09 pm Post subject: _________________________________________________________________ I also agree with frew too DOlson wrote: But anyhow, updatedb is necessary if you install an rpm or whatever and then want to find a particular file right away. In that case there is a tool called 'find', which is one of the most powerfull tools that you can find in a linux system, that will find that particular file faster than rebuilding the db and then executing slocate [at least in an old PC like mine Sad ] DOlson Moderator Joined: 16 Apr 2002 Posts: 2393 Location: Canada Post Posted: Sat Aug 10, 2002 8:16 pm Post subject: _________________________________________________________________ Neat, but then why even use locate? I like locate. Smile arusabal Moderator Joined: 17 Apr 2002 Posts: 836 Location: Spain Post Posted: Sat Aug 10, 2002 8:33 pm Post subject: _________________________________________________________________ DOlson wrote: Neat, but then why even use locate? I like locate. Smile Also I like it Laughing I was talking in that 'particular case', when you are installing things Wink tobyl Frequent user Joined: 01 May 2002 Posts: 115 Location: UK Post Posted: Mon Aug 19, 2002 6:46 pm Post subject: _________________________________________________________________ the command whereis is pretty cool too, if you want to find where that executable lives. You get the full path, and it is v fast. paul Frequent user Joined: 30 May 2002 Posts: 145 Location: New Zealand Post Posted: Mon Aug 19, 2002 9:32 pm Post subject: whereis which _________________________________________________________________ which ... goes hand-in-hand with whereis ex: whereis sendmail which sendmail arusabal Moderator Joined: 17 Apr 2002 Posts: 836 Location: Spain Post Posted: Mon Aug 19, 2002 9:36 pm Post subject: _________________________________________________________________ tobyl wrote: the command whereis is pretty cool too, if you want to find where that executable lives. You get the full path, and it is v fast. Good point. In that contest I better like the command "which" because it just returns where is the executable inside you $PATH, vs "whereis" that returns the executable, the links to it, the source and the man pages of a command that must be within a given group of common binaries directories. The place where I find more useful the "which" command is in scripting, for example to test if a command is there and can be executed by the user that runs the script. Editor's note: This thread was originally posted at the old MUB (Mandrake User Board at club-nihil). This post is the result of a 99% automatic backup, so due to its nature some text may be lost (improbable but possible).
  24. tobyink Frequent user Joined: 08 May 2002 Posts: 185 Location: London, England Post Posted: Sun Aug 04, 2002 7:44 pm Post subject: A third tip from Toby! _________________________________________________________________ Following on from my uptime2png script and my freaky dial-up settings, here's another useful/useless tip. I am connected to the Internet via a measely dial-up. Boo hoo. I used to be on broadband, and I will be again some day, but until then I have to cope with a connection that cuts itself off every 2 hours and when it reconnects has a totally different IP address! This of course makes it hard for remote users. What I needed was a way for remote users to be able to easily find my IP address. First of all, we create a Perl script that looks at ppp0 and determines your IP address: Code: #!/usr/bin/perl $IFCFG = '/sbin/ifconfig'; $GREP = '/bin/grep'; $line = `$IFCFG -v ppp0 | $GREP "inet addr"`; $line = substr($line, 20); ($line, @rest) = split(/ /, $line); print "$line"; Pretty easy eh? Now, as root, save this as /root/get_ppp0_ip.pl. And then chmod 700 ~/get_ppp0_ip.pl. Now open up /etc/ppp/ip-up.local. If it's empty, add this line at the top: Code: #!/bin/bash Now, at the end of the file, add these lines: Code: sleep 2 /root/get_ppp0_ip.pl -d > /YOUR_MACHINE_NAME.txt echo "" >> /YOUR_MACHINE_NAME.txt echo "Last Updated:" date >> /YOUR_MACHINE_NAME.txt sleep 2 Obviously, replacing the file name with the name of your computer. Below this, you'll need to add a command to upload /YOUR_MACHINE_NAME.txt to your remote web server (which we assume has a fixed IP!!!) As in my last tip, ncftpput is your friend here. I am lucky enough to have a server with SSH access which means that I can use scp instead: /bin/su tai -c "scp /ophelia.txt coach:public_html/" (Ophelia is the name of my machine, coach is my web server.) Make sure that you use keys/saved passwords etc so that the script can upload the file!!! arusabal Moderator Joined: 17 Apr 2002 Posts: 836 Location: Spain Post Posted: Sun Aug 04, 2002 10:50 pm Post subject: Re: A third tip from Toby! _________________________________________________________________ For those who doesn't know perl or have personal affairs against it, I suggest: Code: $ /sbin/ifconfig | grep P-t-P | awk '{print $2}' | awk -F ":" '{print $2}' Or better: Code: $ /sbin/ifconfig | awk '/P-t-P/ {print substr($2,6)}' DOlson Moderator Joined: 16 Apr 2002 Posts: 2393 Location: Canada Post Posted: Sun Aug 04, 2002 11:49 pm Post subject: _________________________________________________________________ I did this already using PHP. I thought that I posted it before... I guess not. Anyhow, here's the URL: http://mdkxp.by-a.com/rpm/ipupdate.tar.gz It works great, and it even allows you to upload it to an FTP server so someone can just view an html page to find your current IP. Editor's note: This thread was originally posted at the old MUB (Mandrake User Board at club-nihil). This post is the result of a 99% automatic backup, so due to its nature some text may be lost (improbable but possible).
  25. michael Frequent user Joined: 14 Jul 2002 Posts: 92 Post Posted: Thu Aug 01, 2002 7:44 pm Post subject: Think twice? _________________________________________________________________ Hi ladies & gentleman! I you got email from someone never open in your computer,I`m going to library and open up there.There you will never get viruses,I never had a virus. Smile But I never get hacked into my computer. What I find out four months ago do not connect 24 hrs. into internet.That`s what happen with one guy Abbortsford B.C Canada.So stay away 24 hrs connectd in internet. Then your will be very Very Happy DOlson Moderator Joined: 16 Apr 2002 Posts: 2393 Location: Canada Post Posted: Thu Aug 01, 2002 8:10 pm Post subject: _________________________________________________________________ Yeah, good advice. Of course, you could just run Linux on your computer and never worry anyhow. And you will be very Very Happy for sure. DragonMage Senior user Joined: 01 May 2002 Posts: 391 Location: Hayward, CA Post Posted: Fri Aug 02, 2002 2:06 am Post subject: _________________________________________________________________ Heh, tell me about it.. It seems that the internet is getting more dangerous everyday. Just connected to the iinternet after almost a week of no dialup (the ISP is on the fritz). Since I just played NWN at the time, I said to myself.. let's try whether the ISP works today. It works but after downloading around 200 emails, I found out that 5 of them are infected with a virus (thank goodness for antivirus software with email checking). Never even have this problem when I am checking my email in linux. (heck, didn't even know whether those email are infected or not.. just delete them when it doens't make sense). So here's to running linux on desktop. If the frequency of email virus is similar to what I just experienced, mandrake 8.2 just save me around.. oh.. 120 days worth of virus Smile Glitz Senior user Joined: 02 May 2002 Posts: 507 Location: The Great White North Post Posted: Fri Aug 02, 2002 7:16 pm Post subject: _________________________________________________________________ You can also turn your computer off at night when you don't use it and save lots of electricity. I think that if most people used some common sense, then even windows viruses wouldn't be so bad. We get virus alerts regularly at my university (aprox. once every 2-3 months). I know I get lots of infected email (when you get 20 copies of the same email then you know something is not kosher). But you know, that delete key works great. And shift-del works even better (no need to clean out the trash can too). I haven't been infected with any of these viruses (using win98 and outlook express). It's the morons that download their email, find an interesting one from Timbucktwo (Sp?) and decide to be adventurous and open it (even if they've been told beforehand not to open the specific file). User: "You know that email you told us not to open, well I opened it. Can you fix my machine?" One day later... User: "You know that email you told us not to open, well I opened it again. Can you fix my machine again...please?" BTW, The above dialog is a true case (and the user wasn't me). And the power button on my machine still works fine, even though I turn it off every time I leave. Nope, it hasn't worn out yet Wink As for crackers, a good firewall helps a lot too. The moral of the story...if the people that only use their computers for email, wordprocessing, and games (95% of everyone) would not open strange emails from Timbucktwo (SP?), would turn off their machines when not using them (esp. at night) and possibly would use a half decent firewall, there would be a lot less viruses flying around out there, and a lot less brownouts (just kidding about the brownouts Wink ). Of course, the downside would be a lot of unemployed programmers from virus software companies. So maybe viruses have a good side too Wink Glitz. Editor's note: This thread was originally posted at the old MUB (Mandrake User Board at club-nihil). This post is the result of a 99% automatic backup, so due to its nature some text may be lost (improbable but possible).
×
×
  • Create New...