title: What kind of crash would crashdump fail to capture?

text: A freshly built machine running Ubuntu 12.10 64bit is hanging under seemingly random conditions. To debug this I've installed linux-crashdump, confirmed that the second kernel is loaded and a simulated crash creates files under /var/crash. However, the real crash does not trigger the crashdump system, no auto-reboot happens and no dump are written out. Are there some hints about the cause I could glean from the hang not triggering the system? Could something hang a machine in a similar way to a kernel panic? Normally I'd just strip the machine down to a minimum config and work my way up from there but due to a cramped chassis this would involve re-attaching the CPU cooler a few too many times to my liking. No serial port to dump to console either.


title: How to start changing linux source code to make custom OS?

text: I am doing Under Graduation in CS Major, have medium level knowledge in C, C++, and Java and also learned some operating system concepts (as they are in my course syllabus). I have heard that we can customize Linux (say Ubuntu) as we wish by changing its source code and can make whole new OS. I have downloaded source code of linux kernel from www.kernel.org website. But by seeing it.... I am not able to understand anything, there is so many directories, ... files within files (as I think there would be one single large programme). I want to do this as college project also and I want to contribute to linux by making necessary change in it. But after asking this question on some of the site... they said that linux source code is very huge. You may try minix. Now I am very much confused. Please give me suggestions with detail that how should i start this journey (of changing source code to customize linux) with necessary steps, along with some beginner level books. I am sorry if I have done any mistake and thanks in advance.


title: How To Install Virtualbox Guest Additions On CentOS via Command Line only

text: Reading the Virtualbox user manual, I finally got [here], which explains how to install Virtualbox Guest Additions on a Linux guest via Command Line. But it's not clear enough for me (I just started learning some commands). Can someone put down the exact commands you would use to install Virtualbox Guest Additions via CLI? (which includes finding where virtualbox guest additions has been mounted etc.)


title: X server started by kdm dies during startup because of keymap couldn't be loaded

text: I upgraded an OpenSUSE from 11.1 to 13.1, but after the upgrade, the X server refuses to start. If I execute `kdm`, the X server complains in `/var/log/Xorg.0.log` file that:               (EE) Error compiling keymap (server-0)     (EE) XKB: Couldn't compile keymap     XKB: Failed to compile keymap.     Keyboard initialization failed. This could be missing or incorrect setup of xkeyboard-config.     (EE) Fatal server error:     (EE) Failed to activate core devices.(EE)      None of the directories are full. Any ideas what might be wrong here?


title: Colour bleeds right when writing a custom script in byobu

text: I am using byobu with tmux backend in Ubuntu 12.04. I am trying write a custom script as shown at the manpage of byobu:               #!/bin/sh     printf "\005{= bw}%s\005{-}" "$(uname -r)"      When being run (using an arbitrary interval, e.g 10 seconds), it does not show anything, but bleeds the white colour to the right. By replacing `printf` with `echo`, bleeding stops, but the message appeared, is showing the `{-}` after the command. I can't figure out how to solve it! Any help is appreciated! Thanks!


title: How to catch keystrokes in Linux environment

text: I need a C code to be executed when some particular keys are pressed in Linux "Desktop" environment. What are the ways to register for such an event and How? Should I write ISR for that? I need an exact part of Linux from where I can get this call. Which part of OS handles stuff like these, Is it part Desktop environment like GNOME or part of some service?


title: How can I install Policykit with System V?

text: I created a minimal install on my Raspbian Raspberry Pi running Debian Jessie. Among other things, I removed `libx11-.*` and dependencies, which included removal of `policykit-1`. I'm trying to reinstall `policykit-1`, but hit the following errors.               $ sudo apt-get install policykit-1     ...     The following packages will be REMOVED:       sysvinit-core     ...     dpkg: sysvinit-core: dependency problems, but removing anyway as you requested:      sysvinit depends on sysvinit-core | upstart | systemd-sysv; however:       Package sysvinit-core is to be removed.       Package upstart is not installed.       Package systemd-sysv is not installed.      After this, booting now hangs, and I have to restore the SD card to an image before this install command. (N.B. booting worked fine before the creation of the minimal install, and after the removal of `libx11-.*` and dependencies.) How can I reinstall `policykit-1`? * * * ## Edit This worked for a little while, but no longer. There is a long thread here discussing how `policykit-1` can break your system in Debian. I didn't read it all, but this (closed) bug report suggests that `systemd-shim` might be helpful. Running the following command allowed me to reboot the computer, although I'm unsure as to how functional `policykit-1` is.               sudo apt-get install systemd-shim policykit-1      However, a recent update to Debian Jessie prevents this from working. `policykit-1` was uninstalled after `sudo apt-get dist-upgrade`, and running this command still asks you to uninstall `sysvinit-core`.


title: After apt-get update and upgrade, do I need to recompile and re-install software that I did not install via apt-get install?

text: In particular, I noticed that my OpenSSL has been upgraded after a system update via **`sudo apt-get update`** and **`sudo apt-get upgrade`**. As I installed my Squid server by manually compiling, configuring and installing via **`./configure`** , **`make all`** and **`make install`** , I am concerned whether my current Squid is still using the old OpenSSL software. Do I need to recompile and re-install Squid in this case?


title: Unable to install a package, newer libc6 required

text: I was trying to install `openvasv6` using instructions given here. I am using Debian Wheezy (amd64).               $ sudo apt-get -y install greenbone-security-assistant openvas-cli openvas-manager openvas-scanner openvas-administrator sqlite3 xsltproc rsync     Reading package lists... Done     Building dependency tree     Reading state information... Done     rsync is already the newest version.     sqlite3 is already the newest version.     Some packages could not be installed. This may mean that you have     requested an impossible situation or if you are using the unstable     distribution that some required packages have not yet been created     or been moved out of Incoming.     The following information may help to resolve the situation:          The following packages have unmet dependencies:      greenbone-security-assistant : Depends: libc6 (>= 2.14) but 2.13-38+deb7u1 is to be installed                                     Depends: libopenvas5 (>= 5.0.4) but it is not going to be installed      openvas-administrator : Depends: libc6 (>= 2.15) but 2.13-38+deb7u1 is to be installed                              Depends: libopenvas5 (>= 5.0.4) but it is not going to be installed      openvas-cli : Depends: libopenvas5 (>= 5.0.4) but it is not going to be installed      openvas-manager : Depends: libc6 (>= 2.15) but 2.13-38+deb7u1 is to be installed                        Depends: libopenvas5 (>= 5.0.4) but it is not going to be installed      openvas-scanner : Depends: libc6 (>= 2.15) but 2.13-38+deb7u1 is to be installed                        Depends: libopenvas5 (>= 5.0.4) but it is not going to be installed     E: Unable to correct problems, you have held broken packages.      Is it possible to fix this problem and install the packages? Thank you.


title: How to Get FreeBSD Grep to recognize '-' option?

text: I am using FreeBSD grep, version 2.5.1, and want to be able to have grep read the pattern from stdin. Other versions of grep I have used allow for the specification of `-` to enable this feature. However, the version I have does not recognize this option. Is there an alternative option I simply missed in the "man page" or does FreeBSD grep, 2.5.1, not support such capability?


title: Privilege escalation detection?

text: I am not a linux/unix expert but everytime when I read about some local privilege escalation exploit (e.g. this), I wonder if an OS can detect that there is someone logging in as root (or new root process starting)? Imagine a linux machine prepared with a configuration that if root logs in into it (or detects some exploit to gain root privileges) the machine will interrupt/shutdown itself and a backup machine (with different configuration) will start or an admin will be notified... Does my idea makes sense, or are most of the exploits undetectable due their nature?


title: Autocompletion of email addresses in vim

text: I'm playing around with various bits of an email solution, including notmuch and alot. I write my emails in vim and I'd like to have tab completion of email addresses while writing email. Is there a general plugin that would do something like this for me? Ideally it would have a variable for what command to run and write and accept one of the standard address book formats - say mutt's format. Plugins I've found so far:   * email.vim - basic and based on a single text file, but probably the easiest to hack if I can't find anything better   * lbdbq and lbdbQuery.vim which both use lbdb The addressbook I'm currently using is nottoomuch-addresses


title: Keyboard and mouse do not function in Debian

text: I powered on my laptop running Debian kernel 3.3.0. After the boot process starts the X server and KDE, my keyboard and mouse do not function. Keyboard input works when I use the Recovery Console, and both the keyboard and mouse work when I boot into Windows. I've tried booting into Recovery Mode, and then into KDE, but it still doesn't show that I'm typing or that I'm moving the mouse. I have also tried booting the previous 3.2.0.2 kernel, but both keyboard and mouse fail to receive input and do not respond. EDIT: I logged into the recovery mode, and was able to get `/var/log/Xorg.0.log`. `/etc/X11/xorg.conf` did not exist. `/var/log/Xorg.0.log`: http://pastebin.ca/2149488 EDIT 2: I tested to see if an external wired USB mouse and keyboard would work, but neither worked. I'm guessing it's an input problem with the X server, rather than just my keyboard and mouse inside the laptop. EDIT 3: I tested two things: to see if the mouse is working at all in linux, and if other display managers would work. I ran `cat /dev/input/mouse0` and ran my finger on the touchpad, and it displayed random stuff, so I can verify that the touchpad works. I installed and tested both gnome, `gdm3`, and lxde, `startlxde`, but neither worked. Both did not let me move my mouse and did not let me type. EDIT 4: Still trying... I purged `xorg` and `xserver-xorg` using `apt-get purge xorg xserver-xorg` and ran `apt-get autoremove` to get rid of the various xserver installs. Then I reinstalled both `xorg` and `xserver-xorg` and ran `/etc/init.d/kdm start` but the same problem happened. So I just tried to start a simple X server display after restarting the computer. I went into maintenance mode, and ran xinit. When the terminal popped up, I could not type and had to force the computer to reboot. So I am guessing it is some configuration for the X server. I don't have `Xorg.conf`... are there any other configurations for X server? EDIT 5: I got something working! I ran `startx` and then plugged in an external mouse, and I finally got the mouse cursor to move around. However, I could not get the keyboard to type or the touchpad on the laptop to actually do anything. So it looks like it just doesn't recognize both my keyboard and mouse on the laptop itself. Is there a way to configure the X server to accept input from more inputs, such as the keyboard and internal mouse?


title: Jolla mobile ported to Nokia N9

text: I own a Nokia N9 and would like to know if anybody has ported Sailfish to it yet? In case you're not familiar with Sailfish this is the wiki page.


title: Can an interupt be processed by software, without hardware support?

text: Can an interrupt be processed by software without the need for hardware suppport? Assume an x86 architecture.


title: Command prompt switches to >, what does this indicate ?

