title: Error updating firefox: Error: Package: xulrunner-last-26.0-2.el6.remi.x86_64 (remi)

text: This is my first time with RHEL. I am using RHEL 6, 64 bit. I want to update Firefox, so I downloaded firefos for 64 bit. Here are the files I got:               [root@xilinx firefox]# ls     application.ini     libmozalloc.so    libxul.so     browser             libmozsqlite3.so  mozilla-xremote-client     chrome.manifest     libnspr4.so       omni.ja     components          libnss3.so        platform.ini     crashreporter       libnssckbi.so     plugin-container     crashreporter.ini   libnssdbm3.chk    precomplete     defaults            libnssdbm3.so     removed-files     dependentlibs.list  libnssutil3.so    run-mozilla.sh     dictionaries        libplc4.so        Throbber-small.gif     firefox             libplds4.so       updater     firefox-bin         libsmime3.so      updater.ini     icons               libsoftokn3.chk   update-settings.ini     libfreebl3.chk      libsoftokn3.so    webapprt     libfreebl3.so       libssl3.so        webapprt-stub      Now to install upade how do I proceed? **Update** Here is what I tried using yum               [root@xilinx firefox]# yum -y install firefox     Loaded plugins: refresh-packagekit, rhnplugin     There was an error parsing the RHN proxy settings.     RHN support will be disabled.     Setting up Install Process     Package firefox-3.6.9-2.el6.x86_64 already installed and latest version     Nothing to do      But actually this installed version is very old. So what is the solution ? **Update 2** Even I tried this:               yum --enablerepo=remi install firefox      But still I failed to update my firefox as can be seen below:               ....     ....      --> Finished Dependency Resolution     Error: Package: xulrunner-last-26.0-2.el6.remi.x86_64 (remi)                Requires: libsmime3.so(NSS_3.15)(64bit)                Available: xulrunner-last-26.0-1.el6.remi.x86_64 (remi)                    libsmime3.so(NSS_3.15)(64bit)     Error: Package: xulrunner-last-26.0-2.el6.remi.x86_64 (remi)                Requires: libnss3.so(NSS_3.12.9)(64bit)                Available: xulrunner-last-26.0-1.el6.remi.x86_64 (remi)                    libnss3.so(NSS_3.12.9)(64bit)     Error: Package: xulrunner-last-26.0-2.el6.remi.x86_64 (remi)                Requires: libnssutil3.so(NSSUTIL_3.13)(64bit)                Available: xulrunner-last-26.0-1.el6.remi.x86_64 (remi)                    libnssutil3.so(NSSUTIL_3.13)(64bit)     Error: Package: xulrunner-last-26.0-2.el6.remi.x86_64 (remi)                Requires: libssl3.so(NSS_3.13)(64bit)                Available: xulrunner-last-26.0-1.el6.remi.x86_64 (remi)                    libssl3.so(NSS_3.13)(64bit)     Error: Package: xulrunner-last-26.0-2.el6.remi.x86_64 (remi)                Requires: libssl3.so(NSS_3.15)(64bit)                Available: xulrunner-last-26.0-1.el6.remi.x86_64 (remi)                    libssl3.so(NSS_3.15)(64bit)     Error: Package: xulrunner-last-26.0-2.el6.remi.x86_64 (remi)                Requires: nss >= 3.15.3                Installed: nss-3.12.7-2.el6.x86_64 (@anaconda-RedHatEnterpriseLinux-201009221801.x86_64/6.0)                    nss = 3.12.7-2.el6     Error: Package: xulrunner-last-26.0-2.el6.remi.x86_64 (remi)                Requires: libsmime3.so(NSS_3.13)(64bit)                Available: xulrunner-last-26.0-1.el6.remi.x86_64 (remi)                    libsmime3.so(NSS_3.13)(64bit)     Error: Package: xulrunner-last-26.0-2.el6.remi.x86_64 (remi)                Requires: libssl3.so(NSS_3.14)(64bit)                Available: xulrunner-last-26.0-1.el6.remi.x86_64 (remi)                    libssl3.so(NSS_3.14)(64bit)     Error: Package: xulrunner-last-26.0-2.el6.remi.x86_64 (remi)                Requires: libnss3.so(NSS_3.13)(64bit)                Available: xulrunner-last-26.0-1.el6.remi.x86_64 (remi)                    libnss3.so(NSS_3.13)(64bit)     Error: Package: xulrunner-last-26.0-2.el6.remi.x86_64 (remi)                Requires: libjpeg.so.62(LIBJPEG_6.2)(64bit)     Error: Package: xulrunner-last-26.0-2.el6.remi.x86_64 (remi)                Requires: nspr >= 4.10.2                Installed: nspr-4.8.6-1.el6.x86_64 (@anaconda-RedHatEnterpriseLinux-201009221801.x86_64/6.0)                    nspr = 4.8.6-1.el6     Error: Package: xulrunner-last-26.0-2.el6.remi.x86_64 (remi)                Requires: libssl3.so(NSS_3.13.2)(64bit)                Available: xulrunner-last-26.0-1.el6.remi.x86_64 (remi)                    libssl3.so(NSS_3.13.2)(64bit)     Error: Package: xulrunner-last-26.0-2.el6.remi.x86_64 (remi)                Requires: libz.so.1(ZLIB_1.2.0)(64bit)      You could try using --skip-broken to work around the problem     libstdc++-4.4.6-4.el6.i686 is a duplicate with libstdc++-4.4.4-13.el6.x86_64


title: How do I set up an IPv6 tunnel in Fedora?

text: I have been experimenting with IPv6. Hurricane Electric through their http://tunnelbroker.net service offer a free IPv6 tunnel. I would like to be able to use this reliably on my Fedora 14 desktop workstation. I've tried a number of different recipes on the web to get this set up but none seem to fit a straightforward workstation install. I currently use the older static network set up (through /etc/init.d/network) rather than NetworkManager on a wired Ethernet network.


title: Password protect Grub2, but still allow normal boot

text: I have seen this link , but I don't have `grub.conf` in the first place. His situation is the inverse from mine though. This link explains quite a fair bit on Grub2, but I am still clueless as to how to do it. I am not technical-savvy enough I guess.. I am using LinuxMint 16. Everything that I have tried so far still requires a password for booting. I want a password to be requested only when a user is trying to edit the boot options.


title: Best distro for USB

text: What would be the best distro for running off a USB, tried with ubuntu but it was too slow because of I/O. Would it be possible to run it from memory so it it's faster or would that make initial loading a lot slower? What i need is something that i can run off a USB that boots and shuts down fast preferably with the same packages as ubuntu. I'd also like to know how to make it so it doesnt ask me to install it every time, bascially install it on a usb, size is not much of an issue.


title: Choosing the file system to use with LVM

text: Since I found out about LVM I have been giving more thought to the process for choosing the file system for my future installs. Usually I'd always choose whatever default option the distro would offer me for my partitions. And that works fine when we are talking about just a simple desktop. If you are planning to setup a machine for some kind of server, how do you evaluate your alternatives? I'm planning on never installing a system without LVM again. Would it limit in any way the options for file systems that I could choose from? And, if you are doing LVM, would it matter for you if you choose ext2, ext3, ext4, since the maximum partition size is defined by your logical volume, not an actual physical partition?


title: Scanning a file by multiply antiviruses

text: I start needing to scan for viruses all files uploaded to my website. I've implemented a pretty simple prototype which I tested locally and it seemed work well. However, I need to make it more complex by involving more antiviruses to be able scan an uploaded file by each of them. But I'm hesitating. Here are the possible issues: a) Can I scan the same file concurrently by multiple antiviruses at the same time? b) Should I run each antivirus only when it's needed (an user has uploaded a file and it has to be scan) and should they run all the time in background? If the second option, won't they conflict with each other? c) In case, there are more files have to be scanned, should I run a new process-antivirus for each file or can I "queue" the files for each antivirus? Yes, I'm aware about third-party services doing exactly this, I don't need them.


title: Minix randomly fails to accept keyboard input

text: I'm currently toying around with Minix 2.0.4 on a somewhat dated 80386 based system with 8 MiB of RAM. I've succesfully managed to install Minix, but I randomly encounter the following issue: When I boot the system, the POST and boot manager accept keyboard input just fine, but once Minix has booted, no keyboard input is accepted. This bug only happens sometimes and is completely unpredictable. What can I do?


title: Wheezy:ifconfig etho down - can still ping?

text: deathstar> ifconfig eth0 down     deathstar> ifconfig -a     eth0      Link encap:Ethernet  HWaddr 00:23:ae:24:f6:76                 inet addr:192.168.1.30  Bcast:192.168.1.255  Mask:255.255.255.0               BROADCAST MULTICAST  MTU:1500  Metric:1               RX packets:0 errors:0 dropped:0 overruns:0 frame:0               TX packets:0 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:1000                RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)               Interrupt:18           lo        Link encap:Local Loopback                 inet addr:127.0.0.1  Mask:255.0.0.0               inet6 addr: ::1/128 Scope:Host               UP LOOPBACK RUNNING  MTU:16436  Metric:1               RX packets:70 errors:0 dropped:0 overruns:0 frame:0               TX packets:70 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:0                RX bytes:5688 (5.5 KiB)  TX bytes:5688 (5.5 KiB)          wlan0     Link encap:Ethernet  HWaddr 00:22:5f:7c:e7:cc                 inet addr:192.168.1.37  Bcast:192.168.1.255  Mask:255.255.255.0               inet6 addr: fe80::222:5fff:fe7c:e7cc/64 Scope:Link               UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1               RX packets:2057 errors:0 dropped:0 overruns:0 frame:6775               TX packets:2457 errors:1 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:1000                RX bytes:1139421 (1.0 MiB)  TX bytes:346358 (338.2 KiB)               Interrupt:17 Base address:0xc000               deathstar> iptables -L -n     Chain INPUT (policy ACCEPT)     target     prot opt source               destination                   Chain FORWARD (policy ACCEPT)     target     prot opt source               destination                   Chain OUTPUT (policy ACCEPT)     target     prot opt source               destination              deathstar> route -n     Kernel IP routing table     Destination     Gateway         Genmask         Flags Metric Ref    Use Iface     0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 wlan0     192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 wlan0     deathstar> arp -a     D-Link.Home (192.168.1.1) at 1c:7e:e5:b4:e1:6b [ether] on wlan0     deathstar> ping 192.168.1.30 -c 1     PING 192.168.1.30 (192.168.1.30) 56(84) bytes of data.     64 bytes from 192.168.1.30: icmp_req=1 ttl=64 time=0.048 ms          --- 192.168.1.30 ping statistics ---     1 packets transmitted, 1 received, 0% packet loss, time 0ms     rtt min/avg/max/mdev = 0.048/0.048/0.048/0.000 ms      EDIT - IP addr/ip route info               deathstar> ip addr     1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN          link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00         inet 127.0.0.1/8 scope host lo         inet6 ::1/128 scope host             valid_lft forever preferred_lft forever     2: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast state DOWN qlen 1000         link/ether 00:23:ae:24:f6:76 brd ff:ff:ff:ff:ff:ff         inet 192.168.1.30/24 brd 192.168.1.255 scope global eth0     15: wlan0: <BROADCAST,ALLMULTI,PROMISC,NOTRAILERS,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000         link/ether 00:22:5f:7c:e7:cc brd ff:ff:ff:ff:ff:ff         inet 192.168.1.37/24 brd 192.168.1.255 scope global wlan0         inet6 fe80::222:5fff:fe7c:e7cc/64 scope link             valid_lft forever preferred_lft forever               deathstar> ip route show table all     default via 192.168.1.1 dev wlan0      192.168.1.0/24 dev wlan0  proto kernel  scope link  src 192.168.1.37      broadcast 127.0.0.0 dev lo  table local  proto kernel  scope link  src 127.0.0.1      local 127.0.0.0/8 dev lo  table local  proto kernel  scope host  src 127.0.0.1      local 127.0.0.1 dev lo  table local  proto kernel  scope host  src 127.0.0.1      broadcast 127.255.255.255 dev lo  table local  proto kernel  scope link  src 127.0.0.1      broadcast 192.168.1.0 dev wlan0  table local  proto kernel  scope link  src 192.168.1.37      local 192.168.1.30 dev eth0  table local  proto kernel  scope host  src 192.168.1.30      local 192.168.1.37 dev wlan0  table local  proto kernel  scope host  src 192.168.1.37      broadcast 192.168.1.255 dev wlan0  table local  proto kernel  scope link  src 192.168.1.37      fe80::/64 dev wlan0  proto kernel  metric 256      unreachable default dev lo  table unspec  proto kernel  metric 4294967295  error -101     local ::1 via :: dev lo  table local  proto none  metric 0      local fe80::222:5fff:fe7c:e7cc via :: dev lo  table local  proto none  metric 0      ff00::/8 dev wlan0  table local  metric 256      unreachable default dev lo  table unspec  proto kernel  metric 4294967295  error -101


