title: Why is this RPM "uninstallable"?

text: Sometimes when I ask Zypper to install something, I will get a message similar to this:               Problem: foo-tools requires foo-lib, but this requirement cannot be provided          Problem: foo-tools requires foo-lib, but this requirement cannot be provided       uninstallable providers: foo-lib.7.31.13.x86_64     Solution 1: do not install foo-tools     Solution 2: break foo-tools by ignoring some of its dependencies      Why the hell does Zypper think that the RPM which I purposely gave it for this exact reason is an "uninstallable provider"? What does this message _mean_? Is the RPM file unreadable? Wrong arch? Wrong version? _What is it upset about??_


title: pulseaudio suddenly stopped working?

text: I am using arch linux and i was using pulseaudio suddenly today pulseaudio stopped working and no sound is coming in both my speaker and headphone. I can see pulseaudio is running properly and I am able to hear the beep sound from my computer but not any other sound??? any suggestions please I had already read the wiki page. I run pulseaudio as root and I had added my root in audio group


title: Is there any X windows system, which is HTML, CSS, Javascript? Such as Web Browser?

text: For dacades X windows system is either BASH, C or etc. But is there any X windows system or any wrapper which can interpret HTML, CSS, Javascript to general Windows system? I would like to build this: http://www.google.com/tv/features.html (everything comes from my web server, and get render as UI) What is the best way to do so?


title: Create bootable ubuntu usb for mac, or any pc

text: I've used Ubuntu live and the start up disk creator tool to create a bootable usb with ubuntu. I used the start up disk tool and I first clicked erase, to clear the contents of the usb, and then create disk. It completed successfully, but I cannot get my mac to recognize it as a bootable device. It does not show up in the startup disk list (in system preferences). I cannot get it see the device using 'option' or 'c' while rebooting. How do I get mac to see it as a bootable device? Thanks, -N


title: Kodak still camera udev problem

text: My still camera is not includev in udev list. lsusb stands:               Bus 007 Device 016: ID 040a:058b Kodak Co. Digital Camera      So I add to /usr/lib/udev/rules.d/40-libgphoto2.rules               ATTRS{idVendor}=="040a", ATTRS{idProduct}=="058b", ENV{ID_GPHOTO2}="1", ENV{GPHOTO2_DRIVER}="proprietary"      according to the entry for similar unit from the same vendor but different idProduct "058a" But my camera is not available from any photo app including gwenview or even from any filemanager. Simply can not be mounted as a storage. Any idea how to correct my entry in udev?


title: How do I install unetbootin on an E1 Vision AMD processor?

text: I'm on Ubuntu on an E1 Vision AMD (64 bit) processor. The available binaries for Unetbootin do not work on this architecture. Is there any way that I can get Unetbootin working on this system?


title: How to disable USB autosuspend on kernel 3.7.10 or above?

text: I've updated my HTPC from kernel **3.7.10** to **3.10.7** and it seems **CONFIG_USB_SUSPEND** is now gone from the kernel options and included in PM. The main problem I'm facing is that I have an external HDD and when suspending and waking up the HTPC, it isn't available to the system. The HDD wakes up (you can hear it spin up again), but when you try to access the mount point you get the following error:               ZOTAC ~ # ls /media     ls: reading directory /media: Input/output error      And on dmesg:               [  253.278260] EXT4-fs warning (device sdb1): __ext4_read_dirblock:908: error reading   directory block (ino 2, block 0)      In previous kernels, setting CONFIG_USB_SUSPEND=N would solve the problem, as the HDD would handle its hibernation by itself and the mount point was always accesible. When the HDD was on sleep and the HTPC needed something from the HDD's mount point, the HDD itself would wake up and operate without issues. Right now I've tried the following without success:   1. Manually change **/sys/bus/usb/devices/usb*/power/control** to _"on"_ instead of _"auto"_.    2. Manually change **/sys/bus/usb/devices/usb*/power/autosuspend** to _"-1"_ instead of _"0"_.  But when waking up again the HTPC, the mount point is again inaccesible. As workarround I can unmount and remount the mount point and it works again without problems, but I'm sure there should be a way to avoid having the OS handle the usb autosuspend. Any idea how to disable usb autosuspend on kernel 3.7.10 or above?


title: Mounting an old floppy image file (.ima format) - how hard can it be?

text: I'm trying to `mount` and access a floppy image file in the .ima format (raw dump to floppy, similar to .img) on ArchLinux. This file is part of a set of 30. It is not bootable, but rather a continuation of a set. The purpose is not manipulation for the sake of installation or cloning. I'm interested in the documentation contained with other data on the disk. ## Image file information Here is some info about this image file:               # file U19.IMA     U19.IMA: PC formatted floppy with no filesystem          # fdisk -lu U19.IMA     Disk U19.IMA: 1.4 MiB, 1474560 bytes, 2880 sectors     Units: sectors of 1 * 512 = 512 bytes     Sector size (logical/physical): 512 bytes / 512 bytes     I/O size (minimum/optimal): 512 bytes / 512 bytes          (parted) print     Error: /home/meh/Downloads/U19.IMA: unrecognised disk label     Model: (file)     Disk /home/meh/Downloads/U19.IMA: 1475kB     Sector size (logical/physical): 512B/512B     Partition Table: unknown     Disk Flags:      ## Mount fail Here's the generic error message:               mount -o ro,loop U19.IMA /mnt/cd/     mount: wrong fs type, bad option, bad superblock on /dev/loop0,     missing codepage or helper program, or other error      I've tried many combinations trying to specify a type with -t i.e. ntfs, msdos, iso9660, vfat, and always getting that same error. I thought it's maybe some kind of ntfs file format but ntfs-3G doesn't do much better so no it's not:               # ntfs-3g -o loop U19.IMA /mnt     NTFS signature is missing.     Failed to mount '/home/meh/Downloads/U19.IMA': Invalid argument     The device '/home/meh/Downloads/U19.IMA' doesn't seem to have a valid NTFS.     Maybe the wrong device is used? Or the whole disk instead of a     partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?          # ntfsclone -r -o file.img U19.IMA     ntfsclone v2013.1.13 (libntfs-3g)     ERROR: Input file is not an image! (invalid magic)      Someone suggested maybe a Minix fs. While it is not clear if I can really mount such a filesystem with my current configuration I tried:               mount -t minix -o loop U19.IMA /mnt/cd     which gave the generic error but there was this at the bottom of the log:     VFS: Can't find a Minix filesystem V1 | V2 | V3 on device loop0.      It seems this is not conclusive, as when you specify a specific type of filesystem you will have a specific type of error in the log. Also tried `[fuseiso][2]`:               # fuseiso U19.IMA /mnt/cd     init: wrong standard identifier in volume descriptor 0, skipping..     init: wrong standard identifier in volume descriptor 1, skipping..     init: wrong standard identifier in volume descriptor 2, skipping..     init: wrong standard identifier in volume descriptor 3, skipping..     init: wrong standard identifier in volume descriptor 4, skipping..     init: wrong standard identifier in volume descriptor 5, skipping..     init: wrong standard identifier in volume descriptor 6, skipping..     init: wrong standard identifier in volume descriptor 7, skipping..     init: wrong standard identifier in volume descriptor 8, skipping..     init: wrong standard identifier in volume descriptor 9, skipping..     init: wrong standard identifier in volume descriptor 10, skipping..     init: wrong standard identifier in volume descriptor 11, skipping..     init: wrong standard identifier in volume descriptor 12, skipping..     init: wrong standard identifier in volume descriptor 13, skipping..     init: wrong standard identifier in volume descriptor 14, skipping..     init: wrong standard identifier in volume descriptor 15, skipping..     init: wrong standard identifier in volume descriptor 16, skipping..     init: wrong standard identifier in volume descriptor 17, exiting..      Where I can see such things with `dmesg`:               [ 5316.082629] FAT-fs (loop0): invalid media value (0xf6)     [ 5316.082644] FAT-fs (loop0): Can't find a valid FAT filesystem      Also, `lsmod | grep loop` gives               loop 18511 0      There is no alternate superblock of any kind:               # mkfs -n U19.IMA     mke2fs 1.42.8 (20-Jun-2013)     U19.IMA is not a block special device.     Proceed anyway? (y,n) y     Filesystem label=     OS type: Linux     Block size=1024 (log=0)     Fragment size=1024 (log=0)     Stride=0 blocks, Stripe width=0 blocks     184 inodes, 1440 blocks     72 blocks (5.00%) reserved for the super user     First data block=1     Maximum filesystem blocks=1572864     1 block group     8192 blocks per group, 8192 fragments per group     184 inodes per group      Contrary to many cases I read about, there seems to be no need to specify any offset here as there are no partition built in the image. In such cases, sometimes the `dd` command is used to transfer the content to a similar image using an offset value which allows mounting. This seems the same as specifying an offset to the `mount` command directly. But this should be easy, like in this other case where a simple `losetup` is used and then the loop device is mounted. I can link the .ima file with losetup but when I try to mount the loop device I end up with my initial error message. ## Data integrity Finally, `safecopy --stage1` doesn't report any issue with the data and the output up to stage 3 remains the same and yields the same error:               # safecopy U19.IMA test.img --stage1     Low level device calls enabled mode: 2     Reported hw blocksize: 4096     Reported low level blocksize: 4096     File size: 1474560     Blocksize: 4096     Fault skip blocksize: 147456     Resolution: 147456     Min read attempts: 1     Head moves on read error: 0     Badblocks output: stage1.badblocks     Marker string: BaDbLoCk     Starting block: 0     Source: U19.IMA     Destination: test.img     . ;-} 100%     Done!     Recovered bad blocks: 0     Unrecoverable bad blocks (bytes): 0 (0)     Blocks (bytes) copied: 360 (1474560)      Here's the top of the file and the content seems to be intact:               dd if=U19.IMA | hexdump -C | head -n 10     00000000 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 |................|     *     00004600 34 2e 30 2e 32 20 33 38 36 75 6e 69 78 20 46 6e |4.0.2 386unix Fn|     00004610 64 20 53 65 74 20 35 20 6f 66 20 31 30 0a 00 00 |d Set 5 of 10...|     00004620 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|      * * * ## "Forensics" > Since a raw image consists of a sector-by-sector binary copy of the source > medium, the actual format of the file contents will depend on the file > system of the disk from which the image was created (such as a version of > FAT).[...] Since IMG files hold no additional data beyond the disk contents, > these files can only be handled by programs that can detect their file > systems. Following suggestions, I proceeded to analyze some of the other image files in the set(30):               fdisk -lu U14.IMA     Disk U14.IMA: 1.4 MiB, 1474560 bytes, 2880 sectors     Units: sectors of 1 * 512 = 512 bytes     Sector size (logical/physical): 512 bytes / 512 bytes     I/O size (minimum/optimal): 512 bytes / 512 bytes     Disklabel type: dos     Disk identifier: 0x00000000     This doesn't look like a partition table. Probably you selected the wrong device.          Device Boot Start End Blocks Id System     U14.IMA1   3840       11519      3840       0  Empty     U14.IMA2   2425393152 4850786447 1212696648 0  Empty     U14.IMA3 ? 2425393296 4850786591 1212696648 90 Unknown     U14.IMA4 ? 2425393296 4850786591 1212696648 90 Unknown      Sorry but it does look like a partition table but it is unusual. It includes the _id 90_ property:               90h     MBR, EBR    CHS, LBA    x86, 68000, 8080/Z80    Hidden, Filesystem  FreeDOS     Free FDISK  Hidden FAT16 (corresponds with 04h i.e. MS Fat16 DOS 3.0+ < 65536 sectors)      So trying to mount the image I get:               # mount -t auto U14.IMA /mnt/cd     mount: unknown filesystem type 'sysv'  <-----      As someone hinted, you need to have something specific like ' _System V and Coherent filesystem support_ ' compiled in the kernel in order to use something like `mount -t sysv`. The sysv string is not so suprising, since this is part of AT&T UNIX System V/386 Release 4 Version 2.1 install media - a port which was supported by Sun until 2006 \- and these images ended up in the wild in 2007. Actually a text file bundled with the images indicates that they are required for installation because of the nature of the boot sector and the format in use. There is an indication that the material was originally in Teledisk (TD0) format. I want to stress here that this is not original material. In any case I can't actually calculate the offsets like explained in the question - either I don't end up with integers when dividing by 512, and even if I try it seems I can't find the proper offset - `dd: cannot skip to specified offset, 0 writes` etc. So at this point the answer is about forensics, and no longer about an image file. ## Quick historical image source OS emulation with qemu AT&T UNIX System V Release 4 Version 2.1                                         LABEL             Version         X of X       AT&T UNIX SVR4.0 2.1 --------------------------------------------------            U01.IMA                 Maintanace Disk1  2.1             2 of 2       U02.IMA                 Remote Terminal   2.1             1 of 1                               Package       U03.IMA                 BSD Comp. Pkg.    2.1             1 of 2       U04.IMA                 BSD Comp. Pkg.    2.1             2 of 2       U05.IMA                 Networking Supp.  2.1             1 of 1                               Util. Pkg.       U06.IMA                 Xenix Comp. Pkg   2.1             1 of 1       U07.IMA                 FACE Pkg.         2.1             1 of 1       U08.IMA                 FMLI Pkg.         2.1             1 of 1       U09.IMA                 Editing Utils.    2.1             1 of 1       U10.IMA                 OA&M Basic & Ext. 2.1             1 of 3       U11.IMA                 OA&M Basic & Ext. 2.1             2 of 3       U12.IMA                 OA&M Basic & Ext. 2.1             3 of 3       U13.IMA                 Foundation Set    2.1             1 of 10                               Base System Pkg.                               2 User System       U14.IMA                 Base              2.1a            1 of 10       U15.IMA                 Base              2.1             2 of 10       U16.IMA                 Base              2.1a            2 of 10       U17.IMA                 Base              2.1             3 of 10       U18.IMA                 Base              2.1             4 of 10       U19.IMA                 Base              2.1             5 of 10       U20.IMA                 Base              2.1             6 of 10       U21.IMA                 Base              2.1             7 of 10       U22.IMA                 Base              2.1             8 of 10       U23.IMA                 Base              2.1             10 of 10       U24.IMA                 Maintanance 1     2.1             1 of 2       U25.IMA                 Base              2.1             9 of 10       U26.IMA                 Printer Pkg       2.1             3 of 3       U27.IMA                 Printer Pkg       2.1             2 of 3       U28.IMA                 Printer Pkg       2.1             1 of 3       U29.IMA                 16 to unlimited   2.1             1 of 1                               User License       U30.IMA                 2 to 16 User      2.1             1 of 1                               License      As was suggested, I installed from a prior image in the set. It involves using `qemu` like explained here basically starting with image 14 (first `losetup /dev/loop0 U14.IMA` then a simple `qemu-system-x86_64 -m 256 -hda test.img -fda /dev/loop0 -boot a`), as U19 is not bootable. What is nice here is that you don't have to mount/umount images in the OS itself, you just use `ctrl- alt-2` or 1 with qemu to access or leave the monitor and you use `list blocks` to see what is mounted and `change floppy0 imagename` in that interface to change the image file i.e. during install for instance. I had to supply U19.IMA (disk 5) during installation (for a textual log of the install, see this \- a highlight is the reference to MS-DOS!), and I ended up with this i.e. a properly installed AT&T UNIX Sys V 386 OS, so this pretty much confirms U19.IMA is a working disk image: ![enter image description here](http://i.stack.imgur.com/QXtwh.jpg) By default /dev/fd is mounted on /dev/fd and there is also floppy access through a block (/dev/dsk/f0) and raw (/dev/dsk/f0) device. Changing directory to the floppy just shows files numbered from 1 to 23 (this is just the structure of the character device I guess). You can also `cat` the raw and block devices and see the floppy data is there but that's as close as it gets. I've noticed that in that OS, you don't install stuff from floppies by launching some script from a directory on them like you do with decompressed binary files for instance - here you use `pkgadd -d diskette1` (surely that last word is some alias, but I found a reference to the -d switch in the SCO stuff for pkgadd(1M) and generally it appears often in commercial Unix (Oracle, HP share pkgadd(1M) ). Issuing the command launches a routine where you supply floppies and you have no control, except saying "no" after the routine finds out what's in the drive. In the case of disks which begin an installation sequence (U03, U05 etc.), this will install then ask for the next floppy etc until the package install is complete. If you put a floppy that isn't the beginning of a set, it finds basically nothing but tells you maybe you have to use the `installpkg` command instead. Will I be installing a physical floppy drive to my rig to access the data in that image file?


