title: Running cron.daily in parallel

text: Being able to put a script in /etc/cron.daily is really nice because I can do it easily from a configuration management system or a package. However, my understanding is that all the entries in /etc/cron.daily will run sequentially. How can I make a script in /etc/cron.daily not hold up the other tasks? Would something like the following work?               #!/bin/bash     #do something long:     nohup sleep 1000000000 &;#instead of sleep, this could point to another script that takes a while to execute


title: Ubuntu Linux Router: Set outbound NAT on 2 interfaces

text: I'm setting up a router using Ubuntu 12.04. I need my router to route between our internet modem and my client's network, for which we're given one IP address. The box has 3 interfaces:   1. eth0 - port to client's network. Configured using static IP.   2. eth1 - our LAN. Configured as static IP 192.168.1.1 and serving DHCP/DNS.   3. eth2 - uplink to 3G router modem. Configured as DHCP client. My /etc/network/interfaces looks like:               # The primary network interface     auto eth2     iface eth2 inet dhcp          # LAN point to our client's network     auto eth0     iface eth0 inet static     address 10.198.250.171     #gateway 10.198.0.4     netmask 255.255.0.0     network 10.198.0.0     broadcast 10.198.255.255     hwaddress ether 00:1E:EC:72:ED:92          # eth1 acts as our LAN's router IP     auto eth1     iface eth1 inet static     address 192.168.1.1     netmask 255.255.255.0     network 192.168.1.0     broadcast 192.168.1.255      I've configured eth1 to serve as DHCP and configured NAT from my LAN to internet as follows in /etc/rc.local:               # IP forwarding script from our LAN to internet     /sbin/iptables -P FORWARD ACCEPT     /sbin/iptables --table nat -A POSTROUTING -o eth2 -j MASQUERADE      In order to access my client's LAN (which is a private class A network), I've configured a static route as follows:               up route add -net 10.0.0.0/8 gw 10.198.250.171 dev eth0      Thus far, I can ping and access my client's LAN from the router itself, but from any of my LAN clients, I cannot get the router to route to my client's LAN. Can anybody advise what else I need to do? Do I need to set outbound NAT for both eth0 and eth2? Any advice much appreciated.


title: Is is possible to use KDE as well as Gnome on a machine?

text: Is it possible to install KDE and Gnome on your machine (using Fedora) in such a way that when you boot, you can specify whether you want to use KDE or Gnome. Even better would be if you can switch between the two without having to reboot. I think it should be possible. How can I do this?


title: Any reason an HP C7499A DVD ROM shouldn't work on an old Sun Ultra Enterprise II?

text: I'm trying to switch from a CD-ROM to a DVD-ROM on an old Sparc Ultra Enterprise II. I got this C7499A but I can't seem to access anything on it. I thought that since it's SCSI it should work even though DVD's weren't around when this Sparc was made. Is it probable that the drive is just bad?


title: Package manager for AIX

text: While installing Subversion on AIX (version 7.1) from the official site, there are dependencies I need to resolve first before I can proceed to install the subversion package. While installing the dependencies package, there are a bunch of other dependencies package are needed to be download and install as well. Is there a program for AIX that could automate the installation process? Something like `apt-get` on Ubuntu.


title: How to Fix Choppy Video Playback in Ubuntu?

text: On Ubuntu 10.04 I experience choppy video playback. I am running Mplayer and have an Nvidia GeForce 9800 GTX+ video card. I have already installed the `libvdpau1` library. I don't know if hardware acceleration is enabled on my video card or if it is supported. Can anyone provide suggestions on how to decrease the choppiness? Here is my `xorg.conf` file:               # nvidia-settings: X configuration file generated by nvidia-settings     # nvidia-settings:  version 1.0  (buildd@yellow)  Fri Apr  9 11:51:21 UTC 2010          Section "ServerLayout"         Identifier     "Layout0"         Screen      0  "Screen0" 0 0         InputDevice    "Keyboard0" "CoreKeyboard"         InputDevice    "Mouse0" "CorePointer"         Option         "Xinerama" "0"     EndSection          Section "Files"     EndSection          Section "InputDevice"         # generated from default         Identifier     "Mouse0"         Driver         "mouse"         Option         "Protocol" "auto"         Option         "Device" "/dev/psaux"         Option         "Emulate3Buttons" "no"         Option         "ZAxisMapping" "4 5"     EndSection          Section "InputDevice"         # generated from default         Identifier     "Keyboard0"         Driver         "kbd"     EndSection          Section "Monitor"         # HorizSync source: edid, VertRefresh source: edid         Identifier     "Monitor0"         VendorName     "Unknown"         ModelName      "ACI ASUS VH236H"         HorizSync       30.0 - 85.0         VertRefresh     55.0 - 75.0         Option         "DPMS"     EndSection          Section "Device"         Identifier     "Device0"         Driver         "nvidia"         VendorName     "NVIDIA Corporation"         BoardName      "GeForce 9800 GTX+"     EndSection          Section "Screen"         Identifier     "Screen0"         Device         "Device0"         Monitor        "Monitor0"         DefaultDepth    24         Option         "TwinView" "1"         Option         "TwinViewXineramaInfoOrder" "DFP-0"         Option         "metamodes" "DFP-0: nvidia-auto-select +1920+0, DFP-1: nvidia-auto-select +0+0"         SubSection     "Display"             Depth       24         EndSubSection     EndSection


title: How to verify hardware acceleration settings on Nvidia GeForce 9800

text: How can I verify whether hardware acceleration is available and whether it is enabled for my video card. If it makes a difference I am using Ubuntu 10.04.


title: Which shell should I use - tcsh vs bash?

text: I have been using `tcsh` for a long time now. But whenever I am searching for something, I often find that the methods specified are `bash` specific. Even the syntax for the shell scripts is different for the two. From what I have experienced searching and learning on the internet, `bash` seems to be the more common shell used. Even the number of questions on this site tagged `bash` are way more (five times more currently) than the number of questions tagged `tcsh`. So, I am wondering whether I should switch to bash. What do you think? **Why should I stick to`tcsh` OR why should I move over to `bash`?**


title: Change scroll lines when use mouse wheels?

text: Is there a way to control how many lines will scroll, when you use the mouse wheels? It seems to be 5 lines by default, anyway to change this value? I didn't find it in xfce4-settings-manager


title: Problem updating to KDE 4.9.1

