Can't connect to steam

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.


How do I find my network SSID?

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?


Creating an arbitrarily large "fake" file

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.


ORACLE Weblogic IPV6 with oracle database on IPV4

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?


current spotify track in dwm status bar

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?


How to replace text after the cursor location in VIM

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?


CentOS installation: difference between live CD and live DVD

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?


make my zsh prompt show mode in vi mode

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?


Using Grub2 to boot linux mdraid whole device RAID6

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.


How to revert direction for last parameter shortcut?

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?


Rolling your own init: How to shutdown/restart?

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?


OCR on Linux systems

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?


tmux vs. GNU Screen

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.


XFS on Volume Group or Mdadm Raid 0

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


How to config iptables for pppoe?

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?


How to redirect error to a file?

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.


CentOS 6.5 have to manually add the default route

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?


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

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


Colorful ssh banner

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?


How to enable local ~ autocompletion for scp?

**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)


Kali tool installation?

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.


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

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.


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

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?


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

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


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

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)


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

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.


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

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?


Run shell script when new volume mounted

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?


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

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.


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

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?


Pipe to multiple files in the shell

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?


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

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+.


How to play the result of "mpc search"?

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


Grub2 Error Loading Kernel

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.


iptables infographic

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.


HISTTIMEFORMAT does not show correct date and time for history

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?


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

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?


Install Git on CentOS 5.5

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?


Exporting Logical Volume to Mac for use as Time Machine drive

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 ?


See end-nodes of dependency graphs

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?


How to test /etc/hosts

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.


Invalid event in x11

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>`.


How to connect two computers via internet with ssh?

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


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

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.


Issues with sharing partitions using NFS

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**.


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

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?


Video Conversion Tool in Debian 6?

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


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

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**


How to keep track of installed software

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?


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

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.


Error mounting dir from ext4 file system

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


Command-line password manager that uses SSH key to authenticate

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?


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

> **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.


apache2 Invalid command 'SSLEngine'

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>


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

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?


How to constraint time a program runs in Linux?

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.


All about ssh ProxyCommand

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 $!'


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

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.


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

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`?


Prefix every argument with -o in BASH

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


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

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


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

> **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


sed: get 2 lines from a single one

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?


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

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?


Hot to make diff check a symlink link itself?

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?


Incorrect cron for midnight?

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?


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

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.


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

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?


Pinning and local repos

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?


Permissions on a mounted NFS share

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!


How can I tell when a file was compressed?

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?


How does this bash function work?

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.


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

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`


Locking in a shell script

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.


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

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?


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

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?**


Unatended script execution in ubuntu terminal

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?


Why does Fedora 20 request a restart after software updates?

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     ================================================================================


Apache: Simulate 100 new connections per sec with ab

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.


Ping IP works, nslookup fails. New Kernel

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.


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

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`?


xterm resizing causes shell to mess up

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!


Import EPEL GPG key in kickstart post-installation

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???


Error not a valid identifierd when executing shell script

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'


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

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?


Error compiling glib

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


Problem in mouse configuration

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.


Can you "reserve memory" for your user session?

I'm trying to analyze an issue with a remote server that is running out of available memory. I have no idea when it happens, but when it does, I'm unable to SSH into the machine. I can only remotely reboot it and then log in. So, I had the idea of simply staying logged in until the problem happens. That way I could analyze the situation. But once there is no more available memory, I'm not gonna have a great time debugging the problem. So, is there a way to reserve memory for processes **which are spawned by myself**?   Not programmatically if possible.


How can I print good looking code

Similar to using markdown on Stack Overflow to create `monospace output`, how can I do that for my programs. I tried lp filename.txt and was pleasantly please to find that it was able to use the local network printer and print 'as is' The problem is the output is not mono-spaced. Is there an quicker option than...               1) copy the text     2) paste into a text doc     3) format the document as mono     4) print it       I would love to find some option like `lp filename.txt -format=mono` ;)


Bash: kill background jobs

Is there a more compact form of killing background jobs than:               for i in {1..5}; do kill %$i; done      Also, {1..5} obviously has a hard-coded magic number in it, how can I make it "N" with N being the right number, without doing a:               $(jobs | wc -l)      I actually use \j in PS1 to get the # of managed jobs, is this equivalent?


Is it possible to create and use menus in (terminal-based) vim?