title: Two "Audio codecs" have 100% power usage in PowerTOP - what does this mean?

text: Should I be worried?   My battery power doesn't last long (~1hr), could this be the reason?   How can I fix this (if it has to be fixed at all)? ![enter image description here](http://i.stack.imgur.com/YLxPd.png)


title: Copy all dotfiles except for `.git` and `..`

text: I am aware of using `.[!.]*` to refer to all dotfiles in a directory with the exception of `..`, but how might one refer to all dotfiles except for `..` and `.git`? I have tried several variations on `.[!.||.git]*` and `.[!.][!.git]*` and the like, but none refer to the intended files.


title: Bandwith Usage in PAM Authentication

text: Is there any way to check how much bandwidth a user used in `OpenVPN` (using `PAM` Authentication)


title: DMA errors on OpenWrt router

text: I have a WRT160NL router with OpenWrt Backfire (10.03.1, r29592), and there is a 3,5" WD Green 1,5TB HDD attached to it. In the recent time if I read the logs on it with "logread" I can see these messages:               Dec 12 17:07:16 OWRTROUTER user.err kernel: ath: DMA failed to stop in 10 ms AR_CR=0x00000024 AR_DIAG_SW=0x42000020 DMADBG_7=0x00024020     Dec 12 17:07:16 OWRTROUTER user.err kernel: ath: Could not stop RX, we could be confusing the DMA engine when we start RX up     Dec 12 17:07:16 OWRTROUTER user.err kernel: ath: DMA failed to stop in 10 ms AR_CR=0x00000024 AR_DIAG_SW=0x42000020 DMADBG_7=0x00024020     Dec 12 17:07:16 OWRTROUTER user.err kernel: ath: Could not stop RX, we could be confusing the DMA engine when we start RX up     Dec 12 17:07:17 OWRTROUTER user.err kernel: ath: DMA failed to stop in 10 ms AR_CR=0x00000024 AR_DIAG_SW=0x42000020 DMADBG_7=0x00024020     Dec 12 17:07:17 OWRTROUTER user.err kernel: ath: Could not stop RX, we could be confusing the DMA engine when we start RX up      What are these messages? Are there a sign of a future problem? How to handle them?


title: Creating a Live Kernel with u-boot

text: I want to create a live kernel with u-boot. I have a ARM board that has a 4GB nand flash memory. I used manufacturing tools from the freescale website for the i.mx6 chip. I have read that you can use u-boot on a separate computer to connect to the embedded device via IP and extract the files needed to create an image of the kernel with all downloaded files and packages. I need help with this process. My research led me into a dead end. Has anyone done this before or can anyone suggest any well written guides to do this?


title: understand the designation of symbolic links

text: I have a number of files in `/etc/rc3.d/` directory which all are symbolic links and point to files in `/etc/init.d/` directory using `../init.d/` designation. For example file `S18rsyslog` in `/etc/rc3.d/` directory is a symbolic link to file `/etc/init.d/rsyslog`, but according to `ls -l`, `/etc/rc3.d/S18rsyslog` does not point to `/etc/init.d/rsyslog` but `../init.d/rsyslog` instead:               # ls -l /etc/rc3.d/S18rsyslog     lrwxrwxrwx 1 root root 17 30. jun 15:05 /etc/rc3.d/S18rsyslog -> ../init.d/rsyslog     #       What is the advantage to keep symbolic links relative to directory? Because this allows one to move the direcoty itself without breaking the symbolic links? In addition, is it possible to create a symbolic link with `..`(parent directory) in the path without being in the directory? `ln -sv '/etc/init.d/rsyslog' '/etc/rc3.d/../init.d/rsyslog'` obviously does not work as symlink is created into `/etc/init.d/` directory while I would like to have symlink named `../init.d/rsyslog` in the `/etc/rc3.d/` directory.


title: Changing my default primary GID for every login session

text: I read the following about `newgrp`:               The newgrp command is used to change the current group ID during a            login session.       This made me think, how can I change my default's primary group **permanently**? I imagine I can have a `newgrp` line in my startup files for my shell, but is there a way to change my primary ID for every login session without resorting to `newgrp`? I am interested in a generic solution, but in case it depends on the distribution, I am interested in solutions for **Ubuntu 11.10** and for **Red Hat Enterprise Linux Server** (I have administrator priviledges in the former, but not in the latter). ### Addendum: From the great answer @Shawn provided below to the these questions, I read "I won't be able to do this without root privileges". This made me wonder: **why?** Assuming that I have privileges to run `newgrp` immiediately after login, wouldn't this be the same as changing my default primary GUID for all practical purposes?


title: How to read a hexdump byte by byte in bash or awk?