title: Practical usage of `set -k` option in bash

text: When do we use `set -k` option in bash? Bash reference manual says, > All arguments in the form of assignment statements are placed in the > environment for a command, not just those that precede the command name. I understand what the option does, but could not imagine when we need it.


title: How to resize root Volume Group

text: How Can I reduce size of root volume group?                /dev/VolGroup00/LogVol00      I just have SSH access to Linux host.


title: centOS 6.5 i386 Minimal Installation Ends with Arrow of Black Background

text: I am installing centOS 6.5 for i386 using Minimal installation. I boot up computer with the disk and choose               install or upgrade an existing system      Everything proceeds without any errors but it ends with a white, hollow (cursor) arrow on a black background and doesn't go any further. I can move the arrow around with my mouse but I left the computer for over an hour and, when I come back, it's the same thing. Just a white, hollow arrow on a black background. The first time I ran it through, I selected the (default) option to check the hardware for suitability. It ran and said that the hardware was fine but ejected the disk. I read that this was a type of bug so I rebooted again, followed the same procedure as before and chose continue w/o checking the hardware. The installation seemed to be running fine but ended with the white arrow on the black background and did not go any further.


title: Safely uninstall avfs

text: I installed avfs to check how it works. It works, but after a short test drive I decided to uninstall the package, basically because I can change files within a zip but it's not possible to write them back. Now my question is, at this point is it safe to completely uninstall avfs?               $ sudo apt-get purge --auto-remove avfs      I ask that because I see that a new "virtual" directory `~/.avfs` has been created with a mirror of my disk. For this reason I wonder which is the right procedure to uninstall **without compromising any data**.


title: Zsh - Modify File Completion w/ Quotes

text: I've been using Zsh recently, and when I complete a file name within quotes, the completion adds a space after the completed file name. Interestingly, this does not occur when I complete directory names in quotes. To illustrate (using an underscore to signify the cursor location):               $ mv ".xmod_"  --<TAB>--> $ mv ".Xmodmap _"      Preferably, I would like to have the following happen:               $ mv ".xmod_" --<TAB>--> $ mv ".Xmodmap" _      This seems like the most intuitive way to me, anyway. I just want to remove the space added between the completed file name and the ending quotation mark. I did try searching for a solution to this, but I'm afraid my minimal knowledge of Zsh and the possible causes of this have not led me to a solution so far. * * * **Update:** Originally, I had this question as just relevant to the "mv" program, but I noticed that this behavior with the quotes seems to occur with all file completions (I only tried "cp" in addition). Also, here is the modules section of my _.zshrc_ , in case any might be causing this to happen:               autoload -U colors compinit promptinit select-word-style zkbd     compinit     promptinit     colors     select-word-style bash      Apart from this, and some other minor option settings, there isn't much else in my _.zshrc_.


title: How can I make a keybind involving xdotool in Openbox?

text: I'm running Openbox 3.5.2 (on Lubuntu 13.10) by logging into Openbox session. In an Openbox session, if I run `xdotool mousemove 1000 5 click 3` from a terminal, the mouse cursor moves to the specified blank position on the desktop; then a mouse right-click is executed to open the right-click menu of Openbox. So I made the following keybind in `~/.config/openbox/rc.xml`:               <keybind key="W-space">       <action name="Execute">         <command>xdotool mousemove 1000 5 click 3</command>       </action>     </keybind>      and reconfigured Openbox. But when I press `super`+`spacebar` all I see is that the mouse cursor moves to the designated position; the right-click menu doesn't appear. How can I cause the right-click menu to appear?


title: Debian one time setup after reboot

text: I have a pre-configured server based on Debian with some services. I, now, need to deploy it in different networks. Is there any solution to run a _one time_ script after reboot which asks some questions about network configuration and to make this change?


title: makepkg freeze after installing dependencies

text: If I try to create a package from the AUR `makepkg` seems to freeze after installing the dependencies. It just stops after installing the last dependency and freezes with 65% CPU-Usage. Any Idea what could cause this Problem?


title: fstab group option?

text: **Environment**   * Ubuntu 14.04 LTS Desktop 64-bit **Problem**   * only members of _group_name_ should be allowed to mount,unmount and read,write,execute _drive_name_ **Potential Solution**   1. edit /etc/fstab add line: `/dev/abc /media/drive_name ext4 group 0 2`   2. create group: `sudo groupadd group_name`   3. add users to group: `sudo adduser user1 group_name`   4. mount point owned by group: `sudo chgrp /media/drive_name group_name` **Question**   1. Is this the correct, secure way of solving the problem? Thank you :)


title: JACK issues on Lubuntu, any thoughts? "Driver is not running"

text: I am trying to set up JACK and Wine to run FL Studio on Lubuntu. Upon running qjackctl and attempting to start JACK, I get the following error. Any thoughts? I disabled JACK D-Bus and got fewer errors.               13:34:12.958 Patchbay deactivated.     13:34:12.958 Statistics reset.     13:34:12.962 ALSA connection change.     Cannot connect to server socket err = Connection refused     Cannot connect to server request channel     jack server is not running or cannot be started     13:34:12.969 ALSA connection graph change.     13:34:14.262 JACK is starting...     13:34:14.263 /usr/bin/jackd -dalsa -dhw:I82801AAICH -r44100 -p1024 -n2     Cannot connect to server socket err = Connection refused     Cannot connect to server request channel     jack server is not running or cannot be started     13:34:14.292 JACK was started with PID=1809.     no message buffer overruns     no message buffer overruns     no message buffer overruns     jackdmp 1.9.10     Copyright 2001-2005 Paul Davis and others.     Copyright 2004-2014 Grame.     jackdmp comes with ABSOLUTELY NO WARRANTY     This is free software, and you are welcome to redistribute it     under certain conditions; see the file COPYING for details     JACK server starting in realtime mode with priority 10     self-connect-mode is "Don't restrict self connect requests"     audio_reservation_init     Acquire audio card Audio0     creating alsa driver ... hw:I82801AAICH|hw:I82801AAICH|1024|2|44100|0|0|nomon|swmeter|-|32bit     Using ALSA driver ICH running on card 0 - Intel 82801AA-ICH with STAC9700,83,84 at irq 21     configuring for 44100Hz, period = 1024 frames (23.2 ms), buffer = 2 periods     ALSA: final selected sample format for capture: 16bit little-endian     ALSA: use 2 periods for capture     ALSA: final selected sample format for playback: 16bit little-endian     ALSA: use 2 periods for playback     13:34:21.390 Could not connect to JACK server as client. - Overall operation failed. - Server communication error. Please check the messages window for more info.     JackPosixProcessSync::LockedTimedWait error usec = 5000000 err = Connection timed out     Driver is not running     Cannot create new client     Cannot open qjackctl client     Unknown request 4294967295     CheckSize error size = 0 Size() = 12     CheckRead error     Gtk-Message: (for origin information, set GTK_DEBUG): failed to retrieve property `GtkRange::activate-slider' of type `gboolean' from rc file value "((GString*) 0xf52b40)" of type `GString'     Gtk-Message: (for origin information, set GTK_DEBUG): failed to retrieve property `GtkRange::activate-slider' of type `gboolean' from rc file value "((GString*) 0xf13880)" of type `GString'     13:34:35.841 JACK is stopping...     Jack main caught signal 15


title: Feed all traffic through OpenVPN for a specific network namespace only

