title: netcat throughput low but iperf high

text: I was testing the throughput between two pcs connected on the same router: one with 100mbps lan, the other with 54mbps wifi. I tested both `netcat` and `iperf` and the throughtput I get is only 2.6mb/s. What can be wrong? Shouldn't it be more?


title: Correlating filename with package

text: Say, I'm given a filename like `libasound.so.2`. Is there a way to query the package manager to correlate the filename with its corresponding package? I'm interested to get answers for any package manager, but my primary focus is on `apt` and `yum`.


title: SVN could not connect to server

text: Hi all i have got an issue while updating svn repository from my server. Please find the error below               SVN: OPTIONS of 'http://ipaddress/svn/folder': could not connect to server (http://ipaddress)      but i can to ping and connect SVN server via ssh. Please help to resolve this issue.


title: Setup Linux backup with Bacula and Webmin

text: Hi guys I'm having troubles finding a good documentation to setup an easy and possibly web oriented backup solution for one of our CentOS 5.4 file server. The things I need to accomplish are the following:   * find a solutions that runs possibly via web to make it easy to manage it   * find a solution that has a UI and is simple to manage   * backups are done from one linux box onto an other linux box on the same network (just different location)   * be able to understand if the BK worked out well and/or if any error happened The reason why I need this is because it's managed primarly from my business partner which is not a programmer although he's pretty good with things like Webmin and so on... Since he likes Webmin a lot I had a look at those two programs:   * Amanda   * Bacula but I might be open to different solutions. I have both of them installed but not running (including DB for Bacula) I lack directions there are a bunch of things that I don't understand first of all how to backup on the LAN disk... Have you guys ever found a good and simple guide / tutorial on this topic? Anything would be very appreciated.


title: How to copy a file from my home folder to /usr

text: I'm trying to copy a file from my homedir to /usr. How do I setup the permissions to allow this?               $ chmod 777 KeePass-2.14.zip     $ cp KeePass-2.14.zip /usr/keepass/     cp: cannot create regular file `/usr/keepass/KeePass-2.14.zip': Permission denied     $ sudo cp KeePass-2.14.zip /usr/keepass/     cp: cannot stat `KeePass-2.14.zip': Permission denied     $


title: VPN that gives me an internal IP and allows me to reach the internal network from outside

text: Using Red hat linux/CentOS. Where I have 1 Public IP, that is accessible remotely via SSH. Now that server needs to connect one VPN Server so that VPN server can give one IP to our Server. Now from our server we need to then ping local ip such as 10.x.x.10 which is located behind there VPN server. What VPN client do we use for such to achieve? What type of VPN client which allows to use such thing? There are IPSec host to host and network to network but confusing is what means what? Do I just use IPSec host to host or I need to do network to network? Another problem is if the VPN connection is made, how can I access my server remotely using SSH? Cause most of the time when VPN is connected then the public IP is not reachable anymore. Can anyone advise for my CentOS/RHEL what type of VPN client I need to install and configure? (very confusing I know what I need but I do not know there standard names to explain my other end point ICT team).


title: Gnome not starting in FreeBSD

text: I tried to install gnome2 in FreeBSD using the command `pkg_add -v -r gnome2`. I also edited my file in `/etc/rc.conf` and added the lines `gdm_enable="YES"` and `gnome_enable="YES"` and also added the lines in `/etc/fstab` `proc /proc procfs rw 0 0` . Still I typed startx in my prompt it gave me error for command not found. Please Help.


title: Citrix printing problem on centos - hp

text: I have setup Centos 6.3 - 6.5, installed wine and running Citrix app. I can print perfectly Wine based apps (i.e. wine notepad) but when printing Citrix through wine it is printing ASCII characters. I have installed hplip-3.14.3 printer is HP Lasetjet Pro 400 M401n. Do any one have any idea on same? Can some one guide on work around? Many thanks!


title: Getting output from vivopay-serial converter

text: First off, I am new to linux so please excuse my ignorance. I'm trying to read output from idtech's ViVOpay Vend III in linux. The device claims it interfaces with USB and RS-232. I currently have it plugged in via USB. I ran the following command and got the following output:               dmesg | grep tty     usb 5-2: vivopay-serial converter now attached to ttyUSB0      This tells me that linux knows about the connected device. Now I would like to actually get some output from the device. Other card readers that I've used will simply dump the card data much like a keyboard. If I swipe a card with a text editor open, it will show me that raw card data. This isn't the case with the Vend III. Could someone give me some insight into testing the device or let me know if their is some additional setup that I need to perform? Environment: Distribution ID: Ubuntu Description: Ubuntu 12.04.4 LTS Release 12.04 Codename: precise Kernel: 3.2.0-59-generic Thanks!


title: How to configure a Fault Tolerance System in CentOS 6.0

text: I want to implement the fault tolerance in a CentOS environment. ## EDIT **Scenario:** Two different systems connected via network having CentOS 6.0. **What I want:** Now I want to setup Fault Tolerance in for both systems. So that even if one machine got any problem my running applications/servers never go down. I found kemari and RDMA tools to implement that in VMs. But I am newbie for this and don't know, from where I do start. I mean what to download, how to configure and how to run the VM by this? Also I didn't found any documentation for beginners. Please help who is having knowledge about either those technologies or any other technology to get my Fault Tolerance System. **If not in VMs, please give me some idea to implement this task only on two physical machines rather than virtually.**


title: Are there any recommended SELinux policies for JBOSS?

text: I’m looking for tips about defining JBoss policies in SELinux.   I saw that OWASP is planning to publish a document about this, but I need some guidance ASAP. Can someone please help?


title: How can a bash script detect if it is running in the background?

text: Is there way for a bash script to know if it is running in the foreground or background, and so it can behave slightly differently in each case?


title: Linux Debain Squeezy Distro: Weakerth4n, Kconfig && make issues

text: I am running the Weakerth4n linux operating system on my old dell d600 laptop I got at Defcon for $80 USD. Anyway I had a question about making certain programs (like Virtual Box) this may be as simple as telling me that my specific distro isn't supported but it's worth a shot and it could be that my Kbuild configuration is somehow messed up because when I was trying to install ndiswrapper I first got a Kbuild error from make and then this:               (/usr/src/ndiswrapper-1.59# make)     make -C utils     make[1]: Entering directory `/usr/src/ndiswrapper-1.59/utils'     make[1]: Nothing to be done for `all'.     make[1]: Leaving directory `/usr/src/ndiswrapper-1.59/utils'     make -C driver     make[1]: Entering directory `/usr/src/ndiswrapper-1.59/driver'     make -C /usr/src/linux-headers-3.7.10blue-ghost1.9 M=/usr/src/ndiswrapper-1.59/driver     make[2]: Entering directory `/usr/src/linux-headers-3.7.10blue-ghost1.9'     /usr/src/linux-headers-3.7.10blue-ghost1.9/arch/x86/Makefile_32.cpu:2: ***     missing separator.  Stop.     make[2]: Leaving directory `/usr/src/linux-headers-3.7.10blue-ghost1.9'     make[1]: *** [modules] Error 2     make[1]: Leaving directory `/usr/src/ndiswrapper-1.59/driver'     make: *** [driver] Error 2      So I downloaded the dependencies for VirtualBox as shown in this guide https://www.virtualbox.org/wiki/Linux%20build%20instructions but instead of getting source I just downloaded the .deb file and executed a dpkg -i ./.deb, and installed VirtualBox that way. Then I...               :VirtualBox     :WARNING: The vboxdrv kernel module is not loaded. Either there is no module          available for the current kernel (3.7.10blue-ghost1.9) or it failed to          load. Please recompile the kernel module and install it by                 sudo /etc/init.d/vboxdrv setup               You will not be able to start VMs until this problem is fixed.      < error > : So I run /etc/init.d/vboxdrv setup and get this                :Stopping VirtualBox kernel modules ...done.      Uninstalling old VirtualBox DKMS kernel modules ...done.      Trying to register the VirtualBox kernel modules using DKMS      Error! Bad return status for module build on kernel: 3.7.10blue-ghost1.9  (i686)      Consult the make.log in the build directory      /var/lib/dkms/vboxhost/4.3.8/build/ for more information.      ...failed!      (Failed, trying without DKMS)      Recompiling VirtualBox kernel modules ...failed!      (Look at /var/log/vbox-install.log to find out what went wrong)       < error > : I think it's because my arch is supposed to be i386 not i686, then                :vim /var/lib/dkms/vboxhost/4.3.8/build/make.log           1 DKMS make.log for vboxhost-4.3.8 for kernel 3.7.10blue-ghost1.9 (i686)      2 Thu Mar  6 13:10:22 PST 2014      3 make: Entering directory `/usr/src/linux-headers-3.7.10blue-ghost1.9'      4 /usr/src/linux-headers-3.7.10blue-ghost1.9/arch/x86/Makefile_32.cpu:2: *** missing separator.  Stop.      5 make: Leaving directory `/usr/src/linux-headers-3.7.10blue-ghost1.9'           :vim /var/log/vbox-install.log           1 Uninstalling modules from DKMS      2   removing old DKMS module vboxhost version  4.3.8      3       4 ------------------------------      5 Deleting module version: 4.3.8      6 completely from the DKMS tree.      7 ------------------------------      8 Done.      9 Attempting to install using DKMS     10      11 Creating symlink /var/lib/dkms/vboxhost/4.3.8/source ->     12                  /usr/src/vboxhost-4.3.8     13      14 DKMS: add Completed.     15      16 Kernel preparation unnecessary for this kernel.  Skipping...     17      18 Building module:     19 cleaning build area....     20 make KERNELRELEASE=3.7.10blue-ghost1.9 -C /lib/modules/3.7.10blue-ghost1.9/build M=/var/lib/dkms/vboxhost/4.3.8/build....     21 0     22 0     23 Failed to install using DKMS, attempting to install without     24 make KBUILD_VERBOSE=1 SUBDIRS=/tmp/vbox.0 SRCROOT=/tmp/vbox.0 CONFIG_MODULE_SIG= -C /lib/modules/3.7.10blue-ghost1.9/buil     25 /usr/src/linux-headers-3.7.10blue-ghost1.9/arch/x86/Makefile_32.cpu:2: *** missing separator.  Stop.     26 make: *** [vboxdrv] Error 2      So ?, I'm not a linux pro and I have work. I'll check back and update in about five hours :/               :uname -r     Linux ghostx 3.7.10blue-ghost1.9 #4 SMP Mon Mar 18 20:52:56 EDT 2013 i686 GNU/Linux     :whereis virtualbox dkms     virtualbox: /usr/bin/virtualbox /usr/lib/virtualbox /usr/share/virtualbox     dkms: /usr/src/nvidia-310.40/dkms.conf /usr/src/ndiswrapper-1.56/dkms.conf     /usr/src/vboxhost-4.3.8/dkms.conf /usr/sbin/dkms /etc/dkms     /usr/lib/dkms /usr/share/man/man8/dkms.8.gz          :dpkg --version     Debian `dpkg' package management program version 1.15.8.13 (i386).     This is free software; see the GNU General Public License version 2 or     later for copying conditions. There is NO warranty.          :make --version     GNU Make 3.81     Copyright (C) 2006  Free Software Foundation, Inc.     This is free software; see the source for copying conditions.     There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A     PARTICULAR PURPOSE.          This program built for i486-pc-linux-gnu          :vim /usr/src/linux-headers-3.7.10blue-ghost1.9/arch/x86/Makefile_32.cpu     # Put here option for CPU selection and depending optimization     choice     prompt "Processor family"     default M686 if X86_32     default GENERIC_CPU if X86_64          config M386     bool "386"     depends on X86_32 && !UML     ---help---       This is the processor type of your CPU. This information is used for       optimizing purposes. In order to compile a kernel that can run on       all x86 CPU types (albeit not optimally fast), you can specify       "386" here.            The kernel will not necessarily run on earlier architectures than       the one you have chosen, e.g. a Pentium optimized kernel will run on       a PPro, but not necessarily on a i486.            Here are the settings recommended for greatest speed:       - "386" for the AMD/Cyrix/Intel 386DX/DXL/SL/SLC/SX, Cyrix/TI       486DLC/DLC2, and UMC 486SX-S.  Only "386" kernels will run on a 386       class machine.       - "486" for the AMD/Cyrix/IBM/Intel 486DX/DX2/DX4 or       SL/SLC/SLC2/SLC3/SX/SX2 and UMC U5D or U5S.       - "586" for generic Pentium CPUs lacking the TSC       (time stamp counter) register.       - "Pentium-Classic" for the Intel Pentium.       - "Pentium-MMX" for the Intel Pentium MMX.       - "Pentium-Pro" for the Intel Pentium Pro.       - "Pentium-II" for the Intel Pentium II or pre-Coppermine Celeron.       - "Pentium-III" for the Intel Pentium III or Coppermine Celeron.       - "Pentium-4" for the Intel Pentium 4 or P4-based Celeron.       - "K6" for the AMD K6, K6-II and K6-III (aka K6-3D).       - "Athlon" for the AMD K7 family (Athlon/Duron/Thunderbird).       - "Crusoe" for the Transmeta Crusoe series.       - "Efficeon" for the Transmeta Efficeon series.       - "Winchip-C6" for original IDT Winchip.       - "Winchip-2" for IDT Winchips with 3dNow! capabilities.       - "GeodeGX1" for Geode GX1 (Cyrix MediaGX).       - "Geode GX/LX" For AMD Geode GX and LX processors.       - "CyrixIII/VIA C3" for VIA Cyrix III or VIA C3.       - "VIA C3-2" for VIA C3-2 "Nehemiah" (model 9 and above).       - "VIA C7" for VIA C7.            If you dont know what to do, choose "386".          config M486     bool "486"     depends on X86_32     ---help---       Select this for a 486 series processor, either Intel or one of the       compatible processors from AMD, Cyrix, IBM, or Intel.  Includes DX,       DX2, and DX4 variants; also SL/SLC/SLC2/SLC3/SX/SX2 and UMC U5D or       U5S.          config M586     bool "586/K5/5x86/6x86/6x86MX"     depends on X86_32     ---help---       Select this for an 586 or 686 series processor such as the AMD K5,       the Cyrix 5x86, 6x86 and 6x86MX.  This choice does not       assume the RDTSC (Read Time Stamp Counter) instruction.          config M586TSC     bool "Pentium-Classic"     depends on X86_32     ---help---       Select this for a Pentium Classic processor with the RDTSC (Read       Time Stamp Counter) instruction for benchmarking.          config M586MMX     bool "Pentium-MMX"     depends on X86_32     ---help---       Select this for a Pentium with the MMX graphics/multimedia       extended instructions.          config M686     bool "Pentium-Pro"     depends on X86_32     ---help---       Select this for Intel Pentium Pro chips.  This enables the use of       Pentium Pro extended instructions, and disables the init-time guard       against the f00f bug found in earlier Pentiums.          config MPENTIUMII     bool "Pentium-II/Celeron(pre-Coppermine)"     depends on X86_32     ---help---       Select this for Intel chips based on the Pentium-II and       pre-Coppermine Celeron core.  This option enables an unaligned       copy optimization, compiles the kernel with optimization flags       tailored for the chip, and applies any applicable Pentium Pro       optimizations.          config MPENTIUMIII     bool "Pentium-III/Celeron(Coppermine)/Pentium-III Xeon"     depends on X86_32     ---help---       Select this for Intel chips based on the Pentium-III and       Celeron-Coppermine core.  This option enables use of some       extended prefetch instructions in addition to the Pentium II       extensions.          config MPENTIUMM     bool "Pentium M"     depends on X86_32     ---help---       Select this for Intel Pentium M (not Pentium-4 M)       notebook chips.          config MPENTIUM4     bool "Pentium-4/Celeron(P4-based)/Pentium-4 M/older Xeon"     depends on X86_32     ---help---       Select this for Intel Pentium 4 chips.  This includes the       Pentium 4, Pentium D, P4-based Celeron and Xeon, and       Pentium-4 M (not Pentium M) chips.  This option enables compile       flags optimized for the chip, uses the correct cache line size, and       applies any applicable optimizations.            CPUIDs: F[0-6][1-A] (in /proc/cpuinfo show = cpu family : 15 )            Select this for:         Pentiums (Pentium 4, Pentium D, Celeron, Celeron D) corename:         -Willamette         -Northwood         -Mobile Pentium 4         -Mobile Pentium 4 M         -Extreme Edition (Gallatin)         -Prescott         -Prescott 2M         -Cedar Mill         -Presler         -Smithfiled         Xeons (Intel Xeon, Xeon MP, Xeon LV, Xeon MV) corename:         -Foster         -Prestonia         -Gallatin         -Nocona         -Irwindale         -Cranford         -Potomac         -Paxville         -Dempsey               config MK6     bool "K6/K6-II/K6-III"     depends on X86_32     ---help---       Select this for an AMD K6-family processor.  Enables use of       some extended instructions, and passes appropriate optimization       flags to GCC.          config MK7     bool "Athlon/Duron/K7"     depends on X86_32     ---help---       Select this for an AMD Athlon K7-family processor.  Enables use of       some extended instructions, and passes appropriate optimization       flags to GCC.          config MK8     bool "Opteron/Athlon64/Hammer/K8"     ---help---       Select this for an AMD Opteron or Athlon64 Hammer-family processor.       Enables use of some extended instructions, and passes appropriate       optimization flags to GCC.          config MCRUSOE     bool "Crusoe"     depends on X86_32     ---help---       Select this for a Transmeta Crusoe processor.  Treats the processor       like a 586 with TSC, and sets some GCC optimization flags (like a       Pentium Pro with no alignment requirements).          config MEFFICEON     bool "Efficeon"     depends on X86_32     ---help---       Select this for a Transmeta Efficeon processor.          config MWINCHIPC6     bool "Winchip-C6"     depends on X86_32     ---help---       Select this for an IDT Winchip C6 chip.  Linux and GCC       treat this chip as a 586TSC with some extended instructions       and alignment requirements.          config MWINCHIP3D     bool "Winchip-2/Winchip-2A/Winchip-3"     depends on X86_32     ---help---       Select this for an IDT Winchip-2, 2A or 3.  Linux and GCC       treat this chip as a 586TSC with some extended instructions       and alignment requirements.  Also enable out of order memory       stores for this CPU, which can increase performance of some       operations.          config MELAN     bool "AMD Elan"     depends on X86_32     ---help---       Select this for an AMD Elan processor.            Do not use this option for K6/Athlon/Opteron processors!          config MGEODEGX1     bool "GeodeGX1"     depends on X86_32     ---help---       Select this for a Geode GX1 (Cyrix MediaGX) chip.          config MGEODE_LX     bool "Geode GX/LX"     depends on X86_32     ---help---       Select this for AMD Geode GX and LX processors.          config MCYRIXIII     bool "CyrixIII/VIA-C3"     depends on X86_32     ---help---       Select this for a Cyrix III or C3 chip.  Presently Linux and GCC       treat this chip as a generic 586. Whilst the CPU is 686 class,       it lacks the cmov extension which gcc assumes is present when       generating 686 code.       Note that Nehemiah (Model 9) and above will not boot with this       kernel due to them lacking the 3DNow! instructions used in earlier       incarnations of the CPU.          config MVIAC3_2     bool "VIA C3-2 (Nehemiah)"     depends on X86_32     ---help---       Select this for a VIA C3 "Nehemiah". Selecting this enables usage       of SSE and tells gcc to treat the CPU as a 686.       Note, this kernel will not boot on older (pre model 9) C3s.          config MVIAC7     bool "VIA C7"     depends on X86_32     ---help---       Select this for a VIA C7.  Selecting this uses the correct cache       shift and tells gcc to treat the CPU as a 686.          config MPSC     bool "Intel P4 / older Netburst based Xeon"     depends on X86_64     ---help---       Optimize for Intel Pentium 4, Pentium D and older Nocona/Dempsey       Xeon CPUs with Intel 64bit which is compatible with x86-64.       Note that the latest Xeons (Xeon 51xx and 53xx) are not based on the       Netburst core and shouldnt use this option. You can distinguish them       using the cpu family field       in /proc/cpuinfo. Family 15 is an older Xeon, Family 6 a newer one.          config MCORE2     bool "Core 2/newer Xeon"     ---help---            Select this for Intel Core 2 and newer Core 2 Xeons (Xeon 51xx and       53xx) CPUs. You can distinguish newer from older Xeons by the CPU       family in /proc/cpuinfo. Newer ones have 6 and older ones 15       (not a typo)          config MATOM     bool "Intel Atom"     ---help---            Select this for the Intel Atom platform. Intel Atom CPUs have an       in-order pipelining architecture and thus can benefit from       accordingly optimized code. Use a recent GCC with specific Atom       support in order to fully benefit from selecting this option.          config GENERIC_CPU     bool "Generic-x86-64"     depends on X86_64     ---help---       Generic x86-64 CPU.       Run equally well on all x86-64 CPUs.          endchoice          config X86_GENERIC     bool "Generic x86 support"     depends on X86_32     ---help---       Instead of just including optimizations for the selected       x86 variant (e.g. PII, Crusoe or Athlon), include some more       generic optimizations as well. This will make the kernel       perform better on x86 CPUs other than that selected.            This is really intended for distributors who need more       generic optimizations.          #     # Define implied options from the CPU selection here     config X86_INTERNODE_CACHE_SHIFT     int     default "12" if X86_VSMP     default X86_L1_CACHE_SHIFT          config X86_CMPXCHG     def_bool y     depends on X86_64 || (X86_32 && !M386)          config X86_L1_CACHE_SHIFT     int     default "7" if MPENTIUM4 || MPSC     default "6" if MK7 || MK8 || MPENTIUMM || MCORE2 || MATOM || MVIAC7 || X86_GENERIC || GENERIC_CPU     default "4" if MELAN || M486 || M386 || MGEODEGX1     default "5" if MWINCHIP3D || MWINCHIPC6 || MCRUSOE || MEFFICEON ||    MCYRIXIII || MK6 || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || M586 || MVIAC3_2 || MGEODE_LX          config X86_XADD     def_bool y     depends on !M386          config X86_PPRO_FENCE     bool "PentiumPro memory ordering errata workaround"     depends on M686 || M586MMX || M586TSC || M586 || M486 || M386 || MGEODEGX1     ---help---       Old PentiumPro multiprocessor systems had errata that could cause       memory operations to violate the x86 ordering standard in rare cases.       Enabling this option will attempt to work around some (but not all)       occurrences of this problem, at the cost of much heavier spinlock and       memory barrier operations.            If unsure, say n here. Even distro kernels should think twice before       enabling this: there are few systems, and an unlikely bug.          config X86_F00F_BUG     def_bool y     depends on M586MMX || M586TSC || M586 || M486 || M386          config X86_INVD_BUG     def_bool y     depends on M486 || M386          config X86_WP_WORKS_OK     def_bool y     depends on !M386          config X86_INVLPG     def_bool y     depends on X86_32 && !M386          config X86_BSWAP     def_bool y     depends on X86_32 && !M386          config X86_POPAD_OK     def_bool y     depends on X86_32 && !M386          config X86_ALIGNMENT_16     def_bool y     depends on MWINCHIP3D || MWINCHIPC6 || MCYRIXIII || MELAN || MK6 || M586MMX || M586TSC || M586 || M486 || MVIAC3_2 || MGEODEGX1          config X86_INTEL_USERCOPY     def_bool y     depends on MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M586MMX || X86_GENERIC || MK8 || MK7 || MEFFICEON || MCORE2          config X86_USE_PPRO_CHECKSUM     def_bool y     depends on MWINCHIP3D || MWINCHIPC6 || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MK8 || MVIAC3_2 || MVIAC7 || MEFFICEON || MGEODE_LX || MCORE2 || MATOM          config X86_USE_3DNOW     def_bool y     depends on (MCYRIXIII || MK7 || MGEODE_LX) && !UML          config X86_OOSTORE     def_bool y     depends on (MWINCHIP3D || MWINCHIPC6) && MTRR          #     # P6_NOPs are a relatively minor optimization that require a family >=     # 6 processor, except that it is broken on certain VIA chips.     # Furthermore, AMD chips prefer a totally different sequence of NOPs     # (which work on all CPUs).  In addition, it looks like Virtual PC     # does not understand them.     #     # As a result, disallow these if we're not compiling for X86_64 (these     # NOPs do work on all x86-64 capable chips); the list of processors in     # the right-hand clause are the cores that benefit from this optimization.     #     config X86_P6_NOP     def_bool y     depends on X86_64     depends on (MCORE2 || MPENTIUM4 || MPSC)          config X86_TSC     def_bool y     depends on ((MWINCHIP3D || MCRUSOE || MEFFICEON || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || MK8 || MVIAC3_2 || MVIAC7 || MGEODEGX1 || MGEODE_LX || MCORE2 || MATOM) && !X86_NUMAQ) || X86_64          config X86_CMPXCHG64     def_bool y     depends on X86_PAE || X86_64 || MCORE2 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MATOM          # this should be set for all -march=.. options where the compiler     # generates cmov.     config X86_CMOV     def_bool y     depends on (MK8 || MK7 || MCORE2 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC3_2 || MVIAC7 || MCRUSOE || MEFFICEON || X86_64 || MATOM || MGEODE_LX)          config X86_MINIMUM_CPU_FAMILY     int     default "64" if X86_64     default "6" if X86_32 && X86_P6_NOP     default "5" if X86_32 && X86_CMPXCHG64     default "4" if X86_32 && (X86_XADD || X86_CMPXCHG || X86_BSWAP || X86_WP_WORKS_OK)     default "3"          config X86_DEBUGCTLMSR     def_bool y     depends on !(MK6 || MWINCHIPC6 || MWINCHIP3D || MCYRIXIII || M586MMX || M586TSC || M586 || M486 || M386) && !UML          menuconfig PROCESSOR_SELECT     bool "Supported processor vendors" if EXPERT     ---help---       This lets you choose what x86 vendor support code your kernel       will include.          config CPU_SUP_INTEL     default y     bool "Support Intel processors" if PROCESSOR_SELECT     ---help---       This enables detection, tunings and quirks for Intel processors            You need this enabled if you want your kernel to run on an       Intel CPU. Disabling this option on other types of CPUs       makes the kernel a tiny bit smaller. Disabling it on an Intel       CPU might render the kernel unbootable.            If unsure, say N.          config CPU_SUP_CYRIX_32     default y     bool "Support Cyrix processors" if PROCESSOR_SELECT     depends on M386 || M486 || M586 || M586TSC || M586MMX || (EXPERT && !64BIT)     ---help---       This enables detection, tunings and quirks for Cyrix processors            You need this enabled if you want your kernel to run on a       Cyrix CPU. Disabling this option on other types of CPUs       makes the kernel a tiny bit smaller. Disabling it on a Cyrix       CPU might render the kernel unbootable.            If unsure, say N.          config CPU_SUP_AMD     default y     bool "Support AMD processors" if PROCESSOR_SELECT     ---help---       This enables detection, tunings and quirks for AMD processors            You need this enabled if you want your kernel to run on an       AMD CPU. Disabling this option on other types of CPUs       makes the kernel a tiny bit smaller. Disabling it on an AMD       CPU might render the kernel unbootable.            If unsure, say N.          config CPU_SUP_CENTAUR     default y     bool "Support Centaur processors" if PROCESSOR_SELECT     ---help---       This enables detection, tunings and quirks for Centaur processors            You need this enabled if you want your kernel to run on a       Centaur CPU. Disabling this option on other types of CPUs       makes the kernel a tiny bit smaller. Disabling it on a Centaur       CPU might render the kernel unbootable.            If unsure, say N.          config CPU_SUP_TRANSMETA_32     default y     bool "Support Transmeta processors" if PROCESSOR_SELECT     depends on !64BIT     ---help---       This enables detection, tunings and quirks for Transmeta processors            You need this enabled if you want your kernel to run on a       Transmeta CPU. Disabling this option on other types of CPUs       makes the kernel a tiny bit smaller. Disabling it on a Transmeta       CPU might render the kernel unbootable.            If unsure, say N.          config CPU_SUP_UMC_32     default y     bool "Support UMC processors" if PROCESSOR_SELECT     depends on M386 || M486 || (EXPERT && !64BIT)     ---help---       This enables detection, tunings and quirks for UMC processors            You need this enabled if you want your kernel to run on a       UMC CPU. Disabling this option on other types of CPUs       makes the kernel a tiny bit smaller. Disabling it on a UMC       CPU might render the kernel unbootable.            If unsure, say N.      apt sources.list                1 deb http://ftp.us.debian.org/debian squeeze main      2 deb-src http://ftp.us.debian.org/debian squeeze main      3       4 deb http://ftp.us.debian.org/debian squeeze-updates main      5 deb-src http://ftp.us.debian.org/debian squeeze-updates main      6       7 deb http://security.debian.org/ squeeze/updates main      8 deb-src http://security.debian.org/ squeeze/updates main      9      10 deb http://repository.spotify.com stable non-free     11      12 #deb http://ftp.us.debian.org/debian squeeze main     13 #deb-src http://ftp.us.debian.org/debian squeeze main     14      15 #deb http://ftp.us.debian.org/debian squeeze-updates main     16 #deb-src http://ftp.us.debian.org/debian squeeze-updates main      17      18 # remastersys:     19 # deb http://www.geekconnection.org/remastersys/repository squeeze/     20      21 # Squeezy Bullshit:     22 # deb http://ftp.de.debian.org/debian squeeze main non-free     23      24 #deb http://www.debian-multimedia.org squeeze main non-free     25 #deb-src http://www.debian-multimedia.org squeeze main non-free      Results:               :apt-get install linux-headers-($uname -r)     Reading package lists... Done     Building dependency tree            Reading state information... Done     linux-headers-3.7.10blue-ghost1.9 is already the newest version.     0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.          :apt-cache search virtualbox          imvirt - detects several virtualizations     libimvirt-perl - Perl module for detecting several virtualizations     libvirt-bin - the programs for the libvirt library     libvirt-dev - development files for the libvirt library     libvirt-doc - documentation for the libvirt library     libvirt0-dbg - library for interfacing with different virtualization systems     libvirt0 - library for interfacing with different virtualization systems     python-libvirt - libvirt Python bindings     virtualbox-ose-dbg - x86 virtualization solution - debugging symbols     virtualbox-ose-dkms - x86 virtualization solution - kernel module sources for dkms     virtualbox-ose-fuse - x86 virtualization solution - virtual filesystem     virtualbox-ose-guest-dkms - x86 virtualization solution - guest addition module source for dkms     virtualbox-ose-guest-source - x86 virtualization solution - guest addition module source     virtualbox-ose-guest-utils - x86 virtualization solution - non-X11 guest utilities     virtualbox-ose-guest-x11 - x86 virtualization solution - X11 guest utilities     virtualbox-ose-qt - x86 virtualization solution - Qt based user interface     virtualbox-ose-source - x86 virtualization solution - kernel module source     virtualbox-ose - x86 virtualization solution - base binaries     xmount - tool to crossmount between multiple input and output harddisk images     virtualbox-4.3 - Oracle VM VirtualBox          :apt-get install virutalbox     Reading package lists... Done     Building dependency tree            Reading state information... Done     virtualbox-4.3 is already the newest version.     0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.


title: Variable definition changes in Bash

text: In Bash 3.00.16, the following prints `defined`, and in Bash 4.2.24 it prints `undefined`:               my_test() {         local foo         if [ -n "${foo+defined}" ]         then             echo defined         else             echo undefined         fi     }     my_test      I couldn't find anything obviously relevant on the Bash changes page.   * When was this changed?   * Was this considered a bug fix, or a side effect of some other change? In other words, can the current behavior be considered stable?


title: ssh password less authentication doesn't work

text: sorry for posting common topic again. I read several similar question but I still haven't found why it is not working. So let me describe what I did. I generated private/public rsa key files on a different machine than client/server are. Then I created `~/.ssh` dir and copy over private key `id_rsa` on a client side, set appropriate owner and file permissions. On a server side I created again under the user I want connect to `~/.ssh` put the public key into authorized keys. When I tried ssh client to host it still requires password even though that keys were generated as password less. Did I overlooked something obvious? I also tried to find on a server side check the ssh log for details why it requires passwd - but /var/log/auth or /var/log/ssh doesn't exist. Isn't it enabled by default or do I need to change config of sshd and restart the service. I'm using CentOS 6. To Answer the questions: ~/.ssh on server side:               rw-------. hdfs hadoop  authorized_keys          rw-------. hdfs hadoop  config          rw-------. hdfs hadoop  id_rsa.pub      cnfig contains:               Host *     StrictHostKeyChecking no      ~/.ssh on client side:               rw-------. hdfs hadoop authorized_keys          rw-------. hdfs hadoop config - the content is the same          rw-------. hdfs hadoop id_rsa          rw-r--r--. hdfs hadoop known_hosts         * this one were probably generated by my attempts


title: Breaking a hard-link in-place?

text: I am keeping my dotfiles under version control and the script deploying them creates hard links. I also use `etckeeper` to put my `/etc` under version control. Recently I have gotten warnings like this:               warning: hard-linked files could cause problems with bzr      A simple copy (`cp filename.ext filename.ext`) will not work:               cp: `filename.ext' and `filename.ext' are the same file      Renaming/moving a file - except across volumes - also doesn't break the hard- link. So my question is: is there a way to break a hard-link to a file without actually having to know where the other hard-link/s to that file is/are?


title: Safest way to run ext4 fsck on external drive

text: I have an external drive formatted in ext4 that throws this error message when is plugged in `EXT4-fs (sdd2): error count: 8 initial error at 1366215273 last error at 1366215527`,it generally works just fine,apart from some times when it doesn't get automounted:I reckon it is about time for a fsck,but how can I do this in the safest possible way ? Is **fsck -f -v** the most advisable option ? Should I backup the data first ?


title: Linux training setup

text: I want to give a tutorial/training type seminar on Linux. I also want to demonstrate certain Linux specific software with audience participation (on their own machines). What is the best way to go about this? I have a Linux installation on my laptop with all the software, tools, etc that I want to demo. How do I easily create a bootable image (that I could run from a USB stick) from my existing install? (FYI: Live CD version does not have all the software [some of it is custom s/w] that I want to present) Also, one other thing I thought of was having them VNC into my laptop while I'm presenting. Though I would have to test to see if it can handle 20 odd users.


title: Issues with team fortress 2 in pear os 7

text: I'm having issues with booting Team fortress 2 in Pear OS.Every time I run tf2,it says that either my graphics card isn't supported, or that I should update my opengl drivers.I have an ati Radeon x1600 graphics card. I've tried to update the drivers, but when I reboot, the screen freezes at login. Any help is appreciated, I'm desperate.


title: Bash subshell creation with curly braces

text: According to this, **_placing a list of commands between curly braces causes the list to be executed in the current shell context. No subshell is created_**. Using `ps` to see this in action This is the process hierarchy for a process pipeline executed directly on command line. 4398 is the PID for the login shell:               sleep 2 | ps -H;       PID TTY          TIME CMD        4398 pts/23   00:00:00 bash        29696 pts/23   00:00:00   sleep        29697 pts/23   00:00:00   ps      Now follows the process hierarchy for a process pipeline between curly braces executed directly on command line. 4398 is the PID for the login shell. **It's similar to the hierarchy above proving that everything is executed in current shell context** :               { sleep 2 | ps -H; }        PID TTY          TIME CMD         4398 pts/23   00:00:00 bash         29588 pts/23   00:00:00   sleep         29589 pts/23   00:00:00   ps      Now, this is the process hierarchy when the `sleep` in the pipeline is itself placed inside curly braces (so two levels of braces in all)               { { sleep 2; } | ps -H; }       PID TTY          TIME CMD        4398 pts/23   00:00:00 bash        29869 pts/23   00:00:00   bash        29871 pts/23   00:00:00     sleep        29870 pts/23   00:00:00   ps      **Why does`bash` have to create a subshell to run `sleep` in the 3rd case when the documentation states that commands between curly braces are executed in current shell context?**


title: Openbox - problem with background of windows

text: I have a problem with themes in Openbox, I checked every theme and none of them changed the background or the style of the windows! Openbox only changes the titlebars and the right-click menus. What happen? ![Screen of window](http://i.stack.imgur.com/ZpMMJ.jpg) ![How it should look like](http://i.stack.imgur.com/GVJuc.png)


title: is there a pastebin service that supports terminal escape sequences?

text: Is there a pastebin service that supports colors? I understand some of them have syntax hilighting, but I'd like to do arbitrary coloring, preferably using the terminal escape sequences. Example, i'd like to do:               grep --color=force foo /etc/motd | pastebinit      Does anyone know such a cool site?


title: grep print relative file path when doing a recursive search

text: I'm trying to find out which version of hibernate the project depends on (this is orthogonal to my question). We have a parent project with several sub projects, and I know this is defined in one or more `pom.xml`. The problem is that when it prints a match all it's telling me is the line and that it was found in `pom.xml`, I want to know which sub project `pom.xml`. How can I get `grep` to print the relative path (absolute would work too but less pretty)? If it's not possible alternative suggestions welcome.               $ grep -rI -3 org.hibernate pom.xml


title: degraded software raid boot

text: I've installed Ubuntu 12.04.1 in a new server and set up the 4 hard drives with 3 RAID 1 devices, the configuration is such that the first two drives have md0 (swap space) and md1 (/) with the third and fourth drives having md2 (/var). I've been testing the operation under a drive failure and found that the system boots fine if I remove disk two but if I remove disk one then the system gets to grub and then just restarts. I'm confused as to why grub appears to be loading properly from disk two but then the boot fails. I've tried to copy the MBR from disk 1 to 2:               dd if=/dev/sda of=/dev/sdb bs=512 count=1      but this didn't make a difference. grub.cfg               #     # DO NOT EDIT THIS FILE     #     # It is automatically generated by grub-mkconfig using templates     # from /etc/grub.d and settings from /etc/default/grub     #          ### BEGIN /etc/grub.d/00_header ###     if [ -s $prefix/grubenv ]; then       set have_grubenv=true       load_env     fi     set default="0"     if [ "${prev_saved_entry}" ]; then       set saved_entry="${prev_saved_entry}"       save_env saved_entry       set prev_saved_entry=       save_env prev_saved_entry       set boot_once=true     fi          function savedefault {       if [ -z "${boot_once}" ]; then         saved_entry="${chosen}"         save_env saved_entry       fi     }          function recordfail {       set recordfail=1       if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi     }          function load_video {       insmod vbe       insmod vga       insmod video_bochs       insmod video_cirrus     }          insmod raid     insmod mdraid1x     insmod part_msdos     insmod part_msdos     insmod ext2     set root='(mduuid/bec69e6b53a222d6726d1f6a11d27043)'     search --no-floppy --fs-uuid --set=root c3a8948c-4ca8-4d3b-acbe-64baa0f7a181     if loadfont /usr/share/grub/unicode.pf2 ; then       set gfxmode=auto       load_video       insmod gfxterm       insmod raid       insmod mdraid1x       insmod part_msdos       insmod part_msdos       insmod ext2       set root='(mduuid/bec69e6b53a222d6726d1f6a11d27043)'       search --no-floppy --fs-uuid --set=root c3a8948c-4ca8-4d3b-acbe-64baa0f7a181       set locale_dir=($root)/boot/grub/locale       set lang=en_GB       insmod gettext     fi     terminal_output gfxterm     if [ "${recordfail}" = 1 ]; then       set timeout=-1     else       set timeout=2     fi     ### END /etc/grub.d/00_header ###          ### BEGIN /etc/grub.d/05_debian_theme ###     set menu_color_normal=white/black     set menu_color_highlight=black/light-gray     ### END /etc/grub.d/05_debian_theme ###          ### BEGIN /etc/grub.d/10_linux ###     function gfxmode {         set gfxpayload="${1}"         if [ "${1}" = "keep" ]; then             set vt_handoff=vt.handoff=7         else             set vt_handoff=         fi     }     if [ "${recordfail}" != 1 ]; then       if [ -e ${prefix}/gfxblacklist.txt ]; then         if hwmatch ${prefix}/gfxblacklist.txt 3; then           if [ ${match} = 0 ]; then             set linux_gfx_mode=keep           else             set linux_gfx_mode=text           fi         else           set linux_gfx_mode=text         fi       else         set linux_gfx_mode=keep       fi     else       set linux_gfx_mode=text     fi     export linux_gfx_mode     if [ "${linux_gfx_mode}" != "text" ]; then load_video; fi     menuentry 'Ubuntu, with Linux 3.2.0-29-generic' --class ubuntu --class gnu-linux --class gnu --class os {         recordfail         gfxmode $linux_gfx_mode         insmod gzio         insmod raid         insmod mdraid1x         insmod part_msdos         insmod part_msdos         insmod ext2         set root='(mduuid/bec69e6b53a222d6726d1f6a11d27043)'         search --no-floppy --fs-uuid --set=root c3a8948c-4ca8-4d3b-acbe-64baa0f7a181         linux   /boot/vmlinuz-3.2.0-29-generic root=UUID=c3a8948c-4ca8-4d3b-acbe-64baa0f7a181 ro            initrd  /boot/initrd.img-3.2.0-29-generic     }     menuentry 'Ubuntu, with Linux 3.2.0-29-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {         recordfail         insmod gzio         insmod raid         insmod mdraid1x         insmod part_msdos         insmod part_msdos         insmod ext2         set root='(mduuid/bec69e6b53a222d6726d1f6a11d27043)'         search --no-floppy --fs-uuid --set=root c3a8948c-4ca8-4d3b-acbe-64baa0f7a181         echo    'Loading Linux 3.2.0-29-generic ...'         linux   /boot/vmlinuz-3.2.0-29-generic root=UUID=c3a8948c-4ca8-4d3b-acbe-64baa0f7a181 ro recovery nomodeset          echo    'Loading initial ramdisk ...'         initrd  /boot/initrd.img-3.2.0-29-generic     }     ### END /etc/grub.d/10_linux ###          ### BEGIN /etc/grub.d/20_linux_xen ###     ### END /etc/grub.d/20_linux_xen ###          ### BEGIN /etc/grub.d/20_memtest86+ ###     menuentry "Memory test (memtest86+)" {         insmod raid         insmod mdraid1x         insmod part_msdos         insmod part_msdos         insmod ext2         set root='(mduuid/bec69e6b53a222d6726d1f6a11d27043)'         search --no-floppy --fs-uuid --set=root c3a8948c-4ca8-4d3b-acbe-64baa0f7a181         linux16 /boot/memtest86+.bin     }     menuentry "Memory test (memtest86+, serial console 115200)" {         insmod raid         insmod mdraid1x         insmod part_msdos         insmod part_msdos         insmod ext2         set root='(mduuid/bec69e6b53a222d6726d1f6a11d27043)'         search --no-floppy --fs-uuid --set=root c3a8948c-4ca8-4d3b-acbe-64baa0f7a181         linux16 /boot/memtest86+.bin console=ttyS0,115200n8     }     ### END /etc/grub.d/20_memtest86+ ###          ### BEGIN /etc/grub.d/30_os-prober ###     ### END /etc/grub.d/30_os-prober ###          ### BEGIN /etc/grub.d/40_custom ###     # This file provides an easy way to add custom menu entries.  Simply type the     # menu entries you want to add after this comment.  Be careful not to change     # the 'exec tail' line above.     ### END /etc/grub.d/40_custom ###          ### BEGIN /etc/grub.d/41_custom ###     if [ -f  $prefix/custom.cfg ]; then       source $prefix/custom.cfg;     fi     ### END /etc/grub.d/41_custom ###      mdadm configuration               :~$ mdadm /dev/md0      /dev/md0:             Version : 1.2       Creation Time : Wed Aug 29 10:28:02 2012          Raid Level : raid1          Array Size : 15615872 (14.89 GiB 15.99 GB)       Used Dev Size : 15615872 (14.89 GiB 15.99 GB)        Raid Devices : 2       Total Devices : 2         Persistence : Superblock is persistent              Update Time : Mon Sep  3 10:35:25 2012               State : clean       Active Devices : 2     Working Devices : 2      Failed Devices : 0       Spare Devices : 0                     Name : norsewind-obs:0  (local to host norsewind-obs)                UUID : b55552d2:1e554573:82671934:3831d058              Events : 19              Number   Major   Minor   RaidDevice State            0       8        1        0      active sync   /dev/sda1            1       8       17        1      active sync   /dev/sdb1               :~$ sudo mdadm -D /dev/md1             Version : 1.2       Creation Time : Wed Aug 29 10:28:11 2012          Raid Level : raid1          Array Size : 1937758016 (1847.99 GiB 1984.26 GB)       Used Dev Size : 1937758016 (1847.99 GiB 1984.26 GB)        Raid Devices : 2       Total Devices : 2         Persistence : Superblock is persistent              Update Time : Mon Sep  3 10:47:40 2012               State : clean       Active Devices : 2     Working Devices : 2      Failed Devices : 0       Spare Devices : 0                     Name : norsewind-obs:1  (local to host norsewind-obs)                UUID : bec69e6b:53a222d6:726d1f6a:11d27043              Events : 263              Number   Major   Minor   RaidDevice State            0       8        2        0      active sync   /dev/sda2            2       8       18        1      active sync   /dev/sdb2      fdisk               :~$ sudo fdisk -l          Disk /dev/sda: 2000.4 GB, 2000398934016 bytes     255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors     Units = sectors of 1 * 512 = 512 bytes     Sector size (logical/physical): 512 bytes / 512 bytes     I/O size (minimum/optimal): 512 bytes / 512 bytes     Disk identifier: 0x000ccfa5             Device Boot      Start         End      Blocks   Id  System     /dev/sda1            2048    31250431    15624192   fd  Linux RAID autodetect     /dev/sda2   *    31250432  3907028991  1937889280   fd  Linux RAID autodetect          Disk /dev/sdb: 2000.4 GB, 2000398934016 bytes     255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors     Units = sectors of 1 * 512 = 512 bytes     Sector size (logical/physical): 512 bytes / 512 bytes     I/O size (minimum/optimal): 512 bytes / 512 bytes     Disk identifier: 0x000ccfa5             Device Boot      Start         End      Blocks   Id  System     /dev/sdb1            2048    31250431    15624192   fd  Linux RAID autodetect     /dev/sdb2   *    31250432  3907028991  1937889280   fd  Linux RAID autodetect          Disk /dev/sdc: 2000.4 GB, 2000398934016 bytes     255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors     Units = sectors of 1 * 512 = 512 bytes     Sector size (logical/physical): 512 bytes / 512 bytes     I/O size (minimum/optimal): 512 bytes / 512 bytes     Disk identifier: 0x000c73aa             Device Boot      Start         End      Blocks   Id  System     /dev/sdc1            2048  3907028991  1953513472   fd  Linux RAID autodetect          Disk /dev/sdd: 2000.4 GB, 2000398934016 bytes     255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors     Units = sectors of 1 * 512 = 512 bytes     Sector size (logical/physical): 512 bytes / 512 bytes     I/O size (minimum/optimal): 512 bytes / 512 bytes     Disk identifier: 0x00035b05             Device Boot      Start         End      Blocks   Id  System     /dev/sdd1            2048  3907028991  1953513472   fd  Linux RAID autodetect          Disk /dev/md2: 2000.3 GB, 2000263380992 bytes     2 heads, 4 sectors/track, 488345552 cylinders, total 3906764416 sectors     Units = sectors of 1 * 512 = 512 bytes     Sector size (logical/physical): 512 bytes / 512 bytes     I/O size (minimum/optimal): 512 bytes / 512 bytes     Disk identifier: 0x00000000          Disk /dev/md2 doesn't contain a valid partition table          Disk /dev/md0: 16.0 GB, 15990652928 bytes     2 heads, 4 sectors/track, 3903968 cylinders, total 31231744 sectors     Units = sectors of 1 * 512 = 512 bytes     Sector size (logical/physical): 512 bytes / 512 bytes     I/O size (minimum/optimal): 512 bytes / 512 bytes     Disk identifier: 0x00000000          Disk /dev/md0 doesn't contain a valid partition table          Disk /dev/md1: 1984.3 GB, 1984264208384 bytes     2 heads, 4 sectors/track, 484439504 cylinders, total 3875516032 sectors     Units = sectors of 1 * 512 = 512 bytes     Sector size (logical/physical): 512 bytes / 512 bytes     I/O size (minimum/optimal): 512 bytes / 512 bytes     Disk identifier: 0x00000000          Disk /dev/md1 doesn't contain a valid partition table


title: How do I write a test for system login?

text: I've written a Python CGI script that invokes `bash` commands, and it needs to test for a successful login on the host. How do I write a test for that? For example, could I create a `bash` script that tests a given username and password combination against the registered user on the host?


title: Redirecting syslogd Error Messages to an Error Log or to a Null File?

text: I have an old PowerPC laptop (old Mac Powerbook G4) that I am running a variant of Debian Squeeze on (MintPPC 9). I keep getting Kernel error messages when I am connected to a particular wireless network but not at other times. I suspect, but have not proven, that it is arising from the networking module. The error messages overwhelm anything I am doing at the time (e.g. overlaying a CLI Emacs display) but do not otherwise seem to influence the function of the machine, even the networking seems to soldier on. Is there a way to redirect error messages from syslogd specifically to an error log or possibly `/dev/null` but to leave other error messages going to `stdout`. I know that `2>>` will direct error messages but since I did not consciously start syslogd I don't know how to do so. Sometimes the error messages are more elaborate but here is an example:               Message form syslogd@debian at Dec 10 09:48:02 ...      kernel:[   720.749515] -----------[  cut here  ]---------------


title: How does the Linux kernel decide how much bandwidth to allocate to Isochronous USB endpoints?

text: As far as I'm aware, USB endpoints that use isochronous transfers have a 'wMaxPacketSize' parameter associated with them that is used by the kernel to guarantee a certain amount of bandwidth for the endpoint. If I'm not mistaken, this maximum packet size can range anywhere between 0 to 1024 bytes (for high speed transfers). How does this parameter translate into bandwidth allocation in terms of Mbps of a high speed (EHCI) controller in a Linux system? What other factors, if any, does USB bandwidth allocation depend on? Thanks!


title: emacs syntax highlighting fails on my SSH client

text: I need to connect to a remote server by SSH to edit some documents. When I work at home, I SSH to the remote server using SSH Secure Shell and open `emacs`, but it doesn't fully highlight documents as I want: ![Screenshot of emacs on this server](http://i.stack.imgur.com/CwVwe.png) Is there any way to fix it so that syntax highlighting works like when I ssh through Cygwin? ![Screenshot of emacs on Cygwin](http://i.stack.imgur.com/AuppZ.png) SSH Secure Shell only has a problem with emacs; everything else works fine. ![Syntax highlight works for bash](http://i.stack.imgur.com/mPtzw.png)


title: How to do max-depth search in ack and grep?

text: Is there any way to tell `ack` to only search for text on the current folder? (or specify a `max-depth` level?) And with `grep`?


title: GNU screen: how to resume my screen session reliably?

text: I was unable to resume my screen session this morning, even after I killed the old screen -r session.               svtbuild@dvm-2:~/rfs$ screen -r 17757.pts-0.dvm-2     There is a screen on:         17757.pts-0.dvm-2   (11/27/2012 04:49:19 PM)    (Attached)     There is no screen to be resumed matching 17757.pts-0.dvm-2.      After waiting for a while I was able to resume. How can I do this more reliably?


title: How to use zypper in bash scripts for someone coming from apt-get?

text: I have a few questions about moving from apt-get to zypper in bash scripts. What is the equivalent of this?               sudo apt-get install curl --assume-yes      (where curl could be any package) I found the Zypper Cheat Sheet - openSUSE. Very nice! But I would appreciate the voice of experience here -- what's the right way to use zypper in a script where I want to auto agree to all prompts and not skip things that need a response? With my inexperience I would be tempted to use:               sudo zypper --non-interactive --no-gpg-checks --quiet install --auto-agree-with-licenses curl      But is that really the equivalent of `\--assume-yes`? What about the equivalent for these?               sudo apt-get autoremove -y     sudo apt-get autoclean -y      This suggests there isn't one... Is there a replacement for gdebi-core? Or is gdebi not ever needed with zypper's "powerful satisfiability solver"? I use gdebi for situations where I need to install a package on an older version and I have a .deb file already (but not all the dependencies).


title: How to add FTP users to my CentOS VPS

text: I am running a CentOS VPS. Now I have installed an FTP server on the Server like this:               yum install vsftpd      And I have restarted the service as well. However, when I point my browser to:               ftp://myStaticIP      it does not return anything. Also, **how do I add an FTP user to my VPS** so that I can log in via a client?


title: lxc: running virtualbox inside a container

text: I've install virtualbox inside an lxc container. However when I try to start a VM I get the message: kernel driver not accessible (rc=1909) ....permission problem with /dev/vboxdrv. This obviously looks like a predictable security issue. Does anyone know how I can grant permission to the container to access this device driver: '/dev/vboxdrv'? Any help or pointers greatly appreciated.


title: Can the wilderness chunk be busy?

text: I'm curious about one aspect of heap management in linux, and particularly in ubuntu's build of glibc 2.17. I understand that the last chunk in each heap, the top or wilderness chunk, tends to be free, and gets bits carved out of it and added to it and has its size changed with `sbrk()` when needed (if it's the first heap?). However, what I can't find is this: is it possible that the wilderness chunk might ever be allocated, meaning that the highest chunk in the heap is busy? The difference may seem of theoretical interest only, but it has some implications related to whether or not it is possible to analyze a heap in memory without external metadata.


title: How to make linux see my internet connection?

text: I'm sort of booting off of a Mint 17 LiveCD (the situation is described here: How can i make my pc boot back into windows?) and the network does not work. It's wired if it matter. I've also tried to connect to the internet using USB tethering on a Galaxy S3 phone. Both methods work in Windows. What is the problem and how can I fix it? ### EDIT #1 Here's the output of the 2 commands that was requested via the comments below. `lspci`:                   00:00.0 Host bridge: Intel Corporation Mobile 4 Series Chipset Memory Controller Hub (rev 07)     00:01.0 PCI bridge: Intel Corporation Mobile 4 Series Chipset PCI Express Graphics Port (rev 07)     00:1a.0 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #4 (rev 03)     00:1a.1 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #5 (rev 03)     00:1a.7 USB controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #2 (rev 03)     00:1b.0 Audio device: Intel Corporation 82801I (ICH9 Family) HD Audio Controller (rev 03)     00:1c.0 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 1 (rev 03)     00:1c.1 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 2 (rev 03)     00:1c.3 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 4 (rev 03)     00:1c.4 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 5 (rev 03)     00:1d.0 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #1 (rev 03)     00:1d.1 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #2 (rev 03)     00:1d.2 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #3 (rev 03)     00:1d.3 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #6 (rev 03)     00:1d.7 USB controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #1 (rev 03)     00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev 93)     00:1f.0 ISA bridge: Intel Corporation ICH9M LPC Interface Controller (rev 03)     00:1f.2 SATA controller: Intel Corporation 82801IBM/IEM (ICH9M/ICH9M-E) 4 port SATA Controller [AHCI mode] (rev 03)     00:1f.3 SMBus: Intel Corporation 82801I (ICH9 Family) SMBus Controller (rev 03)     01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] RV620/M82 [Mobility Radeon HD 3450/3470]     01:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] RV620 HDMI Audio [Radeon HD 3400 Series]     06:00.0 Network controller: Intel Corporation WiFi Link 5100     08:00.0 Ethernet controller: Marvell Technology Group Ltd. 88E8055 PCI-E Gigabit Ethernet Controller (rev 13)     0a:03.0 FireWire (IEEE 1394): Ricoh Co Ltd R5C832 IEEE 1394 Controller (rev 05)     0a:03.1 SD Host controller: Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter (rev 22)     0a:03.2 System peripheral: Ricoh Co Ltd R5C592 Memory Stick Bus Host Adapter (rev 12)      `ifconfig` output:               int@mint ~ $ ifconfig -a     eth0      Link encap:Ethernet  HWaddr 00:1d:ba:b2:71:a8                 UP BROADCAST MULTICAST  MTU:1500  Metric:1               RX packets:0 errors:0 dropped:0 overruns:0 frame:0               TX packets:0 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:1000                RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)               Interrupt:16           lo        Link encap:Local Loopback                 inet addr:127.0.0.1  Mask:255.0.0.0               inet6 addr: ::1/128 Scope:Host               UP LOOPBACK RUNNING  MTU:65536  Metric:1               RX packets:137 errors:0 dropped:0 overruns:0 frame:0               TX packets:137 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:0                RX bytes:9967 (9.9 KB)  TX bytes:9967 (9.9 KB)          wlan0     Link encap:Ethernet  HWaddr 00:16:ea:2d:01:6e                 UP BROADCAST MULTICAST  MTU:1500  Metric:1               RX packets:0 errors:0 dropped:0 overruns:0 frame:0               TX packets:0 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:1000                RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)      **NOTE:** please remember this is a LiveCD "burned" on a HDD partition it is not installed. I was thinking about a problem I had with setting up PPPoE internet connection on a Linux Mint 13 box some time ago and it was all solved when I updated all packages. I'll have to research how I can update Linux Mint 17 offline. In the meantime maybe this can be fixed without having to update the OS?


title: how to disable log files for root login?

text: I don't want to disable all logs in Debian only ones that record when root logged in and for how long. when I issue `last` command in terminal, I get my IP address, etc, I want to disable this. when I go to `/var/log`, **btmp** file is empty, there is only some square sign, like unrecognized character, **wtmp** is the same. I deleted content of `auth.log`. How can I disable this type of log?


title: Multiboot, Live Tiny Core and grub4dos

text: I've got a usb pen drive that miraculously I installed grub4dos, and it works, I can start some iso's like MSDart, etc. I've decided put Tiny Core Linux in the usb stick, then I downloaded the latest iso from tinycore website, xcopy the .iso to usb stick and.. it doesn't works... I think that I need to extract the iso files in a folder and to ask to grub4dos load that folder, but I'm a big beginner on linux world, then I don't know how I do it... Someone can help me?


title: How do I access a flash drive that has been ejected without physically plugging it out and back in?

text: When I plug in my flash drive, it gets auto-mounted. If I right click on the drive and select 'eject', then it's unmounted. Now, I want to remount the drive in Terminal. How do I do this? I've been Googling this for 30 minutes and I haven't found anything that works. I've read to run '`sudo fdisk -l`' but the USB drive isn't there. `lsusb` gives me nothing either. **I want to make this clear** : I know that if I plug the flash drive in again, that I can run mount to find where it is. However, what I really want to know is, if the drive is still plugged in and was just 'ejected', how do I then remount it from Terminal without physically touching the flash drive?


title: Is it possible to remount USB drive after unmounting in Thunar?

text: After unmounting a USB disk it's like it was never connected in the first place:   * `/dev/sdX` is gone.   * `dmesg` reports "usb 9-3: USB disconnect", but `/sys/bus/usb/devices/9-3` is not there.   * `/sys/bus/pci/drivers/ehci_hcd/bind` does not exist.   * The disk does not show up in `gnome-disks` or `udevadm trigger -v`. At this point, **is it even possible to reconnect this device withoutphysically reconnecting the cable?** Other info:               $ uname --kernel-name --kernel-release --kernel-version     Linux 3.13.6-1-ARCH #1 SMP PREEMPT Fri Mar 7 22:47:48 CET 2014     $ udevadm --version      211     $ thunar --version | head -n 1     Thunar 1.6.3 (Xfce 4.10)


title: Undo safely remove device

text: After I have asked the OS to safely remove device (USB) and can no longer access it. Without plugging out and in the USB how can I make the OS gain access to the USB device again? Basically triggering the same event which is fired when the OS detects a device was plugged in, or something else.


title: avoid IPv6 link local address on interface

text: I have a setup with virtual Xen hosts connected to a set of VLAN-s. On Dom0, I have set up a bridge for each of my VLAN-s to connect DomU-s to. Bridges are set up in /etc/network/interfaces like this:               auto eth0     iface eth0 inet manual          auto eth0.1     iface eth0.1 inet manual       vlan_raw_device eth0          auto br1     iface br1 inet manual       bridge_ports eth0.1      For most of these interfaces, I don't want Dom0 to be reachable, I just want it to bridge. However, with IPv6, each interface automatically gets a link local address on the fe80::/64-network, which effectively breaks my security by letting Dom0 be available on all interfaces/VLAN-s. I guess I can block all incoming packets with iptables, but avoiding any IPv6-address altogether seems like a cleaner solution. Is there anyway to take an interface up on the link-layer but not on the IP- layer? This is linux/debian (sorry I missed this detail initially...)               (master) 844$ cat /etc/issue.net      Debian GNU/Linux 5.0     (master) 845$ uname -a     Linux master 2.6.26-2-xen-amd64 #1 SMP Sun Jun 20 20:51:58 UTC 2010 x86_64 GNU/Linux


title: FreeBSD 10, unable to reach 1 Gbps

text: I have installed FreeBSD 10-RELEASE and noticed that I'm unable to reach 1 Gbps. To measure bandwidth I use _iperf_ version 2.0.5 on both server and host. Results vary every time, but in average we have something like:               [  4]  0.0-10.0 sec   778 MBytes   602 Mbits/sec     [  4]  0.0-10.0 sec  1.08 GBytes   923 Mbits/sec      I consider result from host to server (923 Mbits/sec) as acceptable while from server to host (602 Mbits/sec) is way below my expectations. Also, I have the same unimpressive speed transferring files via CIFS to Windows host. Hardware on server side:               Intel Pentium G3420 @ 3.2 Ghz     Asus p9d-x mb     8GB ECC 1600 Mhz RAM     Inbuilt dual Intel I210AT interfaces      Hardware on client side:               Very-powerful-workstation     Intel Gigabit CT Desktop Adapter (PCI-E)      Everything connected into switch that support up to 10 Kb jumbo frame. TP-Link TL-SG1008. Any ideas how to improve speed between these two?


title: ls pagination on MontaVista with BusyBox

text: I'm logged into an IP Phone running MontaVista with a very stripped down BusyBox binary (by stripped down, I mean the OEM has removed almost all of its functionality, except the basics like `cat`, `ls` etc). I'm doing an `ls -l` on a directory and there are thousands of files. I need to be able to pause the file list on the end of each page of results. Normally I would do this with `ls -l|more` or even `ls -l|less` but of course, `more` and `less` are not present on this phone. Are there any other low-level ways of making `ls` paginate? My only other option is to write the output to a file and then `tftp` it off the server and open it on a proper computer, but this is a very roundabout (and slow) method of doing it.


title: Arch: Awesome Window Manager won't start

text: I can't get my awesome running. I installed awesome and all dependecies with pacman and followed the beginning of the following guide to get awesome running: http://awesome.naquadah.org/wiki/My_first_awesome Whenever I startx the screen turns black for a second and then X-Server "shuts down successfully" -.- When I sudo startx the ugly Test Session shows up as mentioned here: https://wiki.archlinux.org/index.php/Beginners'_Guide#Install_X version:               awesome v3.5.1 (Ruby Tuesday)      • Build: Sep 25 2013 21:14:10 for i686 by gcc version 4.8.1 (nobody@)      • Compiled against Lua 5.2.2 (running with Lua 5.2)      • D-Bus support: ✔      my xinitrc:               #!/bin/sh     #     # ~/.xinitrc     #     # Executed by startx (run your window manager from here)          if [ -d /etc/X11/xinit/xinitrc.d ]; then       for f in /etc/X11/xinit/xinitrc.d/*; do         [ -x "$f" ] && . "$f"       done       unset f     fi          exec awesome     # exec gnome-session     # exec startkde     # exec startxfce4     # ...or the Window Manager of your choice      my rc.lua (default):               -- Standard awesome library     local gears = require("gears")     local awful = require("awful")     awful.rules = require("awful.rules")     require("awful.autofocus")     -- Widget and layout library     local wibox = require("wibox")     -- Theme handling library     local beautiful = require("beautiful")     -- Notification library     local naughty = require("naughty")     local menubar = require("menubar")          -- {{{ Error handling     -- Check if awesome encountered an error during startup and fell back to     -- another config (This code will only ever execute for the fallback config)     if awesome.startup_errors then         naughty.notify({ preset = naughty.config.presets.critical,                          title = "Oops, there were errors during startup!",                          text = awesome.startup_errors })     end          -- Handle runtime errors after startup     do         local in_error = false         awesome.connect_signal("debug::error", function (err)             -- Make sure we don't go into an endless error loop             if in_error then return end             in_error = true                  naughty.notify({ preset = naughty.config.presets.critical,                              title = "Oops, an error happened!",                              text = err })             in_error = false         end)     end     -- }}}          -- {{{ Variable definitions     -- Themes define colours, icons, and wallpapers     beautiful.init("/usr/share/awesome/themes/default/theme.lua")          -- This is used later as the default terminal and editor to run.     terminal = "xterm"     editor = os.getenv("EDITOR") or "nano"     editor_cmd = terminal .. " -e " .. editor          -- Default modkey.     -- Usually, Mod4 is the key with a logo between Control and Alt.     -- If you do not like this or do not have such a key,     -- I suggest you to remap Mod4 to another key using xmodmap or other tools.     -- However, you can use another modifier like Mod1, but it may interact with others.     modkey = "Mod4"          -- Table of layouts to cover with awful.layout.inc, order matters.     local layouts =     {         awful.layout.suit.floating,         awful.layout.suit.tile,         awful.layout.suit.tile.left,         awful.layout.suit.tile.bottom,         awful.layout.suit.tile.top,         awful.layout.suit.fair,         awful.layout.suit.fair.horizontal,         awful.layout.suit.spiral,         awful.layout.suit.spiral.dwindle,         awful.layout.suit.max,         awful.layout.suit.max.fullscreen,         awful.layout.suit.magnifier     }     -- }}}          -- {{{ Wallpaper     if beautiful.wallpaper then         for s = 1, screen.count() do             gears.wallpaper.maximized(beautiful.wallpaper, s, true)         end     end     -- }}}          -- {{{ Tags     -- Define a tag table which hold all screen tags.     tags = {}     for s = 1, screen.count() do         -- Each screen has its own tag table.         tags[s] = awful.tag({ 1, 2, 3, 4, 5, 6, 7, 8, 9 }, s, layouts[1])     end     -- }}}          -- {{{ Menu     -- Create a laucher widget and a main menu     myawesomemenu = {        { "manual", terminal .. " -e man awesome" },        { "edit config", editor_cmd .. " " .. awesome.conffile },        { "restart", awesome.restart },        { "quit", awesome.quit }     }          mymainmenu = awful.menu({ items = { { "awesome", myawesomemenu, beautiful.awesome_icon },                                         { "open terminal", terminal }                                       }                             })          mylauncher = awful.widget.launcher({ image = beautiful.awesome_icon,                                          menu = mymainmenu })          -- Menubar configuration     menubar.utils.terminal = terminal -- Set the terminal for applications that require it     -- }}}          -- {{{ Wibox     -- Create a textclock widget     mytextclock = awful.widget.textclock()          -- Create a wibox for each screen and add it     mywibox = {}     mypromptbox = {}     mylayoutbox = {}     mytaglist = {}     mytaglist.buttons = awful.util.table.join(                         awful.button({ }, 1, awful.tag.viewonly),                         awful.button({ modkey }, 1, awful.client.movetotag),                         awful.button({ }, 3, awful.tag.viewtoggle),                         awful.button({ modkey }, 3, awful.client.toggletag),                         awful.button({ }, 4, function(t) awful.tag.viewnext(awful.tag.getscreen(t)) end),                         awful.button({ }, 5, function(t) awful.tag.viewprev(awful.tag.getscreen(t)) end)                         )     mytasklist = {}     mytasklist.buttons = awful.util.table.join(                          awful.button({ }, 1, function (c)                                                   if c == client.focus then                                                       c.minimized = true                                                   else                                                       -- Without this, the following                                                       -- :isvisible() makes no sense                                                       c.minimized = false                                                       if not c:isvisible() then                                                           awful.tag.viewonly(c:tags()[1])                                                       end                                                       -- This will also un-minimize                                                       -- the client, if needed                                                       client.focus = c                                                       c:raise()                                                   end                                               end),                          awful.button({ }, 3, function ()                                                   if instance then                                                       instance:hide()                                                       instance = nil                                                   else                                                       instance = awful.menu.clients({ width=250 })                                                   end                                               end),                          awful.button({ }, 4, function ()                                                   awful.client.focus.byidx(1)                                                   if client.focus then client.focus:raise() end                                               end),                          awful.button({ }, 5, function ()                                                   awful.client.focus.byidx(-1)                                                   if client.focus then client.focus:raise() end                                               end))          for s = 1, screen.count() do         -- Create a promptbox for each screen         mypromptbox[s] = awful.widget.prompt()         -- Create an imagebox widget which will contains an icon indicating which layout we're using.         -- We need one layoutbox per screen.         mylayoutbox[s] = awful.widget.layoutbox(s)         mylayoutbox[s]:buttons(awful.util.table.join(                                awful.button({ }, 1, function () awful.layout.inc(layouts, 1) end),                                awful.button({ }, 3, function () awful.layout.inc(layouts, -1) end),                                awful.button({ }, 4, function () awful.layout.inc(layouts, 1) end),                                awful.button({ }, 5, function () awful.layout.inc(layouts, -1) end)))         -- Create a taglist widget         mytaglist[s] = awful.widget.taglist(s, awful.widget.taglist.filter.all, mytaglist.buttons)              -- Create a tasklist widget         mytasklist[s] = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, mytasklist.buttons)              -- Create the wibox         mywibox[s] = awful.wibox({ position = "top", screen = s })              -- Widgets that are aligned to the left         local left_layout = wibox.layout.fixed.horizontal()         left_layout:add(mylauncher)         left_layout:add(mytaglist[s])         left_layout:add(mypromptbox[s])              -- Widgets that are aligned to the right         local right_layout = wibox.layout.fixed.horizontal()         if s == 1 then right_layout:add(wibox.widget.systray()) end         right_layout:add(mytextclock)         right_layout:add(mylayoutbox[s])              -- Now bring it all together (with the tasklist in the middle)         local layout = wibox.layout.align.horizontal()         layout:set_left(left_layout)         layout:set_middle(mytasklist[s])         layout:set_right(right_layout)              mywibox[s]:set_widget(layout)     end     -- }}}          -- {{{ Mouse bindings     root.buttons(awful.util.table.join(         awful.button({ }, 3, function () mymainmenu:toggle() end),         awful.button({ }, 4, awful.tag.viewnext),         awful.button({ }, 5, awful.tag.viewprev)     ))     -- }}}          -- {{{ Key bindings     globalkeys = awful.util.table.join(         awful.key({ modkey,           }, "Left",   awful.tag.viewprev       ),         awful.key({ modkey,           }, "Right",  awful.tag.viewnext       ),         awful.key({ modkey,           }, "Escape", awful.tag.history.restore),              awful.key({ modkey,           }, "j",             function ()                 awful.client.focus.byidx( 1)                 if client.focus then client.focus:raise() end             end),         awful.key({ modkey,           }, "k",             function ()                 awful.client.focus.byidx(-1)                 if client.focus then client.focus:raise() end             end),         awful.key({ modkey,           }, "w", function () mymainmenu:show() end),              -- Layout manipulation         awful.key({ modkey, "Shift"   }, "j", function () awful.client.swap.byidx(  1)    end),         awful.key({ modkey, "Shift"   }, "k", function () awful.client.swap.byidx( -1)    end),         awful.key({ modkey, "Control" }, "j", function () awful.screen.focus_relative( 1) end),         awful.key({ modkey, "Control" }, "k", function () awful.screen.focus_relative(-1) end),         awful.key({ modkey,           }, "u", awful.client.urgent.jumpto),         awful.key({ modkey,           }, "Tab",             function ()                 awful.client.focus.history.previous()                 if client.focus then                     client.focus:raise()                 end             end),              -- Standard program         awful.key({ modkey,           }, "Return", function () awful.util.spawn(terminal) end),         awful.key({ modkey, "Control" }, "r", awesome.restart),         awful.key({ modkey, "Shift"   }, "q", awesome.quit),              awful.key({ modkey,           }, "l",     function () awful.tag.incmwfact( 0.05)    end),         awful.key({ modkey,           }, "h",     function () awful.tag.incmwfact(-0.05)    end),         awful.key({ modkey, "Shift"   }, "h",     function () awful.tag.incnmaster( 1)      end),         awful.key({ modkey, "Shift"   }, "l",     function () awful.tag.incnmaster(-1)      end),         awful.key({ modkey, "Control" }, "h",     function () awful.tag.incncol( 1)         end),         awful.key({ modkey, "Control" }, "l",     function () awful.tag.incncol(-1)         end),         awful.key({ modkey,           }, "space", function () awful.layout.inc(layouts,  1) end),         awful.key({ modkey, "Shift"   }, "space", function () awful.layout.inc(layouts, -1) end),              awful.key({ modkey, "Control" }, "n", awful.client.restore),              -- Prompt         awful.key({ modkey },            "r",     function () mypromptbox[mouse.screen]:run() end),              awful.key({ modkey }, "x",                   function ()                       awful.prompt.run({ prompt = "Run Lua code: " },                       mypromptbox[mouse.screen].widget,                       awful.util.eval, nil,                       awful.util.getdir("cache") .. "/history_eval")                   end),         -- Menubar         awful.key({ modkey }, "p", function() menubar.show() end)     )          clientkeys = awful.util.table.join(         awful.key({ modkey,           }, "f",      function (c) c.fullscreen = not c.fullscreen  end),         awful.key({ modkey, "Shift"   }, "c",      function (c) c:kill()                         end),         awful.key({ modkey, "Control" }, "space",  awful.client.floating.toggle                     ),         awful.key({ modkey, "Control" }, "Return", function (c) c:swap(awful.client.getmaster()) end),         awful.key({ modkey,           }, "o",      awful.client.movetoscreen                        ),         awful.key({ modkey,           }, "t",      function (c) c.ontop = not c.ontop            end),         awful.key({ modkey,           }, "n",             function (c)                 -- The client currently has the input focus, so it cannot be                 -- minimized, since minimized clients can't have the focus.                 c.minimized = true             end),         awful.key({ modkey,           }, "m",             function (c)                 c.maximized_horizontal = not c.maximized_horizontal                 c.maximized_vertical   = not c.maximized_vertical             end)     )          -- Bind all key numbers to tags.     -- Be careful: we use keycodes to make it works on any keyboard layout.     -- This should map on the top row of your keyboard, usually 1 to 9.     for i = 1, 9 do         globalkeys = awful.util.table.join(globalkeys,             awful.key({ modkey }, "#" .. i + 9,                       function ()                             local screen = mouse.screen                             local tag = awful.tag.gettags(screen)[i]                             if tag then                                awful.tag.viewonly(tag)                             end                       end),             awful.key({ modkey, "Control" }, "#" .. i + 9,                       function ()                           local screen = mouse.screen                           local tag = awful.tag.gettags(screen)[i]                           if tag then                              awful.tag.viewtoggle(tag)                           end                       end),             awful.key({ modkey, "Shift" }, "#" .. i + 9,                       function ()                           local tag = awful.tag.gettags(client.focus.screen)[i]                           if client.focus and tag then                               awful.client.movetotag(tag)                          end                       end),             awful.key({ modkey, "Control", "Shift" }, "#" .. i + 9,                       function ()                           local tag = awful.tag.gettags(client.focus.screen)[i]                           if client.focus and tag then                               awful.client.toggletag(tag)                           end                       end))     end          clientbuttons = awful.util.table.join(         awful.button({ }, 1, function (c) client.focus = c; c:raise() end),         awful.button({ modkey }, 1, awful.mouse.client.move),         awful.button({ modkey }, 3, awful.mouse.client.resize))          -- Set keys     root.keys(globalkeys)     -- }}}          -- {{{ Rules     awful.rules.rules = {         -- All clients will match this rule.         { rule = { },           properties = { border_width = beautiful.border_width,                          border_color = beautiful.border_normal,                          focus = awful.client.focus.filter,                          keys = clientkeys,                          buttons = clientbuttons } },         { rule = { class = "MPlayer" },           properties = { floating = true } },         { rule = { class = "pinentry" },           properties = { floating = true } },         { rule = { class = "gimp" },           properties = { floating = true } },         -- Set Firefox to always map on tags number 2 of screen 1.         -- { rule = { class = "Firefox" },         --   properties = { tag = tags[1][2] } },     }     -- }}}          -- {{{ Signals     -- Signal function to execute when a new client appears.     client.connect_signal("manage", function (c, startup)         -- Enable sloppy focus         c:connect_signal("mouse::enter", function(c)             if awful.layout.get(c.screen) ~= awful.layout.suit.magnifier                 and awful.client.focus.filter(c) then                 client.focus = c             end         end)              if not startup then             -- Set the windows at the slave,             -- i.e. put it at the end of others instead of setting it master.             -- awful.client.setslave(c)                  -- Put windows in a smart way, only if they does not set an initial position.             if not c.size_hints.user_position and not c.size_hints.program_position then                 awful.placement.no_overlap(c)                 awful.placement.no_offscreen(c)             end         end              local titlebars_enabled = false         if titlebars_enabled and (c.type == "normal" or c.type == "dialog") then             -- buttons for the titlebar             local buttons = awful.util.table.join(                     awful.button({ }, 1, function()                         client.focus = c                         c:raise()                         awful.mouse.client.move(c)                     end),                     awful.button({ }, 3, function()                         client.focus = c                         c:raise()                         awful.mouse.client.resize(c)                     end)                     )                  -- Widgets that are aligned to the left             local left_layout = wibox.layout.fixed.horizontal()             left_layout:add(awful.titlebar.widget.iconwidget(c))             left_layout:buttons(buttons)                  -- Widgets that are aligned to the right             local right_layout = wibox.layout.fixed.horizontal()             right_layout:add(awful.titlebar.widget.floatingbutton(c))             right_layout:add(awful.titlebar.widget.maximizedbutton(c))             right_layout:add(awful.titlebar.widget.stickybutton(c))             right_layout:add(awful.titlebar.widget.ontopbutton(c))             right_layout:add(awful.titlebar.widget.closebutton(c))                  -- The title goes in the middle             local middle_layout = wibox.layout.flex.horizontal()             local title = awful.titlebar.widget.titlewidget(c)             title:set_align("center")             middle_layout:add(title)             middle_layout:buttons(buttons)                  -- Now bring it all together             local layout = wibox.layout.align.horizontal()             layout:set_left(left_layout)             layout:set_right(right_layout)             layout:set_middle(middle_layout)                  awful.titlebar(c):set_widget(layout)         end     end)          client.connect_signal("focus", function(c) c.border_color = beautiful.border_focus end)     client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end)     -- }}}


title: Why does a manual mount set different file ownership?

text: I've been using the terminal for almost everything: in fact, I often don't even log in through the interface, I use the `tty1` and go to the web with text-browsers. So, the external drive doesn't auto-mount, and I use `sudo mount /dev/sdb1 /mnt/JMCF125_DE` to mount it. It works, but listing shows there's a difference. The files' description when auto-mounting via the GUI (Unity on Ubuntu) looks like:               -rw------- 1 jmcf125 jmcf125      In manual mount, the same files' properties look like this:               -rwxrwxrwx 1 root root      Which makes sense since I had to use `sudo` to mount. But how come the system doesn't have to? How can my mounts work exaclty like the systems'? Also, I heard every action in the GUI goes through a background shell: can I see what commands are printed there?


title: Why do I need to add a GPG-key with apt-key before adding URL to sources.list and download-installing an application with apt-get?

text: I went on to download an application today. It had it's instructions listed, step by step, number one being: adding a GPG-key with `apt-key`. It was followed by adding the application to apt/sources and finally downloading it with `apt-get install`. I did my search but as a newbie to Linux, I can't get my head around the need of adding a key, before downloading an application after adding the URL to sources. Why do I need to add a GPG-key with `apt-key` before adding a download URL to apt/sources and downloading-installing with `apt-get install`?


title: Expanding the disk size on pfsense under VMWare ESXi

text: I've been testing **pfsense** on **ESXi** for a while. And now I'm almost running out of space. Currently it holds around **30GB** and I would like to expand it to **150GB** as I'm planning on installing squid for caching. So far what I did is;   * Tried to expand the disk on ESXi for pfsense (its a thick provisioned drive) which expanded and showing as free.   * Tried gparted by booting and iso into the pfsense VM which showed that the installed partition is an unknown one & the unallocated didn't even show options to resize (guess it is because pfsense uses UFS file system)   * Tried installing a fresh copy which was successful but the UI was pretty strange as I couldn't see the total usage, memory usage.. etc.. not even the status bars properly. Please advise me as I couldn't find a proper tutorial to get this fixed. And now my pfsense is making a lot of trouble. All I need is to expand the disk on the old pfsense if possible else a fix for the new one (where the GUI looks pretty sluggish).


title: execute commands as parameters in a login shell

text: We started using a new integration and production pipeline called GO. To execute a bash script there, the convenient way is to use the bash command instead of executing the script directly. For that the bash is called in a login shell, so the command I'm trying to execute the following:               bash -l run_tests `cat myserver.url`:8080     bash -l run_tests $(cat myserver.url):8080      But the whole `cat myserver.url` is passed as a string instead of being executed. Any ideas?


title: Wierd output using paste with serial option

text: I have a `testA.txt` with contents as shown below               [jiewmeng@JM textFiles]$ cat testA.txt      The quick     brown fox     jumped over     the lazy      dog.      paste normally works               [jiewmeng@JM textFiles]$ paste testA.txt      The quick     brown fox     jumped over     the lazy      dog.      But what happened when I used serial?               [jiewmeng@JM textFiles]$ paste -s testA.txt      The quicdog.lazy er          [jiewmeng@JM textFiles]$ paste -s -d- testA.txt      -dog.lazy er      I was expecting output similar to               [jiewmeng@JM tmp]$ echo -en "The quick\nbrown fox\njumped over\nthe lazy\ndog" | paste -s -     The quick   brown fox   jumped over the lazy    dog      Opening the file in a test editor seems to work fine, just like `cat`, or `paste` did


title: 30 second gap in boot process

text: I did a full upgrade on my Debian system (jessie/sid). Unfortunately there is now a 30 second gap on the bootup and I really don't know where it comes from and where I have to look to find it. I looked at `/var/log/dmesg` and found some lines that could be interesting. Notice the gap between `27.280227` and `56.835253`.               [   27.261104] [drm] Initialized i915 1.6.0 20080730 for 0000:00:02.0 on minor 0     [   27.280207] cfg80211: World regulatory domain updated:     [   27.280213] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)     [   27.280216] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 mBm)     [   27.280218] cfg80211:   (2457000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm)     [   27.280220] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A, 2000 mBm)     [   27.280223] cfg80211:   (5170000 KHz - 5250000 KHz @ 80000 KHz), (N/A, 2000 mBm)     [   27.280225] cfg80211:   (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 mBm)     [   27.280227] cfg80211:   (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm)     [   27.843406] [drm] Enabling RC6 states: RC6 on, RC6p off, RC6pp off     [   56.835253] EXT4-fs (dm-1): re-mounted. Opts: (null)     [   57.068560] EXT4-fs (dm-1): re-mounted. Opts: errors=remount-ro     [   57.615554] lp: driver loaded but no devices found     [   57.661815] ppdev: user-space parallel port driver     [   57.855124] fuse init (API version 7.22)     [   58.123866] Adding 4886524k swap on /dev/mapper/encrypted-swap.  Priority:-1 extents:1 across:4886524k     [   58.327537] EXT4-fs (sda4): mounted filesystem with ordered data mode. Opts: (null)     [   59.137990] RPC: Registered named UNIX socket transport module.     [   59.137996] RPC: Registered udp transport module.     [   59.137998] RPC: Registered tcp transport module.     [   59.138000] RPC: Registered tcp NFSv4.1 backchannel transport module.      Searching for `[drm] Enabling RC6 states: RC6 on, RC6p off, RC6pp off` points to some graphical bugs. Since I have sometimes problems with my graphiccards (switchable graphic card) this could be a reason.               00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09) (prog-if 00 [VGA controller])     Subsystem: Dell Device 04cd     Flags: bus master, fast devsel, latency 0, IRQ 52     Memory at f6400000 (64-bit, non-prefetchable) [size=4M]     Memory at d0000000 (64-bit, prefetchable) [size=256M]     I/O ports at f000 [size=64]     Expansion ROM at <unassigned> [disabled]     Capabilities: [90] MSI: Enable+ Count=1/1 Maskable- 64bit-     Capabilities: [d0] Power Management version 2     Capabilities: [a4] PCI Advanced Features     Kernel driver in use: i915          01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Whistler [Radeon HD 6630M/6650M/6750M/7670M/7690M] (prog-if 00 [VGA controller])     Subsystem: Dell Radeon HD 6630M     Flags: bus master, fast devsel, latency 0, IRQ 53     Memory at e0000000 (64-bit, prefetchable) [size=256M]     Memory at f7b20000 (64-bit, non-prefetchable) [size=128K]     I/O ports at e000 [size=256]     Expansion ROM at f7b00000 [disabled] [size=128K]     Capabilities: [50] Power Management version 3     Capabilities: [58] Express Legacy Endpoint, MSI 00     Capabilities: [a0] MSI: Enable+ Count=1/1 Maskable- 64bit+     Capabilities: [100] Vendor Specific Information: ID=0001 Rev=1 Len=010 <?>     Capabilities: [150] Advanced Error Reporting     Kernel driver in use: fglrx_pci      As I said, I have no clue where to look at and what to search for. I'm also happy for some keywords that might help. I hope I provided the information you need. If not it would be nice if you also can tell me which command I have to execute to get the output you want, since I'm still not very familiar with the 'deeper system'. Thank you very much, rocco


title: Replicate a column in a one-line CSV file

text: I have a file that consists of a single line:               a,x,b,c,d,e       I want to convert this into               a,x,b,x,c,x,d,x,e,x      Which is the easiest way to achieve this? A solution based on Python will be most helpful Also supposing that this file is a csv file will python make the work easier?


title: Nginx doesnt work, no permissions rights and cant find some dir

text: Im using Ubuntu 13.04. I've installed Nginx, configured it with ISPConfig.. then I wanted to install the passenger module. Because Nginx doesn't allow dynamic modules I had it compiled from source. First I uninstalled Nginx (with `apt-get remove --purge nginx nginx-full nginx-common`) and started a new Nginx installation. I then used passenger advanced mod where I added some directives to `.configure` option as it was installed via `apt-get` (`/usr/share..`, `/etc/nginx`, `/var/log` location etc..) NOTE: I grabbed the compile info from `nginx -V`). It successfully installed and then I ran the command:               root@webserver:/# /usr/share/nginx/sbin/nginx      but it throws this error:               nginx: [emerg] mkdir() "/var/lib/nginx/body" failed (2: No such file or directory)      What's wrong? ### UPDATE #1 solution: OK I didn't believe the solution would be so simple because I've been playing with it all day, `mkdir nginx` does work.


title: Aptitude regex engine

text: I was trying to lookup the versions of libdb in the debian archives with something like that:               $ aptitude search '~S~ndev$(~nlibdb~(\d~|-~)!~v~rnative)'      which didn't work as expected so I changed the search pattern for 'digit or dash' to a (malformed?) bracket pattern               $ aptitude search '~S~ndev$(~nlibdb[[:digit:]-]!~v~rnative)'      which did the job. Curious about the engine under the hood I tried backreferencing               $ aptitude search '~n~([[:digit:]]~)\1\>~rnative'      which also worked and led me to the conclusion that it must be GNU ERE. ### So I have two questions now:   1. Does aptitude use GNU EREs?   2. Is there any way to get aptitude to accept PCREs? I hope someone can clarify this for me.


title: what is the CentOS equivalent of /var/log/syslog (on Ubuntu)?

text: On ubuntu this file exists: `/var/log/syslog`. However the same file does not appear on CentOS Distributions. What is the equivalent file on CentOS?