title: Monitor directory and if a file is requested then rsync on demand

text: Is there a tool that monitors a certain directory and if a program tries to access a file in that directory, the program loads that file from another place transparent for any application that tries to load that file? The background is that I have a local development enviroment for a large server application. At the moment I sync all the files created by the users on the production system from time to time via `rsync` to my local machine. But the amount of data has become too big. I can not store the several hundreds of gigabytes from the production environment on my local dev machine. So is there a way of mimicking the files from the external system and load/sync them only from the external system if they are really needed? Writing changes to these "monitored" directories should nevertheless take only place locally.


title: What happens to the old binary when a new one compiled from source?

text: I've compiled git from source after git from the repository was already installed via the package manager. In that process, the "from source" git took its place as the "main system git".               user@jeanny:~$ git --version     git version 1.8.3.2      Is there a way to set the git from the repo as the "main system git"?


title: Why "Linux Generic" use RPM extension in MySQL download page?

text: I need to install MySQL 5.5 from source in Ubuntu 10.04. So I'm trying to find tar.gz source from here. But when choosing "Linux Generic" from the drop down menu, it is showing an RPM extension I wonder why? Can we install from source using RPM package in Ubuntu now? It's like a joke but this prevents me from installing it now.


title: USB Dongle Not Working - Debian Wheezy, Cambridge Silicon Radio

text: I can't get my USB dongle to recognise my USB keyboard. I have tried both on Windows and they work suggesting it is a linux issue. The scan function simply never finds the keyboard. Also, hciconfig sometimes shows connection timeout. Any help greatly appreciated - or even if someone can recommend somewhere to buy a good cheap dongle known to work with Debian wheezy. Package versions:               media:~# dpkg -l | grep bluez     ii  bluez                                  4.99-2                                          i386         Bluetooth tools and daemons     ii  bluez-alsa:i386                        4.99-2                                          i386         Bluetooth ALSA support     ii  bluez-firmware                         1.2-3                                           all          Firmware for Bluetooth devices     ii  bluez-gstreamer                        4.99-2                                          i386         Bluetooth GStreamer support     ii  bluez-hcidump                          2.4-1                                           i386         Analyses Bluetooth HCI packets     ii  bluez-utils                            4.99-2                                          all          Transitional package     ii  libbluedevil1:i386                     1.9.2-1                                         i386         Qt wrapper for bluez      Kernel:               media:~# uname -a     Linux media 3.2.0-4-686-pae #1 SMP Debian 3.2.46-1 i686 GNU/Linux      When you try and use it:               media:~# hciconfig -a     hci0:   Type: BR/EDR  Bus: USB             BD Address: 00:1F:81:00:08:30  ACL MTU: 1021:4  SCO MTU: 180:1             UP RUNNING             RX bytes:2672 acl:0 sco:0 events:52 errors:0             TX bytes:436 acl:0 sco:0 commands:60 errors:14             Features: 0xff 0x3e 0x09 0x76 0x80 0x01 0x00 0x80             Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3             Link policy: RSWITCH HOLD SNIFF             Link mode: SLAVE ACCEPT             Name: 'Accel-OB2'             Class: 0x420104             Service Classes: Networking, Telephony             Device Class: Computer, Desktop workstation             HCI Version: 2.0 (0x3)  Revision: 0x44             LMP Version: 2.0 (0x3)  Subversion: 0x3             Manufacturer: Cambridge Silicon Radio (10)          media:~# hcitool scan     Scanning ...     media:~# hcitool scan     Scanning ...     media:~# hcitool scan     Scanning ...      (tried multiple bluetooth things to pair with) lsusb -v output:               Bus 004 Device 004: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)     Device Descriptor:       bLength                18       bDescriptorType         1       bcdUSB               2.00       bDeviceClass          224 Wireless       bDeviceSubClass         1 Radio Frequency       bDeviceProtocol         1 Bluetooth       bMaxPacketSize0        64       idVendor           0x0a12 Cambridge Silicon Radio, Ltd       idProduct          0x0001 Bluetooth Dongle (HCI mode)       bcdDevice           19.15       iManufacturer           0        iProduct                0        iSerial                 0        bNumConfigurations      1       Configuration Descriptor:         bLength                 9         bDescriptorType         2         wTotalLength          177         bNumInterfaces          2         bConfigurationValue     1         iConfiguration          0          bmAttributes         0xc0           Self Powered         MaxPower                0mA         Interface Descriptor:           bLength                 9           bDescriptorType         4           bInterfaceNumber        0           bAlternateSetting       0           bNumEndpoints           3           bInterfaceClass       224 Wireless           bInterfaceSubClass      1 Radio Frequency           bInterfaceProtocol      1 Bluetooth           iInterface              0            Endpoint Descriptor:             bLength                 7             bDescriptorType         5             bEndpointAddress     0x81  EP 1 IN             bmAttributes            3               Transfer Type            Interrupt               Synch Type               None               Usage Type               Data             wMaxPacketSize     0x0010  1x 16 bytes             bInterval               1           Endpoint Descriptor:             bLength                 7             bDescriptorType         5             bEndpointAddress     0x82  EP 2 IN             bmAttributes            2               Transfer Type            Bulk               Synch Type               None               Usage Type               Data             wMaxPacketSize     0x0040  1x 64 bytes             bInterval               0           Endpoint Descriptor:             bLength                 7             bDescriptorType         5             bEndpointAddress     0x02  EP 2 OUT             bmAttributes            2               Transfer Type            Bulk               Synch Type               None               Usage Type               Data             wMaxPacketSize     0x0040  1x 64 bytes             bInterval               0         Interface Descriptor:           bLength                 9           bDescriptorType         4           bInterfaceNumber        1           bAlternateSetting       0           bNumEndpoints           2           bInterfaceClass       224 Wireless           bInterfaceSubClass      1 Radio Frequency           bInterfaceProtocol      1 Bluetooth           iInterface              0            Endpoint Descriptor:             bLength                 7             bDescriptorType         5             bEndpointAddress     0x83  EP 3 IN             bmAttributes            1               Transfer Type            Isochronous               Synch Type               None               Usage Type               Data             wMaxPacketSize     0x0020  1x 32 bytes             bInterval               1           Endpoint Descriptor:             bLength                 7             bDescriptorType         5             bEndpointAddress     0x03  EP 3 OUT             bmAttributes            1               Transfer Type            Isochronous               Synch Type               None               Usage Type               Data             wMaxPacketSize     0x0020  1x 32 bytes             bInterval               1         Interface Descriptor:           bLength                 9           bDescriptorType         4           bInterfaceNumber        1           bAlternateSetting       1           bNumEndpoints           2           bInterfaceClass       224 Wireless           bInterfaceSubClass      1 Radio Frequency           bInterfaceProtocol      1 Bluetooth           iInterface              0            Endpoint Descriptor:             bLength                 7             bDescriptorType         5             bEndpointAddress     0x83  EP 3 IN             bmAttributes            1               Transfer Type            Isochronous               Synch Type               None               Usage Type               Data             wMaxPacketSize     0x0009  1x 9 bytes             bInterval               1           Endpoint Descriptor:             bLength                 7             bDescriptorType         5             bEndpointAddress     0x03  EP 3 OUT             bmAttributes            1               Transfer Type            Isochronous               Synch Type               None               Usage Type               Data             wMaxPacketSize     0x0009  1x 9 bytes             bInterval               1         Interface Descriptor:           bLength                 9           bDescriptorType         4           bInterfaceNumber        1           bAlternateSetting       2           bNumEndpoints           2           bInterfaceClass       224 Wireless           bInterfaceSubClass      1 Radio Frequency           bInterfaceProtocol      1 Bluetooth           iInterface              0            Endpoint Descriptor:             bLength                 7             bDescriptorType         5             bEndpointAddress     0x83  EP 3 IN             bmAttributes            1               Transfer Type            Isochronous               Synch Type               None               Usage Type               Data             wMaxPacketSize     0x0011  1x 17 bytes             bInterval               1           Endpoint Descriptor:             bLength                 7             bDescriptorType         5             bEndpointAddress     0x03  EP 3 OUT             bmAttributes            1               Transfer Type            Isochronous               Synch Type               None               Usage Type               Data             wMaxPacketSize     0x0011  1x 17 bytes             bInterval               1         Interface Descriptor:           bLength                 9           bDescriptorType         4           bInterfaceNumber        1           bAlternateSetting       3           bNumEndpoints           2           bInterfaceClass       224 Wireless           bInterfaceSubClass      1 Radio Frequency           bInterfaceProtocol      1 Bluetooth           iInterface              0            Endpoint Descriptor:             bLength                 7             bDescriptorType         5             bEndpointAddress     0x83  EP 3 IN             bmAttributes            1               Transfer Type            Isochronous               Synch Type               None               Usage Type               Data             wMaxPacketSize     0x0019  1x 25 bytes             bInterval               1           Endpoint Descriptor:             bLength                 7             bDescriptorType         5             bEndpointAddress     0x03  EP 3 OUT             bmAttributes            1               Transfer Type            Isochronous               Synch Type               None               Usage Type               Data             wMaxPacketSize     0x0019  1x 25 bytes             bInterval               1         Interface Descriptor:           bLength                 9           bDescriptorType         4           bInterfaceNumber        1           bAlternateSetting       4           bNumEndpoints           2           bInterfaceClass       224 Wireless           bInterfaceSubClass      1 Radio Frequency           bInterfaceProtocol      1 Bluetooth           iInterface              0            Endpoint Descriptor:             bLength                 7             bDescriptorType         5             bEndpointAddress     0x83  EP 3 IN             bmAttributes            1               Transfer Type            Isochronous               Synch Type               None               Usage Type               Data             wMaxPacketSize     0x0021  1x 33 bytes             bInterval               1           Endpoint Descriptor:             bLength                 7             bDescriptorType         5             bEndpointAddress     0x03  EP 3 OUT             bmAttributes            1               Transfer Type            Isochronous               Synch Type               None               Usage Type               Data             wMaxPacketSize     0x0021  1x 33 bytes             bInterval               1         Interface Descriptor:           bLength                 9           bDescriptorType         4           bInterfaceNumber        1           bAlternateSetting       5           bNumEndpoints           2           bInterfaceClass       224 Wireless           bInterfaceSubClass      1 Radio Frequency           bInterfaceProtocol      1 Bluetooth           iInterface              0            Endpoint Descriptor:             bLength                 7             bDescriptorType         5             bEndpointAddress     0x83  EP 3 IN             bmAttributes            1               Transfer Type            Isochronous               Synch Type               None               Usage Type               Data             wMaxPacketSize     0x0031  1x 49 bytes             bInterval               1           Endpoint Descriptor:             bLength                 7             bDescriptorType         5             bEndpointAddress     0x03  EP 3 OUT             bmAttributes            1               Transfer Type            Isochronous               Synch Type               None               Usage Type               Data             wMaxPacketSize     0x0031  1x 49 bytes             bInterval               1     Device Status:     0x0000       (Bus Powered)


