Razer Ouroboros mouse not working

# The Problem I don't mean the extra keys and what not, I'm just talking about getting the pointer to move across the screen and the left and right buttons to click. I've got it plugged into the system directly using the cable. I'm running Gentoo right now. The mouse works fine in the Ubuntu live CD on the same machine. I got it working on another Gentoo installation. That installation has three major differences:   1. It is slightly more up to date.   2. I was using a USB3 port, instead of a USB2 port.   3. It's using a genkernel kernel, instead of a custom one. I've been unable to test genkernel on this machine because genkernel is apparently unable to generate a kernel that boots on this one. Next thing I can try is to update my installation. I also need to try this on something like Ubuntu to see if it can autodetect the hardware, because that will confirm that my problem is related to configuration. So does anyone have any ideas? I couldn't find **anything** about this mouse on Linux on the Internet. I've also never seen a mouse flat-out not working on Linux. Here's the relevant output I could find:               cat /dev/input/event9     ÂµS°cat: /dev/input/event9: No such device     cat: /dev/input/event9: No such device      _In this case`event9` is the device assigned to the mouse, see `Xorg.0.log` below._   The characters before the error messages are random, which make me think they are mouse movements. They also pop up after some time. The mouse appears to disconnect / reconnect whenever I press one of the mouse buttons:               Jul  7 23:09:33 straylight kernel: usb 2-1.2: USB disconnect, device number 10     Jul  7 23:09:34 straylight kernel: usb 2-1.2: new full-speed USB device number 11 using ehci-pci     Jul  7 23:09:34 straylight kernel: usb 2-1.2: New USB device found, idVendor=1532, idProduct=0032     Jul  7 23:09:34 straylight kernel: usb 2-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0     Jul  7 23:09:34 straylight kernel: usb 2-1.2: Product: Razer Ouroboros     Jul  7 23:09:34 straylight kernel: usb 2-1.2: Manufacturer: Razer     Jul  7 23:09:34 straylight kernel: input: Razer Razer Ouroboros as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/input/input31     Jul  7 23:09:34 straylight kernel: hid-generic 0003:1532:0032.001D: input,hidraw4: USB HID v1.11 Mouse [Razer Razer Ouroboros] on usb-0000:00:1d.0-1.2/input0     Jul  7 23:09:34 straylight kernel: input: Razer Razer Ouroboros as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.1/input/input32     Jul  7 23:09:34 straylight kernel: hid-generic 0003:1532:0032.001E: input,hidraw5: USB HID v1.11 Keyboard [Razer Razer Ouroboros] on usb-0000:00:1d.0-1.2/input1     Jul  7 23:09:34 straylight kernel: input: Razer Razer Ouroboros as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.2/input/input33     Jul  7 23:09:34 straylight kernel: hid-generic 0003:1532:0032.001F: input,hidraw6: USB HID v1.11 Keyboard [Razer Razer Ouroboros] on usb-0000:00:1d.0-1.2/input2      # Things I've Tried   * I re-compiled my kernel with CONFIG_USB_EHCI_TT_NEWSCHED=y, since some people suggested that. It had no effect as far as I could tell.   * I upgraded my kernel to the newest version that was available, no change.   * I tried the kernel config from the other Gentoo machine, no change. # Currently Investigating   * I suspect there's some sort of issue with USB2 vs USB3. The other machine has a USB3 port, and the problematic one doesn't. I've also experienced problems with this regarding MTP. # Assorted Logs **dmesg**               [  731.127793] hub 1-1:1.0: debounce: port 6: total 100ms stable 100ms status 0x101     [  731.138749] hub 1-1:1.0: port 6 not reset yet, waiting 10ms     [  731.200606] usb 1-1.6: new full-speed USB device number 11 using ehci_hcd     [  731.211559] hub 1-1:1.0: port 6 not reset yet, waiting 10ms     [  731.287115] usb 1-1.6: skipped 1 descriptor after interface     [  731.287122] usb 1-1.6: skipped 1 descriptor after interface     [  731.287126] usb 1-1.6: skipped 1 descriptor after interface     [  731.287478] usb 1-1.6: default language 0x0409     [  731.287967] usb 1-1.6: udev 11, busnum 1, minor = 10     [  731.287969] usb 1-1.6: New USB device found, idVendor=1532, idProduct=0032     [  731.287971] usb 1-1.6: New USB device strings: Mfr=1, Product=2, SerialNumber=0     [  731.287973] usb 1-1.6: Product: Razer Ouroboros                                                                         [  731.287974] usb 1-1.6: Manufacturer: Razer     [  731.288020] usb 1-1.6: usb_probe_device     [  731.288023] usb 1-1.6: configuration #1 chosen from 1 choice     [  731.288482] usb 1-1.6: adding 1-1.6:1.0 (config #1, interface 0)     [  731.288511] usbhid 1-1.6:1.0: usb_probe_interface     [  731.288513] usbhid 1-1.6:1.0: usb_probe_interface - got id     [  731.289236] input: Razer Razer Ouroboros as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.6/1-1.6:1.0/input/input32     [  731.289292] hid-generic 0003:1532:0032.001A: input,hidraw1: USB HID v1.11 Mouse [Razer Razer Ouroboros] on usb-0000:     00:1a.0-1.6/input0     [  731.289303] usb 1-1.6: adding 1-1.6:1.1 (config #1, interface 1)     [  731.289324] usbhid 1-1.6:1.1: usb_probe_interface     [  731.289326] usbhid 1-1.6:1.1: usb_probe_interface - got id     [  731.291438] input: Razer Razer Ouroboros as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.6/1-1.6:1.1/input/input33     [  731.291467] usb 1-1.6: link qh1-0601/ffff880129a56100 start 0 [1/2 us]     [  731.291512] hid-generic 0003:1532:0032.001B: input,hidraw2: USB HID v1.11 Keyboard [Razer Razer Ouroboros] on usb-00     00:00:1a.0-1.6/input1     [  731.291522] usb 1-1.6: adding 1-1.6:1.2 (config #1, interface 2)     [  731.291542] usbhid 1-1.6:1.2: usb_probe_interface     [  731.291544] usbhid 1-1.6:1.2: usb_probe_interface - got id     [  731.292411] input: Razer Razer Ouroboros as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.6/1-1.6:1.2/input/input34     [  731.292518] usb 1-1.6: link qh1-3008/ffff880129a56800 start 0 [1/2 us]     [  731.292567] hid-generic 0003:1532:0032.001C: input,hidraw3: USB HID v1.11 Keyboard [Razer Razer Ouroboros] on usb-00     00:00:1a.0-1.6/input2     [  731.292582] hub 1-1:1.0: state 7 ports 6 chg 0000 evt 0040     [  731.302537] joydev: version magic '3.6.11-ck SMP mod_unload modversions ' should be '3.6.11-ck SMP preempt mod_unloa     d '     [  731.302576] joydev: version magic '3.6.11-ck SMP mod_unload modversions ' should be '3.6.11-ck SMP preempt mod_unloa     d '     [  731.302606] joydev: version magic '3.6.11-ck SMP mod_unload modversions ' should be '3.6.11-ck SMP preempt mod_unloa     d '      **/var/log/messages**                   Jul  3 22:42:11 straylight kernel: [  712.192976] usb 1-1.6: unlink qh1-3008/ffff880129abc000 start 0 [1/2 us]         Jul  3 22:42:11 straylight kernel: [  712.193600] usb 1-1.6: unlink qh1-0601/ffff880129abcc80 start 0 [1/2 us]         Jul  3 22:42:11 straylight kernel: [  712.205991] ehci_hcd 0000:00:1a.0: reused qh ffff880129abc000 schedule         Jul  3 22:42:11 straylight kernel: [  712.205999] usb 1-1.6: link qh1-3008/ffff880129abc000 start 0 [1/2 us]         Jul  3 22:42:11 straylight kernel: [  712.206071] ehci_hcd 0000:00:1a.0: reused qh ffff880129abcc80 schedule         Jul  3 22:42:11 straylight kernel: [  712.206073] usb 1-1.6: link qh1-0601/ffff880129abcc80 start 0 [1/2 us]         Jul  3 22:42:11 straylight kernel: [  712.208558] usb 1-1.6: unlink qh1-0601/ffff880129abcc80 start 0 [1/2 us]         Jul  3 22:42:11 straylight kernel: [  712.208846] usb 1-1.6: unlink qh1-3008/ffff880129abc000 start 0 [1/2 us]         Jul  3 22:42:11 straylight kernel: [  712.233918] ehci_hcd 0000:00:1a.0: reused qh ffff880129abcc80 schedule         Jul  3 22:42:11 straylight kernel: [  712.233925] usb 1-1.6: link qh1-0601/ffff880129abcc80 start 0 [1/2 us]         Jul  3 22:42:11 straylight kernel: [  712.234942] ehci_hcd 0000:00:1a.0: reused qh ffff880129abc000 schedule         Jul  3 22:42:11 straylight kernel: [  712.234950] usb 1-1.6: link qh1-3008/ffff880129abc000 start 0 [1/2 us]         Jul  3 22:42:11 straylight kernel: [  712.236489] usb 1-1.6: unlink qh1-0601/ffff880129abcc80 start 0 [1/2 us]         Jul  3 22:42:11 straylight kernel: [  712.237862] usb 1-1.6: unlink qh1-3008/ffff880129abc000 start 0 [1/2 us]         Jul  3 22:42:11 straylight kernel: [  712.287776] ehci_hcd 0000:00:1a.0: reused qh ffff880129abcc80 schedule         Jul  3 22:42:11 straylight kernel: [  712.287783] usb 1-1.6: link qh1-0601/ffff880129abcc80 start 0 [1/2 us]         Jul  3 22:42:11 straylight kernel: [  712.289711] ehci_hcd 0000:00:1a.0: reused qh ffff880129abc000 schedule         Jul  3 22:42:11 straylight kernel: [  712.289714] usb 1-1.6: link qh1-3008/ffff880129abc000 start 0 [1/2 us]         Jul  3 22:42:11 straylight kernel: [  712.290350] usb 1-1.6: unlink qh1-0601/ffff880129abcc80 start 0 [1/2 us]         Jul  3 22:42:11 straylight kernel: [  712.292682] usb 1-1.6: unlink qh1-3008/ffff880129abc000 start 0 [1/2 us]         Jul  3 22:42:11 straylight kernel: [  712.326145] hub 1-1:1.0: state 7 ports 6 chg 0000 evt 0040         Jul  3 22:42:11 straylight kernel: [  712.326411] hub 1-1:1.0: port 6, status 0100, change 0001, 12 Mb/s         Jul  3 22:42:11 straylight kernel: [  712.326549] usb 1-1.6: USB disconnect, device number 9         Jul  3 22:42:11 straylight kernel: [  712.326553] usb 1-1.6: unregistering device         Jul  3 22:42:11 straylight kernel: [  712.326556] usb 1-1.6: unregistering interface 1-1.6:1.0         Jul  3 22:42:11 straylight kernel: [  712.340765] usb 1-1.6: unregistering interface 1-1.6:1.1         Jul  3 22:42:11 straylight kernel: [  712.363711] usb 1-1.6: unregistering interface 1-1.6:1.2         Jul  3 22:42:11 straylight kernel: [  712.386641] usb 1-1.6: usb_disable_device nuking all URBs         Jul  3 22:42:11 straylight kernel: [  712.490532] hub 1-1:1.0: debounce: port 6: total 100ms stable 100ms status 0x100         Jul  3 22:42:23 straylight kernel: [  724.582656] hub 1-1:1.0: state 7 ports 6 chg 0000 evt 0040         Jul  3 22:42:23 straylight kernel: [  724.583140] hub 1-1:1.0: port 6, status 0101, change 0001, 12 Mb/s         Jul  3 22:42:23 straylight kernel: [  724.686611] hub 1-1:1.0: debounce: port 6: total 100ms stable 100ms status 0x101         Jul  3 22:42:23 straylight kernel: [  724.697599] hub 1-1:1.0: port 6 not reset yet, waiting 10ms         Jul  3 22:42:23 straylight kernel: [  724.759421] usb 1-1.6: new full-speed USB device number 10 using ehci_hcd         Jul  3 22:42:23 straylight kernel: [  724.770414] hub 1-1:1.0: port 6 not reset yet, waiting 10ms         Jul  3 22:42:23 straylight kernel: [  724.846327] usb 1-1.6: skipped 1 descriptor after interface         Jul  3 22:42:23 straylight kernel: [  724.846334] usb 1-1.6: skipped 1 descriptor after interface         Jul  3 22:42:23 straylight kernel: [  724.846338] usb 1-1.6: skipped 1 descriptor after interface         Jul  3 22:42:23 straylight kernel: [  724.846601] usb 1-1.6: default language 0x0409         Jul  3 22:42:23 straylight kernel: [  724.847101] usb 1-1.6: udev 10, busnum 1, minor = 9         Jul  3 22:42:23 straylight kernel: [  724.847108] usb 1-1.6: New USB device found, idVendor=1532, idProduct=0032         Jul  3 22:42:23 straylight kernel: [  724.847112] usb 1-1.6: New USB device strings: Mfr=1, Product=2, SerialNumber=0         Jul  3 22:42:23 straylight kernel: [  724.847115] usb 1-1.6: Product: Razer Ouroboros         Jul  3 22:42:23 straylight kernel: [  724.847119] usb 1-1.6: Manufacturer: Razer         Jul  3 22:42:23 straylight kernel: [  724.847220] usb 1-1.6: usb_probe_device         Jul  3 22:42:23 straylight kernel: [  724.847225] usb 1-1.6: configuration #1 chosen from 1 choice         Jul  3 22:42:23 straylight kernel: [  724.847437] usb 1-1.6: adding 1-1.6:1.0 (config #1, interface 0)         Jul  3 22:42:23 straylight kernel: [  724.847467] usbhid 1-1.6:1.0: usb_probe_interface         Jul  3 22:42:23 straylight kernel: [  724.847469] usbhid 1-1.6:1.0: usb_probe_interface - got id         Jul  3 22:42:23 straylight kernel: [  724.848170] input: Razer Razer Ouroboros as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.6/1-1.6:1.0/input/input29         Jul  3 22:42:23 straylight kernel: [  724.848230] hid-generic 0003:1532:0032.0017: input,hidraw1: USB HID v1.11 Mouse [Razer Razer Ouroboros] on usb-0000:00:1a.0-1.6/input0         Jul  3 22:42:23 straylight kernel: [  724.848240] usb 1-1.6: adding 1-1.6:1.1 (config #1, interface 1)         Jul  3 22:42:23 straylight kernel: [  724.848261] usbhid 1-1.6:1.1: usb_probe_interface         Jul  3 22:42:23 straylight kernel: [  724.848263] usbhid 1-1.6:1.1: usb_probe_interface - got id         Jul  3 22:42:23 straylight kernel: [  724.850516] input: Razer Razer Ouroboros as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.6/1-1.6:1.1/input/input30         Jul  3 22:42:23 straylight kernel: [  724.850550] usb 1-1.6: link qh1-0601/ffff880129a56e00 start 0 [1/2 us]         Jul  3 22:42:23 straylight kernel: [  724.850594] hid-generic 0003:1532:0032.0018: input,hidraw2: USB HID v1.11 Keyboard [Razer Razer Ouroboros] on usb-0000:00:1a.0-1.6/input1         Jul  3 22:42:23 straylight kernel: [  724.850604] usb 1-1.6: adding 1-1.6:1.2 (config #1, interface 2)         Jul  3 22:42:23 straylight kernel: [  724.850625] usbhid 1-1.6:1.2: usb_probe_interface         Jul  3 22:42:23 straylight kernel: [  724.850627] usbhid 1-1.6:1.2: usb_probe_interface - got id         Jul  3 22:42:23 straylight kernel: [  724.851371] input: Razer Razer Ouroboros as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.6/1-1.6:1.2/input/input31         Jul  3 22:42:23 straylight kernel: [  724.851444] usb 1-1.6: link qh1-3008/ffff880129a56f80 start 0 [1/2 us]         Jul  3 22:42:23 straylight kernel: [  724.851507] hid-generic 0003:1532:0032.0019: input,hidraw3: USB HID v1.11 Keyboard [Razer Razer Ouroboros] on usb-0000:00:1a.0-1.6/input2         Jul  3 22:42:23 straylight mtp-probe: checking bus 1, device 10: "/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.6"         Jul  3 22:42:23 straylight mtp-probe: bus: 1, device: 10 was not an MTP device         Jul  3 22:42:24 straylight kernel: [  724.862885] joydev: version magic '3.6.11-ck SMP mod_unload modversions ' should be '3.6.11-ck SMP preempt mod_unload '         Jul  3 22:42:24 straylight kernel: [  724.862928] joydev: version magic '3.6.11-ck SMP mod_unload modversions ' should be '3.6.11-ck SMP preempt mod_unload '         Jul  3 22:42:24 straylight kernel: [  724.862961] joydev: version magic '3.6.11-ck SMP mod_unload modversions ' should be '3.6.11-ck SMP preempt mod_unload '         Jul  3 22:42:29 straylight kernel: [  730.821629] usb 1-1.6: unlink qh1-0601/ffff880129a56e00 start 0 [1/2 us]         Jul  3 22:42:29 straylight kernel: [  730.821913] usb 1-1.6: unlink qh1-3008/ffff880129a56f80 start 0 [1/2 us]         Jul  3 22:42:29 straylight kernel: [  730.834277] ehci_hcd 0000:00:1a.0: reused qh ffff880129a56e00 schedule         Jul  3 22:42:29 straylight kernel: [  730.834285] usb 1-1.6: link qh1-0601/ffff880129a56e00 start 0 [1/2 us]         Jul  3 22:42:29 straylight kernel: [  730.834361] ehci_hcd 0000:00:1a.0: reused qh ffff880129a56f80 schedule         Jul  3 22:42:29 straylight kernel: [  730.834363] usb 1-1.6: link qh1-3008/ffff880129a56f80 start 0 [1/2 us]         Jul  3 22:42:29 straylight kernel: [  730.836957] usb 1-1.6: unlink qh1-3008/ffff880129a56f80 start 0 [1/2 us]         Jul  3 22:42:29 straylight kernel: [  730.837546] usb 1-1.6: unlink qh1-0601/ffff880129a56e00 start 0 [1/2 us]         Jul  3 22:42:30 straylight kernel: [  730.862205] ehci_hcd 0000:00:1a.0: reused qh ffff880129a56f80 schedule         Jul  3 22:42:30 straylight kernel: [  730.862212] usb 1-1.6: link qh1-3008/ffff880129a56f80 start 0 [1/2 us]         Jul  3 22:42:30 straylight kernel: [  730.863232] ehci_hcd 0000:00:1a.0: reused qh ffff880129a56e00 schedule         Jul  3 22:42:30 straylight kernel: [  730.863240] usb 1-1.6: link qh1-0601/ffff880129a56e00 start 0 [1/2 us]         Jul  3 22:42:30 straylight kernel: [  730.864890] usb 1-1.6: unlink qh1-3008/ffff880129a56f80 start 0 [1/2 us]         Jul  3 22:42:30 straylight kernel: [  730.866510] usb 1-1.6: unlink qh1-0601/ffff880129a56e00 start 0 [1/2 us]         Jul  3 22:42:30 straylight kernel: [  730.916066] ehci_hcd 0000:00:1a.0: reused qh ffff880129a56f80 schedule         Jul  3 22:42:30 straylight kernel: [  730.916074] usb 1-1.6: link qh1-3008/ffff880129a56f80 start 0 [1/2 us]         Jul  3 22:42:30 straylight kernel: [  730.918081] ehci_hcd 0000:00:1a.0: reused qh ffff880129a56e00 schedule         Jul  3 22:42:30 straylight kernel: [  730.918089] usb 1-1.6: link qh1-0601/ffff880129a56e00 start 0 [1/2 us]         Jul  3 22:42:30 straylight kernel: [  730.918750] usb 1-1.6: unlink qh1-3008/ffff880129a56f80 start 0 [1/2 us]         Jul  3 22:42:30 straylight kernel: [  730.921368] usb 1-1.6: unlink qh1-0601/ffff880129a56e00 start 0 [1/2 us]         Jul  3 22:42:30 straylight kernel: [  730.966209] hub 1-1:1.0: state 7 ports 6 chg 0000 evt 0040         Jul  3 22:42:30 straylight kernel: [  730.966467] hub 1-1:1.0: port 6, status 0101, change 0001, 12 Mb/s         Jul  3 22:42:30 straylight kernel: [  730.966579] usb 1-1.6: USB disconnect, device number 10         Jul  3 22:42:30 straylight kernel: [  730.966581] usb 1-1.6: unregistering device         Jul  3 22:42:30 straylight kernel: [  730.966583] usb 1-1.6: unregistering interface 1-1.6:1.0         Jul  3 22:42:30 straylight kernel: [  730.979027] usb 1-1.6: unregistering interface 1-1.6:1.1         Jul  3 22:42:30 straylight kernel: [  730.997019] usb 1-1.6: unregistering interface 1-1.6:1.2         Jul  3 22:42:30 straylight kernel: [  731.023909] usb 1-1.6: usb_disable_device nuking all URBs         Jul  3 22:42:30 straylight kernel: [  731.127793] hub 1-1:1.0: debounce: port 6: total 100ms stable 100ms status 0x101         Jul  3 22:42:30 straylight kernel: [  731.138749] hub 1-1:1.0: port 6 not reset yet, waiting 10ms         Jul  3 22:42:30 straylight kernel: [  731.200606] usb 1-1.6: new full-speed USB device number 11 using ehci_hcd         Jul  3 22:42:30 straylight kernel: [  731.211559] hub 1-1:1.0: port 6 not reset yet, waiting 10ms         Jul  3 22:42:30 straylight kernel: [  731.287115] usb 1-1.6: skipped 1 descriptor after interface         Jul  3 22:42:30 straylight kernel: [  731.287122] usb 1-1.6: skipped 1 descriptor after interface         Jul  3 22:42:30 straylight kernel: [  731.287126] usb 1-1.6: skipped 1 descriptor after interface         Jul  3 22:42:30 straylight kernel: [  731.287478] usb 1-1.6: default language 0x0409         Jul  3 22:42:30 straylight kernel: [  731.287967] usb 1-1.6: udev 11, busnum 1, minor = 10         Jul  3 22:42:30 straylight kernel: [  731.287969] usb 1-1.6: New USB device found, idVendor=1532, idProduct=0032         Jul  3 22:42:30 straylight kernel: [  731.287971] usb 1-1.6: New USB device strings: Mfr=1, Product=2, SerialNumber=0         Jul  3 22:42:30 straylight kernel: [  731.287973] usb 1-1.6: Product: Razer Ouroboros         Jul  3 22:42:30 straylight kernel: [  731.287974] usb 1-1.6: Manufacturer: Razer         Jul  3 22:42:30 straylight kernel: [  731.288020] usb 1-1.6: usb_probe_device         Jul  3 22:42:30 straylight kernel: [  731.288023] usb 1-1.6: configuration #1 chosen from 1 choice         Jul  3 22:42:30 straylight kernel: [  731.288482] usb 1-1.6: adding 1-1.6:1.0 (config #1, interface 0)         Jul  3 22:42:30 straylight kernel: [  731.288511] usbhid 1-1.6:1.0: usb_probe_interface         Jul  3 22:42:30 straylight kernel: [  731.288513] usbhid 1-1.6:1.0: usb_probe_interface - got id         Jul  3 22:42:30 straylight kernel: [  731.289236] input: Razer Razer Ouroboros as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.6/1-1.6:1.0/input/input32         Jul  3 22:42:30 straylight kernel: [  731.289292] hid-generic 0003:1532:0032.001A: input,hidraw1: USB HID v1.11 Mouse [Razer Razer Ouroboros] on usb-0000:00:1a.0-1.6/input0         Jul  3 22:42:30 straylight kernel: [  731.289303] usb 1-1.6: adding 1-1.6:1.1 (config #1, interface 1)         Jul  3 22:42:30 straylight kernel: [  731.289324] usbhid 1-1.6:1.1: usb_probe_interface         Jul  3 22:42:30 straylight kernel: [  731.289326] usbhid 1-1.6:1.1: usb_probe_interface - got id         Jul  3 22:42:30 straylight kernel: [  731.291438] input: Razer Razer Ouroboros as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.6/1-1.6:1.1/input/input33         Jul  3 22:42:30 straylight kernel: [  731.291467] usb 1-1.6: link qh1-0601/ffff880129a56100 start 0 [1/2 us]         Jul  3 22:42:30 straylight kernel: [  731.291512] hid-generic 0003:1532:0032.001B: input,hidraw2: USB HID v1.11 Keyboard [Razer Razer Ouroboros] on usb-0000:00:1a.0-1.6/input1         Jul  3 22:42:30 straylight kernel: [  731.291522] usb 1-1.6: adding 1-1.6:1.2 (config #1, interface 2)         Jul  3 22:42:30 straylight kernel: [  731.291542] usbhid 1-1.6:1.2: usb_probe_interface         Jul  3 22:42:30 straylight kernel: [  731.291544] usbhid 1-1.6:1.2: usb_probe_interface - got id         Jul  3 22:42:30 straylight kernel: [  731.292411] input: Razer Razer Ouroboros as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.6/1-1.6:1.2/input/input34         Jul  3 22:42:30 straylight kernel: [  731.292518] usb 1-1.6: link qh1-3008/ffff880129a56800 start 0 [1/2 us]         Jul  3 22:42:30 straylight kernel: [  731.292567] hid-generic 0003:1532:0032.001C: input,hidraw3: USB HID v1.11 Keyboard [Razer Razer Ouroboros] on usb-0000:00:1a.0-1.6/input2         Jul  3 22:42:30 straylight kernel: [  731.292582] hub 1-1:1.0: state 7 ports 6 chg 0000 evt 0040         Jul  3 22:42:30 straylight mtp-probe: checking bus 1, device 11: "/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.6"         Jul  3 22:42:30 straylight mtp-probe: bus: 1, device: 11 was not an MTP device         Jul  3 22:42:30 straylight kernel: [  731.302537] joydev: version magic '3.6.11-ck SMP mod_unload modversions ' should be '3.6.11-ck SMP preempt mod_unload '         Jul  3 22:42:30 straylight kernel: [  731.302576] joydev: version magic '3.6.11-ck SMP mod_unload modversions ' should be '3.6.11-ck SMP preempt mod_unload '         Jul  3 22:42:30 straylight kernel: [  731.302606] joydev: version magic '3.6.11-ck SMP mod_unload modversions ' should be '3.6.11-ck SMP preempt mod_unload '      **/var/log/Xorg.0.log**               [   732.888] (II) config/udev: removing device Razer Razer Ouroboros     [   732.899] (II) evdev: Razer Razer Ouroboros: Close     [   732.899] (II) UnloadModule: "evdev"     [   732.911] (II) config/udev: removing device Razer Razer Ouroboros     [   732.920] (II) evdev: Razer Razer Ouroboros: Close     [   732.920] (II) UnloadModule: "evdev"     [   733.201] (II) config/udev: Adding input device Razer Razer Ouroboros (/dev/input/event8)     [   733.201] (**) Razer Razer Ouroboros: Applying InputClass "evdev pointer catchall"     [   733.201] (II) Using input driver 'evdev' for 'Razer Razer Ouroboros'     [   733.201] (**) Razer Razer Ouroboros: always reports core events     [   733.201] (**) evdev: Razer Razer Ouroboros: Device: "/dev/input/event8"     [   733.214] (EE) evdev: Razer Razer Ouroboros: Unable to open evdev device "/dev/input/event8".     [   733.214] (EE) PreInit returned 2 for "Razer Razer Ouroboros"     [   733.214] (II) UnloadModule: "evdev"     [   733.214] (II) config/udev: Adding input device Razer Razer Ouroboros (/dev/input/mouse1)     [   733.214] (II) No input driver specified, ignoring this device.     [   733.214] (II) This device may have been added with another device file.     [   733.214] (II) config/udev: Adding input device Razer Razer Ouroboros (/dev/input/event10)     [   733.214] (**) Razer Razer Ouroboros: Applying InputClass "evdev keyboard catchall"     [   733.214] (II) Using input driver 'evdev' for 'Razer Razer Ouroboros'     [   733.214] (**) Razer Razer Ouroboros: always reports core events     [   733.214] (**) evdev: Razer Razer Ouroboros: Device: "/dev/input/event10"     [   733.214] (--) evdev: Razer Razer Ouroboros: Vendor 0x1532 Product 0x32     [   733.214] (--) evdev: Razer Razer Ouroboros: Found keys     [   733.214] (II) evdev: Razer Razer Ouroboros: Configuring as keyboard     [   733.214] (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.6/1-1.6:1.2/input/input34/event10"     [   733.214] (II) XINPUT: Adding extended input device "Razer Razer Ouroboros" (type: KEYBOARD, id 8)     [   733.214] (**) Option "xkb_rules" "evdev"     [   733.214] (**) Option "xkb_model" "pc104"     [   733.214] (**) Option "xkb_layout" "us"     [   733.215] (II) config/udev: Adding input device Razer Razer Ouroboros (/dev/input/event9)     [   733.215] (**) Razer Razer Ouroboros: Applying InputClass "evdev keyboard catchall"     [   733.215] (II) Using input driver 'evdev' for 'Razer Razer Ouroboros'     [   733.215] (**) Razer Razer Ouroboros: always reports core events     [   733.215] (**) evdev: Razer Razer Ouroboros: Device: "/dev/input/event9"     [   733.215] (II) evdev: Razer Razer Ouroboros: Using mtdev for this device     [   733.215] (--) evdev: Razer Razer Ouroboros: Vendor 0x1532 Product 0x32     [   733.215] (--) evdev: Razer Razer Ouroboros: Found 1 mouse buttons     [   733.215] (--) evdev: Razer Razer Ouroboros: Found scroll wheel(s)     [   733.215] (--) evdev: Razer Razer Ouroboros: Found relative axes     [   733.215] (II) evdev: Razer Razer Ouroboros: Forcing relative x/y axes to exist.     [   733.215] (--) evdev: Razer Razer Ouroboros: Found absolute axes     [   733.215] (--) evdev: Razer Razer Ouroboros: Found absolute multitouch axes     [   733.215] (--) evdev: Razer Razer Ouroboros: Found keys     [   733.215] (II) evdev: Razer Razer Ouroboros: Configuring as mouse     [   733.215] (II) evdev: Razer Razer Ouroboros: Configuring as keyboard     [   733.215] (II) evdev: Razer Razer Ouroboros: Adding scrollwheel support     [   733.215] (**) evdev: Razer Razer Ouroboros: YAxisMapping: buttons 4 and 5     [   733.215] (**) evdev: Razer Razer Ouroboros: EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200     [   733.215] (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.6/1-1.6:1.1/input/input33/event9"     [   733.215] (II) XINPUT: Adding extended input device "Razer Razer Ouroboros" (type: KEYBOARD, id 9)     [   733.215] (**) Option "xkb_rules" "evdev"     [   733.215] (**) Option "xkb_model" "pc104"     [   733.215] (**) Option "xkb_layout" "us"     [   733.215] (II) evdev: Razer Razer Ouroboros: initialized for relative axes.     [   733.215] (WW) evdev: Razer Razer Ouroboros: ignoring absolute axes.     [   733.215] (**) Razer Razer Ouroboros: (accel) keeping acceleration scheme 1     [   733.215] (**) Razer Razer Ouroboros: (accel) acceleration profile 0     [   733.215] (**) Razer Razer Ouroboros: (accel) acceleration factor: 2.000     [   733.215] (**) Razer Razer Ouroboros: (accel) acceleration threshold: 4