text: I wrote this on the terminal:               sudo yum -y update      [sudo] password for brallan:      Loaded plugins: auto-update-debuginfo, langpacks, presto, refresh-packagekit     Resolving Dependencies     --> Running transaction check     ---> Package akonadi.i686 0:1.7.2-1.fc17 will be obsoleted     --> Processing Dependency: libakonadiprotocolinternals.so.1 for package: kdepimlibs-akonadi-4.9.1-3.fc17.i686     --> Processing Dependency: libakonadiprotocolinternals.so.1 for package: 7:kdepim-4.9.1-1.fc17.i686     --> Processing Dependency: libakonadiprotocolinternals.so.1 for package: 1:kdepim-runtime-libs-4.9.1-1.fc17.i686     --> Processing Dependency: libakonadiprotocolinternals.so.1 for package: 1:kdepim-runtime-4.9.1-1.fc17.i686     --> Processing Dependency: libakonadiprotocolinternals.so.1 for package: 7:kdepim-libs-4.9.1-1.fc17.i686     ---> Package akonadi-mysql.i686 0:1.8.0-1.fc17 will be obsoleting     ---> Package ark.i686 0:4.8.5-1.fc17 will be updated     ---> Package ark.i686 0:4.9.1-1.fc17 will be an update     ---> Package ark-libs.i686 0:4.8.5-1.fc17 will be updated     ---> Package ark-libs.i686 0:4.9.1-1.fc17 will be an update     ---> Package audiocd-kio.i686 0:4.9.1-1.fc17 will be obsoleting     --> Processing Dependency: audiocd-kio-libs(x86-32) = 4.9.1-1.fc17 for package: audiocd-kio-4.9.1-1.fc17.i686     --> Processing Dependency: libaudiocdplugins.so.4 for package: audiocd-kio-4.9.1-1.fc17.i686     --> Processing Dependency: libkcddb.so.4 for package: audiocd-kio-4.9.1-1.fc17.i686     --> Processing Dependency: libkcompactdisc.so.4 for package: audiocd-kio-4.9.1-1.fc17.i686     ---> Package calligra.i686 0:2.5.1-1.fc17 will be updated     ---> Package calligra.i686 0:2.5.2-1.fc17 will be an update                                                                                ---> Package calligra-braindump.i686 0:2.5.1-1.fc17 will be updated                                                                                ---> Package calligra-braindump.i686 0:2.5.2-1.fc17 will be an update                                                                                ---> Package calligra-braindump-libs.i686 0:2.5.1-1.fc17 will be updated                                                                                ---> Package calligra-braindump-libs.i686 0:2.5.2-1.fc17 will be an update                                                                                ---> Package calligra-core.i686 0:2.5.1-1.fc17 will be updated                                                                                ---> Package calligra-core.i686 0:2.5.2-1.fc17 will be an update                                                                                ---> Package calligra-flow.i686 0:2.5.1-1.fc17 will be updated                                                                                ---> Package calligra-flow.i686 0:2.5.2-1.fc17 will be an update                                                                                ---> Package calligra-flow-libs.i686 0:2.5.1-1.fc17 will be updated                                                                                ---> Package calligra-flow-libs.i686 0:2.5.2-1.fc17 will be an update                                                                                ---> Package calligra-karbon.i686 0:2.5.1-1.fc17 will be updated                                                                                ---> Package calligra-karbon.i686 0:2.5.2-1.fc17 will be an update                                                                                ---> Package calligra-karbon-libs.i686 0:2.5.1-1.fc17 will be updated                                                                                ---> Package calligra-karbon-libs.i686 0:2.5.2-1.fc17 will be an update                                                                                ---> Package calligra-kdchart.i686 0:2.5.1-1.fc17 will be updated                                                                                ---> Package calligra-kdchart.i686 0:2.5.2-1.fc17 will be an update                                                                                ---> Package calligra-kexi.i686 0:2.5.1-1.fc17 will be updated                                                                                ---> Package calligra-kexi.i686 0:2.5.2-1.fc17 will be an update                                                                                ---> Package calligra-kexi-driver-mysql.i686 0:2.5.1-1.fc17 will be updated                                                                                ---> Package calligra-kexi-driver-mysql.i686 0:2.5.2-1.fc17 will be an update                                                                                ---> Package calligra-kexi-driver-postgresql.i686 0:2.5.1-1.fc17 will be updated                                                                                ---> Package calligra-kexi-driver-postgresql.i686 0:2.5.2-1.fc17 will be an update                                                                                ---> Package calligra-kexi-driver-sybase.i686 0:2.5.1-1.fc17 will be updated                                                                                ---> Package calligra-kexi-driver-sybase.i686 0:2.5.2-1.fc17 will be an update                                                                                ---> Package calligra-kexi-libs.i686 0:2.5.1-1.fc17 will be updated                                                                                ---> Package calligra-kexi-libs.i686 0:2.5.2-1.fc17 will be an update     ---> Package calligra-kexi-map-form-widget.i686 0:2.5.1-1.fc17 will be updated     ---> Package calligra-kexi-map-form-widget.i686 0:2.5.2-1.fc17 will be an update     ---> Package calligra-krita.i686 0:2.5.1-1.fc17 will be updated     ---> Package calligra-krita.i686 0:2.5.2-1.fc17 will be an update     ---> Package calligra-krita-libs.i686 0:2.5.1-1.fc17 will be updated     ---> Package calligra-krita-libs.i686 0:2.5.2-1.fc17 will be an update     ---> Package calligra-libs.i686 0:2.5.1-1.fc17 will be updated     ---> Package calligra-libs.i686 0:2.5.2-1.fc17 will be an update     ---> Package calligra-okular-odpgenerator.i686 0:2.5.1-1.fc17 will be updated     ---> Package calligra-okular-odpgenerator.i686 0:2.5.2-1.fc17 will be an update     ---> Package calligra-plan.i686 0:2.5.1-1.fc17 will be updated     ---> Package calligra-plan.i686 0:2.5.2-1.fc17 will be an update     ---> Package calligra-plan-libs.i686 0:2.5.1-1.fc17 will be updated     ---> Package calligra-plan-libs.i686 0:2.5.2-1.fc17 will be an update     ---> Package calligra-reports-map-element.i686 0:2.5.1-1.fc17 will be updated     ---> Package calligra-reports-map-element.i686 0:2.5.2-1.fc17 will be an update     ---> Package calligra-sheets.i686 0:2.5.1-1.fc17 will be updated     ---> Package calligra-sheets.i686 0:2.5.2-1.fc17 will be an update     ---> Package calligra-sheets-libs.i686 0:2.5.1-1.fc17 will be updated     ---> Package calligra-sheets-libs.i686 0:2.5.2-1.fc17 will be an update     ---> Package calligra-stage.i686 0:2.5.1-1.fc17 will be updated     ---> Package calligra-stage.i686 0:2.5.2-1.fc17 will be an update     ---> Package calligra-stage-libs.i686 0:2.5.1-1.fc17 will be updated     ---> Package calligra-stage-libs.i686 0:2.5.2-1.fc17 will be an update     ---> Package calligra-words.i686 0:2.5.1-1.fc17 will be updated     ---> Package calligra-words.i686 0:2.5.2-1.fc17 will be an update     ---> Package calligra-words-libs.i686 0:2.5.1-1.fc17 will be updated     ---> Package calligra-words-libs.i686 0:2.5.2-1.fc17 will be an update     ---> Package dragon.i686 0:4.9.1-1.fc17 will be obsoleting     ---> Package gwenview.i686 0:4.8.5-1.fc17 will be updated     ---> Package gwenview.i686 0:4.9.1-1.fc17 will be an update     ---> Package gwenview-libs.i686 0:4.8.5-1.fc17 will be updated     ---> Package gwenview-libs.i686 0:4.9.1-1.fc17 will be an update     ---> Package jovie.i686 0:4.8.5-1.fc17 will be updated     ---> Package jovie.i686 0:4.9.1-1.fc17 will be an update     ---> Package jovie-libs.i686 0:4.8.5-1.fc17 will be updated     ---> Package jovie-libs.i686 0:4.9.1-1.fc17 will be an update     ---> Package kactivities.i686 0:4.8.5-1.fc17 will be updated     ---> Package kactivities.i686 0:4.9.1-1.fc17 will be an update     ---> Package kamera.i686 0:4.8.5-1.fc17 will be updated     ---> Package kamera.i686 0:4.9.1-1.fc17 will be an update     ---> Package kamoso.i686 0:2.0.2-3.fc17 will be updated     ---> Package kamoso.i686 0:2.0.2-5.fc17 will be an update     ---> Package kate.i686 0:4.8.5-1.fc17 will be updated     ---> Package kate.i686 0:4.9.1-1.fc17 will be an update     ---> Package kate-libs.i686 0:4.8.5-1.fc17 will be updated     ---> Package kate-libs.i686 0:4.9.1-1.fc17 will be an update     ---> Package kate-part.i686 0:4.8.5-1.fc17 will be updated     ---> Package kate-part.i686 0:4.9.1-1.fc17 will be an update     ---> Package kcalc.i686 0:4.8.5-1.fc17 will be updated     ---> Package kcalc.i686 0:4.9.1-1.fc17 will be an update     ---> Package kcharselect.i686 0:4.8.5-1.fc17 will be updated     ---> Package kcharselect.i686 0:4.9.1-1.fc17 will be an update     ---> Package kcm_colors.i686 0:4.8.5-2.fc17 will be updated     ---> Package kcm_colors.i686 0:4.9.1-6.fc17 will be an update     ---> Package kcolorchooser.i686 0:4.8.5-1.fc17 will be updated     ---> Package kcolorchooser.i686 0:4.9.1-1.fc17 will be an update     ---> Package kde-baseapps.i686 0:4.8.5-1.fc17 will be updated     ---> Package kde-baseapps.i686 0:4.9.1-2.fc17 will be an update     ---> Package kde-baseapps-libs.i686 0:4.8.5-1.fc17 will be updated     ---> Package kde-baseapps-libs.i686 0:4.9.1-2.fc17 will be an update     ---> Package kde-printer-applet.noarch 0:4.8.5-1.fc17 will be updated     ---> Package kde-printer-applet.noarch 0:4.9.1-1.fc17 will be an update     ---> Package kde-runtime.i686 0:4.8.5-1.fc17 will be updated     ---> Package kde-runtime.i686 0:4.9.1-1.fc17 will be an update     --> Processing Dependency: nepomuk-core >= 4.9.1 for package: kde-runtime-4.9.1-1.fc17.i686     --> Processing Dependency: libnepomukcore.so.4 for package: kde-runtime-4.9.1-1.fc17.i686     ---> Package kde-runtime-flags.noarch 0:4.8.5-1.fc17 will be updated     ---> Package kde-runtime-flags.noarch 0:4.9.1-1.fc17 will be an update     ---> Package kde-runtime-libs.i686 0:4.8.5-1.fc17 will be updated     ---> Package kde-runtime-libs.i686 0:4.9.1-1.fc17 will be an update     ---> Package kde-workspace.i686 0:4.8.5-2.fc17 will be updated     ---> Package kde-workspace.i686 0:4.9.1-6.fc17 will be an update     ---> Package kde-workspace-libs.i686 0:4.8.5-2.fc17 will be updated     ---> Package kde-workspace-libs.i686 0:4.9.1-6.fc17 will be an update     ---> Package kdeartwork-kxs.i686 0:4.8.5-1.fc17 will be updated     ---> Package kdeartwork-kxs.i686 0:4.9.1-1.fc17 will be an update     ---> Package kdeartwork-screensavers.i686 0:4.8.5-1.fc17 will be updated     ---> Package kdeartwork-screensavers.i686 0:4.9.1-1.fc17 will be an update     ---> Package kdegraphics-thumbnailers.i686 0:4.8.5-1.fc17 will be updated     ---> Package kdegraphics-thumbnailers.i686 0:4.9.1-1.fc17 will be an update     ---> Package kdelibs.i686 6:4.8.5-1.fc17 will be updated     ---> Package kdelibs.i686 6:4.9.1-4.fc17 will be an update     --> Processing Dependency: liblzma.so.5(XZ_5.0) for package: 6:kdelibs-4.9.1-4.fc17.i686     ---> Package kdelibs-common.i686 6:4.8.5-1.fc17 will be updated     ---> Package kdelibs-common.i686 6:4.9.1-4.fc17 will be an update     ---> Package kdemultimedia-common.noarch 6:4.8.5-1.fc17 will be updated     ---> Package kdemultimedia-common.noarch 6:4.9.1-1.fc17 will be an update     ---> Package kdemultimedia-dragonplayer.i686 6:4.8.5-1.fc17 will be obsoleted     ---> Package kdemultimedia-kio_audiocd.i686 6:4.8.5-1.fc17 will be obsoleted     ---> Package kdemultimedia-kmix.i686 6:4.8.5-1.fc17 will be obsoleted     ---> Package kdemultimedia-libs.i686 6:4.8.5-1.fc17 will be updated     ---> Package kdemultimedia-libs.noarch 6:4.9.1-1.fc17 will be an update     ---> Package kdenetwork-common.noarch 7:4.8.5-1.fc17 will be updated     ---> Package kdenetwork-common.noarch 7:4.9.1-1.fc17 will be an update     ---> Package kdenetwork-kdnssd.i686 7:4.8.5-1.fc17 will be updated     ---> Package kdenetwork-kdnssd.i686 7:4.9.1-1.fc17 will be an update     ---> Package kdenetwork-kget.i686 7:4.8.5-1.fc17 will be updated     ---> Package kdenetwork-kget.i686 7:4.9.1-1.fc17 will be an update     ---> Package kdenetwork-kget-libs.i686 7:4.8.5-1.fc17 will be updated     ---> Package kdenetwork-kget-libs.i686 7:4.9.1-1.fc17 will be an update     ---> Package kdenetwork-krdc.i686 7:4.8.5-1.fc17 will be updated     ---> Package kdenetwork-krdc.i686 7:4.9.1-1.fc17 will be an update     ---> Package kdenetwork-krdc-libs.i686 7:4.8.5-1.fc17 will be updated     ---> Package kdenetwork-krdc-libs.i686 7:4.9.1-1.fc17 will be an update     ---> Package kdenetwork-krfb.i686 7:4.8.5-1.fc17 will be updated     ---> Package kdenetwork-krfb.i686 7:4.9.1-1.fc17 will be an update     ---> Package kdenetwork-krfb-libs.i686 7:4.8.5-1.fc17 will be updated     ---> Package kdenetwork-krfb-libs.i686 7:4.9.1-1.fc17 will be an update     ---> Package kdepim.i686 7:4.8.5-4.fc17 will be updated     ---> Package kdepim.i686 7:4.9.1-1.fc17 will be an update     ---> Package kdepim-libs.i686 7:4.8.5-4.fc17 will be updated     ---> Package kdepim-libs.i686 7:4.9.1-1.fc17 will be an update     ---> Package kdepim-runtime.i686 1:4.8.5-1.fc17 will be updated     ---> Package kdepim-runtime.i686 1:4.9.1-1.fc17 will be an update     --> Processing Dependency: libkgapi.so.0 for package: 1:kdepim-runtime-4.9.1-1.fc17.i686     --> Processing Dependency: libxerces-c-3.1.so for package: 1:kdepim-runtime-4.9.1-1.fc17.i686     --> Processing Dependency: libkolab.so.0 for package: 1:kdepim-runtime-4.9.1-1.fc17.i686     --> Processing Dependency: libkolabxml.so.0 for package: 1:kdepim-runtime-4.9.1-1.fc17.i686     ---> Package kdepim-runtime-libs.i686 1:4.8.5-1.fc17 will be updated     ---> Package kdepim-runtime-libs.i686 1:4.9.1-1.fc17 will be an update     ---> Package kdepimlibs.i686 0:4.8.5-1.fc17 will be updated     ---> Package kdepimlibs.i686 0:4.9.1-3.fc17 will be an update     ---> Package kdepimlibs-akonadi.i686 0:4.8.5-1.fc17 will be updated     ---> Package kdepimlibs-akonadi.i686 0:4.9.1-3.fc17 will be an update     ---> Package kdeplasma-addons.i686 0:4.8.5-1.fc17 will be updated     ---> Package kdeplasma-addons.i686 0:4.9.1-1.fc17 will be an update     ---> Package kdeplasma-addons-libs.i686 0:4.8.5-1.fc17 will be updated     ---> Package kdeplasma-addons-libs.i686 0:4.9.1-1.fc17 will be an update     ---> Package kdesdk-common.noarch 0:4.8.5-1.fc17 will be updated     ---> Package kdesdk-common.noarch 0:4.9.1-1.fc17 will be an update     ---> Package kdesdk-okteta.i686 0:4.8.5-1.fc17 will be updated     ---> Package kdesdk-okteta.i686 0:4.9.1-1.fc17 will be an update     ---> Package kdesdk-okteta-libs.i686 0:4.8.5-1.fc17 will be updated     ---> Package kdesdk-okteta-libs.i686 0:4.9.1-1.fc17 will be an update     ---> Package kdesdk-umbrello.i686 0:4.8.5-1.fc17 will be updated     ---> Package kdesdk-umbrello.i686 0:4.9.1-1.fc17 will be an update     ---> Package kdevelop.i686 9:4.3.1-1.fc17 will be updated     ---> Package kdevelop.i686 9:4.3.1-2.fc17 will be an update     ---> Package kdevelop-libs.i686 9:4.3.1-1.fc17 will be updated     ---> Package kdevelop-libs.i686 9:4.3.1-2.fc17 will be an update     ---> Package kdm.i686 0:4.8.5-2.fc17 will be updated     ---> Package kdm.i686 0:4.9.1-6.fc17 will be an update     ---> Package kgpg.i686 0:4.8.5-1.fc17 will be updated     ---> Package kgpg.i686 0:4.9.1-1.fc17 will be an update     ---> Package kgreeter-plugins.i686 0:4.8.5-2.fc17 will be updated     ---> Package kgreeter-plugins.i686 0:4.9.1-6.fc17 will be an update     ---> Package kio_msits.i686 7:4.8.5-3.fc17 will be updated     ---> Package kio_msits.i686 7:4.9.1-1.fc17 will be an update     ---> Package kmix.i686 0:4.9.1-1.fc17 will be obsoleting     ---> Package kolourpaint.i686 0:4.8.5-1.fc17 will be updated     ---> Package kolourpaint.i686 0:4.9.1-1.fc17 will be an update     ---> Package kolourpaint-libs.i686 0:4.8.5-1.fc17 will be updated     ---> Package kolourpaint-libs.i686 0:4.9.1-1.fc17 will be an update     ---> Package konsole.i686 0:4.8.5-1.fc17 will be updated     ---> Package konsole.i686 0:4.9.1-1.fc17 will be an update     ---> Package konsole-part.i686 0:4.8.5-1.fc17 will be updated     ---> Package konsole-part.i686 0:4.9.1-1.fc17 will be an update     ---> Package kross-interpreters.i686 0:4.8.5-1.fc17 will be updated     ---> Package kross-interpreters.i686 0:4.9.1-1.fc17 will be an update     ---> Package kross-python.i686 0:4.8.5-1.fc17 will be updated     ---> Package kross-python.i686 0:4.9.1-1.fc17 will be an update     ---> Package kruler.i686 0:4.8.5-1.fc17 will be updated     ---> Package kruler.i686 0:4.9.1-1.fc17 will be an update     ---> Package ksnapshot.i686 0:4.8.5-1.fc17 will be updated     ---> Package ksnapshot.i686 0:4.9.1-1.fc17 will be an update     ---> Package ksysguard.i686 0:4.8.5-2.fc17 will be updated     ---> Package ksysguard.i686 0:4.9.1-6.fc17 will be an update     ---> Package ksysguard-libs.i686 0:4.8.5-2.fc17 will be updated     ---> Package ksysguard-libs.i686 0:4.9.1-6.fc17 will be an update     ---> Package ksysguardd.i686 0:4.8.5-2.fc17 will be updated     ---> Package ksysguardd.i686 0:4.9.1-6.fc17 will be an update     ---> Package ktorrent.i686 0:4.2.1-1.fc17 will be updated     ---> Package ktorrent.i686 0:4.3.0-1.fc17 will be an update     ---> Package ktorrent-libs.i686 0:4.2.1-1.fc17 will be updated     ---> Package ktorrent-libs.i686 0:4.3.0-1.fc17 will be an update     ---> Package kwallet.i686 0:4.8.5-1.fc17 will be updated     ---> Package kwallet.i686 0:4.9.1-1.fc17 will be an update     ---> Package kwebkitpart.i686 0:1.2-0.3.20111030.fc17 will be updated     ---> Package kwebkitpart.i686 0:1.3-0.1.20120726git.fc17 will be an update     ---> Package kwin-gles-libs.i686 0:4.8.5-2.fc17 will be updated     ---> Package kwin-gles-libs.i686 0:4.9.1-6.fc17 will be an update     ---> Package kwrite.i686 0:4.8.5-1.fc17 will be updated     ---> Package kwrite.i686 0:4.9.1-1.fc17 will be an update     ---> Package libkdcraw.i686 0:4.8.5-1.fc17 will be updated     ---> Package libkdcraw.i686 0:4.9.1-1.fc17 will be an update     ---> Package libkexiv2.i686 0:4.8.5-1.fc17 will be updated     ---> Package libkexiv2.i686 0:4.9.1-1.fc17 will be an update     ---> Package libkipi.i686 0:4.8.5-1.fc17 will be updated     ---> Package libkipi.i686 0:4.9.1-1.fc17 will be an update     ---> Package libktorrent.i686 0:1.2.1-1.fc17 will be updated     ---> Package libktorrent.i686 0:1.3.0-1.fc17 will be an update     ---> Package libkworkspace.i686 0:4.8.5-2.fc17 will be updated     ---> Package libkworkspace.i686 0:4.9.1-6.fc17 will be an update     ---> Package marble.i686 1:4.8.5-1.fc17 will be updated     ---> Package marble.i686 1:4.9.1-1.fc17 will be an update     ---> Package marble-libs.i686 1:4.8.5-1.fc17 will be updated     ---> Package marble-libs.i686 1:4.9.1-1.fc17 will be an update     ---> Package okular.i686 0:4.8.5-3.fc17 will be updated     ---> Package okular.i686 0:4.9.1-1.fc17 will be an update     ---> Package okular-libs.i686 0:4.8.5-3.fc17 will be updated     ---> Package okular-libs.i686 0:4.9.1-1.fc17 will be an update     ---> Package okular-part.i686 0:4.8.5-3.fc17 will be updated     ---> Package okular-part.i686 0:4.9.1-1.fc17 will be an update     ---> Package plasma-scriptengine-python.i686 0:4.8.5-2.fc17 will be updated     ---> Package plasma-scriptengine-python.i686 0:4.9.1-6.fc17 will be an update     ---> Package pykde4.i686 0:4.8.5-1.fc17 will be updated     ---> Package pykde4.i686 0:4.9.1-1.fc17 will be an update     ---> Package system-config-printer-kde.i686 7:4.8.4-1.fc17 will be updated     ---> Package system-config-printer-kde.i686 7:4.9.1-1.fc17 will be an update     --> Running transaction check     ---> Package akonadi.i686 0:1.7.2-1.fc17 will be updated     ---> Package akonadi.i686 0:1.8.0-1.fc17 will be an update     ---> Package audiocd-kio-libs.i686 0:4.9.1-1.fc17 will be installed     ---> Package kdelibs.i686 6:4.9.1-4.fc17 will be an update     --> Processing Dependency: liblzma.so.5(XZ_5.0) for package: 6:kdelibs-4.9.1-4.fc17.i686     ---> Package libkcddb.i686 0:4.9.1-1.fc17 will be installed     ---> Package libkcompactdisc.i686 0:4.9.1-1.fc17 will be installed     ---> Package libkgapi.i686 0:0.4.2-1.fc17 will be installed     ---> Package libkolab.i686 0:0.3.1-3.fc17 will be installed     ---> Package libkolabxml.i686 0:0.8.1-2.fc17 will be installed     ---> Package nepomuk-core.i686 0:4.9.1-1.fc17 will be installed     ---> Package nepomuk-core-libs.i686 0:4.9.1-1.fc17 will be installed     ---> Package xerces-c.i686 0:3.1.1-2.fc17 will be installed     --> Finished Dependency Resolution     Error: Package: 6:kdelibs-4.9.1-4.fc17.i686 (kde)                Requires: liblzma.so.5(XZ_5.0)      You could try using --skip-broken to work around the problem      You could try running: rpm -Va --nofiles --nodigest      How can I solve this? I have the 'required package' in /usr/lib/ I use Fedora 17, KDE 4.8.5


