title: How do I get emacs on a newly installed Fedora 20 system?

text: I have upgraded from Linux Fedora 12 to Fedora 20 by buying a new computer, and the shop has kindly installed Linux for me from the DVD I bought for the purpose. I assume he did the most basic installation he could. It is all strange coming from 12, and I am a bit lost. The first thing I tried to do was use emacs, but it is not recognised as a command. I had already looked for emacs like this               [root@localhost ~]# cd /usr/share/emacs/     [root@localhost emacs]# ls     site-lisp     [root@localhost emacs]#       So it looked to me as if emacs was there and just not found.               [root@localhost emacs]# emacs     bash: emacs: command not found...      [root@localhost emacs]# yum install emacs     Loaded plugins: langpacks, refresh-packagekit     http://linuxdownload.adobe.com/linux/i386/repodata/repomd.xml: [Errno 14]   curl#6 - "Could not resolve host: linuxdownload.adobe.com"     Trying other mirror.     Error: Cannot retrieve metalink for repository: fedora/20/i386. Please verify its path and try again     [root@localhost emacs]#       So, please what is wrong, and how do I get out of it? In answering this, please treat me as a complete novice, so I can fully understand the answer. I don't immediately recognise most of the cryptic names for things, nor is it easy to discover, out of context, what they mean. ============================================================== That was my original question, so, in response to several answers I tried all this:               [root@localhost emacs]# yum search emacs     Loaded plugins: langpacks, refresh-packagekit     http://linuxdownload.adobe.com/linux/i386/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: linuxdownload.adobe.com"     Trying other mirror.     Error: Cannot retrieve metalink for repository: fedora/20/i386. Please verify its path and try again     [root@localhost emacs]# yum check-update     Loaded plugins: langpacks, refresh-packagekit     adobe-linux-i386                                         |  951 B     00:00          fedora/20/i386/metalink                                  |  34 kB     00:00          http://ftp.ps.pl/pub/Linux/fedora-linux/releases/20/Everything/i386/os/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: ftp.ps.pl"     Trying other mirror.        .....      and so on, miles of it, until I stopped it, thus:               ... http://sunsite.mff.cuni.cz/MIRRORS/fedora.redhat.com/linux/releases/20/Everything/i386/os/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: sunsite.mff.cuni.cz"     Trying other mirror.     ^Z     [1]+  Stopped    yum check-update                   ... and then tried this as well:               [root@localhost emacs]# yum refresh     Loaded plugins: langpacks, refresh-packagekit     No such command: refresh. Please use /usr/bin/yum --help     [root@localhost emacs]# yum install emacs     Loaded plugins: langpacks, refresh-packagekit     Existing lock /var/run/yum.pid: another copy is running as pid 4647.     Another app is currently holding the yum lock; waiting for it to exit...     The other application is: yum     Memory :  24 M RSS ( 51 MB VSZ)     Started: Wed Feb 26 15:31:47 2014 - 06:04 ago     State  : Traced/Stopped, pid: 4647     Another app is currently holding the yum lock; waiti .....      And there I gave up I would be grateful for more suggestions on haw to get out of this impasse. Please, _please,_ only answer if you do really recognise the problem and do know how to fix it. I have spent a lot of time trying other similar ideas from very kindly intended people who thought they _might_ have a solution. Perhaps the only way to resolve it might be to re-install Fedora, I haven't got any data to lose yet, but that does seem a dangerous and long winded way to go about it


title: Wifi on/off button on TP-Link WR841ND

text: I installed OpenWRT into TP-Link WR841ND. Everything works as expected, but I can't get the wifi on/off switch working. I followed the guide described on the OpenWRT page for this router. Scripts in `/etc/hotplug.d/button/` simply don't get executed at all when I turn the switch on or off. What could be the cause? Is there some package or kernel module missing? My installed packages:               base-files - 117-r36088     busybox - 1.19.4-6     dnsmasq - 2.62-2     dropbear - 2011.54-2     firewall - 2-55.1     hotplug2 - 1.0-beta-4     iptables - 1.4.10-4     iw - 3.6-1     jshn - 2013-01-29-0bc317aa4d9af44806c28ca286d79a8b5a92b2b8     kernel - 3.3.8-1-d6597ebf6203328d3519ea3c3371a493     kmod-ath - 3.3.8+2012-09-07-3     kmod-ath9k - 3.3.8+2012-09-07-3     kmod-ath9k-common - 3.3.8+2012-09-07-3     kmod-cfg80211 - 3.3.8+2012-09-07-3     kmod-crypto-aes - 3.3.8-1     kmod-crypto-arc4 - 3.3.8-1     kmod-crypto-core - 3.3.8-1     kmod-gpio-button-hotplug - 3.3.8-1     kmod-ipt-conntrack - 3.3.8-1     kmod-ipt-core - 3.3.8-1     kmod-ipt-nat - 3.3.8-1     kmod-ipt-nathelper - 3.3.8-1     kmod-leds-gpio - 3.3.8-1     kmod-ledtrig-default-on - 3.3.8-1     kmod-ledtrig-netdev - 3.3.8-1     kmod-ledtrig-timer - 3.3.8-1     kmod-ledtrig-usbdev - 3.3.8-1     kmod-lib-crc-ccitt - 3.3.8-1     kmod-mac80211 - 3.3.8+2012-09-07-3     kmod-nls-base - 3.3.8-1     kmod-ppp - 3.3.8-1     kmod-pppoe - 3.3.8-1     kmod-pppox - 3.3.8-1     kmod-usb-core - 3.3.8-1     kmod-usb-ohci - 3.3.8-1     kmod-usb2 - 3.3.8-1     kmod-wdt-ath79 - 3.3.8-1     libblobmsg-json - 2013-01-29-0bc317aa4d9af44806c28ca286d79a8b5a92b2b8     libc - 0.9.33.2-1     libgcc - 4.6-linaro-1     libip4tc - 1.4.10-4     libiwinfo - 36     libiwinfo-lua - 36     libjson - 0.9-2     liblua - 5.1.4-8     libnl-tiny - 0.1-3     libubox - 2013-01-29-0bc317aa4d9af44806c28ca286d79a8b5a92b2b8     libubus - 2013-01-13-bf566871bd6a633e4504c60c6fc55b2a97305a50     libubus-lua - 2013-01-13-bf566871bd6a633e4504c60c6fc55b2a97305a50     libuci - 2013-01-04.1-1     libuci-lua - 2013-01-04.1-1     libxtables - 1.4.10-4     lua - 5.1.4-8     luci - 0.11.1-1     luci-app-firewall - 0.11.1-1     luci-i18n-english - 0.11.1-1     luci-lib-core - 0.11.1-1     luci-lib-ipkg - 0.11.1-1     luci-lib-nixio - 0.11.1-1     luci-lib-sys - 0.11.1-1     luci-lib-web - 0.11.1-1     luci-mod-admin-core - 0.11.1-1     luci-mod-admin-full - 0.11.1-1     luci-proto-core - 0.11.1-1     luci-proto-ppp - 0.11.1-1     luci-sgi-cgi - 0.11.1-1     luci-theme-base - 0.11.1-1     luci-theme-openwrt - 0.11.1-1     mtd - 18.1     netifd - 2013-01-29.2-4bb99d4eb462776336928392010b372236ac3c93     opkg - 618-3     ppp - 2.4.5-8     ppp-mod-pppoe - 2.4.5-8     swconfig - 10     uboot-envtools - 2012.04.01-1     ubus - 2013-01-13-bf566871bd6a633e4504c60c6fc55b2a97305a50     ubusd - 2013-01-13-bf566871bd6a633e4504c60c6fc55b2a97305a50     uci - 2013-01-04.1-1     uhttpd - 2012-10-30-e57bf6d8bfa465a50eea2c30269acdfe751a46fd     wifitoggle - 1-3     wpad-mini - 20120910-1      Kernel modules:               Module                  Size  Used by    Tainted: G       ath79_wdt               2240  1      ohci_hcd               16160  0      ledtrig_usbdev          2032  0      ledtrig_netdev          3184  0      nf_nat_irc               784  0      nf_conntrack_irc        2464  1 nf_nat_irc     nf_nat_ftp               976  0      nf_conntrack_ftp        4416  1 nf_nat_ftp     ipt_MASQUERADE           976  1      iptable_nat             2544  1      nf_nat                 10256  4 nf_nat_irc,nf_nat_ftp,ipt_MASQUERADE,iptable_nat     pppoe                   7488  0      xt_conntrack            2048  3      xt_CT                   1216  0      xt_NOTRACK               448  0      iptable_raw              560  1      xt_state                 608  0      nf_conntrack_ipv4       4384  6 iptable_nat,nf_nat     nf_defrag_ipv4           656  1 nf_conntrack_ipv4     nf_conntrack           38336 12 nf_nat_irc,nf_conntrack_irc,nf_nat_ftp,nf_conntrack_ftp,ipt_MASQUERADE,iptable_nat,nf_nat,xt_conntrack,xt_CT,xt_NOTRACK,xt_state,nf_conntrack_ipv4     ehci_hcd               33632  0      pppox                   1152  1 pppoe     ipt_REJECT              1808  2      xt_TCPMSS               2560  1      ipt_LOG                 6160  0      xt_comment               400  0      xt_multiport            1104  0      xt_mac                   528  0      xt_limit                 944  1      iptable_mangle           832  1      iptable_filter           592  1      ip_tables               8864  4 iptable_nat,iptable_raw,iptable_mangle,iptable_filter     xt_tcpudp               1632  4      x_tables                9984 18 ipt_MASQUERADE,iptable_nat,xt_conntrack,xt_CT,xt_NOTRACK,iptable_raw,xt_state,ipt_REJECT,xt_TCPMSS,ipt_LOG,xt_comment,xt_multiport,xt_mac,xt_limit,iptable_mangle,iptable_filter,ip_tables,xt_tcpudp     ppp_async               5952  0      ppp_generic            18848  3 pppoe,pppox,ppp_async     slhc                    4368  1 ppp_generic     ath9k                  84944  0      ath9k_common            1152  1 ath9k     ath9k_hw              329024  2 ath9k,ath9k_common     ath                    14320  3 ath9k,ath9k_common,ath9k_hw     mac80211              252240  1 ath9k     usbcore                99200  4 ohci_hcd,ledtrig_usbdev,ehci_hcd     usb_common               480  1 usbcore     nls_base                4640  1 usbcore     crc_ccitt                944  1 ppp_async     cfg80211              153696  3 ath9k,ath,mac80211     compat                  5776  5 ath9k,ath9k_common,ath9k_hw,mac80211,cfg80211     arc4                     768  2      aes_generic            29808  0      crypto_algapi           9200  2 arc4,aes_generic     ledtrig_timer           1072  0      ledtrig_default_on       416  0      leds_gpio               1552  0      gpio_button_hotplug     3184  0


title: Mirror dual monitors with different resolutions