text: This is the hexadecimal output of an IPv6 TCP packet captured with `tcpdump`:                6000 0000 0018 0620 0000 0000      0000 0000 0000 0000 0000 0001 0000 0000      0000 0000 0000 0000 0000 0002 *0026 0026      0000 0001 0000 0002 {5}412 0065 0034 0000*      6162 6364          The packet itself is between the `*`s above. The `{5}` represents the packet length in 32-bit words (so it's 5 words long -- 20 bytes). I need to extract tcp header from this info using a bash/awk script, so the script needs to find the length byte and use it to know how much further to read. How can I do that in bash or awk?


title: Differences between man pages

text: I often find myself reading man pages **online** instead of from the command line on my system. Part of the reason is because I find it easier to browse this information on a browser on the Internet than on the command line. However, this also means that I often end up reading information from "generic" man pages (e.g. from http://linuxmanpages.com/), or from a different distribution or tool version, and not from the actual specific tool/version I have on my system. So I always wondered if I am missing something by not reading the man pages installed on my machine. I presume that for the most-commonly used and stable tools (and parameters), the differences are negligible, but I would like to know to what extent this is a safe assumption. More specifically:   1. Is it common for different distributions to come with different man pages? Is this true even for the **same version of the tools** provided by the distro?    2. What man pages can vary most significantly across distributions?


title: Where to find the downloaded file after dragging a FTP URL to the terminal?

text: Usually, when I drag a link to the terminal, the link target is pasted in the terminal. However, when I just dragged a FTP link from Chromium to my Terminal (first result on Google for "ftp pdf", ftp://ftp.ipswitch.com/ipswitch/manuals/ftpserv.pdf), a file download was immediately initiated (I knew because a desktop notification appeared). I tried to locate the downloaded file using `find ~ -iname '*.pdf'` (also in `/tmp`), but I didn't find any traces. When I tried to reproduce the problem by dragging the ftp-URL again, the download completed much faster than before, from which I infer that the file is still cached, somewhere. So, my question are:   * Why is the ftp resource being downloaded after I drag the link to my Terminal?   (instead of being pasted as text, like http-URLs)   * Where can I find the downloaded file? (I want to delete it)


title: Broken link/launch behaviour on Kubuntu 11.10 desktop after rekonq uninstalled

text: Since I removed rekonq from my system, numerous apps which launch links, e.g. Stackapplet and Thunderbird are not correctly launching links with Firefox, which I am using now as my primary browser. I need a global way of telling Kubuntu to automatically launch links inside apps with Firefox, I have tried changing file associations but that appears to be irrelevant. ![enter image description here](http://i.stack.imgur.com/rA0e9.png) System Kubuntu 11.10 64-bit @rozcietrzewiacz - your suggested solution can be found here: ![enter image description here](http://i.stack.imgur.com/PQy7E.png)


title: How can I add autocomplete for "gem which" with rbenv?

text: I am using `rbenv` on Mac OS X. I have autocomplete functionality already for the `gem` command:               $ gem      build           environment     lock            query           stale     cert            fetch           mirror          rdoc            uninstall     check           generate_index  outdated        search          unpack     cleanup         help            owner           server          update     contents        install         pristine        sources         which     dependency      list            push            specification   yank      But I often use `gem which` in order to get the location of an installed gem in order to browse the source. Something like:               gem which sp[tab]     spork-1.0.0rc4        spork-rails-4.0.0     sprockets-2.10.1      sprockets-rails-2.0.1      Mapping directories shouldn't be that hard, but I think that having existing autocomplete functionality may complicate things. I've tried writing custom bash completion functions before but I always get really frustrated with it. This one is also going to have to check the current ruby version with something like `rbenv version` before picking the directory to check.   * Is it possible to "tack on" this "sub-command" functionality with bash completion? I recently learned about Thor which seems to make building command-line programs pretty easy by mapping arguments to classes and methods (just a tangentially related example not a solution for this), but   * Are there any good resources or frameworks for creating custom bash completion functions? ...or, if there is no such framework, how can I set up the bash completion function as a script so that I can run it and have it output the results? ( Perhaps using something like `inotifywait` to run the script when it is changed, passing input like "sp" and using the console to debug the output until it works correctly? ) Just hoping there is an easier way to do it because trying to write bash completion is probably one of the most aggravating things I've worked on.


title: Only met by a tty "login" prompt when booting Mint

text: I've installed Linux Mint 11 Katya (dual-booting with Win7) on my PC. After some problems with booting, I decided to use NeoGrub to add a Grub-based bootloader, configurable from within Windows, to the standard Windows boot manager. Fine. However, when I boot Mint from there, I don't get any GUI. I only get a tty prompt, saying > Linux Mint Katya kapok login: Kapok is my hostname. This shouldn't show up, right? And what am I supposed to type in there, really? The password I chose during installation? The username? Both? Whatever I type seems to return a message like this > tty1 Main Process ( _a number_ ) killed by SEGV signal Followed by the same login prompt as before. If I switch tty with Alt+Ctrl+F? I get the same prompt, except on F7 (which should be the GUI?) where it only shows some kind of log text but no prompt. Is there actually some problem here, or is it just me who's stupid and don't get what to do? (never used Linux before) Also, here's the Grub code I use to boot Mint:               title Linux Mint 11 Katya     find --set-root /boot/vmlinuz-2.6.38-8-generic     kernel /boot/vmlinuz-2.6.38-8-generic ro root=/dev/sda5     initrd /boot/initrd.img-2.6.38-8-generic


title: Must the filesystem be unmounted while extending an LVM logical volume?

text: I have seen some tutorials on extending an LVM2 logical volume. None of them instruct you to unmount the filesystem. They claim that you can extend an LVM volume while it is in use. Is this right?


title: Why is permission denied for npm start using node-dev?

text: I am trying to start a node.js application with on a low permissions user. All the files I know of are owned by the correct user and have permissions set reasonably well. I'm trying to use a script file to do this. I invoke the script with this command               sudo su - nodejs ./start-apps.sh      The shell script runs this command to start the app               cd "/home/nodejs/my-app"     npm start      `npm start` is documented here. It basically pulls the command to use out of the package.json file, which in our app looks like this:               // snip     "scripts": {         "start": "node-dev app"       },      And it spits out the error:               > my-app@0.1.0-build.100 start /home/nodejs/my-app     > node-dev app          sh: 1: node-dev: Permission denied          npm ERR! spicoli-authorization@0.1.0-build.100 start: `node-dev app`     npm ERR! Exit status 126      That `sh` seems to be saying that it's reporting errors from the shell command. I don't think the problem is accessing the `npm` command itself, because if it were, the permission denied would be raised before any output from the npm command. But just to rule it out, here are the permissions for the npm command itself:               $ sudo find / ! \( -type d \) -name npm -exec ls -lah {} \;     -rwxr-xr-x 1 root root 274 Nov 12 20:22 /usr/local/src/node-v0.10.22/deps/npm/bin/npm     -rwxr-xr-x 1 root root 274 Nov 12 20:22 /usr/local/lib/node_modules/npm/bin/npm     lrwxrwxrwx 1 root root 38 Jan 14 07:49 /usr/local/bin/npm -> ../lib/node_modules/npm/bin/npm-cli.js      It looks like everyone should be able to execute it. The permissions for `node-dev` look like this:               $ sudo find / ! \( -type d \) -name node-dev -exec ls -lah {} \;     -rwxr-xr-x 1 nodejs nodejs 193 Mar  3  2013 /home/nodejs/.npm/node-dev/2.1.4/package/bin/node-dev     -rw-r--r-- 1 nodejs nodejs 193 Mar  3  2013 /home/nodejs/spicoli-authorization/node_modules/node-dev/bin/node-dev     lrwxrwxrwx 1 root root 24 Jan 14 07:50 /home/nodejs/spicoli-authorization/node_modules/.bin/node-dev -> ../node-dev/bin/node-dev      I've already tried `chown`ing the link to `nodejs:nodejs`, but the scrip experiences the same error. Is there some file permissions problem I'm not seeing with the binary files? Or is this an `npm`/`node-dev` specific error?


title: Multiple VPN connetions, routing based on country

text: I want to set up a couple of VPN connections to two different countries, A and B, on my Ubuntu Server. Then I would like to set up rules based on GeoIP to determine which VPN connection should be used when I surf the internet. If the website I browse is in country A then I should use VPN connection A, if it is in country B then I should use connection B, and if it is in neither A nor B then I shouldn't use either of the VPN connections (default should be my DSL connection). Is this possible to set up?


title: How do you detach the 2nd screen from within another screen?

text: I've accidentally attached to a 2nd GNU screen session from within an existing screen session and cannot detach or issue commands to the inner screen. I remember figuring out how to do that before but completely forgot and would like to keep it as reference. One way is to detach the inner screen by doing `screen -dr` from shell, but what is the key combination to do that from within screen itself?


title: Why does command substitution fails in ssh remote call?

text: I have this script:               exportFile(){         file=$1         skippedBytes=$2         exportCommandString=$3              #This works:         #dd if=$file bs=1 skip=$skippedBytes | ssh sshConnection 'cat - >> /remote/dir/myTarget.txt.output' > export.output 2>&1              #This does not work:         dd if=$file bs=1 skip=$skippedBytes | $($exportCommandString $file) > export.output 2>&1              cat export.output     }          sshExportCommand(){         userAtServer=$1         targetDir=$2         filename=$3         echo 'ssh '$userAtServer' '\''cat - >> '$targetDir'/'$filename'.output'\'         #Same result with this:         #echo "ssh $userAtServer 'cat - >> $targetDir/$filename.output'"      }          exportFile mySource.txt 9 "sshExportCommand sshConnection /remote/dir myTarget.txt"      When invoking it, I obtain the following output:               85+0 records in     85+0 records out     85 bytes (85 B) copied, 0.00080048 s, 106 kB/s     Read bytes: 85     ovh_ssh: cat - >> /remote/dir/myTarget.txt.output: No such file or directory      What does prevent this from working ? Is this command substitution ? Anything else I missed ?


title: x11vnc : how to have the login screen?

text: I use x11vnc since long, to connect from my office to my home. My goal is to access to my computer exactly as if I were in front of it. So when I return to home I can continue was I started remotly, and vice-versa.   The problem is I must leave my X session open before going to work, because x11vnc don't allow me to see any login screen. So I can't reboot remotly, I can't log as another user, etc. I did something wrongly ?   Or any way to have this login screen ?


title: How can I know if IP Multicast is enabled

text: I have scripts that run IP multicast tests; however, my scripts are failing on a particular linux machine. I know that I can look at `CONFIG_IP_MULTICAST` in the kernel configuration file to determine whether the kernel was compiled with this. However, it would be easier to flag missing requirements in my script if I could look at `/proc` or `sysctl` and get the answer. Is there a way to find if IP Multicast was compiled into the kernel without looking at `CONFIG_IP_MULTICAST`?


title: Linux Mint 14.1 not bootable because of "secure boot"

text: I'm trying to install Linux Mint 14.1 on my Lenovo B570, but when I try to boot the thumb drive, it displays a message: "Secure boot is not enabled" and then goes black screen. I read lots of posts on the subject, but there is one difference from other people's problems. I have Windows 7 installed (since over a year ago) and around 5 months ago I installed Kubuntu 12.10 without any problem (it was even the same flash drive). Now I'm facing the secure boot problem and I don't know what to do.


title: touchpad scrolling lost when switching between physical and virtual tty

text: I have setup touchpad scrolling by running the following script in .xsession               $ cat ~/bin/enablescrolling      # enable two finger scroll     synclient VertTwoFingerScroll=1     synclient HorizTwoFingerScroll=1     synclient EmulateTwoFingerMinW=5     synclient EmulateTwoFingerMinZ=48      .xsession               $ cat ~/.xsession     ....     enablescrolling     ....     gnome-session --session cinnamon      when i switch to /dev/tty6 and come back to /dev/tty8, I lose scrolling. I have captured a few logs. Can someone please point out why this happens? /var/log/syslog               Mar 10 19:15:00 rag-tos-laptop acpid: client 1411[0:0] has disconnected     Mar 10 19:15:00 rag-tos-laptop acpid: client connected from 1411[0:0]     Mar 10 19:15:00 rag-tos-laptop acpid: 1 client rule loaded      /var/log/ConsoleKit/history               1362942899.557 type=SEAT_ACTIVE_SESSION_CHANGED : seat-id='Seat1' session-id=''     1362942900.367 type=SEAT_ACTIVE_SESSION_CHANGED : seat-id='Seat1' session-id='Session1'      /var/log/Xorg.0.log                18561.016] (II) XKB: reuse xkmfile /var/lib/xkb/server-20D7C92BD55EB53CEBBE18F981CB2A77F469F038.xkm     [ 18812.499] (II) AIGLX: Suspending AIGLX clients for VT switch     [ 18814.442] (II) Open ACPI successful (/var/run/acpid.socket)     [ 18814.442] (II) AIGLX: Resuming AIGLX clients after VT switch     [ 18814.953] (--) synaptics: SynPS/2 Synaptics TouchPad: touchpad found     [ 18819.746] (II) XKB: reuse xkmfile /var/lib/xkb/server-20D7C92BD55EB53CEBBE18F981CB2A77F469F038.x


title: How do I start a gui framebuffer (no X) application on startup instead of console login prompt?

text: I have a python application that uses pygame to access the framebuffer directly without using X. I want to start this application on startup instead of showing the console login prompt. I haven't found any good resources which explains how I would do it. Just the same way gdm is started instead of showing a console login prompt. Bonus question: What would happen if said application crashed? Would the console login prompt be shown? **Edit: I have been reading up on runlevels and startup. More specific question below** Will it be enough to create a `/etc/init.d` script which starts my python program, update rc.d with `update-rc.d` and setting priority to 99 so that it runs last and setting it to run under runlevel 5 (Which is for gui applications I heard). Then changing the default runlevel 5 in `/etc/inittab`? Or do I have to do something special since the program uses framebuffer?


title: tcsh shortcut to move the cursor back to previous space

text: I'm looking for a keyboard shortcut in `tcsh` to move the cursor back to the previous blank: not `ESC`+`B` which takes me back one word (for instance, in a path argument, to the previous path component) - I want to get to previous space or start of current path.


title: How can I set Conkeror as my default brower?

text: I use the latest Archlinux and stumpwm as my window manager with some Gnome goodies on the side (gnome-power-manager, gnome-settings-daemon and networkmanager applet). I tried to make Conkeror my default browser. I tried gconftool-2 and changed the `/desktop/gnome/url-handlers/http(s)` to `conkeror %s` with no luck. From what I understand Gconf is migrating to GSettings in Gnome 3 but I am completely lost as to how to configure it. I logged in to a gnome-shell session and tried to change the preferred applications but the only available choices are FireFox and Epiphany. I've being googling for the past 2 hours without luck and resorted to the hardcore solution of symlinking `/usr/bin/firefox` to `/usr/bin/conkeror`. Can anyone point me in the right direction?


title: How do I install syslinux/extlinux to a disk image file without requiring root privileges

text: I have built a home-grown Linux distribution, and I can make the complete disk image file as a non-root user with one exception -- installing the boot loader. I'm using syslinux (actually extlinux), and to install it I have to loop-back mount the boot partition, which requires root/sudo privileges. The commands are run from a makefile, and the variable names should clearly indicate what to replace them with.               sudo losetup -o $(BOOT_FS_PARTITION_OFFSET) $(LOOP_DEVICE) $(IMAGE_FILE_NAME)     sudo mount $(LOOP_DEVICE) $(LOOP_MOUNT_POINT)     sudo $(EXTLINUX) -S $(DISK_SECTORS) -H $(DISK_HEADS) -i $(LOOP_MOUNT_POINT)     sudo umount $(LOOP_MOUNT_POINT)     sudo losetup -d $(LOOP_DEVICE)      Is there a way to write syslinux or extlinux to the disk image file without requiring root privileges?


title: How to generate menu.lua for Awesome WM from GNOME menu?

text: Following up on a question about the Awesome WM menu contents, I'd like to figure out _how to import the GNOME menu in its entirety_ into the menu.lua file for Awesome.


title: Openbox root autostart?

text: I want to run a script as root when the computer starts. This was earlier done in rc.local but not anymore. What i've tried:   putting the script in `/etc/profile.d`   adding the `/pathto/script.sh` in `/etc/profile`   added `/pathto/shript.sh &` in `/etc/xdg/openbox/autostart` The script is for setting things powertop recommends, the scrips works just find when i run `sudo /pathto/script.sh`


title: /home partition recovery

text: Unhappy with Gnome 3 in Ubuntu I tried Mint 14. Had a backup of my home partition. During the Mint installation I designated my old home partition, and when it booted everything was fine. There were a couple of loose ends in Mint 14 that required fixes to make my cloud server work and VariCAD 3D modeling program would not install. This install was on an old 40GB hard disk that I put aside by disconnecting it. VariCAD indicated they supported Fedora and Debian, both which I had been wanting to try for a long time. However Fedora had, like Ubuntu gone with Gnome 3, and Mate was not yet available as a standard alternative, so I've put aside Fedora for now. I had a /boot in an extended partion, as I had read that there should be no issues with that location, and as boot files are not accessed often, it seemed like a reasonable thing to do. However it did not work until I moved the boot to the beginning of the disk. I surmize it's because of an old BIOS. My partitions initially included a primary partion for the swap, one for my OS (Debian), and an extended partion for my data partitions, and the 4th primary partition was my home backup (just the way things evolved). To make room for a boot as a primary partition I killed my backup, assuming that Debian would simply take my existing home partition like Mint had. When I installed Debian and gave it my home partition location to mount on /home, with instructions NOT to format, I expected Debian to behave like Mint, having the reputation of being more conservative, not to say safer. Not so. It squashed my home. What tools and methods are there so I can recover what I can from my home partition please?


title: Assigning IP to a bridged interfaces

text: Is there a way to assign an IP to bridged interfaces? For example, under normal circumstances:               ifconfig eth0 0.0.0.0     ifconfig eth1 0.0.0.0     brctl addbr mybridge     brctl addif mybridge eth0     brctl addif mybridge eth1      So is there a way to either:   * (a) assign IPs to eth0/eth1?   * (b) if not, then is there any other way around this problem? I want to some how bridge interfaces having IPs.


title: How does gcc know where boost is installed

text: I installed boost using `sudo apt-get install` on Ubuntu. Later I did not have to give gcc the `I` flag alongwith the path to the boost libraries to use boost ! Nor did I do any `pkg-config --cflags --libs` of any sort. What is the mystery here ? How is gcc able to know where boost is and how is it linking to it automatically ?


title: Corruption-proof SD card filesystem for embedded Linux?

text: Recently we had a rather unpleasant situation with our customer - Raspberry Pi based "kiosk" used to display remote sensing data (nothing more fancy than a kiosk mode browser displaying a self-updating webpage from the data-collection server) failed to boot due to filesystem corruption. Ext4, Manual fsck required, the system will be a part of tomorrow's important presentation, service required immediately. Of course we can't require the customer to shut down the system nicely when switching it off for the night; the system must simply withstand such mistreatment. I'd like to avoid such situations in the future, and I'd like to move the OS to a filesystem that would prevent this. There's a bunch of filesystems intended for MTD devices, where getting them to run on SD card (a standard block device) requires some serious hoop-jumping. There are also some other filesystems (journalling etc) that boast good resistance against corruption. I still need to see some reasonable comparison of their pros and cons. Which filesystem available in Linux would provide best resistance against corruption on unexpected power failures and not require jumping through impossible hoops like yaffs2 in order to install to SD. Wear-balancing is a plus, but not a requirement - SD cards usually have their own mechanisms, if less than perfect, though the system should be "gentle for flash" (systems like NTFS can murder an SD card within a month).


title: Debian VM Can see other computers on the network but can't connect to the WWW

text: Similar to this SU question: http://superuser.com/questions/667631/network-is- unreachable-when-attempting-to-ping-google-but-internal-addresses Actually, it's pretty much the same base issue. I went through that thread trying to find a solution, I changed my resolv.conf:               before:     domain [my work domain]     search [my work domain]     nameserver [my network DHCP]     nameserver [my network DHCP2]      I changed it to:               after:     domain [my work domain]     search [my work domain]     nameserver 8.8.8.8     nameserver 8.8.4.4      However, any time I reboot the computer the resolv.conf gets overwritten to the previous version (the 'before' above). (it also didn't solve the issue) The issues began after I installed virtualbox additions (AKA on a fresh install and after installation of Samba it worked on the internet and my internal network perfectly), X server and (specifically) LXDE: Cat of apt history.log:               Start-Date: 2014-08-21  10:03:42     Commandline: apt-get install virtualbox-guest-utils virtualbox-guest-dkms     Install: x11-xkb-utils:amd64 (7.7+1, automatic), libxaw7:amd64 (1.0.12-2, automatic), xfonts-utils:$     End-Date: 2014-08-21  10:03:56          Start-Date: 2014-08-21  10:18:39     Commandline: apt-get install lxde     Install: desktop-base:amd64 (7.0.3, automatic), libgoa-1.0-0b:amd64 (3.12.4-1, automatic), lxmenu-d$     End-Date: 2014-08-21  10:21:52          Start-Date: 2014-08-21  10:26:40     Commandline: apt-get upgrade     Upgrade: libio-socket-ssl-perl:am      ifconfig on the guest:               root@Peridot:~# ifconfig     eth0      Link encap:Ethernet  HWaddr 08:00:27:89:c9:20  og               inet addr:172.31.2.102  Bcast:172.31.2.255  Mask:255.255.255.0               inet6 addr: fe80::a00:27ff:fe89:c920/64 Scope:Link               UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1               RX packets:2281 errors:0 dropped:1 overruns:0 frame:0               TX packets:463 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:1000               RX bytes:266507 (260.2 KiB)  TX bytes:120554 (117.7 KiB)          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:65536  Metric:1               RX packets:4 errors:0 dropped:0 overruns:0 frame:0               TX packets:4 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:0               RX bytes:240 (240.0 B)  TX bytes:240 (240.0 B)      The adapter in VBox is a bridged adapter directly onto my ethernet connection; as are my other 2 VMs (which work) Other questions I've tried:   * http://superuser.com/questions/573884/connect-network-is-unreachable-in-virtualbox-vm Edit: netstat:               root@Peridot:~# netstat -r     Kernel IP routing table     Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface     10.13.36.0      172.31.2.254    255.255.255.0   UG        0 0          0 eth0     172.31.2.0      *               255.255.255.0   U         0 0          0 eth0      /etc/network/interfaces:               root@Peridot:~# cat /etc/network/interfaces     # This file describes the network interfaces available on your system     # and how to activate them. For more information, see interfaces(5).          # The loopback network interface     auto lo     iface lo inet loopback          # The primary network interface     auto eth0     allow-hotplug eth0     iface eth0 inet dhcp      Per this question I've done the following with no success (`thapphireth` is my local machine hosting the VM. Also works if I ping other computers on the network):               root@Peridot:~# ps aux | grep dhclient     root      1849  0.0  1.3  14848  6984 ?        Ss   14:28   0:00 dhclient -v -pf                                                                                /run/dhclient.eth0.pid -lf /var/lib/dhcp/dhclient.eth0.leases eth0     root      1960  0.0  0.1  12680   940 pts/0    S+   14:30   0:00 grep dhclient     root@Peridot:~# ps aux | grep dhclient     root      1849  0.0  1.3  14848  6984 ?        Ss   14:28   0:00 dhclient -v -pf /run/dhclient.eth0.pid -lf /var/lib/dhcp/dhclient.eth0.leases eth0     root      1963  0.0  0.1  12680   940 pts/0    S+   14:30   0:00 grep dhclient     root@Peridot:~# kill 1849     root@Peridot:~# ps aux | grep dhclient     root      1965  0.0  0.1  12680   940 pts/0    S+   14:30   0:00 grep dhclient     root@Peridot:~# dhclient eth0     RTNETLINK answers: File exists     root@Peridot:~# ping google.com     connect: Network is unreachable     root@Peridot:~# ping thapphireth     PING thapphireth.SID (172.31.2.67) 56(84) bytes of data.     64 bytes from 172.31.2.67: icmp_seq=1 ttl=128 time=0.269 ms     64 bytes from 172.31.2.67: icmp_seq=2 ttl=128 time=0.428 ms     ^C     --- thapphireth.SID ping statistics ---     2 packets transmitted, 2 received, 0% packet loss, time 1001ms     rtt min/avg/max/mdev = 0.269/0.348/0.428/0.081 ms     root@Peridot:~# ps aux | grep dhclient     root      2009  0.0  1.3  14848  6984 ?        Ss   14:30   0:00 dhclient eth0     root      2013  0.0  0.1  12680   944 pts/0    S+   14:30   0:00 grep dhclient     root@Peridot:~# kill 2009     root@Peridot:~# dhclient -v -pf /run/dhclient.eth0.pid -lf /var/lib/dhcp/dhclient.eth0.leases eth0     Internet Systems Consortium DHCP Client 4.3.1     Copyright 2004-2014 Internet Systems Consortium.     All rights reserved.     For info, please visit https://www.isc.org/software/dhcp/          Listening on LPF/eth0/08:00:27:89:c9:20     Sending on   LPF/eth0/08:00:27:89:c9:20     Sending on   Socket/fallback     DHCPREQUEST on eth0 to 255.255.255.255 port 67     DHCPACK from 172.31.2.42     RTNETLINK answers: File exists     bound to 172.31.2.102 -- renewal in 277205 seconds.     root@Peridot:~# ping google.com     connect: Network is unreachable     root@Peridot:~# ping thapphireth     PING thapphireth.SID (172.31.2.67) 56(84) bytes of data.     64 bytes from 172.31.2.67: icmp_seq=1 ttl=128 time=0.251 ms     64 bytes from 172.31.2.67: icmp_seq=2 ttl=128 time=0.798 ms     ^C     --- thapphireth.SID ping statistics ---     2 packets transmitted, 2 received, 0% packet loss, time 1001ms     rtt min/avg/max/mdev = 0.251/0.524/0.798/0.274 ms     root@Peridot:~#      results of ipconfig on windows (host machine):               Windows IP Configuration     Ethernet adapter vEthernet (Broadcom NetLink (TM) Gigabit Ethernet Virtual Switch):             Connection-specific DNS Suffix  . : SID        Link-local IPv6 Address . . . . . : fe80::5d00:6fe1:98d2:ac06%9        IPv4 Address. . . . . . . . . . . : 172.31.2.67        Subnet Mask . . . . . . . . . . . : 255.255.255.0        Default Gateway . . . . . . . . . : 172.31.2.1


title: Creating Windows self-extracting executables that can auto-run a script

text: Does a tool exist (preferably packaged in Debian) to create Windows self- extracting executables that can auto-run a script in the archive once the extracting is done? I've been toying with NSIS but I am not sure it can do what I'm asking and is rather heavyweight for this purpose.


title: Boot up problem with RHEL 6

text: I restarted my RHEL 6 box and now I can't get past the logo screen. I tried booting without the splash screen so I could see what's going on, and I'm getting an error message saying something along the lines of: > make * * * /lib/modules/[kernel]/build No such file or directory. Stop.   >  make * * * [all] Error 2 Then it starts a few other things without any problems (sshd, ntpd, ..., up to Windows binary loader), but then it hangs up after that. To me it appears that the modules folder might be missing (or incorrect), but I'm not sure if that's what's causing it from not booting at all. Would I be able to use a Live CD and fix this somehow?


title: What command I should execute to accomplish this:

text: Open connections:      COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME      php 3075 lemorpa 3u IPv4 1111738938 0t0 TCP 174.120.62.130:60602->98.139.169.19:80 (ESTABLISHED)           Recent Site Requests:               1.202.218.68 *.mortgagenewshomeloans.com /a/a/Investment/p/p/Loans/Mortgage/News/Home/Loans/szh/home          1.202.218.73 onlinemortgagemoiywi.lendersmor /tag/county/          1.202.219.3 *.mortgagenewshomeloans.com /Investments/Mortgage/News/Home/Loans/szh/Business-English-          1.202.219.3 *.mortgagenewshomeloans.com /o/w/w/Mortgage/News/Home/Loans/Forex/szh/1          1.202.219.5 *.morgagemortgagebanker.com /Loan/szh/selectcity/yellowpages/          1.202.219.5 *.morgagemortgagebanker.com /Loan/szh/selectcity/yellowpages/          1.202.219.6 ratesmortgagemoroito.lendersmor /Contract/Contract_List.asp          1.202.219.6 ratesmortgagemoroito.lendersmor /s/a/Rates/Rates/Mortgage/Mortgage/1st/szh/1       Hostgator often send me this when they're mad of my CPU usage. I wonder what command they use to display this


title: Get diff changes between original files installed with apt and current files

text: I installed `php5-fpm` package using `apt`; then I made some changes to the PHP configuration files. Now I would get the diffs between the original files versions (the ones of the package installed) and the current versions (modified by me). How to do it?


title: Gnome keyring issue

text: I am attempting to restore some files to an OpenSUSE 12.3 machine that was backed up with deja-dup (duplicity). When prompted for the password to decrypt the backup, I enter the correct password and I am prompted repeatedly with no progress. The error given in `/var/log/messages` is:               The gnome keyring socket is not owned with the same credentials as the          user login: <username removed>     gkr-pam: couldn't unlock the login keyring      In deja-dup's debugging log I have:               DUPLICITY: ERROR 31 GPGError     DUPLICITY: . GPGError: GPG Failed, see log below:     DUPLICITY: . ===== Begin GnuPG log =====     DUPLICITY: . gpg: WARNING: "--no-use-agent" is an obsolete option - it has no effect     DUPLICITY: . gpg: CAST5 encrypted data     DUPLICITY: . gpg: encrypted with 1 passphrase     DUPLICITY: . gpg: decryption failed: Bad session key     DUPLICITY: . gpg: block_filter 0x7f969a828e60: read error (size=15648,a->size=15648)     DUPLICITY: . gpg: block_filter: pending bytes!     DUPLICITY: . ===== End GnuPG log =====


title: GParted doesn't recognize the unallocated space after my current partition

text: I'm using GParted to resize my partitions on Linux. There is about 5GB of unallocated space following the partition sda5. However, when I right click on sda5 and select 'resize/move', it doesn't show the 5GB of unallocated space. So I can't increase the size of sda5 (can't drag to the right, or increase the number for file size. It shows the 'free space following' the sda5 partition as 0, even though there actually is 5GB of unallocated space. Why can't I expand my partition?


title: How to close ports in Linux?

text: I have some question in closing port, I think I got some strange things. When I use execute               nmap --top-ports 10 192.168.1.1      it shows that 23/TCP port is open. But when I execute               nmap --top-ports 10 localhost      it show that 23/tcp port is closed. Which of them is true? I want to close this port on my whole system, how can I do it?


title: why ss(8) understands listening UDP ports differently than netstat(8)?

text: If I execute `ss -lu` in order to view all the listening UDP sockets, then none of the sockets are displayed. If I execute `ss -au`, which lists all(both listening and non-listening) UDP sockets, then "listening" sockets are displayed as UNCONN:               T60:~ # lsof -n | sed -n '1p;/UDP/p'     COMMAND     PID   TID       USER   FD      TYPE     DEVICE SIZE/OFF       NODE NAME     avahi-dae   963            avahi   11u     IPv4       9088      0t0        UDP *:mdns      avahi-dae   963            avahi   12u     IPv4       9089      0t0        UDP *:44639      cupsd      1238             root   10u     IPv4       8160      0t0        UDP *:ipp      dhcpcd     2072             root    7u     IPv4     532052      0t0        UDP *:bootpc      dhclient6 13131             root    5u     IPv6      38031      0t0        UDP *:dhcpv6-client      dhclient6 13131             root   20u     IPv4      37954      0t0        UDP *:20152      dhclient6 13131             root   21u     IPv6      37955      0t0        UDP *:36745      atftpd    20639             tftp    0u     IPv4     344977      0t0        UDP *:tftp      T60:~ # netstat -lu     Active Internet connections (only servers)     Proto Recv-Q Send-Q Local Address           Foreign Address         State           udp        0      0 *:bootpc                *:*                                      udp        0      0 *:tftp                  *:*                                      udp        0      0 *:44639                 *:*                                      udp        0      0 *:ipp                   *:*                                      udp        0      0 *:20152                 *:*                                      udp        0      0 *:mdns                  *:*                                      udp        0      0 *:36745                 *:*                                      udp        0      0 *:dhcpv6-client         *:*                                      T60:~ # ss -lu     Recv-Q Send-Q                                                                                Local Address:Port                                                                                Peer Address:Port        T60:~ # ss -ua     State       Recv-Q Send-Q                                                                                Local Address:Port                                                                                Peer Address:Port        UNCONN      0      0                                                                                *:bootpc                                                                                *:*            UNCONN      0      0                                                                                *:tftp                                                                                *:*            UNCONN      0      0                                                                                *:44639                                                                                *:*            UNCONN      0      0                                                                                *:ipp                                                                                *:*            UNCONN      0      0                                                                                *:20152                                                                                *:*            UNCONN      0      0                                                                                *:mdns                                                                                *:*            UNCONN      0      0                                                                                :::36745                                                                                :::*            UNCONN      0      0                                                                                :::dhcpv6-client                                                                                :::*            T60:~ # ss -v     ss utility, iproute2-ss110629     T60:~ #       What is the logic behind this? For example running **atftpd** listening for connections, should have state LISTEN not UNCONN, shouldn't it?


title: Video tools for creating presentation

text: I have captured video (with audio) from presentation, slides (just images), and array of times (when slides was listed). Goal is to create presentation video: big slide with small video frame at the corner. What is suitable tools/software for this? From command line, from domain- specific language, from scripts... I see ffmpeg, but I'm not sure about ffmpeg abilities.


title: How to execute a builtin shell command using find?

text: I'm constrained to doing this in tcsh on CentOS due to the environment at work. When executing `find . -type f -executable -exec source '{}' \;` the only result is `find: 'source': No such file or directory` for each appropriate file. Not sure why this isn't working in tcsh as it's pretty straightforward. What am I doing wrong? Any help greatly appreciated.


title: CTRL-ALT-DEL for init 0?

text: On On my Debian 7 system the `Ctrl`-`Alt`-`Del` is this line below and is by default init 6               ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now      But I want to turn for init 0 and not init 6 when I press `Ctrl`-`Alt`-`Del`. How can I change this?


title: Parsing string token with bash

text: I have this output (from a previous command):               aaa         something     bbb         someother     ccc         blabla      For each line, I would like to create a file whose name is the first token, and whose content is the second token (for example for the first line I would like a file named 'aaa' that contains the text 'something') How should I do this?


title: Gphoto2 does not output anything

text: I'm running ArchLinux and I want to download all the pics from my EOS1100D. However when I plug the camera and run               gphoto2 --list-ports      Nothing happens at all and the program get stuck. Here's the output of               gphoto2 --list-ports --debug          0.000035 main(2): ALWAYS INCLUDE THE FOLLOWING LINES WHEN SENDING DEBUG MESSAGES TO THE MAILING LIST:     0.000101 main(2): gphoto2 2.5.2     0.000121 main(2): gphoto2 has been compiled with the following options:     0.000138 main(2):  + gcc (C compiler used)     0.000152 main(2):  + popt (mandatory, for handling command-line parameters)     0.000166 main(2):  + exif (for displaying EXIF information)     0.000181 main(2):  + no cdk (for accessing configuration options)     0.000196 main(2):  + no aa (for displaying live previews)     0.000210 main(2):  + jpeg (for displaying live previews in JPEG format)     0.000225 main(2):  + readline (for easy navigation in the shell)     0.000246 main(2): libgphoto2 2.5.2     0.000263 main(2): libgphoto2 has been compiled with the following options:     0.000281 main(2):  + all camlibs     0.000296 main(2):  + gcc (C compiler used)     0.000311 main(2):  + ltdl (for portable loading of camlibs)     0.000326 main(2):  + EXIF (for special handling of EXIF files)     0.000342 main(2): libgphoto2_port 0.10.0     0.000359 main(2): libgphoto2_port has been compiled with the following options:     0.000374 main(2):  + gcc (C compiler used)     0.000389 main(2):  + ltdl (for portable loading of camlibs)     0.000403 main(2):  + USB (libusb1, for USB cameras)     0.000417 main(2):  + serial (for serial cameras)     0.000431 main(2):  + no resmgr (serial port access and locking)     0.000445 main(2):  + no ttylock (serial port locking)     0.000492 main(2):  + no lockdev (serial port locking)     0.000506 main(2): CAMLIBS env var not set, using compile-time default instead     0.000521 main(2): IOLIBS env var not set, using compile-time default instead     0.000557 setting/gphoto2-setting.c(2): Creating $HOME/.gphoto     0.000651 setting/gphoto2-setting.c(2): Loading settings from file "/home/ben/.gphoto/settings"     0.000900 gphoto2-port-info-list(2): Using ltdl to load io-drivers from '/usr/lib/libgphoto2_port/0.10.0'...     0.001013 gphoto2-port-info-list(2): Called for filename '/usr/lib/libgphoto2_port/0.10.0/disk'.     0.001235 gphoto2-port/disk(2): found fstab fsname /dev/sda3     0.001269 gphoto2-port/disk(2): found fstab fsname /dev/sda4     0.001291 gphoto2-port/disk(2): found fstab fsname /dev/sda1     0.001313 gphoto2-port/disk(2): found fstab fsname /dev/sda2     0.001334 gphoto2-port/disk(2): found fstab fsname //192.168.0.2/MyBook     0.005221 gphoto2-port/disk(2): found fstab fsname //192.168.0.2/Wall-E     0.007825 gphoto2-port/disk(2): found fstab fsname UUID=1d35b80b-e466-4c92-af21-01c663f9dae1      I tried to run gphoto2 --sumary but I get the same result.


title: Grep for single and double digit

text: i have path name as below,   1. abc4/2012   2. abc4/2013   3. abc45/2014   4. abc45/2014 When i grep for 45 it is showing one instance of 4 and for 4 its showing all 45. i need to grep both single digit and double digit separately. please help


title: How to add SSL with cURL URL using Ubuntu Terminal

text: While running a Twitter API from cURL in Ubuntu Terminal it asked me to use SSL. After searching for it, I tried:               sudo curl -s https://localhost:8080/tweets/HLaddha          sudo curl -k https://localhost:8080/tweets/HLaddha          sudo curl --cert-type SSL https://localhost:8080/tweets/HLaddha          openssl s_client -connect facebook.com:443 |tee logfile     sudo curl --cacert logfile https://localhost:8080/tweets/HLaddha      But I could not find the correct usage. How do I do it? The error message I get is: > curl: (35) Unknown SSL protocol error in connection to localhost:8080


title: How does my partition (ext4) know its size of used/free space?

text: I ran `df`, and the output appears almost instantly:               (FS        Size  Used   Avail  Use%)     /dev/sda1  145G  8.4G   130G   7%      sda1 is an ext4 partition. Without summing the size of all files, how can `df` give me the space information almost instantly?


title: xampp fail to start, apache running, but apache is not installed!

text: I am having a strange problem. When I try to start xampp it fails with message:               XAMPP: Another web server daemon is already running.      When I tried to find out which server is running using following command:               netstat -tunap | grep LISTEN      result:               tcp        0      0 127.0.1.1:53        0.0.0.0:*        LISTEN  1955/dnsmasq             tcp        0      0 127.0.0.1:631       0.0.0.0:*        LISTEN  1262/cupsd             tcp        0      0 0.0.0.0:17500       0.0.0.0:*        LISTEN  2353/dropbox            tcp        0      0 0.0.0.0:20414       0.0.0.0:*        LISTEN  2297/skype               tcp6       0      0 :::80                    :::*        LISTEN  1366/apache2         tcp6       0      0 ::1:631                  :::*        LISTEN  1262/cupsd      Here I see apache is running with, to verify it is installed or not I excuted following command:               dpkg -s apache2      Result:               dpkg-query: package 'apache2' is not installed and no information is available      Every Time I have to kill apache2 before starting xampp, which is very irritating. I am on Ubuntu 12.04,


title: How to install virtualbox guest addition in a guest machine with the latest Archlinux?

text: I want to install the virtualbox guest addition in a guest Archlinux machine. The vbox version is **4.2.10 r84104** , and the Arch install media is the latest release **2013.04.01** with `systemd` as the default program to boot the system. I mounted the iso file and `cd` to the mount point, run `./VBoxLinuxAdditions.run`, but it reports `Unable to determine your linux distribution`. I checked that install script, and finding that in the function `check_system_type()`, there's no branch dealing with Archlinux. I tried to `touch` a file like `/etc/gentoo-release` but failed. How can I install the additions? Any help or advice will be appreciated.


title: How to configure Sendmail in a jail to get correct FQDN?

text: I am building a mail server using FreeBSD 9.1-RELEASE with a jail. On the direct OS, all what I have to do was only adding my domain name to `/etc/mail/local-host-names` file. Anyway I wanted to run Sendmail in a jail. So I add a jail, and added a NAT rule (using `pf`) to redirect TCP 25 traffic into the jail. In a Jail, Sendmail is working well, but there's one problem. When I am sending a mail in the jail, sender domain address is printed as the jail's hostname. This is expected an normal operation on direct OS, but in a jail, I want to change this default sender domain name to proper one. _How can I change default sender domain name of Sendmail?_ Also, I am planning to install an IMAP server in the same jail.(maybe `dovecot`) Can this affect to there too? If I want to make any future services work well, what should I do?


title: Edit a file on CentOS 6.3 Minimal

text: I installed CentOS 6.3 Minimal on VMWare Player, and I realized how 'minimal' the setup is... Don't have network connectivity. From what I searched on google, I need to edit the file > /etc/sysconfig/network-scripts/ifcfg-eth0 but since I don't have any editor installed (as far as I know), I don't know how to edit the file. How do I edit the file????


title: How to make log-rotate change take effect

text: I followed this link to change log-rotate configuration. https://access.redhat.com/site/documentation/en- US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/s1-logfiles-locating.html After I made the change to config file, what should I do to let this take effect?


title: How to disable nvidia ion on Asus eeepc 1201NL?

text: It seems that my netbook consumes battery too aggressively. I've been told that Nvidia ION videocard embedded into it has 2 cores and one of them is consuming battery all the time in Linux, since it has been designed for Windows usage only, and there's no driver capable to manage it in Linux. Is there any way to turn it off completely and use only one video core? My distro is Debian based CrunchBang.


title: how to solve "authentication failed" error in kde

text: I have KDE installed in my archLinux with kdm to login. But it always shows a notification dialog with "authentication failed" about every 2 minutes. I use a kdm to login and I have enter the user name and password. Why does it show "authentication failed"? Anyone who encountered this problem can help me? **Finally this problem disppear because I reinstall kde.Thanks for all of you!**


title: What's the diference between comparison inside if using two or a single equal (=)

text: Read that for comparing string inside `if` we need to use double square brackets. Some books says that comparison can be done by `=`. But it works withe `==` also.               #!/bin/bash     a="hello"     b="world"     if [[ $a == $b ]];then         echo "equal"     fi      Why is that?


title: How to run part of a script with reduced privileges?

text: I have the following problem: On every machine running Postgresql there is a special user _postgres_. This user has administrative access to the database server. Now I want to write a Bash script that executes a database command with psql as user _postgres_ (psql shall execute as user _postgres_ , not the script). So far, that wouldn't be a problem: I could just run the script as user _postgres_. However, I want to write the output of psql to a file in a directory where _postgres_ has no write access. How can I do that?      I thought about changing EUIDs in the script itself, however:   1. I couldn't find a way to change the EUID in a Bash script   2. How can I change the EUID when using something like   `psql -U postgres -c "<command>" > file`?


title: change tty login timeout - ArchLinux

text: By default when I login to my Arch linux box in a tty, there is a timeout after I type my username but before I type my password. So it goes like this               Login:  mylogin <enter>     Password:     (+ 60 seconds)     Login:      As you can see, if I don't type the password it recycles the prompt -- I want it to wait indefinitely for my password instead of recycling the login prompt. Is this possible? It seems like the `--timeout` option to `agetty` would be what I want. However, I tried adding this flag in the getty files in `/usr/lib/systemd/system/` (the option is not used by default), and rebooting -- it seemed to have no effect.


title: Can I do a "test run" with rsnapshot?

text: I occasionally make changes to my `rsnapshot.conf` and I'm wondering if there's any way I can do a test run that is sync-ed to a location other than the normal flow... something that's not an `interval`. Is this possible? how?


title: X has blank screen but clearly runs

text: At my last reboot X started but blacked the screen. When logging into the system remotely all processes seem to be running just fine (e.g. Firefox is automatically started), so X is clearly running, but it is likely just a small switch that tells the screen to go black instead of showing the display. I have tried removing xorg.conf and get the same result. The system has an nVidia card and an Intel card. I have so far been using the Intel card, but as long as the drivers for the cards are free software I don't really care which card to use. How can I get the display working again? Xorg.0.log: https://gist.github.com/anonymous/94de1dab2894f183afbc               # lshw -C display     *-display UNCLAIMED             description: VGA compatible controller        product: GK107M [GeForce GT 740M]        vendor: NVIDIA Corporation        physical id: 0        bus info: pci@0000:01:00.0        version: a1        width: 64 bits        clock: 33MHz        capabilities: pm msi pciexpress vga_controller bus_master cap_list        configuration: latency=0        resources: memory:d2000000-d2ffffff memory:a0000000-afffffff memory:b0000000-b1ffffff ioport:4000(size=128) memory:b2000000-b207ffff     *-display        description: VGA compatible controller        product: 3rd Gen Core processor Graphics Controller        vendor: Intel Corporation        physical id: 2        bus info: pci@0000:00:02.0        version: 09        width: 64 bits        clock: 33MHz        capabilities: msi pm vga_controller bus_master cap_list rom        configuration: driver=i915 latency=0        resources: irq:47 memory:d4000000-d43fffff memory:c0000000-cfffffff ioport:5000(size=64)


title: How to visualize time-series data?

text: I have some time-series data I want to visualize as 2d plot. The input is ISO-date-format and value separated by space, one record per line:               2010-10-21 23     2010-10-22 32     etc.      The output should be a nice looking 2d plot. Basic requirements:   * output to a X11 window (as preview) and to a png file   * x-axis has to _understand_ the dates and naturally scale the data, e.g. a gap between 3 days should be three times as long as a gap between 1 day   * should be callable from a script   * nice output and convenient to use Bonus:   * svg output I tried `gnuplot` and it works - it has some date support:               gnuplot> set xdata time     gnuplot> set timefmt "%Y-%m-%d"     gnuplot> plot "test.dat" using 1:2      But I have some problems with gnuplot:   * with default settings plots look very ugly   * it is difficult to find stuff in the manual - e.g. when plotting points how do I use small filled circles instead of the default '+' sign?   * the gnuplot shell is a pain in the neck - it does not use readline, it is broken, command completion is a joke, I don't know how to enable vi shortcuts - or if they are supported, what about reverse search etc. Thus my question: What are the alternatives for visualizing time-series data? Or am I overstating the gnuplot issues?


title: Inconsistency in behavior of 'rm' when a mounted volume is involved?

text: If I run the following sequence of commands:               mkdir dir     ln -s dir link     rm -r link/      I get this output:               rm: cannot remove `link': Not a directory      I get the warning because I could simply have issued `rm -r link` or, better still, `rm link`. Regardless, that command did get the job done (i.e. removed the file named " **link** "). Things are a bit different when doing such a thing on a mounted volume, where " **dir** " is replaced with some like " **/media/my_movies** ". In such a case, the entire volume will be wiped, not just the symlink as in the previous example. Why is it like that? Is this some bug in `rm`, or is this expected? Why the inconsistency? **UPDATE** : Maybe I was dizzy when I was experiencing this because when I try now, " **dir** " is not getting deleted while its contents are, and in both cases (mounted and local directory). I'm using Linux **2.6.32** , and I think I was using **2.6.37** then.


title: Port forwarding only works for first packet sent

text: I'm trying to configure port forwarding (80 and 443) on my new router. The router is a Xiaomi Mi Wi-fi, that establishes a PPPOE session with a VDSL2 modem/router (BBox2). The Xiaomi router runs a version of OpenWRT, which makes it possible to examine iptables etc. The problem is that a connection can get started with the right system, but fails to deliver any more than the first packet. I expect there to be something wrong with the ESTABLISHED rules from iptables. The weird thing is that I can't seem to find anyone with the same problem on the Xiaomi support forums. I've flashed different firmwares and reverted to factory settings multiple times, but nothing fixes the forwarding problems. Does anybody know a possible cause for these problems? I can post the contents of `/etc/config/firewall` or iptables, but don't know how that's usually done here. Output of `iptables-save -c`:               # Generated by iptables-save v1.4.12.2 on Mon Jun  9 03:01:51 2014     *raw     :PREROUTING ACCEPT [1946406:2827242333]     :OUTPUT ACCEPT [332543:85794398]     :notrack - [0:0]     [1946406:2827242333] -A PREROUTING -j notrack     COMMIT     # Completed on Mon Jun  9 03:01:51 2014     # Generated by iptables-save v1.4.12.2 on Mon Jun  9 03:01:51 2014     *nat     :PREROUTING ACCEPT [3867:297334]     :INPUT ACCEPT [1116:76226]     :OUTPUT ACCEPT [3096:204986]     :POSTROUTING ACCEPT [340:25144]     :MINIUPNPD - [0:0]     :delegate_postrouting - [0:0]     :delegate_prerouting - [0:0]     :postrouting_lan_rule - [0:0]     :postrouting_rule - [0:0]     :postrouting_wan_rule - [0:0]     :prerouting_lan_rule - [0:0]     :prerouting_rule - [0:0]     :prerouting_wan_rule - [0:0]     :zone_lan_postrouting - [0:0]     :zone_lan_prerouting - [0:0]     :zone_wan_postrouting - [0:0]     :zone_wan_prerouting - [0:0]     [5299:458068] -A PREROUTING -j delegate_prerouting     [9134:611886] -A POSTROUTING -j delegate_postrouting     [0:0] -A MINIUPNPD -p udp -m udp --dport 63645 -j DNAT --to-destination 192.168.31.130:63645     [9134:611886] -A delegate_postrouting -m comment --comment "user chain for postrouting" -j postrouting_rule     [73:14404] -A delegate_postrouting -o br-lan -j zone_lan_postrouting     [8123:538671] -A delegate_postrouting -o pppoe-wan -j zone_wan_postrouting     [5299:458068] -A delegate_prerouting -m comment --comment "user chain for prerouting" -j prerouting_rule     [4161:288905] -A delegate_prerouting -i br-lan -j zone_lan_prerouting     [1060:137321] -A delegate_prerouting -i pppoe-wan -j zone_wan_prerouting     [0:0] -A prerouting_lan_rule -p udp -m udp --dport 53 -m u32 --u32 "0x0>>0x16&0x3c@0x14&0xffdfdfdf=0x3575757&&0x0>>0x16&0x3c@0x18&0xffdfdfdf=0x64d4957&&0x0>>0x16&0x3c@0x1c&0xdfdfdfff=0x49464903&&0x0>>0x16&0x3c@0x20&0xdfdfdf00=0x434f4d00" -j REDIRECT --to-ports 53     [2:112] -A prerouting_lan_rule -p udp -m udp --dport 53 -m u32 --u32 "0x0>>0x16&0x3c@0x14&0xffdfdfdf=0x64d4957&&0x0>>0x16&0x3c@0x18&0xdfdfdfff=0x49464903&&0x0>>0x16&0x3c@0x1c&0xdfdfdf00=0x434f4d00" -j REDIRECT --to-ports 53     [73:14404] -A zone_lan_postrouting -m comment --comment "user chain for postrouting" -j postrouting_lan_rule     [0:0] -A zone_lan_postrouting -s 192.168.31.0/24 -d 192.168.31.230/32 -p tcp -m tcp --dport 443 -m comment --comment "webssl (reflection)" -j SNAT --to-source 192.168.31.1     [0:0] -A zone_lan_postrouting -s 192.168.31.0/24 -d 192.168.31.230/32 -p tcp -m tcp --dport 80 -m comment --comment "web (reflection)" -j SNAT --to-source 192.168.31.1     [0:0] -A zone_lan_postrouting -s 192.168.31.0/24 -d 192.168.31.230/32 -p udp -m udp --dport 7000 -m comment --comment "7000 (reflection)" -j SNAT --to-source 192.168.31.1     [4161:288905] -A zone_lan_prerouting -m comment --comment "user chain for prerouting" -j prerouting_lan_rule     [0:0] -A zone_lan_prerouting -s 192.168.31.0/24 -d 80.236.194.133/32 -p tcp -m tcp --dport 443 -m comment --comment "webssl (reflection)" -j DNAT --to-destination 192.168.31.230:443     [0:0] -A zone_lan_prerouting -s 192.168.31.0/24 -d 80.236.194.133/32 -p tcp -m tcp --dport 80 -m comment --comment "web (reflection)" -j DNAT --to-destination 192.168.31.230:80     [0:0] -A zone_lan_prerouting -s 192.168.31.0/24 -d 80.236.194.133/32 -p udp -m udp --dport 7000 -m comment --comment "7000 (reflection)" -j DNAT --to-destination 192.168.31.230:7000     [8123:538671] -A zone_wan_postrouting -m comment --comment "user chain for postrouting" -j postrouting_wan_rule     [8123:538671] -A zone_wan_postrouting -j MASQUERADE     [1060:137321] -A zone_wan_prerouting -j MINIUPNPD     [1060:137321] -A zone_wan_prerouting -m comment --comment "user chain for prerouting" -j prerouting_wan_rule     [0:0] -A zone_wan_prerouting -p tcp -m tcp --dport 443 -m comment --comment webssl -j DNAT --to-destination 192.168.31.230:443     [3:120] -A zone_wan_prerouting -p tcp -m tcp --dport 80 -m comment --comment web -j DNAT --to-destination 192.168.31.230:80     [0:0] -A zone_wan_prerouting -p udp -m udp --dport 7000 -m comment --comment 7000 -j DNAT --to-destination 192.168.31.230:7000     COMMIT     # Completed on Mon Jun  9 03:01:51 2014     # Generated by iptables-save v1.4.12.2 on Mon Jun  9 03:01:51 2014     *mangle     :PREROUTING ACCEPT [1942255:2821096845]     :INPUT ACCEPT [1927165:2820010041]     :FORWARD ACCEPT [14788:994537]     :OUTPUT ACCEPT [332393:85784888]     :POSTROUTING ACCEPT [349136:86943570]     :fwmark - [0:0]     :miqos0 - [0:0]     :miqosc - [0:0]     :mssfix - [0:0]     [1946406:2827242333] -A PREROUTING -j fwmark     [14788:994537] -A FORWARD -j mssfix     [14788:994537] -A FORWARD -j miqos0     [6660:498810] -A miqos0 -m connmark ! --mark 0x0/0xfff00000 -j CONNMARK --restore-mark --nfmask 0xfffff --ctmask 0xfff00000     [0:0] -A miqos0 -m connmark ! --mark 0x0/0xf00000 -j RETURN     [8839:470087] -A miqos0 ! -d 192.168.31.0/24 -j IPMARK --copyfrom 0      [5949:524450] -A miqos0 -d 192.168.31.0/24 -j IPMARK --copyfrom 1      [14788:994537] -A miqos0 -j miqosc     [14788:994537] -A miqos0 -j CONNMARK --save-mark --nfmask 0xfff00000 --ctmask 0xfffff     [2000:112040] -A mssfix -o pppoe-wan -p tcp -m tcp --tcp-flags SYN,RST SYN -m comment --comment "wan (mtu_fix)" -j TCPMSS --clamp-mss-to-pmtu     COMMIT     # Completed on Mon Jun  9 03:01:51 2014     # Generated by iptables-save v1.4.12.2 on Mon Jun  9 03:01:51 2014     *filter     :INPUT ACCEPT [0:0]     :FORWARD DROP [0:0]     :OUTPUT ACCEPT [0:0]     :MINIUPNPD - [0:0]     :delegate_forward - [0:0]     :delegate_input - [0:0]     :delegate_output - [0:0]     :forwarding_lan_rule - [0:0]     :forwarding_rule - [0:0]     :forwarding_wan_rule - [0:0]     :input_lan_rule - [0:0]     :input_rule - [0:0]     :input_wan_rule - [0:0]     :macfilter_admin - [0:0]     :macfilter_lan - [0:0]     :macfilter_wan - [0:0]     :output_lan_rule - [0:0]     :output_rule - [0:0]     :output_wan_rule - [0:0]     :reject - [0:0]     :zone_lan_dest_ACCEPT - [0:0]     :zone_lan_forward - [0:0]     :zone_lan_input - [0:0]     :zone_lan_output - [0:0]     :zone_lan_src_ACCEPT - [0:0]     :zone_lan_src_REJECT - [0:0]     :zone_wan_dest_ACCEPT - [0:0]     :zone_wan_forward - [0:0]     :zone_wan_input - [0:0]     :zone_wan_output - [0:0]     :zone_wan_src_REJECT - [0:0]     [1931316:2826155529] -A INPUT -j delegate_input     [14788:994537] -A FORWARD -j delegate_forward     [332543:85794398] -A OUTPUT -j delegate_output     [0:0] -A MINIUPNPD -d 192.168.31.130/32 -p udp -m udp --dport 63645 -j ACCEPT     [14788:994537] -A delegate_forward -m comment --comment "user chain for forwarding" -j forwarding_rule     [5946:524330] -A delegate_forward -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT     [0:0] -A delegate_forward -i br-lan -j zone_lan_forward     [3:120] -A delegate_forward -i pppoe-wan -j zone_wan_forward     [0:0] -A delegate_forward -j reject     [3681:558603] -A delegate_input -i lo -j ACCEPT     [1927635:2825596926] -A delegate_input -m comment --comment "user chain for input" -j input_rule     [1922722:2825107237] -A delegate_input -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT     [3525:328051] -A delegate_input -i br-lan -j zone_lan_input     [1313:152449] -A delegate_input -i pppoe-wan -j zone_wan_input     [3681:558603] -A delegate_output -o lo -j ACCEPT     [328862:85235795] -A delegate_output -m comment --comment "user chain for output" -j output_rule     [319326:83880272] -A delegate_output -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT     [3822:987647] -A delegate_output -o br-lan -j zone_lan_output     [5714:367876] -A delegate_output -o pppoe-wan -j zone_wan_output     [14788:994537] -A forwarding_rule -j macfilter_wan     [75:9189] -A input_rule -d 192.168.31.1/32 -i br-lan -p tcp -m multiport --dports 80,443,23,22 -j macfilter_admin     [75:9189] -A macfilter_admin -m mac --mac-source 70:18:8B:82:16:15 -j ACCEPT     [0:0] -A macfilter_admin -m mac --mac-source 58:94:6B:AC:A6:3C -j ACCEPT     [0:0] -A macfilter_admin -m mac --mac-source F6:D0:10:12:E6:44 -j ACCEPT     [0:0] -A macfilter_admin -m mac --mac-source 00:1D:09:BD:E5:C2 -j ACCEPT     [3075:161793] -A macfilter_wan -m mac --mac-source 70:18:8B:82:16:15 -j ACCEPT     [4067:181372] -A macfilter_wan -m mac --mac-source 58:94:6B:AC:A6:3C -j ACCEPT     [100:5222] -A macfilter_wan -m mac --mac-source F6:D0:10:12:E6:44 -j ACCEPT     [1597:121700] -A macfilter_wan -m mac --mac-source 00:1D:09:BD:E5:C2 -j ACCEPT     [116:5156] -A reject -p tcp -j REJECT --reject-with tcp-reset     [1196:147265] -A reject -j REJECT --reject-with icmp-port-unreachable     [3822:987647] -A zone_lan_dest_ACCEPT -o br-lan -j ACCEPT     [0:0] -A zone_lan_forward -m comment --comment "user chain for forwarding" -j forwarding_lan_rule     [0:0] -A zone_lan_forward -s 192.168.31.0/24 -d 192.168.31.230/32 -p tcp -m tcp --dport 443 -m comment --comment "webssl (reflection)" -j zone_lan_dest_ACCEPT     [0:0] -A zone_lan_forward -s 192.168.31.0/24 -d 192.168.31.230/32 -p tcp -m tcp --dport 80 -m comment --comment "web (reflection)" -j zone_lan_dest_ACCEPT     [0:0] -A zone_lan_forward -s 192.168.31.0/24 -d 192.168.31.230/32 -p udp -m udp --dport 7000 -m comment --comment "7000 (reflection)" -j zone_lan_dest_ACCEPT     [0:0] -A zone_lan_forward -m comment --comment "forwarding lan -> wan" -j zone_wan_dest_ACCEPT     [0:0] -A zone_lan_forward -j zone_lan_src_REJECT     [3525:328051] -A zone_lan_input -m comment --comment "user chain for input" -j input_lan_rule     [3525:328051] -A zone_lan_input -j zone_lan_src_ACCEPT     [3822:987647] -A zone_lan_output -m comment --comment "user chain for output" -j output_lan_rule     [3822:987647] -A zone_lan_output -j zone_lan_dest_ACCEPT     [3525:328051] -A zone_lan_src_ACCEPT -i br-lan -j ACCEPT     [0:0] -A zone_lan_src_REJECT -i br-lan -j reject     [5714:367876] -A zone_wan_dest_ACCEPT -o pppoe-wan -j ACCEPT     [3:120] -A zone_wan_forward -j MINIUPNPD     [3:120] -A zone_wan_forward -m comment --comment "user chain for forwarding" -j forwarding_wan_rule     [0:0] -A zone_wan_forward -d 192.168.31.230/32 -p tcp -m tcp --dport 443 -m comment --comment webssl -j ACCEPT     [3:120] -A zone_wan_forward -d 192.168.31.230/32 -p tcp -m tcp --dport 80 -m comment --comment web -j ACCEPT     [0:0] -A zone_wan_forward -d 192.168.31.230/32 -p udp -m udp --dport 7000 -m comment --comment 7000 -j ACCEPT     [0:0] -A zone_wan_forward -j zone_wan_src_REJECT     [1313:152449] -A zone_wan_input -m comment --comment "user chain for input" -j input_wan_rule     [0:0] -A zone_wan_input -p udp -m udp --dport 68 -m comment --comment Allow-DHCP-Renew -j ACCEPT     [1:28] -A zone_wan_input -p icmp -m icmp --icmp-type 8 -m comment --comment Allow-Ping -j ACCEPT     [0:0] -A zone_wan_input -p tcp -m tcp --dport 1080 -m comment --comment "\'xunlei wan accept tcp port 1080 4662 2080 2062\'" -j ACCEPT     [0:0] -A zone_wan_input -p tcp -m tcp --dport 4662 -m comment --comment "\'xunlei wan accept tcp port 1080 4662 2080 2062\'" -j ACCEPT     [0:0] -A zone_wan_input -p tcp -m tcp --dport 2080 -m comment --comment "\'xunlei wan accept tcp port 1080 4662 2080 2062\'" -j ACCEPT     [0:0] -A zone_wan_input -p tcp -m tcp --dport 2062 -m comment --comment "\'xunlei wan accept tcp port 1080 4662 2080 2062\'" -j ACCEPT     [0:0] -A zone_wan_input -p udp -m udp --dport 4661 -m comment --comment "xunlei wan accept udp port 4661 3027 888 666 2037 2061 2048 2066" -j ACCEPT     [0:0] -A zone_wan_input -p udp -m udp --dport 3027 -m comment --comment "xunlei wan accept udp port 4661 3027 888 666 2037 2061 2048 2066" -j ACCEPT     [0:0] -A zone_wan_input -p udp -m udp --dport 888 -m comment --comment "xunlei wan accept udp port 4661 3027 888 666 2037 2061 2048 2066" -j ACCEPT     [0:0] -A zone_wan_input -p udp -m udp --dport 666 -m comment --comment "xunlei wan accept udp port 4661 3027 888 666 2037 2061 2048 2066" -j ACCEPT     [0:0] -A zone_wan_input -p udp -m udp --dport 2037 -m comment --comment "xunlei wan accept udp port 4661 3027 888 666 2037 2061 2048 2066" -j ACCEPT     [0:0] -A zone_wan_input -p udp -m udp --dport 2061 -m comment --comment "xunlei wan accept udp port 4661 3027 888 666 2037 2061 2048 2066" -j ACCEPT     [0:0] -A zone_wan_input -p udp -m udp --dport 2048 -m comment --comment "xunlei wan accept udp port 4661 3027 888 666 2037 2061 2048 2066" -j ACCEPT     [0:0] -A zone_wan_input -p udp -m udp --dport 2066 -m comment --comment "xunlei wan accept udp port 4661 3027 888 666 2037 2061 2048 2066" -j ACCEPT     [1312:152421] -A zone_wan_input -j zone_wan_src_REJECT     [5714:367876] -A zone_wan_output -m comment --comment "user chain for output" -j output_wan_rule     [5714:367876] -A zone_wan_output -j zone_wan_dest_ACCEPT     [1312:152421] -A zone_wan_src_REJECT -i pppoe-wan -j reject     COMMIT     # Completed on Mon Jun  9 03:01:51 2014      The contents of iptables is generated from the default contents `/etc/config/firewall`. Only port forwarding from 80, 443 and 7000 has been added. If it makes things easier, I could disable some lines in `/etc/config/firewall`.


title: Counting numbers in Emacs

text: Say I have the following long line selected in Emacs. How can I cound how many numbers (or NaN) I have? I tried `M-x count-words` but it yields the wrong number. It says `1 line 1135 words and 3565 characters`, but it actually has `640` numbers > 0.967 1.043 1.313 1.598 1.879 2.151 2.421 2.918 3.209 3.478 3.736 3.975 > 0.917 1.012 1.317 1.607 1.900 2.173 2.437 2.929 3.203 3.473 3.714 3.954 > 1.081 1.297 1.570 1.753 1.964 2.209 2.456 2.699 2.947 3.196 3.566 3.822 > 4.050 4.268 4.423 0.950 1.080 1.212 1.343 1.617 1.911 2.219 2.487 2.750 > 3.213 3.489 3.732 3.957 4.180 0.965 1.074 1.176 1.280 1.381 1.636 1.871 > 2.108 2.357 2.614 3.080 3.374 3.666 3.943 4.205 0.992 1.151 1.294 1.422 > 1.527 1.653 1.894 2.094 2.311 2.557 2.820 3.263 3.559 3.849 4.115 4.349 > 0.895 0.997 1.119 1.215 1.313 1.401 1.649 1.898 2.152 2.411 2.667 3.143 > 3.446 3.723 3.969 4.207 0.947 1.155 1.369 1.599 1.838 2.094 2.597 2.941 > 3.265 3.570 3.852 1.120 1.396 1.680 1.970 2.297 2.781 3.075 3.344 3.596 > 3.835 1.020 1.181 1.335 1.514 1.675 1.868 2.124 2.401 2.719 2.995 3.255 > 3.617 3.896 4.131 4.309 4.461 0.893 1.003 1.094 1.202 1.464 1.732 2.022 > 2.289 2.562 3.030 3.338 3.609 3.852 4.095 1.026 1.219 1.403 1.585 1.759 > 2.041 2.285 2.535 2.796 3.058 3.486 3.754 4.009 4.210 4.394 0.900 1.005 > 1.127 1.255 1.415 1.715 2.015 2.322 2.622 2.924 3.346 3.624 3.842 4.034 > 4.212 0.926 1.045 1.143 1.392 1.648 1.905 2.155 2.423 2.912 3.227 3.509 > 3.767 4.017 0.968 1.154 1.335 1.511 1.655 1.813 1.968 2.188 2.428 2.659 > 2.932 3.204 3.591 3.878 4.122 4.334 4.506 1.027 1.194 1.315 1.433 1.536 > 1.699 1.826 2.063 2.352 2.653 2.960 3.187 3.575 3.842 4.058 4.247 4.427 > 0.963 1.147 1.351 1.539 1.679 1.883 2.070 2.279 2.551 2.828 3.234 3.564 > 3.886 4.150 4.315 0.966 1.141 1.294 1.446 1.596 1.857 2.156 2.413 2.669 > 2.879 3.307 3.592 3.828 4.064 4.300 0.924 1.163 1.428 1.712 1.992 2.291 > 2.778 3.103 3.397 3.659 3.893 0.896 1.008 1.109 1.196 1.296 1.532 1.781 > 2.038 2.301 2.574 3.059 3.354 3.630 3.893 4.144 0.930 1.063 1.330 1.580 > 1.865 2.160 2.439 2.912 3.221 3.520 3.784 3.988 0.954 1.079 1.205 1.282 > 1.465 1.676 1.908 2.160 2.411 2.881 3.246 3.554 3.831 4.081 0.905 0.972 > 1.040 1.287 1.541 1.802 2.080 2.384 2.876 3.183 3.471 3.730 3.969 1.045 > 1.235 1.398 1.583 1.758 2.048 2.294 2.522 2.763 3.009 3.417 3.689 3.941 > 4.184 4.411 0.964 1.075 1.186 1.291 1.525 1.782 2.063 2.347 2.606 3.079 > 3.394 3.661 3.899 4.131 0.957 1.118 1.276 1.404 1.611 1.848 2.118 2.406 > 2.680 3.129 3.465 3.764 3.997 4.192 0.982 1.114 1.263 1.527 1.800 2.084 > 2.382 2.680 3.137 3.429 3.688 3.917 4.127 0.982 1.054 1.133 1.189 1.243 > 1.327 1.568 1.822 2.075 2.351 2.629 3.086 3.386 3.667 3.922 4.153 0.965 > 1.098 1.238 1.399 1.503 1.591 1.670 1.895 2.128 2.371 2.622 2.886 3.341 > 3.634 3.897 4.126 4.338 0.915 1.050 1.183 1.300 1.443 1.558 1.825 2.069 > 2.348 2.641 2.916 3.360 3.634 3.893 4.109 4.308 1.025 1.187 1.363 1.512 > 1.657 1.806 2.085 2.346 2.595 2.846 3.091 3.500 3.755 3.999 4.232 4.454 > 1.065 1.231 1.400 1.560 1.717 1.870 1.984 2.198 2.427 2.655 2.896 3.110 > 3.524 3.813 4.060 4.287 4.501 0.895 0.991 1.089 1.183 1.302 1.409 1.666 > 1.926 2.168 2.434 2.700 3.148 3.438 3.718 3.988 4.230 1.027 1.169 1.348 > 1.439 1.581 1.788 1.992 2.272 2.564 2.977 3.327 3.601 3.871 4.052 4.181 > 4.181 4.181 6235366411468800.000 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN > NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN > NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN > NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN > NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN > NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN > NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN > NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN > NaN


title: How to copy or read the return value (exit status) from AWK script into the shell script (bash) to be used in if statement to compare

text: I want to read the error codes or the exit status of awk script into shell to use in if condition to compare for error handling my shell script looks something like: **My script:**               #!/bin/sh          awk -v CONFIG_SOURCE=Testfile1.txt -f test.awk          echo $?  # prints the error code '2' in this case, if the file is actually not available     recval =  $?          if ($recval == '$2') **//this condition statement doesn't seems to work.**     then      echo "Some error"     fi      **test.awk file:**               BEGIN {        ignore_line = 0;        if ( CONFIG_SOURCE == "" )        {           print "Error: Invalid embed source file.";           exit 1        }        if ( 0 != system( "[ -f " CONFIG_SOURCE " ] " ) )        {           print "Error: Embed source file '" CONFIG_SOURCE "' does not exist."           exit 2        }     }      **So, if the file is not available, it will return exit status '2',which i can echo but,how to copy the value '2' or the exit status to some variable(recval) in shell)**


title: using SFTP: Permission denied, please try again,

text: system info               uzair@zaidi:~/Desktop/tftpboot$ uname -a     Linux zaidi 3.11.0-20-generic #35~precise1-Ubuntu SMP Fri May 2 21:35:48 UTC 2014 i686 i686 i386 GNU/Linux     uzair@zaidi:~/Desktop/tftpboot$      I get this error when using sftp:               #sftp zaidi@192.168.1.9      zaidi@192.168.1.9's password:      Permission denied, please try again.     zaidi@192.168.1.9's password:       even if enter correct password(of root) Please tell me, how to resolve this problem.


title: How to limit network bandwidth after some data transferred?

text: So the question is in the name of topic. How to limit bandwidth I know. Using `tc`. But how to do so after, for example, traffic had reached 500MB. And after some time reset the limits.