title: Gettting Unexpected Error during the testing of GCC-4.8.2 package in LFS 7.5

text: I am building my first LFS 7.5 using Linux Mint-13 (32-bit).While testing the 6.17. GCC-4.8.2 .I am getting the following error :               root:/sources/gcc-build# ../gcc-4.8.2/contrib/test_summary     cat <<'EOF' |     LAST_UPDATED: Obtained from SVN: tags/gcc_4_8_2_release revision 203690     Native configuration is i686-pc-linux-gnu              === g++ tests ===               Running target unix     FAIL: g++.dg/asan/asan_test.C  -O2  AddressSanitizer_HugeMallocTestIdent((char*)malloc(size))[-1] = 0 output pattern test, should match is located 1 bytes to the left of 2726297600-byte              === g++ Summary ===          # of expected passes        53365     # of unexpected failures    1      # of expected failures      290     # of unsupported tests      647       /sources/gcc-build/gcc/testsuite/g++/../../xg++  version 4.8.2 (GCC)       That asan_test.C thing seems to be a known issue...               http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55577      How can i resolve it ? Thanx in advance ....


title: Grub: can't enter Windows 7

text: I want to install ubuntu using easyBCD and ubuntu ISO file, after some configuration, I set the default boot to Grub instead of windows7. But I forgot to run command `sudo umount –l /isodevice` to remove the iso, so when I boot from Grub, the installation of Ubuntu failed. Now I want to return to Windows7 to run that command, but I don't know how to return to window7, there are only one item `install ubuntu` after rebooting. I tried               rootnoverify (hd0,0)     chainloader +1     boot      however, I can only return to "Install Ubuntu" , I think the reason is that I put the initrd.lz vmlinuz in drive C(where windows7 is installed) now I have a ubuntu8 CD. I insert the CD and want to use the TRIAL version to delete "initrd.lz" and "vmlinuz" in C drive, but I simply can't enter /dev/sda and /dev/sda1. Should I install ubuntu 8 and then modify GRUB under ubuntu 8 so that I can start window7?


title: Kali Linux airodump Not Finding Networks

text: When I use the `airodump` it is not coming up with networks available around me. The chart comes up but nothing inside it, even though there should be about 10 networks around me coming up there is just none being found , I would be very grateful for any advice! All the commands I am using are correct as I am follow online tutorials maybe its just my wireless network card nor something :/


title: Running "patch" without generating *.orig and *.rej files

text: Is it possible to tell `patch` not to generate `.orig` and `.rej` files? I find it extremely annoying that patch creates these.


title: How to connect a domain name to a virtual host 's sub folder without creating a virtualhost for the new domain name?

text: Suppose you have 2 domain names..                domain1.tld      domain2.tld      your server ip is : 1.1.1.1 you install httpd and set up a virtual host for the IP only.               Listen *:80     DirectoryIndex index.php          <VirtualHost *:80>     DocumentRoot /1/     ServerName ooo     </VirtualHost>      you have not setup anything for the domains..   but because the domais are pointing to your server's ip via DNS they still come to this VirtualHost on the Web. i do not use php but let's assume there is a index.php   in this virtual host. it wants to know what domain is being used so it can   go into mysql and display the appropriate content. how can index.php be aware of what domain is being used ? or suppose you run a web site like youtube or twitter.. instead of youtube.com/username you want to be able to offer your users ability to use their own domain names. how can you go about connecting a domain name to.. youtube.com/username ?


title: How can I switch between different audio output hardware using the shell?