I'm setting up virtualized Linux boxes (as local development servers) for developers at a company that is primarily Windows-based, and some of developers make negative cracks about vim (among other things). (It seems to them to represent Linux/Unix in some way, and prove that the environment is obtusely difficult to use.) I remember when I was first forced to use vim, (the sysadmins refused to install emacs!) and the difficult initial learning curve, so I'm somewhat sympathetic. It occured to me that, rather than introduce them to `nano` (which they would probably never get past) it might be possible to set up nano-like menus in vim to make the transition easier. (I've found a very beginner-friendly .vimrc file to give them, but it doesn't have anything like nano-style menus.) The only problem is the only thing I've been able to find that claims it's possible to setup menus in vim (not gvim) didn't work, and my attempts to correct the problem just left me with yet another problem to solve. Before I waste lots of time I'd like to know if it is in fact possible, since there seems to be very little information about how to do it.


complicated mpd/ssh setup howto?

I've recently acquired a raspberry pi and plan to use it as a home-computer and web/file-server. ## The setup I have a pretty big (3TB) HD hooked up to it that has all my music on it. I also have a laptop that I take everywhere. ## The requirements I would like to set up the `mpd` so that I can do the following thins. First of all I would like to be able to play music from the R-Pi over ssh on my laptop when I'm away (the files that are stored on the 3TB HD). Secondly, I would like to hook up the R-Pi to a soundsystem at home and be able to control it's playback from my laptop. These two things are pretty similar in the following aspects: all the music is stored on the home HD. All the control actions I do will be trough the `ncmpcpp` client on my laptop. These are the differences between the two requirements: the first one plays music trough my laptop speakers, the second one plays them trough the R-Pi output. ## The approach I'm not quite sure how to handle this. Do I keep one `mpd` instance running (on R-Pi) or do I also have one running on my laptop too (which uses the data on R-Pi)? The setup I have in my mind is the following: ### First req:   * put `mpd` on laptop, that uses data on HD in some way (over ssh/http if that is possible)   * use `ncmpcpp` to use `mpd` on laptop like usual ### Second req:   * put `mpd` on R-Pi, that uses data on HD   * put `ncmpcpp` on R-Pi that connects to the R-Pi `mpd`   * to control the R-Pi home soundsystem, connect to R-Pi via ssh and use `ncmpcpp` (pro


Interface Priority in the Face of VPN

I have a few interfaces: wlan0, eth0, lo, and sometimes tun0. When I connect to the Juniper VPN, creating a tun0 interface, my existing connections on other interfaces (perhaps with the exception of lo) are interrupted, and they reconnect using the tun0 interface. I only want to use tun0 on particular connections of my choosing, not all of them, and not by default. How can I ensure that the default interface is eth0 or wlan0? The output of `ip addr` is here:               1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default          link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00         inet 127.0.0.1/8 scope host lo            valid_lft forever preferred_lft forever         inet6 ::1/128 scope host             valid_lft forever preferred_lft forever     2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000         link/ether d4:be:d9:65:c1:45 brd ff:ff:ff:ff:ff:ff     3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000         link/ether 24:77:03:ab:a6:dc brd ff:ff:ff:ff:ff:ff         inet 10.23.4.5/24 brd 10.23.4.255 scope global wlan0            valid_lft forever preferred_lft forever         inet6 2601:d:a780:2c3:f803:d084:a01f:f156/64 scope global temporary dynamic             valid_lft 86397sec preferred_lft 14397sec         inet6 2601:d:a780:2c3:2677:3ff:feab:a6dc/64 scope global dynamic             valid_lft 86397sec preferred_lft 14397sec         inet6 fe80::2677:3ff:feab:a6dc/64 scope link             valid_lft forever preferred_lft forever     5: tun0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1400 qdisc pfifo_fast state UNKNOWN group default qlen 500         link/none          inet 140.182.72.57/32 scope global tun0            valid_lft forever preferred_lft forever      _Source:http://sprunge.us/KKGP_ I noticed that tun0 is on the bottom, so I would think it's bottom priority, too? **NOTE:** For what it's worth, I don't know how to modify the priority of the other interfaces either (eth0, wlan0, lo).


Can I make SSMTP to automatically set the "To:" header?