title: urxvt map esc key to key sequence

text: This question is a spin-off of Rebinding "clear prompt" in mutt I use vim keybindings a lot and like using `esc` to abort commands. I've now moved to mutt but it is not possible to bind `esc` to 'abort' in Mutt (see above). Instead, I would like to map `esc` to `esc`+`Ctrl-g`. My hope is to get the `esc` key to send both key sequences. That way `esc` is a kind of universal abort key for vim and mutt. I've mapped `Ctrl-g` to 'no operation' in .vimrc with `nmap <C-g> <nop>` so there's no conflict in Vim. Preferably I would like this mapping to be set in .Xdefaults or .Xresources so that the strange `esc` to `esc`+`Ctrl-g` mapping only applies to urxvt (my terminal em) and programs run inside it. By making this apply more globally in Xinput or Xmodmap I will have to stay on the lookout for what this mapping does to other (possibly non-cli) programs. That said, any suggestions are welcome :)


title: Create shortcut for PHP

text: I have `XAMPP` installed and my PHP is: `/opt/lampp/bin/php-5.3.8` Every time I need to execute a PHP file I need to do this: `/opt/lampp/bin/php-5.3.8 testando.php` Is there another way to execute it besides using symbolic link? I did this on `/etc/init.d/`: `sudo ln -s /opt/lampp/bin/php-5.3.8 php` Why when I need to run PHP I have to do this `./php` instead of just `php`? And is there a way to do this without the `./`? Like it was installed via `apt-get`?


title: How can I stress test a command line tool?

text: I'd like to try to stress-test a PHP script I've written, which accesses the filesystem, to see how it copes with load and parallel access. I'd like to run this script `x` times in `y` different processes parallelly. Is there a tool for this?


title: After Logoff from any user getting black screen

text: Presently I'm suffering a new problem. When I log-off my Linux system from any profile it's showing a black screen (graphical view has gone). After that I'm not able to login graphically. If I switch to the console that works for me. To get the graphical view again I have to restart the system each time. Please help me to resolve this issue.


title: notify-send not working under ssh

text: Maybe this is answered somewhere else, but I didn't see it. I am running Ubuntu 14.04. When I SSH into my machine, for example:               ssh <user>@<machineip> notify-send "Hello"      I don't see anything on the monitor where I am logged into the machine. If I prefix "notify-send" with `DISPLAY=:0.0` or `DISPLAY=:0` nothing different happens. I just never see any notification on the current session. Is there some trick/switch to getting this working? In case this isn't clear, allow me to reiterate: From Computer A, I SSH into Computer B. Within the SSH session, I wish to execute notify-send to run on Computer B. I expect a growl-type notification to appear on the monitor of Computer B.


title: waiting for network in a bash script

text: I'm running a script that relies on network being up and a network share be mounted. The script runs on login (which happens automatically after boot). The problem is that by the time the script runs, I usually do not have an IP address yet (DHCP). At the moment I just sleep the script for 15s, but I don't like this approach at all, since I want to be able to tell the user if something is wrong. What my plan is, is loop while I don't have an IP address yet and continue when I do. Crucially, it has to time out after a while. What I came up with is to `if [ ifconfig | grep "192.168.100" ];` but what happens is that grepconsumes the `];` and doesn't like it. Then bash also gets upset, because it can't find the `];` which grep ate. And then I haven't even implemented the time-out. Someone suggested keeping a variable, and sleeping for, say, a second in each iteration and increase this variable each time. Here is my complete (non working) script (I'm fairly new to bash scripting):               x=0     while [ ifconfig | grep "192.168.100." > /dev/null ]; do         echo "no nework"         if "$x" -gt 200; then             #Time out here             exit 1         x=$((x+1))         sleep .1         fi     done          #continue with rest of script...      Any pointers in the right direction would be greatly appreciated!


title: How to set the path OSX applications use

text: I'm running Mountain Lion 10.8.4, and have my environment all customized through `~/.profile` so that when I run GUI apps like Sublime Text or Eclipse from the command line               open /Applications/Sublime\ Text\ 2.app      they inherit my `$PATH` settings, allowing the app to run external commands not in OSX's very limited default path. However, I'd really like to be able to open programs through Finder or the Dock and give them the same path I use on the command line. `launchctl setenv PATH $PATH` doesn't work in 10.8. How do I set this up?


title: Keyboard shortcut to move window to other monitor in Linux Mint

text: I can right click a program in the panel and have an option to move it to my other monitor. Any idea how to determine what command it is executing in the background to achieve this? _screenshot of GUI method_   ![ss of GUI method](http://i.stack.imgur.com/PC1rA.png) OS: Linux Mint 15 (cinnamon)


title: No room on ep ring?

text: I just switched to tty1, and I'm getting all kinds of output. It all looks like this:               [timestamp] xhci_hcd 0000:00:14.0: ERROR no room on ep ring      It's happening over 100 times per second, every 5 seconds or so, on every tty. Other similar questions say it's happening because of external drives, but the only drive I have mounted is /dev/sda1 (root), as well as a swap partition on /dev/sda5 EDIT: Here's `mount` as root:               sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)     proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)     udev on /dev type devtmpfs (rw,relatime,size=10240k,nr_inodes=1008641,mode=755)     devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)     tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=808160k,mode=755)     /dev/disk/by-uuid/eb5e28f7-395f-4556-aff4-8c8910a6295c on / type ext4 (rw,relatime,errors=remount-ro,user_xattr,barrier=1,data=ordered)     tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)     tmpfs on /run/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=4924640k)     binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,nosuid,nodev,noexec,relatime)     fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)     gvfs-fuse-daemon on /home/lucas/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)     gvfs-fuse-daemon on /root/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,relatime,user_id=0,group_id=0)     truecrypt on /tmp/.truecrypt_aux_mnt1 type fuse.truecrypt (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other)     /dev/mapper/truecrypt1 on /media/truecrypt1 type ext4 (rw,relatime,user_xattr,barrier=1,data=ordered)      (Note that this issue started before the truecrypt volume was mounted) My `dmseg` has been completely bloated out, nothing but this message. After rebooting, my dmesg is back to normal. It's _way_ too long to post here, so here's a pastebin link: dmesg


title: Why are there so few "running" processes?

text: On all of BSD/Linux/MacOS and Solaris, I made an observation - no matter how busy the system is, `top` always reports very few (usually 1-2) running processes. According to my limited understanding, a process is in "running" state if it is using CPU time, or waiting for CPU time to become available. So, here is a scenario: I use SSH to tunnel VNC, then run `top` on remote machine, in a Terminal emulator:   * `top` itself is listed as a "running" process (understandable)   * `sshd` is listed, but not "running"   * `Xvnc` is listed, but not "running" But `sshd` is tunneling VNC traffic, `Xvnc` is what keeps me updated with screen content, how can they not be using CPU time? If they are using CPU time, then how come they are not "running"?


title: Awesome floats some programs by default

text: I have Kubuntu with KDE and replaced KWin with Awesome WM. It works well, except that it floats Konsole and Dolphin consistently. While using KWin, I set up some KWin rules to fix the windows size, but I have deleted those rules in the KDE system settings by now, the issue persists. How can I have Dolphin and Konsole tiled by default?               awesome v3.4.15 (Never Gonna Give You Up)      • Build: Apr 28 2013 18:48:19 for x86_64 by gcc version 4.8.0 (buildd@batsu)      • D-Bus support: ✔      My rc.lua.


title: What is wrong with this code?

text: I have a script that goes like this:               while :     do        Start_Time=$(date +"%s")                MAIN PROGRAM GOES HERE (CROPPED TO SHORTEN THINGS)             Run_Time=$(( $(date +"%s") - $Start_Time ))             if [[ $Run_Time < $Wait_Time ]]        then           Delay_Time=$(( $Wait_Time - $Run_Time ))           sleep $Delay_Time        else           echo "Delay exceeded"            echo $Run_Time           echo $Wait_Time        fi     done      And my problem is that sometimes even if the run time is smaller than the wait time it fails the < test Here is an output from the last run:               Delay exceeded     Run_Time 4     Wait_Time 30


title: How to handle internet disconnection while upgrading Ubuntu?

text: I am about to upgrade Ubuntu 13.04 to Ubuntu 13.10. Internet speed is slow and so it would take many hours for the same. So, is there any tool or way to handle or take care of this. Suppose my Internet disconnects while upgrading, how to take care of that? Can it be resumed later at whatever point the Internet disconnects?


title: Move and empty /home partition of Ubuntu