text: I am trying to set up a VPN (using OpenVPN) such that all of the traffic, and _only_ the traffic, to/from specific processes goes through the VPN; other processes should continue to use the physical device directly. It is my understanding that the way to do this in Linux is with network namespaces. If I use OpenVPN normally (i.e. funnelling _all_ traffic from the client through the VPN), it works fine. Specifically, I start OpenVPN like this:               # openvpn --config destination.ovpn --auth-user-pass credentials.txt      (A redacted version of destination.ovpn is at the end of this question.) I'm stuck on the next step, writing scripts that restrict the tunnel device to namespaces. I have tried:   1. Putting the tunnel device directly in the namespace with              # ip netns add tns0     # ip link set dev tun0 netns tns0     # ip netns exec tns0 ( ... commands to bring up tun0 as usual ... )      These commands execute successfully, but traffic generated inside the namespace (e.g. with `ip netns exec tns0 traceroute -n 8.8.8.8`) falls into a black hole.   2. On the assumption that "you can [still] only assign virtual Ethernet (veth) interfaces to a network namespace" (which, if true, takes this year's award for most ridiculously unnecessary API restriction), creating a veth pair and a bridge, and putting one end of the veth pair in the namespace. This doesn't even get as far as dropping traffic on the floor: it won't let me put the tunnel into the bridge! [EDIT: This appears to be because only _tap_ devices can be put into bridges. Unlike the inability to put arbitrary devices into a network namespace, that actually makes sense, what with bridges being an Ethernet-layer concept; unfortunately, my VPN provider does not support OpenVPN in tap mode, so I need a workaround.]              # ip addr add dev tun0 local 0.0.0.0/0 scope link     # ip link set tun0 up     # ip link add name teo0 type veth peer name tei0     # ip link set teo0 up     # brctl addbr tbr0     # brctl addif tbr0 teo0     # brctl addif tbr0 tun0     can't add tun0 to bridge tbr0: Invalid argument      The scripts at the end of this question are for the veth approach. The scripts for the direct approach may be found in the edit history. Variables in the scripts that appear to be used without setting them first are set in the environment by the `openvpn` program -- yes, it's sloppy and uses lowercase names. Please offer specific advice on how to get this to work. I'm painfully aware that I'm programming by cargo cult here -- has _anyone_ written comprehensive documentation for this stuff? I can't find any -- so general code review of the scripts is also appreciated. In case it matters:               # uname -srvm     Linux 3.14.5-x86_64-linode42 #1 SMP Thu Jun 5 15:22:13 EDT 2014 x86_64     # openvpn --version | head -1     OpenVPN 2.3.2 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [PKCS11] [eurephia] [MH] [IPv6] built on Mar 17 2014     # ip -V     ip utility, iproute2-ss140804     # brctl --version     bridge-utils, 1.5      The kernel was built by my virtual hosting provider (Linode) and, although compiled with `CONFIG_MODULES=y`, has no actual modules -- the only `CONFIG_*` variable set to `m` according to `/proc/config.gz` was `CONFIG_XEN_TMEM`, and I do not actually _have_ that module (the kernel is stored outside my filesystem; `/lib/modules` is empty, and `/proc/modules` indicates that it was not magically loaded somehow). Excerpts from `/proc/config.gz` provided on request, but I don't want to paste the entire thing here. ### netns-up.sh               #! /bin/sh          mask2cidr () {         local nbits dec         nbits=0         for dec in $(echo $1 | sed 's/\./ /g') ; do             case "$dec" in                 (255) nbits=$(($nbits + 8)) ;;                 (254) nbits=$(($nbits + 7)) ;;                 (252) nbits=$(($nbits + 6)) ;;                 (248) nbits=$(($nbits + 5)) ;;                 (240) nbits=$(($nbits + 4)) ;;                 (224) nbits=$(($nbits + 3)) ;;                 (192) nbits=$(($nbits + 2)) ;;                 (128) nbits=$(($nbits + 1)) ;;                 (0)   ;;                 (*) echo "Error: $dec is not a valid netmask component" >&2                     exit 1                     ;;             esac         done         echo "$nbits"     }          mask2network () {         local host mask h m result         host="$1."         mask="$2."         result=""         while [ -n "$host" ]; do             h="${host%%.*}"             m="${mask%%.*}"             host="${host#*.}"             mask="${mask#*.}"             result="$result.$(($h & $m))"         done         echo "${result#.}"     }          maybe_config_dns () {         local n option servers         n=1         servers=""         while [ $n -lt 100 ]; do            eval option="\$foreign_option_$n"            [ -n "$option" ] || break            case "$option" in                (*DNS*)                    set -- $option                    servers="$servers     nameserver $3"                    ;;                (*) ;;            esac            n=$(($n + 1))         done         if [ -n "$servers" ]; then             cat > /etc/netns/$tun_netns/resolv.conf <<EOF     # name servers for $tun_netns     $servers     EOF         fi     }          config_inside_netns () {         local ifconfig_cidr ifconfig_network              ifconfig_cidr=$(mask2cidr $ifconfig_netmask)         ifconfig_network=$(mask2network $ifconfig_local $ifconfig_netmask)              ip link set dev lo up              ip addr add dev $tun_vethI \             local $ifconfig_local/$ifconfig_cidr \             broadcast $ifconfig_broadcast \             scope link         ip route add default via $route_vpn_gateway dev $tun_vethI         ip link set dev $tun_vethI mtu $tun_mtu up     }          PATH=/sbin:/bin:/usr/sbin:/usr/bin     export PATH          set -ex          # For no good reason, we can't just put the tunnel device in the     # subsidiary namespace; we have to create a "virtual Ethernet"     # device pair, put one of its ends in the subsidiary namespace,     # and put the other end in a "bridge" with the tunnel device.          tun_tundv=$dev     tun_netns=tns${dev#tun}     tun_bridg=tbr${dev#tun}     tun_vethI=tei${dev#tun}     tun_vethO=teo${dev#tun}          case "$tun_netns" in          (tns[0-9] | tns[0-9][0-9] | tns[0-9][0-9][0-9]) ;;          (*) exit 1;;     esac          if [ $# -eq 1 ] && [ $1 = "INSIDE_NETNS" ]; then         [ $(ip netns identify $$) = $tun_netns ] || exit 1         config_inside_netns     else              trap "rm -rf /etc/netns/$tun_netns ||:               ip netns del $tun_netns      ||:               ip link del $tun_vethO       ||:               ip link set $tun_tundv down  ||:               brctl delbr $tun_bridg       ||:              " 0              mkdir /etc/netns/$tun_netns         maybe_config_dns              ip addr add dev $tun_tundv local 0.0.0.0/0 scope link         ip link set $tun_tundv mtu $tun_mtu up              ip link add name $tun_vethO type veth peer name $tun_vethI         ip link set $tun_vethO mtu $tun_mtu up              brctl addbr $tun_bridg         brctl setfd $tun_bridg 0         #brctl sethello $tun_bridg 0         brctl stp $tun_bridg off              brctl addif $tun_bridg $tun_vethO         brctl addif $tun_bridg $tun_tundv         ip link set $tun_bridg up              ip netns add $tun_netns         ip link set dev $tun_vethI netns $tun_netns         ip netns exec $tun_netns $0 INSIDE_NETNS              trap "" 0     fi      ### netns-down.sh               #! /bin/sh          PATH=/sbin:/bin:/usr/sbin:/usr/bin     export PATH          set -ex          tun_netns=tns${dev#tun}     tun_bridg=tbr${dev#tun}          case "$tun_netns" in          (tns[0-9] | tns[0-9][0-9] | tns[0-9][0-9][0-9]) ;;          (*) exit 1;;     esac          [ -d /etc/netns/$tun_netns ] || exit 1          pids=$(ip netns pids $tun_netns)     if [ -n "$pids" ]; then         kill $pids         sleep 5         pids=$(ip netns pids $tun_netns)         if [ -n "$pids" ]; then             kill -9 $pids         fi     fi          # this automatically cleans up the the routes and the veth device pair     ip netns delete "$tun_netns"     rm -rf /etc/netns/$tun_netns          # the bridge and the tunnel device must be torn down separately     ip link set $dev down     brctl delbr $tun_bridg      ### destination.ovpn               client     auth-user-pass     ping 5     dev tun     resolv-retry infinite     nobind     persist-key     persist-tun     ns-cert-type server     verb 3     route-metric 1     proto tcp     ping-exit 90     remote [REDACTED]     <ca>     [REDACTED]     </ca>     <cert>     [REDACTED]     </cert>     <key>     [REDACTED]     </key>


title: Unix sed interpreter | replace a specified character between two words but only replace if the character has a succeeding specified character also

text: previously, i posted a question on how to replace a specified character between two words and it has been answered perfectly. It works, but to minimize the effort, i would like to add something on my previous question that can be found here: Replace specified character between two strings? Now, what i want to accomplish is something like this, please see sample below:               123&&<faultcode>IBM.Error<faultstring>special character & and one converted &</faultstring></faultcode>&&123      I needed to replace all `&` inside `<faultstring>` and `</faultstring>` BUT only `&` that does not contain `amp;` with `#`. Sample output below:               123&&<faultcode>IBM.Error<faultstring>special character # and one converted &</faultstring></faultcode>&&123      The following syntax works but also replaces the `&` with `amp;`               sed -e :1 -e 's@\(<faultstring>.*\)&\(.*</faultstring>\)@\1¢\2@;t1'      Also, I'm replacing those characters inside a file and I want to overwrite the file. PS: I created a new question to avoid confusion on my previous thread. If you guys found that this can be merged on the previous thread please do so. I'm just hoping that new thread will attract people to answer quick.


title: Can LVM snapshots be writable? (and used for temporary experiments)

text: It seems that usually it is talked about snapshots as read-only. (In a scenario where one creates a snapshot, then does some experiments with the main volume, and then restores the old state by "merging" the snapshot into the main volume.) Is an alternative scenario possible in LVM? I.e., where one doesn't even want the temporary experiments to be visible in the main volume, so one creates a "temporary" snapshot, makes it writable, does the experiments there, in that "branch", and then discards the snapshot (or perhaps merges it if one is satisfied with the results)? And if writable snapshots are possible in LVM, then what happens when merging a modified snapshot into the main volume which also has had some different modifications? (BTW, btrfs snapshots seem to be writable by default, so this scenario seems to be well possible in btrfs.)


title: How to create a snapshot in btrfs, and then rollback to it after some work?

text: What are the commands to use in btrfs in case I want to:   1. create a (read-only) snapshot of a volume;   2. (do some experiments in the volume);   3. and then rollback the volume to the snapshot?


title: libssl and libcrypto backward compatible?

text: I have an old server application that requires `libssl.so.0.9.6` and `libcrypto.so.0.9.6`. My issue is I currently have `libssl.so.1.0.0a` and `libcrypto.so.1.0.0a` on my system. I tried symlinking to the new libraries and it gets me past the error when starting the server application however once the application receives a new connection it immediately crashes. However, it does not give any error about why. I also tried extracting these libraries from an old RPM and placed them in the correct location on the linux server and I would get the same issue. I have disabled SELinux and disabled iptables. I have the ports forwarded correctly, however this issue keeps persisting. On another linux server I am running an old CentOS release with the openssl version required and it runs without issue. I think I have narrowed it down to an issue with the openssl version. Does anyone have any idea why this may be happening or if openssl is backward- compatible to such an old version.


title: Lower cpu performance in Linux

text: I have a problem with my CPU performance in Linux. I have a laptop, Toshiba Satellite C660-101. Despite the fact that the CPU works perfectly fine in Windows 7, Linux has some serious issues. Specifically, for some reason, the CPU is really slow. It is not the first time I am using Linux, I have Ubuntu in my desktop PCs. I have tried various distributions on my laptop like openSUSE (Gnome), Fedora (Xfce), Ubuntu (unity), and I always have the same problem. I think it is something with the kernel, but I want your knowledge.


title: filter and count with grep in a single pass?

text: I am using `grep` at the end of a set of piped commands to filter some rows out of a file. Afterwards I will want to do some arithmetic based on the number of remaining rows. e.g.               chrN="chr1|chr2|chr3|chr4|chr5|chr6|chr7"     otherCommands | grep -Ew $chrN  > $ChIP".bed"     count_pos=`wc -l $ChIP"bed" | awk '{print 1000000/$1}'`      It strikes me as very wasteful after piping together lots of command to then write it to a file and then read through it again just to collect one number. .. but I don't know how to do that. So my question is how do I save the number of rows that passed the grep filter to the variable `count_pos` and save the filtered rows to the file too?


title: Expand shell variable without globbing