Preserve directory structure when moving files using find

I have created the following script that move old days files as defined from source directory to destination directory. It is working perfectly.               #!/bin/bash          echo "Enter Your Source Directory"     read soure          echo "Enter Your Destination Directory"     read destination           echo "Enter Days"     read days                     find "$soure" -type f -mtime "-$days" -exec mv {} "$destination" \;            echo "Files which were $days Days old moved from $soure to $destination"      This script moves files great, It also move files of source subdirectory, but it doesn't create subdirectory into destination directory. I want to implement this additional feature in it. with example               /home/ketan     : source directory          /home/ketan/hex : source subdirectory          /home/maxi      : destination directory      When I run this script , it also move hex's files in maxi directory, but I need that same hex should be created into maxi directory and move its files in same hex there.


Linux Router Load Benchmark

What tools and methods can be used to stress test a Linux-based router/proxy? On the router Squid, Apache Modproxy and Privoxy are installed. The purpose of the stress test is to determine which proxy is best in terms of load. There are three machines, a client, the router, and a server. The tool must be able to log a performance period so the results can be graphed next to each other, preferably using `gnuplot` or Excel. Thanks


How to give each variable a different color?

Is it possible to have a vim color scheme where each variable is given a unique color? If so, how? This feature would be really helpful when visually scanning code. (I think I saw this feature in KDevelop.)