text: Sometime I have observed that when I type a character at the command prompt such as the one shown below I get a > .               root@ubuntu:/home/heena# \     >      I observed even the following works fine:               root@ubuntu:/home/heena# \     > ls      But what is this actually?


title: Best practice when installing programs in FreeBSD?

text: Just started with FreeBSD and I am not sure whether I need to be root to install programs or not? For example, the manual for installing X11 never says that we should issue `su` command. However - it does not work without being a root, so my current solution is to add my account to `wheel` group, and do `su` whenever I do `pkg_add -r` or anything. Is this the "best practice" in unix? The handbook does really talk about it in the user accounts section. Any tips appreciated.


title: With Synaptics "clickpad," AreaBottomEdge prevents right-clicking

text: I have a new Sony Vaio Z with what I believe they're calling a "Clickpad". That is, it's a touchpad with a single physical button beneath, and the detected location of the click is used, in software, to determine whether the click is a left-, right-, center-, or other-click. The touchpad has two parts: ![Sony Vaio Z touchpad](http://i.stack.imgur.com/o5NRj.jpg) The upper, textured part, is the 'touch' area (at least in Windows 7), and the lower, smooth part, has the physical button beneath. (The little gadget in the bottom center is a fingerprint reader, if anyone is curious). In Linux, I found that when I was clicking, my mouse cursor was moving, due to the entire area (both textured and smooth) being touch-sensitive. I solved this problem with the following synaptics option:               AreaBottomEdge=3800      The problem with this is that now when I right-click, the synaptics driver seemingly doesn't pass along any finger-position information, because I am touching 'below' the 3800 boundary. If I touch lightly in the lower right corner of the textured area while clicking it does register a right-click. So this tells me that at least the "Clickpad" features are working properly. So my question is: Is there any way to get a right-click on the smooth area to register as a click, without making it fully sensitive to motion detection? I'm guessing this situation probably just calls for submitting an upstream feature request...


title: Is there an equivalent to Arch Linux's NETCFG for Debian?

text: I have installed Debian Squeeze (minimal -- no DE) and I would like to connect to my network (via wireless) via command line. I have used Arch Linux before and I really liked the simplicity of `netcfg` which I used to connect to my network. Is there an equivalent tool/program available in Debian that I can use?


title: how to transfer port in virtual box

text: I am running a Debian guest VM on Oracle VirtualBox on my Windows machine. I have a DNS server (bind) on the guest that I'd like to see externally from outside the guest OS. How do I give this access to port 53?               My public ip = e.e.e.e     My private ip = i.i.i.i     Virtual box ip = v.v.v.v      There is no bind/dns running on host.


title: In virtual machine manager, is there a way to add disk space to an existing disk?

text: I know that in `virt-manager` you can add RAM and processors to the virtual machine, but is there a way to increase the available disk space larger through the GUI? Edit: @slm was able to find the answer, using the command line is the only way on the program I'm using. Edit again: @slm had the best answer, but he posted it as a comment. I was looking for a way to increase the disk size of my virtual machine using `virt- manager`, as there is no way to do it through the GUI of this program. All I could find online were tutorials on how to do it through different programs' GUIs, which was not applicable to `virt-manager`. Hopefully this clarifies what I was asking.


title: For deploying a public-facing webapp, which between Testing and Stable to use some weeks before release?

text: Which do you recommend? Some POVs to consider:   * stability   * available packages   * life   * kernels   * or any other reasons? [ **note** ] This question was originally a request for recommendation between Debian 5 "lenny" and Debian 6 "squeeze". I modified it to make it more generic.


title: Different formats of object files in Linux

text: I was wondering what are some formats of object files in Linux? There are two types of object files that I know:   1. executable, which has ELF format   2. object files that are generated by gcc after compilation but before linkage.  what is the format of such object files? Or are they also ELF format but with some different sub-formats than executables? Is the job of a linker to convert the format of this type of object files into the format of executables?   3. Are there other types of object files?


title: cURL access HTTPS website

text:
I trying to access the following site with cURL. (https://www.fleetagent.be) I have cURL configured with the following switches `-L -k --proxy [username:password]` I get the following error. What switches do need to add to get cURL to get the website? The url https://www.fleetagent.be is redirected to https://www.fleetagent.be/portal/pls/portal. Somehow the website is authenticating it self for the redirected portal. how can i simulate this behavior with cURL?               <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">          <TITLE>401 Unauthorized</TITLE>
Unauthorized
     This server could not verify that you     are authorized to access the document     requested.  Either you supplied the wrong     credentials (e.g., bad password), or your     browser doesn't understand how to supply     the credentials required.

Additionally, a 404 Not Found     error was encountered while trying to use an ErrorDocument to handle the request.           Thanks. Darrell.


title: Reading the man pages in my system with hyperlinks on a browser

text: > **Possible Duplicate:**   >  How to follow links in linux man pages? I can read man pages online, but they are not necessarily the same that I have installed on my system (i.e. for the same tool/version, etc.). With this, is there a way to read the man pages **in my system** with hyperlinks on a browser? Alternatively, are there any other man-reading tools with support for hyperlinks across commands, parameters, favorites, etc.?


title: What is the purpose of the lost+found folder in Linux and Unix?

text: There is a folder at the root of Linux and Unix operating systems called `/lost+found/` What is it for? Under what circumstances would I interact with it? How would I interact with it?


title: Change /dev/sd* for USB Linux install?

text: I am trying to install Scientific Linux 6.1 (which is literally RedHat Enterprise Linux without the branding) by booting its installer from my USB drive. The installer starts fine, but two things happened:   1. My USB drive appears as /dev/sda while my internal hard disk (the one I want to install the OS onto) is /dev/sdb. However, I would like my hard disk to be /dev/sda so that when I remove my USB drive after installation, my system can boot OK. How can I change this?   2. Even though the installer starts, once I start the actual installation I get an error saying the installer can't find the "ISO 9001" install image. Might these two issues be related? I would appreciate any suggestions... Thanks.


title: Constantly pinging a server

text: I am not sure if this is exactly the right place for this question, but there is no networking stack exchange. I want to ping a server a bunch of times (eg.10,000+) to gather information on the distribution of time it takes for packets to traverse a network. If I were to do this to a site like google.com would it take up a considerably amount of bandwidth or processing power (on the server side) and would there be a way for them to detect me and potentially start dropping my pings?


title: Replacement in VIM with regular expression matched part unchanged

text: Suppose I want to append two digit numbers in my file with "some_thing". Like from this:               12 23 45      to               12_something 23_something 45_something      How can I do this using regular expression replacement?


title: Can't connect to steam

text: I've just installed Steam on my computer, created a Steam account and tried clicking on the steam icon to load it. It gave me the following error and then shuts down: ![enter image description here](http://i.stack.imgur.com/BEjcx.png) If I type `steam` in the terminal, it gives me all this:               oshirowanen@home-desktop:~$ steam     Running Steam on ubuntu 12.04 64-bit     STEAM_RUNTIME is enabled automatically     Installing breakpad exception handler for appid(steam)/version(1370553818_client)     Installing breakpad exception handler for appid(steam)/version(1370553818_client)     unlinked 0 orphaned pipes     Installing breakpad exception handler for appid(steam)/version(1370553818_client)     [1012/132155:WARNING:proxy_service.cc(646)] PAC support disabled because there is no system implementation     Installing breakpad exception handler for appid(steam)/version(1370553818_client)     Installing breakpad exception handler for appid(steam)/version(1370553818_client)     Installing breakpad exception handler for appid(steam)/version(1370553818_client)     Installing breakpad exception handler for appid(steam)/version(1370553818_client)     Installing breakpad exception handler for appid(steam)/version(1370553818_client)     Generating new string page texture 2: 48x256, total string texture memory is 49.15 KB     Generating new string page texture 3: 256x256, total string texture memory is 311.30 KB          (steam:3710): GLib-GIO-WARNING **: g_simple_async_result_complete() called from wrong context!          (steam:3710): GLib-GIO-WARNING **: g_simple_async_result_complete() called from wrong context!          (steam:3710): GLib-GIO-WARNING **: g_simple_async_result_complete() called from wrong context!     Installing breakpad exception handler for appid(steam)/version(1370553818_client)     `menu_proxy_module_load': /home/oshirowanen/.local/share/Steam/ubuntu12_32/steam: undefined symbol: menu_proxy_module_load          (steam:3710): Gtk-WARNING **: Failed to load type module: (null)          roaming config store loaded successfully - 0 bytes.     Adding license for package 0     Generating new string page texture 4: 128x256, total string texture memory is 442.37 KB     Generating new string page texture 5: 512x256, total string texture memory is 966.66 KB     Generating new string page texture 6: 24x256, total string texture memory is 991.23 KB     unlinked 2 orphaned pipes     CAsyncIOManager: 0 threads terminating.  0 reads, 0 writes, 0 deferrals.     CAsyncIOManager: 522 single object sleeps, 0 multi object sleeps     CAsyncIOManager: 0 single object alertable sleeps, 1 multi object alertable sleeps     [2013-10-12 13:21:54] Startup - updater built Jun  6 2013 13:48:29     [2013-10-12 13:21:54] Verifying installation...     [2013-10-12 13:21:54] Verification complete     Shutting down. . .     [2013-10-12 13:22:05] Shutdown      Anyone know why I can't load steam? My internet connection is working obviously, as I wouldn't be able to type all this if I had an internet connection issue. I've tried reinstalling it many times, but still get the same issue.


title: How do I find my network SSID?

text: I would like to install Arch Linux. In the first part of the installation, I need to connect to a wireless LAN network. But I don't know what my network's SSID is. How can I find this out?


title: Creating an arbitrarily large "fake" file

text: I would like to create a special file similar to `/dev/null` or `/dev/random`, where the file doesn't actually exist but you can read from it all the same, except that I could actually set a cap on the apparent size of the file. To put it another way, I want to create a special file where (assuming I set the cap at 500GB) when I "cat" the file it will output all 500GB of the file and then stop. It needs to act the same as an actual 500GB file, but without taking the space. The contents of this file don't matter, it could be all `\0`'s like `/dev/null`, or just a small string being sent over and over, or whatever. Is this something that's do-able? The only thing remotely close I've been able to find is man pages talking about `mknod`, but those weren't very helpful.


title: ORACLE Weblogic IPV6 with oracle database on IPV4

text: I have one `weblogic` application currently working on IPv4 and `jdbc` connection to database is on IPv4. Since my machine has an additional Ethernet port that support IPv6, I am thinking to add an additional entry in `DNS AAAA` and try to clear my doubt. If an http hit comes via IPv6 internally, `weblogic` will bind Database on IPv4 and take the required results and give these results back to client browser on IPv6.   * Will the above method work?   * What are the other factors I should consider?   * Is a dual stack mandatory other than IPv6 only?


title: current spotify track in dwm status bar

text: I'm trying to get the current track playing in spotify into my dwm status bar. I got to the point where I get the information with this command.               enter code heredbus-send --print-reply --session --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string:'Metadata'      The result is this:               method return sender=:1.0 -> dest=:1.15 reply_serial=2     variant       array [          dict entry(             string "mpris:artUrl"             variant                string "http://open.spotify.com/thumb/45656b0961cba1598d127c3404ad276acb8e961b"          )          dict entry(             string "mpris:length"             variant                uint64 308000000          )          dict entry(             string "mpris:trackid"             variant                string "spotify:track:7oGXMMrB78C5tQhumQ2jfZ"          )          dict entry(             string "xesam:album"             variant                string "Chopin"          )          dict entry(             string "xesam:artist"             variant                array [                   string "Frederic Chopin"                ]          )          dict entry(             string "xesam:autoRating"             variant                double 0.57          )          dict entry(             string "xesam:contentCreated"             variant                string "2009-01-01T00:00:00"          )          dict entry(             string "xesam:discNumber"             variant                int32 0          )          dict entry(             string "xesam:title"             variant                string "Waltz No. 1 in E flat Major, Op. 18"          )          dict entry(             string "xesam:trackNumber"             variant                int32 8          )          dict entry(             string "xesam:url"             variant                string "spotify:track:7oGXMMrB78C5tQhumQ2jfZ"          )       ]      So my question is how I get the dict entry "xesam:artist" and "xesam:title" out of this result so I can put it in my status bar?


title: How to replace text after the cursor location in VIM

text: Suppose I have one line:               Linux is not_ Linux      My cursor lies on the `_` mark and I want to replace the second `Linux` to `Unix`,how can I do that in vim?


title: CentOS installation: difference between live CD and live DVD

text: While I am trying to download the CentOS Live CD for the installation I have gone through something very new to me: install from a Live DVD. Up to now I have just gone through Live CD but whats the matter with Live DVD? May I know what are the difference exists between Live CD and DVD?


title: make my zsh prompt show mode in vi mode

text: I use `bindkey -v` (for bash-ers `set -o vi` I think that works in zsh too) or vi(m) mode. but it bugs me that I don't have any visual cue to tell me whether I'm in insert mode or command mode. Does anyone know how I can make my prompt display the mode?


title: Using Grub2 to boot linux mdraid whole device RAID6

text: Linux mdraid supports device RAID (as opposed to partition RAID). The new superblock versions are also smart enough to not put the meta data right at the start of a disk. Does that mean it's possible to install grub2 on the MBR and boot whole-device RAID6 using GRUB2? And if it is possible, what distro installers allow you to do this? When you install Debian or Ubuntu, you are not offered this option. I know you can do it by hand, but an out-of-the-box solution would be better.


title: How to revert direction for last parameter shortcut?

text: I can append a last used parameter via the keyboard shortcut `Alt` + `.` yet sometimes, I type too fast and miss my actual target. If I wanted to go back one instance, is there a way to do it? I unsuccessfully tried to modify it via `Shift` and `Ctrl`. How to revert direction of the last parameter shortcut?


title: Rolling your own init: How to shutdown/restart?

text: After reading this answer, I thought it would be funny to roll my own init on Python, so I wrote this in `/init-python`.               #!/usr/bin/python3     import os     import subprocess     # Make / writable!     subprocess.call(['/bin/mount', '-o', 'rw,remount', '/'])     # Became IPython (Now we're at it, get a good shell!)     os.execv('/usr/bin/ipython3', ['init'])      Then added `init=/init-python` to the `linux` line in GRUB config. It works. So I was wondering now... how to power off or reboot my system with my homemade init?


title: OCR on Linux systems

text: I have always found OCR technology to be behind on open source systems. I've also watched the Ocropus project since its infancy. I've tried what I've heard is the best OCR engine available for Linux, Tesseract, and have found it woefully lacking for business documents. Are there any other more promising OCR implementations? What about the even more hopeful goal for interpreting handwriting? What is possible on *nix systems in this field?


title: tmux vs. GNU Screen

text: Browsing through questions I found about tmux (I normally used GNU Screen). My question is what are pros and cons of each of them. Especially I couldn't find much about tmux.


title: XFS on Volume Group or Mdadm Raid 0

text: Im starting to use XFS because I want to create a highly parallel disk array and experimenting on just 2 drives for now. I had thought that if I used a logical volume group to join two physical volumes and then put XFS over the top, XFS would take advantage of both drives by having each handle one of the requests, whereas raid 0 would force both drives to handle both requests. Unfortunately, I just tried this and iostat shows that all the data is being written to `/dev/sdb`, whilst `/dev/sdc` is doing nothing. Have I misunderstood the point of XFS? Perhaps the advantage of parallelization only shows as the disks become full and operations start to occur on files that are already on different drives? For reference the two commands I ran in parallel were:               dd if=/dev/zero of=10000MB.img bs=1M count=10000 conv=fdatasync     dd if=/dev/zero of=10000MB2.img bs=1M count=10000 conv=fdatasync


title: How to config iptables for pppoe?

text: When I create the only rule disabling all input,               iptables -P INPUT DROP      I can not connect anything. So it looks like I should allow some incoming activity to get PPPoE working correctly. What rules should I add?


title: How to redirect error to a file?

text: I have this simple script which redirects the output and `append` it to a file.               filename="/home/ronnie/tmp/hello"          date=$(date)     echo "$date" >> $filename      Now, lets suppose I change `date=$(date)` to `date= $(date)` which will generate an error. My modified script:               filename="/home/ronnie/tmp/hello"          date= $(date)     echo "$date" >> $filename 2>> $filename      #Also tried echo "$date" >> $filename 2>&1      I was thinking that above script will redirect the error `test.sh: line 5: Fri: command not found` to the file `hello` but it just enters a new line into the file and the error gets printed on my `stdout`. My bash version:               ronnier@ronnie:~/tmp$ bash --version     GNU bash, version 4.2.24(1)-release (i686-pc-linux-gnu)      So, where am I going wrong.


title: CentOS 6.5 have to manually add the default route

text: With CentOS 6.5 on an R710 I have to manually remove the default route; and `sleep 10` before adding it back otherwise the interfaces do not use the default route that was added upon boot. There are no errors in `/var/log/messages` and I've seen this issue on another R710 server we have. Does anyone have any insight?


title: Allowing only specific users to login via ssh at one port and others to login via another port

text: I have the following use case: Need to allow users to login from a secured, trusted network and then allowing a couple (only two) mobile users to login remotely on a Linux Centos machine. I can make the sshd run on different ports e.g. from inside it is ok to make it run on 22 as I don't want to make them connect on other ports (messes up the script). For outside mobile users, I will run the sshd on a different port, say port X (increased security - this is a small office kind of setup). For added security, I was hoping to configure sshd to allow access to only particular users on port X (and then configure some alerts so that we can know when users are logging in through port X). However, I am unable to find any configuration like this in sshd documentation. If there is no solution like this, is it at least possible to trigger a shell script to run whenever someone completes sshd login on port X. I was looking at iptables documentation to see if it could trigger an alert when sshd login is there but could not come up with anything. Inputs appreciated


title: Colorful ssh banner

text: I would like to colorize my ssh banner. I know I can perform it like so: In `/etc/profile` I can put:               echo -e "\e[1;31m Colorful text"     echo -e "\e[0m Reset"      But I have some ASCII art in the banner with special characters. Is there any way to colorize this without escaping every single special char in the ASCII art?


title: How to enable local ~ autocompletion for scp?

text: **Too late: The machine, OS and configuration in question is no longer in use, so I can't verify any more suggestions. I have not encountered this problem in Fedora or Arch Linux. If _you_ are having this problem, please post another question with the details of your configuration.** Whenever I want to copy a file from my home directory, I run into this issue: `scp` won't autocomplete paths preceded by `~` (tilde). This is very simple to verify by typing `scp ~/` and pressing `Tab` twice - No file completions are shown. Even if I specify a unique path prefix such as `scp ~/.bash_hist` it won't complete. Is this by design, configurable, or a bug? To clarify, all other parts of the completion work: host names and paths on remote hosts both complete just fine. Completions of paths with tilde also work with other commands, such as `ls`. Could there be some restriction on completing a non-standard `~`? Mine points to `/home/users/username` and is an NFS 3 mount to another host (`/home/username` is used for speed-critical things like the browser profile). I have not changed `$HOME` (`/home/users/username`) or some other craziness. On Fedora 19 it works - `Tab` completing `scp ~/foo` results in it _replacing_ the `~` with `/home/username` and subsequently completing normally. **Please note** : This question is **neither** about autocompleting as root **nor** autocompleting remotely. Bash completion is installed an working fine. Running openssh-client 1:5.9p1-5ubuntu1 and GNU bash version 4.2.24(1)-release (x86_64-pc-linux-gnu)


title: Kali tool installation?

text: I have installed the newest kali linux on a virtual box. But I can not find the preinstalled tools such as the exploitation tools. Should I be downloading them after the installation? Or is it because I downloaded the kali linux mini iso? As you can tell, this might be a stupid question but I have looked around the internet for all day but I could not find the answer to this. Sorry to bother you all but I hope this question help the future newbies like me.


title: Triple Booting; Windows, Ubuntu, Linux Mint by Windows Installer

text: I wanted to install Linux Mint 14.1 using the Windows Installer (`mint4win.exe`). I copied `mint4win.exe` to HDD, and when I running it, it prompts me to uninstall Ubuntu. Previously I installed Ubuntu 12.10 using Windows Installer. I want to install it to its own partition. My partition table is like this:   * Windows 8   * Data   * Data2   * Sync   * Ubuntu   * Linux Mint What should I do? I don't want risk my Acer Aspire V5-471 by normal install.


title: How to setup networking for Linux Mint - VM when host machine uses a PAC file

text: My host is a Windows 7 x64 machine. The office network uses a PAC file for the LAN settings. So, under Internet Options -> Connections -> LAN Settings, I have Use automatic configuration script with an address for the PAC file. My Linux Mint v14, runs on VMWare. The network settings of the VM is set to NAT. Now, if I specify the same on Firefox within Mint, I am able to browse the internet. However, if I try to install software say gedit I get the problem. ![enter image description here](http://i.stack.imgur.com/JJEbA.png) Any idea on how to fix this problem?


title: How to set-up a online SVN server on my laptop

text: I had created a local SVN server on my laptop running Ubuntu 12.04 and its working perfectly fine. Now I want to make my laptop as server for some valid users who can access my SVN server though internet. I know how to add users and set their password. I used following guide to set-up a local SVN server [1] This question can be considered as replica of [2] But I didn't get exact answer. Through some links I came to know that I had to set my Apache server accordingly so that it is accessible through internet. [1] http://oliverdavies.co.uk/blog/2011/10/install-and-configure-subversion- svn-server-ubuntu#comment-10209 [2] Subversion on Ubuntu server - setup issues


title: Why does Linux 3.2 kernel (Debian backport) hang during boot?

text: I wanted to upgrade the Linux kernel on my Debian wheezy (stable) on Thinkpad T60. I installed `linux-image-3.2.0-0.bpo.4-686-pae`, version 3.2.41-2~bpo60+1. The problem is it hangs during boot, just after `Cleaning ifupdown....` with               BUG: soft lockup - CPU#1 stuck for 23s      Is there anything I can do about it, or is it a kernel bug? I've never experienced this problem with older 2.6.x kernels. ![enter image description here](http://i.stack.imgur.com/GW2om.jpg)


title: Scan one or all ports, on UDP or all protocols, to see if I'm getting, what I suppose to get

text: I have a GPS localizer (TK102). I've set it up to send responses over GPRS to particular IP and over particular port. I was told that, it uses UDP. It seems that _something_ is being sent (paid transfer registerd on connection list for phone number used by localizer), but it did not reach server (probably). Seems that my listener, run on server, isn't receiving any responses from the localizer. Listener itself is working fine (listening for UDP only on ports 3333 and 7777), because I can send UDP packet from any other client and they are being correctly catched up and registered in DB. I tested NetCat and UDP Test Tool on two various ports. All works fine. My question is, is there any tool or service, that I can run on my server to scan this particular or all ports, on UDP or all protocols, to see if I'm getting anything from that localizer? In other words, if this is localizer or server problem or anything in between. BTW: I'm using a very limited server (actually NAS device), so I'm not able to run many tools or system commands, that normally can be found right in the distro.


title: What does a kernel source tree contain? Is this related to Linux kernel headers?

text: In books, I typically read references to the Linux Source Tree at `/usr/src/linux` with the usual set of subdirectories (`arch`, `block`, `crypto`, ...). I was expecting this tree to contain the binary files making up the kernel. In my system (Ubuntu 10.04)...   1. for the different kernels I have (using automated software downloads, not manually installed), I find in this location instead two sub-directories for each kernel as follows:              /usr/src/linux-headers-2.6.32-22     /usr/src/linux-headers-2.6.32-22-generic        2. In the sub directories I expected binary files, among others. However, I checked a fair amount of the tree, and the last sub-directory from here seems to always have a `Makefile` (when reading it, it sounds typically more like a configuration file then an install file), plus occasionally a few isolated other files (mostly `Kconfig`). My question may be naive, but I'm a bit confused. Is (2) what I should expect to see in the Kernel Source Tree; and why do I have the explicit reference to 'headers'? I needed to install `linux-generic-headers` a while back for some other software and am unsure if this might be related. I realize there is good reason for the makefiles (eg, to install modules in the /driver sub- directory), but (pretty much) only makefiles?


title: Run shell script when new volume mounted

text: I'm interested in running an rsync script whenever _any_ new volume is mounted on my Debian box. What are some potential triggers / strategies for listening for a new volume mount?


title: How to fix "operation not permitted" on ssh login?

text: My previously fine working ssh login now results in a "Operation not permitted" error _after_ getting a connection accepted. I can't think of anything I changed except for restarting the server, so what could have gone wrong? Here's the relevant log:               debug1: Authentication succeeded (publickey).     debug1: channel 0: new [client-session]     debug1: Entering interactive session.     debug1: client_input_channel_req: channel 0 rtype exit-status reply 0     Operation not permitted     debug1: channel 0: free: client-session, nchannels 1     Connection to horst closed.


title: Adding key bindings for "Fn" + "Control" key in openbox

text: I need use `Fn` + `CTRL` as a key combination, but it doesn't work in openbox (works in XFCE / KDE4`).               <keybind key="Fn-C">       <action name="ToggleMaximize">           </action>     </keybind>      The action name is totally right, it works with other key combination, e.g `W-3`. So, any ideas?


title: Pipe to multiple files in the shell

text: I have an application which will produce a large amount of data which I do not wish to store onto the disk. The application mostly outputs data which I do not wish to use, but a set of useful information that must be split into seperate files. For example, given the following output:               JUNK     JUNK     JUNK     JUNK     A 1     JUNK     B 5     C 1     JUNK      I could run the application three times like so:               ./app | grep A > A.out     ./app | grep B > B.out     ./app | grep C > C.out      This would get me what I want, but it would take too long. I also don't want to dump all the outputs to a single file and parse through that. Is there any way to combine the three operations shown above in such a way that I only need to run the application once and still get three separate output files?


title: Why do Linux applications often put the language it was written with in the summary?

text: When showcasing applications, Windows and Mac mostly talk about features. Linux applications, on the other hand, have more details about what language was used to write it (and accompanying libraries) rather than features. Why is that? I could understand knowing the difference between GTK+ versus QT making a difference just because of the desktop integration requirements, but C vs C++ vs Python vs Assembly vs etc.? Really? For instance: foo is a simple blah blah written in C/GTK+.


title: How to play the result of "mpc search"?

text: Example:               $ mpc search title "when I was your man"      Bruno Mars/Unorthodox Jukebox/06 Bruno Mars - When I Was Your Man.mp3      How do I play the song? I've tried piping it to `mpc play` but no luck.               $ mpc search title "when I was your man" | mpc play


title: Grub2 Error Loading Kernel

text: I have been trying to start a small home server, using Ubuntu 10.04 Server edition. The installation process finished, and I got an error from Grub saying that it was "out of disk". After a bit of debugging, I created and ran Grub from a CD, but the best I could do was get to a Grub shell, where using the `boot` command gave the error message `error: no loaded kernel`. After more playing around, I decided to try re-installing Ubuntu, and booted it up to find a Grub terminal (not splash menu, but not recovery mode) telling me that it had an error, `no loaded kernel` again. The same thing happens when trying to follow instructions on loading an OS from grub, at the `linux /vmlinux root=/dev/sda1` command. After many searches, all of the information I can find is this:   * The error has been reported when upgrading in Ubuntu 9, and can be solved by installing a later version of Grub.   * The Grub shell will load without selection if Grub can't find a configuration file. The first doesn't seem to be applicable, but the second, along with the exact commands that fail, seem to point to the problem being getting info off of the hard drive. The operating system is Ubuntu 10.04.2 Server LTS, running on the internal hard drive of a Compaq Armada m700 (very old, very slow, but I just want a text-based/LAMP server). Any suggestions on how to get the kernel to load, or another solution? Again, I have tried re-installing the OS, booting multiple times, and running Grub off of a cd.


title: iptables infographic

text: Is there an infographic somewhere that describes the logical flow of `iptables`? Specifically, I'm looking for something that diagrams which point in the process `ip_conntrack` applies.


title: HISTTIMEFORMAT does not show correct date and time for history

text: After exporting `HISTTIMEFORMAT='%F %T'` I tried to query `history` But the result shows all the commands are executed on same day. How can I check the actual date and time of actual command execution?


title: Why are libraries shipped separately instead of bundled with every program?

text: I know why this is good in general: faster security fixes, easier packaging, more features. However, I'm trying to persuade some co-workers that we don't need to bundle a library with our program. It will not work without this library, but the library has been stable for a while now and will remain so for the foreseeable future. I don't see any reason NOT to unbundle it. What arguments could I use to persuade them? * * * My specific situation is this: I'm working on SymPy, which is an open-source Python library for symbolic mathematics. A core part of it is mpmath, which is a library for multi-prevision floating point arithmetic. SymPy doesn't work without mpmath, there is no alternative. As such, it has been bundled with SymPy since the start (I was told that there were usually small incompatibilities to fix everytime a new version is imported). It should also be noted that the developer of mpmath used to be involved in SymPy development. There is now an issue on unbundling mpmath, you can read it all here. To summarize the discussion there: Unbundle:   * Somewhat easier porting to Python 3 (minor argument IMHO)   * Easier packaging for distributions   * Faster (security) feature updates to users   * "Packaging and handling dependencies are hard problems, but they are solved. This is definitely not an area where we should do our own thing." Keep bundling:   * Installation. It's easy on Linux, harder on Mac and very hard on Windows. Lack of su access and other problems.   * it is an integral part of SymPy, i.e. sympy does not work without it (at all)   * there is _no_ other package, that can do the job of mpmath   * "When I, as a user, download sympy, I expect it to just work." * * * That's my specific situation, but I'd accept an answer that provides a good, general answer as well.


What are the advantages of swap on a raid-1 (mirror) device? (in a server environment running linux) I mean, you can just use multiple disk devices in linux for swap. And with swap devices that have the same priority, the kernel has the possibility to optimize reads and writes (i.e. striping). I can think of one: With raid-1 and hot-swappable drives you can change a failed leg of the swap-mirror without rebooting. Assuming that the kernel did not already read and use a corrupted page from the _failing_ leg. Without raid1 you would have to either reboot or swap-off the failed device and hope that only unimportant processes (with now unavailable paged-out memory) are terminated. Is this one advantage, and are there others?


title: Install Git on CentOS 5.5

text: I have added EPEL repo and here goes...               # yum install git-core     Loaded plugins: fastestmirror     Loading mirror speeds from cached hostfile      * addons: mirror.team-cymru.org      * base: yum.singlehop.com      * epel: mirrors.servercentral.net      * extras: mirror.steadfast.net      * rpmforge: fr2.rpmfind.net      * updates: pubmirrors.reflected.net     Excluding Packages in global exclude list     Finished     Setting up Install Process     Resolving Dependencies     --> Running transaction check     ---> Package git.i386 0:1.7.3-1.el4.rf set to be updated     --> Processing Dependency: perl-Git = 1.7.3-1.el4.rf for package: git     --> Processing Dependency: libcrypto.so.4 for package: git     --> Processing Dependency: perl(DBI) for package: git     --> Processing Dependency: libssl.so.4 for package: git     --> Processing Dependency: perl(Git) for package: git     --> Running transaction check     ---> Package git.i386 0:1.7.3-1.el4.rf set to be updated     --> Processing Dependency: perl-Git = 1.7.3-1.el4.rf for package: git     --> Processing Dependency: perl(DBI) for package: git     --> Processing Dependency: perl(Git) for package: git     ---> Package openssl097a.i386 0:0.9.7a-9.el5_4.2 set to be updated     --> Finished Dependency Resolution     git-1.7.3-1.el4.rf.i386 from rpmforge has depsolving problems       --> Missing Dependency: perl(DBI) is needed by package git-1.7.3-1.el4.rf.i386 (rpmforge)     git-1.7.3-1.el4.rf.i386 from rpmforge has depsolving problems       --> Missing Dependency: perl(Git) is needed by package git-1.7.3-1.el4.rf.i386 (rpmforge)     git-1.7.3-1.el4.rf.i386 from rpmforge has depsolving problems       --> Missing Dependency: perl-Git = 1.7.3-1.el4.rf is needed by package git-1.7.3-1.el4.rf.i386 (rpmforge)     Error: Missing Dependency: perl(DBI) is needed by package git-1.7.3-1.el4.rf.i386 (rpmforge)     Error: Missing Dependency: perl(Git) is needed by package git-1.7.3-1.el4.rf.i386 (rpmforge)     Error: Missing Dependency: perl-Git = 1.7.3-1.el4.rf is needed by package git-1.7.3-1.el4.rf.i386 (rpmforge)      You could try using --skip-broken to work around the problem      You could try running: package-cleanup --problems                             package-cleanup --dupes                             rpm -Va --nofiles --nodigest      But...               # yum install perl-DBI     No package perl-DBI available.     Nothing to do      Any idea?


title: Exporting Logical Volume to Mac for use as Time Machine drive

text: I have an Ubuntu server, and I have put a hard drive into this server. The logical volume on this hard drive looks like                  Device Boot      Start         End      Blocks   Id  System     /dev/sdb1            2048   976773167   488385560   8e  Linux LVM      this has a ext3 file system. What do I have to do to get this hard drive working with my time machine. Is there anything special I have to do in fstab so that it mounts correctly? Also, how do I set up the samba config file? What should the config look like for the newly mounted hard drive ?


title: See end-nodes of dependency graphs

text: I'm using Arch Linux, with its Pacman package manager. I want to keep my system as clean as possible, and that includes not having any unused packages installed. But, because of dependencies, it's not a trivial task to have zero of such, at least with my level of knowledge. Is there any tool available, console or GUI, that will show me all installed packages that nothing depends on?


title: How to test /etc/hosts

text: What's the best way to confirm that your /etc/hosts file is mapping a hostname to the correct IP address? Using a tool like `dig` queries an external DNS directly, bypassing the hosts file.


title: Invalid event in x11

text: I use xscope to monitor X11 protocol. I monitor X11 protocol because I try to fix some focus issue with Swing and MPX. I noticed that following packet is transmitted when focus error occurs. How to draw a conclusion from this message? I still don't know what is invalid. Do you have any idea?               614.21:                                           32 bytes <-- X11 Server          Read from fd 8     a1 20 c2      0b 07 00 c0 00 68 01 00 00 71 01 00 00 21 9f 6a 01 00 00 00 00 00 00 00 00 00      00 00 00                                                       Event (fd 8): a1 20 c2      0b 07 00 c0 00 68 01 00 00 71 01 00 00 21 9f 6a 01 00 00 00 00 00 00 00 00 00      00 00 00                                               ..............EVENT: **INVALID** (161)                                                           format: 20                                                  sequence number: 0bc2                                                           window: WIN 00c00007                                                             type: ATM 00000168 <WM_PROTOCOLS>                                                             data: 71 01 00 00 21 9f                                                                  : 6a 01 00 00 00 00                                                                  : 00 00 00 00 00 00                                                                  : 00 00      Have 0 need 32      **=====EDIT=====** I suppose that there is some error between client (my application) and Window Manager. I think so because there is `<WM_PROTOCOLS>`.


title: How to connect two computers via internet with ssh?

text: I want to connect another computer via internet that doesn't have a public IP. Is there any away to do this?


title: ldd:FATAL: Unresolved symbol "getopt_long" called from Executable - using compiled binaries for QNX on arm. Why?

text: The _Blackberry Playbook_ has formally reached EOL(april 2014), but I've installed _BGShell_, _BGSSH-SCP-SFTP_, and _Term48_ on it. So I have some _ksh_ -like shell it seems with things like GNU `awk` 3.1.5, `sed` 4.1.5, `grep` and `python`, with **some** other _coreutils_ elements (but no `tr`) etc. I'm _not root_. Basically I can write in the `Downloads` directory or in the _$HOME_ dir created by the shell apps (`/accounts/1000/appdata/com.BGShell..blabla/data` for instance) and I can't execute everything but I can generally run a script within the aforementioned constraints. The reason I'm interested is because this is _QNX_ on cortex-A9.:               QNX localhost 6.6.0 2014/03/19-01:28:41EDT OMAP4430_ES2.2_HS_Winchester_Rev:07 armle      * * * So I compiled some binaries by trying to leverage an old project1. Many things need be changed for this to work but it is set up and is able to compile most targets(including `gcc` and `coreutils-8.13`)2. To _summarize_ , I compiled using many different variations of configure flags and older versions of some dev tools to avoid some errors. I've settled for something like:               CFLAGS="-march=armv7-a -marm -fno-strict-aliasing -mtune=cortex-a9 -O2 -pipe -fomit-frame-pointer -mlittle-endian"     AUTOMAKE=automake-1.11: AUTOCONF=: AUTOHEADER=: AUTORECONF=: ACLOCAL=aclocal-1.11: MAKEINFO=makeinfo-4.13a      with the `arm-unknown-nto-qnx8.0.0eabi-gcc` cross-compiler linked from the _10.3 SDK_ which sits inside the _momentics_ IDE. The resulting binaries look like this:               ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked (uses shared libs), BuildID[md5/uuid]=41442b23fecda2d1d7cc5d2c68432a33, not stripped      * * * But every one of them errors on the tablet with this message:               ldd:FATAL: Unresolved symbol "getopt_long" called from Executable      As I recompiled many times using different flags and always get that message, I'm thinking I maybe mislinked some other things than the compiler in the build scripts as it was geared for a prior sdk... (this is beyond my expertise but maybe something about garbage collecting i.e. `collect`?). Or is it the exotic configuration on the target platform? A million things could have gone wrong here because of the setup(and inexperience) but I'm looking for some clues so is there any specific thing I should understand from such an error and how can I backtrack the problem generally? * * * 1. In summary it is a bunch of scripts to _fetch_ , _patch_ , _compile_ , _install_ to some dir then _bundle_ that dir to one zip file then spawn a cute _ruby webrick_ server and you use the tablet to download the script and the archive from it(I don't use it for the archive at 250mb, I just use some web file host and the browser). 2. I've removed the _ruby_ , _file_ , and _ruby_ targets from the top level build configuration.


title: Issues with sharing partitions using NFS

text: We have 3 servers: Server1, Server2 and Server3, all in the same network.   On Server2 I'm sharing a partition, say `/part1`, to Server 3 using **NFS**.   Here's the `/etc/exports` on Server2:   `/part1 Server3(rw)` and here's the `/etc/fstab` from Server3:               Server2:/part1 /part1  nfs defaults    0 0      This is working absolutely fine. Then I shared a partition `/part2` on Server1 to Server2 and Server3 with the condition that this has to be a sub-directory of `/part1`.   The `/etc/exports` on Server1:               /part2 Server2(rw) Server3(rw)      and the `/etc/fstab` from Server2:               Server1:/part2 /part1/part2  nfs defaults    0 0      With this configuration `/part2` is perfectly accessible to Server2 but **not to Server3**. Am I missing anything? If its of any significance, `/part2` is formatted as **ocfs2**. Other partitions are **ext3** and all servers are running **Oracle Linux 5**.


title: Is there a difference between `command rspec` and `rspec`?

text: I want to call `bundle exec rspec` if `Gemfile` exists in current directory, and if it doesn't exists, call `rspec` itself. So I wrote like this.               function rspec() {         if [ -e 'Gemfile' ]; then         echo 'call bundle exec rspec'         bundle exec rspec         else         echo 'call rspec'         command rspec         fi     }      But when I run `rspec --init` where `Gemfile` doesn't exist, I get this error. > /Users/ironsand/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rspec- > core-2.14.7/lib/rspec/core/configuration.rb:896:in `load': cannot load such > file -- /Users/ironsand/tmp/spec (LoadError) Error indicate there is no spec directory, but `rspec --init` should create the directory by itself. If `Gemfile` exists, `rspec` works fine. I think this error occurs because of a difference that made by `command`. How can I solve this problem?


title: Video Conversion Tool in Debian 6?

text: Is there any video conversion software in debian 6 which supports all format?


title: How do I reuse the last output from the command line?

text: This is a noob question, but I'd like to know how to reuse the last output from the console, ie:               pv-3:method Xavier$ python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()"     /Library/Python/2.6/site-packages     pv-3:method Xavier$ cd **LASTOUTPUT**


title: How to keep track of installed software

text: Every now and then I'm in need of updating a software running on one of our testservers at work (mostly Debian). What really confuses me almost every time is the fact that there is not just one way to install software. Today I needed to upgrade Coffeescript. I didn't know how it was installed initially and therefore not how to update it the best way. It could have been installed with apt or manually by cloning the github- project and building it on my own or via the nodejs package manager npm. After I struggled with this and manually threw all coffeescript related files and dirs away I managed to do a fresh install. But then I wanted to use a coffeescript command that needs nodejs 0.6 and 0.4 was installed. So, let the games begin again! Was nodejs installed manually? Or as package? Or was it put there by god? I don't know. So I'm asking myself is there some easy strategy to update installed software when you don't really know how it was intially installed? What are the best approaches here?


title: What's the difference of dmesg output and /var/log/messages?

text: AFAIK `dmesg` shows information about kernel and kernel modules, and `/var/log/messages` also shows information produced by kernel and modules. So what's the difference? Does `/var/log/messages` ⊂ output of `dmesg`? More Info that may be helpful:   - There is a kernel ring buffer, which I think is the very and only place to store kernel log data.   - Article "Kernel logging: APIs and implementation" on IBM DeveloperWorks described APIs and the bird-view picture.


title: Error mounting dir from ext4 file system

text: I am trying to mount a directory on a ext4 type file system onto another linux box. Both boxes are on the same network               [root@localhost]# mount -o rw x.y.z.w:/home/lab /devbox     mount: wrong fs type, bad option, bad superblock on x.y.z.w:/home/lab, missing codepage or other error In some cases useful info is found in syslog - try dmesg | tail or so               [root@localhost]# mount -o ro,noload x.y.z.w:/home/lab /devbox     mount: wrong fs type, bad option, bad superblock on x.y.z.w:/home/lab, missing codepage or other error In some cases useful info is found in syslog - try dmesg | tail or so               [root@localhost]# mount -o ro,noload -t ext4 x.y.z.w:/home/lab /devbox     mount: special device x.y.z.w:/home/lab does not exist      The dir /home/lab exists on x.y.z.w. Not sure what i am missing here


title: Command-line password manager that uses SSH key to authenticate

text: I'm looking for a command-line password manager, much like pwsafe, but one that features SSH key authentication. That is, I'd like to be able to add my SSH key to the authentication when opening the password file, so that I do not have to remember yet another password but can use my SSH key to unlock my other passwords. Pwsafe is compatible with Counterpane's Win32 PasswordSafe, which is a feature I do not need. I only need command-line access and the possibility to easily copy passwords to the clipboard. Does such a program exist?


title: Is there a way to have a web browser while no KDE or GNOME is installed?

text: > **Possible Duplicate:**   >  install firefox in ubuntu-server edition I'm running an ubuntu machine (server actually) that does not have any user interface installed, only a command line. I was wondering if it'd be possible to have a web browser, say Google Chrome, run on this machine without having to insall the whole GNOME or KDE environment. Can this be done? Or does chrome rely to much on these environments? edit: perhaps a little word on why I would need this.   1. I don't like desktop environments, with point and clicks and navigation trough folders.   2. I do like programming / trying new stuff out.   3. When programming one often needs help ( _I don't know how to do that_ -> google), so browsing webpages is a must.  Similarly, viewing PDFs can be done trough the browser.


title: apache2 Invalid command 'SSLEngine'

text: Running: CentOS6 x64 When I restart httpd, I get the following error. What am I missing?               [root@localhost ~]# service httpd restart     Stopping httpd:                                            [  OK  ]     Starting httpd: Syntax error on line 22 of /etc/httpd/conf.d/sites.conf:     Invalid command 'SSLEngine', perhaps misspelled or defined by a module not included in the server configuration      I have installed mod_ssl using `yum install mod_ssl openssh`               Package 1:mod_ssl-2.2.15-15.el6.centos.x86_64 already installed and latest version     Package openssh-5.3p1-70.el6_2.2.x86_64 already installed and latest version      My sites.conf looks like this               <VirtualHost *:80>     #    ServerName shop.itmanx.com         ServerAdmin webmaster@itmanx.com              DocumentRoot /var/www/html/magento         <Directory /var/www/html>             Options -Indexes             AllowOverride All         </Directory>              ErrorLog logs/shop-error.log         CustomLog logs/shop-access.log     </VirtualHost>          <VirtualHost *:443>         ServerName secure.itmanx.com         ServerAdmin webmaster@itmanx.com              SSLEngine on         SSLCertificateFile /etc/httpd/ssl/secure.itmanx.com/server.crt         SSLCertificateKeyFile /etc/httpd/ssl/secure.itmanx.com/server.key         SSLCertificateChainFile /etc/httpd/ssl/secure.itmanx.com/chain.crt              DocumentRoot /var/www/html/magento         <Directory /var/www/html>             Options -Indexes             AllowOverride All         </Directory>              ErrorLog logs/shop-ssl-error.log         CustomLog logs/shop-ssl-access.log         </VirtualHost>


title: How can I specify that curl (via command line) overwrites a file if it already exists?

text: I'm using curl in this syntax: `curl -o myfile.jpg http://mysite.com/myfile.jpg` If I run this command twice, I get two files:               myfile.jpg     myfile-1.jpg      How can I tell CURL that I want it to overwrite the file if it exists?


title: How to constraint time a program runs in Linux?

text: I have several simulations to do, each is invoked with `python simulate.py <parameter list>`. The problem with these simulations is that some of them hang without quiting, which prevents me from running them in batch with a simple script. What I'd need, is some form of "run-time-constraint" command, that would automatically kill the process (preferably by virtually pressing _Ctrl+C_ , but I think simple kill will do as well) after a specified time, if the process didn't end gracefully by itself. Of course I can write such script myself, but I suspect that someone have done it already before me, so I don't have to reinvent the wheel spending hours with `ps`, `time` and bash manuals.


title: All about ssh ProxyCommand

text: I am looking for an in-depth explanation of the following ProxyCommand, down to the nuts and bolts of its operation, please. Can you kindly completely dissect it for me and improve on it if you can? For readability, if nothing else.               ProxyCommand ssh gatewayserver 'exec 3<>/dev/tcp/targetserver/22; cat <&3 & cat >&3;kill $!'


title: Why are there so many files and folders within the folder of Tomboy?

text: I have 142 notes in Tomboy but I don't understand why is there such an amount of files and folders created inside the main folder of Tomboy. In there, there are 5 subfolders, named "0", "1"... "4" and in each one of them there are 100 subfolders named:   * "0", "1", ..., "99", inside folder "0"   * "100", "101", ..., "199" inside folder "1"    * and so on... Inside each subfolder there may be a file or two. **In total, nautilus tells me there are about 1300 items inside the folder of Tomboy.** Can someone please explain to me why is this so? My concern is that I sync these notes on Dropbox which, I think, might have a hard time to crawl all these folders for changes, eg. when starting Ubuntu. Correct me please if this isn't true.


title: understanding the difference between "-C" and "-c" in tr(1) utility

text: According to tr(1) manual `-C` means:               Complement the set of characters in string1, that is ``-C ab'' includes every character except for `a' and `b'.      ..and `-c` means:               Same as -C but complement the set of values in string1.      Now if I use `-c` in the above command, it works as I expect:               $ echo $(dd if=/dev/urandom count=1 2>/dev/null | tr -dc 'A-Za-z0-9')     BAP0EctPYxpGgJmWYclqHj2eBWfZvVJs7nL6Y6YQiguGoZgziCceLe3TcyeV4uUi1R1yPW98s8LgiC8iNS1F60tEE2nXAHNi6L6IVS3CXBn94oPLGppxAgp     $       ..but `-C` doesn't:               $ echo $(dd if=/dev/urandom count=1 2>/dev/null | tr -dC 'A-Za-z0-9')     ���hA����W���t�W��eu�C���W��o��A��xz�����M��p���x��2q����10O���������������p�R���t��I���c�8Z��Rq�9�L�Z��u����ot�n�T��n�nI��3i�yj�CuK��v�Ny�0�������i1�W�Lo�do�����TckL����i�rn��Wc��T���3����X��Z�M�e���I��J��I���A�5Y�����h���K���������ai������S����aZ�G���oab8��������4�g���G��g��0����I���H2�XGo���1�7���Ls�9H��7�b���Sf���E��Tv����mE�����3���l���S�88z��nl�p�f����w�E���Y�q�p���B�     $       How to understand this `set of characters` vs `set of values`?


title: Prefix every argument with -o in BASH

text: How do I prefix `-p` to every argument passed to my function? Modifying the arguments themselves and creating a new array are both fine.


title: Set runlevel at boot via hardware (analog) input, switch, etc.?

text: I've got pretty solid Linux experience, but little in the embedded/small system area, and this one has me baffled. I've agreed to help a friend work on a project using a tiny little x86-compatible SBC. It's supposed to be a data logger and display for a monitoring application, using a bunch of sensors and USB ADCs. It needs an extremely quick boot, so we're playing around with various boot optimizations, disabling services, etc. The end result he needs is a machine that can boot very quickly into runlevel 2 (no networking, console only, skips all services but what's required for the data logging and display), or boot into runlevel 3 with SSH, etc. and network services including DHCP, to allow remote access and a script to copy the logged data via SCP to another host. Unfortunately, since this will end up being an embedded system, I need to come up with some way of using an analog hardware input - a switch or button or something - that tells the bootloader/kernel to either boot to runlevel 2 or 3. Has anyone ever heard of this? Aside from patching either GRUB or the kernel itself to poll some sort of IO (I guess serial, parallel, or some sort of GPIO), any suggestions/ideas? Thanks, Jason


title: Can you explain me about following make file of "lc" tool

text: > **Possible Duplicate:**   >  how to build lc tool in linux?               SHELL=/bin/sh       CC=cc          # Objects we link together.     OBJ=lc.o get.o          all:    $(OBJ)           $(CC) -o lc                  $(OBJ)          lc.o:   lc.c lc.h       get.o:  get.c lc.h


title: sed: get 2 lines from a single one

text: I have a list of filenames as `id-datetime.txt`, one each line, where id is always the same and datetime is ordered. I need first and last datetime so having a sed_script in a variable `$script` that grabs it I can do               sed -nr "1 $script p; \$ $script'      I get               datetime (oldest)     datetime (newest)      also working with a single-file list. Now what if I'd like to get also another line with also the id like               id     datetime (oldest)     datetime (newest)      is there an (easy) way of editing line 1 twice so it gives 2 separate lines?


title: How to customize window decorator for a single non-GTK3 application window in Gnome3?

text: Is there a way to specify dark themes for the window decorator (Mutter) for just a single application? (Like Sublime Text). For example, on the screenshot below one window is customized to have a dark decorator, others follow the system adwaita theme. ![enter image description here](http://i.stack.imgur.com/Zswan.jpg) I'm successfully able to customize whole GTK3 applications. From window borders (Mutter) to the GTK3 theme itself. However, even when enforcing dark theme in all GNOME apps, GTK2 applications still appear with the classic white border. Is there a way to enforce a dark window border for non GTK3 apps?


title: Hot to make diff check a symlink link itself?

text: In Linux one can use the command `diff` to check for differences of files. I use it to check for differences across two modules, both copied to `/tmp`. However, both modules have symlinks, which might not be pointing to the correct file, as the modules have been copied to the `/tmp` directory. But this does not matter. What I want to check is if the symlinks are the same. For example, in one module the symlink reads               /home/test/file1      and in the other the symlink reads:               /etc/rc.d/whatever      `diff` now throws an error because - in general - it cannot find the file. But I want to let `diff` say: "Hey, those symlinks are not the same" regardless if the links point to valid files or not. Question: How is it possible for `diff` to do that, i.e. not trying to follow links, but to diff the links itself?


title: Incorrect cron for midnight?

text: I checked the `crontab` set by the hosting company and they have this:               0 * * * * /usr/bin/php /www/sites/[domain.com]/files/html/shell/indexer.php reindexall      Does this `cron` run constantly or once at midnight?


title: How do I completely silence a cronjob to /dev/null/?

text: On my Ubuntu-Desktop and on my debian-server I have a script which needs to be executed each minute (a script that calls the minute-tic of my space online browsergame). The problem is that on debian derivates cron is logging to `/var/log/syslog` each time it executes. I end up seeing repeated the message it was executed over and over in `/var/log/syslog`:               Nov 11 16:50:01 eclabs /USR/SBIN/CRON[31636]: (root) CMD (/usr/bin/w3m -no-cookie http://www.spacetrace.org/secret_script.php > /dev/null 2>&1)      I know that in order to suppress the output of a program I can redirect it to `/dev/null`, for example to hide all error and warning messages from a program I can create a line in crontab like this               * * * * *       root    /usr/local/sbin/mycommand.sh > /dev/null      But I would like to run a cronjob and be sure that all generated output or errors are piped to NULL, so it doesn't generate any messages in syslog and doesn't generate any emails * * * EDIT:   there is a solution to redirect the cron-logs into a separate log like proposed here by changing `/etc/syslog.conf` But the drawback is, that then ALL output of all cronjobs is redirected. Can I somehow only redirect a single cronjob to a separate log file? Preferably configurable inside the `cron.hourly` file itself.


title: How do I switch from /etc/shadow back to /etc/passwd?

text: I'm playing with a rather old, heavily customized Linux installation (based on Debian etch, running on a Netgear ReadyNAS device). Recently I've switched from `/etc/passwd` to `/etc/shadow` via `pwconv`. Now I'd like to switch back due to authentication problems with the Apache server, because `mod_auth_shadow` is not installed and I'm hesitant to install it. As an additional complication: `pwunconv` does not exist either. I have a backup, but it's old and I have been installing a lot of packages since it was taken. I also have the option of doing a factory reset, but that will mean I lose the RAID configuration which I do not want. What steps would I need to take to go back to regular passwd-based password authentication rather than shadow passwords?


title: Pinning and local repos

text: I can't quite wrap my head around pinning in Debian. I'm trying to automatically install a package first from our local project repo, then from our local stable repo and then from official Debian repo, fulfilling dependencies as needed in the same order. So I have three repos in /etc/apt/sources.list:               deb http://our-stable-repo/ our-squeeze-stable main     deb http://official-debian-repo/ squeeze main     deb http://our-project-repo/ our-project main      Release files are as follows, our-stable-repo:               Origin: Ourname     Label: Ourname     Suite: our-squeeze-stable     Components: backports main     Architectures:       MD5Sum:      [...]     SHA1:      [...]      and our-project-repo:               Origin: Ourname     Label: Ourname     Archive: our-project     Component: main     Architecture: amd64      All our packages are in our-stable-repo and our-project-repo. I want to test a package from our-project-repo, which will have few dependencies from the same, and some (those which are not to be tested) from our-stable-repo. Now I set up my /etc/apt/preferences:               Package: *     Pin: release a=our-project     Pin-Priority: 900          Package: *     Pin: release a=our-squeeze-stable     Pin-Priority: 750          Package: *     Pin: release a=squeeze     Pin-Priority: 600      so I expect apt to try and install _any_ package from our-project first. But that does not happen; our-our-squeeze-stable seems to always "win". And even providing `-t our-project` on a command line does not help. Only way how I was able to make apt install my package from the project repo was _removing_ other sources, but that way I ended up with broken dependencies. I tried to debug with `apt-cache policy`, but that's even more confusing:               root@test:~# apt-cache policy     Package files:      100 /var/lib/dpkg/status          release a=now      500 http://our-project-repo/ our-project/main amd64 Packages          origin our-project-repo      500 http://official-debian-repo/debian-security/ squeeze/updates/non-free amd64 Packages          release v=6.0,o=Debian,a=oldstable,n=squeeze,l=Debian-Security,c=non-free          origin official-debian-repo      500 http://official-debian-repo/debian-security/ squeeze/updates/contrib amd64 Packages          release v=6.0,o=Debian,a=oldstable,n=squeeze,l=Debian-Security,c=contrib          origin official-debian-repo      500 http://official-debian-repo/debian-security/ squeeze/updates/main amd64 Packages          release v=6.0,o=Debian,a=oldstable,n=squeeze,l=Debian-Security,c=main          origin official-debian-repo      500 http://official-debian-repo/debian/ squeeze/non-free amd64 Packages          release v=6.0.7,o=Debian,a=oldstable,n=squeeze,l=Debian,c=non-free          origin official-debian-repo      500 http://official-debian-repo/debian/ squeeze/contrib amd64 Packages          release v=6.0.7,o=Debian,a=oldstable,n=squeeze,l=Debian,c=contrib          origin official-debian-repo      500 http://official-debian-repo/debian/ squeeze/main amd64 Packages          release v=6.0.7,o=Debian,a=oldstable,n=squeeze,l=Debian,c=main          origin official-debian-repo      750 http://our-stable-repo/ our-squeeze-stable/main amd64 Packages          release o=Ourname,a=our-squeeze-stable,l=Ourname,c=main          origin our-stable-repo     Pinned packages:     root@test:~#       Why in this apt-cache policy output the project repo has still 500? Is there something wrong with this setup?


title: Permissions on a mounted NFS share

text: I am trying to make a php script on a webserver write into a folder /data on a fileserver. Apache 2.2, PhP 5.x. It's just a test configuration but I'd like to understand the thing somehow as I am not very experienced regarding permissions when it comes to webservers. I am sharing the folder /data on the fileserver by adding               /data   192.168.20.6(rw,sync,no_subtree_check)       Mount the folder by               sudo mount 192.168.20.5:/data /mnt/data      Create a link to the webroot(does that makes sense at all?)               sudo ln -s /mnt/data /webroot/site1/share      Then I get this:               Warning: fopen(/webroot/site1/share/data/uploads/Fotoraum/Original/Bluehend/test.txt): failed to open stream: Permission denied       Where and how do I have to adjust permissions in a sane manner to allow the script to write into /data and its subfolders? Thanks a lot!


title: How can I tell when a file was compressed?

text: I want to find out **when** my log files were compressed by `logrotate` because when I received them from `cron` in my email, the logs came in as text in the main body of the email instead. I did:               ls -1la /var/log/some_services      And found that the logs in question are already in the compressed `.gz` format. So I was wondering if those files were emailed first, before being compressed. However, the dates shown are not when the files were compressed, but when the logs were last updated. How can I tell **when** a file was compressed?


title: How does this bash function work?

text: I'm looking at this short example, and I don't see how this function works:               function EXT_COLOR () { echo -ne "\[\033[38;5;$1m\]"; }      AFAIK `-ne` stands for not equal. What are we comparing here? I only see one variable (string): `"\\[\033[38;5;$1m\\]"`. It looks like it echoes the result of comparison, but there is no variable it compares to.


title: (Mac  Terminal) sed to parse JSON ... what am I doing wrong?

text: In Mac Terminal, I'm trying to parse the "name" out of this JSON response: > > {"created_at":"2012-08-27T20:04:27Z","deleted_at":null,"id":21462840,"item_type":"video","name":"CastingBy-v12 > mixed.mov","private":true,"redirect_url":null,"remote_url":"http://f.cl.ly/items/3D0P02b3e3p2I/CastingBy-v12%20mixed.mov","source":"Cloud/1.5.4 > CFNetwork/520.4.3 Darwin/11.4.0 (x86_64) > (MacPro5%2C1)","updated_at":"2012-08-27T20:13:38Z","view_counter":2,"href":"http://my.cl.ly/items/2840","icon":"http://my.cld.me/images/item- > types/video.png","subscribed":true,"url":"http://files.housenyc.com/1I3E2F3C","content_url":"http://files.eeehousenyc.com/1I3Q0Z1E2F3C/CastingBy-v12%20mixed.mov","download_url":"http://files.eeehousenyc.com/1I3Q0F3C/download/CastingBy-v12%20mixed.mov","gauge_id":null} I'm using `sed 's/{.*?"name":"\\(.+?\\)".*/\1/'` but it returns the whole string. I want it to return just `CastingBy-v12 mixed.mov`


title: Locking in a shell script

text: I want to write a long-running shell script so that only one copy could be run at a time. If the script crashes, I want a new invocation of the script not to be stopped by a lock from the crashed invocation. Is `lockfile-*` set of utils the right thing to use? Is there a chance of a race condition while using them in a script? Does `\--use-pid` lift the 5-minutes limitation mentioned on the man page? My scripts run significantly longer. I use an Ubuntu 10.10 instance on Amazon EC2; no NFS or something like that.


title: Why doesn't "rm *" work when there are files that begin with a hyphen?

text: from: http://seclists.org/fulldisclosure/2011/Sep/190               [USER@MACHINE ~] mkdir ejha     [USER@MACHINE ~] cd ejha/     [USER@MACHINE ~/ejha] touch ize     [USER@MACHINE ~/ejha] touch -- -f -i     [USER@MACHINE ~/ejha] ls -l     total 0     -rw-rw-r--. 1 USER USER 0 Sep 20 19:44 -f     -rw-rw-r--. 1 USER USER 0 Sep 20 19:44 -i     -rw-rw-r--. 1 USER USER 0 Sep 20 19:44 ize     [USER@MACHINE ~/ejha] rm *     rm: remove regular empty file `ize'? y     [USER@MACHINE ~/ejha] ls -l     total 0     -rw-rw-r--. 1 USER USER 0 Sep 20 19:44 -f     -rw-rw-r--. 1 USER USER 0 Sep 20 19:44 -i     [USER@MACHINE ~/ejha]       infos about the system:               [USER@MACHINE ~/ejha] echo $SHELL     /bin/bash     [USER@MACHINE ~/ejha] lsb_release -a     LSB Version:    :core-4.0-ia32:core-4.0-noarch     Distributor ID: Fedora     Description:    Fedora release 14 (Laughlin)     Release:    14     Codename:   Laughlin     [USER@MACHINE ~/ejha] rpm -qa | fgrep bash     bash-4.1.7-4.fc14.i686     [USER@MACHINE ~/ejha]       Why? Why doesn't it deletes the "-f" and "-i" file?


title: How to rip a scratched DVD-Video? (a "cdparanoia for DVDs")

text: I usually use the very nice and simple `dvdbackup` program to rip and backup my DVD-Video. However some of my DVDs have a few scratches and my DVD drive has some trouble reading a few sectors. So, **is there a tool similar to`cdparanoia`, but for DVDs?**


title: Unatended script execution in ubuntu terminal

text: I have installed Ubuntu on a VMWare virtual machine. When I got to installing a VMWare tools, I have stumbled upon a simple question: If I execute a script (perl script in VMWare tools case), is there a way for me to tell the execution beforehand, that if it prompts me for an input, given that it has a default value, it just uses it, not waiting for me to press Enter?


title: Why does Fedora 20 request a restart after software updates?

text: I have a Fedora 20 installation in a VirtualBox virtual machine. Now it notifies me of "OS Updates", that "Includes performance, stability and security improvements for all users", and I have the option to "Restart & Install". However, clicking on "OS Updates" brings up the contents of the "OS Updates", and I can't find a new kernel, libc, or systemd in the list of packages to update. So, what is it that calls for a restart? These packages are listed when I issue `sudo yum update` :               ================================================================================     Updating:      chkconfig                       x86_64 1.3.62-1.fc20             updates 172 k      chrony                          x86_64 1.30-2.fc20               updates 262 k      emacs-filesystem                noarch 1:24.3-24.fc20            updates  58 k      file                            x86_64 5.19-4.fc20               updates  59 k      file-libs                       x86_64 5.19-4.fc20               updates 401 k      gdb                             x86_64 7.7.1-18.fc20             updates 2.6 M      ghostscript                     x86_64 9.14-4.fc20               updates 4.4 M      hwdata                          noarch 0.269-1.fc20              updates 1.3 M      libndp                          x86_64 1.4-1.fc20                updates  30 k      libreport                       x86_64 2.2.3-2.fc20              updates 405 k      libreport-anaconda              x86_64 2.2.3-2.fc20              updates  43 k      libreport-cli                   x86_64 2.2.3-2.fc20              updates  47 k      libreport-fedora                x86_64 2.2.3-2.fc20              updates  40 k      libreport-filesystem            x86_64 2.2.3-2.fc20              updates  35 k      libreport-gtk                   x86_64 2.2.3-2.fc20              updates  94 k      libreport-plugin-bugzilla       x86_64 2.2.3-2.fc20              updates  79 k      libreport-plugin-kerneloops     x86_64 2.2.3-2.fc20              updates  45 k      libreport-plugin-logger         x86_64 2.2.3-2.fc20              updates  48 k      libreport-plugin-reportuploader x86_64 2.2.3-2.fc20              updates  52 k      libreport-plugin-ureport        x86_64 2.2.3-2.fc20              updates  52 k      libreport-python                x86_64 2.2.3-2.fc20              updates  63 k      libreport-python3               x86_64 2.2.3-2.fc20              updates  49 k      libreport-web                   x86_64 2.2.3-2.fc20              updates  46 k      libserf                         x86_64 1.3.7-1.fc20              updates  53 k      libteam                         x86_64 1.12-1.fc20               updates  46 k      perl-Socket                     x86_64 1:2.015-1.fc20            updates  50 k      poppler-data                    noarch 0.4.7-1.fc20              updates 2.2 M      ppp                             x86_64 2.4.5-34.fc20             updates 359 k      selinux-policy                  noarch 3.12.1-180.fc20           updates 351 k      selinux-policy-targeted         noarch 3.12.1-180.fc20           updates 3.8 M      sqlite                          x86_64 3.8.6-2.fc20              updates 433 k      teamd                           x86_64 1.12-1.fc20               updates 108 k      tzdata                          noarch 2014f-1.fc20              updates 430 k      tzdata-java                     noarch 2014f-1.fc20              updates 147 k      vim-minimal                     x86_64 2:7.4.402-1.fc20          updates 439 k      zeitgeist-libs                  x86_64 0.9.16-0.2.20140808.git.ce9affa.fc20                                                                       updates 141 k          Transaction Summary     ================================================================================


title: Apache: Simulate 100 new connections per sec with ab

text: I know I can use "-c" switch in ab to simulate a certain number of concurrent connections. Is there a way in which I could use "ab" to simulate **100 new clients every second** visiting my website or getting a file? I would like to know how my server will behave under such a load.


title: Ping IP works, nslookup fails. New Kernel

text: I am compiling my own 3.14 kernel. I fear I may have left out some important networking feature to get DNS working. I can't resolve domain names. I can ping my DNS server. I can resolve using that DNS on other machines so I know it's not the server.               ~ # cat /etc/resolv.conf     nameserver 192.168.13.5          ~ # nslookup google.com     Server:    192.168.13.5     Address 1: 192.168.13.5          nslookup: can't resolve 'google.com'          ~ # ping -c 1 google.com     ping: bad address 'google.com'          ~ # ping -c 1 192.168.13.5      PING 192.168.13.5 (192.168.13.5): 56 data bytes     64 bytes from 192.168.13.5: seq=0 ttl=128 time=0.382 ms          --- 192.168.13.5 ping ststistics ---     1 packets transmitted, 1 packets recieved, 0% packet loss     reound-trip min/avg/max = 0.382/0.382/0.382 ms      Any ideas what I left out? here is my config: http://pastebin.com/vt4vGTgJ **EDIT** : If it's not the kernel, what could I be missing? I am using busybox, statically linked. there are no shared libraries in this system. **EDIT2** The problem is with busybox. I used a precompiled one and did not have issues. I need to look into compilation options with it. Thanks for your help. https://gist.github.com/vsergeev/2391575: > There are known issues with DNS functionality in statically-linked glibc > programs (like busybox in this case), because libnss must be dynamically > loaded. Building a uClibc toolchain and linking busybox against that would > resolve this.


title: Can I force `man` to do lower case sensitive matching?

text: When I search man pages, the search is case sensitive, but only with regard to upper case letters. E.g., `x` will match `x` and `X` whereas `X` only matches `x`. This is the `man-db` version of man, used on fedora derived systems by default and available on others. `man man` says the default pager is `less -s`. `$LESS` is not defined in the environment, my `$PAGER` is just `less`, and I have no aliases for less. This is not the behaviour when I invoke `less` on its own. Is there anyway to force lowercase `x` to match only lowercase`x` when using `man`?


title: xterm resizing causes shell to mess up

text: I'm using reflection x, which uses xterm as the terminal emulator. If I maximize and minimize the window several times, when I try to access previous commands, the text becomes messed up. The issue is very similar to this, however, I'm using the ksh shell instead of bash. So what would the ksh version of the solution be? Thanks!


title: Import EPEL GPG key in kickstart post-installation

text: I'm trying to use Oz to create a CentOS 6.4 virtual machine image and install some packages from EPEL. When it tries to install the epel-release package, I get the error:               Public key for epel-release-6-8.noarch.rpm is not installed      I can pass a custom kickstart file to Oz, so my thinking is to import this key in the post-installation script. What should I put in the `%post` section so the appropriate key gets imported? For reference, here's what my Oz template looks like this:               <template>         <name>centos-6.4</name>         <os>             <name>CentOS-6</name>             <version>4</version>             <arch>x86_64</arch>             <install type='iso'>                 <iso>file:///data/isos/CentOS-6.4-x86_64-bin-DVD1.iso</iso>             </install>         </os>         <description>CentOS 6.4 x86_64</description>         <repositories>             <repository name='epel-6'>                 <url>http://download.fedoraproject.org/pub/epel/6/$basearch</url>                 <signed>yes</signed>             </repository>         </repositories>         <packages>             <package name="epel-release" />             <package name="cloud-utils" />             <package name="cloud-init" />         </packages>         </commands>     </template>      (I could just turn off the check for signed packages, but I'd like to figure out how to do this without turning off that check). Edit: Here's what my custom kickstart currently looks like:               install     text     key --skip     keyboard us     lang en_US.UTF-8     skipx     network --device eth0 --bootproto dhcp     rootpw %ROOTPW%     firewall --disabled     authconfig --enableshadow --enablemd5     selinux --disabled     timezone --utc America/New_York     bootloader --location=mbr --append="console=tty0 console=ttyS0,115200"     zerombr yes     clearpart --all          part / --fstype ext4 --size=1024 --grow     reboot          %packages     @base          %post     # What do I put here???


title: Error not a valid identifierd when executing shell script

text: I have the following shell script in order to connect to database and do some tasks.               echo Please enter userid:     read USER_NAME          echo "Please enter password:"     read -s PASS             SID=${ORACLE_SID}          if [ "${ORACLE_SID}" != 'TEST'  ]     then         sqlplus -s -l $USER_NAME/$PASS@$SID  << EOF         copy from scott/tiger@orcl insert emp using select * from emp         exit     EOF          else         echo  "Cannot copy"     fi      However 1when I execute I am getting errors               Please enter local Username:     scott     ': not a valid identifierd: `USER_NAME     copy_data.sh: line 3: $'\r': command not found     Please enter local Password:     ': not a valid identifierd: `     copy_data.sh: line 6: $'\r': command not found     copy_data.sh: line 8: $'\r': command not found     copy_data.sh: line 18: syntax error near unexpected token `fi'     copy_data.sh: line 18: `fi'      How can I resolve this issue Debug mode               $ bash -x test.sh     + echo 'please enter username'     please enter username     + read user_name     vbx     + echo 'please enter password'     please enter password     + read -s pass     + echo     test.sh: line 12: syntax error near unexpected token `else'     test.sh: line 12: `else'


title: The find command: the options '-mindepth' conflicts with the action '-prune'

text: If the file structure is like this:               /a/p/c/d...     /c/a/c/g/f/...     /a/c/d/e/...     ...      And I want to do this: `find -mindepth 3 -type d -name p -prune -or -name c -print` However, this command will not prune the 'p' directory and the first line will included. I know it's actually not a conflict. But how to prune 'p' with the mindepth applied?


title: Error compiling glib

text: I am trying to compile glib 2.24.2 under Debian 64bit GNU/Linux 6.0.4 (squeeze) using:               gcc 4.0.3     glibc 2.3.6      Configure command:                CPP="/home/swarkentin/externalBins/bin/cpp" \      CC="/home/swarkentin/externalBins/bin/gcc" \      CXX="/home/swarkentin/externalBins/bin/g++" \      LDFLAGS="-L/home/swarkentin/externalBins/lib64 -L/home/swarkentin/externalBins/lib" \      CFLAGS="-I /home/swarkentin/externalBins/include -O2 -fno-strict-aliasing -fno-omit-frame-pointer" \      ./configure --prefix=/home/swarkentin/target   \      --enable-static --disable-shared      I am getting an error:               checking thread related cflags... -D_REENTRANT     checking for pthread_create/pthread_join... no     checking for pthread_create/pthread_join in -lpthread... no     checking for pthread_create/pthread_join in -lpthread32... no     checking for pthread_create/pthread_join in -lpthreads... no     checking for pthread_create/pthread_join in -lthread... no     checking for pthread_create/pthread_join in -ldce... no     configure: error: I can't find the libraries for the thread implementation             posix. Please choose another thread implementation or             provide information on your thread implementation.             You can also run 'configure --disable-threads'             to compile without thread support.      How can I point/find posix thread libraries to make it past configure step? Let's say, I include --disable-threads. Now I can finish configure, but make ends with an error:               gcancellable.c: In function 'IA__g_cancellable_reset':     gcancellable.c:372: error: 'g__cancellable_lock' undeclared (first use in this function)     gcancellable.c:372: error: (Each undeclared identifier is reported only once     gcancellable.c:372: error: for each function it appears in.)     gcancellable.c: In function 'IA__g_cancellable_disconnect':     gcancellable.c:764: error: 'g__cancellable_lock' undeclared (first use in this function)     make[5]: *** [gcancellable.lo] Error 1


title: Problem in mouse configuration

text: I have a strange problem with the mouse. To set up the pointer speed to become slow. But when I boot the Mint, it is an absurd speed, both the pointer and the scroll. To be the speed that I set up, I need to unplug the USB and reattach it. I'm using Linux Mint 17 Cinnamon.