text: I use my laptop with an external monitor which has speakers. When the monitor is attached through HDMI I can switch (using the GUI: Sound Setting --> Hardware) between the normal laptop audio output and the monitor output. I repeat this procedure a lot of time and I started to wonder if I can automate it or, anyway, execute it in a faster way using the shell. My distro is Ubuntu 12.04 with gnome 3. EDIT: I tried using pacmd, but list-sinks gives me only the device I'm currently using:               pacmd list-sinks | grep name:     name: <alsa_output.pci-0000_00_1b.0.hdmi-stereo>      After a switch from GUI:               pacmd list-sinks | grep name:     name: <alsa_output.pci-0000_00_1b.0.analog-stereo>      And if I try to change it I get:               pacmd set-default-sink alsa_output.pci-0000_00_1b.0.hdmi-stereo     Welcome to PulseAudio! Use "help" for usage information.     Sink alsa_output.pci-0000_00_1b.0.hdmi-stereo does not exist.


title: Apache server redirects main domain to https

text: I have this server with multiple domains running CentOS 6.2 and Apache. This server has a SSL certificate installed and working well. Every time I browse to the main domain, without adding `http://` it shows the `https` part. For example: If I type `mydomain.com` it shows the `https` page on `private_html/index.html` instead of `public_html/index.html` If I type `http://mydomain.com` or `http://www.mydomain.com` it shows the correct page at `public_html/index.html` If I type `https://mydomain.com` or `https://www.mydomain.com` it shows the correct page at `private_html/index.html` the problem is just that if I omit the `http` or `https` part it always shows the `https` part. I want the inverse. I want to go to `https` when I want, not when apache wants. What may be causing this? This is my `httpd.conf` for this domain               <VirtualHost 100.101.102.103:80 >             ServerName www.mysite.com             ServerAlias www.mysite.com mysite.com             ServerAdmin webmaster@mysite.com             DocumentRoot /home/admin/domains/mysite.com/public_html             ScriptAlias /cgi-bin/ /home/admin/domains/mysite.com/public_html/cgi-bin/                  UseCanonicalName OFF                  <IfModule !mod_ruid2.c>                     SuexecUserGroup admin admin             </IfModule>             <IfModule mod_ruid2.c>                     RMode config                     RUidGid admin admin                     RGroups apache access             </IfModule>                  CustomLog /var/log/httpd/domains/mysite.com.bytes bytes             CustomLog /var/log/httpd/domains/mysite.com.log combined             ErrorLog /var/log/httpd/domains/mysite.com.error.log             <Directory /home/admin/domains/mysite.com/public_html>                     Options +Includes -Indexes                     php_admin_flag safe_mode OFF                     php_admin_flag engine ON                     php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f admin@mysite.com'                          php_admin_value open_basedir /home/admin/:/tmp:/var/tmp:/usr/local/lib/php/             </Directory>     </VirtualHost>               <VirtualHost 100.101.102.103:443 >             SSLEngine on             SSLCertificateFile /etc/httpd/conf/ssl.crt/server.crt             SSLCertificateKeyFile /etc/httpd/conf/ssl.key/server.key                  ServerName www.mysite.com             ServerAlias www.mysite.com mysite.com             ServerAdmin webmaster@mysite.com             DocumentRoot /home/admin/domains/mysite.com/private_html             ScriptAlias /cgi-bin/ /home/admin/domains/mysite.com/public_html/cgi-bin/                  UseCanonicalName OFF                  <IfModule !mod_ruid2.c>                     SuexecUserGroup admin admin             </IfModule>             <IfModule mod_ruid2.c>                     RMode config                     RUidGid admin admin                     RGroups apache access             </IfModule>                  CustomLog /var/log/httpd/domains/mysite.com.bytes bytes         CustomLog /var/log/httpd/domains/mysite.com.log combined             ErrorLog /var/log/httpd/domains/mysite.com.error.log                  <Directory /home/admin/domains/mysite.com/private_html>                     Options +Includes -Indexes                          php_admin_flag safe_mode OFF                     php_admin_flag engine ON                     php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f admin@mysite.com'                      php_admin_value open_basedir /home/admin/:/tmp:/var/tmp:/usr/local/lib/php/             </Directory>     </VirtualHost>      any help is appreciated. Thanks.


title: bourne shell if [ -e $directory/file.$suffix ]

text: I've been looking inclusive I even checked the if manual for bash and tried in cli mode.               #!/bin/sh     CONFIG_DIR="/var/opt/SUNWldm/"     read option     if [ $option -eq 9 ]; then             ret=1     elif [ -e ${CONFIG_DIR}file.xml.${option} ]; then             echo "TRUE"     fi      I have the above code in a while loop to present a list of options. Unfortunately I'm having problems with the `elfi` statement. > From: IF for Beginners the -e returns true if the file exists. I've double checked the syntax and even running the script in debug mode (I put `set -x` at the beginning of this script and could see that the replacement in the `if` is done properly as seen inline:               + [ 201301271355 -eq 9 ]     + [ -e /var/opt/SUNWldm/file.xml.201301271355 ]     ./ldm_recover.sh: test: argument expected      I've been searching so far and haven't found a reason for failing, any ideas what I'm doing wrong?


title: How to retrieve an installed AUR package?

text: I used `yaourt` to successfully build and install an AUR package, unfortunately missing the fact that in its default configuration the built package is removed after installation. Since the build took around 24 hours and having the package available for later might be useful, is there any way to reconstruct the package from the installed binaries instead of having to `makepkg` it again? Or more generally, since this is not necessarily `yaourt`-tied: > How to retrieve a `makepkg` generated package from the installation and > source without having to recompile?


title: No wallpaper colors in Xfce 4.10

text: I'm in Linux Mint 14, updated to Xfce 4.10. Wallpapers are black & white only. I think that happened after I moved the scrolls for brightness and saturation. After putting them back to zero, no color on the desktop image. Changing from "image" to "image list" or "none" does not remove the image. But an image can be changed with another: but no colors. ![enter image description here](http://i.stack.imgur.com/e363H.jpg) (Now the all-gray philosophy of Xfce and Mint has triumphed... but all the same... I want colors back.)


title: grepping dotfiles with -R correctly?

text: From time to time I need to find a culprit in an unknown dotfile and instead of trying to figure out which package is to be blamed (e.g. xfce4 or thunar?) and what is their naming convention (.app vs .application vs .some_old_name vs .config/app...), I just want to go for it the quick & dirty way:               me@here:~$ grep -IR .* -e culprit      But this quick & dirty way is also the silly way. After few minutes I figure out that `.*` means `..` as well, and there we are. Sometimes I resort to probably even less quick & more dirty variant:               me@here:~$ grep -IR /home/me -e culprit      which turns out to be of a superior silliness, especially if I have some huge or distant `mount`ains at my `$HOME`. Too bad that I can't figure out The Quick And Clean And Right Way. (And my disk heads are slowly wearing out.) Is it possible to achieve this within wildcard expansion at all? I.e. a variant of `.*` that does not match `..` (and `../..`...)?


title: How to troubleshoot a computer freeze from liveCD?

text: I'm helping my dad fixing his old computer. I am now running it from Fedora 16 with XFCE Live CD. If I try to install, as soon as it gets to the part where it writes partition to disk however, the computer just freezes (screen image is frozen, no mouse nor keyboard response--even num-lock won't change then). The only way out is a reset. This issue occurred, though less consistently on Windows, it occurred too after installing Xubuntu 11.10. I suspect this issue is hard-drive related, since now the Live CD runs smoothly and since it freezes on writing partitions. I am not sure however. (I also ran a metest which was passed without error.) Is there a way to find out what the source of the problem is and can I do this from the live CD? And so how? (I am pretty illiterate regarding hardware). Could you guide me through please? Where do I start? _PS: I can do the troubleshooting from Xubuntu 11.10 LiveCD alternatively._


title: Kali-linux & backtrack, text mode and wifi scanning

text: As far as i know, when backtrack starts it boots on text mode and the wifi(wlan0) is down in order to be more stealth. Kali linux is the "update" of backtrack and when I boot it always starts in GUI mode. Is it possible to start it in text mode? Also i noticed that it asks for a wifi connection, so i suppose that the stealth of wifi scanning is not valid anymore?


title: Integrate custom LPD filter into CUPS

text: I've stood up a new print server and instead of using LPD we're trying to use CUPS. The old LPD server had custom filters written in C that need to be applied to the new CUPS server. The problem is that I'm not sure how that is done. The printers.conf file has the option 'Filter' which uses Mime types. I don't know which Mime type to use if any. I understand that I'll need to include the filter script location in the ppd file for that printer and then edit the printer.conf file, but I'm uncertain how to go about that. On the old print server we would edit the printcap file, but on the new server CUPS will edit that file after any change.               [root@printserver cups]# cat /etc/cups/printers.conf     # Printer configuration file for CUPS v1.4.2     # Written by cupsd on 2014-08-28 11:59     # DO NOT EDIT THIS FILE WHEN CUPSD IS RUNNING     <Printer Printer1>     Info Printer1     Location 9L     MakeModel Ricoh Aficio MP C2050 PS     DeviceURI lpd://destination_server/Printer1     State Idle     StateTime 1409252319     Type 8433916     Filter application/vnd.cups-raw 0 -     Filter application/vnd.cups-postscript 0 foomatic-rip     Accepting Yes     Shared Yes     JobSheets none none     QuotaPeriod 0     PageLimit 0     KLimit 0     OpPolicy default     ErrorPolicy stop-printer     </Printer>                    [root@printserver ppd]# grep cupsFilter Printer1.ppd          *cupsFilter: "application/vnd.cups-postscript 0 foomatic-rip"      OLD server printcap file:               Printer1:\     :ml#0:\     :mx#0:\     :sd=/var/spool/lpd/Printer1:\     :af=/var/spool/lpd/Printer1/Printer1.acct:\     :sh:\     :rm=destination_server:\     :rp=Printer1:


title: Pulling lines n to m from list of files found