I'm using the ssmtp package to send e-mail via g-mail. Everything is working fine with it - the only strange thing is that if I send mail via the command line, the "to field" is funky.               ssmtp me@domain.com < message.txt      Basically the "to" field will just say "undisclosed recipients" I read that you can set headers containing a "To:" field, but that seems overly complicated when I've used the `mail` command on other systems, I it will do this automatically. Is there an easier way to send mail via the command line with `ssmtp` - but without having to change the above syntax or specify additional parameters? (possibly a config file to set the "to" address as whatever one was specified.


Is there a way to install Arch Linux without any installation media?

I want to install Arch Linux on my laptop machine. I have created a 20GB partition to (`dev/sda5`) to be used as Arch Linux root partition. I tried installing using a usb thumbdrive (I don't have a cd on that machine) and my partitions were not recognized. I read a little bit and concluded this has something to do with `cfdisk` which Arch Linux uses to create the partitions. Is there a way to by pass that and directly install Arch to my hard drive in a similar process?


Does ssh-agent store my passphrase?

Is it possible to determine the passphrases of private keys added to `ssh- agent`? I'm thinking along the lines of someone with root privileges trying to find out my passphrase _after_ I have added the key (so I don't mean something like keylogging while typing the password).


Deleting Lines Containing a Specified String in Different Files

Suppose there are two files in `web/` named `foo.php` and `bar.php`. The 1st line of `foo.php` is "sdajgeSTRINGdsad" and the 10th line of `bar.php` is "gdfhu98324STRING". The task is to first locate these two files, then delete 1st line of foo.php and 10th line of bar.php given that the specified string is "STRING".


X and xdotool in LXC instead of KVM

So far I am using various xautomation/xdotool scripts in a KVM virtual machine (linux guest) in order to let them do their work and let me work uninterruptedly. I am using a VirtIO disk, but still the performance of the guest is slow most of the times. Can I do the same in an LXC container, e.g. using docker?


Any reason not to use LUKS on a backup drive?

I have my hard disk encrypted with LUKS, but I make regular backups to an unencrypted external harddrive. Is there any reason I shouldn't setup LUKS on my backup drive as well? Obviously, the big thing will be keeping track of the key/passphrase, but I believe I have that in hand. I'm more concerned about obsolescence of LUKS, I guess. I want to make sure that if my backup sits around for five or ten years, I'll still be able to mount and access it on whatever linux system I have setup at the time.


Is there a tool in linux that allows multi-line regex expressions?

I'm wanting to find the results of a multi-line regular expression in linux. I tried grep, but like most linux utilities it's line based. Is there something similar that allows me to search across multiple lines and simply output the matches? Not perl, awk etc, unless I can give it a regex directly. The problem I've done svn propget --recursive on my subversion repositories and now want to extract all trunk entries, which would require a regex of the form ^http[^ ] _trunk._ $$ (where it starts at "http" at the start of the line, and finishes at an empty line.


How can I access menu bar items alike hud (unity)?

Currently I have archlinux installed, but I used Ubuntu in the past. What I really miss from ubuntu is the HUD from unity which allows hotkey searching for top menu bar items from the current application, without the need for using the mouse or using shortcuts, kind of dmenu: http://www.omgubuntu.co.uk/2012/01/how-to-install-unitys-hud-feature-in- ubuntu-12-04 There is a repository for unity in archlinux, but is too cumbersome, especially since I only want the HUD. Is there other alternatives out there that I could use? Or any way through coding to access menu bar items information?


How to get the pid of the last executed command in shell script?

I want to have a shell script like this:               my-app &     echo $my-app-pid      But I do not know how the get the pid of the just executed command. I know I can just use the `jobs -p my-app` command to grep the pid. But if I want to execute the shell multiple times, this method will not work. Because the _jobspec_ is ambiguous.


Get command PID and send to another

I wanted to know if I can execute a command from the terminal and right after the command started I send its PID to another command to be monitored. I need to do something like this,               dd if=/path/of/file of=/path/of/destination      And then I need to monitor its execution using `pidstat`, but `pidstat` takes a pid and I don't know how to make one send the pid to the other. I need to monitor disk usage, memory usage, cpu usage and time elapsed. Does any one know of a way to do that?


Is using rsync while source is being updated safe?

Is it safe to use `rsync` when the source filesystem is mounted and writeable, assuming that it may very well be modified while rsync is running? I presume that under race conditions I may not get the latest modifications, but is there any risk of corruption?


Keyboard input not displayed on the screen?

We use the `exceed tool to connect to our UNIX servers, but sometimes the command-line behaves erratically. When I am typing some command on the command-line, nothing happens -- nothing is displayed on the screen and I need to close the terminal and open a new one. Why does that happen? Is it related to `stty sane`? I have typed `stty sane` thinking that it is used when your command-line starts behaving erratically; is that what it's for?


Suggestions needed for udev, udisks, autofs, notification setup for a complete automounting solution on Linux

Continuing on Automounting plugged devices in linux, which left things a bit basic. Running Gentoo, I'm automounting a combination of local and network devices on my laptop with autofs-5.0.4-r5. Doing autofs alone gives me a couple of gripes:   * I have to predefine names for mountpoints per device, but occasionally after rebooting my MMC card reader switches positions with my bootable USB stick   * I'd like automatic LABEL based mountpoints to appear, autofs alone AFAIK can't do that Which is what udev and udisks are certainly capable of doing. But:   * I don't want the filesystem to be mounted automatically when plugging the device, just give me the ghost mount point named LABEL Actual filesystem mounting should only occur on first access to the mountpoint, just like autofs ghosting works. This should lower the risk of dirtying filesystems by accidentally unplugging devices, while still providing great accessibility. On top of this I could use knowing at all times what's going on, in my DE.   * Is there a system tray app that is capable of indicating status of all automounts i.e. green = nothing is mounted, red = something is mounted?   * Is there a distribution-agnostic way to provide filesystem (un)mount operation notifications, for example using notify-send? What about Gentoo-specific, that works for me too. Scripting udev doesn't help with NFS and CIFS, right? This combo should be the ultimate automount setup, or am I missing something?


What are differences between directory order and alphebetic order with `ls`?

What are differences between directory order (`-U`) and alphabetic order (by default) with `ls`? They return the same order of a dir's contents to me.


Is NFS sharing via a multi-home computer possible?

I have an nfs export on computer A that I need to mount on a computer B in a different network. I have a multihome computer C, that can provide the connectivity between A & B. All computers are Redhat based. I've tried mounting and re-exporting it with no success. I am assuming exportfs refuses to share nfs mounted filesystems. But before I give up, I thought I ask. Maybe there is a better solution? forwarding nfs/nfslock requests from C to A maybe?


What's status of btrfs as root fs?

What is the current status of `btrfs` being the root filesystem _including_ `/boot`; meaning that you do not need to create a separate `/boot` partition. I ask because I noticed on Debian 7 you cannot setup the root fs to be btrfs. In Ubuntu 13.10 you can attempt to install btrfs as the root filesystem but it always errors out. I read that grub supports btrfs; but back in 2011 the recommendation was to just setup `/boot` partition as ext2 and boot from there. Is that still the status of btrfs? Still incapable of being a root fs on many distros?


FTP clients only showing 9998 folders in a directory with many more

How can I increase the limit of files or folder in linux? Right now when I use any ftp software it shows that there are only 9998 folder in that directory. But I ran a simple php script that would display all the folders in that directory and it shows that the directory actually holds 70 thousand files. I need to download all those files, but I can only download 9998 files, at least when I'm using FileZilla or Bitvise. Is there a way to increase that limit?


How to format xml attributes, not just elements

How do you format an XML document to make it easy to read element attributes? I have a xml based webservice that returns one or two elements, but with hundreds of attributes. As I'm doing development, I sometimes need to debug this service, but it can be hard since the output is just one blob. Consider this:               $ echo '<root><foo z="26" y="25" x="24" a="1" b="2" c="3" d="something more"/></root>' | xmllint --format -     <?xml version="1.0"?>     <root>       <foo z="26" y="25" x="24" a="1" b="2" c="3" d="something more"/>     </root>      I have found that tr works pretty good, but not ideal:               $ echo '<root><foo z="26" y="25" x="24" a="1" b="2" c="3" d="something more"/></root>' | xmllint --format - | tr ' ' \\\n     <?xml     version="1.0"?>     <root>               <foo     z="26"     y="25"     x="24"     a="1"     b="2"     c="3"     d="something     more"/>     </root>      Ideally the output would be something in between the xmllint and a funky hack               <?xml version="1.0"?>     <root>       <foo         z="26"         y="25"         x="24"         a="1"         b="2"         c="3"         d="something more"/>     </root>      That way i can grep for things, or sort or whatever.


BIND9 as a DNS server refuses requests

I am trying to set up a DNS server on Amazon Linux using BIND9. It has to act as a master nameserver for a lot of domains. I have imported all of the DNS zone files using NamedManager (a web interface that creates bind configration files). My **/etc/named.conf** is as follows:               options {         listen-on port 53 { any; };         directory   "/var/named";         dump-file   "/var/named/data/cache_dump.db";         statistics-file "/var/named/data/named_stats.txt";         memstatistics-file "/var/named/data/named_mem_stats.txt";         allow-query     { any; };         allow-recursion { 127.0.0.1; };     };          include "/etc/named.namedmanager.conf";          zone "." IN {             type hint;             file "named.ca";     };      My **/etc/named.namedmanager.conf** (the auto-generated files) is as follows:               zone "mydomain.com.dns" IN {             type master;             file "mydomain.com.dns.zone";             allow-update { none; };     };     zone "myotherdomain.com.dns" IN {             type master;             file "myotherdomain.com.dns.zone";             allow-update { none; };     };     // ... more zones      My **/var/named/mydomain.com.zone**               $ORIGIN mydomain.com.     $TTL 120     @               IN SOA ns.THISNAMESERVER.com. mymail@mymaindomain.com. (                             2013111005 ; serial                             21600 ; refresh                             3600 ; retry                             604800 ; expiry                             120 ; minimum ttl                     )          ; Nameservers     mydomain.com.   86400 IN NS ns.THISNAMESERVER.com.      * * * But when I try to resolve mydomain.com using this DNS server from home I get the following:               [me@myhomepc ~]$ host mydomain.com. ns.MYNAMESERVER.com     Using domain server:     Name: ns.MYNAMESERVER.com     Address: <my-nameserver-ip>#53     Aliases:           Host mydomain.com not found: 5(REFUSED)      I tried disabling recursion for 127.0.0.1 (recursion no; in options{}), as I need to be my nameserver to be serving results. In that case I don't get REFUSED but I don't get any answer!


TCL script try catch

I have a TCL script that sets a number of variables and reads several files. The last file it reads may contain sensitive information, so I need to make sure this file gets deleted even if an error occurs at the beginning of the script:               #!/usr/bin/expect -f          set timeout 5          set foo [lindex $argv 0]     set bar [lindex $argv 1]     set secret [lindex $argv 2]          if { ! ([file exists "$foo"] && [file executable "$foo"]) } {         puts stderr "$foo does not exist or is not executable"         exit 2     }          if { ! ([file exists "$bar"] && [file executable "$bar"]) } {         puts stderr "$bar does not exist or is not executable"         exit 3     }          if { ! ([file exists "$secret"] && [file readable "$secret"]) } {         puts stderr "$secret does not exist or is not readable"         exit 4     }          #Read secret, do foo, do bar, etc.          file delete $secret      Looking at try I think I can do this:               try {         set foo [lindex $argv 0]         set bar [lindex $argv 1]         set secret [lindex $argv 2]              if { ! ([file exists "$foo"] && [file executable "$foo"]) } {             puts stderr "$foo does not exist or is not executable"             exit 2         }              if { ! ([file exists "$bar"] && [file executable "$bar"]) } {             puts stderr "$bar does not exist or is not executable"             exit 3         }              if { ! ([file exists "$secret"] && [file readable "$secret"]) } {             puts stderr "$secret does not exist or is not readable"             exit 4         }              #Read the file, do foo, do bar, etc.              file delete $secret     } on error {         file delete $secret         exit     }      But I'm unfamiliar with TCL syntax and having a hard time finding things in the documentation. Will this work, or do I need to change `on error` to `on error {result options}`? In that case, what is `result` and `options`? Or do I need to use `trap` instead?


difference between `for i in {1..$N}` and `for i in $(seq 1 1 $N) `

I have the following in a script:               #!/usr/bin/env bash      ...     for i in {1..$N}        <loop content>      The above doesn't work and is only executed once where `i` has the value `{1..5}` (if `5` was provided as argument). If I replace the above with:               for i in $(seq 1 1 $N)      .. then things work as expected. Why is that?