Capturing new output after deleting the output file

I'm runnig a java server on Debian with this command:                 java -jar myapp.jar [args] >> log.txt      Once I gzipped the log file to send it and then I realized the original file was gone, leaving me with only the .gzip. Although I created the file manually (and also tried to unzip the original) the app didn't log anymore to that file. So my questions are: where does that log go after that? Is there any way to re-route the output log file without restarting the app (as it is a server, I'd rather not kill the process).


pdksh missing from RHEL 6 and CentOS 6?

The package `pdksh` does not exist on RHEL 6 or CentOS 6 when I try to install it through `yum`. So my questions:   1. Why is it no longer available in the default repositories? It is available in version 5.x.   2. Is there a replacement shell?   3. What about programs that depend on `pdksh`? Can they use the replacement shell? My workaround has been to use the package from version 5, which I feel is not the proper solution and I should understand it better than the workaround. My concern is mainly regarding Oracle Database. It asks for `pdksh`, so will it be a problem to use a replacment shell other than `pdksh`?


YUM won't update KERNEL

...     ...     ...         --> Running transaction check         ---> Package db4-devel.x86_64 0:4.7.25-18.el6_4 will be installed         --> Processing Dependency: db4-cxx = 4.7.25-18.el6_4 for package: db4-devel-4.7.25-18.el6_4.x86_64         --> Processing Dependency: libdb_cxx-4.7.so()(64bit) for package: db4-devel-4.7.25-18.el6_4.x86_64         ---> Package gdbm-devel.x86_64 0:1.8.0-36.el6 will be installed         ---> Package kernel.x86_64 0:2.6.32-431.20.3.el6 will be installed         --> Processing Dependency: kernel-firmware >= 2.6.32-431.20.3.el6 for package: kernel-2.6.32-431.20.3.el6.x86_64         Package kernel-firmware-2.6.32-431.20.3.el6.noarch is obsoleted by vzkernel-firmware-2.6.32-042stab083.2.noarch which is already installed         ---> Package lzo.x86_64 0:2.03-3.1.el6 will be installed         ---> Package mesa-private-llvm.x86_64 0:3.3-0.3.rc3.el6 will be installed         ---> Package p11-kit.x86_64 0:0.18.5-2.el6_5.2 will be installed         ---> Package p11-kit-trust.x86_64 0:0.18.5-2.el6_5.2 will be installed         ---> Package shared-mime-info.x86_64 0:0.70-4.el6 will be installed         ---> Package snappy.x86_64 0:1.1.0-1.el6 will be installed         --> Running transaction check         ---> Package db4-cxx.x86_64 0:4.7.25-18.el6_4 will be installed         ---> Package kernel.x86_64 0:2.6.32-431.20.3.el6 will be installed         --> Processing Dependency: kernel-firmware >= 2.6.32-431.20.3.el6 for package: kernel-2.6.32-431.20.3.el6.x86_64         Package kernel-firmware-2.6.32-431.20.3.el6.noarch is obsoleted by vzkernel-firmware-2.6.32-042stab083.2.noarch which is already installed         --> Finished Dependency Resolution          You could try using --skip-broken to work around the problem          You could try running: rpm -Va --nofiles --nodigest         Error: Package: kernel-2.6.32-431.20.3.el6.x86_64 (updates)                    Requires: kernel-firmware >= 2.6.32-431.20.3.el6                    Removing: vzkernel-firmware-2.6.32-042stab083.2.noarch (@openvz-kernel-rhel6)                        kernel-firmware = 2.6.32-358.23.2.el6                    Updated By: vzkernel-firmware-2.6.32-042stab090.5.noarch (openvz-kernel-rhel6)                        kernel-firmware = 2.6.32-431.17.1.el6                    Available: kernel-firmware-2.6.32-431.el6.noarch (base)                        kernel-firmware = 2.6.32-431.el6                    Available: kernel-firmware-2.6.32-431.1.2.0.1.el6.noarch (updates)                        kernel-firmware = 2.6.32-431.1.2.0.1.el6                    Available: kernel-firmware-2.6.32-431.3.1.el6.noarch (updates)                        kernel-firmware = 2.6.32-431.3.1.el6                    Available: kernel-firmware-2.6.32-431.5.1.el6.noarch (updates)                        kernel-firmware = 2.6.32-431.5.1.el6                    Available: kernel-firmware-2.6.32-431.11.2.el6.noarch (updates)                        kernel-firmware = 2.6.32-431.11.2.el6                    Available: kernel-firmware-2.6.32-431.17.1.el6.noarch (updates)                        kernel-firmware = 2.6.32-431.17.1.el6                    Available: kernel-firmware-2.6.32-431.20.3.el6.noarch (updates)                        kernel-firmware = 2.6.32-431.20.3.el6          You could try using --skip-broken to work around the problem          You could try running: rpm -Va --nofiles --nodigest                   uname -a         Linux LOD1.downtownhost.com 2.6.32-042stab083.2 #1 SMP Fri Nov 8 18:08:40 MSK 2013 x86_64 x86_64 x86_64 GNU/Linux      I need to get the kernel to stab090.5 to avoid some exploits but I don't get why YUM is broken. Do I have too many kernels in under /boot/grub? EDIT: I see the following               yum list kernel.*     Loaded plugins: fastestmirror, security     Loading mirror speeds from cached hostfile      * base: mirror.dattobackup.com      * extras: mirror.atlanticmetro.net      * openvz-kernel-rhel6: mirror.trouble-free.net      * openvz-utils: mirror.trouble-free.net      * soluslabs: mirror.us1.soluslabs.net      * updates: mirror.cs.uwp.edu     Installed Packages     kernel.x86_64                                        2.6.32-279.el6                                              @anaconda-CentOS-201207061011.x86_64/6.3     kernel.x86_64                                        2.6.32-358.0.1.el6                                          @updates     kernel.x86_64                                        2.6.32-358.14.1.el6                                         @updates     kernel.x86_64                                        2.6.32-358.23.2.el6                                         @updates      However I don't see the OpenVZ kernel. Now if I do this:               yum remove kernel kernel-firmware     Loaded plugins: fastestmirror, security     Setting up Remove Process     Resolving Dependencies     --> Running transaction check     ---> Package kernel.x86_64 0:2.6.32-279.el6 will be erased     ---> Package kernel.x86_64 0:2.6.32-358.0.1.el6 will be erased     ---> Package kernel.x86_64 0:2.6.32-358.14.1.el6 will be erased     ---> Package kernel.x86_64 0:2.6.32-358.23.2.el6 will be erased     ---> Package vzkernel-firmware.noarch 0:2.6.32-042stab083.2 will be erased     --> Finished Dependency Resolution          Dependencies Resolved          =========================================================================================================================================================      Package                          Arch                  Version                            Repository                                               Size     =========================================================================================================================================================     Removing:      kernel                           x86_64                2.6.32-279.el6                     @anaconda-CentOS-201207061011.x86_64/6.3                114 M      kernel                           x86_64                2.6.32-358.0.1.el6                 @updates                                                116 M      kernel                           x86_64                2.6.32-358.14.1.el6                @updates                                                116 M      kernel                           x86_64                2.6.32-358.23.2.el6                @updates                                                116 M      vzkernel-firmware                noarch                2.6.32-042stab083.2                @openvz-kernel-rhel6                                     19 M          Transaction Summary     =========================================================================================================================================================     Remove        5 Package(s)          Installed size: 480 M     Is this ok [y/N]: n      How do I exclude the openvz kernel?


How to fix zramswap error?

I installed `zramswap-enabler` on Ubuntu 11.10 using the ppa but when installing programs or running system upgrades I get this error:               Setting up zramswap-enabler (0.2.1-0~12~oneiric1) ...     start: Job failed to start     invoke-rc.d: initscript zramswap, action "start" failed.     dpkg: error processing zramswap-enabler (--configure):      subprocess installed post-installation script returned error exit status 1     No apport report written because MaxReports is reached already                                                                   Errors were encountered while processing:      zramswap-enabler     E: Sub-process /usr/bin/dpkg returned an error code (1)      Please let me know how to fix it.


USB memory stick failing to mount - Not Authorized

One of my customers uses a machine running CentOS 6.4 with Gnome 2.28.2. Whenever he plugs a USB memory stick or external hard drive into the machine he gets an error pop-up that simply states `Unable to mount <filesystem name>. Not Authorized.`. We've tried devices formatted with FAT and EXT4. The only way I've found to mount these devices is by running palimpsest as root. Even then, the user cannot write to the file system. I suspect this is permissions related. So, my question is how can we restore the default behaviour for standard users where USB devices can be mounted and used normally?


Reverse ip lookup

I was wondering if it is somehow possible to lookup the ip of a machine I ssh'd into from. This is the scenario, I'm at home, I've VPN'd into a server that I ssh into constantly in the office but now I want to ssh into the machine that I use locally. If that doesn't make sense hopefully this will. In the office I use my desktop a *nix box to ssh into a server. Now that I'm at home I want to ssh into that *nix box through the server but I don't know the IP of that local box, is there a log somewhere that might keep track of that sort of information.


How do I enable &>/dev/null by default for all sh/bash commands?

Is there a way to make `&>/dev/null` the default behavior in a sh/bash script? I' rather not have to appended this to every command within the console, not an *.sh script. I'm looking to make a global setting...or at least a custom alias of some sort, but one that makes any command and every command, auto-append `&>/dev/null` to the end. Any ideas?


Can I convert an existing LVM VG to a stripe (RAID0 eq)?

I have an existing LVM volume group of 3 disks (ext4), with 4 logical volumes. Not quite ready for the leap to a nextgen FS, I would like to balance the load on the disks. I have seen you can create VG's with striping (RAID0 equivalent), but I would like to convert the existing one. Can this be done?


Does DM-Crypt partition look like random noise?

If I format partition with dm-crypt does its entry in partition table suggest somehow that this partition is encrypted or for someone from outside it looks like regular partition with random noise stored on it? My goal is to encrypt partition and to make in undistinquishable from regular partition that was just formatted or erased by `cat /dev/urandom > /dev/sda1`.


lightdm fails to start properly on boot (works from terminal)

I have elementaryOS and after updated my Kernel to 3.11 I get black screen after boot. If I type `Ctrl + Alt + F1` to go to command prompt and then do `sudo service lightdm restart`, lightdm starts correctly. Why its not starting at first? I had troubles with my X stack and drivers before but if that was the problem, I shouldnt be able to start lightdm even from terminal I guess. **Lightdm.log**               [+0.00s] DEBUG: Starting Light Display Manager 1.2.3, UID=0 PID=3650     [+0.00s] DEBUG: Loading configuration from /etc/lightdm/lightdm.conf     [+0.00s] DEBUG: Using D-Bus name org.freedesktop.DisplayManager     [+0.00s] DEBUG: Registered seat module xlocal     [+0.00s] DEBUG: Registered seat module xremote     [+0.00s] DEBUG: Adding default seat     [+0.00s] DEBUG: Starting seat     [+0.00s] DEBUG: Starting new display for greeter     [+0.00s] DEBUG: Starting local X display     [+0.00s] DEBUG: Using VT 7     [+0.00s] DEBUG: Activating VT 7     [+0.01s] DEBUG: Logging to /var/log/lightdm/x-0.log     [+0.01s] DEBUG: Writing X server authority to /var/run/lightdm/root/:0     [+0.01s] DEBUG: Launching X Server     [+0.01s] DEBUG: Launching process 3659: /usr/bin/X :0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch     [+0.01s] DEBUG: Waiting for ready signal from X server :0     [+0.01s] DEBUG: Acquired bus name org.freedesktop.DisplayManager     [+0.01s] DEBUG: Registering seat with bus path /org/freedesktop/DisplayManager/Seat0     [+1.01s] DEBUG: Got signal 10 from process 3659     [+1.01s] DEBUG: Got signal from X server :0     [+1.01s] DEBUG: Connecting to XServer :0     [+1.01s] DEBUG: Starting greeter     [+1.01s] DEBUG: Started session 3747 with service 'lightdm', username 'lightdm'     [+1.05s] DEBUG: Session 3747 authentication complete with return value 0: Success     [+1.05s] DEBUG: Greeter authorized     [+1.05s] DEBUG: Logging to /var/log/lightdm/x-0-greeter.log     [+1.05s] DEBUG: Session 3747 running command /usr/lib/lightdm/lightdm-greeter-session /usr/share/xgreeters/pantheon-greeter     [+1.70s] DEBUG: Greeter connected version=1.2.3     [+1.70s] DEBUG: Greeter connected, display is ready     [+1.70s] DEBUG: New display ready, switching to it     [+1.70s] DEBUG: Activating VT 7     [+5.20s] DEBUG: Greeter start authentication for bruno     [+5.20s] DEBUG: Started session 4697 with service 'lightdm', username 'bruno'     [+5.20s] DEBUG: Session 4697 got 1 message(s) from PAM     [+5.20s] DEBUG: Prompt greeter with 1 message(s)     [+5.23s] DEBUG: Continue authentication     [+5.29s] DEBUG: Session 4697 authentication complete with return value 0: Success     [+5.29s] DEBUG: Authenticate result for user bruno: Success     [+5.34s] DEBUG: User bruno authorized     [+5.36s] DEBUG: Greeter requests session pantheon     [+5.36s] DEBUG: Using session pantheon     [+5.36s] DEBUG: Stopping greeter     [+5.36s] DEBUG: Session 3747: Sending SIGTERM     [+5.41s] DEBUG: Session 3747 exited with return value 0     [+5.41s] DEBUG: Greeter quit     [+5.43s] DEBUG: Dropping privileges to uid 1000     [+5.43s] DEBUG: Restoring privileges     [+5.45s] DEBUG: Dropping privileges to uid 1000     [+5.46s] DEBUG: Writing /home/bruno/.dmrc     [+5.49s] DEBUG: Restoring privileges     [+5.54s] DEBUG: Starting session pantheon as user bruno     [+5.54s] DEBUG: Session 4697 running command /usr/sbin/lightdm-session gnome-session --session=pantheon     [+5.57s] DEBUG: Registering session with bus path /org/freedesktop/DisplayManager/Session0     [+5.57s] DEBUG: Greeter closed communication channel      **boot.log**                * Starting RPC portmapper replacement                                        [ OK ]      * Starting Start this job to wait until rpcbind is started or fails to start [ OK ]      * Stopping Start this job to wait until rpcbind is started or fails to start [ OK ]      * Starting mDNS/DNS-SD daemon                                                [ OK ]      * Stopping rpcsec_gss daemon                                                 [ OK ]      * Starting NSM status monitor                                                [ OK ]      * Starting configure network device                                          [ OK ]      * Stopping Failsafe Boot Delay                                               [ OK ]      * Starting System V initialisation compatibility                             [ OK ]      * Starting modem connection manager                                          [ OK ]      * Starting configure network device security                                 [ OK ]     Skipping profile in /etc/apparmor.d/disable: usr.bin.firefox     Skipping profile in /etc/apparmor.d/disable: usr.sbin.rsyslogd      * Starting AppArmor profiles                                                 [ OK ]      * Starting CUPS printing spooler/server                                      [ OK ]      * Stopping System V initialisation compatibility                             [ OK ]      * Starting network connection manager                                        [ OK ]      * Starting System V runlevel compatibility                                   [ OK ]      * Starting save kernel messages                                              [ OK ]      * Starting anac(h)ronistic cron                                              [ OK ]      * Starting regular background program processing daemon                      [ OK ]      * Starting deferred execution scheduler                                      [ OK ]      * Starting ACPI daemon                                                       [ OK ]      * Starting CPU interrupts balancing daemon                                   [ OK ]      * Stopping anac(h)ronistic cron                                              [ OK ]      * Starting LightDM Display Manager                                           [ OK ]      * Stopping Send an event to indicate plymouth is up                          [ OK ]      * Starting configure network device security                                 [ OK ]      * Starting configure network device                                          [ OK ]      * Starting KVM                                                               [ OK ]      * Stopping save kernel messages                                              [ OK ]


Search and Filter Text on large log files

I use the tail, head and grep commands to search log files. Most of the time the combination of these 3 commands, in addition to using pipe, gets the job done. However, I have this one log that many devices report to literally every few seconds. So this log is very large. But the pattern of the reporting is the same:               Oct 10 11:58:50 Received Packet from [xxx.xx.xxx.xx:xxxx]: 0xD 0xD 0xD      Oct 10 11:58:50 Unit ID: 1111      In the above example, it shows that UDP packet was sent to the socket server for a specific unit id. Now sometimes I want to view the packet information for this unit within a specific time range by quering the log.               Oct 10 11:58:50 Received Packet from [xxx.xx.xxx.xx:xxxx]: 0xD 0xD 0xD      Oct 10 11:58:50 Unit ID: 1111          ... // A bunch of other units reporting including unit id 1111          Oct 10 23:58:50 Received Packet from [xxx.xx.xxx.xx:xxxx]: 0x28 0x28 0x28      Oct 10 23:58:50 Unit ID: 1111      So in the example above, I would like to display log output only for Unit ID: 1111 within the time range of 11:58 and 23:58. So the possible results can look like this:               Oct 10 11:58:50 Received Packet from [xxx.xx.xxx.xx:xxxx]: 0xD 0xD 0xD      Oct 10 11:58:50 Unit ID: 1111          Oct 10 12:55:11 Received Packet from [xxx.xx.xxx.xx:xxxx]: 0x28 0xD 0x28      Oct 10 12:55:11 Unit ID: 1111          Oct 10 15:33:50 Received Packet from [xxx.xx.xxx.xx:xxxx]: 0x33 0xD 0x11      Oct 10 15:33:50 Unit ID: 1111          Oct 10 23:58:50 Received Packet from [xxx.xx.xxx.xx:xxxx]: 0x28 0x28 0x28      Oct 10 23:58:50 Unit ID: 1111      Notice the results only display Unit ID: 1111 information and not the other units. Now the problem with using something like this:               tail -n 10000 | grep -B20 -A20 "Oct 10 23:58:50 Unit ID: 1111"       is that will display a lot of stuff, not just the stuff that I need.


How to send emaile notification from svn to bugzill?

I get svn email notification for my mail id, The same mail. How to get email notification in bugzilla.


Does cron know that the instance to be scheduled is already running?

I was wondering if we add a job in the crontab e.g. to run every 5 mins and the job does not actually manage to finish in 5 mins, does the cron daemon know that the previous instance is already running and skips the next run? Or do I have to somehow build that logic to the process? How?


Linux to linux USB storage?

I was going to put together a small AoE setup for a small cluster, however 10Gb NICs are still rather expensive. Using superfast USB seems to provide the bandwidth I'm looking for at a much lower cost. I presume this would require a host-to-host adapter? In terms of software, while I suppose I cold use AoE (on top of an ethernet emulation layer) or iSCSI (on top of TCP/IP? ppp?). But is there a more direct way to implement a storage target on USB connected Linux? (please note, I want to use a Linux system AS a USB connected storage device - not connect a USB storage device to Linux, nor implement a NAS server)


How to handle DHCP on two network interfaces, one clobbers the other's /etc/resolv.conf

I have an embedded Debian Linux system. It has two network interfaces, eth0 and ppp0 via a cell modem. The problem I have is that when the system boots up it gets an address via DHCP on eth0. If the modem connects that then also gets it's own IP address and clobbers the contents of /etc/resolv.conf. In my application I need eth0 to be the default route if eth0 is alive. If I make eth0 the default route, DNS no longer works as the nameservers from the modem DHCP request are not reachable. Curiously if I then run "dhclient eth0" after all this is running, it does the right thing and adds it's nameservers to the existing file, rather than clobbering it. Is there any good and standard way of handling this dual DHCP network situation?


How to type from the source directory on mac

In the website http://gfs.sourceforge.net/wiki/index.php/Mac_OSX_Installation               In this line:          type from the source directory ...      What is `source directory` referring to ?


Fedora 20, startup script with network settings work correctly but without real effect

First, I love Fedora 20. :) I'm newcomers from Debian/Ubuntu/Suse, but I real like this clean distro. But I found some problems, and can't move forward with this little things. I have 2 PC in home network, both under Fedora (Gnome and LXDE edition). On "main" PC, who's role is gate to external network, I need run command for sync MTU between interfaces/networks:               iptables -I FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu      I can't found modern replace for this old-school command. All other commands for network like masquerading and change active zone I save by               firewall-cmd bla-bla-bla --permanent      So, one command who's must run at startup system is above "iptables ..". Ok. For this I create new file:               $ cat /usr/lib/systemd/system/setup-mtu.service     [Unit]     Description=Настройка MTU на шлюзе для нормальной работы инета в домашней сети          [Service]     Type=forking     ExecStart=/usr/sbin/iptables -I FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu     KillMode=process          [Install]     WantedBy=multi-user.target      Enable this service. And have good status after reboot:               $ sudo systemctl status setup-mtu.service     setup-mtu.service - Настройка MTU на шлюзе для нормальной работы инета в домашней сети        Loaded: loaded (/usr/lib/systemd/system/setup-mtu.service; enabled)        Active: inactive (dead) since Пн 2014-01-27 16:18:06 MSK; 7h ago       Process: 22933 ExecStart=/usr/sbin/iptables -I FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu (code=exited, status=0/SUCCESS)          янв 27 16:18:06 localhost.localdomain systemd[1]: Started Настройка MTU на шлюзе д...и.     Hint: Some lines were ellipsized, use -l to show in full.      But in real, I need manual run this command every time after reboot PC. The same problem was happens with other network commands. So I passed this problem with firewall-cmd ... --permanent command. Until MTU sync. :(( I need your help! Why network setting don't real apply at startup scripts with service?