text: Ultimately I need to grab lines 3-53 from ever csv in each subdirectory. I grabbed the lines like so (cat isn't necessarily required):               cat /[path]/[file].csv | head -53 | tail -51      And the files like this (but find IS):               find /[path]/ -name "*.csv"      The problem is I'm having trouble chaining the two. I could list what I've tried for your amusement, but it's obviously nonsense. Can someone nudge me in the right direction?


title: sshd suddenly wants a passphrase from Linux box, but not from windows (putty)

text: My Amazon EC2 instance running Ubuntu is no longer letting me `ssh` in via my local Linux system. I haven't changed a darned thing on either side but now it wants a passphrase and says nope when I supply the blank passphrase I had set. Fortunately, it still works fine when I use `putty` on windows. I use the `ppk` file on both, for the Linux side the command is:               ssh -i foo.pkg host      The only thing I can think of is when I last did the apt-get upgrade on the server the other day I saw it was updating the libc stuff. I tried rebooting the server but that hasn't fixed it. What is causing this issue? How might I resolve it?


title: Hide a partition in the partition table and make it reappear later

text: I know this isn't a question that's specific to Unix/Linux, but I think there are people who can answer this question here. I want to hide my Windows partition from the partition table completely, then later I want it to come back. I'm sure it's something simple to do, but it's safer to ask people who know instead of fiddling with the partition table myself and mistakenly lose my data. By "hide" I mean I want that area of the disk to appear unallocated. Basically remove the "partition entry" if that makes sense without removing the data itself, so later I can just change the partition table again to make it have a partition entry at the exact location, so I can access it again.


title: Understanding passwd --keep-tokens

text: On GNU/Linux, I do have trouble understanding the meaning of the `\--keep- tokens` option for `passwd`. As it doesn't seem to be much used as I am not able to find any examples and only online copies of `man` pages… so any example of practical use would help a lot.


title: How to add variables to script output?

text: A program to calculate statistics outputs its data in this format               Calc_Statistics -input_data     zone|label|non_null_cells|null_cells|min|max|range|mean|mean_of_abs|stddev|variance|coeff_var|sum|sum_abs     1|Category 1|2340|6|0.281038027256727|0.462105994578451|0.181067967321724|0.408569300865444|0.408569300865444|0.0272405706818114|0.000742048691070761|6.66730726564858|956.0521640251|956.0521640251     2|Category 2|1504|11|0.231816699029878|0.428150941850618|0.19633424282074|0.368851480689277|0.368851480689277|0.0237446334053689|0.000563807615555358|6.43745101985139|554.7526269567|554.7526269567     ...     ...     n      I know how to select the values i want with the cut               calc_statistics -input_data | cut -f1,2,34 -d'|'      and I'll get something like this:               zone|label|non_null_cells|null_cells     1|Category 1|2340|6     2|Category 2|1504|11      And I want to run it for a collection of inputs,eg:               for year in years:         do          for month in months:            do            calc_statistics -input_data $year$month_data | cut -f1,2,34 -d'|' >> results.txt            done         done      but I can how can I add in each line the $year and $month variable so the result will be similar with the following?               2000|2|1|Category 1|2340|6     2000|2|2|Category 2|1504|11


title: Command & binary exists but cannot be executed

text: I transfered `/etc/*` files from one Linux server to another and now I have a strange error. Both are Debian Squeeze. When I run a command, e.g. `ssh`, I get an error: > bash: /usr/bin/ssh: No such file or directory It looks like the binary exists: > -rwxr-xr-x 1 root root 358756 Sep 21 14:30 /usr/bin/ssh Bash also autocompletes the command when I type `ss` and press `Tab`. I tried reinstalling, purging etc but it didn't solve anything. There is probably something cached under `/etc/` but I don't know what excatly.


title: How do you colorize only some keywords for a bash script?

text: I am running some unit test code. The unit test code outputs regular text. There is a lot of the text so I want to highlight for the user important keywords. In this case the keywords are "PASS" and "FAIL". **How do you colorize "PASS" to be green and "FAIL" to be red?**


title: Gunzip multiple files and rename them

text: I want to know whether it is possible to gunzip multiple files and rename them with one command/script. I have a bunch of files in the format: > test.20120708191601.DAT.3599502593.gz   >  test.20120708201601.DAT.99932140.gz   >  test.20120708204600.DAT.1184686967.gz   >  test.20120708212100.DAT.824089664.gz   >  test.20120708215100.DAT.1286044098.gz   >  test.20120708222100.DAT.1414234861.gz I need to gunzip them and remove everything after the .DAT, to be in the format: > test.20120708191601.DAT   >  test.20120708201601.DAT   >  test.20120708204600.DAT   >  test.20120708212100.DAT   >  test.20120708215100.DAT   >  test.20120708222100.DAT


title: How to grant read/write to specific user in any existent or future subdirectory of a given directory?

text: I'm a complete newbie in system administration and I'm doing this as a hobby. I host my own git repository on a VPS. Let's say my user is john. I'm using the ssh protocol to access my git repository, so my url is something like `ssh://john@myserver.com/path/to/git/myrepo/`. Root is the owner of everything that's under `/path/to/git` I'm attempting to give read/write access to john to everything which is under `/path/to/git/myrepo` I've tried both `chmod` and `setfacl` to control access, but both fail the same way: they apply rights recursively (with the right options) to all the **_current existing subdirectories_** of `/path/to/git/myrepo`, but as soon as a new directory is created, my user can not write in the new directory. I know that there are hooks in git that would allow me to reapply the rights after each commit, but I'm starting to think that i'm going the wrong way because this seems too complicated for a very basic purpose. **Q** : How should I setup my right to give rw access to john to anything under `/path/to/git/myrepo` and make it resilient to tree structure change ? **Q2** : If I should take a step back change the general approach, please tell me. **Edit** : The question was answered as is, but that was the wrong question. The right question would have been "How to configure a bare git repository on the server for use with ssh access ?". See my own answer.


title: Camera capture is too slow

text: I had being conducting some experimentation with my Beagleboard and camera. The camera was working perfectly well initially. Later I extended my experiments by disabling the 'auto-exposure' and manually setting the value myself. But doing this alone made the camera function to be so slow by about 15x times the previous performance. What can be the reason?


title: GNU screen freezes trying to reattach

text: I have several long-running GNU screen sessions. I ssh to the box they're running on and run `screen -d -r foo` to detach them if they're connected anywhere else, and then attach them in my current window. 99% of the time this works fine, but on occasion I get this:               $ screen -d -r foo     [2430.foo detached.]      ...and nothing happens; I can't get back to the shell at all. Trying in another window does the same thing, the only thing I can do is destroy that screen session (losing all the programs that were running in it) and recreate it Why does this happen? How can I avoid it or reconnect successfully when it does happen? * * * **Edit** : My `.screenrc`:               startup_message off     defwritelock off     bind q quit     caption always '%{gk}   (%n) %t                   %{y}%d %M %Y :: %c:%s                   %{b}%W%{d}'     screen -t ZSH     autodetach on     shelltitle ZSH     defutf8 on      * * * **Edit** : The end of an `strace` log when trying to attach:               readlink("/proc/self/fd/0", "/dev/pts/14", 4095) = 11     stat64("/dev/pts/14", {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 14), ...}) = 0     stat64("/dev/pts/14", {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 14), ...}) = 0     geteuid32()                             = 1000     getegid32()                             = 1000     open("/dev/pts/14", O_RDWR|O_NONBLOCK)  = 3     geteuid32()                             = 1000     getegid32()                             = 1000     close(3)                                = 0     ioctl(0, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B38400 opost isig icanon echo ...}) = 0     umask(0)                                = 022     lstat64("/var/run/screen", {st_mode=S_IFDIR|0777, st_size=4096, ...}) = 0     access("/var/run/screen/S-mrozekma", F_OK) = 0     stat64("/var/run/screen/S-mrozekma", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0     umask(022)                              = 0     uname({sys="Linux", node="etudes-2", ...}) = 0     rt_sigaction(SIGHUP, {0x806e520, [], 0}, {SIG_DFL, [], 0}, 8) = 0     geteuid32()                             = 1000     getegid32()                             = 1000     open("/var/run/screen/S-mrozekma", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3     getdents(3, /* 6 entries */, 32768)     = 124     stat64("/var/run/screen/S-mrozekma/2386.chat", {st_mode=S_IFIFO|0700, st_size=0, ...}) = 0     geteuid32()                             = 1000     getegid32()                             = 1000     open("/var/run/screen/S-mrozekma/2386.chat", O_WRONLY|O_NONBLOCK) = 4     geteuid32()                             = 1000     getegid32()                             = 1000     fcntl64(4, F_SETFL, O_RDONLY)           = 0     geteuid32()                             = 1000     getegid32()                             = 1000     getdents(3, /* 0 entries */, 32768)     = 0     close(3)                                = 0     geteuid32()                             = 1000     getegid32()                             = 1000     setuid32(1000)                          = 0     setgid32(1000)                          = 0     stat64("/var/run/screen/S-mrozekma/2386.chat", {st_mode=S_IFIFO|0700, st_size=0, ...}) = 0     getpid()                                = 30081     write(4, "\0gsm\4\0\0\0/dev/pts/14\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 12336


title: Memory ussage for TCP or named pipe message buffers?

text: I have a group of programs that I was stress testing today. I drastically shot up the input load to the program and it worked at first, but I had an apparent memory leak sucking up memory. The only problem is that 1) `Valgrind` is insisting I don't have any leaks and 2) it only happens a high packet ingest rates. One, possible crazy, idea was that the extra memory may be going towards a message queue due to my system lacking the bandwidth to output packets as fast as they are incoming forcing increasingly large buffers of data to be transmitted. The program that is showing as hogging the memory is reading from TCP socket and writing to a named pipe. so I have three questions.   1. Can the in-memory queue for storing to-be dispatched data increase indefinately for either TCP/IP or named pipes?   2. if the queue can and did grow would it still show that My program (the one reading from TCP and outputting to the named pipe) was the memory hog, or would the memory just show as system memory?   3. is there a command I can use to check memory allocated to these queues? I'm running Centos Admitedly I don't really think this is the cause of my leak, but then again I realy can't guess what else is so I have to ask!


title: ksh + delete number from string

text: the string IP include some IP address numbers as the following example               echo ${IP[*]}          192.9.200.1 192.9.200.2 192.9.200.3      is it possible to remove some IP address number from the list ( using ksh shell ) ? for example I want to delete the IP - 192.9.200.2 from the string "IP" so I will get the following               echo ${IP[*]}          192.9.200.1 192.9.200.3


title: A Calendar/Scheduling application

text: I'm looking for a program to use as a calendar. The first observation that I would make is that Google apps would be perfect except for two things: it is online, and it is online. The first difficulty I have with Google Calendar is that because it is online I would not be able to make use of it when I'm not online. The second difficulty that I have is that because it is online, I need to use a browser to access it, which means I have to have Google Calendar open somewhere on my browser. Given the state of, well, my browsers state is not a good thing. I could use a "lesser" browser dedicated to the job ( like Konqueror or Midori ), but I'm not sure they are up to it. I could do what I do for Zap2it and tvlistings create a separate account but that would prevent any sound during an alarm. My setup is a small desktop, running Debian testing, and a laptop running Ubuntu Lucid, sometimes Vista. In the future I plan on getting a tablet running Android ( ICS ) or later. I need to sync across all these platforms. On the linux machines I am running KDE 4.whatever. I don't object to a Gnome- based ( GTK ) applications but I know there are programs in both camps which start up enough parts that it is like you are running two DE's. I would like to avoid that. As for the application itself, there are several things I'm looking for. The ability to set alarms, a daily view, a weekly view and a monthly view. I would like to group events so that I can display only some of the groups at once. Free floating events ( Events which are open-ended on time. ) would be nice. So would a more interactive GUI. ( As opposed to some application that just prints the day of the month. ) Someway to thoroughly sync across Linux, Android, and Vista. I guess if it can sync to google calendar that would take care of things. Finally a way of scripting events would also be nice, though I think if I can sync with Google Calendar, `gcalcli` would do the trick.


title: What to do after the LUNS are created

text: Our Management bought a New EMC2 VNX storage device . And a guy from vendor came to create the LUNS. I honestly have no idea how to configure the EMC SANS as i never got a chance to work on such Awesome things. Now Finally I got it. I know that Final step is to mount it as a partition . But what I need to know is what are the things involved **between creating the LUNs and mounting the storage as a partition on the server.** I searched for some good material but didnt find anything for the Newbie like me. I will mount it on Redhat 5.9 and Redhat 6.4


title: iconv cannot convert given characters

text: I just wanted to convert a txt file to UTF-8, since cat displays it correctly, but vi or gedit doesn't:               $ cat test.txt      >#     >‹     |     ||     °     ├──     └──     _     __     $ iconv -f WINDOWS-1253 -t UTF-8 test.txt      >#     >β€Ή     |     ||     Β°     β”iconv: illegal input sequence at position 18     $       **Q** : how can I convert my txt to UTF-8? iconv doesn't works.


title: Which version of unix from a shell?

text: I recently started a new job, and was told that I need to log on (Via shell) to a particular unix system. I'm trying to figure out a few peculiarities with the system, but first I need to know what version of unix it is running. I could go and find a system admin, but that's a bit of a pain, as I don't actually know who maintains the system. How can I figure out using a shell (ksh) what version of unix I am actually using?