text: I use the following `xrandr` command to mirror my 17" laptop with a 27" external monitor, so I can use it to do presentations: `xrandr --output LVDS1 --mode 1600x900 --output HDMI1 --mode 1920x1080 --same- as LVDS1` However, the external monitor (HDMI1) falls back to a 1600x900 resolution instead of 1920x1080. xrandr output:               Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 8192 x 8192     LVDS1 connected primary (normal left inverted right x axis y axis        1600x900       60.0 +        1024x768       60.0          800x600        60.3     56.2          640x480        59.9       VGA1 disconnected (normal left inverted right x axis y axis)     HDMI1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 598mm x 336mm        1920x1080      60.0*+        1680x1050      59.9          1280x1024      75.0     60.0          1440x900       75.0     59.9          1280x960       60.0          1152x864       75.0          1024x768       75.1     70.1     60.0          832x624        74.6          800x600        72.2     75.0     60.3     56.2          640x480        72.8     75.0     66.7     60.0          720x400        70.1       DP1 disconnected (normal left inverted right x axis y axis)


title: command not found handle doesn't work for url

text: I'm trying to setup the command_not_found_handle for URL links,               %> command_not_found_handle() { echo "OK"; }     %> aaaaa     OK     %> http://www.google.com     bash: http://www.google.com: No such file or directory      So it works for normal input, but not URL links, any ideas?


title: Configuring Vim with clientserver and clipboard

text: On OS X I have vim working just fine from homebrew. The default homebrew install compiles vim with these flags.               ./configure       --prefix=/usr/local       --mandir=/usr/local/Cellar/vim/7.4.161/share/man       --enable-multibyte       --with-tlib=ncurses       --enable-cscope       --with-features=huge       --with-compiledby=Homebrew            --enable-rubyinterp       --enable-pythoninterp       --enable-gui=no       --without-x      This install works perfectly with the system clipboard using this in my vimrc:               if has("clipboard")         set clipboard=unnamed     endif      Homebrew also has flags for installing `--with-client-server` if you use this it compiles vim with:               ./configure       --prefix=/usr/local       --mandir=/usr/local/Cellar/vim/7.4.161/share/man       --enable-multibyte       --with-tlib=ncurses       --enable-cscope       --with-features=huge       --with-compiledby=Homebrew            --enable-rubyinterp       --enable-pythoninterp       --enable-gui=gtk2      This compiles vim with `+clientserver` and `+clipboard`. Running `set clipboard?` returns `unnamed` yet now the integration with the system clipboard does not work at all, even when prefixing commands with `"+` or `"*`. Is there a way I can have both of these features work with a single vim install? **EDIT:** After some more searching I believe this is an issue on OS X with the system pasteboard not being correctly synced with the X11 server. I found a similar question here which gives you the settings you need to setup clipboard sync with X11. There is also a gui for that in the newer versions. ![X11 Prefs](http://i.stack.imgur.com/0Z4eT.png) Unfortunately this didn't work. I believe it's covered here in an open bug report on the xquartz tracker. It also looks like this may have been an issue for a while.


title: Changing the PS1 on an interactive bash subshell easily

text: I have a situation where I need to provide a subshell to a user mid-way through a longish process. I would like to change the prompt to remind the user that they are in a special subshell and haven't gone through the rest of the process yet. I thought that this would do what I want...               echo "PS1='foo:'" | bash -i      But when I enter that line, this is the output I get               me@mercury:~$ PS1='foo:'     foo:exit     me@mercury:~$       Is there a simple way around this? I could writeup my own custom bashrc... but I'd prefer to preserve the user's usual bash-shell setup.


title: Open programs without locking terminal through Putty

text: There's a bunch of proprietary software installed on our university linux computers, which is accessible through remote control via Putty. When I'm using my own Linux box, if I want to retain control over the terminal after launching a program, I just use 'matlab $' etc. But for some reason, this doesn't work in Putty, which is pretty annoying since we need access to Matlab, emacs and AMPL all at the same time. 'matlab $' in the Putty terminal simply opens Matlab and leaves my one terminal unavailable. Any ideas on what's going on here?


title: If there's no /dev/md* and not /proc/mdstat, is it safe to use a second disk as a second disk?

text: There's two HDs in this server. I don't see an md device (see title) or an mdstat file. So, can I be safe that the second disk is currently unused? Yes, I do want/need the second disk as space much more than RAID-"safety", in case you're wondering. OS is Debian sid (aka unstable).


title: How can I tell what version of apache I'm running?

text: I know about the phpinfo() way but is there any other way? I'm using CentOS and I can't find the httpd executable to run httpd -v.


title: Why do I get different outputs when running my shellscript manually from when I run it with cron?

text: I have a fairly simple shell script (`foo.sh`) that looks like this:               #!/bin/bash     echo -n "$USER,$(date)," `binary -flags | sed -e '1,30d'`;     exit 0;      This script is supposed to prepare some output which will then be appended to a text file, like so:               foo.sh >> data.csv      When I run the above on a root prompt, it works fine. However, when I type the exact same command into my (root) crontab which looks like this:               05 * * * * /root/foo.sh >> /path/to/data.csv      The crontab output differs! I wasn't expecting this and I can't understand why. See examples below:               Expected, normal output from running my .sh (example):     Fri Jun 14 16:32:34 CEST 2013,20130614163304,268828672,71682561          The output written to the file by cron:     Fri Jun 14 16:32:34 CEST 2013,      The rights on the binary run in the .sh looks like this:               -rwxr-xr-x  1 root root      Why does the output differ? How can I get the correct output into my CSV file?


title: Does cron impose some limitations to types of commands and privilege of execution?

text: I've experienced an issue where some of my scripts run perfectly fine when I call them manually, but these same scripts when called as cron jobs via `cron` don't seem to work at all. **So my question:** I'd like to know if there are restrictions that apply with the use of commands and/or scripts (and the privilege of execution) in a script scheduled to run with `cron`?


title: connecting to a wifi using wpa_supplicant

text: I have some problems connecting to my WiFi (WPA2, standard settings) using wpa_supplicant. My `/etc/wpa_supplicant.conf` is as follows:               network={         ssid="MYWIFI"         psk=********     }      then my /etc/network/interfaces               auto lo     iface lo inet loopback      After putting `wpa_supplicant -D -i wlan0 -c /etc/wpa_supplicant.conf` into the console I get a connection, it says: > Successfully initialized wpa_supplicant. But there is no connection. How can I ge this to work?


title: Is there an equivalent book/resource to "The Linux Programming Interface" for FreeBSD?

text: Most of you here are probably aware of the famous _The Linux Programming Interface_ , which presents a truly masterful guide to the Linux and general POSIX APIs. I know that much of the general POSIX knowledge can be applied to all Unix/Unix-like systems. However, I'm interested as to whether there is an equivalent book, document or resource concerning lower level FreeBSD systems programming and interfaces that are exclusive to it, such as GEOM and devd. Or should I simply stick to manpages and docs?


title: Install NCDU on Scientific from EPEL

text: **Introduction** The commands specified in the answers to this question and this documentation have been applied to install NCDU on Scientific using EPEL without success. According to this documentation it should be possible to install ncdu using EPEL. _setup EPEL repo_               $ sudo wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm     $ sudo rpm -ivh epel-release-6-8.noarch.rpm     warning: epel-release-6-8.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 060     8b895: NOKEY     Preparing...                ########################################### [100%]             package epel-release-6-8.noarch is already installed      _install ncdu_               $ sudo yum install ncdu -y     Loaded plugins: security     Error: Cannot retrieve repository metadata (repomd.xml) for repository: epel. Please verify its path and try again      **Question:** How to install NCDU on Scientific from EPEL?


title: Linux From Scratch: libgmp.la, libmpfr.la, and libmpc.la not found during version-check

text: I'm trying to build a Linux From Scratch system on my host Linux Mint machine. However, when I run the version-check.sh file, it returns that my system is missing `libgmp.la`, `libmpfr.la`, and `libmpc.la`, even though I have `libgmp10`, `lipmpc3`, and `libmpfr4` . Here is the output of version check:               bash, version 4.2.45(1)-release     /bin/sh -> /bin/dash     Binutils: (GNU Binutils for Ubuntu) 2.23.52.20130913     bison (GNU Bison) 2.7.12-4996     /usr/bin/yacc -> /usr/bin/bison.yacc     bzip2,  Version 1.0.6, 6-Sept-2010.     Coreutils:  8.20     diff (GNU diffutils) 3.2     find (GNU findutils) 4.4.2     GNU Awk 4.0.1     /usr/bin/awk -> /usr/bin/gawk     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1     g++ (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1     (Ubuntu EGLIBC 2.17-93ubuntu4) 2.17     grep (GNU grep) 2.14     gzip 1.6     Linux version 3.11.0-12-generic (buildd@komainu) (gcc version 4.8.1           (Ubuntu/Linaro 4.8.1-10ubuntu7) ) #19-Ubuntu SMP Wed Oct 9 16:12:00 UTC 2013     m4 (GNU M4) 1.4.16     GNU Make 3.81     GNU patch 2.7.1     Perl version='5.14.2';     sed (GNU sed) 4.2.2     tar (GNU tar) 1.26     xz (XZ Utils) 5.1.0alpha     g++ compilation OK     libgmp.la: not found     libmpfr.la: not found     libmpc.la: not found      **NOTE:** I'm following version 7.5 of the book and I'm using a 32-bit Linux Mint host (kernel 3.11.0-12).


title: How do I enable a new repository in CentOS?

text: I need to upgrade my version of subversion however, simply running `yum update subversion` tells me: > Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * > addons: mirror.nic.uoregon.edu * base: mirror.ubiquityservers.com * extras: > centos.promopeddler.com * updates: mirror.chpc.utah.edu Setting up Update > Process No Packages marked for Update So, I need to know how I can find a repository for subversion-1.6 and the steps involved to impliment this repository on my machine. I see this rpm here: http://ftp.redhat.com/pub/redhat/linux/enterprise/5Client/en/os/SRPMS/subversion-1.6.11-7.el5.src.rpm but I don't know that this really helps. Thank you very much!


title: md5deep utility giving wrong/different output!

text: md5deep utility gives different result when calculating hashes. I have used several online tools to calculate hash and they give same result but md5sum or md5deep program on linux gives different output. Any ideas what I am doing wrong?               Website        = http://hash.online-convert.com/whirlpool-generator      string         = foobar     whirlpool hash = 9923afaec3a86f865bb231a588f453f84e8151a2deb4109aebc6de4284be5bebcff4fab82a7e51d920237340a043736e9d13bab196006dcca0fe65314d68eab9          Website        = http://www.sha1-online.com/     string         = foobar     whirlpool hash = 9923afaec3a86f865bb231a588f453f84e8151a2deb4109aebc6de4284be5bebcff4fab82a7e51d920237340a043736e9d13bab196006dcca0fe65314d68eab9          md5deep tool on Linux Mint x64 KDE i5 processor     string = foobar     whirlpool = 37b100ba4d775e394c6db6062e2ca0cc8431948f7aea03c0a07991bcd139599735bdcac9dc0b4ae3c91912f93dd0f736a8c0c7a44996c2bd2e16939ac37c44a7


title: How can I automate this manual task of finding a particular ancestor process from a given pid or command?

text: I know the full command "/bin/child_process" or its pid (3996 in this case) and I'm running `ps auxf` and then visually identifying its ancestor process `/bin/parent_process foobar`.               root      3227  0.0  0.0    992   296 ?        S<s  10:35   0:00 /bin/parent_process foobar     20058     3987  0.0  0.0  17716  1452 ?        S<s  10:35   0:00  \_ /bin/bash     20058     3989  0.0  0.0  19240  1728 ?        S<   10:35   0:00      \_ /bin/bash other_args     20058     3996  0.2  1.5 1621804 546104 ?      S<l  10:35   0:54          \_ /bin/child_process      The ancestor process may not always be 3 levels away. Is there a way I can automate this with a command such that I could supply just the pid `3996` or the command `/bin/child_process` and get out `/bin/parent_process foobar`? In particular, it will always say `/bin/parent_process`, but it will have a different argument than `foobar` every time. The output of `ps auxf` is very difficult to traverse as a hierarchy to determine a particular ancestor process.


title: What happened to Primary Administrator profile in Solaris 11?

text: What happened to the "Primary Administrator" profile in Solaris 11? Why was it cut? Are there any alternatives? How does it differ from the root-role (which is `profiles=All;auths=solaris.*`) Is the less powerful "System Administrator" better? Why? Reason to use/not use either/both? On my system, I "re-created" it by adding entries in `/etc/security/prof_attr.d` and `/etc/security/exec_attr.d...` However Solaris 11 lacks the solaris.grant (`auths=solaris.all,solaris.grant;exec=uid=0,gid=0`)... Is grant no longer needed? Are there alternatives?


title: error while install a package

text: I have a problem when I want to install `python-pycurl` package:               root@edx:/var/tmp/configuration-master/playbooks# apt-get install python-pycurl     Reading package lists... Done     Building dependency tree            Reading state information... Done     Suggested packages:       libcurl4-gnutls-dev python-pycurl-dbg     The following NEW packages will be installed:       python-pycurl     0 upgraded, 1 newly installed, 0 to remove and 179 not upgraded.     Need to get 0 B/62.3 kB of archives.     After this operation, 233 kB of additional disk space will be used.     debconf: delaying package configuration, since apt-utils is not installed     dpkg: error processing /var/cache/apt/archives/python-pycurl_7.19.3.1-1_amd64.deb (--unpack):      parse error, in file '/var/lib/dpkg/tmp.ci/control' near line 7 package 'python-pycurl':      `Depends' field, invalid package name `python:any': character `:' not allowed (only letters, digits and characters `-+._')     Errors were encountered while processing:      /var/cache/apt/archives/python-pycurl_7.19.3.1-1_amd64.deb     E: Sub-process /usr/bin/dpkg returned an error code (1)      I don't know where the problem is, here is my `/etc/apt/source.list` file :               deb http://security.debian.org/ squeeze/updates main contrib     deb-src http://security.debian.org/ squeeze/updates main non-free          #mirrors     deb http://mirrors.kernel.org/debian/ unstable main contrib non-free     deb-src http://mirrors.kernel.org/debian/ unstable main contrib non-free            # Base repository     deb http://ftp.debian.org/debian/ squeeze main contrib non-free     deb-src http://ftp.debian.org/debian/ squeeze main contrib non-free          # Stable updates     deb http://ftp.debian.org/debian/ squeeze-updates main contrib non-free     deb-src http://ftp.debian.org/debian/ squeeze-updates main contrib non-free      Does someone have any idea ?


title: Compiling Awesome from source on CentOS: cannot find libraries

text: I am trying to install `awesome` (v3.5.5) on `CentOS7`. Since I could not find a repository that carries it, I am compiling it from source. However, I am getting this error on running make:               -- checking for modules 'glib-2.0;gdk-pixbuf-2.0;cairo;x11;xcb-cursor;xcb-randr;xcb-xtest;xcb-xinerama;xcb-shape;xcb-util>=0.3.8;xcb-keysyms>=0.3.4;xcb-icccm>=0.3.8;cairo-xcb;libstartup-notification-1.0>=0.10;xproto>=7.0.15;libxdg-basedir>=1.0.0'     --   package 'xcb-cursor' not found     --   package 'libxdg-basedir>=1.0.0' not found     CMake Error at /usr/share/cmake/Modules/FindPkgConfig.cmake:279 (message):       A required package was not found     Call Stack (most recent call first):       /usr/share/cmake/Modules/FindPkgConfig.cmake:333 (_pkg_check_modules_internal)       awesomeConfig.cmake:134 (pkg_check_modules)       CMakeLists.txt:15 (include)               CMake Error at awesomeConfig.cmake:153 (message):     Call Stack (most recent call first):       CMakeLists.txt:15 (include)               -- Configuring incomplete, errors occurred!     make: *** [cmake] Error 1      However, I have install (again from source) those two libraries:               [awesome-3.5.5]$ ls /usr/local/lib/*cursor*     /usr/local/lib/libxcb-cursor.a   /usr/local/lib/libxcb-cursor.so.0     /usr/local/lib/libxcb-cursor.la  /usr/local/lib/libxcb-cursor.so.0.0.0     /usr/local/lib/libxcb-cursor.so     [awesome-3.5.5]$ ls /usr/lcoal/lib/*libxdg-basedir*     /usr/local/lib/libxdg-basedir.a   /usr/local/lib/libxdg-basedir.so.1     /usr/local/lib/libxdg-basedir.la  /usr/local/lib/libxdg-basedir.so.1.2.0     /usr/local/lib/libxdg-basedir.so      and I configured ldconfig to include /usr/local/lib, updated the cache...               ldconfig -p | grep xcb-cursor         libxcb-cursor.so.0 (libc6,x86-64) => /usr/local/lib/libxcb-cursor.so.0         libxcb-cursor.so (libc6,x86-64) => /usr/local/lib/libxcb-cursor.so          ldconfig -p | grep xdg-basedir         libxdg-basedir.so.1 (libc6,x86-64) => /usr/local/lib/libxdg-basedir.so.1         libxdg-basedir.so (libc6,x86-64) => /usr/local/lib/libxdg-basedir.so      I am afraid that I am stumped... Could it be SELinux?


title: Get the actions for a command programmatically

text: Let's take the `git` example:               $ git<TAB><TAB>     git                 git-import-dscs     git-shell     git-buildpackage    git-import-orig     git-upload-archive     git-dch             git-pbuilder        git-upload-pack     git-import-dsc      git-receive-pack          Notice the after `git`:               $ git <tab><tab>     add                 fetch               push      am                  filter-branch       rebase      annotate            format-patch        reflog      apply               fsck                relink      archive             gc                  remote      bisect              get-tar-commit-id   repack      blame               grep                replace      branch              help                request-pull      buildpackage        imap-send           reset      bundle              import-dsc          revert      checkout            import-dscs         rm      cherry              import-orig         shortlog      cherry-pick         init                show      clean               instaweb            show-branch      clone               log                 stage      column              merge               stash      commit              mergetool           status      config              mv                  submodule      credential          name-rev            subtree      --More--      Writing `git re`               $ git re<tab><tab>     rebase         relink         repack         request-pull   revert      reflog         remote         replace        reset                    $ git remote <tab><tab>     add            remove         set-branches   set-url        update      prune          rename         set-head       show                 Generally:               $ command <tab>      [actions]      How can I get these actions programmatically? Is this possible via a shell/bash script?


title: Blanket blocking SMTP with whitelist

text: So using a VPS environment, whereby we need to block outbound SMTP by default (spammers), with the ability to unblock when needed. We have found some scripts eg:   iptables -I FORWARD 1 -d $VPS_IP -p tcp -m tcp --dport 25 -j DROP   iptables -I FORWARD 1 -s $VPS_IP -p tcp -m tcp --dport 25 -j DROP and   iptables -I FORWARD -p tcp --sport 25 -j DROP   iptables -I FORWARD -p tcp --dport 25 -j DROP However controlling the blocking via the first set is inefficient, especially when the range of IPs can be changing. So the question is, if we use set 2 (blanket block), how do we allow certain IPs? I'm guessing we need to add something to the OUTPUT chain, however wouldn't the blanket block be processed first? Or if we add to FORWARD, since they are further down the chain, wouldn't the blanket block go first? etc.. The iptables -L looks like:               [root@server ~]# iptables -L     Chain INPUT (policy ACCEPT)     target     prot opt source               destination          Chain FORWARD (policy ACCEPT)     target     prot opt source               destination     SOLUSVM_TRAFFIC_IN  all  --  anywhere             anywhere     SOLUSVM_TRAFFIC_OUT  all  --  anywhere             anywhere            all  --  somedomain  anywhere            all  --  anywhere             somedomain            Chain OUTPUT (policy ACCEPT)     target     prot opt source               destination          Chain SOLUSVM_TRAFFIC_IN (1 references)     target     prot opt source               destination            all  --  anywhere             somedomain            Chain SOLUSVM_TRAFFIC_OUT (1 references)     target     prot opt source               destination            all  --  somedomain    anywhere      Much appreciated! (going to post a job on coders for hire or something if it isn't answered)


title: Will the Linux ( red-hat ) Open VPNC Client connect to checkpoint or nortel VPN gateways?

text: Site: http://www.oucs.ox.ac.uk/network/vpn/linux-solaris/index.xml?ID=VPNC What is open VPNC: VPNC is an open-source VPN client for Linux and other Unix systems which is compatible with the OUCS VPN Service and which offers some advantages over the ‘official’ Cisco VPN client for Linux My question: So VPNC will connect to Cisco VPN gateways. But will it connect to Checkpoint's or Nortel's gateways as well? IF NOT: then please advice if there are some other tools like OPEN VPNC that can service checkpoint or Nortel VPNs ?


title: How to sniff download information of different pc's on a network(router)

text: Actually I am making an Log Analyzer for downloads on a network by different users.So i want to know who downloaded what in a same network.I know SSL packets cannot be sniffed but I want only downloads that is not secured by SSL.


title: The libblkid library: any way to use it with blocks in the core memory?

text: I know how to use the `libblkid` library to analyze existing block devices. I'd like to use it to analyze a memory extent **before** I write it to the block device. Something like that:               char block[4096];     ... writing into the block      blkid_probe pr = blkid_new_probe_from_address(block);     ... calling usual libblkid function on the pr      Of course, the `blkid_new_probe_from_address` doesn't exist - is it any way to create this kind of function using existing `libblkid` functions and without getting much into guts of this library? Or, may be some other toolkit can achieve that?


title: Copy a local file to a remote server, non-root privileges over sudo?

text: I'd like to do something like:               scp local_file remote_server:/some_directory      But in order to gain privileges to /some_directory, we need to call `sudo`. I know that a similar question had already been asked quite a few times here, but most of the answers either took advantage of `sudo`'s password caching (which for some reason doesn't seem to work for me in two consecutive `ssh` calls) or the fact that we're root (so we can set up a passwordless `sudo` or make SSH let in root). In the latter, both of the solutions seem insecure, so I'd rather like to assume that we're not calling `sudo` to become root and thus can't reconfigure the system. What can be done in such a situation to simply copy a file? Here are my attempts so far:               (      read -s -p 'Enter password: ' pass;      echo $pass ;      tar cf - local_file ) | ssh -t -t remote_server 'sudo tar -C /some_directory' )      Is there a better way?


title: What is the effect of "${(@f)…}" in Zsh?

text: I ran into a Zsh script and wanted to know its meaning. In the scripts below there is `${$(@f)$(egrep "$2","$file")}` expression. From what I searched, `@` is to use represent all positional parameters, but then the postfix letter `f` is not mentioned anywhere in above script and I couldn't find any online material saying its special meaning.               #!/usr/bin/env zsh          tmp_file="/tmp/_unsorted_find_n_grep"     echo "--- find <$2> in <$1>" > $tmp_file          find . -follow -iname "$1" | while read file     do         timestamp=$(ls -l --time-style=+"%Y-%m-%d %H:%M:%S" "$file" | gawk '{print $6, $7}')         linestack=${(@f)$(egrep "$2" "$file")}         for line in $linestack      do         echo "$timestamp $file: $line" >> $tmp_file     done     done          cat $tmp_file | sort     rm $tmp_file


title: Do I have two VGA compatible controllers?

text: `lshw` shows two VGA compatible controllers.   1. Where are they located?   2. What are they used for respectively? Which one do you recommend to use?    3. Which of the two controllers am I using currently?   4. With only my T400, is it possible to switch between the two controllers? Thanks! output file is here and the relevant part is here:               *-pci:0          description: PCI bridge          product: Mobile 4 Series Chipset PCI Express Graphics Port          vendor: Intel Corporation          physical id: 1          bus info: pci@0000:00:01.0          version: 07          width: 32 bits          clock: 33MHz          capabilities: pci normal_decode bus_master cap_list          configuration: driver=pcieport          resources: irq:40 ioport:2000(size=4096) memory:bff00000-bfffffff ioport:c0000000(size=268435456)        *-display             description: VGA compatible controller             product: RV620/M82 [Mobility Radeon HD 3450/3470]             vendor: Hynix Semiconductor (Hyundai Electronics)             physical id: 0             bus info: pci@0000:01:00.0             version: 00             width: 32 bits             clock: 33MHz             capabilities: vga_controller bus_master cap_list rom             configuration: driver=radeon latency=0             resources: irq:51 memory:c0000000-cfffffff ioport:2000(size=256) memory:bfff0000-bfffffff memory:bff00000-bff1ffff     *-display          description: VGA compatible controller          product: Mobile 4 Series Chipset Integrated Graphics Controller          vendor: Intel Corporation          physical id: 2          bus info: pci@0000:00:02.0          version: 07          width: 64 bits          clock: 33MHz          capabilities: vga_controller bus_master cap_list rom          configuration: driver=i915 latency=0          resources: irq:49 memory:fc000000-fc3fffff memory:d0000000-dfffffff ioport:1800(size=8)      * * *               $ xrandr     Screen 0: minimum 320 x 200, current 1440 x 900, maximum 8192 x 8192     LVDS1 connected 1440x900+0+0 (normal left inverted right x axis y axis) 303mm x 190mm        1440x900       60.0*+   59.9     50.0          1360x768       59.8     60.0          1152x864       60.0          1024x768       60.0          800x600        60.3     56.2          640x480        59.9       VGA1 disconnected (normal left inverted right x axis y axis)     DP1 disconnected (normal left inverted right x axis y axis)


title: When exiting the last terminal in a tmux session can it switch to another?

text: When I exit the last terminal in a tmux session it will automatically close tmux and return me to the parent terminal. Is it possible to instead have tmux switch to another, already running, session instead of closing? I create a new named session for every task that I work on, such as TRxxx, email, scratch etc and when I am done with one of them I close all the terminals by running exit in every one. When you run exit in the last terminal of a session tmux will return you to the parent terminal but is it possible to get it to just switch to one of the other open sessions instead so I don't have to reattach? This question is similar to "Kill a tmux session and select another tmux session" but I want to close my terminals the nice way by using exit rather than killing the window.


title: check if interface eth0 is up (configured)

text: I need to check with a script, whether `eth0` is configured. If so, the script will do nothing. Otherwise it will start `wlan0`. (I don't want both `eth0` and `wlan0` to be up at the same time). What would be the easiest way to check, whether `eth0` is already up? I am using Debian Wheezy # CLARIFICATION: I would like to check not only that the cable in `eth0` is plugged in, but rather that the interface is configured (i.e. it has either static IP set, or it has received a DHCP IP). If cable is plugged in, but `eth0` is not configured correctly, I want to start `wlan0`


title: What is this 1K logical partition?

text: I noticed that I have a strange partition under `sda3`, with a size of 1K. I am about to reformat my hard drive and re-install my OS with Ubuntu 14.04 while creating separate partitions for `/` and `/home`. What is this almost-empty partition, and should I do anything with it? Why is it in `lsblk` but not in `blkid`?               [lucas@lucas-ThinkPad-W520]~$ sudo blkid     /dev/sda1: LABEL="SYSTEM_DRV" UUID="30CA6C06CA6BC6A6" TYPE="ntfs"      /dev/sda2: LABEL="Windows7_OS" UUID="9426707E26706362" TYPE="ntfs"      /dev/sda4: LABEL="Lenovo_Recovery" UUID="E2CA772DCA76FD5B" TYPE="ntfs"      /dev/sda5: UUID="7d513625-85de-41b7-9c81-0d3fbc4e6a0f" TYPE="ext4"      /dev/sda6: UUID="602d2625-8ab9-44e5-b73a-d1f0181f5549" TYPE="swap"           [lucas@lucas-ThinkPad-W520]~$ lsblk     NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT     sda      8:0    0 465.8G  0 disk     ├─sda1   8:1    0   1.5G  0 part /media/lucas/SYSTEM_DRV     ├─sda2   8:2    0 262.1G  0 part /media/lucas/Windows7_OS     ├─sda3   8:3    0     1K  0 part     ├─sda4   8:4    0  15.6G  0 part /media/lucas/Lenovo_Recovery     ├─sda5   8:5    0 178.7G  0 part /     └─sda6   8:6    0   7.9G  0 part [SWAP]     sr0     11:0    1  1024M  0 rom


title: How to see screen information at the top of terminal?

text: I once used a server where using the screen command gave me a colorful header which told me the name of the screen, the total number of screens, the runtime, cpu utilization and maybe some hotkeys to cycle between the instances. How can I achieve this header on my Ubuntu Precise Pangolin server instance (I have admin rights)? As it is, I don't even see if I'm inside a screen or not.


title: What are the default openSUSE 13.1 user groups?

text: I just installed openSUSE 13.1, and I can't even start X on boot. I have to switch to another tty and type `startx` (after I set suid for xorg). On top of this, I can barely do anything without root privileges (like shutdown from the GUI) I believe it is because my user is only a memeber of the `users` group, and I know the default is more groups. What are the default groups so I can add my user to them?


title: Grep and cut the selected field

text: I am trying to cut the field if a line starts with a particular name,               cat $1|while read line     do     if [ "$1" = "custbills.cmp" ]; then     acc_no=`grep "^Custbills" $1 | cut -c29-43`     acc_type=`grep "^Custbills" $1 |cut -c124-125`     echo "\"${acc_no}\",\"${acc_type}\"" >> out.csv     else      echo ""     fi     done      but is giving error and in output file i am getting only ','. what is wrong in my script


title: Filesystem unmounted after weekend

text: I have a problem with an AIX server what I manage. I had some filesystem created to store the structure of an Oracle instance. But after the weekend scheduled reboot the filesystems are unmounted when we arrive on monday morning. The unmounted filesystems appears in the /etc/filesystem file. There are two of the filesystems. Extracted from /etc/filesystem file               /appli2/oracle/DATA/oradata05:             dev             = /dev/lvoradata05HIST             vfs             = jfs2             log             = /dev/loglv01             mount           = false             account         = false          /appli2/oracle/DATA/oraarch:             dev             = /dev/lvoraarchHISTO             vfs             = jfs2             log             = /dev/loglv01             mount           = false             account         = false      Any idea why the filesystem gets unmounted after weekend reboot? We use AIX 6 as operating system.


title: Print the last-but-one field

text: How to print the word before the last word in line (with ksh or awk or sed or perl one liner) Example 1:                 echo one two three      will print "two" Example 2:                echo 1 2 3 4 5 6      will print "5"


title: How to install Intel binary file on Arm?

text: I am trying to install a binary file and I get the output as "`Cannot install binary`" When I did `file .bin` Output is: `c64plus- imglib_2_02_00_00_Linux-x86_Setup.bin: ELF 32-bit LSB executable, Intel 80386, version 1 (GNU/Linux), statically linked, stripped` Amy Arm Machine: `Uname -a:`               Linux overo 3.5.7 #1 PREEMPT Thu Jan 9 16:37:38 CET 2014 armv7l GNU/Linux      Is there a method to install intel binary on Arm processor?


title: Configure iptables on remote server without locking me up

text: I have a little remote server that I can access only with SSH, and what I want to do, is block all the traffic except port 22 for SSH. The first time, what I did was :               iptables -P INPUT DROP      And of course, it locked me up because I didn't let any input traffic, so I couldn't add the following rules to accept SSH traffic. How can I block all the traffic (except SSH) and in the same time letting me have access to the server through SSH?


title: Postgresql 9.3 with posgis extenstions not working after restart

text: I'm running Mint 16. In `pgAdmin` it gives me this output. An error has occurred: > ERROR: could not load library "/usr/lib/postgresql/9.3/lib/postgis-2.1.so": > libjson.so.0: cannot open shared object file: No such file or directory Well, `libjson0` is installed. I can't remove this package, because:               sudo apt-get remove libjson0      Gives me this error:               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:  procps : Depends:     initscripts E: Error, pkgProblemResolver::Resolve generated breaks,     this may be caused by held packages.


title: How to install ap-hotspot

text: I can't seem to install ap-hotspot on ubuntu 12.04. I read somewhere that I should run the following commands:               $ sudo su -     # add-apt-repository ppa:nilarimogard/webupd8     # aptitude update     # aptitude install ap-hotspot     # ap-hotspot configure     # ap-hotspot start      But my terminal get stuck on the aptitude update because I get the error `Something wicked happened resolving 'packages.medibuntu.org:http'`. I was told that's because medibuntu has been shut down. So I had to go into `/etc/apt/sources.list.d/` and delete all things related to medibuntu before I could run aptitude update again. Then I tried to run `apt-get install ap-hotspot`, but I got the error               The following packages have unmet dependencies:      ap-hotspot : Depends: dnsmasq but it is not going to be installed      So then I ran the `apt-get install dnsmasq`, but i got the error:               The following packages have unmet dependencies:      dnsmasq : Depends: dnsmasq-base (>= 2.59-4) but it is not going to be installed      So then I ran the `apt-get install dnsmasq-base` but i got the message:               dnsmasq-base is already the newest version.     0 upgraded, 0 newly installed, 0 to remove and 260 not upgraded.      So how do i get ap-hotspot to work?


title: bash + Is there something like log4j for bash script?

text: Is there something like `log4j` for bash script? I would like to be able to treat errors differently based on their severity. For example, `log4j` allows me to differentiate between errors, info, debug, etc. Is there a way I can do that for bash? I know, I can just write a function , that write to log as the following example:               LOG ()  {                 echo `date` $* >> /var/log/my_log.log              }       But actually I want to know if something like log4j is relevant for bash in order to get the ability for – **error level** and etc


title: Auto ecryptfs mounting only works after cloning

text: Weird problem, I have an auto ecryptfs setup on a machine. I have an init.d script which is setup to automount the ecryptfs. It was working at one point, and even now if I run the script directly it mounts. However, it no longer works automatically now. The weird part is, if I clone the system using Clonezilla, the cloned machine works OK and gets automounted. Any thoughts on how to troubleshoot this?


title: File permissions

text: I have a PHP script running which makes symlinks. To confirm which user it is:               file_put_contents("testFile", "test");     $user = fileowner("testFile");     unlink("testFile");     echo "running as user '" . $user . "'";     var_dump( exec('whoami'));      running like this ...               $ php script.php      runs correct all symlinks are made and output is:               running as user '999'string(5) "admin"      Running through a shell script:               #!/bin/sh     php /path/to/script.php      gives the following output and doesn't work: > PHP Warning: symlink(): Permission denied in /path/to/script.php on line 8 > running as user '999'string(5) "admin" I'm not sure what the difference between the two is, as the users they are running as are identical. Any suggestions on how to make them both have the correct permissions for symlinking? Edit: `cat /proc/version` gives `Linux version 2.6.39 (root@cross-builder) (gcc version 4.6.3 (x86 32-bit toolchain - ASUSTOR Inc.) ) #1 SMP PREEMPT Thu Oct 31 21:27:37 CST 2013` Thats the only output I can generate for any sort of release information edit2: all of the code               $files = scandir('/volume1/dir1');     $base = "/volume1/";     foreach($files as $file) {             $f_letter = $file{0};             $new_path = $base . "ByLetter/" . strtoupper($f_letter) . "/" . $file;             if(ctype_alpha ($f_letter) && !is_link($new_path)) {                     var_dump($base. "TV/" . $file);                     var_dump($new_path);                     symlink ($base . "TV/" . $file , $new_path);             }               }      Running gives the same output for the var dumps both methods


title: Unicode support in talk?

text: I live in Poland, and we have some accented characters - ąćęłńóśźż. Due to various reasons I resurrected "talk" usage on my server, which works great, but I wasn't able to figure out how to make it work with accents. On both ends of talk I have UTF-8 based locale (en_US.UTF-8), and polish characters work great in everything - bash, vim, mutt, slrn, everything, but talk. What is the reason of the problem, and how could it be solved? I'm using it on Debian testing, and have tried talk/utalk/inetutils-talk, and none of them seems to support unicode/utf8. What can be done to achieve "talk" with full utf8 support?


title: Configure sender address for all users in mutt

text: I have CentOS running mutt. When mails are sent from mutt (via a shell script), it takes the current user name as sender address causing it to go into the spam. I receive mail as               From: tech      What I need is:               From:    tech@myserver.com      All I need is a single place change that reflects everwhere. i.e. if I send from the root user, the from address should be `root@myserver.com`. Please help.


title: Why won't my system now show the directories and files in /media/sda7?

text: Summary: Could you tell me please if there is a way to restore the directories and files beneath /media/sda7 that are no longer being shown by my file manager or ls? My system is Debian. * * * Full Details: Please could you help me out of this fix. I have a spare partition on `/dev/sda7` (428 Gb), and have been storing files and directories on it (mainly video files). "mount" shows the setup as               /dev/sda7 on /media/sda7 type reiserfs (rw,nosuid,nodev,relatime)      I access `/media/sda7` using my file manager (`pcmanfm`). Until earlier today, `pcmanfm` has happily let me create new directories and files beneath `/media/sda7`, such as `/media/sda7/vids/horizon.mp4`. But now, when I specify for example the directory `/media/sda7/vids` in `pcmanfm`, I get the message: > The specified directory is not valid Now, none of the directories or files beneath `/media/sda7` are displayed (the file list window is blank). Also `ls` in a terminal shows no directories or files beneath `/media/sda7`. I have an idea that the reason might be because shortly before this started happening, I had launched the "GParted" disc partitioning utility. I did this to try and see how much disc space I'd used up on `/media/sda7`. I used GParted because `du` and `df` were showing zero and very little used disc space respectively, but I reckon the usage should be about 10 Gb. I didn't carry out any actions in GParted - I just looked at what it was displaying, then exited. The thing is, I've got about 200 video files (mostly mp4) on `/media/sda7`, and I dearly don't want to lose them. Could you tell me please if there is a way to restore the directories and files? **NOTE:** I'm leaving the laptop powered on in case I'll lose everything if I shut down.


title: Can't save session in Macpup linux

text: I installed Macpup linux 550 on a flash disk. After shutting down the Macpup, it asks for saving session (in text mode) but keyboard doesn't work and I can't select yes. The yes button has focus but I can't hit it because keyboard doesn't work. What can I do?


title: How to check if two directories or files belong to same filesystem

text: What's the best way to check if two directories belong to the same filesystem? Acceptable answers: bash, python, C/C++.


title: Is it safe to use /bin/cat as shell for a restricted user?

text: I need to remontely log on to few peoples machines to do maintanance tasks, but sometimes the machines can be behind firewalls or NAT's. The way I have been doing it is to give the user advice on how to log in to my system with SSH so that reverse tunneling is enabled, like “use the command `ssh -R 12345:localhost:22 uremonte@my.own.site.com` and log in with the password `xyzzy`”. Now, this works fine, but for the sake of safety I need to go and disable the ssh login for user `uremonte` when I am done, and remember to re-enable it when I need it again, or else someone might log into my administation frontend machine unwanted, or said legitimite users might try to mess around while I am using the tunnel. I thought of setting the user shell in `/etc/passwd` to `/bin/cat`, so anyone logging in does not get chance to do anything on the shell, and still the connection would stay alive for the reverse tunnel. This seems to be OK, but I would like to be sure this does not punch any holes in my system. So, the question is, is this absolutely safe? Is there any way somebody logging in to this account could break away from the cat-trap?


title: Allow guest SSH login and redirect to a program

text: Sometimes I get really silly ideas. This time, the idea is to deliver an easter egg for anyone who decides to try and connect to my server via SSH. Doing so will run a program, such as `easteregg.sh`, which can provide something like a "hacking" minigame. However, I have absolutely no idea how to do this! Obviously, such a thing would need to be unobtrusive to actual server admins trying to log in, so there'd need to be some way to distinguish that. Then there's the matter of actually triggering a program to run. Not to mention security: certainly don't want guest users to potentially access server files! With all that in mind, is such a thing even remotely possible, or is it really just a stupid idea?


title: How do I debug strange wireless problem

text: I have a problem with my wireless connection, which drives me nuts. I have been testing with two different wireless usb adapters, one based on the ar9271- and the other rtl8192su-chipset, but they both give same result. The wireless usb adapters are connected to an open embedded linux kernel 2.6.32, running on a custom board with an ARM9 CPU. The link is configured in adhoc-mode, and connected to an Windows 7 pc. The problem is that I cannot transfer large files via the wifi link, I have testet with both Samba and vsftpd, but no difference. I have testet the link using iperf (both TCP and UDP), successfully transferring about 5Gbytes of data. But if I try to transfer a file using samba or vsftpd the link drops within a minute (less than 20Mbytes). When the connection drops it still seems "connected" in both ends, but nothing works, not even ping. If I do an "iw wlan0 scan", the only station that appears is my own network. I cannot find anything usefull in /var/log/ I tried dmesg, but that did not give anything either. How do I debug this problem? I need to find out where and why in the wireless- stack the problem is caused. UPDATE: If I run iperf with the -d option as suggested below, I get the describer problem. So it seems to have something to do with bidirectional data communication. In wireshark I see: TCP Retransmission, TCP Dup Ack UPDATE: After the failure, if I do "iw wlan0 scan" only my own network appears...


title: Failure to connect Debian NIS client to OpenSuse 12.1 server

text: I'm trying to connect a Debian 7.0 client to a OpenSuse 12.1 server. The nisdomainname is correct, the /etc/group, /etc/passwd and /etc/shadown all have the +::: lines, ypbind connects, but the authentication, both via ssh or directly on the machine, fails. The log /var/log/auth.log on the Debian machine only shows that the authentication password failed. The NIS server works fine with other Opensuse machines.


title: How much physical disk can SLES 9 handle? Are there any limitations?

text: I think there is a limitation that how many disk could a SLES 9 machine handle. (32bit). I cannot find the number via Google.. **My question** : Can somebody tell with reference, what is this number?


title: Displaying text path in Caja (Linux Mint file manager)

text: In Linux Mint 13, the default configuration (under MATE) shows icons for the path rather than a text box containing the path. This is a huge issue for interfacing with the command line or programs, where I often need to copy/paste the path. The latest version of Ubuntu also has these annoying icons, but includes a small button to click to convert it to text-form. Is there any way to force the file manager to show me the text form so I can copy/paste the active path? Bonus points: How do I make this the default? ![file browser](http://i.stack.imgur.com/kQ77P.png)


title: Setting default emacs font not saving (built from source OS X 10.8)

text: I built emacs 24.3 from source on OS X 10.8 and when I attempt to set the default font with `Options -> Set Default Font -> [font]` My choice is not saved next time I open emacs. I'm attempting to use `misc->6x13`


title: How to copy directories with preserving hardlinks?

text: How to move directories that have files in common from one to another partition ? Let's assume we have partition mounted on `/mnt/X` with directories sharing files with hardlinks. How to move such directories to another partition , let it be `/mnt/Y` with preserving those hardlinks. For better illustration what do I mean by "directories sharing files in common with hardlinks", here is an example:               # let's create three of directories and files     mkdir -p a/{b,c,d}/{x,y,z}     touch a/{b,c,d}/{x,y,z}/f{1,2,3,4,5}     # and copy it with hardlinks     cp -r -l a hardlinks_of_a      To be more specific, let's assume that total size of files is 10G and each file has 10 hardlinks. The question is how to move it to destination with using 10G (someone might say about copying it with 100G and then running deduplication - it is not what I am asking about)


title: Run a different window manager in a specific workspace in XMonad

text: I usually use XMonad as window manager. When playing around with GUI programming I sometimes just want to see how the windows would look under Compiz for example. So is it possible to run another window manager, say Compiz, on a specific workspace under XMonad?


title: set up a user and its root dir in vsftpd, in Ubuntu

text: I want to setup a `www-data` user for vsftpd and set its root dir to `/somepath/www-data/project`. How can I do this?


title: How to run VLC player in root

text: I have installed a vlc in centos 6.5. I want to run it as root. But I get the following error, > "VLC is not supposed to be run as root. Sorry. If you need to use real-time > priorities and/or privileged TCP ports you can use vlc-wrapper (make sure it > is Set-UID root and cannot be run by non-trusted users first)."


title: What does /usr/bin/install do besides copying?

text: 1. Does `make install` with a Makefile most of the time call `/usr/bin/install`?   2. What necessary work does `/usr/bin/install` do besides copying the just compiled files to `/usr/bin/local`?   3. The man page says `/usr/bin/install` copy files and set attributes. What attributes are so important to set?   4. Does it just set permission modes and owner/group, which are not necessary?


title: How to write init.d script log messages to disk?

text: I'm running Debian wheezy. Many scripts in `/etc/init.d/` use various logging functions defined in the Linux Standard Base, like `log_success_msg` and `log_warning_msg`. The LSB documentation seems a bit ambiguous as to exactly what these functions should do: > The log_success_msg function shall cause the system to write a success > message to an unspecified log file. The format of the message is > unspecified. The log_success_msg function may also write a message to the > standard output. However, I guess this is interpreted as meaning that the functions can _either_ write to a log file _or_ just write to standard output. It seems that on Debian at least, it _just_ causes a message to be written to standard output. My suspicions were confirmed when I checked out the file defining these functions, `/lib/lsb/init-functions` \- it just calls `echo` to display any log message. This is not helpful behaviour. Text written on boot to standard output disappears shortly after boot is complete, and may well scroll off the top of the screen in any case. Surely it would be far more helpful if these messages were actually stored in a log file; in fact I don't even see the point of logging anything via these functions if they are only going to go to standard output. Is there any way to get these logs going to a file? Can anyone enlighten me as to why you would bother "logging" anything only to standard output? What helpful function does it serve?


title: What could be causing make to hang when compiling on multiple cores?

text: Yesterday I was trying to compile the ROOT package from source. Since I was compiling it on a 6 core monster machine, I decided to go ahead and build using multiple cores using `make -j 6`. The compiling went smooth and really fast at first, but at some point `make` hung using 100% CPU on just one core. I did some googling and found this post on the ROOT message boards. Since I built this computer myself, I was worried that I hadn't properly applied the heatsink and the CPU was overheating or something. Unfortunately, I don't have a fridge here at work that I can stick it in. ;-) I installed the `lm-sensors` package and ran `make -j 6` again, this time monitoring the CPU temperature. Although it got high (close to 60 C), it never went past the high or critical temperature. I tried running `make -j 4` but again `make` hung sometime during the compile, this time at a different spot. In the end, I compiled just running `make` and it worked fine. My question is: Why was it hanging? Due to the fact that it stopped at two different spots, I would guess it was due to some sort of race condition, but I would think `make` should be clever enough to get everything in the right order since it offers the `-j` option.


title: CentOS has not DefaultDepth

text: In `CentOS` there is no `DefaultDepth` line in `/etc/X11/xorg.conf` file to set the default color depth (although you can add this line to it). How does X determines which color depth to use?


title: Why was fsck priority introduced in /etc/fstab?

text: Inside the `/etc/fstab` file, in the sixth column, there is a number that corresponds to whether a filesystem should be scanned for errors. Possible values are:               0 - skip     1 - high priority     2 - low priority      Why was fsck 'priority' introduced in /etc/fstab? ![enter image description here](http://i.stack.imgur.com/IK49g.png)


title: Debian: GPG cannot fetch Linux Kernel key

text: I am in the process of recompiling the kernel on Debian. Following the instructions on kernel.org, the first step is to verify the signature. But GPG complains that it cannot find the public key:               # gpg --verify linux-3.12.22.tar.sign      gpg: Signature made Wed 11 Jun 2014 17:22:35 CEST using RSA key ID 6092693E     gpg: Can't check signature: public key not found      I have tried to fetch the key:               # gpg --recv-keys 6092693E     gpg: no keyserver known (use option --keyserver)     gpg: keyserver receive failed: bad URI      I have tried to set the keyserver:               # gpg --keyserver subkeys.pgp.net --recv-keys 6092693E     gpg: requesting key 6092693E from hkp server subkeys.pgp.net     gpg: keyserver timed out     gpg: keyserver receive failed: keyserver error      What is the problem? Thanks. Software:   * Debian GNU/Linux 6   * GPG 1.4.10 **EDIT:** I do have a firewall, but its rules don't block outbound traffic. However, connecting to the keyserver on a different port:               $ gpg --keyserver subkeys.pgp.net:80 --recv-keys 6092693E     gpg: requesting key 6092693E from subkeys.pgp.net:80     gpgkeys: no keyserver host provided     gpg: keyserver internal error     gpg: keyserver receive failed: keyserver error


title: Is it possible to trigger OOM-killer on forced swapping?

text: Is it possible to have the system preemptively swap out inactive pages (`vm.swappiness`), but invoke the oom-killer when the system runs out of RAM (as opposed to running out of memory) and is forced to swap? **The ultimate goal is to keep the system from grinding to a halt when it starts thrashing the disk because of major page faults, but still let inactive pages get swapped out.** Another desire would be to configure how much swap memory the system is forced to use before oom-killer triggers. This way the system can dip into swap just a little bit, as long as it doesn't go too far. Or I could set such a threshold to trigger oom-killer before using all the RAM so there will always be room for the file system cache (and thus avoid more disk thrashing). It doesn't seem like this would be that hard to do. It seems like you could just tell the oom-killer to trigger when the system has X ram used/free. But this is why I'm asking; I don't know. _For clarification, I am not looking to turn off swap, or adjust the`vm.swappiness` parameter_


title: Shared partition permission management

text: I am willing to try a dual boot arch/lmde setup on my laptop next week, but I've ran into a problem: I want to have a shared data storage where my downloads, documents etc would reside and could be read, written and executed. My first fs of choice was ext4 which needs proper attention with permissions, because like others, between distros, there can be overlapping uids and gids. So, my question is: Is there any clean way of managing a shared "data" user group across multiple installations, or do I have to settle for a fs which supports the "uid=N gid=N"option?


title: Can the Linux kernel be compiled on Mac OS X 10.6.8?

text: I have a Macbook Pro and I want to build the Linux Kernel. Can I build 3.3.6 on my Mac? How?


title: Playing a remote movie on the remote computer

text: I have two computers (a desktop and a laptop) running linux connected to my local area network. I like to ssh from my laptop over to my desktop and run programs there, and sometimes listen to music on my desktop, which is connected to my stereo system. Lately, I've been wanting to play movies on the desktop and desktop screen, but cue them from my laptop across the room. Unfortunately, I cannot play a movie in the current X session running on my Desktop on from my laptop. What is odd about this is that I can listen to the audio coming from the speakers that are hooked up to my desktop, by playing the audio files over ssh! This tells me that there must be a way to send the movie to that Xsession, from the ssh shell that I am connected to. Does anyone have any ideas about this?


title: open whole folder in gedit

text: Moving from OS X & Textmate to Ubuntu & gedit, the one feature of Textmate I am missing is it's command line tool. With `mate` I was able to open a folder as a Textmate project using `mate .` from within the required directory. This is enormously useful as it speeds up my system navigation considerably. Is there a way of doing the same or similar with gedit?


title: How to format write protected SD card

text: I am newbie in Linux, I want to format my SD card using Ubuntu, for this I follow this tutorial After typing `df` command , I got list of storage devices.From here I can see my SD card name is `/dev/sdb5` so I replace `/dev/sdb1` with `/dev/sdb5` in all next commands.Now `umount` command works fine but after this when I type `mkdosfs -F 32 -v /dev/sdb5` I am getting these lines:               mkdosfs 3.0.12 (29 Oct 2011)     mkdosfs: unable to open /dev/sdb5: Read-only file system      so, please tell me how to fix this.


title: Execution of possibly harmful program on Linux

text: I'm writing a program that will test programs written by students. I'm afraid that I can't trust them and I need to make sure that it won't end up badly for the computer running it. I was thinking about making some crash test user with limited access to system resources and run programs as that user, but from what I have found on the net so far, making a virtual system would be the safest option... Can someone help me with choosing the right approach? Security is a big concern for me. On the other hand, I don't want a solution that is overkill and waste much time trying to learn something I don't really need.


title: How to clean up my desktop?

text: Now, I see that my desktop running rhel 5.6 has run out of space. Now I need to clean it up. There must be some unintentional files adding up. What I would like to be able to do is list the files in descending size order in a clean way and see the culprits.


title: Terminal colors putty raspbian

text: I'm connecting to my Raspberry Pi from my Windows Machine using putty. I already adjusted the colors for bold blue in putty to be more readable (using this guide). But I still have problems with the colors in my terminal: for example when I run htop, the first value for the load average is completely black, or the swap values are not readable. When I copy the text through to windows into a text file it's readable. Can somebody please help me figure out where to adjust the settings?


title: Build Linux and run it (uImage) on the Beagle board - xM

text: I'm working on some project where I'm using the Beagle board - xM Rev C. Power supply is 5V/2A adapter. My task is porting Linux Angstrom on the board but I have some problems. I have choosen Linux 2.6.32. I found a milion tutorials how to run Linux on the BeagleBoard-xM (BB) (for instance on this blog) using prebuild images (from Narcissus or downloaded from git repo) but no one has explained how to run Linux which I was build with cross compiler. I need to change the Linux kernel, build it and run it on the BB-xM Rev C. Problem has appeared when I copied uImage on the SD card of the BB. When I powered up my board, booting process stops on               Uncompressing Linux........... done, booting kernel      uImage was build with               make ARCH=arm CROSS_COMPILE=arm-angstrom-linux-gnueabi- uImage      Linux was configured with `omap3_beagle_defconfig` config file which is intended for the BB-xM. My uEnv.txt file have following content:               dvimode="hd720 omapfb.vram=0:8M,1:4M,2:4M"      vram=16M      optargs="consoleblank=0"      console="tty0 console=ttyO2,115200n8"      NOTE: I have only connected on the BB power supply, serial and ethernet cable, nothing more. Does anyone have any idea or advice? Where I'm wrong? How to debug?


title: How can i change the color in the panel when a program needs attention?

text: I'm running Linux Mint 14. I want to change the color in the panel when a program requires your attention (like when you receive a chat message). Not the color of the entire panel, but only the box with the program name and icon. Is this possible?


title: See latest added data in MySQL DB, Debian

text: Is there any way I - via any commmand - can see which data have last been added to a MySQL DB and when that data was added? Dist: Debian 7.0 (wheezy)


title: How to read CPU temperature on a shared server?

text: I would like to read my CPU temperature with PHP, but I cannot find the relevant info. All paths under `/proc/acpi/thermal_zone` appear empty. I have tried:   * /proc/acpi/thermal_zone/THM0/temperature   * /proc/acpi/thermal_zone/THRM/temperature   * /proc/acpi/thermal_zone/THR1/temperature None of these (appear to) exist. What is the correct path to the CPU temperature monitor? `phpinfo()` says:               PHP Version 5.4.12     Linux infong 2.4 #1 SMP Thu Feb 14 13:02:49 CET 2013 i686 GNU/Linux     Safe mode is off     Apache


title: Files created by 'make' aren't getting executable permissions by default

text: I'm trying to build a project, and when I use the command `make`, I get the following errors:               /bin/sh: line 4: .deps/ipset_bitmap_ipmac.Tpo: Permission denied     make[2]: *** [ipset_bitmap_ipmac.lo] Error 126      This file, .deps/ipset_bitmap_ipmac.Tpo, was created by `make` during the build with the following permissions: -rw-r--r--, notice that there's no x. But then `make` wants to execute the file immediately, which fails. If I go to the file and add executable permissions manually, then the build continues past that point if I re-run `make`. Except that the `make` command will crash again once it reaches the next file. The only option I have is to keep `chmod`ing every single new file. My question is, why is `make` creating these new files without +x? Side notes: I'm on CentOS5, `umask -S` returns: u=rwx,g=rx,o=rx, `sudo` doesn't help at all.


title: Does yum use package buildtime to decide if a package is newer?

text: Say I have installed `mypkg-1.2.3-4567.noarch.rpm` from some yum repo.   1. Is it valid for the rpm publisher to re-publish mypkg with the _same_ version and release and just run `createrepo --update`? Is it recommended?   2. If #1 is allowed, will yum upgrade my installation of mypkg if I run yum install mypkg again?


title: Best way run a command on each file in a directory tree

text: There appear be a number of ways to do this including loops in shell script, find and xargs. Which of these is best, and which is most portable?


title: Why does vim jump down to same position after multiple spaces?

text: I really can't find the answer to this and I would like to understand what going on behind the scenes to make this happen. Is it a setting I have switched on? If so, which one? To give an example, I needed to create a file containing several lines of just spaces, but each time I pressed enter at the end of the line, instead of the cursor going to the beginning of the next line, it just went down directly under its current position. This wasn't a `vim` task, I'm just trying to use the editor as much as possible for practice .


title: Grub location - did it go to the mbr or elsewhere?

text: I have a dual boot setup with linux and Windows 7 with Grub as the bootloader. My partition table looks like this:               100 MB System Reserved Windows 7     500 GB Windows 7     100 MB /boot - ext2     500 GB linux, swap, etc.      I'm curious where GRUB installed itself after I had this setup right here. I thought the System Reserved partition was Windows 7's booting partition, but if Grub rewrote over it (I assume on the master boot record), it seems like Windows 7 would not be able to run. Where does Grub install itself and still manage to point to both Windows and linux? Does it depend on how you set your partitions?


title: Accept only y or yes with a one-line regular expression

text: I want to check if an input is y or yes (inputs in lowercase) and reject everything else What I have now is `^y[e]{'0,1'}[s]['0,1']$` But this accepts `y`, `ye`, `ys`, `yes`. I don't want `ye` and `ys` to be accepted.


title: Touchegg handles 3 and 4 finger events well, but 'ignores' 2 finger events

text: I have installed Mint linux 16 with cinnamon, and I have an ASUS N550JV CN270H including a _multitouchpad_ I tried different things to tweak multitouch gestures, namely: Using support in xorg.conf as suggested here: http://community.linuxmint.com/tutorial/view/1361 I also used **ginn** , but it did not satisfy my needs; that is, I could not get it working. So I removed the xorg.conf file again, and purged ginn. Afterwards I tried **easystroke** , but I was not able to configure gestures which did not involve modifiers or clicks; maybe that is just me. So I removed it and now I use **touchegg**. Touchegg is exactly what I am looking for, and it can detect up to 4 fingers (maybe even more, I did not test). However, it does not catch the 2 finger events. I simply compiled the touchegg source and ran the file in a console, which almost works fine. I guess the 2 finger events are caught by gnome (or cinnamon) and not passed trough (i.e. propagation is stopped). I think so is because gnome-control-center has the option to detect two finger gestures for simply scrolling: ![multitouch in gnome-control-center](http://i.stack.imgur.com/uF5RD.png) I disabled scrolling here, to allow gnome to pass these events without race condition consequences. Unfortunately that does not seem to work. I am able to use two finger scrolling via the gnome-control-center interface and configure the rest via touchegg, however I would prefer handling all gestures via touchegg, in order to have a bit more functionality. Would this be possible? Can I get touchegg to receive all touch event? Is there a way to see what the 'event propagation stack' of these touch events is?


title: Trap not trapping SIGTSTP

text: I have a script that keeps displaying the login prompt:               #!/bin/bash     trap '' 2 20     while true; do         login     done      This is part of a bigger project so please don't tell me to just use the system login prompt. It needs to be done through a shell script. The reason it is in a loop is so that when the user logs out, the script drops them back at the login prompt. The only issue is that it's possible to `Ctrl`+`C` or `Ctrl`+`Z` and kill the script and therefor the prompt. The trap stops `Ctrl`+`C`, but for some reason `Ctrl`+`Z` can still be used to stop the script. I know that it's something to do with the login command because if I replace login with another command like `echo hello` then `Ctrl`+`Z` doesn't stop the script anymore (IE it keeps printing hello). How can I trap `Ctrl`+`Z`?


title: How to force fsck at every boot - all (relevant) filesystems?

text: I'm working with a fanless PC (hundreds of them, in fact) that has debian 6 and 3 partitions( FAT and 2x ext2). The system doesn't have a power button as such so most people tend to yank the plug to 'shut it down' rather than init 0 (or equivalent). As a result the filesystem(s) build up errors pretty rapidly. I've tried using 'shutdown -rF' to force fsck but this doesn't seem to be working. I'm wondering if there is some way to tell the system to check each mount point / FS before they are mounted. I've tried setting the fsck param in /etc/fstab. This typically gives me a 'Errors found. Run fsck manually' message. Are there other options to try?


title: How to sort a collection of lines from different files?

text: I want to sort second line in each file by second column, and also print name of the corresponding file. I am doing it like this -               rm tmp;     for filename in file*; do       num=`head -2 $filename | tail -1 | awk '{print $2}'`;       echo "$filename $num" >> tmp;     done;     sort -n -k2,2 tmp            Can it be done in a better way that doesn't include a `tmp` file?


title: Unknown syntax in /etc/rc.d/init.d/functions

text: Looking at the file `/etc/rc.d/init.d/functions`, I can see the following is declaring a number of variables as local variables. However, why are the variables `killlevel` and `pid_file` have an equal sign after them?               killproc() {             local RC killlevel= base pid pid_file= delay try      I'm also seeing the following syntaxes ... Any idea what `${1##*/}` or `${2:-}` bits are for?               base=${1##*/}     ...     __pids_var_run() {             local base=${1##*/}             local pid_file=${2:-/var/run/$base.pid}


title: Commandline program affecting subsequent shell output with underlines?

text: ![enter image description here](http://i.stack.imgur.com/jE7f6.png) I'm SSHing via Windows PuTTY to my server running Ubuntu Server 12.04. As you can see in the top of the screenshot, the terminal looks normal but when I run Behat (a PHP test automation framework), all subsequent output is underlined. What could be causing this? Is it a Linux issue?


title: Transferring Files SSH SCP Error Message: 'Stdin: is not a tty'

text: I am using a Macbook SSH terminal and generated RSA key pairs and uploaded remote `id_rsa.pub` with approved permissions. I can connect with remote Apache web server. I can create, open, move, modify and on preliminary inspection can manage files on the web server, no problem ... and generate no error messages. Surprisingly I can not `scp` a folder nor document from my desktop to the remote server. Nor can I `scp` a folder or document from the remote server to my desktop. Each time I receive the error message: > stdin: is not a tty The `scp` command to or from the remote web server does not work with either absolute or relative file location references. My standard syntax looks like this: From local host:               scp -rp ~/Desktop/foldername username@secureremoteserver.com:~/public_html From remote host:               scp -rp username@secureremoteserver.com:~/public_html/foldername ~/Desktop/ It appears to be an issue with the `stdin: is not a tty` error message. What's going on? If this error is preventing the file transfers, how do I resolve the `stdin: is not a tty`?


title: Network in LXC not forwading through a bridge

text: I've got an LXC container, on the host I've got a bridge between the LXC container and `eth0`. The LXC container can ping it's Host `10.1.0.5`, but can't ping the gateway of `10.1.0.2`. The host is able to ping the gateway. `tcpdump` on the interface created for the LXC container is sending the pings to the router and is getting a reply back. But a `tcpdump` within the container shows nothing. Furthermore, running `tcpdump` in the container hangs when you press ^C (20-40sec), that doesn't happen in the host. Any ideas what I should look for here?               root@hadoop-jobtracker:~# ping 10.1.0.2 &     [1] 876     root@hadoop-jobtracker:~# PING 10.1.0.2 (10.1.0.2) 56(84) bytes of data.               root@hadoop-jobtracker:~# tcpdump     tcpdump: verbose output suppressed, use -v or -vv for full protocol decode     listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes     ^C     ::::20+ sec delay occurs here::::     05:56:34.835833 IP 10.1.0.35.ssh > 10.1.0.5.32990: Flags [P.], seq 2715418718:2715418910, ack 3505056160, win 196, options [nop,nop,TS val 1608155 ecr 1608151], length 192          1 packet captured     111 packets received by filter     80 packets dropped by kernel


title: LDAP authentication broken with upgrade to CentOS 6.4 (sssd)

text: I have OpenLDAP server:               @(#) $OpenLDAP: slapd 2.4.23 (Aug  8 2012 16:29:21)      In my configuration have group:               ldapsearch -x -b 'cn=groupname,ou=UnixShell,ou=Services,o=example,c=ru'     # extended LDIF     #     # LDAPv3     # base <cn=groupname,ou=UnixShell,ou=Services,o=example,c=ru> with scope subtree     # filter: (objectclass=*)     # requesting: ALL     #          # groupname, UnixShell, Services, example, ru     dn: cn=groupname,ou=UnixShell,ou=Services,o=example,c=ru     cn: groupname     objectClass: groupOfUniqueNames     objectClass: top     uniqueMember: cn=Name Second,ou=Sysadmins,ou=SoftwareDevelopment,ou=IT,ou=Accounts,o=example,c=ru          # search result     search: 2     result: 0 Success      And user               # ldapsearch -x -b 'cn=Name Second,ou=Sysadmins,ou=SoftwareDevelopment,ou=IT,ou=Accounts,o=example,c=ru'     # extended LDIF     #     # LDAPv3     # base <cn=Name Second,ou=Sysadmins,ou=SoftwareDevelopment,ou=IT,ou=Accounts,o=example,c=ru> with scope subtree     # filter: (objectclass=*)     # requesting: ALL     #          # Name Second, Sysadmins, SoftwareDevelopment, IT, Accounts, example, ru     dn: cn=Name Second,ou=Sysadmins,ou=SoftwareDevelopment,ou=IT,ou=Accounts,o=      example,c=ru     homeDirectory: /home/user     loginShell: /bin/bash     objectClass: person     objectClass: organizationalPerson     objectClass: inetOrgPerson     objectClass: posixAccount     objectClass: top     objectClass: shadowAccount     shadowLastChange: 15361     shadowMax: 99999     shadowMin: 0     shadowWarning: 7     uid: user     uidNumber: 7000     cn: Name Second     gidNumber: 702          # search result     search: 2     result: 0 Success          # numResponses: 2     # numEntries: 1      A long time i used LDAP authentication on my client servers (CentOS 6.*), but in one time when upgraded to 6.4 branch, my configuration has broke. Because now system default using SSSD. In pam_ldap was               pam_groupdn cn=groupname,ou=UnixShell,ou=Services,o=example,c=ru     pam_member_attribute uniquemember      But now in sssd.conf it filter does not work               access_provider = ldap     ldap_access_filter = memberOf=cn=groupname,ou=UnixShell,ou=Services,o=example,c=ru      What am I doing wrong? My records can't find when i login through ssh. Works locally "su - user". Error in sssd log               (Thu Mar 28 12:44:43 2013) [sssd[be[default]]] [sdap_access_filter_get_access_done] (0x0100): User [user] was not found with the specified filter. Denying access.      I'm use it for settings:               authconfig --enablemkhomedir --updateall --enablesssd --enablesssdauth --enableldap --enableldapauth --disablenis --disablekrb5 --disablecachecreds --disablecache  --ldaploadcacert=$certurl"      CentOS release 6.4 (Final) !!! Do not change anything manually, only system utils !!!               # cat /etc/sssd/sssd.conf      [domain/default]          ldap_uri = ldaps://ldap02.example.ru     ldap_tls_cacertdir = /etc/openldap/cacerts     ldap_id_use_start_tls = True     cache_credentials = False          ldap_search_base = o=example,c=ru     krb5_realm = EXAMPLE.COM     krb5_server = kerberos.example.com          id_provider = ldap     auth_provider = ldap     chpass_provider = ldap          access_provider = ldap     ldap_access_filter = uniqueMember=cn=grouname,ou=UnixShell,ou=Services,o=example,c=ru          debug_level = 255     auth_provider = ldap     chpass_provider = ldap     [sssd]     services = nss, pam     config_file_version = 2          domains = default     [nss]          [pam]          [sudo]          [autofs]          [ssh]          [pac]


title: unable to create key file. ubuntu installation error

text: I am trying to generate a preseed file for automating the Ubuntu installation process. I want full disk encryption with the help of preseed having the pass- phrase included in the preseed. I wrote this:               d-i partman-auto/method string crypto     d-i partman-crypto/passphrase password helloworld     d-i partman-crypto/passphrase-again password helloworld      it is giving me error:               unable to generate key file.      I have tried many links but none helped:   http://askubuntu.com/questions/24079/full-disk-encryption-with-preseed   http://askubuntu.com/questions/305176/preseed-with-lvm-and-crypto-fails-with- an-error-occured-while-creating-the-keyf?rq=1 but every time I got the same error. The thing is when I do it without the help of any preseed everything works fine. I want to know how to write a preseed for full disk encryption. I also referred to Ubuntu documentation, but that also did not help. And this guide is not having much information for writing a preseed for encryption


title: List of available command options?

text: I'm currently setting up my first web server without a control panel and so far things are going pretty good! I was just wondering if anyone could direct me to somewhere that explains all of the available command options and what they do? Since I'm mostly following guides to set up specific things on the server, sometimes I run in to a command like               sudo mkdir -p /var/www/ve-server{1,2}.com/{html,logs}      Which I understand apart from how the `-p` option is modifying the command.


title: ext3 root filesystems goes read-only with aborted journal even after repairs

text: Short version: ext3 root filesystem on rackspace (xen) VM detects aborted journal on boot and mounts read-only. I've attempted to repair this from a rescue environment with `tune2fs` and `e2fsck` as prescribed in many articles I read, but the error continues to happen. **UPDATE** : So based on this article I added "barrier=0" to the `/etc/fstab` entry for this filesystem and it mounted r/w fine at the next boot. I'm lead to believe this is a paravirtualization thing, but would love it if anyone fully understands what is going on here and can explain. Long version: Rackspace VM just upgraded from Ubuntu 11.10 to 12.04.2 dmesg output with the error:               [   14.701446] blkfront: barrier: empty write xvda op failed     [   14.701452] blkfront: xvda: barrier or flush: disabled     [   14.701460] end_request: I/O error, dev xvda, sector 28175816     [   14.701473] end_request: I/O error, dev xvda, sector 28175816     [   14.701487] Aborting journal on device xvda1.     [   14.704186] EXT3-fs (xvda1): error: ext3_journal_start_sb: Detected aborted journal     [   14.704199] EXT3-fs (xvda1): error: remounting filesystem read-only     [   14.940734] init: dmesg main process (763) terminated with status 7     [   18.425994] init: mongodb main process (769) terminated with status 1     [   21.940032] eth1: no IPv6 routers present     [   23.612044] eth0: no IPv6 routers present     [   27.147759] [UFW BLOCK] IN=eth0 OUT= MAC=40:40:73:00:ea:12:c4:71:fe:f1:e1:3f:08:00 SRC=98.143.36.192 DST=50.56.240.11 LEN=40 TOS=0x00 PREC=0x00 TTL=242 ID=37934 DF PROTO=TCP SPT=30269 DPT=8123 WINDOW=512 RES=0x00 SYN URGP=0      [   31.025920] [UFW BLOCK] IN=eth0 OUT= MAC=40:40:73:00:ea:12:c4:71:fe:f1:e1:3f:08:00 SRC=116.6.60.9 DST=50.56.240.11 LEN=40 TOS=0x00 PREC=0x00 TTL=101 ID=256 PROTO=TCP SPT=6000 DPT=1433 WINDOW=16384 RES=0x00 SYN URGP=0      [  493.974612] EXT3-fs (xvda1): error: ext3_remount: Abort forced by user     [  505.887555] EXT3-fs (xvda1): error: ext3_remount: Abort forced by user      In a rescue OS, I've tried:               tune2sf -O ^has_journal /dev/xdbb1 #Device is xvdb1 in rescue, but xvdba1 in real OS     e2fsck -f /dev/xvdb1     tune2sf -j /dev/xvdb1      I've also run `e2fsck -p`, `e2fsck -f`, and `tune2fs -e continue`. Here's the output of `tune2fs -l`.               tune2fs 1.41.14 (22-Dec-2010)     Filesystem volume name:   <none>     Last mounted on:          <not available>     Filesystem UUID:          68910771-4026-4588-a62a-54eb992f4c6e     Filesystem magic number:  0xEF53     Filesystem revision #:    1 (dynamic)     Filesystem features:      has_journal ext_attr resize_inode dir_index filetype sparse_super large_file     Filesystem flags:         signed_directory_hash      Default mount options:    (none)     Filesystem state:         clean     Errors behavior:          Continue     Filesystem OS type:       Linux     Inode count:              1245184     Block count:              4980480     Reserved block count:     199219     Free blocks:              2550830     Free inodes:              1025001     First block:              0     Block size:               4096     Fragment size:            4096     Reserved GDT blocks:      606     Blocks per group:         32768     Fragments per group:      32768     Inodes per group:         8192     Inode blocks per group:   512     Filesystem created:       Thu Oct 20 21:34:53 2011     Last mount time:          Mon Apr  8 23:01:13 2013     Last write time:          Mon Apr  8 23:08:09 2013     Mount count:              0     Maximum mount count:      29     Last checked:             Mon Apr  8 23:04:49 2013     Check interval:           15552000 (6 months)     Next check after:         Sat Oct  5 23:04:49 2013     Reserved blocks uid:      0 (user root)     Reserved blocks gid:      0 (group root)     First inode:              11     Inode size:           256     Required extra isize:     28     Desired extra isize:      28     Journal inode:            8     Default directory hash:   half_md4     Directory Hash Seed:      1e07317a-6301-41d9-8885-0e3e837f2a38     Journal backup:           inode blocks      I also grepped some lines from `/var/log/syslog` while in the rescue mode with some additional error info:               Apr  8 19:47:06 dev kernel: [26504959.895754] blkfront: barrier: empty write xvda op failed     Apr  8 19:47:06 dev kernel: [26504959.895763] blkfront: xvda: barrier or flush: disabled     Apr  8 20:19:33 dev kernel: [    0.000000] Command line: root=/dev/xvda1 console=hvc0 ro quiet splash      Apr  8 20:19:33 dev kernel: [    0.000000] Kernel command line: root=/dev/xvda1 console=hvc0 ro quiet splash      Apr  8 20:19:33 dev kernel: [    0.240303] blkfront: xvda: barrier: enabled     Apr  8 20:19:33 dev kernel: [    0.249960]  xvda: xvda1     Apr  8 20:19:33 dev kernel: [    0.250356] xvda: detected capacity change from 0 to 20401094656     Apr  8 20:19:33 dev kernel: [    5.684101] EXT3-fs (xvda1): mounted filesystem with ordered data mode     Apr  8 20:19:33 dev kernel: [  140.547468] blkfront: barrier: empty write xvda op failed     Apr  8 20:19:33 dev kernel: [  140.547477] blkfront: xvda: barrier or flush: disabled     Apr  8 20:19:33 dev kernel: [  140.709985] EXT3-fs (xvda1): using internal journal     Apr  8 21:18:12 dev kernel: [    0.000000] Command line: root=/dev/xvda1 console=hvc0 ro quiet splash      Apr  8 21:18:12 dev kernel: [    0.000000] Kernel command line: root=/dev/xvda1 console=hvc0 ro quiet splash      Apr  8 21:18:12 dev kernel: [    1.439023] blkfront: xvda: barrier: enabled     Apr  8 21:18:12 dev kernel: [    1.454307]  xvda: xvda1     Apr  8 21:18:12 dev kernel: [    6.799014] EXT3-fs (xvda1): recovery required on readonly filesystem     Apr  8 21:18:12 dev kernel: [    6.799020] EXT3-fs (xvda1): write access will be enabled during recovery     Apr  8 21:18:12 dev kernel: [    6.839498] blkfront: barrier: empty write xvda op failed     Apr  8 21:18:12 dev kernel: [    6.839505] blkfront: xvda: barrier or flush: disabled     Apr  8 21:18:12 dev kernel: [    6.854814] EXT3-fs (xvda1): warning: ext3_clear_journal_err: Filesystem error recorded from previous mount: IO failure     Apr  8 21:18:12 dev kernel: [    6.854820] EXT3-fs (xvda1): warning: ext3_clear_journal_err: Marking fs in need of filesystem check.     Apr  8 21:18:12 dev kernel: [    6.855247] EXT3-fs (xvda1): recovery complete     Apr  8 21:18:12 dev kernel: [    6.855902] EXT3-fs (xvda1): mounted filesystem with ordered data mode     Apr  8 21:18:12 dev kernel: [  143.505890] EXT3-fs (xvda1): using internal journal


title: Getting started with Slackware as a web server

text: I'm wondering what would be the path for an Arch user to get into slackware hosted on a VPS intended to use as a web server?   I like the approach that Slackware takes (like Arch), and the fact that so many small VPS (Memory < 512MB) support it, but I can't find any decent info on actually getting started with it on Google as a web host. So if you have any tips or guides on how to get started with the subject they'll be greatly appreciated!.


title: test if return true if grep on output has string in one line

text: I just want to return true or false if a service is running. Here is where I'm at, not first try or last but current at writing:               service iptables status | grep -qi "not running"      The sdtout for `service iptables status` when it's stopped is `iptables: Firewall is not running` When I run what I came up with is nothing on a new line, which I guess is not unexpected as 0 is true and non-0 is false. So, I need to test to ensure it works, but I'm unsure what to do. Here is the try:               service iptables status | grep -qi "not running" || echo "stopped"      so when the service is stopped I expected to see `stopped` but I didn't get anything but a new line.


title: Single set of keyboard shortcuts for copy/paste/cut across all X11 applications

text: A common quibble that I have when I'm running X11 on a Linux system is that there doesn't seem to be any X11-wide keyboard shortcuts for copying and pasting. `Ctrl``c` and `Ctrl``v` work fine across most Gtk/Qt applications, but when copying and pasting to/from a terminal emulator, `Ctrl``c` and `Ctrl``v` aren't viable options. Some terms like gnome-terminal use shortcuts like `Ctrl``Shift``c`/`v`, but this still results in an inconsistent copy+paste experience across applications. OSX, for example, uses the `Super`/`Command` key to provide `Ctrl``c`/`v` shortcuts that function across all OSX (sans X11) applications, and don't interfere with terminal emulators. Is there any way of getting similar functionality under X11 on Linux?


title: Are there any problems if I install an old version of a Linux distro?

text: I've got a computer with 512 MB of RAM, and a 50 GB hard disk. **Question:** will I have any problems if I install an old version of Ubuntu, Knoppix, or any other distro? For example: may I have any security problems if I access the Internet? I already have Puppy Linux installed, and it works great. I'm just looking for any alternatives.


title: How to make CD-quality WAV files using avconv?

text: I want to make a CD using the audio tracks of some video clips. I was thinking of using `avconv` to convert the files. As far as the other steps go, I found some instructions on the Arch Wiki. This is the command that gets used:               for i in *.mp3; do mpg123 --rate 44100 --stereo --buffer 3072 --resync -w `basename $i .mp3`.wav $i; done      Obviously I am not dealing with mp3 files, so I need the `avconv` equivalent of the above one-liner for dealing with mp4 and flv files. I can provide additional information about the files' bitrates and such if necessary.


title: Where to configure which password sudo needs

text: on some OS `sudo` requires the users password, on others it's `root`'s password. Where is the config file to decide on this?


title: How can I force a Ubuntu kernel to fail mounting / and drop into the initramfs rescue shell?

text: I am trying to customize the initramfs rescue environment and would like to _force_ the kernel to fail mounting `/` and drop into the `(initramfs)` rescue shell, as opposed to single user mode. How can I do that? NB: I know how to hook into `initramfs-tools` to achieve the customization steps, but I need to be able to verify the result.