Jump to content

aru

Members
  • Posts

    2022
  • Joined

  • Last visited

Everything posted by aru

  1. :lol: No, not in the first line of a script, there it tells the kernel which will be the interpreter that should run the script. cannonfodder and willisoften, those are patches to hide a problem but not its solution :wink:. The issue is that when you open a terminal (subshell) its environment variables (such as PATH and PS1) are inherited from its parent process; a normal terminal doesn't open a login shell, so it will only read ~/.bashrc but not the system profiles, inheriting most of its environment vars from its parent. So for PATH and PS1, there should be a parent process that had already started a bash login sesion, and thus read the /etc/profile /etc/bashrc ~/.bash_profile. For some reason(1), KDE doesn't start a bash login shell in its "launching process" at runlevel 5 (kdm), so the terminals you open can't inherit those environment variables, so they take their defaults. That's why I proposed that (limited) solution (after searching some KDE sites -- and as I don't use KDE I cannot test if it works or not). With that, I guess that doing that you'll ensure that at least is a bash login shell the one that is launching KDE. (1) security?
  2. I never started I just tried a couple of times and I disliked it a lot! Yes, that's one of the reasons. Others are (IMHO) versatility, speed (around 10 fold faster), and more control in what you are doing. (also making a couple of scripts to help you on that task isn't harder)
  3. Are you using KDE? If yes, then the answer is: edit /etc/X11/Xsession and replace the: #!/bin/sh with: #!/bin/bash -login This was widely discussed in the old board here: http://www.club-nihil.net/mub/viewtopic.php?t=5805 http://www.club-nihil.net/mub/viewtopic.php?t=6610 If you aren't using KDE, check that your login shell is bash [arusabal@localhost ~]$ awk -F: "/$USER/ {print $NF}" < /etc/passwd /bin/bash [arusabal@localhost ~]$ If there you see /bin/sh edit /etc/password and put /bin/bash in your user's line.
  4. IMHO you should go to /var/lib/urpmi/ and see which are the sources that you have; then remove those which you think that are useless (ie, old or duplicated sources) with urpmi.removemedia (see it's man page).
  5. I'm not sure (as I dont use urpmi), but it could be due because you didn't call urpmi with the update option, so instead of using the 'update' sources your urpmi was looking for all the available sources... again I'm not sure of this. I guess that you should do urpmi --update package even if "package" is not previously installed
  6. while installing you can press [ctrl-alt]-F1,F2,F3... one of those screens is for log events.
  7. check the mandrake errata page to see if something of that can apply to your hardware http://www.linux-mandrake.com/en/errata.php3
  8. Try something like this: urpmi.addmedia --update ftp_france ftp://ftp.lip6.fr:/pub/linux/distributions/mandrake/current/i586/Mandrake/RPMS with ../base/hdlist.cz see man urpmi.addmedia for further info and ofcourse edit your system crontab with something like this: 30 3 * * mon /usr/sbin/urpmi.update ftp_france ...to update the sources (which is useful if instead of the CURRENT distro you add the COOKER source of rpm packages)
  9. aru

    LILO config

    OK, this is how your /etc/lilo.conf should be: boot=/dev/hda compact # faster, but won't work on all systems, so if unsure, remove it. map=/boot/map vga=normal default=linux keytable=/boot/us-latin1.klt install=/boot/boot-text/boot.b # CHECK THAT THIS FILE EXISTS message=/boot/boot-text/message # CHECK THAT THIS FILE EXISTS prompt # For the text prompt timeout = 100 # Time before starting the default image (10 seconds) image=/boot/vmlinuz # See that I have removed the vga=??? label=linux root=/dev/hda9 initrd=/boot/initrd.img append="quiet devfs=mount hdd=ide-scsi" read-only image=/boot/vmlinuz label=failsafe root=/dev/hda9 initrd=/boot/initrd.img append="failsafe devfs=nomount hdd=ide-scsi" read-only other=/dev/hda1 label=windows table=/dev/hda other=/dev/fd0 label=floppy unsafe Now run /sbin/lilo -vt And if NO error is reported run: /sbin/lilo
  10. 1. and 2. Explain them that they are no more in Windows. Unix is another history and if they want to use it, they must understand at least the very basics. One these basics is that everything included devices is threatened as a file, so they must understand that to access them they need to attach those devices to the filesystem tree, and that is achieved with mount. Also IMHO they must "understand" and "know" the filesystem layout. It isn't harder, but if they don't even have interest... 6. This sounds me very close to the Windows philosophy: "Make the easy easy and the difficult impossible" Epilogue: A windows user in a Linux system is no more a windows user, and he must know that.
  11. I don't think so (I'm not an expert as I install the rpms the macho way, you know, when men where men, and so) but reading man urpmi.addmedia you can see: Do that for each one of the cds
  12. what if the connection fails? I suggest: if kppp -c xxx; then exec mozilla else echo 'couldn't connect!' fi or simplier: kppp -c xxx && exec mozilla || echo 'couldn't connect!' If the script is not supposed to end after starting mozilla replace the "exec mozilla" with "mozilla &"
  13. aru

    PID - how to get it?

    several ways, my favorite is (replace 'cupsd' with the name of the program you want to know its pid): [arusabal@localhost ~]$ ps aux | awk '/[c]upsd/ {print $2}' 1043 [arusabal@localhost ~]$ see "man ps". If you dont use the "[c]" at the awk expression (same with grep...) you'll get two pids, one for cupsd and another for awk. There are dozens of variants of the above command. as root you can do: pidof name as normal user you'll need to invoque the full path of pidof: [arusabal@localhost ~]$ /sbin/pidof cupsd 1043 [arusabal@localhost ~]$
  14. aru

    LILO config

    I'm not good in english either :wink: Ok, then do what I told you about the "boot=" parameter. That should make lilo your boot loader. Then, any changes you make (as those I suggest in my former post) should work.
  15. aru

    LILO config

    IMHO "boot=" should point to /dev/hda (where is the MBR) and /dev/hda9 is for the "root=" parameter, where is the linux partiton. Also, IMHO, init=3 should go to the append= section of a given image. But pointing lilo to the MBR means that you'll overwrite your current boot loader I don't understand what do you mean with non GUI, Are you talking about lilo stuff? or are you talking about login in text mode instead of XDM (gdm, kdm...). If the last is true, the only thing you'll need to do is to edit your /etc/inittab and replace: id:5:initdefault: with id:3:initdefault: I'm a bit confused about what you are trying to do :?
  16. aru

    LILO config

    Hi ramfree, first answer in this board AFAIK lilo can do three types of interactive boot (of course there is one non-interactive). - Text boot (similar to what you'll see if you press ESC at the LILO graphical screen) - Menu boot ( which is a *prety* text menu ) - Graphical boot, which is what mandrake runs by default
  17. Yes, you are right, so after learning a bit more about sed and following your advices, this is what I've ended to do: URL="www.club-nihil.net/mub/" for file in *search.php.html; do echo -e $( sed -n '/.*(viewtopic.php?t=[[:alnum:]]{1,5}).*topictitle..(.*)</a><.*/ { s//ntagn# 2: tagnt'${URL}'1 tagn/; s/(viewtopic.php?t=[[:alnum:]]{1,5})&(start=[[:alnum:]]{1,3})/nt'${URL}'1&2 tagn/g; p; }' < ${file} ) | grep tag | grep -v 'start=0' | sed 's/tag//g' done > TOPICS.TXT (the "tag" thing is just a trick ;) ) Now the output is: ... # HELP! i think either CPU / MEM Died!!: www.club-nihil.net/mub/viewtopic.php?t=7439 # lying low, sort of: www.club-nihil.net/mub/viewtopic.php?t=7070 # Please help a total newbie!: www.club-nihil.net/mub/viewtopic.php?t=7438 # Some Mandrake tutorials for newbies: www.club-nihil.net/mub/viewtopic.php?t=65 www.club-nihil.net/mub/viewtopic.php?t=65&start=15 www.club-nihil.net/mub/viewtopic.php?t=65&start=30 www.club-nihil.net/mub/viewtopic.php?t=65&start=45 # deno's point of view - again - about us (IMHO both boards): www.club-nihil.net/mub/viewtopic.php?t=7418 # [b]It's a nightmare[/b]; will I ever wake up? Can you help?: www.club-nihil.net/mub/viewtopic.php?t=7159 www.club-nihil.net/mub/viewtopic.php?t=7159&start=15 # Paketmanagement without X: www.club-nihil.net/mub/viewtopic.php?t=7395 ... Which is trivial to parse to make a decent HTML index page. To retrieve the files, do: [arusabal@localhost ~]$ while read url; do > if echo $url | grep www.club-nihil.net &> /dev/null; > then wget -E $url; fi; > done < TOPICS.TXT I noticed that the problem is still not *completely* solved, because very long treads are linked as: Goto page: 1 ... n-2, n-1, n I know that I can make an script to handle this, but who cares... I don't remember any *very-long* thread that I've ever posted-in that deserves such effort... and if there's any, it will be faster to do it by hand! :) Again, I had a lot of fun (and learned many things) :)
  18. The only weird thing is that I cannot find a way to download all the posts within a topic, seems that the php variable posts_per_page is set to 15 and I cannot figure out how can I pass to the url that I want ALL the posts!!! I'm too tired now to think clear. well at last I've saved *most* of my posts (402 threads) :P
  19. aru

    LILO config

    never tried, but check in /boot for a directory called 'boot-text': ls -d /boot/*/ /boot/grub// /boot/lilo-graphic// /boot/lilo-text// /boot/lilo// /boot/lilo-menu// in that directory must be a file named boot.b, which I imagine that is the one that should go on the 'install=' option I suggest you to try on your /etc/lilo.conf: install=/boot/boot-text/boot.b message=/boot/boot-text/message save the changes and run /sbin/lilo (from a close question at club-nihil)
  20. EXCELLENT!!! I've enjoyed a lot this post. OK, this is what I'll do to simplify a bit the work you proposed (with a single command, and without any previous steps) ;) Once the search pages are downloaded, as theYinYeti said, do: [arusabal@localhost ~]$ URL="www.club-nihil.net/mub/" [arusabal@localhost ~]$ sed -n "/.*(viewtopic.php?t=[[:alnum:]]{1,5}).*topictitle..(.*)</a><.*/ {s//$URL1 => 2/p;}" < 1search.php.html The output is: www.club-nihil.net/mub/viewtopic.php?t=7508 => How can one make VIM work/behave like old-fashioned vi? www.club-nihil.net/mub/viewtopic.php?t=7424 => THE BOARD IS DEATH!!! www.club-nihil.net/mub/viewtopic.php?t=7147 => THE BOARD WILL NEVER GO DOWN!!!! www.club-nihil.net/mub/viewtopic.php?t=7457 => weird raknk????!!! www.club-nihil.net/mub/viewtopic.php?t=687 => Mod Log www.club-nihil.net/mub/viewtopic.php?t=7439 => HELP! i think either CPU / MEM Died!! www.club-nihil.net/mub/viewtopic.php?t=7070 => lying low, sort of www.club-nihil.net/mub/viewtopic.php?t=7438 => Please help a total newbie! www.club-nihil.net/mub/viewtopic.php?t=65 => Some Mandrake tutorials for newbies ... ... [arusabal@localhost ~]$ As you see I've beautified a bit the output, just to see which is the thread name of each url. Redirect the output to a file, for example to topics.txt (same file name that theYinYeti used), and do it for each of the search.php.html pages you saved! (remember to use '>>' to append each output to the previously saved). Now you have a list of all the threads you ever posted in. Instead of do it that way, as my output has also the name of the thread, do this: [arusabal@localhost ~]$ while read line; do url=${line%% *} (## the url is everything until the first blank-space ##) wget -w 1 -E ${url} done < topics.txt me too! I'll try to download my posts tonight Thanks Ives, I've had a lot of fun and I have learned a couple of things :D
  21. aru

    Bash question

    a) first check that the login shell is /bin/bash instead of /bin/sh: [arusabal@localhost ~]$ awk -F: '/USER/ {print $NF}' < /etc/passwd /bin/bash [arusabal@localhost ~]$ Where USER is your user name (the one that shows that werid prompt) if it is /bin/sh, then change it to /bin/bash editing the file /etc/passwd B) Check /etc/bashrc, it must contain code referring to PS1 (variable that defines the pormpt) c) As a last resource, edit your user's .bashrc and place a something like this: PS1="[u@h W]$ " export PS1 Espero que mi respuesta le haya ayudado ;)
  22. dmesg | less --> if no "dmesg -c" was used before (that clears the buffer) or take a look to these log files: vi /var/log/messages ---> and go to the last time you booted your system vi /var/log/boot.log ---> the same vi /var/log/dmesg ... also on /var/log/kernel/* --> you'll find a lot of info
  23. check 'man mail' if you are talking about the '/bin/mail' if you mean to enable a mail server, I recomend you to use postfix. first you must check that you have it installed. Those are the packages I have (latex, tex and lyx <-- The last one is a WYSIWG interface to latex, very useful and very well self documented): [arusabal@localhost ~]$ rpm -qa | egrep -i "tetex|latex|lyx" tetex-afm-1.0.7-31mdk tetex-xdvi-1.0.7-31mdk tetex-dvips-1.0.7-31mdk lyx-1.1.6-8mdk tetex-1.0.7-31mdk tetex-latex-1.0.7-31mdk tetex-dvipdfm-1.0.7-31mdk lyx2html-0.2-2mdk latex2html-2000.1beta-4mdk [arusabal@localhost ~]$ As an example on how to proccess a TeX file (LaTeX): [arusabal@localhost ~]$ latex ejemplo.latex This is TeX, Version 3.14159 (Web2C 7.3.1) (ejemplo.latex LaTeX2e <2000/06/01> Babel <v3.7h> and hyphenation patterns for american, french, german, ngerman, i talian, portuges, spanish, swedish, nohyphenation, loaded. (/usr/share/texmf/tex/latex/base/letter.cls Document Class: letter 1999/04/29 v1.2z Standard LaTeX document class (/usr/share/texmf/tex/latex/base/size11.clo)) (/usr/share/texmf/tex/latex/misc/geometry.sty (/usr/share/texmf/tex/latex/graphics/keyval.sty) (/usr/share/texmf/tex/latex/config/geometry.cfg)) (/usr/share/texmf/tex/latex/base/fontenc.sty (/usr/share/texmf/tex/latex/base/t1enc.def)) (/usr/share/texmf/tex/latex/base/inputenc.sty (/usr/share/texmf/tex/latex/base/latin1.def)) (/usr/share/texmf/tex/generic/babel/babel.sty (/usr/share/texmf/tex/generic/babel/spanish.ldf (/usr/share/texmf/tex/generic/babel/babel.def))) (/usr/share/texmf/tex/latex/misc/setspace.sty Package: `setspace' 6.4 <1998/11/26> ) No file ejemplo.aux. Underfull hbox (badness 10000) in paragraph at lines 52--53 Underfull hbox (badness 10000) in paragraph at lines 52--53 Underfull hbox (badness 10000) in paragraph at lines 52--53 Underfull hbox (badness 10000) in paragraph at lines 52--53 Underfull hbox (badness 10000) in paragraph at lines 52--53 Underfull hbox (badness 10000) in paragraph at lines 52--53 [1] (ejemplo.aux) ) (see the transcript file for additional information) Output written on ejemplo.dvi (1 page, 2300 bytes). Transcript written on ejemplo.log. [arusabal@localhost ~]$ so from ejemplo.latex latex will produce the files ejemplo.aux ejemplo.log and ejemplo.dvi The last one, ejemplo.dvi can be viewed for example with "/usr/bin/xdvi" If you want to convert it to postscript to print it or to view it with "/usr/X11R6/bin/gv", you'll need to use "/usr/bin/dvips". For example, to print the file: [arusabal@localhost ~]$ dvips -t a4 ejemplo.dvi This is dvips(k) 5.86e Copyright 2001 Radical Eye Software (www.radicaleye.com) ' TeX output 2002.12.07:1316' -> |lpr <texc.pro>. [1] [arusabal@localhost ~]$ ...Or to save the postscript format into a file: [arusabal@localhost ~]$ dvips -t a4 ejemplo.dvi -o ejemplo.ps This is dvips(k) 5.86e Copyright 2001 Radical Eye Software (www.radicaleye.com) ' TeX output 2002.12.07:1316' -> ejemplo.ps <texc.pro>. [1] [arusabal@localhost ~]$ gv ejemplo.ps & # to view it. [1] 20541 [arusabal@localhost ~]$ ofcourse from dvi format you can also convert the file into pdf
  24. 6 out of 7. well, not too bad since I'm one of the "vi" side I also did wrong the 6th question :shock: Congratulations! You are a true geek and code monkey. Is that good?
×
×
  • Create New...