text: I want to check whether an input string refers to a file name - **not** a wildcard string like `*.txt`. This doesn't work:               if [ -f "$1" ];      Because `$1` gets expanded to `*.txt`, which gets expanded to, say `foo.txt bar.txt`, which gets passed to `test -f`. Short of explicitly checking for wildcard characters, is there a general way to perform a shell substitution, and then prevent any globbing?


title: Iptables rule to allow only one port and block others

text: We have two apps running (on top of linux) and both communicates through port 42605. I wanted to quickly verify if this is the only port that's been used for communication between them. I tried below rule, but it doesn't seems to work. So, just wanted to get this clarified, if I am doing it wrong. Following is the sequence of commands i ran               iptables -I INPUT -j REJECT     iptables -I INPUT -p tcp --dport 42605 -j ACCEPT     iptables -I INPUT -p icmp -j ACCEPT     iptables -I OUTPUT -p tcp --dport 42605 -j ACCEPT      So, this will get added in reverse order since I am inserting it. I wanted to allow incoming and outgoing communications from and to 42605. Does the above rule looks good or am I doing it wrong? Another question, would this be the right way to test, or maybe I should use "netstat" command to see which port has connection established with the other ip?


title: Trying to delete crypto partitions from debian graphical installer

text: I'm setting up manual partitions (I made 2 crypto ones) on debian wheezy using the graphical installer, but I didn't leave enought space for the boot one. So I am trying to delete them but am not able to. How can I do this? I'm doing it manually cause I have a windows boot partition on the same drive.


title: Fatal: module nfs not found

text: I am setting up a new NFS client on a LAN that has a working NFS server (Ubuntu 12.04) running nfs4. The other clients all work as expected. On this new client I'm running ChrUbuntu with kernel 3.4.0 (Kubuntu 12.04) on an Acer Chromebook. I installed nfs-common. However, the mount command returns the error `mount.nfs4 no such device`. And `# modprobe nfs` returns `Fatal: module nfs not found`. Google didn't offer me any solutions. The mount command is like:               sudo mount -t nfs4 -o _netdev,noatime,auto,rw myserver:/home/user/shared /home/user/mountpoint      The modprobe command is:               sudo modprobe nfs      And nfs-common is the latest version from this release's repo: 1:1.2.5-3ubuntu3.1


title: Can aptitude group or search for packages which nothing depends on?

text: With aptitude: I can _see_ the number of reverse dependencies with `%r` in the display format string (preferences), but how can I group/limit the package list according to that count? I want to see/filter/search all packages which nobody depends on.


title: Set timeout for web page response with curl

text: I use a tool to monitor if the web-page is up and running. The tool uses `curl` command internally to fetch the output. However, when a web-page takes longer time to respond, it results back with a `TIMEOUT` error. There is no way that I can increase the timeout from the tool. Is there any way to set/modify the timeout period for a response from a web- page? Is there any variable that can be modified?


title: How can I detect when a monitor is plugged in or unplugged?

text: Is there _any_ event that is triggered when I plug in or out an external monitor into the DisplayPort of my laptop? ACPID and UDEV don't react at all. I'm using onboard graphics on an intel chip. Here is a similar discussion which is already a couple of years old. I don't want to use polling but I need to have some configuration that set's the display settings automatically depending on if the display is connected.


title: Set up an access point

text: I have a laptop with an Atheros card and I want to use it as a wireless access point. I need an AP with WPA/WPA2 encryption for testing purposes; I don't need any routing functionality or anything else (it's fine if it has that, but it's not a requirement). A live CD would be good, I just want something that's easy to setup -- like I mentioned, it's not for real use. I tried it on Ubuntu but I guess by default Ubuntu is missing the special drivers required to act as an access point.


title: Gnu Screen and vi - visualization issues

text: The scenario is as follows:   * gnu screen launched onto a scientific Linux distro   * ssh to an aix machine    * tried to edit a file with vi  And this is what I got: "ex: 0602-108 screen is not a recognized terminal type. [Press return to continue]" then I am into vi but it displays the file content in a weird fashion, this is an example:                   this is row 1              and this is row 2                  and this is          row 3       How can this be fixed ?


title: sendmail using incorrect timezone

text: I have sendmail running on my CentOS server. The server is set to BST and tzdata is correct.               $ date     Tue Jul  2 10:53:56 BST 2013     $ ll /etc/localtime     lrwxrwxrwx 1 root root 33 Jun 28 17:07 /etc/localtime -> /usr/share/zoneinfo/Europe/London      I have a bash script running on this server which sends mail through a cronjob. The cronjob is set to run everyday **at 7am**. 00 07 * * * sh /root/check_mail_process.sh The log /var/log/cron shows that the server runs the job at specified time Jul 1 07:00:01 ukibimon01 crond[15407]: (root) CMD (sh /root/check_mail_process.sh) The /etc/mail/sendmail.cf has the following settings               # time zone handling:     #  if undefined, use system default     #  if defined but null, use TZ envariable passed in     #  if defined and non-null, use that info     #O TimeZoneSpec=      Also no TZ variable is set on this machine. The sendmail uses smart relay I also use smart relay to send mails to an **Exchange server**.               # "Smart" relay host (may be null)     DSexchange_server_address      The problem is, I receive the mail **an hour later at 8am**. The header information from Outlook is here: Server (TLS) id 14.16.324.0; Tue, 2 Jul 2013 **07:00:13 +0000** Received: from BY2PRD0411HT003.namprd04.prod.outlook.com (IP) by BY2PRD0411HT005.namprd04.prod.outlook.com (IP) with Microsoft SMTP So, somehow sendmail is getting time from somewhere else and using


title: Change init scripts priority

text: I'm running a raspbian (based on debian). I want to change the priority of the init services so the very first script which is run by init is one made for me. How can I do it? On runlevel S I have 3 scripts with priortity 01: hostname.sh, fake-hwclock and mountkernfs.sh. If I just put my script on runlevel S with priority 01, it's not the first one to be executed. I have tried to change the priortiy of all these scripts to 02 using (for example in the case of mountkernfs.sh)               sudo update-rc.d -f mountkernfs.sh remove     sudo update-rc.d mountkernfs.sh start 02 S      The first command effectively removes the script from /etc/rcS.d. The second command puts again mountkernfs.sh with priority 01. Any idea? Thank you!


title: Trapping errors in command substitution using "-o errtrace" (ie set -E)

text: According to this ref manual: > -E (also -o errtrace) > > If set, any trap on ERR is inherited by shell functions, command > substitutions, and commands executed in a subshell environment. The ERR trap > is normally not inherited in such cases. However, I must be interpreting it wrongly, because the following does not work:               #!/usr/bin/env bash     # -*- bash -*-          set -e -o pipefail -o errtrace -o functrace          function boom {       echo "err status: $?"       exit $?     }     trap boom ERR               echo $( made up name )     echo "  ! should not be reached ! "      I already know simple assignment, `my_var=$(made_up_name)`, will exit the script with `set -e` (ie errexit). Is `-E/-o errtrace` supposed to work like the above code? Or, most likely, I misread it?


title: NTP synchroinzation waiting for a while after booting

text: According to the recommendation on Arch Wiki, I set my hardware clock to UTC. And here is the result of `timedatectl status` on my machine when just booted:                     Local time: Tue 2013-07-02 15:38:03 CST       Universal time: Tue 2013-07-02 07:38:03 UTC             Timezone: Asia/Shanghai (CST, +0800)          NTP enabled: yes     NTP synchronized: no      RTC in local TZ: no           DST active: n/a      At this moment, the time display on panel is UTC, only after a while(about 10 minutes), the `NTP synchronized` will eventually change to `yes`, then I have CST on the panel. So how can I force the NTP sync as soon as booting?


title: Fixing mime type on Ubuntu

text: I am using Ubuntu 10.04. Sometime back after an update, all files in Ubuntu started showing a mime type of text/plain. This means that double clicking on any file opened it using gvim which is really annoying. How do I get Nautilus to recognize mime types based on file extension? Thanks,


title: How do I recursively grep through compressed archives?

text: I'm trying to find out what modules `use Test::Version` in cpan. So I've used `minicpan` to mirror it. My problem is that I need to iterate through the archives that are downloaded, and grep the files that are in the archives. Can anyone tell me how I might do this? preferably in a way that tells me which file in the archive and what line it's on. _(note: they aren't all tarballs some are zip files)_


title: Postfix Configuration - different servers for subdomains and domain

text: I have a following setup: 1 postfix server: `a.example.com` that needs to accept all emails for any subdomain on example.com (`*@*.example.com`) and delivers to mailman account and also send emails to any email account (gmail, yahoo, etc) including `*@example.com`. 1 hosted exchange: `exch11.hosted.com` for example.com emails (`*@example.com`). Everything works in this setup except sending emails from a.example.com to `*@example.com` (`exch11.hosted.com`). If I have `example.com` in mydomains.db file, then `a.example.com` does not send out `*@example.com` emails and delivers locally. if I change it to `*.example.com` then it sends `*@example.com` emails to `exch11.hosted.com` but now does not accept `*@subdomain.example.com` emails and shows an error that Relay is not allowed (it should not be relaying and delivering to local maildir account). Main requirement is to have a.example.com accept mail for any subdomain and deliver emails for main domain to exch11.hosted.com. Can anyone please help me or point me towards right direction? Any help is welcome. Thanks. main.cf:               command_directory = /usr/sbin     daemon_directory = /usr/libexec/postfix     mydestination = hash:/etc/postfix/mydomains     unknown_local_recipient_reject_code = 550     alias_maps = hash:/etc/aliases     home_mailbox = Maildir/     smtpd_banner = mail.example.com          debug_peer_level = 2     debugger_command =          PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin          xxgdb $daemon_directory/$process_name $process_id & sleep 5          sendmail_path = /usr/sbin/sendmail.postfix     newaliases_path = /usr/bin/newaliases.postfix     mailq_path = /usr/bin/mailq.postfix     setgid_group = postdrop     html_directory = no     manpage_directory = /usr/share/man     sample_directory = /usr/share/doc/postfix-2.3.3/samples     readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES     virtual_alias_maps = hash:/etc/postfix/virtual, pcre:/etc/postfix/virtual.pcre     smtpd_sasl_auth_enable = yes     smtpd_sasl_security_options = noanonymous     smtpd_sasl_local_domain = $myhostname     smtp_sasl_security_options = noplaintext     #smtpd_sender_restrictions = check_sender_access hash:/etc/postfix/sender-access     smtpd_recipient_restrictions = check_recipient_access hash:/etc/postfix/inbound-access,permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination     mailbox_size_limit = 25600000     transport_maps = hash:/etc/postfix/transport     message_size_limit = 20240000      virtual.pcre and virtual:               /(.*)@[^.]*\.example\.com$/ mailman      transport:               # demo     .demo.example.com   smtp:192.168.100.161:25     # demo mail     demo.example.com    smtp:192.168.100.161     # Demo2     .demo2.example.com  smtp:192.168.100.221:25     # demo2 domain     demo2.example.com   smtp:192.168.100.221      mydomains:               localhost       OK     mail.local  OK     example.com     OK


title: passphrase for key required while copying a file

