Jump to content

theYinYeti

Members
  • Posts

    2151
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by theYinYeti

  1. Thank you for the link, Paolo. It seems indeed to be an interesting tool.

     

    Note however that this is different from what I want to achieve. Our goals are different.

     

    What I want is neither a CMS, nor a blog system, nor a forum, nor a wiki, but rather a framework for easing the creation of a web site where the author retains control of everything. My framework is geared towards the creation of template-less content, with a strong focus on accessibility, and CSS- and JS-reuse, on top of standard XHTML coding (although the latter is mostly the responsibility of the programmer). More over, the framework has modules which define building blocks, or components, that you can reuse and for which parameters can be defined. Those components help create some dynamic behaviour without having to tinker with PHP.

     

    Example : Here is a simple site I created for managing a news service for my team, along with the corresponding RSS feed.

     

    I created the site map first — /index.map:

    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <site id="project-news" author="Yves" email="XXXXX@XXXXX"
     xmlns:xi="http://www.w3.org/2001/XInclude">
    
     <ol name="mainmenu">
    <label lang="en">Main menu</label>
    <link rel="chapter" />
    <li name="see-news" path="/see-news">
      <label lang="en">Display project news</label>
    </li>
    <xi:include href="/_easy/mod/news.map" />
     </ol>
    </site>

    and /_easy/mod/news.map, provided by the “news†module, which I modified to my taste (name and label):

    <li name="add-news" path="/_easy/p/news">
     <label lang="en">Publish a news item</label>
    </li>

    I created the home page — /index.php, the easiest part :) :

    <?php require_once('_easy/init.php'); ?>

    and the “display†page — /see-news.en.php:

    <?xml version="1.0" encoding="UTF-8" ?>
    <html><head>
    
    <title>Project news</title>
    
    </head><body>
    
    <easy:nav id="mainmenu" />
    
    <h1>Project news</h1>
    
    <easy:news src="project.news" feed="rss1" />
    
    </body></html>

    .

    Using the administration GUI provided by the “news†module, I created the mentionned project.news file (no need to know about XML, only forms are used), and now, when I visit /project/index.php (or /project/index.php?page=see-news, which is the same), I get:

    <?xml version="1.0" encoding="UTF-8" ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><head>
    
    <title>Project news</title>
    <link href="/project/index.php?page=see-news" rel="chapter" type="text/html" title="Project news" />
    <link href="/project/index.php?page=add-news" rel="alternate chapter" type="text/html" title="Publish a news item" />
    <link rel="alternate" type="application/rss+xml" title="Publication of the project news (English, RSS1)" hreflang="en" xml:lang="en" href="/project/project.news.en.rss1.php" />
    <link rel="stylesheet" type="text/css" media="screen" href="/project/_css/main.screen.css" />
    <link rel="stylesheet" type="text/css" media="screen" href="/project/_css/news.screen.css" />
    
    </head><body class="easy-index" id="project-news">
    
    <div class="nav" id="mainmenu"><a href="#nav-skip-mainmenu" class="nav-skip-source"><small>Skip "Main menu"...</small></a><dl>
    
     <dt>Main menu</dt>
     <dd><ol class="nav-list">
    <li class="nav-current"><strong><a href="/project/index.php?page=see-news">Project news</a></strong></li>
    <li><a href="/project/index.php?page=add-news">Publish a news item</a></li>
     </ol></dd>
    </dl><a id="nav-skip-mainmenu" class="nav-skip-target"> </a></div>
    
    
    <h1>Project news</h1>
    
    <div class="news"><dl>
     <dt title="Publication of the project news">Project news <a class="feed-link rss1-link" href="/project/project.news.en.rss1.php" title="Publication of the project news (English, RSS1)"><img src="/project/_img/rss1-feed.png" alt="RSS1" width="40" height="15" /></a></dt>
     <dd><ol class="news-items">
    <li class="news-item"><cite class="news-source">Documentation <span class="news-date"><span class="default-time" title="English time">Wed 29 Apr 2009</span></span></cite>
      <q class="news-item-summary">OpenOffice</q>
    
      <blockquote class="news-item-text"><p>Please all upgrade your version of OpenOffice.</p></blockquote>
    
    </li>
     </ol></dd>
    </dl></div>
    
    
    </body></html>

     

    You can see the huge difference between what is in the file, and what is produced.

     

    Yves.

     

    (Edit: All has been edited for privacy reasons, of course. Please excuse me if I wrote mistakes in the process)

  2. I don't know if this will help but I've noticed on my PC in 2009.1, that the sound driver is causing issues with all video playback. Although my soundcard is driven by the alsa driver, neither alsa nor pulse are suitable for a good playback : I have to use the oss driver!

     

    Yves.

  3. You may be able to open a docx document with Go-OO's OpenOffice2.4 (the one that used to be in Mandriva before Go-OO's OpenOffice3) by renaming the file with the “.xml†extention instead. I open OOXML Excel files this way.

     

    Yves.

     

    (There's a bug with column “Z†in Calc though… don't ask me why…)

  4. anyway, Yves, thankyou for your quick answer and help!

    You're welcome :)

     

    If you went as far as the text-mode login prompt, then the distribution does work. But you have a problem with the graphical aspect of it. Things you could try (still at runlevel 3):

     

    — First, configure your Xorg to use VESA: in text mode, as root, start drakx11, and for the graphics card, choose “Xorg|Vesaâ€.

     

    — Now, run “Xorg†(just that, no parameters): if your X11 config is OK, then you should be able to quickly move your mouse pointer on the screen. Hit CtrlAltBackspace, or CtrlAltF1 and CtrlC, and the experiment will stop.

     

    — If the previous step was OK, two things can be attempted: either you try and revert Xorg to the correct video driver, and run the experiment again, or (still with VESA) you urpmi icewm-light, and you try and run that:

    # Xorg &
    # export DISPLAY=:0
    # icewm-light &

    This should enable you to have a working minimal X11 session on CtrlAltF7. You can stop it by killall Xorg.

     

    — If all goes well, you could try and run IceWM using the correct video driver, and if all still is OK, then try and use a simple “startx /usr/bin/icewm-light†instead of the tedious X & export DISPLAY & icewm-light as above.

     

    Tell us the results you have.

     

    Yves.

  5. I guess I'm not as tidy as Ian :)

    I have “1: Miscâ€, “2: Misc that I start and is not related to Miscâ€, “3: Misc that I start and is neither related to Misc nor to Misc that I start and is not related to Misc†and “4: Everything elseâ€.

    On occasion, I would have liked a 5th desktop but it's rare enough so I did not bother.

     

    Basically, those desktops help keep things organized, or looking like they are. Each desktop is a thread of activity, and I switch task when one thread is waiting on IO. Well… I guess my desktop is quad-core :D

     

    Yves.

  6. Hello,

     

    I just did something I thought would be much harder to do, so here I share it, so that you know:

    1/ it can be done,

    2/ it is not that hard :)

     

    I wanted to resize the server's LVM partitions, those being /, /home, /var, /usr, /tmp, and /data, in this manner: all partitions had to shrink as much as reasonable, so that /data could grow as much as possible.

    Constraints:

    — I only have remote SSH access, so all must be done on the live system (online).

    — All partitions initially ReiserFS, but I'm not against trying JFS or Ext3 (XFS heavier on the CPU, or so says the Internet… and the CPU is an old PIII).

     

    Initial situation:

    / and /home much too big (1GB available, where disks are 8GB in size)

    /home barely used (this server is now mostly for anonymous/ro SMB access)

    /usr, /var and /tmp slightly over-sized (especially /tmp)

    /data emptied from previous usages of the server, ready for its new mission.

     

    As it happens, let me say staight away that my biggest surprise was that MCC (diskdrake) manages LVM transparently and does it well!

     

    1 - Shrink /

    This is the only thing that I couldn't find a way to do. ReiserFS can be growed online, but not shrinked, and / cannot be unmounted…

     

    2 - Remove /home

    Problem: I remotely connect with SSH, so /home is used.

    Solution: Just for once, allow remote login for the root user.

    I did so (/etc/ssh/sshd_config), restarted sshd, logged out, and back in using root.

    Then it's all easy: move /home/* to /, then (with diskdrake) umount and destroy /home, and finally move back /home's former content from / to /home/ (directory, not mount point).

    At that point, don't revert yet the change in /etc/ssh/sshd_config about allowing root to login.

     

    3 - Shrink /var and /tmp

    These were the easiest.

    First look for processes that use the partitions with

    lsof | grep /var
    lsof | grep /tmp

    Then kill/stop the processes/services that are reported (included sshd if needed; don't forget to restart it after the resize is done).

    All else is done with diskdrake: unmount both partitions, shrink them, mount them again.

     

    4 - Shrink /usr

    This was the trickiest bit. /usr is used by diskdrake, and used by localisation, and numerous other running services (among which is sshd), not forgetting lsof itself.

    Still, it can be shrinked :)

     

    You have to login remotely as root (see the /home part) so as to limit the number of processes using the /usr partition.

     

    step A - First, being cautious, I stopped all I could find that was using /usr. To limit the output of lsof, I forced the shell and the commands I ran to a locale-less mode:

    LC_ALL=C exec bash
    LC_ALL=C lsof | LC_ALL=C grep /usr | LC_ALL=C grep -v '^lsof'

    As before, kill/stop the processes/services that are reported (included the sshd service if needed; I reboot soon anyway; just don't logout before the reboot is done).

    The only thing I did not remove (I would have been locked out of the system) was the sshd process allowing me to work remotely.

     

    step B - Next, I copied the whole /usr contents to /data/usr (the only place big enough for such a big content):

    cd /
    tar -cf --one-file-system --force-local usr | (cd data && tar -xvf - --numeric-owner --atime-preserve --preserve --same-owner --force-local)

    Some options may be superflous, but this is the command I use when I want as exact a copy as possible.

     

    step C - Then, I lazilly unmounted /usr and quickly replaced it with a working equivalent:

    cd /
    LC_ALL=C umount -l /usr
    LC_ALL=C mv usr usr.old
    LC_ALL=C ln -s data/usr usr

    I then edited /etc/fstab so that the /usr mount point becomes /usr.old instead, and rebooted (“reboot†command).

     

    step D - With root login still allowed, I logged in as root, and re-did step A.

    Then I ran “diskdrake†to unmount /usr.old and shrink it. In my case, as I spotted a corrupted directory at the whole-copy-with-tar stage, I also changed the FS type to Ext3 (just to see if it allowed online shrinking: it does not), and formatted with disk check. /usr.old must then be mounted again.

    Back at the command-line, I put the data back in the partition:

    cd /data/usr
    tar -cf - --one-file-system --force-local . | (cd /usr.old/ && tar -xvf - --numeric-owner --atime-preserve --preserve --same-owner --force-local)

    Finally, I edited /etc/fstab so that /usr.old becomes /usr again. And I ran these commands:

    cd /
    umount usr.old
    rm -f usr
    mv usr.old usr
    reboot

     

    4 - Grow /data

    That's the easiest part. If you went that far, no more explanations are needed. It can even be done online with ReiserFS, in theory.

    I did not do it online, though, because I took the opportunity to try and format this partition with JFS, just to see if it allowed online shrinking: it does not. diskdrake doesn't even allow offline resizing with this filesystem! I switched back to ReiserFS.

     

    At this stage, two last things can be done:

    — revert the change on /etc/ssh/sshd_config so that remote root login isn't allowed anymore;

    — “rm -rf /data/usrâ€, unless you formatted the partition.

     

     

    That's all. I hope this will help others.

     

    Yves.

  7. For some background, let me say that I, too, was never keen on using a sound server such as esd or arts. These always gave me problems, and gave nothing in return (as you say, alsa is enough by itself for earing multiple sources). Besides, I've never wanted to listen to multiple sources at the same time, up to recently. All in all, sound servers appeared to me as a waste of precious resources.

     

    And then three things happened:

    — I moved and the PC is now in the living room (I moved to a smaller place);

    — I changed the hardware from a PII350 with 384MB RAM to a Dual-Core with 2GB RAM;

    — I upgraded to Mandriva 2009.0.

     

    I discovered PulseAudio with Mandriva 2009.0, and I was lucky enough not to have problems with it, as I know many others did.

    With this version, I already saw two benefits with the PulseAudio-related control panels:

     

    I can easily (GUI) (un)mute any single application with the provided panel. This is handy when I listen to a conference on Internet for example, and don't want to be disturbed by the sounds of the game I play in the meantime when things being said aren't that much interesting; or to quickly switch the sound off without interrupting the game when the telephone is ringing.

     

    And also, there's a slider for each application playing sound, so that I can choose each playback level. I use this for example when I play music from Internet for the whole room to enjoy, but still wish to have some feedback sound from my game, though at a faint level I'm the only one taking notice of.

     

    Now I upgraded to 2009.1 (cooker) and I also start recording TV/tapes.

     

    With this version, there's the additionnal benefit of seeing in real-time, alongside the sliders, a vu-meter (right word? ie: sound level) for sound playback (so I can see applications that are currently actually outputting sound), AND for input too, so I can adjust the slider to avoid the recorded sound to saturate (too loud).

     

    Well, that's all, but that's enough for me, especially now that CPU power isn't that much a problem for me any more.

     

    Yves.

  8. So… It took me longer than I thought, but I did test your suggestion, Greg2, and… it works :)

     

    Still, there is something strange with Mandriva 2009 (and now 2009.1).

    I first tried buffersize=50, and then 100, and then 1000. But although the result was immediately better, there were still skipped framed as well as duplicate frames, more than I'm used to. Then I tried buffersize=0, which told me the minimum was 16, so I tried buffersize=16 and the result was the same. I changed the channel on the TV modem (or whatever it is called: ADSL TV box), and then there were less skipped/duplicate frames.

     

    What is strange is this: if the result is good enough (no “video buffer fullâ€) with buffersize's value all the way from 16 (minimum) to 1000 MB (half my RAM), then what could possibly be the default value for mencoder to fail without this option?

     

    One more thing: if I try and use v4lctl to control /dev/video0, I get the message “no grabber device available†and failure of course. Similarly, I get an error if I try and use ffmpeg directly! Only mencoder seems to be able to get something out of the card, where previously almost any tool could.

     

    By the way, wether PulseAudio is enabled or not seems not to make any difference, and I'm glad it is so because I like this tool more and more.

     

    Yves.

  9. Did you try any of the “standard†workarounds at install-time, such as noapic and/or nolapic ?

     

    Someone here seems to have a similar problem, and says using the “VESA option†solved the issue for him, although he has to wait at each boot…

     

    This seems to be a rare and troublesome problem! Maybe you should try and file a bug at qa.mandriva.com (after having checked that the problem is still in Mdv Cooker/2009.1) with as much detail as you can come up with.

     

    Yves.

  10. Recording with PulseAudio disabled does not help.

    I will however run all further tests without PulseAudio, and then enable it back when I have something working (I use a lot the possibility to swith off sound for a single application).

     

    So back to square one: what could make mencoder fail even without pulseaudio?

     

    Yves.

  11. [EDIT: Sorry, I just tried uploading.com for the first time; it is awful! Do you know of a better alternative?]

     

    I moved the TV capture card from “salon†to “sedentaireâ€. And I kept the same recording method (same command line). Basically, here's what I do:

    mencoder tv:// -tv driver=v4l2:device=/dev/video0:input=1:width=384:height=576:fps=25:norm=PAL:normid=5:audiorate=48000:alsa=1:amode=1:immediatemode=0 -aspect 4/3 -ofps 25 -oac copy -ovc lavc -lavcopts vcodec=mjpeg:vqscale=2:aspect=4/3 -o test.avi

    This command-line is so far tailored to the limited power of “salonâ€, but before changing it for the more powerful “sedentaireâ€, I'd like to achieve using it as is. But the result I get is this:

    http://uploading.com/files/UWVCEZY1/test.avi.html

     

    I can't see what's wrong. All I know is this:

     

    If I look at the TV like this:

    mplayer tv:// -tv driver=v4l2:device=/dev/video0:input=1:width=384:height=576:fps=25:norm=PAL:normid=5:audiorate=48000:alsa=1:amode=1:immediatemode=0 -aspect 4/3

    I get the exact same behaviour. And the standard output spits loads of:

    video buffer full - dropping frame

     

    video buffer full - dropping frame

     

    video buffer full - dropping frame

    A: 2.6 V: 2.6 A-V: 0.069 ct: 0.000 12/ 12 0% 0% 0.0% 0 0

    video buffer full - dropping frame

     

    video buffer full - dropping frame

     

    video buffer full - dropping frame

    A: 2.8 V: 2.6 A-V: 0.195 ct: 0.000 12/ 12 0% 0% 0.0% 0 0

    video buffer full - dropping frame

    A: 2.9 V: 2.7 A-V: 0.250 ct: 0.000 14/ 14 0% 0% 0.0% 0 0

    video buffer full - dropping frame

     

    video buffer full - dropping frame

     

    If, on the other hand, I change the immediatemode to 1, then playback is OK, but immediatemode to 1 is not suitable for recording…

    What can I do? The only differences (apart from the difference in processing power) I can see are those: “sedentaire†is dual-core and uses PulseAudio, while “salon†is mono-core and alsa only.

     

    Also note that I did manage to use mencoder on “sedentaire†a while back (Mdv 2007.1 or 2008, I don't remember). So, an idea?

     

    Yves.

×
×
  • Create New...