Dual network connection

I have a usb cellular modem and a Home LAN connection on my Ubuntu 10.10 box. Both work independently. I want to know how to have both connected at the same time, and be able to specify which application uses which device to connect to the internet. Does anyone know how to do this?


Open url and fill form automatically

I'd like to create a script to open an url and fill some forms. I don't want to save the form data on the browser, so I think that this script would be a good solution for me. Any help? I know how to open the url, just calling `firefox url` on terminal. Thanks.


Can't use mouse properly when running vim in tmux

I'm running VIM in tmux, When I'm try to select a range of texts in VIM, the mouse kept resetting its position, thus I can only select one line (the last line where mouse occurs). Does anyone know how to solve this?


KWin Present Window effect rendered window preview pretty dark

I don't know why, but the window previews are pretty dark, I want it "lighter", possible? Seems there's no such option in systemsettings -> Desktop Effects ![enter image description here](http://i.stack.imgur.com/U88DR.jpg)


Can't find automoc4 on Arch Linux

I was trying to build dekorator, but               CMake Error at /usr/share/apps/cmake/modules/FindPackageHandleStandardArgs.cmake:198 (MESSAGE):       Did not find automoc4 (Automoc4Config.cmake, install       git://anongit.kde.org/automoc).  (missing: AUTOMOC4_EXECUTABLE)     Call Stack (most recent call first):       /usr/share/apps/cmake/modules/FindAutomoc4.cmake:49 (find_package_handle_standard_args)       /usr/share/apps/cmake/modules/FindKDE4Internal.cmake:423 (find_package)       /usr/share/cmake-2.8/Modules/FindKDE4.cmake:95 (FIND_PACKAGE)       CMakeLists.txt:4 (find_package)      But automoc4 was installed already. Any thoughts?


Lenovo ThinkPad s440 network

Does anybody know how to configure wifi on Lenovo ThinkPad s440 on Ubuntu 12.04 LTS? I can't configure it even with LAN. But anyway, wifi is the first thing I need. I can't find any driver for linux. As I see it from (official specs link) Ubuntu uses `Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller` to establish network. Can anybody suggest a solution? A driver, a way to configure wifi or anything?.. lspci:               00:00.0 Host bridge: Intel Corporation Device 0a04 (rev 09)     00:02.0 VGA compatible controller: Intel Corporation Device 0a16 (rev 09)     00:03.0 Audio device: Intel Corporation Device 0a0c (rev 09)     00:14.0 USB controller: Intel Corporation Device 9c31 (rev 04)     00:16.0 Communication controller: Intel Corporation Device 9c3a (rev 04)     00:1b.0 Audio device: Intel Corporation Device 9c20 (rev 04)     00:1c.0 PCI bridge: Intel Corporation Device 9c10 (rev e4)     00:1c.1 PCI bridge: Intel Corporation Device 9c12 (rev e4)     00:1c.2 PCI bridge: Intel Corporation Device 9c14 (rev e4)     00:1c.3 PCI bridge: Intel Corporation Device 9c16 (rev e4)     00:1c.4 PCI bridge: Intel Corporation Device 9c18 (rev e4)     00:1d.0 USB controller: Intel Corporation Device 9c26 (rev 04)     00:1f.0 ISA bridge: Intel Corporation Device 9c43 (rev 04)     00:1f.2 SATA controller: Intel Corporation Device 9c03 (rev 04)     00:1f.3 SMBus: Intel Corporation Device 9c22 (rev 04)     03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 10)     04:00.0 Network controller: Intel Corporation Device 08b2 (rev 73)     05:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. Device 5227 (rev 01)     06:00.0 Display controller: Advanced Micro Devices [AMD] nee ATI Device 6660


Can the Operating System access a particular filesystem after it has been unmounted?

I have mounted a filesystem at a particular directory and I replace a file present in the filesystem.I now unmount the filesystem. Is there any possibility of Operating system accessing the replaced file present in the filesystem?


check md5sum from pipe

I am confused how `md5sum --check` is supposed to work:               $ man md5sum     -c, --check         read MD5 sums from the FILEs and check them      I have a file, I can pipe it to `md5sum`:               $ cat file | md5sum     44693b9ef883e231cd9f90f737acd58f  -      When I want to check the integrity of the file tomorrow, how can I check if the md5sum is still `44693b9ef883e231cd9f90f737acd58f`? ### Note `cat file` might be a stream. So I want to use the pipe as in my example, not `md5sum file`.


Round/truncate digit in string in zsh (or with external tool)

I'm trying to do an interface to `bc` so it can be used intuitively and without the annoyance of getting "stuck" in it. I haven't got around to test it that much, because I got stuck on another detail, namely how to present the result (which is, I think, a string). Rounding or truncating does not matter, either one is fine. Take a look below, and you'll understand immediately. I use zsh but an external tool will be just fine as I won't use this in any time or otherwise critical context, it's just a desktop tool.               calc () {         result=`bc <<EOF         scale=3;         $@         EOF`         echo ${result//%0/} # doesn't work; will only remove one zero                             # also, if there are only zeroes, should                             # remove dot as well - what about .333, etc.?     }      **Edit** I'm very impressed by the below solution, especially how the `noglob` gets away with the quotes! But, the use of a dot to force floating point calculation is something I'll never remember (you don't use a normal calculator like that). And it is even a bit risky, especially for calculations when it's not obvious that floating point would yield an altogether different result (most likely the one you wanted). Also, the calculations below show some un-pretty output (the too long real, and the trailing dot). Perhaps I should combine this (some of it) with the output formatting of @Gille's answer below? When I get it to work perfectly, I'll post the result here. ( **Edit:** The accepted answer works great. Be sure to read the comments to that answer, as well.)               calc () {       echo $(($*));     }     alias calc='noglob calc'          calc 1./3     0.33333333333333331     calc 7.5 - 2.5     5.


Tmux not sourcing my .tmux.conf

I installed tmux locally (without root priviledges). I also created my `.tmux.conf` file in my home directory with the following lines:               unbind-key C-b     set -g prefix C-o     bind-key C-o send-prefix      However, `tmux` does not seem to be sourcing this file (my bind key is still `C-b`). I have tried closing and re-opening my ssh session (this is on a remote machine) with no success. What could be hapenning?


Navigating through the directory stack in zsh from the command line

In zsh, is there a way to navigate through the **history of directories** that I have visited (those listed in dirs) **when I am typing a command in the command line**? For example, say that I start typing `cp -r` in the terminal, I would like to then use `M-n` or `M-p` until I find a directory, from the list of directories that I have visited, that I want to follow `cp -r` in the command that I am typing. Eventually I would find `/some/path/` for the `cp` source directory, and then type `<SPC>` and repeat the process to find `/some/other/path` for the `destination directory` for my `cp` command. In case it helps, the code below helps me navigate my **command history** from the command line using `C-n` and `C-p`, which allows me to autocomplete my command with other commands that I previously typed.               up-line-or-history-beginning-search () {       if [[ -n $PREBUFFER ]]; then         zle up-line-or-history       else         zle history-beginning-search-backward       fi     }     down-line-or-history-beginning-search () {       if [[ -n $PREBUFFER ]]; then         zle down-line-or-history       else         zle history-beginning-search-forward       fi     }          zle -N up-line-or-history-beginning-search     zle -N down-line-or-history-beginning-search          bindkey '^P' up-line-or-history-beginning-search     bindkey '^N' down-line-or-history-beginning-search


rsyslog.conf only partly honored

I followed this description on how to enable audit for Samba (entry of Aug 10, 2009) and wanted to get all additionally enabled logging in a special log file (`/var/log/samba/log.audit`). The mentioned line `local7.* /var/log/samba/log.audit` I placed at the end of my existing `/etc/rsyslog.conf` file. It seemed a bit out of place there, but after restarting everything, the mentioned file was created, presumably by the syslog daemon, so I assumed this was working. But it stayed at a size of 0 bytes. After creation of the file, nothing was logged there. It took me some time but then I found that all logging was done into the default syslog file (`/var/log/syslog`). I guess the config line in `/etc/rsyslog.conf` is correct, but somehow the way it was supposed to be addressed in the `/etc/samba/smb.conf` is not working. I repeat in short what the blog above suggested to do: Add the lines               vfs objects = full_audit          full_audit:prefix = %u|%I|%m|%S     full_audit:success = mkdir rename unlink rmdir pwrite     full_audit:failure = none     full_audit:facility = local7     full_audit:priority = NOTICE      to the existing `smb.conf` and add the line               local7.*                        /var/log/samba/log.audit      to the `syslog.conf` (I took my existing `/etc/rsyslog.conf` for this). Can anybody tell me how to fix this so that the logging is done into the intended file `/var/log/samba/log.audit`?


How to time grep commands accurately?

I want to compare the speed of these two commands:               grep pattern1 files*      grep pattern2 files*       Unfortunately, the first grep reads much of files* into memory buffers, so the second grep runs very quickly, but for the wrong reason. How do I tell Linux (Fedora 11): "please stop caching disk reads because I'm testing something."


grep multiple strings, count lines, echo output for each string

I have a directory of files that is structured like this:               data/directory1/file1.xml     data/directory2/file2.xml     data/directory3/file3.xml     ...      There are thousands of sub directories within data/, each with one xml file. I would like to recursively scan data/ and look for three patterns, then echo the count of the pattern match (ideally) with a label before each. So, for my output, I'd like to see               Pattern 1 = 20     Pattern 2 = 100     Pattern 3 = 432      I've been able to use this to run these one at a time using:               grep -E -r 'Pattern 1' data/ | wc -l     grep -E -r 'Pattern 2' data/ | wc -l     grep -E -r 'Pattern 3' data/ | wc -l       Now I'm trying to put this all into a shell script with one argument, which would be parent directory of data/. Then output the count to each pattern to either standard output or count.txt. Your help is appreciated!


Color PS1 based on previous command output

I have my current PS1 as follows. The `$?` output is really useful (second line).               export PS1="\     ${PSOn_Blue}${PSBWhite}\t\     ${PSColor_Off} \$?\     ${PSColor_Off}${PSBGreen} \u\     ${PSColor_Off}${PSWhite}@\     ${PSColor_Off}${hostcolor}\h\     ${PSColor_Off}:\     ${PSBGreen}\w\     ${PSColor_Off}\$\      "      It would be even nicer if the return code ($?) would be red on non-zero output. How can I achieve this?


network interface does not become active although onboot enabled

Due to some other conflicts, I disabled/stopped NetworkManager in Fedora 15, Now, for network configuration I used system-config-network-gui to config & enable Ethernet interface, Problem is, when system starts, the Ethernet does not become enabled. Although in configuration through system-config-network, I specifically checked "Activate device when computer starts" "Allow all users to enable and disable the device", and cleared "Controlled by NetworkManager" I double checked the config file "/etc/sysconfig/networking/devices/ifcfg- eth0" to see if the configurations are saved correctly and onboot is enabled. And they look OK. so, Why still it does not become enabled automatically on boot?               # Atheros Communications AR8121/AR8113/AR8114 Gigabit or Fast Ethernet     DEVICE=eth0     ONBOOT=yes     BOOTPROTO=none     TYPE=Ethernet     IPV6INIT=no     USERCTL=yes     DEFROUTE=yes     IPV4_FAILURE_FATAL=yes     NAME="System eth0"     UUID=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX     DNS2=4.2.2.4     DNS1=8.8.8.8     IPADDR0=192.168.0.200     PREFIX0=24     GATEWAY0=192.168.0.1     DNS3=192.9.9.3     HWADDR=XX:XX:XX:XX:XX:XX     IPADDR=192.168.0.200     NETMASK=255.255.255.0     GATEWAY=192.168.0.1     NM_CONTROLLED=no     PREFIX=24


How to restore the user postgres?

In the second answer in this thread is a warning about changing the UNIX password for "postgres".   I have already changed the password for "postgres".   How could I restore the initially state of the user "postgres"?


How to find creation date of file?

I want to find out the creation date of particular file, not modification date or access date. I have tried with `ls -ltrh` and `stat filename`.


dd command lost partition

When I used to image my USB, I used the `dd` command and saved that image to my Hard Disk my USB = sdb1 (4 GB) My partation = sda5 (775 GB free space)               dd if=/dev/sdb1 of=/dev/sda5      operation completed. my USB 4 GB take my 775 GB. :( I lost my 775 GB. How to restore and how to make? ![enter image description here](http://i.stack.imgur.com/y3otS.png)


how to install gcc4.8 in netbsd 6.1.3?

I did a "make install" for lang/gcc48 in pkgsrc. It did built ok. However, when I do gcc --versions, the default gcc 4.5.3 is displayed. What steps do I need to do after the build?


How to sort vertically and horizontally?

Before (INPUT.txt):                   Foo#1   Foo#2   Foo#3   Foo#4   Foo#4   Foo#5   SUM     Bar#1   0   0   0   0   3   0   3     Bar#2   2   0   1   0   0   0   3     Bar#3   0   0   0   2   2   0   4     Bar#4   0   0   1   1   2   0   4     Bar#5   1   0   1   0   0   0   2     Bar#6   3   20  0   0   1   0   24     Bar#7   1   0   2   0   0   0   3     SUM 7   20  5   3   8   0   43      After (OUTPUT.txt):                   Foo#2   Foo#4   Foo#1   Foo#3   Foo#4   Foo#5   SUM     Bar#6   20  1   3   0   0   0   24     Bar#3   0   2   0   0   2   0   4     Bar#4   0   2   0   1   1   0   4     Bar#1   0   3   0   0   0   0   3     Bar#2   0   0   2   1   0   0   3     Bar#7   0   0   1   2   0   0   3     Bar#5   0   0   1   1   0   0   2     SUM 20  8   7   5   3   0   43      **Tricky question:** How to sort vertically and horizontally by the SUM column and row in bash or perl? Screenshots: Before: ![enter image description here](http://i.stack.imgur.com/VGZ7q.png) After: ![enter image description here](http://i.stack.imgur.com/yrhUH.png)


Delete rows in a csv file based on a specific column value

I have a csv file with the following headers - Interaction_ID, PDB_ID, First_Residue, First_Chain, Second_Residue, Third_Residue, Third_Chain & Pattern:               AM_AUTO_1,1cx0,A166,B,C118,B,G129,B,A-minor Type I ACG                                 AM_AUTO_2,1cx0,A165,B,C119,B,G128,B,A-minor Type II ACG                                AM_AUTO_3,1cx0,A166,B,C119,B,G128,B,A-minor Type II ACG                                AM_AUTO_4,1ddy,A25,A,C21,A,G8,A,A-minor Type I ACG                                 AM_AUTO_5,1e7k,A33,C,C28,C,G45,C,A-minor Type 0 AGC                                 AM_AUTO_6,1e7k,A33,D,C28,D,G45,D,A-minor Type 0 AAU      What I would like to do is delete rows in the csv file where Pattern = %Type 0% and then print the resulting csv file. The result should be like this:               AM_AUTO_1,1cx0,A166,B,C118,B,G129,B,A-minor Type I ACG                                 AM_AUTO_2,1cx0,A165,B,C119,B,G128,B,A-minor Type II ACG                                AM_AUTO_3,1cx0,A166,B,C119,B,G128,B,A-minor Type II ACG                                AM_AUTO_4,1ddy,A25,A,C21,A,G8,A,A-minor Type I ACG        How I can do this using awk?


Configure firewalld for OpenVPN (server-bridge) in Fedora 20

I've installed an OpenVPN server on Fedora 20 (server-bridge), but I cannot get it to work. I'm almost sure that It's a firewall issue. I'm trying to connect from an OSX client, but I can connect (just connect to VPN server, without access to anything) before the bridge is configured in server, however once I configure the bridge interface (using this script), then I cannot connect anymore. I've configured it as server-bridge, following these HOW-TOs from Fedora and OpenVPN Ethernet-Bridge. The firewall config is explained using iptables:               iptables -A INPUT -i tap0 -j ACCEPT     iptables -A INPUT -i br0 -j ACCEPT     iptables -A FORWARD -i br0 -j ACCEPT      However, in Fedora 20, by default, It's installed firewalld, so, Can anyone tell me the equivalent commands using `firewall-cmd` ? I read the firewalld guide, but It's not clear to me how to achieve it (I'm a developer, no SysAdmin). I know that I can install iptables, but I want it to work with firewalld.


Lots of free memory, but Java won't start (SunOS 5.10)

_vmstat_ gives:               swap        free     37489684    110178592      Still I have issues, while trying to run _Java_ process with 10g heap:               > java -Xmx10g -Xms10g -d64 HelloWorldApp          Error occurred during initialization of VM     Could not reserve enough space for object heap      Why it happens and how to remediate the issue? **Update.** Output of _ulimit -a_ :               core file size          (blocks, -c) unlimited     data seg size           (kbytes, -d) unlimited     file size               (blocks, -f) unlimited     open files                      (-n) 256     pipe size            (512 bytes, -p) 10     stack size              (kbytes, -s) 10240     cpu time               (seconds, -t) unlimited     max user processes              (-u) 25525     virtual memory          (kbytes, -v) unlimited


How to test swap partition

I'm trying to diagnose some random segfaults on a headless server and one thing that seems curious is that they only seem to happen under memory pressure and my swap size will not go above 0. How can I force my machine to swap to make sure that it is working properly?               orca ~ # free                  total       used       free     shared    buffers     cached     Mem:       1551140    1472392      78748          0     333920    1046368     -/+ buffers/cache:      92104    1459036     Swap:      1060280          0    1060280          orca ~ # swapon -s     Filename                                Type            Size    Used    Priority     /dev/sdb2                               partition       1060280 0       -1


Resources for very low-level (board bring-up)

I've worked with a few embedded systems, but now I'd like to make my own piece of hardware and despite a pretty thorough knowledge of Linux, I have no idea how to get Linux up and running on new hardware. So I'm looking for resources on how to do some board bringup/support. _Some more details:_ I'm wondering about the following kinds of things: How does Linux know the processor configuration - e.g. how the pins are configured, how much cache is there, is there an MMU present. How does Linux know about the board layout - e.g. which pins are the memory bus, where is the row select, column select, which pins are an i2c bus, and so on.


How can I run a daemon with custom parameters

I am wondering how I can run a daemon, in this case NTP, with custom parameters. For example in my Ubuntu PC I observe that I've got `ntpd` running this way:               $ ps aux | grep ntpd     ntp  5936  ...  0:00 /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 119:127      You may notice that `-g` parameter. But in my Gentoo PC I run the same command and I can observe that the ntp daemon is not running with that `-g` parameter and I want to add it! Is this a distribution specific issue? How can I handle this?


Adding custom DNS server for pppd client connection?

I'm trying to setup dnsmasq to accelerate DNS resolving , but since i use a PPPoE connection , there're both dns server provided by ISP , and the 127.0.0.1. So how can i place the local dns server as the first line in /etc/resolv.conf automatically ? And please don't let me use a static dns server configuration .. Thanks !


What are the key differences between $ENV_VAR and `env_var`?

It's a quite simple asked question I think: What are the key differences between using environment variables just like $HOSTNAME and `hostname`. Where is which appropriate, why are there two possibillities to represent them?


FreeBSD kernel nat or natd?

As I notice more often with FreeBSD, there are always plenty of ways that lead to some specific goal. After figuring out which firewall I wanted (I choose ipfw) I now am completely insecure about which way to do Network Address Translation (NAT). As I have discovered now, there are two ways to to NAT, I could use the kernel space `ipfw nat` or I could use the userspace `natd`. The only one of these described in the FreeBSD handbook is `natd`. What I would like to know is what the main differences are between these? Which one is more popular. Off course I would also like to be able to fish, so how I can find out these differences in the manuals/handbooks?


Auto connect to a wireless network (Ångström Linux)

I am using Ångström Linux on BeagleBoard-xM. I have installed a RTL8188SU USB Wi-Fi adapter and configured it properly. But it doesn't connect automatically even though I have marked the interface as `auto` in `/etc/network/interfaces` file. My `/etc/network/interfaces` file is seen below (only `wlan0` settings pasted):               auto wlan0     iface wlan0 inet static         address 192.168.2.50         netmask 255.255.255.0         gateway 192.168.2.1         wireless_mode managed         wireless_essid MY NETWORK ESSID         wireless_key   MY_PASS      And here is the output of `ifconfig` command after system boot:               root@beagleboard:~# ifconfig     lo        Link encap:Local Loopback               inet addr:127.0.0.1  Mask:255.0.0.0               inet6 addr: ::1/128 Scope:Host               UP LOOPBACK RUNNING  MTU:16436  Metric:1               RX packets:24 errors:0 dropped:0 overruns:0 frame:0               TX packets:24 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:0               RX bytes:1632 (1.5 KiB)  TX bytes:1632 (1.5 KiB)          wlan0     Link encap:Ethernet  HWaddr XX:XX:XX:XX:XX:XX               inet6 addr: fe80::2e0:4cff:fe03:cbb1/64 Scope:Link               UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1               RX packets:241 errors:0 dropped:0 overruns:0 frame:0               TX packets:6 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:1000               RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)      As you can see, there is no `inet` connection on interface `wlan0`. When I type `ifdown wlan0` and `ifup wlan0` consecutively, the wireless connection can be established successfully according to interface settings. The output of `ifconfig` after restarting `wlan0` is shown below:               wlan0     Link encap:Ethernet  HWaddr XX:XX:XX:XX:XX:XX               inet addr:192.168.2.50  Bcast:192.168.2.255  Mask:255.255.255.0               UP BROADCAST MULTICAST  MTU:1500  Metric:1               RX packets:974 errors:0 dropped:0 overruns:0 frame:0               TX packets:22 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:1000               RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)      I want my wireless connection to be established automatically on system boot (and preferably after replugging Wi-Fi adapter). Is there anything that I am missing to do so? **EDIT:** I have traced boot log and seen a message that is complaining about setting ESSID:               Error for wireless request "Set ESSID" (8B1A) :         SET failed on device wlan0 ; Operation not permitted.      However, I haven't realized the source of the problem. After the system boot I can establish connection by restarting networking.


Why can't I change permission on a symlink on Mac?

Simple question and there is perhaps a simple answer. I have several directories in my home folder that I would like to make available as a directory on my webserver. So, what I did was to create a symlink:               iMac:/Library/WebServer/Documents/ ls -ltr     -rw-rw-r--  1 root      admin     44 Nov 20  2004 index.html.en     -rw-rw-r--  1 root      admin  31958 May 18  2009 PoweredByMacOSXLarge.gif     -rw-rw-r--  1 root      admin   3726 May 18  2009 PoweredByMacOSX.gif     -rwxr-xr-x  1 mego  admin      0 Jan  6  2011 favicon.ico     lrwxrwxr-x  1 mego  admin     52 Jul 26 13:45 myadmin -> /Users/mego/Downloads/phpMyAdmin-3.4.3.2-english     iMac:/Library/WebServer/Documents/ ln -s /Users/mego/opt/rel/src/main/web/ rel     iMac:/Library/WebServer/Documents/ ls -ltr     -rw-rw-r--  1 root      admin     44 Nov 20  2004 index.html.en     -rw-rw-r--  1 root      admin  31958 May 18  2009 PoweredByMacOSXLarge.gif     -rw-rw-r--  1 root      admin   3726 May 18  2009 PoweredByMacOSX.gif     -rwxr-xr-x  1 mego  admin      0 Jan  6  2011 favicon.ico     lrwxrwxr-x  1 mego  admin     52 Jul 26 13:45 myadmin -> /Users/mego/Downloads/phpMyAdmin-3.4.3.2-english     lrwxrwx---  1 mego  admin     47 Oct 12 09:58 rel -> /Users/mego/opt/rel/src/main/web/      Permissions on /Users/mego/opt/rel are recursively set to a+rx so everybody can read and execute. When I try to change the permission, i.e. " **chmod a+rx rel** " and " **chmod -R a+rx /Users/mego/opt/rel** ", zero effect. The output of               ls -ld / /Users /Users/mego /Users/mego/opt /Users/mego/opt/rel /Users/mego/opt/rel/src /Users/mego/opt/rel/src/main /Users/mego/opt/rel/src/main/web          iMac:~/ ls -ld / /Users /Users/mego /Users/mego/opt /Users/mego/opt/rel /Users/mego/opt/rel/src /Users/mego/opt/rel/src/main /Users/mego/opt/rel/src/main/web     drwxrwxr-t@ 39 root      admin  1394 Sep 14 15:30 /     drwxr-xr-x   7 root      admin   238 Aug 29 10:04 /Users     drwxr-xr-x+ 98 mego  staff  3332 Oct 15 10:59 /Users/mego     drwxrwxr-x  19 mego  staff   646 Oct 14 20:47 /Users/mego/opt/rel     drwxrwxr-x   5 mego  staff   170 May 31 08:01 /Users/mego/opt/rel/src     drwxrwxr-x   6 mego  staff   204 Oct 12 08:42 /Users/mego/opt/rel/src/main     drwxrwxr-x   5 mego  staff   170 Oct 12 08:42 /Users/mego/opt/rel/src/main/web     iMac:~/       Must be something related to users home folder. But strangely enough, another folder " **myadmin** " has correct permissions and it works. What am I doing wrong? Thank you in advance.


Script to check for read only filesystem

How can I check a bunch of systems to find any filesystem that are mounted read-only? Possibly via a script?


cURL on Linux not compiled, although installed

cURL is not compiled into PHP. I'm running:               [root@vps ~]# cat /etc/issue     CentOS release 5.7 (Final)     Kernel \r on an \m      Then I execute `yum install curl` and `yum install php-curl`. Then:                  [root@vps ~]# which curl         /usr/bin/curl        [root@vps ~]# /usr/bin/curl -v     curl: no URL specified!     curl: try 'curl --help' for more information      My environment still shows that I haven't compile curl into php. Why? I used `phpinfo()`, which shows: ![cURL support: enabled](http://i.stack.imgur.com/XsjWO.jpg) but when I install `zencart` on my vps hosting, it shows: ![CURL not compiled into PHP - notify server administrator](http://i.stack.imgur.com/8PHnY.jpg) How can I fix this?


Program to filter lines by passing them to an external program?

I'm looking for a program to use an external program to filter the lines of a stream - pretty much a version of `grep` that, for each line, prints or suppresses it based on whether the specified program exits with a zero exit code (like `find`'s `-exec` option). I know that I can do this in shell by using a loop and a subshell:               some-program |(while read line; do         if predicate "$line"; then             echo "$line"         fi     done)      What I'm wondering is if there's a program floating around that will let me make this simpler:               some-program |filter predicate     # want negation as well     some-program |filter ! predicate      One would think that an enhanced Sed might support this, asking "does it pass on the pattern space?", but GNU Sed does not seem to have such a facility. Is there such a program somewhere that I haven't found, or do I just need to do it in shell (or perl)?


Issues Splitting CSV files

Im trying to split a csv file into multiple files using the below command..This command splits into 5 files but the data is truncated in one of the file? How do I fix this issue?               >>split -n 5 -d -a 2  testfile      I have 5001 lines in my input but the split splits into               file1 - 932     file2 - 910     file3 - 1149     file4 - 1044     file5 - 966      Shouldn't it be 1000 lines per file?


"supervisory" software for school rooms

In a schoolroom there are 15 machines + 1 the teacher's PC. All have ex.: Ubuntu 10.04 LTS.      Are there any softwares that can be used on the teachers machine that can "audit" the students 15 PC? Things needed:      - teacher must see the students "display" from his PC.   - teacher could show 1 students "display" to all of the other students or his own monitor.   - extra: teacher could "control" the students machine remotely (ex.: to show the student the good solution for a given exercise)


Where is Netbeans installed on Ubuntu?

I installed Netbeans on my Ubuntu 11.10 machine. I used the combined method, so Netbeans and JDK are installed from a single file. However, now that it's installed I can't figure out how to start Netbeans. If I try to reinstall it says that Netbeans is already installed, but if I look in `/usr/share/netbeans` there are the installation files but nothing else. How do I run Netbeans?


Cross mounting nfs shares on linux servers

We have a few linux file servers, our sysadmin refuses to do any NFS cross mounting, by cross mounting I mean mounting an nfs share from server A on server B and a share from server B on A .   Anybody knows if there are any problems with this cross mounting?


ssh prompts for password despite .ssh/authorized_keys

I issued `ssh username@db2workgoup -n "echo`cat ~/.ssh/id_dsa.pub`>> ~/.ssh/authorized_keys"` and then checked that the key was stored in authorized_keys file. But ssh is still asking for the password. I used the same for other servers within our company without any troubles. Someone can help me to ssh without password prompt?   * ssh from OSX   * ssh to openSUSE 11.2 (x86_64)   * permissions are for home dir, .ssh dir and authorised_keys file 700 or less `/var/log/messages` has entry `ec 9 11:09:53 db2workgroup automount[3506]: update_negative_cache: key ".user.ini" not found in map.` from the time I tried to log in . output from ssh -vvv               radek:~ radek$ ssh -vvv root@db2workgroup     OpenSSH_5.2p1, OpenSSL 0.9.8k 25 Mar 2009     debug1: Reading configuration data /etc/ssh_config     debug2: ssh_connect: needpriv 0     debug1: Connecting to db2workgroup [10.0.0.22] port 22.     debug1: Connection established.     debug1: identity file /Users/radek/.ssh/identity type -1     debug1: identity file /Users/radek/.ssh/id_rsa type -1     debug3: Not a RSA1 key file /Users/radek/.ssh/id_dsa.     debug2: key_type_from_name: unknown key type '-----BEGIN'     debug3: key_read: missing keytype     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug2: key_type_from_name: unknown key type '-----END'     debug3: key_read: missing keytype     debug1: identity file /Users/radek/.ssh/id_dsa type 2     debug1: Remote protocol version 2.0, remote software version OpenSSH_5.2     debug1: match: OpenSSH_5.2 pat OpenSSH*     debug1: Enabling compatibility mode for protocol 2.0     debug1: Local version string SSH-2.0-OpenSSH_5.2     debug2: fd 3 setting O_NONBLOCK     debug1: SSH2_MSG_KEXINIT sent     debug1: SSH2_MSG_KEXINIT received     debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1     debug2: kex_parse_kexinit: ssh-rsa,ssh-dss     debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se     debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se     debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96     debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96     debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib     debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib     debug2: kex_parse_kexinit:      debug2: kex_parse_kexinit:      debug2: kex_parse_kexinit: first_kex_follows 0      debug2: kex_parse_kexinit: reserved 0      debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1     debug2: kex_parse_kexinit: ssh-rsa,ssh-dss     debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se     debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se     debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96     debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96     debug2: kex_parse_kexinit: none,zlib@openssh.com     debug2: kex_parse_kexinit: none,zlib@openssh.com     debug2: kex_parse_kexinit:      debug2: kex_parse_kexinit:      debug2: kex_parse_kexinit: first_kex_follows 0      debug2: kex_parse_kexinit: reserved 0      debug2: mac_setup: found hmac-md5     debug1: kex: server->client aes128-ctr hmac-md5 none     debug2: mac_setup: found hmac-md5     debug1: kex: client->server aes128-ctr hmac-md5 none     debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent     debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP     debug2: dh_gen_key: priv key bits set: 133/256     debug2: bits set: 518/1024     debug1: SSH2_MSG_KEX_DH_GEX_INIT sent     debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY     debug3: check_host_in_hostfile: filename /Users/radek/.ssh/known_hosts     debug3: check_host_in_hostfile: match line 12     debug3: check_host_in_hostfile: filename /Users/radek/.ssh/known_hosts     debug3: check_host_in_hostfile: match line 12     debug1: Host 'db2workgroup' is known and matches the RSA host key.     debug1: Found key in /Users/radek/.ssh/known_hosts:12     debug2: bits set: 509/1024     debug1: ssh_rsa_verify: signature correct     debug2: kex_derive_keys     debug2: set_newkeys: mode 1     debug1: SSH2_MSG_NEWKEYS sent     debug1: expecting SSH2_MSG_NEWKEYS     debug2: set_newkeys: mode 0     debug1: SSH2_MSG_NEWKEYS received     debug1: SSH2_MSG_SERVICE_REQUEST sent     debug2: service_accept: ssh-userauth     debug1: SSH2_MSG_SERVICE_ACCEPT received     debug2: key: /Users/radek/.ssh/identity (0x0)     debug2: key: /Users/radek/.ssh/id_rsa (0x0)     debug2: key: /Users/radek/.ssh/id_dsa (0x100123c50)     debug1: Authentications that can continue: publickey,keyboard-interactive     debug3: start over, passed a different list publickey,keyboard-interactive     debug3: preferred publickey,keyboard-interactive,password     debug3: authmethod_lookup publickey     debug3: remaining preferred: keyboard-interactive,password     debug3: authmethod_is_enabled publickey     debug1: Next authentication method: publickey     debug1: Trying private key: /Users/radek/.ssh/identity     debug3: no such identity: /Users/radek/.ssh/identity     debug1: Trying private key: /Users/radek/.ssh/id_rsa     debug3: no such identity: /Users/radek/.ssh/id_rsa     debug1: Offering public key: /Users/radek/.ssh/id_dsa     debug3: send_pubkey_test     debug2: we sent a publickey packet, wait for reply     debug1: Authentications that can continue: publickey,keyboard-interactive     debug2: we did not send a packet, disable method     debug3: authmethod_lookup keyboard-interactive     debug3: remaining preferred: password     debug3: authmethod_is_enabled keyboard-interactive     debug1: Next authentication method: keyboard-interactive     debug2: userauth_kbdint     debug2: we sent a keyboard-interactive packet, wait for reply     debug2: input_userauth_info_req     debug2: input_userauth_info_req: num_prompts 1     Password:


Why does scp say "No such file"?

I have a bash script that uses `scp` to copy a file from my machine to another. The script keeps on exiting after I enter the SSH password with the error:               <filename>: No such file or directory      Yet, in the script, I check the file, and it is just fine. I did `set -o verbose ` at the beginning and here's what I get at the end of the script:               scp /Volumes/FX4\ HDD/Users/matthewdavies/Downloads/NCIS.S11E01.HDTV.x264-LOL.mp4 root@rpi.local:"/media/3TB/TV\ Shows/NCIS"     root@rpi.local's password:     /Volumes/FX4\ HDD/Users/matthewdavies/Downloads/NCIS.S11E01.HDTV.x264-LOL.mp4: No such file or directory      So, I tried executing the `scp` command as outputted and it was fine; it copied. What's going wrong???


Do all Debian-based distributions come with the same default .bashrc?

I ask this out of curiosity because while I have kept my system configuration files under version control for some time now, they've only ever been for OS X. Recently, though, I've been developing more and more in Ubuntu and other Linux machines--mostly Ubuntu and other Debian-biased ones--so I've begun adding Linux-specific config files to version control too. I know about the differences in the behaviour of `.bash_profile` and `.bashrc` between OS X and Linux, so it makes sense that the default OS X .bashrc would differ from that of Linux. I've only used Ubuntu Server 12.04 and the latest version of Raspbian and I've noticed that the .bashrc for both are the same, but I'm wondering - between the Debian distributions, do they all have the same .bashrc?


Cut command not extracting fields properly in aligned columns

I have a text file in which I must cut the fields 3,4,5 and 8:               219 432 4567 Harrison     Joel     M 4540 Accountant      09-12-1985     219 433 4587 Mitchell     Barbara  C 4541 Admin Asst      12-14-1995     219 433 3589 Olson        Timothy  H 4544 Supervisor      06-30-1983     219 433 4591 Moore        Sarah    H 4500 Dept Manager    08-01-1978     219 431 4527 Polk         John     S 4520 Accountant      09-22-1998     219 432 4567 Harrison     Joel     M 4540 Accountant      09-12-1985     219 432 1557 Harrison     James    M 4544 Supervisor      01-07-2000      Since the delimiter by default is tab the command to extract the fields would be:               cut -f 3,4,5,8 filename      The thing is that the output is the same as the original file content. What is happening here? Why doesn't this work?