title: No access to symlink folder on NTFS partition

text: I am using an NTFS parition for storing data I like to access both from Ubuntu and Windows 7. On my Ubuntu _HOME_ partition, I like to link the folder `Assets` in order to access it from an application running on Ubuntu. Therefore, I created the following link.               ln -s /media/data/Assets/ ~/bin/SomeJavaApp/data/assets      When I try to access the data within the application, the following error message appears.               Error message: Could not acquire data access      The NTFS parition is attached via auto mount in `/etc/fstab`. Here is the relevant configuration setting:               # Data partition auto mount.     UUID=159EBA47019D5D33 /media/data ntfs defaults,umask=007,uid=1000,gid=1000 0 0      My _HOME_ partition is formatted with ext4. The application I use is written in Java. Is there something, I can do about this besides copying the files to the _HOME_ partition? * * * I also get a Java error message when I start the application from the console.               java.lang.NullPointerException: Could not acquire data access      **@Gilles** :   The output of `ls -ld /media/data /media/data/Assets ~/bin/SomeJavaApp/data/assets` is:               lrwxrwxrwx 1 jjd jjd    92 Aug  9 11:01 /home/jjd/bin/SomeJavaApp/data/assets -> /media/data/Assets/     drwxrwx--- 1 jjd jjd 28672 Aug  6 14:49 /media/data     drwxrwx--- 1 jjd jjd  4096 Aug  8 14:32 /media/data/Assets/      The path I choose in the application is: `/home/jjd/bin/SomeJavaApp/data/assets`.


title: Bash function not working in Zsh

text: I have been slowly migrating from Bash to Zsh and have got to the point where everything I have moved across is working well, with one exception. I have a couple of functions in my `.bashrc` that I use dozens of times a day and two of them do not work under Zsh. The three functions comprise a basic note taking facility. They are currently in `.config/zsh/functions`:               function n() {      local arg files=(); for arg; do files+=( ~/".notes/$arg" ); done     ${EDITOR:-vi} "${files[@]}"      }          function nls() {     tree -CR --noreport $HOME/.notes | awk '{          if (NF==1) print $1;          else if (NF==2) print $2;          else if (NF==3) printf "  %s\n", $3          }'     }          # TAB completion for notes     function _notes() {     local files=($HOME/.notes/**/"$2"*)         [[ -e ${files[0]} ]] && COMPREPLY=( "${files[@]##~/.notes/}" )     }     complete -o default -F _notes n Which I source from `.zshrc` like so:               autoload bashcompinit     bashcompinit     # source zshrc functions file     source "$HOME/.config/zsh/functions" `nls` works as expected, but neither `n` nor `Tab` completion work. I read `man zshcompsys` where it says: > The function bashcompinit provides compatibility with bash's programmable > completion system. When run it will define the functions, compgen and > complete which correspond to the bash builtins with the same names. It will > then be possible to use completion specifications and functions written for > bash. However, when I try `Tab` completion, nothing happens and when I enter `n notename`, Vim opens my `/home` in file browser mode - not quite the expected behaviour. All of the other functions defined work well. How do I migrate these functions to work under Zsh?


title: RPM package naming convention

text: I'm a little confused with RPM package naming. When I do:               vickey@tb:/usr/include$ rpm -qf event.h      libevent-devel-2.0.10-2.fc15.i686      And:               vickey@tb:/usr/include$ repoquery --list  libevent-devel.i686     /usr/bin/event_rpcgen.py     /usr/include/evdns.h     /usr/include/event.h     ....     ....      Here in the second code box /usr/include/event.h is provided by libevent- devel.i686 but a query in the first code box shows that it belongs to the package libevent-devel-2.0.10-2.fc15.i686. Does package manager use these aliases?


title: Can I substitute partition number with UUID?

text: Here is my grub.cfg:               menuentry 'Debian 6.0 on hard disk' {         set  isofile="(hd0,6)/home/toinstall/debian.iso"         loopback  loop  $isofile         search --no-floppy --fs-uuid --set=root 8b29114c-4f89-4c96-b0c0-579ce58c7345         linux  (hd0,6)/hd-media/vmlinuz  root=UUID=8b29114c-4f89-4$         initrd (hd0,6)/hd-media/initrd.gz     }      It can run, it is ok. There are 3 hd0,6. Can I substitute partition number with uuid in the file?


title: How do you get hardware info and select drivers to be kept in a kernel compiled from source?

text: I would like to create a minimal kernel for a web server. When you compile a kernel from source how do you **get hardware info** and then know what drivers need to be kept in the kernel so the rest can be removed?


title: How do regular expressions differ from wildcards used to filter files

text: While we use `*` to denote zero or more previous characters in `grep`, we use `*.c` to find all C files when we use it with the `ls` command like `ls *.c`. Could someone tell how the use of `*` differs in these two cases?


title: compiling with gcc broken for users but fine for root

text: So somewhere along the way compiling as a regular user has stopped working on my server. I'm on Debian Stable. Can't think what has changed on my system that would result in this, or how to fix it, but now only root can compile.               user@box:~/code/helloworld$ gcc helloworld.c -o helloworld     In file included from /usr/include/stdio.h:28:0,                      from helloworld.c:3:     /usr/include/features.h:356:25: fatal error: /usr/local/include/sys/cdefs.h: Permission denied     compilation terminated.      Compiling as root is fine. I presume this is a permissions issue?               As user@server:          ls -la /usr/local/include/sys/cdefs.h     ls: cannot access /usr/local/include/sys/cdefs.h: Permission denied          ls -la /usr/local/include/sys/            ls: cannot access /usr/local/include/sys/.: Permission denied     ls: cannot access /usr/local/include/sys/..: Permission denied     ls: cannot access /usr/local/include/sys/apparmor.h: Permission denied     ls: cannot access /usr/local/include/sys/cdefs.h: Permission denied     total 0     d????????? ? ? ? ?            ? .     d????????? ? ? ? ?            ? ..     -????????? ? ? ? ?            ? apparmor.h     -????????? ? ? ? ?            ? cdefs.h      The user can read /usr/local/include fine. Root shows the perms on /usr/local/include/sys to be (note user is in staff group): drwxr-Sr-- 2 root staff 4096 Dec 7 08:20 sys Location of cdefs.h               locate cdefs.h     /usr/include/ldap_cdefs.h     /usr/include/i386-linux-gnu/sys/cdefs.h     /usr/include/sys/cdefs.h     /usr/local/include/sys/cdefs.h      I've tried fixing the perms but I can't get it right. Is there a way to ignore the cdefs.h from /usr/local and use the one it /usr/include/? Any help greatly appreciated!


title: Fixing header and print

text: I have header starting with '>' and I want fix the header by keeping first word and removing other shown as in output.txt and print it input.txt               >AGAJ01065549.1 scaffold:Xipmac4.4.2:AGAJ01065549.1:1:500:1 REF     CGCCAGGTGTCTGGCGTAATAGCGCCAGCGCCAGGTGTCATATACGTAATAGCGCCAGGT     >RGAMMT01065456.1 scaffold:Xipmac4.4.2:AGAJ01065595.1:1:500:1 REF     GACTAGTTTTTACATATAGTAATGGTTATTCGGAAGTGTACAGACGTTTTCAGGTTTTTT     TTTGGTAGGGGTTGAGGTGTTGAGGTGAGGGGACTATGTGGAGGGAACTTTCCATAGAGG      output.txt               >AGAJ01065549.1      CGCCAGGTGTCTGGCGTAATAGCGCCAGCGCCAGGTGTCATATACGTAATAGCGCCAGGT     >RGAMMT01065456.1      GACTAGTTTTTACATATAGTAATGGTTATTCGGAAGTGTACAGACGTTTTCAGGTTTTTT     TTTGGTAGGGGTTGAGGTGTTGAGGTGAGGGGACTATGTGGAGGGAACTTTCCATAGAGG


title: How do I start Xvfb on startup on Debian?

text: I’ve got a Debian web server that I’m using for occasional screen-scraping via Selenum and Python. I use Xvfb as a virtual X server for Firefox to run on when being controlled by Selenium. Given that I (think) I have to start this using `sudo`, I don’t think it’ll be feasible to start it from Python each time (see my Stack Overflow question), so I figured I could just have it running all the time. I currently start it like this at the command line:               sudo Xvfb :99 -nolisten tcp -fbdir /var/run      What method should I use to do this automatically at startup? Should I use `cron`, as suggested here?


title: Linux Mint system settings locked

text: The system settings for my Linux Mint OS, for example desktop background or mouse speed or screen resolution etc. won't change, for some reason. I just restarted my computer and for some reason the background had changed and the Computer icon was missing. When I tried to change these settings by going to the System Settings menu, the changes won't save. Is there a way to resolve this?


title: Running a Snow Leopard 10.6.7 Image on an AMD: The CPU has been disabled by the guest operating system

text: I am quite frustrated so I have turned to this medium in hoping to get an answer. After reading thousands of forums and trying out various methods (I have lost track what I have tried already) I still haven't solved my problem. That is, I am trying to run a Mac OS X Snow Leopard VMware image 10.6.7 on my AMD quad core computer with VMware Workstation 9.0. My latest attempt involves opening the specific configuration .vmx file (which is linked to a VMware image .vmdk) and hence booting it with help of a kernel (darwin.iso). A description of these steps undertaken can be found here: http://anonymous00.hubpages.com/hub/Installing-Mac-OSX-On-Windows I have tried different VMware images and different kernels, but I keep getting the error: "The CPU has been disabled by the guest operating system (...)". So I am guessing that something went wrong when unlocking the Mac OS X (I don't know how to check this however, since the Mac OS X Guest Host seems to be installed and unlocked correctly, that is it appears in the list of available guest hosts). So community, what do you think I should try? A couple of things I have tried already:   * Applying a mask (adding the line cpuid.1.eax = "0000:0000:0000:0001:0000:0110:1010:0101" in the .vmx file)   * Trying to install the operating system instead of running (hence booting from a .iso file): this didn't work as well: my computer didn't recognize the operating system.   * Different versions of kernels and different VMware images (including images that are meant only for AMD processors) Please help! P.s.: yes, I have enabled Virtualization in my BIOS. * * * **My computer specifications:** AMD A6-3410MX APU with Radeon(tm) HD Graphics 1.60GHz; Memory (RAM): 6.00GB; System type: 64-bit; Model: HP Pavilion dv7 Notebook PC


title: How do I know that FXP is enabled or not? (AIX FTPD)

text: # grep -i ftp inetd.conf     ftp     stream  tcp     nowait  root    /usr/sbin/ftpd     # oslevel -s                 6100-06-05-1115      So I have an AIX 6 server. How can I check if FXP is enabled on the FTPD or not?


title: Ubuntu12.04: How to disable a daemon process at startup

text: I normally use `service start/stop` or `initctl start/stop` to start or stop a daemon process but now what I am looking for is to disable a daemon process from starting at startup example `mysqld`. Currently what am doing is renaming `/etc/init/mysql.conf` to `/etc/init/mysql.conf.bak` but after reading a little about `systemd` I came to know that it provides `enable & disable` option for the above task. So, is there something similar in ubuntu 12.04 with `upstart`.


title: How does `stdin` of linux work?

text: I know that `stdin` refers to standard input in linux, usually the keyboard. It can also be referred by `file descriptor 0`. So, which file descriptor does the (standard input) mouse refer to? Or is it a special file which functions in a very different way, when compared to other files, or input files? So how does the mouse work and where is the input from the mouse mapped to? The same questions apply to a touchscreen.