text: I usually would get a prompt for a password but this time my terminal is asking for a passphrase for key.               rcihp145:qa1wrk13:/qa1users1/rgs/test/qa1wrk13/scripts>scp -p msingh2@rcihp145:/home/msingh2/set_run_jobs .     The authenticity of host 'rcihp145 (10.3.37.48)' can't be established.     RSA key fingerprint is 62:f9:d2:7e:d5:ac:bc:9d:0f:8f:82:d3:d4:a9:dc:f5.     Are you sure you want to continue connecting (yes/no)? yes     Failed to add the host to the list of known hosts (/qa1users1/rgs/test/qa1wrk13/.ssh/known_hosts).          Enter passphrase for key '/qa1users1/rgs/test/qa1wrk13/.ssh/id_dsa':       can i get an explanation or some solution for this key mapping.


title: Boot into chroot directory leaves the root partition read-only

text: I am trying to make grub boot into a chroot directory /slack containing a Slackware Linux installation. This directory was created by issuing the following command:                 installpkg --root /slack a/*.t?z      where a/ directory contains the basic a/ instalation packages from slackware. I sucessfully chrooted into /slack and created the initrd image, by executing mkinitcpio command. Finally, I created the following entry in /boot/grub/menu.lst:               title  Slackware Linux     root   (hd0,2)     kernel /slack/boot/vmlinuz root=/dev/sda3 rw init=/slack/boot/chrootinit      initrd /slack/boot/initrd.gz     boot      where /slack/boot/chrootinit is a script that chroots into /slack:               exec /usr/sbin/chroot /slack /sbin/init      The system boots sucessfully but even with the "rw" option, the root partition is mounted as readonly. Several warning messages about this problem are displayed and the system finally hangs. Any solutions? (REF: http://forum.soft32.com/linux2/Booting-chrooted-directory- ftopict51395.html)


title: Disable svn plaintext password storage for all users

text: By default, Subversion allows users to save their password in plaintext in `~/.subversion/auth/svn.simple`. I'm investigating options for storing encrypted passwords in svn, but at the very least and ASAP, I want to completely disable the ability to store passwords for all of our users. We are running Subversion 1.6.17. I can disable this within a user's home directory via the config file. **~/.subversion/servers** :               [global]     # Password / passphrase caching parameters:     store-passwords = no     store-plaintext-passwords = no      However, the user could change the config file if they wanted to. Is there not a system-wide svn config file? A few options I've seen: _Option 1_ > In 1.8-dev, Subversion's configure script accepts a --disable-plaintext- > password-storage option to bypass the logic which stores plaintext passwords > and client certificate passphrases. I prefer not to update to a development release. _Option 2_ `/etc/subversion/config` AFAIK, this config file is only used when a user doesn't have a config file already in their home directory. _Option 3_ Add a cron job to delete the user's auth cache in `~/.subversion/auth/svn.simple`. So, even if they alter their svn config file, then our cron job would kill any stored passwords. However, even running it every minute doesn't guarantee that our backup system wouldn't grab the file(s) containing plaintext passwords. Ideas?


title: grep --include acts like --exclude

text: I'm trying to make use of the --include option of grep, but it doesn't behave as I expect. Consider this simplified test: **Setup**               me@de31:~/tmp$ cat file.h     This is a .h file     me@de31:~/tmp$ cat file.c     This is a .c file      **Verify**               me@de31:~/tmp$ grep "This is a" *     file.c:This is a .c file     file.h:This is a .h file      **Use --include**               me@de31:~/tmp$ grep "This is a" * --include="*.c"     file.h:This is a .h file          me@de31:~/tmp$ grep "This is a" * --include="*.h"     file.c:This is a .c file      **Use --exclude**               me@de31:~/tmp$ grep "This is a" * --exclude="*.c"     file.h:This is a .h file          me@de31:~/tmp$ grep "This is a" * --exclude="*.h"     file.c:This is a .c file      As you can see, --include has the same output as --exclude. Another post on stackexchange claims "-r" is required, but I tried that as well, and it did not change the output.


title: virtualbox keeps showing error "Kernel driver not installed"

text: I'm trying to install a `Windows7` guest on a `Linux` host with Virtual box. I've set my guest up but when I hit `start`, I keep getting the message:               Kernel driver not installed (rc=-1908)          The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or there is a permission problem with /dev/vboxdrv. Please reinstall the kernel module by executing          '/etc/init.d/vboxdrv setup'          as root. If it is available in your distribution, you should install the DKMS package first. This package keeps track of Linux kernel changes and recompiles the vboxdrv kernel module if necessary.      I've ran`/etc/init.d/vboxdrv setup` n the shell but nothing happens and the error keeps popping up, how can I get this resolved?   Oh yeah, and I've installed `dkms` already:   `# apt-get install dkms` **EDIT 1**               # modprobe vboxdrv     modprobe: FATAL: Module vboxdrv not found.      **EDIT 2** There's `virtualbox-guest-dkms` and `virtualbox-dkms` and I have them both installed but I still get the same error...


title: How to find out logical interface name of tap0?

text: Well, the question is given. I have tap0 interface connecting to a server which provides IPv6 addresses. I would like to set my RDNSS settings in radvd config and I need the logical interface name of tap0 to do that.


title: Broadcast messages don't appear on gnome-terminal, but appear on xterm

text: I'm curious about the behavior of broadcast messages by               $ sudo wall myfile      the message from `myfile` appears on all `/dev/ttyN` devices (the ones to which I can switch by pressing `Ctrl`+`Alt`+`fN`), it also appears on the `xterm` windows I have opened, but it doesn't appear on `gnome-terminal` (actually I use Linux Mint with MATE, so it's `mate-terminal`, but it is fork of `gnome-terminal`). There's also interesting note if I run `tmux` in the `xterm`: I expected that the message would appear on all terminal sessions that are running in `tmux` (on all windows, and in each pane of each window), but actually the message appears just at current cursor position in the `xterm` window. If I check current controlling terminal by calling `tty`, it reports different terminals for different windows in tmux: say, I have `/dev/pts/11` in one tmux window and `/dev/pts/12` in another one. But, broadcast message appears just once for each `xterm` window, not for each terminal session opened in `tmux`. It seems to me that terminal emulator, when allocating pseudo-terminal, needs, like, "registering" it somewhere to make it able to receive broadcast messages, and so, `xterm` does it, but `mate-terminal` and `tmux` does not. But it sounds weird since pseudo-terminal is allocated by the kernel, so, it should be "registered" automatically everywhere it needs to be. I'd be glad if someone explain how does it work and why the behavior is that (seemingly weird).


title: How to know if a disk is an SSD or an HDD

text: I want to know whether a disk is a solid-state drive or hard disk. `lshw` is not installed. I do `yum install lshw` and it says there is no package named lshw. I do not know which version of http://pkgs.repoforge.org/lshw/ is suitable for my CentOS. I search the net and there is nothing that explain how to know whether a drive is SSD or HDD. Should I just format them first? Result of `fdisk -l`:               Disk /dev/sda: 120.0 GB, 120034123776 bytes     255 heads, 63 sectors/track, 14593 cylinders     Units = cylinders of 16065 * 512 = 8225280 bytes     Sector size (logical/physical): 512 bytes / 512 bytes     I/O size (minimum/optimal): 512 bytes / 512 bytes     Disk identifier: 0x00074f7d             Device Boot      Start         End      Blocks   Id  System     /dev/sda1   *           1          14      103424   83  Linux     Partition 1 does not end on cylinder boundary.     /dev/sda2              14         536     4194304   82  Linux swap / Solaris     Partition 2 does not end on cylinder boundary.     /dev/sda3             536       14594   112921600   83  Linux          Disk /dev/sdc: 120.0 GB, 120034123776 bytes     255 heads, 63 sectors/track, 14593 cylinders     Units = cylinders of 16065 * 512 = 8225280 bytes     Sector size (logical/physical): 512 bytes / 512 bytes     I/O size (minimum/optimal): 512 bytes / 512 bytes     Disk identifier: 0x00000000               Disk /dev/sdb: 128.0 GB, 128035676160 bytes     255 heads, 63 sectors/track, 15566 cylinders     Units = cylinders of 16065 * 512 = 8225280 bytes     Sector size (logical/physical): 512 bytes / 512 bytes     I/O size (minimum/optimal): 512 bytes / 512 bytes     Disk identifier: 0x00000000               Disk /dev/sdd: 480.1 GB, 480103981056 bytes     255 heads, 63 sectors/track, 58369 cylinders     Units = cylinders of 16065 * 512 = 8225280 bytes     Sector size (logical/physical): 512 bytes / 512 bytes     I/O size (minimum/optimal): 512 bytes / 512 bytes     Disk identifier: 0x00000000


title: How to set up an SSTP Server

text: Is there a way to set up a linux based, preferably ubuntu, SSTP server? I know there is a SSTP client available on sourceforge, but I can't find a server. To be clear: I do NOT want openVPN, I want SSTP.


title: Shell script parameter substitution

text: I have seen a line of shell script as follows:               local soft_upgrade=${3:-false}      What does this mean? I don't know what 3:-false means.


title: Sending raw video stream over network to an encoder

text: I'm trying to build a setup using OS X machines for streaming live video. Currently I use Flash Media Live Encoder on the same machine that is handling the video input unfortunately because FMLE uses up a lot of resources it causes delays in the video capture which can sometimes cause a latency of over 10 seconds on the video inputs. What I would like to do is have FMLE encoding on a remote computer on the network and have something in-between to essentially forward a webcam device from one machine to another without the overhead of it being encoded on the first machine. I'm not sure if something like this is possible but I would be grateful for any suggestions.


title: Arch Linux: Unsatisfied dependences: open-vm-tools-modules requires linux<3.10

text: pacman refuses to upgrade my Arch Linux system because of a conflict between open-vm-tools-modules and the linux kernel package:               $ sudo pacman -Syu     :: Synchronizing package databases...     core is up to date     extra is up to date      community 1988.4 KiB   970K/s 00:02 [#############################################################################] 100%      multilib is up to date     :: Starting full system upgrade...     resolving dependencies...     looking for inter-conflicts...     error: failed to prepare transaction (could not satisfy dependencies)     :: open-vm-tools-modules: requires linux<3.10      Do you have any suggestions how to analyze the problem?


title: USB 3.0 Device not enumerated on USB 3.0 Port in Debian 6.0 OS

text: I have installed Debian 6.0 OS (Linux kernel 2.6.32 )to test my USB Application as well as Driver. My USB device is working fine on USB 2.0 Port without any issue. But when i tried to connect the same device on USB 3.0 port at that time it enumerated as USB 2.0 Dvice not as USB 3.0 device which i have seen from dmesg output. Following is log of `dmesg` output of my device which is enumerated as USB 2.0 device not as USB 3.0 even if USB device is connected in USB 3.0 port.               [  945.271232] usb 3-1.2: new high speed USB device using ehci_hcd and address 4      This is the output of lsmod with xhci support.               #lsmod | grep xhci     usbcore               123175  4 usbhid,ehci_hcd,xhci      This is the snap output of lsusb -v of my USB device               #lsusb -d 1552:0004 -v      wMaxPacketSize     0x0200  1x 512 bytes      Please find the kernel and OS information below               #uname -a     Linux debian64 2.6.32-5-amd64 #1 SMP Mon Sep 23 22:14:43 UTC 2013 x86_64       GNU/Linux      so, USB 2.0 support maximum packet size as 512 bytes while USB 3.0 supports maximum packet size as 1024 bytes. It seems that my device is enumerated as USB 2.0 Device not as USB 3.0 Device. Is there any older kernel (2.6.32) issue which can not able to enumerate USB 3.0 Device or any thing else? Please let me know any feedback if any one has faced this type of issue or any one knows about this issue.


title: Is it possible to use the at command to schedule a job to run at a given timestamp?

text: I want to schedule a file to run using the `at` command, as described in this tutorial. I see that the `at` command supports the posix format -- but I don't see any mention of timestamps. Surely it is possible to schedule a job at a given timestamp.               $ man at | grep timestamp


title: Can't ssh to a machine

text: All of a sudden, I couldn't ssh to a machine to which I used to ssh earlier. Consider I am ssh-ing from A to B. Output when I run               ssh root@ip_addr_of_B      I get:               Permission denied (publickey,gssapi-keyex,gssapi-with-mic).      Output when I run `ssh -vv root@ip_addr_of_B` from A               OpenSSH_5.3p1, OpenSSL 1.0.0-fips 29 Mar 2010     debug1: Reading configuration data /etc/ssh/ssh_config     debug1: Applying options for *     debug2: ssh_connect: needpriv 0     debug1: Connecting to 64.103.232.105 [64.103.232.105] port 22.     debug1: Connection established.     debug1: permanently_set_uid: 0/0     debug1: identity file /root/.ssh/identity type -1     debug2: key_type_from_name: unknown key type '-----BEGIN'     debug2: key_type_from_name: unknown key type '-----END'     debug1: identity file /root/.ssh/id_rsa type 1     debug1: identity file /root/.ssh/id_dsa type -1     debug1: Remote protocol version 2.0, remote software version OpenSSH_5.3     debug1: match: OpenSSH_5.3 pat OpenSSH*     debug1: Enabling compatibility mode for protocol 2.0     debug1: Local version string SSH-2.0-OpenSSH_5.3     debug2: fd 3 setting O_NONBLOCK     debug1: SSH2_MSG_KEXINIT sent     debug1: SSH2_MSG_KEXINIT received     debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1     debug2: kex_parse_kexinit: ssh-rsa,ssh-dss     debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se     debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se     debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96     debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96     debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib     debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib     debug2: kex_parse_kexinit:     debug2: kex_parse_kexinit:     debug2: kex_parse_kexinit: first_kex_follows 0     debug2: kex_parse_kexinit: reserved 0     debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1     debug2: kex_parse_kexinit: ssh-rsa,ssh-dss     debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se     debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se     debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96     debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96     debug2: kex_parse_kexinit: none,zlib@openssh.com     debug2: kex_parse_kexinit: none,zlib@openssh.com     debug2: kex_parse_kexinit:     debug2: kex_parse_kexinit:     debug2: kex_parse_kexinit: first_kex_follows 0     debug2: kex_parse_kexinit: reserved 0     debug2: mac_setup: found hmac-md5     debug1: kex: server->client aes128-ctr hmac-md5 none     debug2: mac_setup: found hmac-md5     debug1: kex: client->server aes128-ctr hmac-md5 none     debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent     debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP     debug2: dh_gen_key: priv key bits set: 124/256     debug2: bits set: 523/1024     debug1: SSH2_MSG_KEX_DH_GEX_INIT sent     debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY     debug1: Host '64.103.232.105' is known and matches the RSA host key.     debug1: Found key in /root/.ssh/known_hosts:3     debug2: bits set: 522/1024     debug1: ssh_rsa_verify: signature correct     debug2: kex_derive_keys     debug2: set_newkeys: mode 1     debug1: SSH2_MSG_NEWKEYS sent     debug1: expecting SSH2_MSG_NEWKEYS     debug2: set_newkeys: mode 0     debug1: SSH2_MSG_NEWKEYS received     debug1: SSH2_MSG_SERVICE_REQUEST sent     debug2: service_accept: ssh-userauth     debug1: SSH2_MSG_SERVICE_ACCEPT received     debug2: key: /root/.ssh/identity ((nil))     debug2: key: /root/.ssh/id_rsa (0x7f972bb77030)     debug2: key: /root/.ssh/id_dsa ((nil))     debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic     debug1: Next authentication method: gssapi-keyex     debug1: No valid Key exchange context     debug2: we did not send a packet, disable method     debug1: Next authentication method: gssapi-with-mic     debug1: An invalid name was supplied     Cannot determine realm for numeric host address          debug1: An invalid name was supplied     Cannot determine realm for numeric host address          debug1: An invalid name was supplied               debug1: An invalid name was supplied               debug2: we did not send a packet, disable method     debug1: Next authentication method: publickey     debug1: Trying private key: /root/.ssh/identity     debug1: Offering public key: /root/.ssh/id_rsa     debug2: we sent a publickey packet, wait for reply     debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic     debug1: Trying private key: /root/.ssh/id_dsa     debug2: we did not send a packet, disable method     debug1: No more authentication methods to try.     Permission denied (publickey,gssapi-keyex,gssapi-with-mic).      Below is the sshd_config file of B.               #       $OpenBSD: sshd_config,v 1.80 2008/07/02 02:24:18 djm Exp $          # This is the sshd server system-wide configuration file.  See     # sshd_config(5) for more information.          # This sshd was compiled with PATH=/usr/local/bin:/bin:/usr/bin          # The strategy used for options in the default sshd_config shipped with     # OpenSSH is to specify options with their default value where     # possible, but leave them commented.  Uncommented options change a     # default value.          Port 22     #AddressFamily any     #ListenAddress 0.0.0.0     #ListenAddress ::          # Disable legacy (protocol version 1) support in the server for new     # installations. In future the default will change to require explicit     # activation of protocol 1     Protocol 2          # HostKey for protocol version 1     #HostKey /etc/ssh/ssh_host_key     # HostKeys for protocol version 2     #HostKey /etc/ssh/ssh_host_rsa_key     #HostKey /etc/ssh/ssh_host_dsa_key          # Lifetime and size of ephemeral version 1 server key     #KeyRegenerationInterval 1h     #ServerKeyBits 1024          # Logging     # obsoletes QuietMode and FascistLogging     #SyslogFacility AUTH     SyslogFacility AUTHPRIV     #LogLevel INFO          # Authentication:          #LoginGraceTime 2m     #PermitRootLogin yes     #StrictModes yes     #MaxAuthTries 6     #MaxSessions 10          #RSAAuthentication yes     #PubkeyAuthentication yes     #AuthorizedKeysFile     .ssh/authorized_keys     #AuthorizedKeysCommand none     #AuthorizedKeysCommandRunAs nobody          # For this to work you will also need host keys in /etc/ssh/ssh_known_hosts     #RhostsRSAAuthentication no     # similar for protocol version 2     #HostbasedAuthentication no     # Change to yes if you don't trust ~/.ssh/known_hosts for     # RhostsRSAAuthentication and HostbasedAuthentication     #IgnoreUserKnownHosts no     # Don't read the user's ~/.rhosts and ~/.shosts files     #IgnoreRhosts yes          # To disable tunneled clear text passwords, change to no here!     #PasswordAuthentication yes     #PermitEmptyPasswords no     PasswordAuthentication no          # Change to no to disable s/key passwords     #ChallengeResponseAuthentication yes     ChallengeResponseAuthentication no          # Kerberos options     #KerberosAuthentication no     #KerberosOrLocalPasswd yes     #KerberosTicketCleanup yes     #KerberosGetAFSToken no     #KerberosUseKuserok yes          # GSSAPI options     #GSSAPIAuthentication no     GSSAPIAuthentication yes     #GSSAPICleanupCredentials yes     GSSAPICleanupCredentials yes     #GSSAPIStrictAcceptorCheck yes     #GSSAPIKeyExchange no          # Set this to 'yes' to enable PAM authentication, account processing,     # and session processing. If this is enabled, PAM authentication will     # be allowed through the ChallengeResponseAuthentication and     # PasswordAuthentication.  Depending on your PAM configuration,     # PAM authentication via ChallengeResponseAuthentication may bypass     # the setting of "PermitRootLogin without-password".     # If you just want the PAM account and session checks to run without     # PAM authentication, then enable this but set PasswordAuthentication     # and ChallengeResponseAuthentication to 'no'.     #UsePAM no     UsePAM yes          # Accept locale-related environment variables     AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES     AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT     AcceptEnv LC_IDENTIFICATION LC_ALL LANGUAGE     AcceptEnv XMODIFIERS          #AllowAgentForwarding yes     #AllowTcpForwarding yes     #GatewayPorts no     #X11Forwarding no     X11Forwarding yes     #X11DisplayOffset 10     #X11UseLocalhost yes     #PrintMotd yes     #PrintLastLog yes     #TCPKeepAlive yes     #UseLogin no     #UsePrivilegeSeparation yes     #PermitUserEnvironment no     #Compression delayed     #ClientAliveInterval 0     #ClientAliveCountMax 3     #ShowPatchLevel no     #UseDNS yes     #PidFile /var/run/sshd.pid     #MaxStartups 10     #PermitTunnel no     #ChrootDirectory none          # no default banner path     #Banner none          # override default of no subsystems     Subsystem       sftp    /usr/libexec/openssh/sftp-server          # Example of overriding settings on a per-user basis     #Match User anoncvs     #       X11Forwarding no     #       AllowTcpForwarding no     #       ForceCommand cvs server      /var/log/secure of B contains just this one line               server sshd: connection closed by ip_addr_of_A      I can ssh from B to A. Issue happens only when I ssh from A to B. Also, I can ssh from A to any machine other than B.


title: Which programme calls csh.cshrc?

text: I understand that when a user logs into unix remotely, first a getty process is started. If authentication is successful, then etc/environement is called. However, I do not understand when is csh.cshrc and csh.login is called during this process?


title: Does Linux still have to reside within the first XX cylinders of a HDD?

text: It's been a while since I last bothered with partitioning my hard drive, but now it's time again and I remember last time I did this there was a requirement to put the root partition (or only GRUB?) not behind a certain cylinder number. Is this still the case or could I basically put Linux simply at the end of a drive?


title: How can I autocomplete each parameter in a different way?

text: I have a function called load_pg, which is defined like this:               load_pg () {         pg_restore --verbose --clean --no-acl --no-owner -h localhost -U $1 -d $2 $3     }      And I'm trying to autocomplete each parameter, with the following code:               #compdef load_pg     _arguments -s \       "1::_ldpguser" \       "2::_ldpgdb" \       "3::_ldpgfile"          _ldpguser () {       compadd $USER     }          _ldpgdb () {       compadd $(cat config/database.yml | grep -i database | awk '{print $2}')     }          _ldpgfile () {       compadd $(ls *.dump*)     }      Unfortunately, nothing happens when I press TAB. What am I doing wrong? I tried using code from the following answer


title: How to copy/move/delete files from the shell?

text: It's surely easy to do while using a graphical environment, but when I'm using the shell I have no idea on how to do that, I already tried to use `copy`, `move`, `delete`, and I discovered that these word are not existent commands on the shell.


title: Is there an easy way of installing madwifi drivers in Fedora 17?

text: Long time ago you could easily install madwifi drivers for atheros wireless cards as they were found in the livna (or RPM fusion?) repositories. Today I cannot find any guide or even mentions when googling it. Am I missing something?


title: cannot install locales in Debian 7 due to unmet dependencies

text: So instead of including the wheezy-backport in my sources.list I had the bright idea of adding jessie directly. Realising my mistake I cut out of and apt-get update/upgrade midway through and then reset sources.list to wheezy and ran through this list of commands. But when I try to `sudo apt-get install locales` this happens:               Reading package lists... Done     Building dependency tree            Reading state information... Done     Some packages could not be installed. This may mean that you have     requested an impossible situation or if you are using the unstable     distribution that some required packages have not yet been created     or been moved out of Incoming.     The following information may help to resolve the situation:          The following packages have unmet dependencies:      base-files : PreDepends: awk      erlang-crypto : Depends: libssl1.0.0 (>= 1.0.0) but it is not going to be installed      libc6 : Depends: libgcc1 but it is not going to be installed              Recommends: libc6-i686 but it is not going to be installed              Breaks: locales (< 2.19)      libncurses5 : PreDepends: multiarch-support but it is not going to be installed                    Recommends: libgpm2 but it is not going to be installed      libtinfo5 : PreDepends: multiarch-support but it is not going to be installed      locales : Depends: glibc-2.13-1                Depends: debconf (>= 0.5) but it is not going to be installed or                         debconf-2.0      procps : Depends: libncursesw5 (>= 5.6+20070908) but it is not going to be installed               Depends: libprocps0 (>= 1:3.3.2-1) but it is not going to be installed               Depends: initscripts but it is not going to be installed               Recommends: psmisc but it is not going to be installed      zlib1g : PreDepends: multiarch-support but it is not going to be installed     E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.      How do I solve these dependencies?


title: How to split and edit patches?

text: Sometimes I need to split a big patch into smaller (disjoint) ones, e.g. for every separate feature included. Usually I do it via standard vim yank/dd commands and split-window switching. But are there some tools/vim-tricks to help with such kind of editing? For example support for commands like: move the 3 next complete hunks to right opened patch file


title: Close All Piped Commands if one close

text: I'm running at least 3 commands (with progs) using pipes. For example               program1 bla bla | program2 blabla | program3 bla bla      Is possible to close all `programX` PIDS automatically if at least one exits/stops?


title: How can avoid these spurious characters in my bash prompt?

text: I have Fedora 20, and I would like to adapt the bash prompt to make it even more useful to me. At present my PS1 prompt is set by these lines in my ~/.bash_profile file:                LP=" Last prompt at: "      PS1="\[\033[s\033[0;0H\033[0;47m\033[K\033[1;34m[\$LP\]t\033[0m\033[u[<\u@\h \W>]\$ "      echo      Which gives me a nice line at the top of the screen, with a grey bar (which does not show in this copy) and the time of the last prompt, thus:               [ Last prompt at: ]09:22:46     [<Harry@localhost ~>]$       Without the `echo`, when a terminal screen is opened, the prompt obscures the message on the top line. What the echo does is to echo its argument, so that when .bashrc. is run as a new terminal is opened, with no argument it nicely goes to a new line, leaving the top line alone. Subsequent prompts do not run .bashrc so the echo to a new line does not happen. My question here concerns the "[ ]" brackets in the prompt round the `Last prompt at:` string. Please, how can I avoid these brackets appearing in the message displayed? SOLVED   In response to @guido's answer. I had already tried just removing the square brackets, but then I lost the string completely. I note here that you have added a space after the LP, and that does indeed give me what I want, but I don't understand why the space is necessary: please could you add to your answer to explain that?


title: How do I change the GRUB boot configuration from within Windows?

text: I currently dual boot Windows 7 and Fedora 14, using GRUB, with Windows 7 as my default. I know that from Fedora, I can set GRUB to boot into Fedora, overriding the default, on the next reboot. Is there a way to do this from Windows? That is, can I change the GRUB configuration permanently or semi- permanently from Windows so I don't have to be in front of my computer to boot into Fedora?


title: Why is 'while.. read.. <<EOL' performing variable expansion, yet <file and | don't?

text: Aside from the variable expansion mentioned in the question's heading, I also experience another alarming issue when reading inline data to `<<EOL`... When the data contains a backtick **`** , it causes an error. Both are substitution issues, but what and where is the relevant option? ...(and why is the inline read behaving differently?) Here is the script               #!/bin/bash     echo '==$BASH' | \     while IFS= read -r line ; do echo "# output 1: $line" ;done          echo '==$BASH'>junk     while IFS= read -r line ; do echo "# output 2: $line" ;done <junk          while IFS= read -r line ; do echo "# output 3: $line" ;done <<EOL     ==$BASH     EOL          while IFS= read -r line ; do echo "# output 4: $line" ;done <<EOL     `my backtick test     EOL      This is the output               # output 1: ==$BASH     # output 2: ==$BASH     # output 3: ==/bin/bash     ...: bad substitution: no closing "`" in `my backtick test


title: Easy Regex on Apache Logs

text: I'm struggling to create a regex for Apache logs. It's for `ignoreregex` on `Fail2ban`. I'd really like to be able to put something like `/house` to catch all files in that directory or `/house/jonross.html` specifically to match just that HTML file. The log format I'm using is below. The field is the one where `/city/index.html` is in this example. `66-121-89-14.domain.com - - [14/Apr/2011:14:47:05 +0100] "GET /city/index.html HTTP/1.1" 200 2577 "http://www.domain.com/referrer/" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.2.16) Gecko/20110319 Firefox/3.6.16"` Can a regex whizz please help ?


title: How can I determine which service run during bootup is responsible for a certain behaviour?

text: On my Fedora 14 system, some strange bind mounts have appeared in the list of mounts. They appear on every bootup. I can unmount them with `umount -l`, but I would like to find which package is mounting them (so that I can report a bug if necessary). How can I find out which service is causing these bind mounts to appear?


title: Use case for /usr/bin/lessecho

text: I can not come up with an example of how I could/would use `lessecho`. The description in the man page is fairly straight forward but is not helping me come up with a use case: > DESCRIPTION > > lessecho is a program that simply echos its arguments on standard output. > But any metacharacter in the output is preceded by an "escape" character, > which by default is a backslash. I searched through shellscripts on github and could not find any use of the command. Can you give one or two (or three) examples of lessecho? The more varied the use case the better.


title: Disable Keyboard & Mouse Temporarily

text: I would like to know how one can disable the keyboard & mouse temporarily in OS X.


title: How to sort updates based on release date on debian testing?

text: I'm a user of linux mint debian linux distro which is based on debian testing. Debian testing is a rolling release distro. The testing nature of this distro cause some package updates to be buggy. I'm looking for a way to sort packages by release date. I want to install updates after a mount day released to make sure there is minimum bug. I'm already familiar with a good program named apt- listbugs which show me reported bug before installing a package which help me to find reported bugs. In short: **How I can sort updates based on release date on debian testing?**


title: Multicast on local box

text: I have an application I need to interface with that listens to a multicast address. I'd like to be able to run a program I've written and have it interface with the other application by multicast without having the traffic leave the box. How can I go about setting this up and preferably doing it through software as I might need to deploy this on multiple boxes.


title: What's the simplest way to build a binary RPM from a source code checkout with a .spec file

text: I have a checkout of a source code tree (https://github.com/hautreux/slurm- spank-x11, for the curious) that contains a `.spec` file for building a RPM package. My question is, what's the simplest way of building the binary RPM from that source tree? In the Debian world, I would just run `debian/rules binary` from inside the source tree. Is there an equivalent that's close to being this easy in the RPM world?


title: VirtualBox on Debian

text: I have two kernels installed, 3.5.0 and 3.6.0. For several reasons I have to run kernel 3.5.0. VirtualBox works perfectly on 3.6.0, but not on 3.5.0. After I booted kernel 3.5.0 I triggered a module rebuild of the with `apt-get --reinstall install virtualbox-dkms`. This recompiled the VirtualBox module successfully. However, it fails to load.               # modprobe vboxdrv     ERROR: could not insert 'vboxdrv': Exec format error          /var/log/messages:          warning: `VirtualBox' uses 32-bit capabilities (legacy support in use)     vboxdrv: disagrees about version of symbol module_layout      The module seems to be installed correctly:               $ ls /lib/modules/3.5.0/updates/dkms/     vboxdrv.ko  vboxnetadp.ko  vboxnetflt.ko  vboxpci.ko      System information: Debian unstable, package `virtualbox-dkms` is installed               $ uname -r     3.5.0          $ apt-cache show virtualbox | grep Version     Version: 4.1.18-dfsg-1.1          $ apt-cache show dkms | grep Version     Version: 2.2.0.3-1.2      Here is the output of the module build:               -------- Uninstall Beginning --------     Module:  virtualbox     Version: 4.1.18     Kernel:  3.5.0 (x86_64)     -------------------------------------          Status: Before uninstall, this module version was ACTIVE on this kernel.          vboxdrv.ko:      - Uninstallation        - Deleting from: /lib/modules/3.5.0/updates/dkms/      - Original module        - No original module was found for this module on this kernel.        - Use the dkms install command to reinstall any previous module version.               vboxnetadp.ko:      - Uninstallation        - Deleting from: /lib/modules/3.5.0/updates/dkms/      - Original module        - No original module was found for this module on this kernel.        - Use the dkms install command to reinstall any previous module version.               vboxnetflt.ko:      - Uninstallation        - Deleting from: /lib/modules/3.5.0/updates/dkms/      - Original module        - No original module was found for this module on this kernel.        - Use the dkms install command to reinstall any previous module version.               vboxpci.ko:      - Uninstallation        - Deleting from: /lib/modules/3.5.0/updates/dkms/      - Original module        - No original module was found for this module on this kernel.        - Use the dkms install command to reinstall any previous module version.          depmod....          DKMS: uninstall completed.          -------- Uninstall Beginning --------     Module:  virtualbox     Version: 4.1.18     Kernel:  3.6.0 (x86_64)     -------------------------------------          Status: Before uninstall, this module version was ACTIVE on this kernel.          vboxdrv.ko:      - Uninstallation        - Deleting from: /lib/modules/3.6.0/updates/dkms/      - Original module        - No original module was found for this module on this kernel.        - Use the dkms install command to reinstall any previous module version.               vboxnetadp.ko:      - Uninstallation        - Deleting from: /lib/modules/3.6.0/updates/dkms/      - Original module        - No original module was found for this module on this kernel.        - Use the dkms install command to reinstall any previous module version.               vboxnetflt.ko:      - Uninstallation        - Deleting from: /lib/modules/3.6.0/updates/dkms/      - Original module        - No original module was found for this module on this kernel.        - Use the dkms install command to reinstall any previous module version.               vboxpci.ko:      - Uninstallation        - Deleting from: /lib/modules/3.6.0/updates/dkms/      - Original module        - No original module was found for this module on this kernel.        - Use the dkms install command to reinstall any previous module version.          depmod....          DKMS: uninstall completed.          ------------------------------     Deleting module version: 4.1.18     completely from the DKMS tree.     ------------------------------     Done.     Unpacking replacement virtualbox-dkms ...     Setting up virtualbox-dkms (4.1.18-dfsg-1.1) ...     Loading new virtualbox-4.1.18 DKMS files...     Building for 3.5.0 and 3.6.0     Building initial module for 3.5.0     Done.          vboxdrv:     Running module version sanity check.      - Original module        - No original module exists within this kernel      - Installation        - Installing to /lib/modules/3.5.0/updates/dkms/          vboxnetadp.ko:     Running module version sanity check.      - Original module        - No original module exists within this kernel      - Installation        - Installing to /lib/modules/3.5.0/updates/dkms/          vboxnetflt.ko:     Running module version sanity check.      - Original module        - No original module exists within this kernel      - Installation        - Installing to /lib/modules/3.5.0/updates/dkms/          vboxpci.ko:     Running module version sanity check.      - Original module        - No original module exists within this kernel      - Installation        - Installing to /lib/modules/3.5.0/updates/dkms/          depmod....          DKMS: install completed.     Building initial module for 3.6.0     Done.          vboxdrv:     Running module version sanity check.      - Original module        - No original module exists within this kernel      - Installation        - Installing to /lib/modules/3.6.0/updates/dkms/          vboxnetadp.ko:     Running module version sanity check.      - Original module        - No original module exists within this kernel      - Installation        - Installing to /lib/modules/3.6.0/updates/dkms/          vboxnetflt.ko:     Running module version sanity check.      - Original module        - No original module exists within this kernel      - Installation        - Installing to /lib/modules/3.6.0/updates/dkms/          vboxpci.ko:     Running module version sanity check.      - Original module        - No original module exists within this kernel      - Installation        - Installing to /lib/modules/3.6.0/updates/dkms/          depmod....          DKMS: install completed.     [ ok ] Stopping VirtualBox kernel modules.     [FAIL] Starting VirtualBox kernel modules[....] modprobe vboxdrv failed. Please use 'dmesg' to find out why ... failed!      failed!     invoke-rc.d: initscript virtualbox, action "restart" failed.      How can I get VirtualBox to work on 3.5.0?


title: Linux display server or program that can route video and/or images between its clients?

text: The JACK Audio Connection Kit (http://jackaudio.org/) is a really useful tool for working with audio on linux systems. It allows for both audio and MIDI data to be communicated between its clients, keeps them in sync with each other, and does so with minimal latency. This, of course, enables all sorts of separate audio applications to work together, allowing for a very flexible workflow for people who regularly edit/record/stream/create audio.. As with most other things, it's often very difficult to find a single program that fulfills all the needs of your video/image editing/animation workflow. As somebody who spends just as much time with video/images as I do with audio, I've been curious; is there some kind of application/daemon that allows for the routing of video or images from one program to another? If not, would the development of this type of application be feasible as a Wayland extension? It seems like the way the Wayland protocol works (having each client render its output to a memory buffer that is controlled by the server [i think?]) would create the potential to route the output of one client into another client.. So, does this type of thing exist? And if not, would it be possible in the future in conjunction with Wayland?


title: How to install linux-libc-dev in SliTaz (asm/ioctls.h)

text: When I installed gcc from SliTaz repository tazPkg command. I got > gcc version 4.5.2 (SliTaz) when I attempt to compile aircrack 1.2 beta on SliTaz. I get a error with missing file (No such file or directory) > asm/ioctls.h from > /usr/include/bits/ioctls.h:24:24: fatel error: asm/ioctls.h: No such file or > directory It's included from > /usr/include/sys/ioctl.h:27:0, from aircrack-ng.c:44: After research I figured out I need the **linux-libc-dev** to fix this. How do I get that? or anyone got aircrack 1.2 beta 1 working under SliTaz?


title: Private VPN compression for faster internet

text: _I've posted this same question onStackOverflow as well, but figured out I may get more Debian-specific answers here_ ## Background: I'm a student, and currently the WiFi connection at my school is very slow (dead slow). I have an 8Gb 4G data-plan, but even with that, I'm running short at the end of the month. I have set up a Debian headless at home (which has a 400 Mbps connection), and I'm already using it as an automated Seedbox, an L2TP-IPSec VPN, a BTSync server, and an Apache server. I started building two months ago — knowing I wouldn't get blazing fast internet connection — so I'm rather new to Debian ## Here is my question: Is it possible to **efficiently compress data over a private VPN**? I know some iPhone and Android apps like Onavo Extend can achieve that, and I was wondering how I could put this kind of system in place (if it is indeed effective enough) so that my 4G-data usage would be lighter. If I ever come to installing/building such VPN, it should be compatible with Debian (the server), Mac Os (my computer), and iOS (my phone). If you have any other suggestion on how I could speed up my school's WiFi. I did some tests on it; `ping www.google.com` times out, `arp -a` takes a long time but eventually displays a few peers, and any speedtest (when the bad connection gives me internet access) return 0.28 Mbps Down-Speeds.


title: Not able to install via GUI, Message: requires installation from unauthenticated sources

text: I am not able to install any application via the command line which requires installation from an unauthenticated source. I tried installing recordmydesktop via the Ubuntu Software Centre but when I try to install a message is displayed that it "requires installation from unauthenticated sources". And then when I click "O.K.", nothing happens. Therefore, I had to do it on the command line. This also happens when I get a message from Software Updater that "a new update is there for your system". So, I can't update/upgrade via GUI. I then have to do it via the command line. I have a related post here. (please don't consider it duplicate as it is not) ![enter image description here](http://i.stack.imgur.com/kUQQK.png) ![enter image description here](http://i.stack.imgur.com/ZBInw.png)


title: is it possible to reverse the output of "filters" command?

text: On Linux, the `filters` package could be great fun, really. Is there any way to reverse the output to what it basically was?               echo "Hi. My name is Chirp Chirp" | ky00te     Hy. My name ys Chyrrp Chyrrp      Is it possible to reverse " _Hy. My name ys Chyrrp Chyrrp_ " (back) to " _Hi. My name is Chirp Chirp_ ", knowing that the `ky00te` filter was used?


title: Zsh function with su and echo

text: I'm trying to add a function to my `.zshrc` that makes adding new USE flags to my `/etc/portage/package.use` file easier. Normally, I'd have to do               su -c 'echo "net-misc/aria2 bash-completion bittorrent" >> /etc/portage/package.use'      So I tried making a function like               new_use() {         su -c 'echo "$1" >> /etc/portage/package.use'     }      but then I realized it wouldn't work. I want to know if there's a way of making this function work, or at least if functions are appropriate for this. By the way, I don't mind having to type the root password every time I call the function.


title: How to check whether my cron job for backup using tar was succesfull

text: I have a cron job to tar backup websites and databases and upload the backup to a NAS. Instead of checking the tar files on the NAS. Is there any way to check if the tar backup process completed successfully?


title: I have high io stat. High writes. But what files are being written?

text: avg-cpu:  %user   %nice %system %iowait  %steal   %idle               11.50    0.02    5.38    0.07    0.00   83.04          Device:         rrqm/s   wrqm/s     r/s     w/s    rkB/s    wkB/s avgrq-sz avgqu-sz   await  svctm  %util     sdc               0.01    89.92    0.26   41.59     3.36   457.19    22.01     0.23    5.60   0.09   0.38     sdb               0.10    15.59    0.40   14.55     8.96   120.57    17.33     0.04    2.91   0.07   0.11     sda               0.13    45.37    0.96    8.09    20.06   213.56    51.63     0.02    2.64   0.16   0.14     sde               0.01    31.83    0.09   11.34     0.94   103.56    18.29     0.04    3.52   0.14   0.16     sdd               0.01    48.01    0.13   19.81     1.58   202.16    20.44     0.11    5.62   0.13   0.25      Is there a way to know what files are being written? 457 kB/s Also this other linux machine have this same problem.               avg-cpu:  %user   %nice %system %iowait  %steal   %idle               20.50    0.00   46.48   20.74    0.00   12.28          Device:         rrqm/s   wrqm/s     r/s     w/s    rkB/s    wkB/s avgrq-sz avgqu-sz   await  svctm  %util     sda               0.17    11.61    0.99    3.51    36.65    59.43    42.70     0.10   23.20   3.84   1.73     sdb               0.55   224.18   24.30   97.45   246.48  1287.12    25.19     3.96   32.53   7.88  95.91     sdd               0.53   226.75   25.56   90.96   283.50  1271.69    26.69     3.43   29.44   8.22  95.75     sdc               0.00     1.76    0.28    0.06     4.73     7.26    70.41     0.00   12.00   2.12   0.07     dm-0              0.00     0.00    1.11   14.77    36.41    58.92    12.01     1.00   62.86   1.09   1.74     dm-1              0.00     0.00    0.04    0.12     0.17     0.49     8.00     0.00   21.79   2.47   0.04     dm-2              0.00     0.00    0.01    0.00     0.05     0.01     8.50     0.00    7.90   2.08   0.00      1200 write request per second for a server that host nothing


title: Give an access to Internet to a server reachable by SSH but where Internet is blocked

text: I can use my home computer _A_ to connect by SSH to a server _B_ where access to the external network is blocked. In other words, all requests to Internet from _B_ throw an error: **Network is unreachable**. Can I redirect all these requests to pass through the computer _A_ which has an unrestricted access to Internet? Server _B_ is a server which hosts one of my website. I want to download files in order to install some software. But the connection is blocked. I was able to transfer files but it was complicated because the software versions are different on _A_ and _B_ , so the dependencies where different and it required different files on _A_ and _B_. I searched on Internet and it seems that I need a reverse tunnel. But I only found solutions where a port is redirected. But it's not what I need since I don't want _B_ to access to _A_ but to Internet.


title: Explaining how Linux shows windows/graphics

text: Can someone explain what packages Linux has to show windows and graphical stuff? What goes on the top of what, what are the most common options? What do the users really need to run? What is running in my present system? I am confused by these gdm, kdm, x11, xfce, lightdm, unity thing.


title: My grep (GNU grep) 2.5.1 does not obey backslash character and special expression

text: I'm trying to follow a section in The GNU Grep Manual but my expression isn't working. Is it my grep version? Red Hat 5.5.               $ rm file     $ echo 'hello world' > file     $ grep 'hello world' file     hello world     $ grep 'hello\sworld' file     $      Returns nothing. grep-2.5.1-55.el5