text: My partitions are:   * Ubuntu's `/` on `/dev/sda1`   * Ubuntu's `/home` on `/dev/sda6/`   * Crunchbang's `/` on `dev/sda7` Now I want to install Backtrack, but for this I need to get rid of Ubuntu's `/home` and move its content somewhere else (whichever of the other partitions). How should I go about and do that without messing up the partitions table and the boot loader? ![Partitions table](http://i.stack.imgur.com/Z2B7C.png)


title: Graphical Interfaces cutomization and theming

text: I'm currently using Linux Mint 15, Cinnamon 1.8. I really like it except for the customization and theming part. In Widows 7, themes also affect the windows of programs or you can set colors. Is this not possible in Linux? In my Linux Mint I installed a black/dark theme. It affects the task bar, main menu and system tray panel but not the windows of the applications. It really looks ugly because the windows are still the default gray color while the task bar and main menu is black/dark. Is this the same for all graphical interface in Linux? or is this just cinnamon?


title: Secure Remote Backups Using Duplicity

text: The recent take-down of codespaces got me thinking about off-site backup processes (which I currently perform manually with password entry). I have been reading tutorials showing how to automate backups through duplicity. These tend to revolve around using an SSH key to automate the authentication process to the backup server. However, this seems full of holes to me. If the server being backed up is compromised to the point where the malicious user has gained access then they could automatically login to the backup server and remove the backups. Assuming that the admin used `/usr/bin/nologin` in the `/etc/passwd` file for the backup user (I have no idea how much this can be relied upon or if it would prevent duplicity from working remotely anyway), then the malicious user could still get duplicity to wipe the backups by using the `duplicity remove- older-than [time now]` command. Is the only safe solution to send the files to the backup server using rsync over ssh and have a "master user" on the backup server perform local iterative backups of all the user accounts to its own storage area (e.g. only it has permissions to its own files, but it has permission to read all the other accounts files)? Or is there a way to prevent duplicity from removing backups and prevent remote login?


title: php5-curl installation aborts due to ucf failing on /etc/php5/mods-available/curl.ini

text: I've screwed my raspbian (debian) installation. To fix this I'm going through reinstalling every single packacke. This is tiresome (or rather: slow) but works in general. Where I'm absolutely stuck is reinstalling the php packages I need most:               apt-get install php5-curl          Setting up php5-curl (5.4.4-14+deb7u10) ...     dpkg: error processing php5-curl (--configure):      subprocess installed post-installation script returned error exit status 10      As other php5 modules are failing as well I'm reluctant to just remove the post install scripts- I'd need to remove a couple of them to get php installing. To see whats wrong with the post install I've run it manually:               pi@prodpi ~ $ sudo sh -x /var/lib/dpkg/info/php5-curl.postinst configure && echo &?     pi@prodpi ~ $ + set -e     + inidir=/etc/php5/mods-available     + [ configure = configure ]     + inifile=curl.ini     + sed -ne s/^; priority=\([0-9]\+\)$/\1/p /usr/share/php5/curl/curl.ini     + priority=20     + ucf /usr/share/php5/curl/curl.ini /etc/php5/mods-available/curl.ini          [2]+ Exit 10        Only running the last command gives:               pi@prodpi ~ $ sudo ucf -v /usr/share/php5/curl/curl.ini /etc/php5/mods-available/curl.ini     ucf: The new file is /usr/share/php5/curl/curl.ini     ucf: The Destination file is /etc/php5/mods-available/curl.ini     ucf: The Source directory is /usr/share/php5/curl     ucf: The State directory is /var/lib/ucf     The hash file exists     egrep [[:space:]]\/etc\/php5\/mods\-available\/curl\.ini$ /var/lib/ucf/hashfile     ucf: The new file is /usr/share/php5/curl/curl.ini     ucf: The Destination file is /etc/php5/mods-available/curl.ini     ucf: The Source directory is /usr/share/php5/curl     ucf: The State directory is /var/lib/ucf     The hash file exists      It does however exit with code 20, not 10- so I'm not sure I'm really looking in the right place. Running with `-d9` shows:               root@prodpi:/home/pi# ucf -v -d9 /usr/share/php5/curl/curl.ini /etc/php5/mods-available/curl.ini     ucf: The Debug value is 9     ucf: The new file is /usr/share/php5/curl/curl.ini     ucf: The Destination file is /etc/php5/mods-available/curl.ini     ucf: The Source directory is /usr/share/php5/curl     ucf: The State directory is /var/lib/ucf     The hash file exists     egrep [[:space:]]\/etc\/php5\/mods\-available\/curl\.ini$ /var/lib/ucf/hashfile     The new start file is      `/usr/share/php5/curl/curl.ini\'     The destination is         `/etc/php5/mods-available/curl.ini\' (`\/etc\/php5\/mods\-available\/curl\.ini\')     The history is kept under  \'/usr/share/php5/curl\'     The file may be cached at \'/var/lib/ucf/cache/:etc:php5:mods-available:curl.ini\'     The destination file does not exist.     The old md5sum does not exist.     The new file exists, and has md5sum:     4e260877185bdf259be69a8165c00ab2  /usr/share/php5/curl/curl.ini     Historical md5sums are not available     ucf: The Debug value is 9     ucf: The new file is /usr/share/php5/curl/curl.ini     ucf: The Destination file is /etc/php5/mods-available/curl.ini     ucf: The Source directory is /usr/share/php5/curl     ucf: The State directory is /var/lib/ucf     The hash file exists     root@prodpi:/home/pi# $?     bash: 20: command not found      What can I do to find/cure the source of the post installation issues?


title: How to detect if input is from argument, file or terminal

text: In bash, is there a way to know if a given script has been invoked with:               $ myscript.sh myfile      or:               $ myscript.sh < myfile      Inside some scripts I always have accessed the contents of `myfile` with `$1`, but now I'd like to change the behavior as different cases. EDIT: I also would like a third case when invoked without any redirection:               $ myscript.sh


title: Turn NumLock on on startup?

text: I usually edit in **Vim** ,and when pressing `+`, I'd rather move my hand to the right part of the keyboard where `+` resides rather than doing `shift` \+ `=`. But when `NumLock` is not on, in Vim it just opens a new line above and inserts the letter **_k_**. And every time I start my PC `NumLock` is off. I would like to know if there is any `xmodmap` trick to turn on `NumLock`,so I could add it to my `.xinitrc`.And it would be even better if I could add it to my `.map` file which swaps `Escape` and `CapsLock` which I load with `loadkeys` in my `/etc/rc.local` on startup. I am using **_Arch Linux_**.


title: Does this dispatcher produce zombie process?

text: I have such a dispatcher shell script.               while read line     do         java TestProg $line &     done < $tasklist      On the zombie process Wikipedia page, it says > if a parent fails to call wait, the zombie will be left in the process > table, causing a resource leak in the script above I didn't use the `wait` function (I wrote many dispatcher shell script this way). I'm wondering if I need use `wait` like this so that I can prevent from zombie processes:               while read line     do         java TestProg $line &     done < $tasklist     wait


title: how to export all numbers that are unique in few text files into another file?

text: I have `a.txt`,`b.txt`,`c.txt`. Each has different numbers as below: **a.txt:**               12     14     111     1     15     2      **b.txt**               12     18     22     23     1     2      **c.txt**               12     14     15     16     17     1200      The output should contains all the numbers from all files, but without any duplication. Is there a command to export such a thing into txt file? The actual txt files includes hundreds of rows.


title: Something like a symbolically linked file, but with change details attached?

text: Is there a file type or method for using files in which certain files look and behave like symbolically linked files, but contain extra meta information for changing the data when they are read? **For example:**   If I have a file called `hello-world.txt`, and I build a symbolically linked file pointing to it,               ln -s /path/to/hello-world.txt /path/to/symlink      I can not change the contents of the `symlink` without changing `hello- world.txt`, as well as changing all of the other files that point to `hello- world.txt`. I realize that symbolically/hard linked files are suppose to remain the same(because they are the same file in a sense), but it would be great, if I could write a file that references a particular file, and then also provides change details that get applied every time the file is read. I tried to create my own file type using plain text that looked like this:               /path/to/file/being/referenced     change statement     change statement     ...      I would then give these files their own file extension and mime type, and create an intermediate program to redirect to the referenced file, and basically try to mimic the behavior of a symbolic link. The problem is, the file doesn't "really" reference another file, and so actually reading the file(by using the cat command, or having a c++ processor pull in the file, etc), will not get the same information back that a symbolically linked file would. I'm not sure if I can provide a hook for this kind of thing, and have a program output the correct text for whatever is reading it. Maybe something with piped files? I dunno. What would be the best way to achieve this kind of behavior on the file system? Perhaps an analogy that best describes the kind of dynamic capabilities I want files to have, is how php files work on the web. The same file can be referenced using additional parameters, and that changes the contents of a file read by the user.


title: Automounting with udev takes too much time

text: Specifically, using udev to automount usb memory sticks takes about 3-4 seconds according to its own logs. It may not sound like that much, but it is on an embedded distribution for a system that previously used a much lighter OS where they where ready to use at less than 1 second. I do not have to make it that fast, but it is currently slow enough to annoy the users of the system. In short, what options do I have when it comes to speeding it up?


title: is my linux ARM 32 or 64 bit?

text: under an intel I know I can look at the outcome of `uname -m` to know if my OS is 32 or 64 bit, but under ARM this gives:               armv7l      I deduced from               file /usr/bin/ls      that I'm on a 32-bit OS, but how can I know this in an easier way?


title: Local DNS rewrite from host to host for web requests

text: Is there some de-facto way for rewriting certain hostnames to other ones? Something like `/etc/hosts` for host to host instead of ip to host. Is this possible or should I create a local dns cname for that host? **Update regarding the comments** I want to use the local name that resolves to remote domain. The browser is just an example. I'm actually writing an ios app that requests resources from the internet, but I'd like to use local name for simulator-only runs. So to put it in another way I want my app to request http://localalias/, but that system would actually fetch http://remotehost.com/.


title: Find connections per ip on an OpenWRT router?

text: How can I list the number of connections per client on the `FORWARD` chain of an OpenWRT router? I know how to list the number of connections per IP address on the router:               netstat -ntu | tail -n +3 |       # list open TCP and UDP connections     awk '{print $5}' | cut -d: -f1 |  # extract client IP addresses     sort | uniq -c | sort -nr         # show number of occurrences and sort by it      I want to do the same with connections that are going through the router's `FORWARD` chain.


title: Limit the max connections per IP using OpenWRT?

text: Would the following `iptables` command on an OpenWRT router assure that no one client has more than 50 active connections?               $ iptables -I FORWARD -m connlimit --connlimit-above 50 -j REJECT --reject-with tcp-reset     iptables v1.4.6: Couldn't load match `connlimit':File not found      If so, what package do I need to install to be able to use `--connlimit`?


title: Installing developer libraries for Fedora 19 without internet connection

text: I am trying to use Fedora 19 on my Lenovo yoga 13. A common issue with this setup is that the laptop's wifi does not work out of the box on any linux distribution yet. This question and also this question is very similar to mine, in which the askers found working wlan drivers but had trouble installing them. However, in my scenario to `make & make install` the driver, I apparently need the following packages:               kernel-headers kernel-devel gcc patch      Because I don't have working wireless or an ethernet port, I effectively can not use `yum` to install these from the internet. I have attempted downloading the rpm packages myself on another machine, transferring them via a flash drive, and using `rpm -Uhv` to install each one, but they appear to need endless dependencies that I do not have from installing Fedora 19 via a live USB. I gave up after a few hours of trying to navigate these lists of dependencies. Is there a better way of installing required development packages in order to install a driver when I have no internet connection?


title: Run nvm (bash function) via sudo

text: I want to write a init script that should basically run               nvm use v0.11.12 && forever start /srv/index.js      as the user `webconfig`. `nvm` is a shell function that is declared in `~webconfig/.nvm/nvm.sh`, which is included via `source ~/.nvm/nvm.sh` in `webconfig`'s `.bashrc`. I tried the following:               sudo -H -i -u webconfig nvm          echo "nvm" | sudo -H -i -u webconfig      but they fail with > -bash: nvm: command not found   >  -bash: line 1: nvm: command not found When I run `sudo -H -i -u webconfig` and enter `nvm` manually in that shell, it works. What am I doing wrong?


title: Script from cron doesn't create archive

text: I'm using:               # cat /etc/redhat-release     CentOS release 6.4 (Final)      Have an script in user's crontab:               $ crontab -l     0 7 * * * /home/teamcity/scripts/TC_backup.sh      If I run this script under this very user - it's create needed archive:               $ /home/teamcity/scripts/TC_backup.sh     ...      And from local-scripts-log:               $ cat /var/log/teamcity_backup.log | tail -n 20     Exporting TeamCity data directory: Exporting build logs     Exporting TeamCity data directory: Exporting personal changes     Finalizing export...     Export has completed successfully.     Backup file created: /home/teamcity/backups/TeamCity_20140117_172034.zip     Backup finished     Done.                  Free disc space: 147G;        Used disc space: 125M.                  Last archives available:          55M Jan 17 17:21 TeamCity_20140117_172034.zip     55M Jan 17 17:14 TeamCity_20140117_171318.zip     16M Dec 17 18:43 TeamCity_20131217_184333.zip             Backup finished at 2014-01-17--17-21      And have files:               $ ls -l /home/teamcity/backups/     total 127656     -rw-rw-r-- 1 teamcity teamcity 16777213 Dec 17 18:43 TeamCity_20131217_184333.zip     -rw-rw-r-- 1 teamcity teamcity 56914703 Jan 17 17:14 TeamCity_20140117_171318.zip     -rw-rw-r-- 1 teamcity teamcity 57022673 Jan 17 17:21 TeamCity_20140117_172034.zip      But - I haven't any `*.zip` from other days. In cron-log I see that script started without errors:               Jan 12 07:00:01 lms-teamcity CROND[11878]: (teamcity) CMD (/home/teamcity/scripts/TC_backup.sh)      Contents of the script:               BDIR="/home/teamcity/backups/"     LOGFILE="/var/log/teamcity_backup.log"     ARHNAME="TeamCity"     backup () {         /home/teamcity/TeamCity/bin/maintainDB.sh backup --all -M -F $BDIR/$ARHNAME >> $LOGFILE     }     backup      What can be the cause? UPD: 2> errorlog.file doesn't give result:               $ crontab -l     0 7 * * * /home/teamcity/scripts/TC_backup.sh 2> /var/log/teamcity_backup_error.log          $ file /var/log/teamcity_backup_error.log     /var/log/teamcity_backup_error.log: empty      In cron-log also no any errors:               ...     Jan 20 09:00:01 lms-teamcity CROND[24816]: (setevoy) CMD (/home/setevoy/scripts    /db_con_test-4.sh)     Jan 20 09:00:01 lms-teamcity CROND[24818]: (teamcity) CMD (/home/teamcity/scripts/TC_backup.sh 2> /var/log/teamcity_backup_error.log)     Jan 20 09:00:01 lms-teamcity CROND[24817]: (root) CMD (/usr/lib64/sa/sa1 1 1)     ...


title: Is there an easy way to programmatically extract IP address?

text: Is there an easy way to programmatically extract IP address, without tedious parsing of `ifconfig`? I would not mind simple command output processing using `sed` to do it but not processing multiline files from `/etc` some place. What I am trying to do is modify my `.bashrc` to display the IP address of the host in the greeting message. I am using `Ubuntu 12.04` but decided to post here instead of the Ubuntu forum because I consider this to be not distro-specific.


title: Clearing the "old" scrollback buffer

text: This might seem to be a duplicate question but it isn't. I know that I can use `printf "\033f"` to clear the scrollback buffer of the "current" session but that doesn't work for old sessions. My problem is I access several VM's through XVP viewer (a java web browser based VNC) and if I don't make a effort to clear the screen before logging out every time everything can be viewed by scrolling the screen. Please suggest a way to clear this old scrollback buffer. PS: Rebooting clears it but I can't do that on production VMs


title: How do I filter a glob in zsh

text: Basically I can use a glob in zsh to a list. Often, it turns out, I would like to filter that list, grep'ishly I'm wondering though, if I need to do that. Does zsh have a method to filter a list? I fear this is an obvious question, but it's a low yield day today, mentally.


title: Linux mint 12: change default editor and terminal

text: I have the sublime text editor located in `usr/bin`. How can I make it the default editor so I can do `sublime /var/www/test.php`? And can I change the default terminal to `yakuake`?


title: Screen caption custom colors

text: I am having trouble customizing the color of my caption in screen. I can use the 8 standard colors supported (as well as their brighter versions), but I am unable to define a custom color. The docs for screen state: "Colors are coded either as a hexadecimal number or two letters". It does not seem to define anywhere what format to write the hex number in. I have tried several random ways but so far none seem to work. Does anyone know how to use a custom color in screen?


title: qt related catastrophic crash in OpenSCAD

text: When using OpenSCAD, if I try to "Save As" or "Open" then OpenSCAD vanishes along with my work without giving so much as even an explanation (wow I miss those Windows error dialogs sometimes!) I launched OpenSCAD from the console to see if it would give me any useful messages and I get the following:               OpenGL Program Link OK:     Vertex shader(s) linked, fragment shader(s) linked.     OpenGL Program Validation results:     Validation successful.     Cannot mix incompatible Qt library (version 0x40805) with this library (version 0x40804)     Aborted (core dumped)      I'm running under KDE/Arch Linux, and suspect this is some Qt issue hence posting here rather than the OpenSCAD forums. * * * `kwin --version` gives:               QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.     Qt: 4.8.5     KDE Development Platform: 4.11.3     KWin: 4.11.3      * * * None of the `qt*` commands respond to `--version`, but I have the following info: `pacman -Qi qt3`: 1:3.3.8b-7 `pacman -Qi qt4`: 1:4.8.5-6 `pacman -Qi qt5-base`: 5.1.1-5 * * * I'm guessing that some qtN package is a slightly different version to the rest of my qtN installation and that is why OpenSCAD is suffering from SIDS - so I have `yaourt` re-installing qt3, qt4, qt5 all from source while I type this. Is the update/reinstall likely to work? Are there any better solutions? Also, is the `session D-Bus connection` issue something that I should worry about?


title: Nameservers setup in CentOS 6

text: I have a domain registered externally from where I have my VPS, but I need to connect these two in order to have the domain forward to my host. I know that I have to take my host's nameservers and replace them at my Domain Registrar's website. The question is: Where do I get my nameservers?... I've read about `/etc/resolv.conf` and I actually added my nameservers there like this:               ns1.mywebsite.org 8.8.8.8     ns2.mywebsite.org 8.8.4.4      The IPs are actually like that, I didn't know with what to replace them. So how do I set up my nameservers correctly and have the domain point to my host? **P.S: I'm using Webmin to manage my VPS.**


title: How can I make VIM a full fledged IDE

text: How could I make VIM a full fledged IDE by using different supported plugins for YUI, JQuery and git integration etc.


title: How to soft kill gui applications via terminal?

text: Is there a way to close a GUI application in friendly " _please quit yourself now_ " way, without graphical access to the applications window? For example, if Gnome/X display crashes to black, I'd like to switch to tty2 and close applications like firefox in a way which lets them save their config etc. At best without further user queries.


title: Cifs mount a windows share that goes offline

text: I have a windows share on my workstation that I need on my CentOS 7 server. I have this set up in my fstab as the following: `//XXX.XXX.X.XX/Share /mnt/workstation cifs username=X,password=X 0 0` This is working as long as my workstation is online. Once my workstation is offline it'll give errors on the /mnt/ directory and WinSCP will not connect. I have to umount the share and remount it for it to work again. Is there a better way to do this instead of remounting the drive every time?


title: List available updates but do not install them

text: I want my cron-run reporting script to notify me in case there are updates for my packages. Is the a way to make `apt-get` give me the list of available updates but don't do anything more?


title: Choose other timezone when install Debian?

text: ![screenshot](http://i.stack.imgur.com/b3myZ.png) Why can't I select English and choose timezone outside US?


title: md5sum command binary and text mode

text: The GNU `md5sum` command has two modes: _binary_ mode and _text_ mode. I guess the difference is only on how newline characters are handled? Am I right? On GNU/Linux, the two modes always produce same result, so the only use of `-b` and `-t` options is to indicate the flag (`*` or ``) used before the file name? In what circumstances can the modes produce different results? On Windows/MacOS systems? (Versions for these platforms available?)


title: Fedora 12 No wireless networks detected

text: I have just bought a Dell Inspiron 1510 and loaded Fedora 12 along with Windows. I cannot detect any wireless networks through my network applet on the tool bar.               $:lscpi     12:00.0 Network controller: Broadcom Corporation Device 4727 (rev 01)     13:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8101E/RTL8102E PCI Express Fast Ethernet controller (rev 02) I installed the following rpms:               kmod-wl-2.6.31.5-127.fc12.i686.PAE-5.10.91.9.3-3.fc12.6.i686     kmod-wl-PAE-5.10.91.9.3-3.fc12.6.i686     broadcom-wl-5.10.91.9.3-1.fc12.noarch and restarted the system but it still doesn't work.


title: Escape sequences with "echo -e" in different shells

text: I just noticed that it seems like the flag `-e` does not exist for the `echo` command in my shell on Linux. Is this just a messed up setting or is it "normal"? Some code as an example:               #!/bin/sh     echo -e "\e[3;12r\e[3H"      Prints:               -e \e[3;12r\e[3H      This worked before! I guess some `stty` commands went terribly wrong and now it does not work anymore. Somebody suggested that my `sh` was actually just `bash`.


title: Mount MTP device in FreeBSD

text: I have an Android tablet which uses MTP instead of USB Mass Storage for transferring files. I'd like to mount it in a FreeBSD machine. I tried the method described here.   1. I installed mtpfs by going to `/usr/ports/sysutils/mtpfs` and running `make install clean` as I usually do to install ports.   2. I enabled FUSE support by adding `fusefs_enable="YES"` in `/etc/rc.conf`.   3. I also added `fuse_load="YES"` to `/boot/loader.conf`. (This is not in the original procedure, I was trying to get it to work)   4. Added `vfs.usermount=1` to `/etc/sysctl.conf`.   5. After that, I rebooted the machine. I tried to mount the tablet by running `mtpfs /mnt/`. As a non privileged user I receive a 'Permission denied' message. As root it apparently works. But cd'ing into the directoy I receive a 'Not a directory' message, which is the same problem described in the linked thread. I'm assuming there is something left out of the original instructions. If there's any alternative to mtpfs, I'm also interested in hearing about that.


title: How do I reset a USB device using a script?

text: I have a USB GSM modem that does not always work property (Huawei E367u-2) Sometimes it gets reset (USB device disconnect/reconnect in logs) and when it comes back up, it has different ttyUSB numbers. Sometimes on boot, usb_modeswitch seems to just not get fired. The computer is a Raspberry Pi running Raspbian. I have a simple solution to this, every minute `cron` runs the following script:               If WVDIAL is not running:         Run WVDIAL      I want to change the script to be this:               If /dev/ttyUSB0 is not present:         If DevicePresent(12d1:1446):             ResetDevice(12d1:1446)         ElseIf DevicePresent(12d1:1506)             ResetUSB(12d1:1506)     If WVDIAL is not running:         Run WVDIAL      Obviously this is pseudo-code, but I have the following lines that I need to string together but I can't figure out how: This loads wvdial if it is not running:               #! /bin/sh      # /etc/init.d/wvdial          ### BEGIN INIT INFO     # Provides:          TheInternet     # Required-Start:    $remote_fs $syslog     # Required-Stop:     $remote_fs $syslog     # Default-Start:     2 3 4 5     # Default-Stop:      0 1 6     # Short-Description: Simple script to start a program at boot     # Description:       A simple script from www.stuffaboutcode.com which will start / stop a program a boot / shutdown.     ### END INIT INFO          # If you want a command to always run, put it here          # Carry out specific functions when asked to by the system     case "$1" in       start)         echo "Starting GPRS Internet"         # run application you want to start         /sbin/start-stop-daemon --start --background --quiet --exec /usr/bin/wvdial internet         ;;       stop)         echo "Stopping GPRS Internet"         # kill application you want to stop         /sbin/start-stop-daemon --stop --exec /usr/bin/wvdial          ;;       *)         echo "Usage: /etc/init.d/noip {start|stop}"         exit 1         ;;     esac          exit 0      This lets me find the `/sys` path to a certain device:               for X in /sys/bus/usb/devices/*; do         echo "$X"         cat "$X/idVendor" 2>/dev/null         cat "$X/idProduct" 2>/dev/null         echo     done      And this resets a USB device if you know the correct /sys path:               echo 0 > /sys/bus/usb/devices/1-1.2.1.1/authorized     echo 1 > /sys/bus/usb/devices/1-1.2.1.1/authorized      So, I need to string the last 2 sections and a test to `/dev/ttyUSB0` into a section that goes under the "If you want a command to always run. put it here" section   * How can I do that?   * Is there a better way to do this?


title: Shell spawned backgrounded process is still hanging

text: It seems processes spawned after `||` make the parent shell hang with them. For example, do in your terminal               $ cat <<"EOF" >/tmp/hello_im_still_here     #!/usr/bin/env bash     killall emacsclient     pgrep emacsclient || emacsclient -c &     EOF     $ chmod +x /tmp/hello_im_still_here     $ ./tmp/hello_im_still_here      and check it               $ pstree | grep emacsc          |-hello_im_still_---emacsclient      Changing the line forking the process to               pgrep emacsclient || (nohup emacsclient -c) &      doesn’t help.


title: Kernel module blacklist not working

text: I'm trying to figure out how to blacklist modules, and I'm trying it on the usb storage. Unfortunatelly it seems ot have no effect, and I get the module in even if it's not used (apparently). My experiment is taking place on an Ubuntu 12.04.3 LTS.               raptor@raptor-VirtualBox:/etc/modprobe.d$ lsmod | grep usb     usb_storage            39720  0      usbhid                 46054  0      hid                    82511  2 hid_generic,usbhid     raptor@raptor-VirtualBox:/etc/modprobe.d$ cat blacklist.conf | grep usb     blacklist usb_storage     blacklist usbmouse     blacklist usbkbd


title: Decoding "prog > file 2>&1"

text: I am having some difficulty understanding the construct `prog > file 2>&1`. I have read that it means "Send _stdout_ and _stderr_ to file". But my question is how? I understand that `prog > file` basically sends _stdout_ to file. I also understand that `prog 2>&1` means that the _stderr_ should be sent to _stdout_. But I am not able to connect the dots for `prog > file 2>&1`. Can experts here help me decode this.


title: How to install RPM package on Angstrom

text: I'm using an embedded system with the Angstrom distribution on it. Now i'd like to configure a GPRS-Modem for it. So I downloaded the linux-driver from the homepage of the manufacterer to install it on my embedded system. But the package is a RPM-File, and the readme-file gives me the command:               rpm -ivv <packagename>          But there is no "rpm" command on my embedded-system (only opkg), and this isn't working for a rpm package. Help would be greatly appreciated.


title: What does the command "chattr +c /some/dir/" do?

text: I'm trying to keep a bunch of plain text files compressed using the extended attribute option - `c` on a debian ppc64 system. I ran the following commands:               # mkfs.ext4 /dev/test/compressed     # mount /dev/test/compressed /mnt/compressed/     # mkdir /mnt/compressed/some/txts/     # chattr +c /mnt/compressed/some/txts/     # df -l          # cp /some/txts/* /mnt/compressed/some/txts/     # sync     # df -l      To my surprise, the output of `df -l` tells me the files I copied weren't compressed at all. I also tried to mount the test file system with the option `user_xattr` and I tried creating it with `mkfs.ext4dev`, but neither worked. I also checked the output of the commands `lsattr /mnt/compressed/some/txts/`; every line has a `c` in it. Did I miss something? How come the xattr option `c` doesn't work as expected?


title: How can I use SED or AWK to replace placeholders in a template file with variable content that contains special characters?

text: CentOS 6.3 I'm trying to get a small script to send an email containing a copy of email headers in the body (for the purpose of internal reporting). The template file contains the following:               Alert Report          Alert has triggered at TMPDATE          HEADERS     -------     TMPHEADERS          SOURCE IP     ---------     TMPSOURCEIP      I want my script to find and replace the "TMP" place holders with actual information relevant to the alert. The date and source IP variables seem to work fine but if/when I try to find/replace the TMPHEADERS, it causes strange symptoms including the entire output to be blank. I'm reasonably certain that it has to do with the headers containing lots of special characters (@ % & etc). Can someone please advise on how best to accomplish this via bash? My current code looks like this:               cat /test/emailtemplate | sed s/TMPHEADERS/"$HEADERS"/ > /test/output      ## UPDATE As per request, here's an example set of headers I'm trying to insert into the template file (IP addresses and email address have been changed to protect the innocent :-) ):               From foo@yahoo.com Thu Apr 25 20:18:19 2013     Return-Path: <foo@yahoo.com>     Received: from nm30-vm0.bullet.mail.ne1.yahoo.com (nm30-vm0.bullet.mail.ne1.yahoo.com [98.138.11.36])     by serv.example.com (8.14.4/8.14.4) with ESMTP id r3Q3IJVV009411     for <test@example.com>; Thu, 25 Apr 2013 20:18:19 -0700     Received: from [108.108.108.108] by nm30.bullet.mail.ne1.yahoo.com with NNFMP; 26 Apr 2013 03:18:19 -0000     Received: from [98.138.87.11] by tm15.bullet.mail.ne1.yahoo.com with NNFMP; 26 Apr 2013 03:18:17 -0000     Received: from [127.0.0.1] by omp1001.mail.ne1.yahoo.com with NNFMP; 26 Apr 2013 03:18:17 -0000     X-Yahoo-Newman-Property: ymail-3     X-Yahoo-Newman-Id: 92334348.43667.bm@omp10122422401.mail.ne1.yahoo.com     Received: (qmail 29701 invoked by uid 65501); 26 Apr 2013 03:18:17 -0000     DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1366946297; bh=yjMzVONHAyJxQob7tLNdIN2RpfGHWVw1Kb5Qr+enYF8=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type; b=CQGilBx8NertE4j75dsfsdfs+IKRzIx5vlH5YdzqFLd4ThfEyMs11sdfsdfsdXsAH1yteACnwSER+QXJQ80BfLGbJnIWm+29I8A4geOPIHGKoOUCnPaD+/0bHfAps0JIcwEju8Tcvg4VDVWw=     DomainKey-Signature:a=rsa-sha1; q=dns; c=nofws;     s=s1024; d=yahoo.com;     h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type;     b=5TIRL55VM2J2lPLsX9iCE4sdlkfjlEM2245M6qzg1oGrnZd61ykL4xQSsc3cYNz95fwNy67aRRC89n6xcti28ee5rjmlK0MDIskSB5sKlv165mNjmzF1LNx6uFXalI8QGSwiQt2uWLYvI7RrTVeZFELDfFVZyqygEl5k=;     X-YMail-OSG: EDT4ym4VM1lVQMdtAQ5zqfE59jR1Mtip4vVL1fBzNxFdGvA     YjAJ3MXC1EusloknrsPx3drxzR1b4PFErK.UhdgWePhK7TTCHhhju4XP4i7x     76WASceqp77T5itvZmilv5UuICJw3BCEd0fdADctfBYhLNwoALxjp6cnJMmE     Z4dYVtlp5vUFqg1pHxqGOXqrtjeZffM4dMftnn.Q8LlVEkj3pZ6ZJV_kKFtj     vGEGS5PAW0tIHWPEqVERYzmDOfF5sVSQLayPi6EM_i1OE038434laijEWbH0     nZt1Vkg3syO0t1BaTLN4B1bXeS8cv3GlbLO4ot7zVwA3sH4UhsC5M6xiWNFU     3iroObJ5BObL99VO3ktvC4KzekAWJ_fE85TQJhQKj6Iolgb4xlWa2x414xuA     awO4pJI9grDjycUcmhmKwLZEt_.0OBLfSi5MSviaiCNMuU5qIdHm7VCGdORP     Mc68rDkpmJE9I9Z.QZfhH5cFxqqmpyIOMTs0iIBGYz5d9QHMWCuo-     Received: from [102.102.102.102] by web12341105.mail.ne1.yahoo.com via HTTP; Thu, 25 Apr 2013 20:18:17 PDT     X-Rocket-MIMEInfo: 002.001,VGVzdGluZyAxMjMgTGEgbGEgbGEBMAEBAQE-     X-Mailer: YahooMailWebService/0.8.141.536     Message-ID: <136634397.44849.YahooMailNeo@web126205.mail.ne1.yahoo.com>     Date: Thu, 25 Apr 2013 20:18:17 -0700 (PDT)     From: Test Account <foo@yahoo.com>     Reply-To: Test Account <foo@yahoo.com>     Subject: Test     To: "test@example.com" <test@example.com>     MIME-Version: 1.0     Content-Type: multipart/alternative; boundary="102743210-1541163991-1366946297=:49149"


title: Is there a way to redirect requests from foo.com to a VM on that server?

text: I saw a tutorial about redirecting client requests to a specific port to a VM inside the server using IPTables. Is there a way to redirect client requests for foo.com to a VM using only IPTables? or should I go for squid proxy server?


title: ld-uClibc.so missing

text: I am trying to run an executable on Angstrom Linux, but ash tells me               -sh: ./myEx: not found      I've checked with readelf the program interpreter and it is               root@beagleboard:~# readelf -l myEx | grep interpreter       [Requesting program interpreter: /lib/ld-uClibc.so.0]      This program interpreter is missing. I've tried to symbolic link `ld- linux.so.3` to `ld-uClibc.so.0` but I think it's not correct and with no good results. I don't know where to install that or if I have to cross compile it from sources.


title: extracting ip address from a file

text: I'm trying to extract all the IP address from a file. **FILE**               *>i85.95.2.160/29   172.16.24.4              0    200      0 64515 4445 15412 i     *>i85.112.80.0/28   172.16.24.4              0    200      0 6774 64521 i     *>i85.112.80.96/27  172.16.24.4              0    200      0 6774 64521 i     *>i85.115.64.96/27  172.16.24.4              0    200      0 2300 64961 i      **OUTPUT**               85.95.2.160     85.112.80.0     85.112.80.96     85.115.64.96      This is what I have so far:               $ awk < ips '{ print $1 }' grep -Eo '([0-9]{1,3}\.){3}[0-9]{1,3}' ips | sort | uniq      The problem is that from the list of IP addresses it goes from the beginning up to:               84.241.254.8/29      It does not extract any of the following ip addresses:               84.241.254.32     85.115.240.0     91.232.100.72     103.248.251.48     121.58.160.79     160.218.26.16     200.6.224.96     223.255.231.240      Any ideas why these aren't getting extracted?


title: Is there any alternative to genext2fs in RHEL?

text: I am tryting to make initrd file system following [this tutorial][1] My host system is RHEL 6 64 bit. I am unable to get the required command: `genext2fs` No rpm is available for it, neither yum is helping me. I hope there is an alternate to this command.


title: My server processes die some time

text: Someone who could tell me what is happening? I count as a web server:   **Debian 7.4   1 TB HDD   2 GB RAM   Processor Intel 2399.998 MHz      ** This server is used for Web services, because every so often I have start the service MySQL, Apache etc ... by dying. And my problem is that I automatically kills processes. What can it be?


title: Compile source with later libraries on one server and use the binary on an older server

text: I may have a noob question regarding the compiling software from source. I need the latest `libpcre3-dev` library to compile a software from source, however, the current distribution of the OS (Ubuntu) on my server only has the older version of `libpcre3-dev` and no backport is available. I am thinking to compile the binary on a separate server with the latest version of `libpcre3-dev` and install the binary back to my actual server. I have two questions:   1. Does this work? My main concern is that the `libpcre3` on my server is still the older version, does the binary still need the latest corresponding `libpcre3` at runtime even if it is compiled with the latest `libpcre3-dev`?   2. What is the best way of installing the binary back to my server? Simply copy the binary or make it into a `.deb` package and then install using the package manager (if possible)?


title: Change colors for the Pantheon terminal emulator

text: I am using Elementary OS (based on Ubuntu 12.04) and I would like to change the coloring scheme for Pantheon Terminal window. Here's what I've tried:   1. Elementary Tweaks   2. Dconf Editor   3. shell commands               $ gsettings set org.pantheon.terminal.settings background '#090911111a1a'      $ gsettings set org.pantheon.terminal.settings foreground '#d9d9e6e6f2f2'      $ gsettings set org.pantheon.terminal.settings palette '#000000000000:#acac6d6d7474:#7474acac6d6d:#acaca4a46d6d:#6d6d7474acac:#a4a46d6dacac:#6d6dacaca4a4:#e6e6e6e6e6e6:#262626262626:#d6d6b8b8bcbc:#bcbcd6d6b8b8:#d6d6d3d3b8b8:#b8b8bcbcd6d6:#d3d3b8b8d6d6:#b8b8d6d6d3d3:#ffffffffffff'      None of those things worked. This is what I would like to use: https://github.com/Mayccoll/Elementary-OS-Terminal-Colors


title: 2.6.35 usb-serial kernel patch

text: I am working with an ARMV71 chip, with embedded Debian 2.6.35.9 - However, the entire source tree of linux-source-2.6.35-9/drivers/usb/serial seems to be buggy. Trying to make the module "usbserial.ko" and "qcserial.ko" - in order to access a wwan card - fails. I am following this tutorial and the make command produces this :               [snip]     drivers/usb/serial/usb-serial.c:959: error: 'struct usb_serial_port' has no member named 'write_urbs'     drivers/usb/serial/usb-serial.c:959: error: 'struct usb_serial_port' has no member named 'write_urbs'     drivers/usb/serial/usb-serial.c:959: warning: type defaults to 'int' in declaration of 'type name'     drivers/usb/serial/usb-serial.c:959: warning: type defaults to 'int' in declaration of 'type name'     drivers/usb/serial/usb-serial.c:959: error: negative width in bit-field '<anonymous>'     drivers/usb/serial/usb-serial.c:960: error: 'struct usb_serial_port' has no member named 'write_urbs_free'     drivers/usb/serial/usb-serial.c:960: error: 'struct usb_serial_port' has no member named 'write_urbs_free'     drivers/usb/serial/usb-serial.c:961: error: 'struct usb_serial_port' has no member named 'write_urbs'     drivers/usb/serial/usb-serial.c:962: error: 'struct usb_serial_port' has no member named 'write_urbs'     drivers/usb/serial/usb-serial.c:967: error: 'struct usb_serial_port' has no member named 'bulk_out_buffers'     drivers/usb/serial/usb-serial.c:969: error: 'struct usb_serial_port' has no member named 'bulk_out_buffers'     drivers/usb/serial/usb-serial.c:974: error: 'struct usb_serial_port' has no member named 'write_urbs'     drivers/usb/serial/usb-serial.c:977: error: 'struct usb_serial_port' has no member named 'bulk_out_buffers'     drivers/usb/serial/usb-serial.c: In function 'fixup_generic':     drivers/usb/serial/usb-serial.c:1334: error: 'struct usb_serial_driver' has no member named 'process_read_urb'     drivers/usb/serial/usb-serial.c:1334: error: 'struct usb_serial_driver' has no member named 'process_read_urb'     drivers/usb/serial/usb-serial.c:1334: error: 'usb_serial_generic_process_read_urb' undeclared (first use in this function)     drivers/usb/serial/usb-serial.c:1334: error: (Each undeclared identifier is reported only once     drivers/usb/serial/usb-serial.c:1334: error: for each function it appears in.)     drivers/usb/serial/usb-serial.c:1335: error: 'struct usb_serial_driver' has no member named 'prepare_write_buffer'     drivers/usb/serial/usb-serial.c:1335: error: 'struct usb_serial_driver' has no member named 'prepare_write_buffer'     drivers/usb/serial/usb-serial.c:1335: error: 'usb_serial_generic_prepare_write_buffer' undeclared (first use in this function)     make[1]: *** [drivers/usb/serial/usb-serial.o] Error 1     make: *** [_module_drivers/usb/serial] Error 2     [snap]      Turns out, these are know errors. I tried to update my system, but i have to go on with the supplied kernel image, as uboot is not detecting the new kernel (3.2.0), keepson booting the 2.6.35 one. Therefore, i think i am in need of patches - which i can not simply find in google. Please help me to find the patches.


title: How can I create a hard to kill process

text: I want to create a program that will be difficult to stop (even for the administrator) once it is started (with root privileges). Once started the process should continue to start itself at startup until asked to stop. The stopping process should take some time (I.e. should be expensive). I know this may sound like a malicious software, but I want it for a genuine reason. I want to run site blockers on my Laptop (on which I am the admin). And I want to make it difficult for myself to stop them. The solution that I thought of is the following-   1. The process should run with a different name each time it is run, so that I cannot predict the process name and kill it.   2. The process will save itself in /etc/rc5.d at shutdown   3. The process will encrypt its name using a cypher in some known location. The stopping process will have to use bruteforce to recover the program name and kill it. I would like to find a good solution for this task.


title: Why is there Apple copyright on lpadmin, lpq and lpstat pages?

text: I am on Ubuntu 12.04. Why do lpadmin,lpq, lpstat man pages have Apple copyright on them?


title: 43 seconds to mount swap on /dev/mapper/cryptswap1

text: My Linux Mint takes longer than I would expect it to boot. Checking `dmesg` I see the following consecutive entries:               [    8.335668] Adding 9767484k swap on /dev/mapper/cryptswap1.  Priority:-1 extents:1 across:9767484k SS     [   51.030010] EXT4-fs (sdc): mounted filesystem with ordered data mode. Opts: user_xattr      I suspect the `Adding [...]` operation is taking a long time, from what I'm interpreting from this log. "Should" this take so long to complete? Does this perhaps indicate an issue with mounting?


title: How to understand why the packet was considered INVALID by the `iptables`?

text: I set up some `iptables` rules so it logs and drops the packets that are INVALID (`--state INVALID`). Reading the logs how can I understand why the packet was considered invalid? For example, the following:               Nov 29 22:59:13 htpc-router kernel: [6550193.790402] ::IPT::DROP:: IN=ppp0 OUT= MAC= SRC=31.13.72.7 DST=136.169.151.82 LEN=40 TOS=0x00 PREC=0x00 TTL=242 ID=5104 DF PROTO=TCP SPT=80 DPT=61597 WINDOW=0 RES=0x00 ACK RST URGP=0


title: How to allow access to a directory and don't allow access to a sub-directory in Apache?

text: I have asked this question on apache mailing-list but I didn't get the answer I want. I want to allow a directory " /var/www/html/ldap" to two users according to IPs (192.168.1.2 192.168.1.7):               <Directory /var/www/html/ldap>           Order allow,deny           Allow from 192.168.1.2 192.168.1.7           Satisfy any           AuthName "LDAP Authentication"           AuthType Basic                AuthBasicProvider ldap           AuthzLDAPauthoritative off           AuthLDAPURL ldap://192.168.1.3/dc=example,dc=com?uid?sub?(objectClass=*)           Require valid-user     </Directory>      but I don't want to allow a sub directory to 192.168.1.7 (I want it to be allowed only to 192.168.1.2): I have tried to add:               <Directory /var/www/html/ldap/manager>           Order allow,deny           Allow from 192.168.1.2           Satisfy any           AuthName "LDAP Authentication"           AuthType Basic                AuthBasicProvider ldap           AuthzLDAPauthoritative off           AuthLDAPURL ldap://192.168.1.3/dc=example,dc=com?uid?sub?(objectClass=*)           Require valid-user     </Directory>      but it seems that 192.168.1.7 can reach to manager directory because it is a part of ldap directory, how can I forbid this? UPDATE: as Raza suggest I have tried to something like that: for the main directory:                <Directory /var/www/html/ldap>               Order allow,deny               Allow from 192.168.1.2 192.168.1.7               Satisfy any               AuthName "LDAP Authentication"               AuthType Basic                    AuthBasicProvider ldap               AuthzLDAPauthoritative off               AuthLDAPURL ldap://192.168.1.3/dc=example,dc=com?uid?sub?(objectClass=*)               Require valid-user         </Directory>      for the sub-directory:                <Directory /var/www/html/ldap/manager>               Order Deny,Allow               Deny From All               Allow From 192.168.1.2               Satisfy any               AuthName "LDAP Authentication"               AuthType Basic                    AuthBasicProvider ldap               AuthzLDAPauthoritative off               AuthLDAPURL ldap://192.168.1.3/dc=example,dc=com?uid?sub?(objectClass=*)               Require valid-user         </Directory>      Note: I don't want to be asked for authentication(LDAP AUTH) for both 192.168.1.2 and 192.168.1.7 on both directories (main-directory and sub-directory).


title: phpstorm 7 permission error

text: i have `phpstorm 7.1.4` `IDE` on `manjaro(arch base linux)`.   when i run `php` code with `phpstorm` on :               http://localhost:49193/ex.php      in page : `No input file specified.`   my code not run or execute. i check `phpstorm` output to find error and see this:               /usr/bin/php-cgi -e -b localhost:49193     PHP Warning:  Unknown: open_basedir restriction in      effect.File(/run/media/masoudjjgh/d2/kar/amlak/p.php5) is not within the allowed      path(s): (/srv/http/:/home/:/tmp/:/usr/share/pear/:/usr/share/webapps/) in      Unknown on line 0     PHP Warning:  Unknown: failed to open stream: Operation not permitted in      Unknown on line 0      i think problem with permission and i run it with `root` but still get this error.   now i think problem with `php-cgi` permission and i don't know how fix it.


title: Why are Linux installs bigger than I've read? Some beginner questions

text: 1. I've read in different textbooks that say Linux is light-weight(e.g. It could fit on a 1.4MB floppy). So why is the download from the Ubuntu or Fedora CD sized or larger?   2. Do the device drivers extend the kernel? For example: if I have new hardware and I have installed the device driver, will my kernel code get extended or is the driver installed as a service for the kernel to use?   3. When using a LiveCD such as Ubuntu, when system boots does all 700MB of the OS get loaded to RAM or just parts of it? I ask these questions because I feel they're common beginner questions and I think it would be good to have them all in one place.


What steps does the system go through when handling an SSH connection?   1. We try to log in via ssh   2. `sshd` starts pam and pam module to authenticate us   3. Depending on pam configuration, we need to provide username and password (pam checks `passwd` and `shadow` files)   4. pam checks for `hosts.allow/deny`, `/etc/shells`, and other things   5. If everything goes fine we are logged in   6. ???   7. Shell is started So my question is what mechanism is responsible for checking which shell is assigned to the user in their `passwd` file (in step 6)? Is it pam itself, some specific pam module, `sshd`, or something else? I know that I can replace the `passwd` file (for checking username and password) by writing a pam module, but how can I replace the `passwd` file for the shell entry?


title: Big tab spacings with Kate

text: Is there a way to configure Kate to use tab spaces of more than 16 spaces? I am using Kate to make up a tab separated file for import into a database and some of the data needs about 30 spaces between tab stops.


title: Why must loopback traffic be authorized using iptables to get web access?

text: I thought the following was necessary was necessary for outgoing HTTP on a desktop (non-server):               iptables -A INPUT  -p tcp -m multiport --sports 80,443 -m conntrack --ctstate ESTABLISHED -j ACCEPT     iptables -A OUTPUT -p tcp -m multiport --dports 80,443 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT      But, it turns out I need these two to make it work. I don't know why:               iptables -A INPUT -i lo -j ACCEPT     iptables -A OUTPUT -o lo -j ACCEPT      I know the last rule allows UDP to the `lo` interface. But, I thought all I needed was `outgoing TCP for NEW/ESTABLISHED connections` \+ `incoming TCP for ESTABLISHED connections`. It seemed counter-intuitive to me (because I'm still learning).


title: Is it safe to assume the tar.gz file is healthy?

text: I have a rather large tar.gz file (17GB) which is a tar.gz version of a directory. The problem here is I got the following message after the tar operation.               tar: Error exit delayed from previous errors      Now since it takes a long time to download, I just want to be sure that the file is healthy before downloading it. Is there a way to make sure of the file's integrity which does not take a lot of time? Currently all the checking solutions that I found take a lot of time to complete.


title: What would make the Simple Emacs Spreadsheet more newbie-friendly?

text: I am familiarizing myself with `ses` and I find that it's not very welcoming towards a new user. I am preparing to submit some sort of bug report or improvement suggestion, but I'm not really sure what would improve it. So far, things that I find unobvious, or confusing, or disturbing;   * `M-x apropos spreadsheet` returns nothing at all.      * I knew I had seen something about a built-in spreadsheet in Emacs somewhere recently. But what was it called again?     * Of course, most people have Google everywhere now, which is a good workaround. But what if you're trapped on a sinking submarine and all you have is Debian stable and no network?     * I'm not a heavy user of `finder-by-keyword` but I couldn't find it there either. It's not in "data" nor in "files". In desperation, I also looked in "tools" and "wp" but it's also not there.   * Running `M-x ses` in an existing buffer returns a disappointing error message.      * Not very surprising, but it would be nice if it could offer to create a new buffer?   * The link to `ses-example.ses` is not very helpful for finding out how to use it.      * This is the only "documentation" in the mode help! I expected the file to contain a simple tutorial, or at least a few lines of text explaining how to get started.     * Also, the fact that the file is in a read-only location makes it open in a mode where you can't edit it, thus cannot see how formulas etc. are done (without resaving in `/tmp` or something).   * It wasn't obvious at first how to enter text into a cell.      * (My sloppy brief check in the) Mode help indirectly suggested using the minus key to open up the cell's value for editing.     * Just typing something there results in `#######` though.     * Copy/paste from a piece of text I had in the clipboard did the same thing.     * For the record, `"` opens up the cell for text entry.     * Now that I know the answer, I see that in the mode help, I see that it's bound to `ses-read-cell` just like the minus and digit keys. But that's hardly very obvious!   * It wasn't obvious how to enter a formula into a cell.      * Now that I know the answer, I'm not entirely surprised ... but also not totally miffed.        * It would be nice if it knew that `=sum(` is something a naïve user might try?     * `(apply #'+ (ses-range A2 G2))` also resulted in `#######`       * ... because I had some empty cells in the range. Putting zeros there fixed it. To my mild surprise, I find that some spreadsheet conventions are firmly entrenched in my muscle memory, after actively doing everything in my power to avoid spreadsheets in general and Excel in particular since approcimately 1998. Still, my fingers expect `RET` to move to the next cell and `F2` to edit. But strictly speaking, I guess that's outside the scope of this discussion. I am on `emacs23` at the moment, so I will check whether any of this has improved in Emacs 24 before actually submitting anything anywhere. My strike plan so far:   * Revise the mode help documentation to add a few lines of basic instructions.   * Maybe also revise `ses-example.ses` to include some beginner notes?   * Propose an alias `spreadsheet-mode` to `ses-mode` in order to fix apropos.   * See if it's feasible to make empty cells count as zero?   * Maybe see if it wouldn't be too hard to put it somewhere reasonable in `finder-by-keyword`.   * Maybe try to live with the fact that `ses-mode` in an existing buffer works the way it does. Dear U.SE, thanks for being my rubber duck, and looking forward to any improvement suggestions from you. I hope this slightly fringe use of this site is tolerable.


title: Why is the output of find sorted in Cygwin but not in Solaris?

text: I wonder why `find` does not behave in the same way in Solaris as in Cygwin or Linux. I have a bunch of directories that have files called `CS##########`. Each `#` is a digits but there are always 10 digits after CS. When using `find` in Cygwin the list comes out ordered: `CS000000001` to `CS00002345`. When using `find` in Solaris the list come out completly unordered. I wonder if this is actually OS-related, or if it is due to the implementation of find.


title: How do I enable options for installed Ports in FreeBSD?

text: I installed the Vim editor using Ports and in the process didn't enable GTK2 or GNOME option. I assume that either these 2 options will let me use `gvim`. Here's my `pkg info vim`:               vim-7.4.430_1     Name           : vim     Version        : 7.4.430_1     Installed on   : Sun Sep  7 13:30:57 PHT 2014     Origin         : editors/vim     Architecture   : freebsd:10:x86:32     Prefix         : /usr/local     Categories     : editors     Maintainer     : sunpoet@FreeBSD.org     WWW            : http://www.vim.org/     Comment        : Improved version of the vi editor     Options        :             ATHENA         : off             CONSOLE        : on             CSCOPE         : on             EXUBERANT_CTAGS: on             GNOME          : off             GTK2           : off             LUA            : on             MOTIF          : off             NLS            : on             PERL           : on             PYTHON         : on      Now, I want to enable either the `GNOME` or `GTK2` option. I've tried `make deinstall` followed by `make reinstall` but I don't get the dialogs for choosing the options to enable just like I did when I installed Vim the first time. I've also tried `make deinstall` then `make install` but still no go.


title: Start different applications on second, third and fourth monitor

text: I've read some questions about running an application on the second monitor but none of the suggested options has worked for me. Besides that, I'm trying to run different applications no only in the second but also in the third and fourth monitor. I've tried               export DISPLAY=:0.1     export DISPLAY=:0.2     export DISPLAY=:0.3     export DISPLAY=:0.4     export DISPLAY=:1.1     export DISPLAY=:1.2     export DISPLAY=:1.3     export DISPLAY=:1.4      But none of them worked. Only               export DISPLAY=:0      works for monitor 1 However I found out that 'export DISPLAY:0' is relative to the monitor the mouse is located in. So if the mouse is in monitor 4 and I run 'export DISPLAY=:0' followed by, let say, 'eog image.jpg' it runs on that same monitor. Here is my running xorg.conf file. Perhaps someone can get some usefull information from it. It was generated by                   # nvidia-settings: X configuration file generated by nvidia-settings     # nvidia-settings:  version 304.64  (pbuilder@cake)  Wed Nov  7 10:04:06 UTC 2012          # nvidia-xconfig: X configuration file generated by nvidia-xconfig     # nvidia-xconfig:  version 304.48  (buildd@murphy)  Wed Sep 12 11:32:28 UTC 2012          Section "ServerLayout"              #Screen      4  "Screen4" RightOf "Screen3"         #Screen      5  "Screen5" RightOf "Screen4"         #Screen      6  "Screen6" RightOf "Screen5"         #Screen      7  "Screen7" RightOf "Screen6"     # Removed Option "Xinerama" "1"     # Removed Option "Xinerama" "0"         Identifier     "X.org Configured"         Screen      0  "Screen0" 0 0         Screen      1  "Screen1" RightOf "Screen0"         Screen      2  "Screen2" RightOf "Screen1"         Screen      3  "Screen3" RightOf "Screen2"         InputDevice    "Mouse0" "CorePointer"         InputDevice    "Keyboard0" "CoreKeyboard"         Option         "Xinerama" "1"     EndSection          Section "Files"         ModulePath      "/usr/lib/xorg/modules"         FontPath        "/usr/share/fonts/X11/misc"         FontPath        "/usr/share/fonts/X11/cyrillic"         FontPath        "/usr/share/fonts/X11/100dpi/:unscaled"         FontPath        "/usr/share/fonts/X11/75dpi/:unscaled"         FontPath        "/usr/share/fonts/X11/Type1"         FontPath        "/usr/share/fonts/X11/100dpi"         FontPath        "/usr/share/fonts/X11/75dpi"         FontPath        "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"         FontPath        "built-ins"     EndSection          Section "Module"         Load           "record"         Load           "extmod"         Load           "dbe"         Load           "dri2"         Load           "glx"     EndSection          Section "InputDevice"         Identifier     "Keyboard0"         Driver         "kbd"     EndSection          Section "InputDevice"         Identifier     "Mouse0"         Driver         "mouse"         Option         "Protocol" "auto"         Option         "Device" "/dev/input/mice"         Option         "ZAxisMapping" "4 5 6 7"     EndSection          Section "Monitor"         Identifier     "Monitor0"         VendorName     "Unknown"         ModelName      "LG Electronics LG TV"         HorizSync       30.0 - 83.0         VertRefresh     58.0 - 62.0     EndSection          Section "Monitor"         Identifier     "Monitor1"         VendorName     "Unknown"         ModelName      "LG Electronics LG TV"         HorizSync       30.0 - 83.0         VertRefresh     58.0 - 62.0     EndSection          Section "Monitor"         Identifier     "Monitor2"         VendorName     "Unknown"         ModelName      "LG Electronics LG TV"         HorizSync       30.0 - 83.0         VertRefresh     58.0 - 62.0     EndSection          Section "Monitor"         Identifier     "Monitor3"         VendorName     "Unknown"         ModelName      "LG Electronics LG TV"         HorizSync       30.0 - 83.0         VertRefresh     58.0 - 62.0     EndSection          Section "Monitor"         Identifier     "Monitor4"         VendorName     "Unknown"         ModelName      "LG Electronics LG TV"         HorizSync       30.0 - 83.0         VertRefresh     58.0 - 62.0     EndSection          Section "Device"         Identifier     "Device0"         Driver         "nvidia"         VendorName     "NVIDIA Corporation"         BoardName      "GeForce GT 610"         BusID          "PCI:1:0:0"         Screen          0     EndSection          Section "Device"         Identifier     "Device1"         Driver         "nvidia"         VendorName     "NVIDIA Corporation"         BoardName      "GeForce GT 610"         BusID          "PCI:1:0:0"         Screen          1     EndSection                    Section "Device"         Identifier     "Device2"         Driver         "nvidia"         VendorName     "NVIDIA Corporation"         BoardName      "GeForce GT 610"         BusID          "PCI:2:0:0"         Screen          0     EndSection                    Section "Screen"         Identifier     "Screen0"         Device         "Device0"         Monitor        "Monitor0"         DefaultDepth    24         Option         "Stereo" "0"         Option         "nvidiaXineramaInfoOrder" "DFP-0"         Option         "metamodes" "DFP-0: 1920x1080 +0+0; DFP-0: nvidia-auto-select +0+0; DFP-0: nvidia-auto-select +0+0; DFP-0: nvidia-auto-select +0+0; DFP-0: 1920x1080_60 +0+0; DFP-0: 1920x1080_60_0 +0+0; DFP-0: 1920x1080_60_1 +0+0; DFP-0: 1920x1080_60_2 +0+0; DFP-0: 1920x1080_30 +0+0; DFP-0: 1920x1080_24 +0+0; DFP-0: 1920x1080_60i +0+0; DFP-0: 1920x1080_60i_0 +0+0; DFP-0: 1360x768 +0+0; DFP-0: 1360x768_60 +0+0; DFP-0: 1280x1024 +0+0; DFP-0: 1280x1024_60 +0+0; DFP-0: 1280x720 +0+0; DFP-0: 1280x720_60 +0+0; DFP-0: 1280x720_60_0 +0+0; DFP-0: 1152x864 +0+0; DFP-0: 1152x864_60 +0+0; DFP-0: 1024x768 +0+0; DFP-0: 1024x768_60 +0+0; DFP-0: 800x600 +0+0; DFP-0: 800x600_60 +0+0; DFP-0: 720x480 +0+0; DFP-0: 720x480_60 +0+0; DFP-0: 640x480 +0+0; DFP-0: 640x480_60 +0+0; DFP-0: 640x480_60_0 +0+0; DFP-0: 640x480_60_1 +0+0"         SubSection     "Display"             Depth       24         EndSubSection     EndSection          Section "Screen"         Identifier     "Screen1"         Device         "Device1"         Monitor        "Monitor1"         DefaultDepth    24         Option         "Stereo" "0"         Option         "metamodes" "DFP-1: 1920x1080 +0+0; DFP-1: nvidia-auto-select +0+0"         SubSection     "Display"             Depth       24         EndSubSection     EndSection          Section "Screen"         Identifier     "Screen2"         Device         "Device2"         Monitor        "Monitor2"         DefaultDepth    24         Option         "nvidiaXineramaInfoOrder" "CRT-1"         Option         "Stereo" "0"         Option         "metamodes" "DFP-1: 1920x1080 +0+0; DFP-1: nvidia-auto-select +0+0"         SubSection     "Display"             Depth       24         EndSubSection     EndSection          Section "Screen"         Identifier     "Screen3"         Device         "Device3"         Monitor        "Monitor3"         DefaultDepth    24         Option         "Stereo" "0"         Option         "metamodes" "DFP-0: 1920x1080 +0+0"         SubSection     "Display"             Depth       24         EndSubSection     EndSection               Section "Extensions"         Option         "Composite" "Disable"     EndSection


title: ASCII art generator

text: I'm looking for an ASCII art generator (text is preferred, but images will do too) in the `sl` style, but with text instead of trains. Any suggestion?


title: Setting permissions for specific programs to run as guest

text: How do I set permissions for an HTTP server (nodejs) to run programs in `/usr/local/share/npm/` safely? My use case is to setup my OSX box to run cloud9 and use titanium to build iOS apps for iPhone/iPad. I got cloud9 running and am able to build an iPhone app from the browser, locally as an admin user. But while I can access the cloud9 instance from outside (via HTTP), I can not build apps as what-ever-user is when using cloud9 from afar. It's not clear to me what user account the cloud9 instance is using because I don't know how to look that up. I'm also a little uneasy with setting executable permissions as I'm new to unix security.


title: bash: Redirect IO , but not with suffixes

text: usually I use `XX 2>error.log` , but for debug purposes , I prefer the following syntax:               function XX()     {         redirect_io_to "error.log"     }      Is there such syntax available ? It's convenient because I setup my VIM to comment / uncomment a line with some shortcut key , I could easily comment this out / uncomment it.


title: grep and directories containing spaces

text: I would like to search all files containing an association of strings (here the files should contain 'arthur' AND ('déni' OR 'deni') for instance) in a directory and subdirectories. After some search I came up with the following code:               egrep -li 'arthur' `egrep -lir 'déni|deni' /path/to/files/`      the trouble is I get error messages because many files and directories contain spaces. Is there a way to go round this issue?


title: debian: aptitude install sshfs > Couldn't find any package whose name

text: Why aptitude don’t found sshfs? And how can I install sshfs via aptitude? Pleas, without 3rd-Partys. https://packages.debian.org/en/wheezy/sshfs I typed this:               root@s18:~# aptitude update     Hit http://security.debian.org wheezy/updates Release.gpg     Hit http://security.debian.org wheezy/updates Release     Hit http://ftp.de.debian.org wheezy Release.gpg     Hit http://security.debian.org wheezy/updates/main Sources     Hit http://ftp.de.debian.org wheezy Release     Hit http://security.debian.org wheezy/updates/contrib Sources     Hit http://security.debian.org wheezy/updates/non-free Sources     Hit http://security.debian.org wheezy/updates/main amd64 Packages     Hit http://ftp.de.debian.org wheezy/main Sources     Hit http://security.debian.org wheezy/updates/contrib amd64 Packages     Hit http://security.debian.org wheezy/updates/non-free amd64 Packages     Hit http://ftp.de.debian.org wheezy/contrib Sources     Hit http://security.debian.org wheezy/updates/contrib Translation-en     Hit http://security.debian.org wheezy/updates/main Translation-en     Hit http://ftp.de.debian.org wheezy/non-free Sources     Hit http://security.debian.org wheezy/updates/non-free Translation-en     Hit http://ftp.de.debian.org wheezy/contrib amd64 Packages     Hit http://ftp.de.debian.org wheezy/non-free amd64 Packages     Hit http://ftp.de.debian.org wheezy/contrib Translation-en     Hit http://ftp.de.debian.org wheezy/non-free Translation-en          root@s18:~# aptitude dist-upgrade     No packages will be installed, upgraded, or removed.     0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.     Need to get 0 B of archives. After unpacking 0 B will be used.          root@s18:~# aptitude install sshfs     Couldn't find any package whose name or description matched "sshfs"     Couldn't find any package whose name or description matched "sshfs"     No packages will be installed, upgraded, or removed.     0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.     Need to get 0 B of archives. After unpacking 0 B will be used.          root@s18:~# cat /etc/debian_version      7.5     root@s18:~#       My sources:               root@s18:~# cat /etc/apt/sources.list     deb http://ftp.de.debian.org/debian/ wheezy contrib non-free     deb-src http://ftp.de.debian.org/debian/ wheezy main contrib non-free     deb http://security.debian.org/ wheezy/updates main contrib non-free     deb-src http://security.debian.org/ wheezy/updates main contrib non-free     root@s18:~# ls /etc/apt/sources.list.d/     root@s18:~#      And               root@s18:~# aptitude search sshfs     root@s18:~# apt-cache search sshfs            root@s18:~# apt-get -s install sshfs     Reading package lists... Done     Building dependency tree            Reading state information... Done     E: Unable to locate package sshfs     root@s18:~#


title: Why should I build a custom kernel?

text: Several of my coworkers have been building custom kernels for their workstations and servers. What advantages/disadvantages are there to building a custom kernel? Why should I build a custom kernel?


title: allow mails to one address only from local server

text: On my companies mail server there is a mail address everyone@example.org which sends a mail to every user which is useful for internal communication etc. I want to restrict this recipient to only allow mails from our mail server and reject any mail from outside to this address. What is the best way to do this in postfix?