title: Reasons for Busybox on Current Systems

text: Being initially developed for use on a floppy-sized bootable system, busybox was designed with a small memory footprint in mind. Today it is used not only on actually small systems like routers and maybe washing machines and microwave ovens, but also on high powered NAS, Smartphones and rescue systems for Desktop Linux Distributions. (On the latter maybe for ensuring it fits in some boot loader images?) But being a single binary it also is a single point of failure. Why don't just use a standard user land instead of busybox on such machines?


title: How to search and replace text in all php-files in a directory and it's subdirectories

text: I am looking for a shell script that recursively traverses all `.php` files in a directory and performs a search & replace of a particular text pattern. The search pattern is quite long ( > 5000 characters) so it might be saved in another textfile for convenience. Also it contains forward slash characters. edit: i think i figured out the first part:               find . -name "*.php"      but then how do i search & replace in those files?


title: Upgrade Firefox in Linux Mint 10

text: For some reason a while ago I was no longer able to use the Firefox that came with my Linux Mint 10 virtual machine. I've installed the new version of Firefox (16) using both the package manager and extracting the `tar` file but when I go to `/opt/firefox16/firefox`, it says: > /usr/bin/firefox: No such file or directory I also have a symlink so it should automatically go there but I just keep getting that message. Any ideas?


title: What does this iptables command do?

text: Does `iptables -I INPUT -j ACCEPT` open all ports?


title: How to add unity-greeter in Debian wheezy with GDM 3

text: There are two questions I would like to ask.   1. How do we install unity-greeter in Debian wheezy with GDM 3 to have an Ubuntu style login screen ?   2. How do we have a rounded-styled login box with default gdm 3 setup ?


title: pacman does not sync core

text: I run as root `pacman -Syu`   However it just skips right over [core], without prompts, etc.   Just like it was normal to proceed when 0% done. It just proceeds with extra and community.   How can I force the db to be updated or preferably fix this behaviour?


title: sh and grep numbers only

text: I'm facing a problem and trying to find a solution that works in **sh**. If I could use bash this code would work:               ls /a|grep ^[0-9]      Unfortunately this is not the case with sh, and yes I need to use sh. :) Running in sh i get               ls /a |grep ^[0-9]     [0-9]: not found     Usage: grep -hblcnsviw pattern file . . .      If I remove the ^ the code works but I need only the files that start with numbers and not the ones that contains numbers. Example, I need the files that are like:               12.00.2     2.222.1234.12      from the grep man page I should be able to use `^`. For the time being my implementation was done by using:               ls /a|grep -v [a-z]|grep -v [A-Z]      As this will remove all the files that contains chars, but still if a file is .123.33 it will show up.


title: How to execute a bash script on multiple directories?

text: I have a `conv.sh` script that loops over MP3 files in the current directory and converts them into OGG. I have also several directories {F1, F2,..., F20} at `/path/to/Files/`. How should I execute `conv.sh` on all of these directories?


title: How to provide GUI interface to all users of Ubuntu?

text: I have "Ubuntu Dekstop" installed in VirtualBox in a Windows 7 PC. How can I configure it to provide a GUI interface to every user I create in the Ubuntu?   Should I install "Ubuntu Server" to accomplish this?   Can this be done in Ubuntu? I remember working in a place where solaris was intalled in a server and every user used to login using cygwin and get a solaris GUI desktop.   Can this be done? And what is this feature called? I am asking this for an event for the following purpose.   I want to install ruby on rails in an ubuntu machine and create 5 users in the ubuntu.   These 5 users will have their own Windows 7 laptops.   These 5 users should be able to get their own GUI desktop on their Windows 7 laptop. And can this be done by installing Ubuntu in Virtual Box in a Windows 7 PC? Please help.


title: postconf -e postfix_mydestination = localhost blah.deblah.com.au

text: Above is example of command someone used to successfully direct to subdomain but when I try it I get `postconf: fatal: missing '=' after attribute name` which makes no sense to me when clearly the equal sign is there.


title: Sanity checking MD5 sums

text: Do MD5 checksums contain a checkbit? I have to copy some MD5 checksums by hand (there's no other way) and was wondering whether there is any code out there that can validate a checksum as being valid in the same way one can validate a credit card number. Just to be clear, I'm not asking how to generate an MD5 sum from a file so that I can compare it with the sum I've been given, I'm asking if it's possible (and I doubt it is) to validate that an MD5 sum is a genuine MD5 sum without actually making any reference back to the bytes that have been used to generate the sum. I want to identify a possible typo.


title: Does grep use a cache to speed up the searches?

text: I have noticed that subsequent runs of `grep` on the same query (and also a different query, but on the same file) are much faster than the first run (the effect is easily noticeable when searching through a big file). This suggests that grep uses some sort of caching of the structures used for search, but I could not find a reference on the Internet. What mechanism enables `grep` to return results faster in subsequent searches?


title: How to get top 5 most ram intensive applications from Bash?

text: So I look at avaliable to me servers load ![enter image description here](http://i.stack.imgur.com/vsBGD.png) and see that some other user has created some really ram intensive app that kills my server hosting abileties. I wonder what is bash command to get top 5 most ram using applications n my server. How would such command look like?


title: Parsing of command line options

text: For I school project, I have to implement a shell/terminal app. But I am wondering how are command line options parsed, because it appears abit weird to be. For example for the command paste (and I believe other utilities behave similarly)               [jiewmeng@JM tmp]$ paste --help     Usage: paste [OPTION]... [FILE]...      Behavior when combining multiple options into one               [jiewmeng@JM tmp]$ paste -ds file1     file1 xxx     file1     d aaws dafd a      Here it appears options are just ignored ...               [jiewmeng@JM tmp]$ paste -sd file1      It behaves the same as `paste -`, waiting for `stdin`. But when its valid combination               [jiewmeng@JM tmp]$ paste -sd. file1     file1 xxx.file1.d aaws dafd a      It works. Shouldn't the invalid one give an error instead of waiting for `stdin`?               [jiewmeng@JM tmp]$ paste -d     paste: option requires an argument -- 'd'     Try 'paste --help' for more information.      Ok, makes sense `d` requires an argument, but ...               [jiewmeng@JM tmp]$ paste -d file1      ... waits for `stdin`. why?


title: I/O statistics per user

text: I have access to an academic supercomputer where there is an NFS filesystem where our lab keeps our data. When I run `iostats -nh` I believe I am getting statistics for **all** users accessing all storage devices. Is there a way to see **my own** I/O statistics on this particular NFS filesystem? i.e. see how much of the total load is mine?


title: Installing new Operating System such as FreeBSD with PXE boot?

text: I am no expert on this issue, I am maybe even using the wrong technical term. Anyway, my goal is this: to install a new OS from a server that has the installation documents etc so some settings in boot-loader apparently. I would like to install FreeBSD here but I am lacking physical mediums to install it. Is there any easy way to upgrade the system through network (as far as I have understood, this is what the PXE is for)? **Perhaps related**   1. http://superuser.com/questions/397646/cloning-fresh-windows-7-fsed-hdd-to-linux-server-because-having-no-external-hdd


title: Should I use LILO or GRUB or other?

text: I am making a netinstall DVD which will have netinstall for 10 different Linux distros on it. I will need to install a bootloader on the disk so I can choose which distro I want to install. Which is the easiest to set up and put on a disc - LILO or GRUB? Or are there even easier ones? I don't need any advanced settings, etc - I just need a simple, easy to set up, bootloader.


title: Ignore file changes

text: I have a process, which generates a file with configuration data and then calls a subprocess with this data as parameter. I'd like to override the configuration data, which is passed. The problem is, that I have no control over that process. I've tried to make the file immutable using `chattr +i` so that my changes get untouched from the process, but the process creating the file returns an error. So is there another option, that I can use? EDIT: More specific: processA deletes `settings.ovp`n and then creates it again with the new content. Then it calls `openvpn --settings settings.opvn`. I want to override settings.ovpn, because it is generated wrong.


title: Are there 2 ways to set awk vars via command line?

text: I noticed an O'Reilly `awk` example (1997) which assigned an awk variable by setting it on the command line **after** the program-text. It does work, but I can't find this syntax in _man / info awk_. Have I just missed it; is it depricated...? The only syntax I've seen in the manual is the `-v` option.               awk '/home/{print foo, bar}' foo="cat" bar="dog" /proc/$$/cmdline      Output: `cat dog`


title: Creating SSH Terminal Wrapper

text: I'm new to scripting, but somewhat familiar with Linux. I am actually using this on a Fedora16 build, with Gnome3 and gnome-terminal... fyi. I flip through all sorts of ssh terminals all day long and I thought it would be nice to create a ssh script called lambda that contains information that is sent to a terminal_wrapper script that accepts all sorts of variables and creates a new gnome-terminal based on those given variables. The information I would like would be to rename the title, change bg and fg colors, and start an ssh in a new gnome-terminal window. I feel like I'm close to getting the ssh to work, but I'm missing something. Here is what I've got for my ssh script for lambda: `terminal_wrapper user lambda.company.com` And here is my terminal_wrapper: `gnome-terminal --title=$2 -e ssh $1 $2` It opens a new window for me, renames it to the lambda.company.com, and then sits there and closes after a second. Any help? Thanks.


title: automount nfs: autofs timeout settings for unreliable servers - how to avoid hangup?

text: I'm running a small server for our flat share. It's mostly a **file server** with some additional services. The clients are Linux machines (mostly Ubuntu, but some others Distros too) and some Mac(-Book)s in between (but they're not important for the question). The server is running _Ubuntu 11.10_ (Oneiric Ocelot) 'Server Edition', the system from which I do my setup and testing runs the 11.10 'Desktop Edition'. We where running our shares with Samba (which we are more familiar with) for quite some time but then migrate to **NFS** (because we don't have any Windows users in the LAN and want to try it out) and so far _everything works fine_. Now I want to setup auto-mounting with **autofs** to smooth things up (up to now everyone mounts the shares manually when needed). The auto-mounting seems to work too. The problem is that our "server" don't run 24/7 to save energy (if someone needs stuff from the server s/he powers it on and shuts it down afterwards, so it only runs a couple of hours each day). But since the autofs setup the clients hang up quit often when the server isn't running.   * I can start all clients just fine, even when the server ain't running.    * But when I want to display a directory (in terminal or nautilus), that contains symbolic links to a share under `/nfs` while the server ain't running, it hangs for at least two minutes (because autofs can't connect to the server but keeps trying, I assume).      * Is there a way to avoid that? So that the mounting would be delayed till a change into that directory or till content of that dir get accessed? Not when "looking" at a link to a share under `/nfs`? I think not, but maybe don't try it for so long? And just give me an empty dir or a "can't find / connect to that dir" or something like that.   * When the server is running, everything works fine.    * But when the server gets shut down, _before_ a share got unmounted, tools (like `df` or `ll`) hang (assuming because they think the share is still on but the server won't respond anymore).      * Is there a way to unmount shares automatically, when the connection gets lost?   * Also the clients won't shutdown or restart when the server is down and they have still shares mounted. They hang (infinitely as it seems) in " _killing remaining processes_ " and nothing seems to happen. **I think it all comes down to neat timeout values for mounting and unmounting. And maybe to remove all shares when the connection to the server gets lost.** So my question is: How to handle this? And as a bonus: is there a good way to link inside `/nfs` without the need to mount the real shares (an autofs option or maybe using a pseudo FS for `/nfs` which gets replaced when the mount happens or something like that)? # My Setup The **NFS setting** is pretty basic but served us well so far (using **NFSv4** ): **/etc/default/nfs-common**               NEED_STATD=     STATDOPTS=     NEED_IDMAPD=YES     NEED_GSSD=      **/etc/idmapd.conf**               [General]     Verbosity = 0     Pipefs-Directory = /var/lib/nfs/rpc_pipefs     Domain = localdomain     [Mapping]     Nobody-User = nobody     Nobody-Group = nogroup      **/etc/exports**               /srv/   192.168.0.0/24(rw,no_root_squash,no_subtree_check,crossmnt,fsid=0)      Under the export root `/srv` we got two directories with `bind`: **/etc/fstab** (Server)               ...     /shared/shared/      /srv/shared/      none    bind  0 0     /home/Upload/        /srv/upload/      none    bind  0 0      The 1st one is mostly read only (but I enforce that through file attributes and ownership instead of NFS settings) and the 2nd is _rw_ for all. Note: They have no extra entries in _/etc/exports_ , mounting them separately works though. On the client side they get setup in `/etc/fstab` and mounted manually as needed (`morton` is the name of the server and it resolves fine). **/etc/fstab** (Client)               morton:/shared  /nfs/shared nfs4    noauto,users,noatime,soft,intr,rsize=8192,wsize=8192    0   0     morton:/upload  /nfs/upload nfs4    noauto,users,noatime,soft,intr,rsize=8192,wsize=8192    0   0      For the **autofs setup** I removed the entries from `/etc/fstab` on the clients and set the rest up like this: **/etc/auto.master**               /nfs    /etc/auto.nfs      First I tied the supplied executable `/etc/auto.net` (you can take a look at it here) but it wont automatically mount anything for me. Then I write a `/etc/auto.nfs` based on some HowTos I found online: **/etc/auto.nfs**               shared  -fstype=nfs4  morton:/shared     upload  -fstype=nfs4  morton:/upload      And it kinda works... Or would work if the server would run 24/7. So we get the hangups when a client boots without the server running or when the server goes down while shares where still connected.


title: Running Apache with Tomcat

text: I was wondering if it's possible to run a Tomcat server within Apache whilst also running PHP servers under other virtual host instances? And if so, how is this done? Basically, I'm trying to run an Apache server that redirects to different applications based on the DNS address used. For example: www.javaapp.com -> Sends the Java application to the clients browser and www.phpapp.com -> Sends a PHP application to the clients browser And I was also wondering if there's a way of adding a third application in RoR as well, and whether Apache can serve Rails or not? I am currently using Tomcat for my JSP application, I know this can be integrated with Apache, but I wasn't sure if it could be done alongside applications written in other languages. As I know that Apache is able to redirect to virtual hosts based on the DNS address entered, which I thought was pretty cool and would really help me to host multiple applications on my box that I'm writing.


title: find file, copy but with different name

text: I have files with random numbers in /home/user/files folder (every 4 days I have new ones). for example:               john20     john25     john40     tom12     tom32     simon2     simon8     simon53      I want to take only last modified files (the newest) and copy them to different location (/home/user/fixed) without that numbers in file name. I know how to filter and copy that using find command but I don't know how copy all of them without that numbers.               find $files_are_here -maxdepth 1 -mtime -2 -type f -exec cp {} $new_path \;      This will copy all of the files modified in the last 2 days to the new path but with original name. In my case:               john40     tom32     simon53      but I would like to have only john, tom and simon inside that folder. So after I run my script again they will be replaced by the newest one.


title: Measuring context switches of a LWP gives incorrect results. Why?

text: I have a Java thread pinned at my cpu core. It is busy spinning and I see through `top` that it is running fine:               %Cpu0  :  0.0 us,  0.0 sy,  0.0 ni,100.0 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st     %Cpu1  :  0.0 us,  0.0 sy,  0.0 ni,100.0 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st     %Cpu2  :100.0 us,  0.0 sy,  0.0 ni,  0.0 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st     %Cpu3  :  0.0 us,  0.0 sy,  0.0 ni,100.0 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st      I traced down the LWP number of the Java thread, with the steps below: First the JVM PID:               $ ps -ef | grep -i java | grep -v grep     1000      9062  1531 99 22:41 pts/0    00:16:42 java -cp target/mylib-all.jar -Dbind=2 com.examples.PinnedThread      Then the LWP ID:               $ ps -eLo pid,lwp,nlwp | grep 9062      9062  9062   20      9062  9063   20      9062  9064   20      9062  9065   20      9062  9066   20      9062  9067   20      9062  9068   20      9062  9069   20      9062  9070   20      9062  9071   20      9062  9072   20      9062  9073   20      9062  9074   20      9062  9075   20      9062  9076   20      9062  9077   20      9062  9078   20      9062  9079   20      9062  9080   20      9062  9105   20      It is one of those in the second column above, so I use jstack to find out:               $ jstack 9062          "PinnedThread" prio=10 tid=0x00007fcf9817b800 nid=0x2378 runnable [0x00007fcf7e1ed000]        java.lang.Thread.State: RUNNABLE      0x2378 is 9080 in DEC, so I found the LWP for my thread, it is **9080**. Now I want to monitor my thread context switches, so I do:               $ watch -n.5 grep ctxt /proc/9080/status     Every 0.5s: grep ctxt /proc/9080/status          voluntary_ctxt_switches:        9     nonvoluntary_ctxt_switches:     120743      Problem is: `nonvoluntary_ctxt_switches` increments like a counter, non-stop and fast. I am sure my thread is not doing hundreds of context switches per second. What is going on here? Is that something particular about LWP and that `nonvoluntary_ctxt_switches` ? Interesting enough, if I check the status of the main process PID (JVM), I get much quieter numbers:               $ cat /proc/9062/status | grep ctxt     voluntary_ctxt_switches:    3     nonvoluntary_ctxt_switches: 2      And they never change! Can anyone shed a light here? I am pinning the thread with `sched_setaffinity` and it looks from `top` that this part is working very well but 100 `nonvoluntary_ctxt_switches` per second doesn't make any sense. I also tried to use pidstat and it gives me 84 nonvoluntary_ctxt_switches per second. :(               pidstat -w -I -t -p 9062 3 | grep 9080     12:21:07 AM         -     9080      0.00     84.33  |__java     12:21:10 AM         -     9080      0.00     84.00  |__java     12:21:13 AM         -     9080      0.00     84.33  |__java      Here is what my thread is doing, in other words, nothing, just busy spinning and incrementing a counter:                   Thread t = new Thread(new Runnable() {                  long count = 0;                  @Override             public void run() {                      Affinity.bind();                      try {                          while(true) {                         count = (count == Long.MAX_VALUE ? 0 : count + 1);                     }                      } finally {                     Affinity.unbind();                 }             }         }, "PinnedThread");      Below is my `/proc/interrupts`. I turned off `irqbalance`, so all hardware interrupts should go to CPU0. For CPU2 I have:   * 23 is moving very slowly (IO-APIC-fasteoi ehci_hcd:usb2)   * NMI is moving one per second (Non-maskable interrupts)   * LOC is moving very fast (Local timer interrupts)   * PMI is moving one per second (Performance monitoring interrupts)               $ watch -n.5 cat /proc/interrupts                CPU0       CPU1       CPU2       CPU3       CPU4       CPU5       CPU6       CPU7       0:         43          0          0          0          0          0          0          0   IO-APIC-edge      timer       1:          3          0          0          0          0          0          0          0   IO-APIC-edge      i8042       8:          1          0          0          0          0          0          0          0   IO-APIC-edge      rtc0       9:          0          0          0          0          0          0          0          0   IO-APIC-fasteoi   acpi      12:          4          0          0          0          0          0          0          0   IO-APIC-edge      i8042      16:      67936        557       1530        275       6474       2516      16305       4790   IO-APIC-fasteoi   ehci_hcd:usb1, nouveau      17:         59          2          0          0          6          1          0          0   IO-APIC-fasteoi   snd_hda_intel      23:    3109042     102263      57885       9186     196294     119229     716776     184137   IO-APIC-fasteoi   ehci_hcd:usb2      40:          0          0          0          0          0          0          0          0   PCI-MSI-edge      PCIe PME      41:          0          0          0          0          0          0          0          0   PCI-MSI-edge      PCIe PME      42:          0          0          0          0          0          0          0          0   PCI-MSI-edge      PCIe PME      43:          0          0          0          0          0          0          0          0   PCI-MSI-edge      PCIe PME      44:          0          0          0          0          0          0          0          0   PCI-MSI-edge      PCIe PME      45:          0          0          0          0          0          0          0          0   PCI-MSI-edge      PCIe PME      46:      16996        781        242         46       5245       1435       3424        932   PCI-MSI-edge      ahci      47:          0          0          0          0          0          0          0          0   PCI-MSI-edge      ahci      48:          0          0          0          0          0          0          0          0   PCI-MSI-edge      xhci_hcd      49:          0          0          0          0          0          0          0          0   PCI-MSI-edge      xhci_hcd      50:          0          0          0          0          0          0          0          0   PCI-MSI-edge      xhci_hcd      51:          0          0          0          0          0          0          0          0   PCI-MSI-edge      xhci_hcd      52:          0          0          0          0          0          0          0          0   PCI-MSI-edge      xhci_hcd      53:          0          0          0          0          0          0          0          0   PCI-MSI-edge      xhci_hcd      54:          0          0          0          0          0          0          0          0   PCI-MSI-edge      xhci_hcd      55:          0          0          0          0          0          0          0          0   PCI-MSI-edge      xhci_hcd      56:          0          0          0          0          0          0          0          0   PCI-MSI-edge      xhci_hcd      57:         13          0          0          0          0          0          0          0   PCI-MSI-edge      mei      58:        300         31          0          0         21          0          0          0   PCI-MSI-edge      snd_hda_intel     NMI:       2966       2642      10738       3122       1490       1251        858        136   Non-maskable interrupts     LOC:    1549246     742527    2500092     745512     465500     434371     451682     117591   Local timer interrupts     SPU:          0          0          0          0          0          0          0          0   Spurious interrupts     PMI:       2966       2642      10738       3122       1490       1251        858        136   Performance monitoring interrupts     IWI:          0          0          0          0          0          0          0          0   IRQ work interrupts     RTR:          7          0          0          0          0          0          0          0   APIC ICR read retries     RES:     153708      47896         15         39       4188       4699          1          1   Rescheduling interrupts     CAL:        299        345        390        391        346        213        391        386   Function call interrupts     TLB:      49114      50157        826        292      44726      44832         86          4   TLB shootdowns     TRM:          0          0          0          0          0          0          0          0   Thermal event interrupts     THR:          0          0          0          0          0          0          0          0   Threshold APIC interrupts     MCE:          0          0          0          0          0          0          0          0   Machine check exceptions     MCP:         99         99         99         99         99         99         99         99   Machine check polls     ERR:          0     MIS:          0


title: How to suppress su authentication failure warning?

text: I created an account "`diag`" and set it as expired (`usermod --expiredate 1`). Then I have a script which I want to run to log into it, so in the script I use the following command:               su -s /bin/bash - diag      This outputs like so:               Your account has expired; please contact your system administrator     su: Authentication failure     (Ignored)     diag@computer:~$      And then I'm able to use the account, as expected. I want to suppress the first three lines, the warning about the expired account. I tried adding `2> /dev/null` to the end of the command, but that suppresses all the output from bash; I just get a blank response, and I can type commands into it and see the result from them, but I see no bash prompt. I tried adding just `> /dev/null` and that does nothing. So I've deduced that apparently `su` is piping all its output over `stderr`. How can I get `su` to just suppress those first three lines, but otherwise act normally as if the account weren't expired?