Need help setting up networking for KVM on Gentoo with exit to wifi adaṕter

I am running Gentoo Linux on an AMD64 laptop, and I am having an extremely hard time setting up host networking on KVM. I alreay have KVM, libvirtd, virt-manager, the kernel modules required to get virtualization working, and I already rebuilt my kernel with new configuration options according to this guide here, and I still cannot seem to be able to get host networking running. I am able to create a VM using virt-manager, but I am unable to choose a network interface to connect my VM to, on virt-manager's final dialog under Advanced options, all the options on the drop-down box are disabled except "No networking" and "Specify shared device name". I cannot use bridge networking because my internet exit is through a wi-fi NIC. I just spent a good few hours bashing my head with this and I still can't get networking on KVM running. I do not want to use Oracle VM VirtualBox because I had a lot of problems with it in the past. Did I miss something? Is my computer acting up?


What is the best way to add a user to the sudoer group?

So far I have found four different ways to add a user to the sudoers group and not all methods work in all systems. Why so many different implementations? What is the best? What is the standard (i.e. work in most systems)? Different implementations:   1. Adding the user to the 'wheel' group.    2. Adding the user to the 'sudo' group.    3. Editing the file /etc/sudoers   4. Editing the file /etc/sudoers using visudo


Laptop doesn´t go to sleep if HDD is in standby

So I have one mSata-SSD where my whole System is installed and one HDD where I put my Videos and Music! I don´t need my HDD all the Time so I put it to sleep on Startup               sudo hdparm -Y /dev/sda      The Problem I´m facing is when my HDD has the Status 'Standby' and I close my Laptop LID it doesn´t go to sleep anymore. Anyone an Idea what could cause that Problem? I´m on ArchLinux with Gnome3


Is a journaling filesystem a good idea with a dm-crypt encrypted drive?

I was looking at `dm-crypt` and have seen that you can use whatever filesystem you like on top of the encrypted drive. So I was wondering if a journaled filesystem is a good idea as opposed to a non-journaled one. Also, what filesystem would be best to deal with power failures with an encrypted drive?


Output the common lines (similarities) of two text files (the opposite of diff)?

Diff is a great tool to display the changes between two files. But how to display the similarities of two text files (while ignoring the differences)? I.e. sample input:               a:     Foo Bar     X     Hello     World     42          b:     Foo Baz     Hello     World     23      Pseudo output (something like this):               @@ 2,3     =Hello World      Just sorting both files and using comm is not enough, because in that case the line information is lost.


USB Ubuntu with whole-disk encryption

Is it possible to create a single-user USB installation (with persistence) of Ubuntu Linux such that the entire USB stick is encrypted and requires a passphrase at boot time? Is there an online tutorial for this?


Is PXE in a 802.1x network for LTSP possible?

I have an LTSP server in a network that requires 802.1x authentication. Is it possible to boot the terminals through PXE without disabling the 802.1x authentication? If not, are there alternatives to simply disabling auth for the terminals?


Intercept "command not found" error in zsh

Is there a way to intercept the "command not found" error in ZSH? I've seen this is possible in bash apparently, but I couldn't find anything about doing it in zsh.


Under Ubuntu, how do I set a static IP for firewire?

I am using Ubuntu 10.10 on my laptop, which connects to our network wirelessly. Since it sits on my desk next to my desktop, I have a private network between the two using a firewire cable, because `synergy` and file copies are much more plesant over firewire than wifi. I want to set a static IP for the `firewire` device on boot so I don't have to keep using `ifconfig` each time. However the device doesn't appear in Gnome's NetworkManager. How can I set a static IP for the firewire device? Terminal commands are fine, as long as NetworkManager won't blow the config away.


Delete spaces, hyphens, and underscores in filenames?

What is a good command to delete spaces, hyphens, and underscores from all files in a directory, or selected files? I use the following command with Thunar Custom Actions to slugify filenames:               for file in %N; do mv "$file" "$(echo "$file" | tr -s ' ' | tr ' A-Z' '-a-z' | tr -s '-' | tr -c '[:alnum:][:cntrl:].' '-')"; done      But that command only replaces spaces with dashes/hyphens and lowercases capped characters. I've used the following command in terminal to delete spaces from thousands of filenames in a folder, and it worked pretty fast:                rename "s/ //g" *      Again, it only deletes spaces, and not hyphens/dashes and underscores as well. Ideally I don't want any spaces, hyphens/dashes, and underscores in my filenames. And it would be great if the command could be used with Thunar Custom Actions on selected files.


Centos 7 and VNC access right?

UPDATE: I posted on the Tiger VNC forum and someone suggested that this may be a result of PolicyKit (now called PolKit, I believe). Does anyone know how to change this policy? These are all machines behind a firewall in a small startup. It would be much easier if I could get GUI admin rights when I use VNC to connect to the server. -- I've installed (Tiger) VNC Server on a new Centos 7 install. It seems to be working ok but when I use VNC to connect as user admin (created as ua system administrator) it does not get administrator rights. For example, via VNC the admin user cannot change network settings but when logged in directly the same user can change network settings. Same for other administrator functions. I suspect its something to do with the PAM security context or the `runuser -l` command that starts the server but I can't seem to find out what to change. Any suggestions most appreciated. FYI: I setup the VNC Server these instructions from this blog post. and from the directions at the top of the file: `/lib/systemd/system/vncserver@.service` and `man systemctl` page


Only apply Match keyword to single Host in ssh config

I have a host which I ssh into. Sometimes I'm inside the same network, and can ssh directly into it, other times I'm outside it and I need to use a proxy. Because ssh via the proxy server is much slower than direct, I'd like to have my ssh config set up such that I try to connect directly, falling back to the proxy if that fails. Currently the config looks like:                   Host proxy_server         User user         Port port         Hostname some_domain              Host target_host         User user         Port port         Hostname ip_addr_of_host         Match exec not_inside_network         ProxyCommand ssh -W %h:%p proxy_server      The `target_host` entry is the last entry in my config file, yet `not_inside_network` gets called by any ssh connection to unrelated servers in the config file. How can I make `Match` only apply to this one server?


Lags on file access, is my HDD going to break?

Yesterday, I noticed that there is a 5 second delay around those things which used to be instantly. However, it just occurs sometimes, usually only on the first time (maybe kernel cache).   * Opening a new terminal and starting the shell. It takes a while for the prompt to load. This happens in both Fish and Bash   * Opening a file in Vim.   * Launching a command from Awesome WM and using the tab-completion. It takes a while until the completion show up.   * Creating a new commit in git, when I already ran `git status` which usually caches the whole repo. Each time, I see the HDD LED flicker pretty dimly. I think that means that it is busy, but the read rate is very low. That probably means that the HDD is moving around a lot without a lot of reads. I have the impression that the harddrive has a physical problem and has to re- read the sectors again and again to come up with the data. The actions used to be faster, though. Background:   * The drive serves as `/home` and is formatted with EXT4.   * My data is stored in a eCryptfs container.   * The system is a ThinkPad X220 with Kubuntu 14.04. How can I find out which files got corrupted, if any?


RHEL5 to RHEL6 Upgrade

I'm trying to upgrade our RHEL 5.9 servers to RHEL 6.4. We have lots of third party software and mounted systems so it would be nice if we could upgrade without re-installing. I know RedHat doesn't support updates between major releases and we'll go the re-install route if all else fails. If I have a fresh install of 5.9 I'm able to upgrade to 6.4 without many issues using 'linux upgradeany' on a installation cd. But older physical servers that I have successfully cloned as a VM seem to hang while doing the package installation. At first it was hanging on polkit, so I removed all gui desktops with the intent on reinstalling after the upgrade. Now it's hanging on Cyrus- SASL. The logs don't give any useful information on why it is hanging. There are some guides on updating but none have seemed to work for us. http://bitc.bme.emory.edu/~lzhou/blogs/?p=203 http://www.it-hure.de/2011/10/update-rhel5-to-rhel6/ checked /tmp/anaconda.log, /tmp/syslog, /tmp/yum.log, /tmp/storage.log, /tmp/product.log and nothing seems to indicate why the update has halted. If anyone's been able to upgrade successfully I would appreciate any advice you might have.


Linux - Shell Script and Colorized Text

From my most recent post: (http://stackoverflow.com/questions/15046851/linux- colorizing-text-in-files) I can now colorize text, in my terminal window. (using `echo`) Now I'm to the point that I'd like to run a Shell Script that will over-write my `/etc/issue` whenever I decide to execute my shell script. Here is my script:               #!/bin/sh     # re-write /etc/issue     echo "Welcome Back!........whatever message I will put later on" > /etc/issue      So now I'm looking to colorize the text "Welcome Back!" According to This Site, I need to Escape my color codes by using Ctrl+V+ESC But how does one do that inside a shell script, with the goal to re-write the `/etc/issue`? I did copy and paste the author's example (rc.issue) that he gives. Indeed, the `/etc/issue` file gets re-written upon boot, but no color. Just plain text shows. Can anyone enlighten me on this?


Please explain the Awk script provided below

Can anyone please expain me step by step below AWK script written. I have the below code written in my script to format the flat file data. Just wanted to understand so that i can reuse -- I am not a unix guy but task has being assigned to me.kindly help!               awk -vsep=$SEPARATOR 'NR>2{if(NF){if(!s){gsub(" *"sep"[ \t]*",sep);printf "%d%s\n",NR-2,$0}}else s=1}' file_name > new_file           # where $SEPARATOR = ';'      Thanks in Advance.


Linux permissions sudoers file

Is there other file like /etc/sudoers where I assign sudo permissions to the users or groups that I have created?. I have this server that has a user that is not root but when I look at sudoers file there is nothing there saying that this user can do sudo, so I'm little confused about this. I have this output from group               $ more /etc/group     root::0:     other::1:root     bin::2:root,daemon     sys::3:root,bin,adm     adm::4:root,daemon     uucp::5:root     mail::6:root     tty::7:root,adm     lp::8:root,adm     nuucp::9:root     staff::10:     daemon::12:root     sysadmin::14:     games::20:     smmsp::25:     gdm::50:     upnp::52:     xvm::60:     netadm::65:     mysql::70:     openldap::75:     webservd::80:     postgres::90:     slocate::95:     unknown::96:     nobody::60001:     noaccess::60002:     nogroup::65534:     aiuser::61:     ftp::21:     pkg5srv::97:     oinstall::1001:     dba::502:oracle     oper::503:oracle      And this output from id:               $ id oracle     uid=100(oracle) gid=1001(oinstall)


Install firefox and Mozrepl on Server

I used the following guide To Install `firefox`. I then used the following guide and `cpan install Mozrepl` To install `mozrepl`. However when I run /usr/bin/firefox I get `bash: No Such file or directory` Running `file firefox` in `/opt`:               firefox: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, BuildID[sha1]=0x6e884103555b3e2bc8ecc62624d2d8123d61980e, stripped      `uname -u`:               Linux hostname 3.2.0-4-amd64 #1 SMP Debian 3.2.41-2+deb7u2 x86_64 GNU/Linux      `file firefox` in `/usr/bin`:               firefox: symbolic link to `/opt/firefox/firefox'      Everything seems alright except that there is a 32-bit 64-bit mismatch. According to this guide I should install `ia32-libs`, when i try I get the following:               ia32-libs : Depends: ia32-libs-i386 which is a virtual package.     The following actions will resolve these dependencies:               Keep the following packages at their current version:     1)     ia32-libs [Not Installed]      What should I do?


How can I improve battery life in Fedora 15?

I am seeing a horrible battery life with Fedora 15 (lovelock) with Gnome Shell 3 on my laptop. I keep the screen brightness, back light pretty low. I still get about 1 hr 50 minutes battery life out of it after a full charge while just browsing. I also got a brand new battery from lenovo but no luck. I tried the workaround mentioned here — booting with `pcie_aspm=force` — but that did not help any. It is a Lenovo T420s with a 6 cell battery. The kernel version is 2.6.40-4.fc15.x86_64 and CPU is Intel® Core™ i5-2540M CPU @ 2.60GHz. Kernel config can be found here. Is this pretty much what everyone else is seeing? Is it something with Fedora 15? Should I downgrade to Fedora 14? Are there any specific packages I can remove to make the battery life better? I think I should be able to get around 3 to 4 hours with a 6 cell battery - less than 2 hours sounds very low. Here are paste bin links to power top wakeup stats and tunables stats. FYI - I found this link to be an excellent source for tips on reducing power usage. I am going to follow some of the advices posted there.


How can I simply adjust monitor color temperture in X?

I have a new 27" iMac, on which I run Fedora 15 (with no Apple OS) — just boot straight to Linux. The colors are basically accurate to my eye, but the white point is much higher than I'd like (that is, everything is quite blue). I suppose it's 9300K, and may be due to fancy LED backlighting or some such. I dunno; I'm a software guy. I'd like to adjust it to a more comfortable 6500K. In the olden days (including my old LCD monitor), one would just push a button on the monitor and select that from the menu. On an iMac, of course, that's not really an option. Can I do this in software instead? I know that full-on profiling and calibration software runs on Linux, and I may get to that eventually, but for now I'd just like a simple option. What should I do?


sed: what does "/ " mean?

x=`src/lstat64 $TEST_DIR/$tmp.1 | sed -n -e '/ Links: /s/.*Links: *//p'`      In this script. I understand this part `"/s/.*Links: *//p'"` the only thing I don't understand is `'/ Links: '` what does `"/ "` mean? thank you!


How to permanently disable Orca on Debian Wheezy?

**How do I permanently disable the GNOME screen reader ("Orca") on Debian Wheezy, without breaking GNOME?** I'm running Xfce. Things I have tried, or looked at:   * I found the command `gsettings set org.gnome.desktop.a11y.applications screen-reader-enabled false` on one site, and if I execute it in a terminal it seems to be respected (I get a spoken "goodbye" and subsequently setting it to `true` does not appear to do anything) but the next time I log in "welcome to Orca" is spoken again.   * I edited /etc/xdg/autostart/orca-autostart.desktop to set `NoDisplay=false` but it still doesn't show up in _Session and Startup_ under _Application Autostart_.   * I had a look in `dconf-editor` which faithfully reports that the `screen-reader-enabled` value is set to `false` even on login to a new session. However, it still gets launched.   * Another suggestion I saw was to use `apt-get` to remove the `gnome-orca` package entirely, but since `gnome` depends on `gnome-orca`, that would remove all of GNOME, which I do not want.


How to tell which file is original if hard link is created

For example, I have a file `myold_file`. Then I use `ln` to create a hard link as `mylink`:               ln myold_file mylink      Then, even by using `ls -a`, I cannot tell which is the old one. Is there anyway to tell?


Live-CDs no longer boot as expected

For some reason on my office machine every Linux Live-CD either takes forever to boot or goes to a terminal interface instead of the expected GUI. I used to boot to an _Ubuntu 10.10 Live-CD_ and _Live-Thumb-Drive_ on a regular basis. Today I tried the Live-CDs for _GParted_ (got a terminal interface), _Lubuntu_ (the latest version - I think 11.04?) (got a terminal interface), and _Ubuntu 10.10_ desktop (Took 20 minutes to get to Try or Install - And then went nowhere after I clicked "Try" and left it alone for an hour. I do not know what is going on. I do have a striped drive set for _Windows XP_ but in the past _Linux_ still booted I just could not mount those two drives. All of these live CDs boot normally in a VM inside Windows XP.


Can't Install Debian On wm8505 Tablet

I have WM8505 sylvania brand tablet which is come with windows ce 6.0 installed on it. I am trying to install Abrasive's Debian on it but when i remove sd (after install) it reboots and shows nothing on screen. **Here is the link for abrassiv's debian for wm8505** http://etiny.tk/G


Reverse pkg-config?

Suppose using the `pkg-config` I can find which link flags are needed add a library to my code, suppose if I need cairo libraries to add, I can find the appropriate `-l` flag by               > pkg-config --libs cairo     > -lcairo      How do I find the reverse (i.e. link flags --> library name)? Suppose I want to know which library will be added by invoking `-lm` flag, how do I do that?


How to create a fixed size Linux ramdisk which does never swap to disk?

I want to create a fixed size Linux ramdisk which never swaps to disk. Note that my question is not "why" I want to do this (let say, for example, that it's for an educative purpose or for research): the question is _how_ to do it. As I understand `ramfs` cannot be limited in size, so it doesn't fit my requirement of having a fixed size ramdisk. It also seems that `tmpfs` _may_ be swapped to disk. So it doesn't fit my requirement of never swapping to disk. How can you create a fixed size Linux ramdisk which does never swap to disk? Is it possible, for example, to create `tmpfs` inside a `ramfs` (would such a solution fit both my requirements) and if so how? Note that performances are not an issue and the ramdisk getting full and triggering "disk full" errors ain't an issue either.


Keep keyboard layout upon inserting external keyboard

I have a custom keyboard layout, that I enable using this commands:               setxkbmap -verbose us -variant altgr-intl     xmodmap -verbose /home/coub/.myxmodmap      This works just fine, the thing is, that when I attach an external keyboard, the attaching will dismiss my settings and set the default "QWERTY". I would like to keep my settings. I don't know how to disable this fall back to "QWERTY" on attaching, so at least I've tried to set an `udev` rule to enable my settings again. However the environment in `udev` doesn't have access to `Xorg` environment, so the commands fail. To workaround this I've written a watcher, that uses `inotifywait` to watch a file and then I change this file by writing to it from an `udev` rule. This almost works, when the keyboard is plugged, it loads my settings, but the keys with third modifier, that is `ALT-gr`+`KEY` gets mapped incorrectly to some weird keys, that I don't have in my setting. When I change the file (by `echoing` "something" > watched_file) from terminal emulator, it just works and my keyboard setting is loaded properly.


Right-align comments in vim

I'm writing C code using vim and are searching for a possibility to right- align my comments so that they all end at col 80. To give a short example:               int a = 80; /* initialize a */     int b = 7; /* initialize b */     printf("%d + %d = %d", a, b, a+b); /*calculate the result */      should turn into               int a = 80;                               /* initialize a */     int b = 7;                                /* initialize b */     printf("%d + %d = %d", a, b, a+b); /*calculate the result */                                                                ^col 80      I have installed `vim-easy-align` to do other formattings but did not find out yet how to perform this alignment. Maybe someone knows how? I do not insist on `vim-easy-align`. If you have another plugin that does the job.. Just tell me ;).


How to process/pipe TCPDUMPs output in realtime

If I want to tcpdump DNS requests by clients (on an OpenWrt 10.04 router), then I               root@ROUTER:/etc# tcpdump -n -i br-lan dst port 53 2>&1            tcpdump: verbose output suppressed, use -v or -vv for full protocol decode     listening on br-lan, link-type EN10MB (Ethernet), capture size 96 bytes     22:29:38.989412 IP 192.168.1.200.55919 > 192.168.1.1.53: 5697+ A? foo.org. (25)     22:29:39.538981 IP 192.168.1.200.60071 > 192.168.1.1.53: 17481+ PTR? 150.33.87.208.in-addr.arpa. (44)     ^C     2 packets captured     3 packets received by filter     0 packets dropped by kernel      That's fully ok. But. Why can't I pipe the tcpdumps output in realtime?               root@ROUTER:/etc# tcpdump -n -i br-lan dst port 53 2>&1 | awk '/\?/ {print $3}'     ^C     root@ROUTER:/etc#       If I awk, etc. anything after tcpdump, I don't get ANY output. Why is that? Why can't I process the output of tcpdump with pipelining in realtime? (so that e.g.: in the example in only outputs the 3rd column) Are there any solutions for this?


How do I add Xft suppport to dwm?

I would like to use the inconsolata font in dwm's statusbar. Right now my config.h is set up like so using terminus:               static const char font[] = "-*-terminus-medium-r-normal-*-14-*-*-*-*-*-*-*";      I tried changing that to:               static const char font[] = "-*-inconsolata-medium-r-normal-*-17-*-*-*-*-*-*-*";      But it didn't work. I currently have inconsolata working in urxvt by setting the following line in .Xdefaults:               URxvt.font: xft:inconsolata:size=10      So, I believe the best bet would be to just patch Xft support into dwm, but I can't seem to find a patch anywhere and I'm not sure how to do it myself. Any help would be greatly appreciated. I am currently using dwm 5.8.2. _(At the time of this writing I didn't have enough points to create new tags so I just went with X11 and fonts, please feel free to modify)._


opensuse: cannot install proprietary graphic driver fglrx

I installed OpenSUSE 13.1 in dual boot on my Samsung ATIV Book 6 pre-installed with Windows 8 with a USB key (ultrabook, no DVD reader at the moment). I tried to install the proprietary driver fglrx following every different procedure indicated in http://en.opensuse.org/SDB:AMD_fglrx but after rebooting, I get a black screen. I therefore tried the 1-click procedure, the yast, the zipper command-line and the script from the german fellow. Concerning the last one, the script failed and stated that my graphic card (Radeon HD 8850M) was not compatible. Here is the Xorg log when I booted with fglrx installed and without nomodeset option: http://susepaste.org/88126850


Finding MFLOPS using Linux

How can I find out the Mflops on my linux computer? I can see the bogomips on my /proc/cpuinfo but I don't see any Mflops on that file:               $ cat /proc/cpuinfo | grep -ie mips -ie flops          bogomips    : 3591.29     bogomips    : 3590.96     bogomips    : 3590.96     bogomips    : 3590.96


Does (should) LC_COLLATE affect character ranges?

Collation order through `LC_COLLATE` defines not only the sort order of individual characters, but also the meaning of character ranges. Or does it? Consider the following snippet:               unset LANGUAGE LC_ALL     echo B | LC_COLLATE=en_US grep '[a-z]'      Intuitively, `B` isn't in `[a-z]`, so this shouldn't output anything. That's what happens on Ubuntu 8.04 or 10.04. But on some machines running Debian lenny or squeeze, `B` is found, because the range `a-z` includes everything that's between `a` and `z` in the collation order, including the capital letters `B` through `Z`. All systems tested do have the `en_US` locale generated. I also tried varying the locale: on the machines where `B` is matched above, the same happens in every available locale (mostly latin-based: `{en_{AU,CA,GB,IE,US},fr_FR,it_IT,es_ES,de_DE}{iso8859-1,iso8859-15,utf-8}`, also Chinese locales) except Japanese (in any available encoding) and `C`/`POSIX`. **What do character ranges mean in regular expressions** , when you go beyond ASCII? Why is there a difference between some Debian installations on the one hand, and other Debian installations and Ubuntu on the other? How do other systems behave? Who's right, and who should have a bug reported against? (Note that I'm specifically asking about the behavior of character ranges such as `[a-z]` in `en_US` locales, primarily on GNU libc-based systems. I'm not asking how to match lowercase letters or ASCII lowercase letters.) * * * On two Debian machines, one where `B` is in `[a-z]` and one where it isn't, the output of `LC_COLLATE=en_US locale -k LC_COLLATE` is               collate-nrules=4     collate-rulesets=""     collate-symb-hash-sizemb=1     collate-codeset="ISO-8859-1"      and the output of `LC_COLLATE=en_US.utf8 locale -k LC_COLLATE` is               collate-nrules=4     collate-rulesets=""     collate-symb-hash-sizemb=2039     collate-codeset="UTF-8"


Disable stack protection on Ubuntu for buffer overflow without C compiler flags

I'd like to try some shell codes and I want to disable linux protections. I know I could compile using flags but I know another way exists to disable these protections in general I just can't remember. Can you help me?


Does anyone know if synapse launcher can be installed in Debian?

I am thinking of changing from linux mint cinnamon to linux mint debian cinnamon, but synapse launcher is something I cant work without, but it doesnt seem to be available in Debian. Does anyone know if it is possible to install it and use all the features it offers? Cheers


How can I delete a folder with lots of subfolders fast?

I have a folder with 266778 subfolders. How can I delete it? I have tried               cd ~/.local/share/Trash/     sudo rm -rf *      but it takes much time. After 1 minute 25 seconds real time and 0.072 seconds user time it only deleted 2500 folders. This way, it will take over two hours to delete this folder. Is there a faster way to delete this folder? Why is there such a big difference between user time and real time?               real    1m25.474s     user    0m0.072s     sys     0m28.142s      I use Linux 2.6.32 (Ubuntu 10.04.4 LTS).


Openswan established NATed tunnel but, I can't ping remote end's lan PC

I am establishing site to site tunnel.               192.168.2.0/24===10.103.6.40<10.103.6.40>---10.103.6.1...10.103.6.29<10.103.6.29>===192.168.1.0/24;      Local ip: 10.103.6.40 Local lan: 192.168.2.0/24 Remote lan is behind 10.103.6.29 (router) has lan 10.1.1.0/24. Remote ip: 10.1.1.44 (Behind 10.103.6.29, I have enabled VPN Passthrough) Remote lan: 192.168.1.0/24 Now, Tunnel is established, but i can not ping remote lan's machine on 192.168.1.2. Log of ipsec:               Mar  4 16:34:45 NG authpriv.warn pluto[9431]: listening for IKE messages     Mar  4 16:34:45 NG authpriv.warn pluto[9431]: adding interface br0/br0 192.168.2.1:500     Mar  4 16:34:45 NG authpriv.warn pluto[9431]: adding interface br0/br0 192.168.2.1:4500     Mar  4 16:34:45 NG authpriv.warn pluto[9431]: adding interface eth3/eth3 10.103.6.40:500     Mar  4 16:34:45 NG authpriv.warn pluto[9431]: adding interface eth3/eth3 10.103.6.40:4500     Mar  4 16:34:45 NG authpriv.warn pluto[9431]: adding interface lo/lo 127.0.0.1:500     Mar  4 16:34:45 NG authpriv.warn pluto[9431]: adding interface lo/lo 127.0.0.1:4500     Mar  4 16:34:45 NG authpriv.warn pluto[9431]: adding interface lo/lo ::1:500     Mar  4 16:34:45 NG authpriv.warn pluto[9431]: loading secrets from "/etc/ipsec.secrets"     Mar  4 16:34:46 NG authpriv.warn pluto[9431]: "NG" #1: initiating Main Mode     Mar  4 16:34:46 NG daemon.err ipsec__plutorun: 104 "NG" #1: STATE_MAIN_I1: initiate     Mar  4 16:34:46 NG authpriv.warn pluto[9431]: "NG" #1: received Vendor ID payload [Openswan (this version) 2.6.38 ]     Mar  4 16:34:46 NG authpriv.warn pluto[9431]: "NG" #1: received Vendor ID payload [Dead Peer Detection]     Mar  4 16:34:46 NG authpriv.warn pluto[9431]: "NG" #1: received Vendor ID payload [RFC 3947] method set to=115      Mar  4 16:34:46 NG authpriv.warn pluto[9431]: "NG" #1: enabling possible NAT-traversal with method RFC 3947 (NAT-Traversal)     Mar  4 16:34:47 NG authpriv.warn pluto[9431]: "NG" #1: transition from state STATE_MAIN_I1 to state STATE_MAIN_I2     Mar  4 16:34:47 NG authpriv.warn pluto[9431]: "NG" #1: STATE_MAIN_I2: sent MI2, expecting MR2     Mar  4 16:34:47 NG authpriv.warn pluto[9431]: "NG" #1: NAT-Traversal: Result using draft-ietf-ipsec-nat-t-ike (MacOS X): peer is NATed     Mar  4 16:34:47 NG authpriv.warn pluto[9431]: "NG" #1: transition from state STATE_MAIN_I2 to state STATE_MAIN_I3     Mar  4 16:34:47 NG authpriv.warn pluto[9431]: "NG" #1: STATE_MAIN_I3: sent MI3, expecting MR3     Mar  4 16:34:47 NG authpriv.warn pluto[9431]: "NG" #1: received Vendor ID payload [CAN-IKEv2]     Mar  4 16:34:47 NG authpriv.warn pluto[9431]: "NG" #1: Main mode peer ID is ID_IPV4_ADDR: '10.103.6.29'     Mar  4 16:34:47 NG authpriv.warn pluto[9431]: "NG" #1: transition from state STATE_MAIN_I3 to state STATE_MAIN_I4     Mar  4 16:34:47 NG authpriv.warn pluto[9431]: "NG" #1: STATE_MAIN_I4: ISAKMP SA established {auth=OAKLEY_PRESHARED_KEY cipher=aes_128 prf=oakley_md5 group=modp1024}     Mar  4 16:34:47 NG authpriv.warn pluto[9431]: "NG" #1: Dead Peer Detection (RFC 3706): enabled     Mar  4 16:34:47 NG authpriv.warn pluto[9431]: "NG" #2: initiating Quick Mode PSK+ENCRYPT+TUNNEL+PFS+UP+IKEv2ALLOW+SAREFTRACK {using isakmp#1 msgid:f5d74d20 proposal=AES(12)_128-MD5(1)_128, AES(12)_192-MD5(1)_128, AES(12)_256-MD5(1)_128, AES(12)_128-SHA1(2)_160, AES(12)_192-SHA1(2)_160, AES(12)_256-SHA1(2)_160, 3DES(3)_192-MD5(1)_128, 3DES(3)_192-SHA1(2)_160 pfsgroup=OAKLEY_GROUP_MODP1024}     Mar  4 16:34:49 NG authpriv.warn pluto[9431]: "NG" #2: Dead Peer Detection (RFC 3706): enabled     Mar  4 16:34:49 NG authpriv.warn pluto[9431]: "NG" #2: transition from state STATE_QUICK_I1 to state STATE_QUICK_I2     Mar  4 16:34:49 NG authpriv.warn pluto[9431]: "NG" #2: STATE_QUICK_I2: sent QI2, IPsec SA established tunnel mode {ESP=>0x9143bd7d <0x1cb79f9a xfrm=AES_128-HMAC_MD5 NATOA=none NATD=10.103.6.29:4500 DPD=enabled}      Tunnel is established successfully. local configuration (At 10.103.6.40 side):               config setup         nat_traversal=yes         oe=off         protostack=netkey          conn NGpassthrough         left=192.168.2.1         right=0.0.0.0         leftsubnet=192.168.2.0/24         rightsubnet=192.168.2.0/24         authby=never         type=passthrough         auto=route          conn NG         right=10.103.6.29         rightsubnet=192.168.1.0/24         left=10.103.6.40         leftsubnet=192.168.2.0/24         leftnexthop=10.103.6.1         auto=start         leftid=10.103.6.40         rightid=10.103.6.29         #x_rightdynamic=yes         authby=secret         compress=no         failureshunt=drop         dpddelay=15         dpdtimeout=60         dpdaction=restart         pfs=yes         ike=aes128-md5-modp1024,aes192-md5-modp1024,aes256-md5-modp1024,aes128-sha1-modp1024,aes192-sha1-modp1024,aes256-sha1-modp1024,3des-md5-modp1024,3des-sha1-modp1024,aes128-md5-modp1536,aes192-md5-modp1536,aes256-md5-modp1536,aes128-sha1-modp1536,aes192-sha1-modp1536,aes256-sha1-modp1536,3des-md5-modp1536,3des-sha1-modp1536,aes128-md5-modp2048,aes192-md5-modp2048,aes256-md5-modp2048,aes128-sha1-modp2048,aes192-sha1-modp2048,aes256-sha1-modp2048,3des-md5-modp2048,3des-sha1-modp2048         esp=aes128-md5,aes192-md5,aes256-md5,aes128-sha1,aes192-sha1,aes256-sha1,3des-md5,3des-sha1      Remote Configuartion (At 10.1.1.44 side):               config setup         nat_traversal=yes         oe=off         protostack=netkey          conn NGpassthrough         left=192.168.1.1         right=0.0.0.0         leftsubnet=192.168.1.0/24         rightsubnet=192.168.1.0/24         authby=never         type=passthrough         auto=route          conn NG         right=10.103.6.40         rightsubnet=192.168.2.0/24         left=10.1.1.44         leftsubnet=192.168.1.0/24         leftnexthop=10.1.1.1         auto=start         leftid=10.103.6.29         rightid=10.103.6.40         #x_rightdynamic=yes         authby=secret         compress=no         failureshunt=drop         dpddelay=15         dpdtimeout=60         dpdaction=restart         pfs=yes         ike=aes128-md5-modp1024,aes192-md5-modp1024,aes256-md5-modp1024,aes128-sha1-modp1024,aes192-sha1-modp1024,aes256-sha1-modp1024,3des-md5-modp1024,3des-sha1-modp1024,aes128-md5-modp1536,aes192-md5-modp1536,aes256-md5-modp1536,aes128-sha1-modp1536,aes192-sha1-modp1536,aes256-sha1-modp1536,3des-md5-modp1536,3des-sha1-modp1536,aes128-md5-modp2048,aes192-md5-modp2048,aes256-md5-modp2048,aes128-sha1-modp2048,aes192-sha1-modp2048,aes256-sha1-modp2048,3des-md5-modp2048,3des-sha1-modp2048         esp=aes128-md5,aes192-md5,aes256-md5,aes128-sha1,aes192-sha1,aes256-sha1,3des-md5,3des-sha1      Firewall rule on 10.103.6.29:               -A PREROUTING -p udp -m udp --dport 500 -j DNAT --to-destination 10.1.1.44:500      -A PREROUTING -p udp -m udp --dport 4500 -j DNAT --to-destination 10.1.1.44:4500       I have two pc's at both end. On local side PC has ip 192.168.2.2 and at remote side PC has ip 192.168.1.2. I CAN PING REMOTE ROUTER (192.168.1.1) but, can't access/ping remote lan PC (192.168.1.2). Help me please.


Bash is automatically reloading (injecting) updates into a running script upon saving it: Why? Any practical use?

I was writing a bash script, and happened to updated the code (saved the script file to disk) while the script was waiting for some input in a `while` loop. After I returned to the terminal and continued with the previous invocation of the script, bash gave an error about the file syntax:               /home/aularon/bin/script: line 58: unexpected EOF while looking for matching `"'     /home/aularon/bin/script: line 67: syntax error: unexpected end of file      So I tried doing the following: **1st:** create a script, `self-update.sh` let's call it:               #!/bin/bash     fname=$(mktemp)     cat $0 | sed 's/BEFORE\./AFTER!./' > $fname     cp $fname $0     rm -f $fname     echo 'String: BEFORE.';      What the script does is reading its code, changing the word 'BEFORE' into 'AFTER', then re-write itself with the new code. **2nd** Run it:               chmod +x self-update.sh     ./self-update.sh      **3rd** wonder...               aularon@aularon-laptop:~$ ./self-update.sh      String: AFTER!.      Now, I wouldn't have guessed that on the same invocation it would output _AFTER!_ , on the second run for sure, but not on the first one. So my question is: is it intentional (by design)? or it is because of the way bash runs the script? Line by line or command by command. Is there any good use of such behaviour? Any example of it? * * * **Edit:** I tried reformatting the file to put all command in one line, it does not work now:               #!/bin/bash     fname=$(mktemp);cat $0 | sed 's/BEFORE\./AFTER!./' > $fname;cp $fname $0;rm -f $fname;echo 'String: BEFORE.';      Output:               aularon@aularon-laptop:~$ ./self-update.sh #First invocation     String: BEFORE.     aularon@aularon-laptop:~$ ./self-update.sh #Second invocation     String: AFTER!.      While when moving the `echo` string to the next line, separating it from the rewriting (`cp`) call:               #!/bin/bash     fname=$(mktemp);cat $0 | sed 's/BEFORE\./AFTER!./' > $fname;cp $fname $0;rm -f $fname;     echo 'String: BEFORE.';      And now it works again:               aularon@aularon-laptop:~$ ./self-update.sh      String: AFTER!.


Make custom iso debian file

I tried to create a custom distribution based on debian, after reading debian document, I found preseed file that can generate debian with preconfigured parameters. But this is not enough for me, because I need to add some packages with their dependencies in the generated iso file, and I need to script execution after installation of my custom debian, this script can compile and install my software with a shell script. How to do it?


Bash: change variable defined at top of script

At the top of my script I have some variables defined like so               # Start Variables     defaultmap="de_dust2"     port="27015"     sourcetvport="27020"     clientport="27005"     maxplayers="16"     ip="0.0.0.0"     parms="-game csgo -usercon +map ${defaultmap} -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} -maxplayers ${maxplayers}"      I have a function fn_`autoip` that is designed to change `${ip}` if it is set to `0.0.0.0` to the network card IP (somthing like 192.168.1.2). However it is not changing this. My guess is that it is not changing `${ip}` because is is within another variable `${parms}` that was already defined when `${ip}` was `0.0.0.0`. This is how it is executed:               fn_debugserver(){     fn_autoip     ${executable} ${parms}     }      Is there a way where `${parms}` can be 'reloaded' with the new `${ip}` from `fn_autoip`? This is from my project on GitHub


Redirect output half-way through a script, and restore later

I would like to re-direct stdout half-way through a script. How can I do this in Zsh?               # Do something     # ...           # Redirect stdout to a file (e.g. foo.txt)     for x in *;     print $x;     done     # Re-direct stdout back to default          # Do something else     # ...


How do I get the shell on the screen?

I'm completely new to Linux. I've googled but I can't find the keyboard shortcut command for this anywhere. I tried Ctrl-Alt-F3 from the graphical desktop, but it takes me to a login screen. Back on the desktop, I went to open bash through the GUI but it did nothing at all. This is so frustrating. I'm running "Debian GNU/Linux 6.0.6 alias squeeze" inside VirtualBox for Windows, from here, and it has two sets of login details: http://virtualboxes.org/images/debian/ Also: I remember seeing someone pull-up the shell over a graphical desktop, almost like Alt-tabbing in Windows but with the text overlaid on the desktop with a semi-transparent black background. Is this possible for Debian?


Equivalent of openvswitch-brcompat on Fedora/RHEL/CentOS

On Debian & Ubuntu, the openvswitch-brcompat package will install Open vSwitch bridge compatibility support. Is there an equivalent package on Fedora-based distros like RHEL and CentOS?


bash_completion not working (for some commands)

I have new installation of Debian Wheezy, and I have noticed `bash_completion` does not work for some commands. For example, it works for `ping`, but not for `host` (both `ping` and `host` should complete hostnames from `/etc/hosts`). Further, I have noticed that unlike previous version of Debian (Squeeze), the bash completion settings are no longer stored as separate files in `/etc/bash_completion.d`, but rather as one file in `/usr/share/bash- completion/bash_completion`. Looks like the infrastructure has been changed. Could somebody please advise how to make `bash_completion` work for the `host` command?


Setting up traffic for GRE Tunnel

I want to set up clients that are behind NAT with a public IP but allow them to have one or more public IP's on their device. The idea is to have a linux box with either 1 or two network cards. Lets take two for simplicity. Router1 Loop back interface: 100.100.100.1/30 Router1 if1 - 100.100.100.5/30 Router1 static route: 172.16.50.0/24 via 100.100.100.6 Router1 static route: 172.16.50.0/24 via 100.100.100.6 VPN_Server1: 100.100.100.6/30 Linux_box1 with two interfaces: eth0: DHCP from router (IP will most likely be 192.168.1.10/24 with default GW of 192.168.1.1) eth1: 100.100.100.129/25 PPTP/L2TP or some other sort of protocol that will connect to the VPN server with. The VPN servers IP will say be 172.16.50.1 and the Linux box will have 172.16.50.2. I will then set up a GRE tunnel between 172.16.50.1 and 100.100.100.1. The over all goal that I am trying to do is give clients a device that will be as if they are with me in the data center. They will connect a server to Linux_box1 as a router and go out to the internet. There is one other scenario where the Linux box will have a public IP however it wont be static from the ISP so it will still need the tunnel. However in this case there is no point in sending back the traffic via the tunnel. We would simply send it out to the internet.


Error building Oracle client 11g R2 on RHEL 5.5

We are trying to install oracle 11g R2 64 bit in Rhel 5.5 machine ( 64 bit ). Kernel version is 2.6.18-194.el5. We are getting the below error while installation.               error in  invoking target 'mkldflags ntcontab.o nnfgt.o' of makefile '/home/oracle/app/product/11.2.0/network/lib/ins_net_client.mk'.     See '/home/oracle/oraInventory/logs/installAction2013-09-03_04-52-05PM.log' for details.      We have installed all necessary library packages.               binutils-2.17.50.0.6-14.el5.x86_64     compat-libstdc++-33-3.2.3-61.x86_64     compat-libstdc++-33-3.2.3-61.i386     elfutils-libelf-0.137-3.el5.x86_64     elfutils-libelf-0.137-3.el5.i386     elfutils-libelf-devel-static-0.137-3.el5.x86_64     elfutils-libelf-devel-static-0.137-3.el5.i386      elfutils-libelf-devel-0.137-3.el5.x86_64     elfutils-libelf-devel-0.137-3.el5.i386     gcc-4.1.2-48.el5.x86_64     gcc-c++-4.1.2-48.el5.x86_64     glibc-2.5-49.x86_64     glibc-2.5-49.i686     glibc-common-2.5-49.x86_64     glibc-devel-2.5-49.x86_64     glibc-devel-2.5-49.i386     glibc-headers-2.5-49.x86_64     ksh-20100202-1.el5.x86_64     libaio-0.3.106-5.x86_64     libaio-0.3.106-5.i386     libaio-devel-0.3.106-5.x86_64     libaio-devel-0.3.106-5.i386     libgcc-4.1.2-48.el5.x86_64     libgcc-4.1.2-48.el5.i386     libstdc++-4.1.2-48.el5.x86_64     libstdc++-4.1.2-48.el5.i386      libstdc++44-devel-4.4.0-6.el5.x86_64     libstdc++44-devel-4.4.0-6.el5.i386     libstdc++-devel-4.1.2-48.el5.x86_64      libstdc++-devel-4.1.2-48.el5.i386      make is already installed:               make-3.81-3.el5.x86_64      Contents of log file:               INFO: Calling Query fileQueries10.1.0.3.0  exists          filename = /home/oracle/app/product/11.2.0/rdbms/lib/libknlopt.a     INFO: Query Returned: false     INFO: Calling Action unixActions10.2.0.3.0  registerForMake             installMakePath = /usr/bin/make             installMakeFileName = /home/oracle/app/product/11.2.0/network/lib/ins_nau.mk             installTarget = ioklist             installArguments = ORACLE_HOME=/home/oracle/app/product/11.2.0             undoMakeFileName = null             undoTarget = null             undoArguments = null             logFile = /home/oracle/app/product/11.2.0/install/make.log             progMsg = Linking Adapters          INFO: Calling Action unixActions10.2.0.3.0  registerForMake             installMakePath = /usr/bin/make             installMakeFileName = /home/oracle/app/product/11.2.0/network/lib/ins_nau.mk             installTarget = iokinit             installArguments = ORACLE_HOME=/home/oracle/app/product/11.2.0             undoMakeFileName = null             undoTarget = null             undoArguments = null             logFile = /home/oracle/app/product/11.2.0/install/make.log             progMsg = Linking Adapters          INFO: Calling Action unixActions10.2.0.3.0  registerForMake             installMakePath = /usr/bin/make             installMakeFileName = /home/oracle/app/product/11.2.0/network/lib/ins_nau.mk             installTarget = iokdstry             installArguments = ORACLE_HOME=/home/oracle/app/product/11.2.0             undoMakeFileName = null             undoTarget = null             undoArguments = null             logFile = /home/oracle/app/product/11.2.0/install/make.log             progMsg = Linking Adapters          INFO: Linking 'Oracle Database Utilities 11.2.0.3.0 '     INFO: Linking 'Oracle Database Utilities 11.2.0.3.0 '     INFO: 9/3/13 4:54:07 PM IST: Starting install Link Phase of component Oracle Database Utilities     INFO: Calling Action unixActions10.2.0.3.0  registerForMake             installMakePath = /usr/bin/make             installMakeFileName = /home/oracle/app/product/11.2.0/rdbms/lib/ins_rdbms.mk             installTarget = utilities             installArguments = ORACLE_HOME=/home/oracle/app/product/11.2.0             undoMakeFileName = null             undoTarget = null             undoArguments = null             logFile = /home/oracle/app/product/11.2.0/install/make.log             progMsg = Linking Utilities Executables          INFO: Linking 'SQL*Plus 11.2.0.3.0 '     INFO: Linking 'SQL*Plus 11.2.0.3.0 '     INFO: 9/3/13 4:54:07 PM IST: Starting install Link Phase of component SQL*Plus     INFO: Calling Action unixActions10.2.0.3.0  registerForMake             installMakePath = /usr/bin/make             installMakeFileName = /home/oracle/app/product/11.2.0/sqlplus/lib/ins_sqlplus.mk             installTarget = install             installArguments = ORACLE_HOME=/home/oracle/app/product/11.2.0             undoMakeFileName = null             undoTarget = null             undoArguments = null             logFile = /home/oracle/app/product/11.2.0/install/make.log             progMsg = Linking SQLPLUS Executables          INFO: Linking 'Oracle Programmer 11.2.0.3.0 '     INFO: Linking 'Oracle Programmer 11.2.0.3.0 '     INFO: 9/3/13 4:54:07 PM IST: Starting install Link Phase of component Oracle Programmer     INFO: Linking 'Oracle Internet Directory Client 11.2.0.3.0 '     INFO: Linking 'Oracle Internet Directory Client 11.2.0.3.0 '     INFO: 9/3/13 4:54:07 PM IST: Starting install Link Phase of component Oracle Internet Directory Client     INFO: Calling Action unixActions10.2.0.3.0  registerForMake             installMakePath = /usr/bin/make             installMakeFileName = /home/oracle/app/product/11.2.0/ldap/lib/ins_ldap.mk             installTarget = clientonlyinstall             installArguments = ORACLE_HOME=/home/oracle/app/product/11.2.0             undoMakeFileName = null             undoTarget = clientonlyinstall             undoArguments = ORACLE_HOME=/home/oracle/app/product/11.2.0             logFile = /home/oracle/app/product/11.2.0/install/make.log             progMsg = Linking OID Client          INFO: Calling Action unixActions10.2.0.3.0  registerForMake             installMakePath = /usr/bin/make             installMakeFileName = /home/oracle/app/product/11.2.0/ldap/lib/ins_ldap.mk             installTarget = clientonlyinstall             installArguments = ORACLE_HOME=/home/oracle/app/product/11.2.0             undoMakeFileName = /home/oracle/app/product/11.2.0/ldap/lib/ins_ldap.mk             undoTarget = clientonlyinstall             undoArguments = ORACLE_HOME=/home/oracle/app/product/11.2.0             logFile = /home/oracle/app/product/11.2.0/install/make.log             progMsg = Linking Client-only Install          INFO: Linking 'SQLJ Runtime 11.2.0.3.0 '     INFO: Linking 'SQLJ Runtime 11.2.0.3.0 '     INFO: 9/3/13 4:54:07 PM IST: Starting install Link Phase of component SQLJ Runtime     INFO: Linking 'Oracle SQLJ 11.2.0.3.0 '     INFO: Linking 'Oracle SQLJ 11.2.0.3.0 '     INFO: 9/3/13 4:54:07 PM IST: Starting install Link Phase of component Oracle SQLJ     INFO: Linking 'Oracle Client 11.2.0.3.0 '     INFO: Linking 'Oracle Client 11.2.0.3.0 '     INFO: 9/3/13 4:54:07 PM IST: Starting install Link Phase of component Oracle Client     INFO: Linking in progress     INFO: Linking in progress     INFO: Link Phase JRE files in Scratch :0     INFO: Calling Action unixActions10.2.0.3.0  make             registerOnly = false             installMakePath = /usr/bin/make             installMakeFileName = /home/oracle/app/product/11.2.0/network/lib/ins_net_client.mk             installTarget = mkldflags ntcontab.o nnfgt.o             undoMakeFileName =             installArguments = ORACLE_HOME=/home/oracle/app/product/11.2.0             logFile = /home/oracle/app/product/11.2.0/install/make.log             undoTarget =             progMsg = Linking ldflags Executables          INFO: Linking ldflags Executables     INFO: Linking ldflags Executables     INFO: The output of this make operation is also available at: '/home/oracle/app/product/11.2.0/install/make.log'     INFO:          INFO: Start output from spawned process:     INFO: ----------------------------------     INFO:          INFO: rm -f ntcontab.*          INFO: (if [ "compile" = "compile" ] ; then \               /home/oracle/app/product/11.2.0/bin/gennttab > ntcontab.c ;\               /usr/bin/gcc -m32  -m32  -fPIC -c ntcontab.c ;\               rm -f /home/oracle/app/product/11.2.0/lib/ntcontab.o ;\               mv ntcontab.o /home/oracle/app/product/11.2.0/lib/ ;\               /usr/bin/ar rv /home/oracle/app/product/11.2.0/lib/libn11.a /home/oracle/app/product/11.2.0/lib/ntcontab.o ; fi)          INFO: /bin/sh: line 2: /usr/bin/gcc: No such file or directory          INFO: mv: cannot stat `ntcontab.o'     INFO: : No such file or directory          INFO: /usr/bin/ar: /home/oracle/app/product/11.2.0/lib/ntcontab.o: No such file or directory          INFO: make: *** [ntcontab.o] Error 1          INFO: End output from spawned process.     INFO: ----------------------------------     INFO: Exception thrown from action: make     Exception Name: MakefileException     Exception String: Error in invoking target 'mkldflags ntcontab.o nnfgt.o' of makefile '/home/oracle/app/product/11.2.0/network/lib/ins_net_client.mk'. See '/home/oracle/oraInventory/logs/installActions2013-09-03_04-52-05PM.log' for details.     Exception Severity: 1     INFO: Adding ExitStatus STOP_INSTALL to the exit status set     INFO: Finding the most appropriate exit status for the current application     INFO: Exit Status is -4     INFO: Shutdown Oracle Client Installer      Kindly let us know what is the solution for this error.


Local mail not arriving when sending external mail through an external SMTP server

I am in the process of setting up postfix. I want it to send external mails through a GMail account and have followed the tutorial: http://rtcamp.com/wordpress-nginx/tutorials/linux/ubuntu-postfix-gmail-smtp/ It works fine when I am sending external mails! However, when I try to send a local mail to myself:               test@desktop1204test:~$ echo "The body 1" | mail -s "Local to me" test      I get this unwanted result in /var/log/mail.log (only the 14:56 lines are relevant)               test@desktop1204test:~$ tail -n 6 /var/log/mail.log      Sep  4 14:54:52 desktop1204test postfix/qmgr[3982]: 82DE9EFC4: removed     Sep  4 14:56:50 desktop1204test postfix/pickup[3983]: DE7B9CB21: uid=1000 from=<test>     Sep  4 14:56:50 desktop1204test postfix/cleanup[4565]: DE7B9CB21: message-id=<20130904125650.DE7B9CB21@desktop1204test.localdomain>     Sep  4 14:56:50 desktop1204test postfix/qmgr[3982]: DE7B9CB21: from=<test@desktop1204test.localdomain>, size=398, nrcpt=1 (queue active)     Sep  4 14:56:52 desktop1204test postfix/smtp[4567]: DE7B9CB21: to=<test@desktop1204test.localdomain>, orig_to=<test@desktop1204test>, relay=smtp.gmail.com[74.125.143.108]:587, delay=1.9, delays=0.02/0.01/0.85/1.1, dsn=2.0.0, status=sent (250 2.0.0 OK 1378299412 f17sm10560634lbo.12 - gsmtp)     Sep  4 14:56:52 desktop1204test postfix/qmgr[3982]: DE7B9CB21: removed      It seems like it is letting smtp.gmail.com handle the message sending _even though_ I am sending a local mail. I have `relayhost = [smtp.gmail.com]:587` in my `main.cf`, but looking at the documentation for relayhost it says: > The next-hop destination of non-local mail; overrides non-local domains in > recipient addresses. And I am sending a local mail... Here is my `/etc/postfix/main.cf`:               # TLS parameters     smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem     smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key     smtpd_use_tls=yes     smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache     smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache          # See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for     # information on enabling SSL in the smtp client.          alias_maps = hash:/etc/aliases     alias_database = hash:/etc/aliases     mydestination = desktop1204test.farm, desktop1204test, localhost.localdomain, localhost     relayhost = [smtp.gmail.com]:587     mynetworks = loopback-only     mailbox_size_limit = 0     recipient_delimiter = +     inet_interfaces = loopback-only          # From tutorial     smtp_sasl_auth_enable = yes     smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd     smtp_sasl_security_options = noanonymous     smtp_tls_CAfile = /etc/postfix/cacert.pem     smtp_use_tls = yes      # Questions   1. Why is this happening and how do I fix it?   2. I have never used local mail before. The only way I check if I got any mail is by issuing `biff y` when logged in as the `test` user. Is it enough or do I have to check it some other way? I just want to see if the mail arrived, to have a MUA installed is less important at the moment.


How does RPM handle file locations?

I am trying to create a .spec file for creating mapserver as an rpm package. I am building on an RHEL6 64-bit server. I am a bit new to the whole concept, so bear with me if I am not seeing something very obvious. In rpm files I can use some dir references like `%{_libdir}`, `%{_bindir}` and `%{_libexecdir}`. Where are these dir paths configured, and which can be used? The %files part of my rpm spec looks lige this:               %files     %defattr(-,root,root)     %doc README COMMITERS GD-COPYING HISTORY.TXT     %doc INSTALL MIGRATION_GUIDE.txt     %doc symbols tests     %doc fonts     %{_bindir}/*     %{_libdir}/libmapserver*.so     %{_libexecdir}/mapserv      but when I run my build I get the errors:               File not found by glob: /home/kfadm/rpmbuild/BUILDROOT/mapserver-6.2.1-3.x86_64/usr/lib64/libmapserver*.so     File not found: /home/kfadm/rpmbuild/BUILDROOT/mapserver-6.2.1-3.x86_64/usr/libexec/mapserv      It seems like the files that are missing are insted located in               /home/kfadm/rpmbuild/BUILDROOT/mapserver-6.2.1-3.x86_64/usr/lib/libmapserver-6.2.1.so     /home/kfadm/rpmbuild/BUILDROOT/mapserver-6.2.1-3.x86_64/usr/lib/libmapserver.la     /home/kfadm/rpmbuild/BUILDROOT/mapserver-6.2.1-3.x86_64/usr/lib/libmapserver.so     /home/kfadm/rpmbuild/BUILDROOT/mapserver-6.2.1-3.x86_64/usr/lib/debug/usr/lib/libmapserver-6.2.1.so.debug     /home/kfadm/rpmbuild/BUILDROOT/mapserver-6.2.1-3.x86_64/usr/lib/debug/usr/lib/libmapserver.so.debug          /home/kfadm/rpmbuild/BUILDROOT/mapserver-6.2.1-3.x86_64/usr/bin/mapserv     /home/kfadm/rpmbuild/BUILDROOT/mapserver-6.2.1-3.x86_64/var/www/cgi-bin/mapserv      How do I fix the rpm spec to find the files at the correct path?


Can I set defaults for rsync in non daemon mode? I know the daemon mode has this configuration file: `/etc/rsyncd.conf` But I typically use the non daemon version in this sort of manner:               rsync -avzcO --exclude-from=/path/to/rsync/exclude/list {from...} {to...}      Is there a way that I can set those flags to be defaults? I'm using `rsync version 2.6.9 protocol version 29` but I am happy to install a newer version if it has support for a default configuration file. I suppose I could setup an `alias` but it just seems strange if there really is not a config file.


service vs. initctl in Ubuntu

Why are some deamons run out of `service` and some out of `initctl` in Ubuntu? Do both tools do the same thing and it is just a matter of personal preference of the user what they will use? E.g.               sudo service --status-all      vs               sudo initctl list      In my particular instance `cron` runs out of `initctl`, and `ssh` runs out of `service`. But on Fedora, for example, both of those will be in `systemctl`.


Is it possible to change the key binding for completion in bash shell?

For `bash`, I would to modify the tab key for completion to the escape key. I know that key bindings are defined in `/etc/inputrc`. But I don't know if something like this could work:               `"\e" : complete`      I want to do that because my users were from Solaris where the escape key does the auto-completion.


intel-virtual-output for openSUSE 13.1

Where can I find the binaries for the intel-virtual-output tool for openSUSE 13.1? My Google-FU terribly failed me on this one and I have no idea how to compile it by myself (Source: http://cgit.freedesktop.org/xorg/driver/xf86-video- intel/tree/tools)


XFCE: image as whole applications menu button, not just icon

This is what I want for my applications menu, the whole thing, not just the icon that should sit behind the optional text: ![](http://i.stack.imgur.com/UMRA0.png) What I get when I change the icon is: ![](http://i.stack.imgur.com/hsIKk.png) But what I want is this (edited in GIMP): ![](http://i.stack.imgur.com/QwsC6.png) How do I achieve this? Thanks.


unable to back-up data from android tablet to laptop using tar!

I'm using `tar` to back-up data from my android tablet to laptop. But it is showing some error.               ravbholua@ravbholua-Aspire-5315:/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/9$ tar -cvf /media/ravbholua/f34890dd-20d2-4d78-92c9-1de7c0957f00/jackal.tar .     ./     tar: ./33: Cannot open: Operation not supported     tar: ./34: Cannot open: Operation not supported     tar: ./35: Cannot open: Operation not supported     tar: ./36: Cannot open: Operation not supported     tar: ./37: Cannot open: Operation not supported     tar: ./38: Cannot open: Operation not supported     ./50/     ./50/62/     tar: ./50/209: Cannot open: Operation not supported     tar: ./50/210: Cannot open: Operation not supported     tar: ./50/211: Cannot open: Operation not supported     tar: ./50/216: Cannot open: Operation not supported     tar: ./50/217: Cannot open: Operation not supported     tar: ./50/218: Cannot open: Operation not supported     ./50/236/     ./50/249/     tar: ./50/903: Cannot open: Operation not supported     tar: ./50/904: Cannot open: Operation not supported     tar: ./50/905: Cannot open: Operation not supported     tar: ./50/906: Cannot open: Operation not supported     tar: ./50/907: Cannot open: Operation not supported          ravbholua@ravbholua-Aspire-5315:/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/9$ sudo tar -cvf /media/ravbholua/f34890dd-20d2-4d78-92c9-1de7c0957f00/jackal.tar .     [sudo] password for ravbholua:      tar: .: Cannot stat: Permission denied     tar: Exiting with failure status due to previous errors      (I'm unable to take back-up from nautilus even as clear from this thread) (I would like to add that the file names aren't displayed clearly in my laptop for the android files in the terminal. I've this thread regarding this.) ### EDIT I used `rsync` command but the same error.               ravbholua@ravbholua-Aspire-5315:/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50$ rsync -avz ./ ~/Dow*     sending incremental file list     ./     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/1078": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/1079": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/1080": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/1081": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/1082": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/1083": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/1085": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/1086": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/1087": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/1088": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/1089": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/1090": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/1091": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/1094": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/1103": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/1154": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/1155": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/1156": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/1157": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/1158": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/1159": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/1160": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/1161": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/1162": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/1171": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/1172": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/1278": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/1279": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/1280": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/1282": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/1283": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/1284": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/1285": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/1286": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/1287": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/1397": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/1398": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/1399": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/1400": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/1401": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/1402": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/1403": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/1404": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/1405": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/1406": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/1407": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/1408": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/1409": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/1501": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/1512": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/1635": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/1645": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/1646": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/1647": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/1650": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/1655": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/1656": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/1657": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/1660": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/1661": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/1662": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/1663": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/1664": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/1665": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/1666": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/1667": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/1668": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/1669": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/1670": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/1671": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/1675": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/1676": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/209": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/210": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/211": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/216": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/217": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/218": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/2841": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/2842": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/2849": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/2850": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/2851": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/3118": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/903": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/904": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/905": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/906": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/907": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/910": Operation not supported (95)     1096/     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/1096/1102": Operation not supported (95)     1636/     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/1636/1637": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/1636/1638": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/1636/1639": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/1636/1640": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/1636/1641": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/1636/1642": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/1636/1643": Operation not supported (95)     rsync: send_files failed to open "/run/user/ravbholua/gvfs/mtp:host=%5Busb%3A002%2C003%5D/65537/50/1636/1644": Operation not supported (95)     236/     249/     62/          sent 2096 bytes  received 1916 bytes  2674.67 bytes/sec     total size is 2364535131  speedup is 589365.69     rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1070) [sender=3.0.9]


What is the best way to find directories that exactly match a string irrespective of the path?

Suppose I have the directories:               /foo/     /A/B/C/foo/D/E/     /F/foo/G/H/foo/I/      How can get a result that lists all the directories whose basename exactly matches a given string (for example `foo` in here)?               /foo/     /A/B/C/foo/     /F/foo/     /F/foo/G/H/foo/


Web access through a remote proxy accessed over SSH

I'm browsing the web on a client PC running Windows or Linux. I want to browse a website (`http://access.lan:52050//cgi-bin/login.cgi`) which is not directly accessible from my PC.   * I can browse the website if I go through a proxy machine. Its IP address is 192.168.1.1. It's running Red Hat Linux.   * I can log in to the Red Hat machine from my client PC with SSH version 1. How can I set this up in a simple way?


How can I reduce a video's size with ffmpeg?

How can I use `ffmpeg` to reduce the size of a video by lowering the quality (as minimally as possible, naturally, but I need it to run on a mobile device that doesn't have much available space)? I forgot to write one thing yet. When the video can use subtitles (*.srt or *.sub) I'd like to convert them too to fit the parameters of converted video file.


How to totally fork a shell command that is using redirection

I've written quite a few shell scripts over the years (but I'm certainly not a sysadmin) and there's something that always caused me troubles: how can I fork a shell command immune to hangups in the background from a _Bash_ script? For example if I have this:               command_which_takes_time input > output      How can I "nohup" and fork this? The following doesn't seem to do what I want:               nohup command_which_takes_time input > output &      What is the syntax I am looking for and what am I not understanding?


What is Fedora's equivalent of 'apt-get purge'?

In Debian, there's at least two ways to delete a package:   * `apt-get remove pkgname`   * `apt-get purge pkgname` The first preserves system-wide config files (i.e. those found in " **/etc** "), while the second doesn't. What is Fedora's equivalent of the second form, `purge`? Or maybe I should rather ask if `yum remove pkgname` actually preserves config files.


Resizing logical volume with no free extents but with free disk space

I have a 7.9 TB logical volume formatted with XFS filesystem. I have 8 1 TB RAID devices as physical volumes, and 1 volume group that contains all of these devices. I have 2.5 TB free space on my logical volume. I'd like to remove 2 of the 1 TB devices from the volume group since I don't "need" them anymore. Reading the man page of pvmove, it seems like I would need to create at least 5.5 TB of space and pvmove everything from the current 1 TB volumes onto the new volumes, and then remove all 8 of the original volumes from the logical volume. This seems onerous. Any suggestions?


How does one make x-screensavers work with mate-screensaver?

I am currently using Linux Mint - Mate Edition. I much prefer the mate- screensaver lock-screen so I refuse to use x-screensaver b/c its lock-screen is just hideous. I have learned elsewhere on the internet that one can use x-screensavers on mate-screensaver merely by editing the .desktop files. However, the image manipulating ones do not work b/c the x-screensaver daemon normally takes a screenshot of the active desktop and then hands it to the screensaver to use and therefore this does not work when using such screen-savers with the mate- screensaver. How can I make them work properly? (by taking a screenshot first and then using it)


Laptop running ~30° hotter than normal; CPU/Load is reportedly normal. What could cause this and how can I diagnose it?

I'm running the latest Arch Linux on my ThinkPad t420 laptop, and am having an intermittent heat problem where my temp will rise from the typical ~45°C to ~75-90°C, and stay there until I reboot. I've run several diagnostic tools, including the obvious `htop` and others that googling has suggested, including `powertop`, `iostats`, and surely others I don't recall. So far I've come up with no obvious issues, and ostensibly no differences in readouts whether my machine is running normally or in this hot state. I've also killed most suspicious processes one by one (databases and other daemons), hoping to find the hidden culprit, to no avail. Beyond these attempts, **I don't know where to begin troubleshooting**. I'm hoping someone could point me in the right direction to begin looking for the deeper issue. ### To be precise, my question is not how to cool my machine, but rather what could cause a consistent 30+ degree heat change in a system where (reportedly) CPU and load is normal? And what tools/practices could I use to diagnose it? Some notes that might be helpful:   * I **can** cool the system (e.g. by disengaging the fan control completely), but it immediately heats up again if left alone. This seems to suggest that heat retention is not an issue, but rather _something_ is continually generating heat.   * CPU usage and load are reported by `htop` as normal after entering this hot state. This includes kernel threads. According to `htop`, the system is essentially idle (1-2% sytem wide CPU usage, a load of 0.10).   * My machine uses Intel HD integrated graphics, and _has no other graphics card_. An nVidia card was an option for this model, as noted by @braiam; I did not opt for it.   * @terdon brought up the CPU governor settings. My CPUs are set to `powersave`   * My specific processor is a 2.7GHz Core i7-2620M. **Edit** : At the time of writing this question, my fancontrol was not functioning properly and ran continually at a middle RPM range (3900 RPMs), even at high temps. At the suggestion of @Alex and @JustDanyul, this has been fixed. The underlying problem, however, still remains.


I'm trying to set up automatic SSH hopping through a server which doesn't have nc. This works from the command line:               ssh -A gateway ssh steve@target      (I have added my public key to the SSH agent). However, adding it to ~/.ssh/config doesn't:               Host target       User steveb       ProxyCommand ssh -A gateway ssh steve@targetip          $ ssh target     Pseudo-terminal will not be allocated because stdin is not a terminal.               ^CKilled by signal 2.      Attempting to force the issue with `-t` is amusing but unhelpful.               ProxyCommand ssh -A -t gateway ssh steve@targetip          $ ssh target     Pseudo-terminal will not be allocated because stdin is not a terminal.     Pseudo-terminal will not be allocated because stdin is not a terminal.               ^CKilled by signal 2.      More `-t`'s? No good.               ProxyCommand ssh -A -t -t gateway ssh steve@targetip          $ ssh target     tcgetattr: Inappropriate ioctl for device               ^CKilled by signal 2.      Is this possible? Most tutorials (eg http://www.arrfab.net/blog/?p=246 ) suggest using `nc`.


i want to save the result of one command in a file

I am using cppcheck tool to analyze source code. At the shell prompt in gcc compiler, I have given the command as follows               $ cppcheck abc.cpp        The output is               checking abc.cpp...        (error) Possible null pointer dereference: <var> - otherwise it is redundant to check if   <var> is null at line 100         segmentation fault      I want this output to be saved in a file, so I have given the command as follows               $ cppcheck abc.cpp 2> abc.txt      But the contents of abc.txt file is as follows               checking abc.cpp...        It is only saving the first line, the main error part is missing in abc.txt file. Which command should I use to get all the output lines in a file? The manual of cppcheck tool is here.


apt-get -f install is stuck on "corrupted filesystem tarfile"

I am having issues with `apt-get` on my _Raspberry Pi_. This is the output when I try and install a package:               pi@raspberrypi ~ $ sudo apt-get -f install cowsay     Reading package lists... Done     Building dependency tree     Reading state information... Done     You might want to run 'apt-get -f install' to correct these:     The following packages have unmet dependencies:      emacs23 : Depends: libm17n-0 (>= 1.6.1) but it is not going to be installed     E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).      `sudo apt-get -f install` didn't help:               sudo apt-get -f install     Reading package lists... Done     Building dependency tree     Reading state information... Done     Correcting dependencies... Done     The following extra packages will be installed:       libm17n-0     Suggested packages:       m17n-docs     The following NEW packages will be installed:       libm17n-0     0 upgraded, 1 newly installed, 0 to remove and 4 not upgraded.     12 not fully installed or removed.     Need to get 0 B/258 kB of archives.     After this operation, 837 kB of additional disk space will be used.     Do you want to continue [Y/n]? y     Use of uninitialized value $value in substitution (s///) at /usr/share/perl5/Debconf/Format/822.pm line 65, <$__ANONIO__> line 515.     (Reading database ... 58096 files and directories currently installed.)     Unpacking libm17n-0 (from .../libm17n-0_1.6.3-2_armhf.deb) ...     dpkg: error processing /var/cache/apt/archives/libm17n-0_1.6.3-2_armhf.deb (--unpack):      corrupted filesystem tarfile - corrupted package archive     dpkg-deb (subprocess): decompressing archive member: internal gzip read error: '<fd:4>: invalid distance too far back'     dpkg-deb: error: subprocess <decompress> returned error exit status 2     Errors were encountered while processing:      /var/cache/apt/archives/libm17n-0_1.6.3-2_armhf.deb     E: Sub-process /usr/bin/dpkg returned an error code (1)      Any suggestion on how this issue can be resolved, beside reflashing the SD and starting again?


Delete extraneous files from dest dir via rsync?

Say I have               SRC        001.jpg       002.jpg       001.txt       a.zip          DEST       hello.jpg      `rsync -d --delete SRC:{*.jpg,*.txt} DEST` It doesn't remove hello.jpg from DEST, any idea how to archive this?


Relationship of keyboard layout and xmodmap

I'm using Xubuntu. Before login I can choose a keyboard layout. I'm using `xmodmap` for remmaping some keys. I'm interested in two things:   1. How the state of keyboard mapping changes when I turn the laptop on, during the boot process and login to the system (in these three phases) and when working with the system (logged in).   2. What causes which symbols will be displayed on the screen (and control keys sent) during the individual phases. When I press some key, it sends some signal to the keyboard driver(?) and then there must be some decision process (applications and configuration files) determining what symbols will be displayed. Answer to this question should be the list of applications and paths to those configuration files (I'm especially interested in Ubuntu (Debian based system), but you can describe some other system, but Ubuntu is preferred).


How to use Filetype in Vim?

In most cases, I want to use tabstop=4 while editing files. But for some types of file, like xml file, I want to use tabstop=2. I added > au filetypedetect FileType xml,html,xhtml,javascript set tabstop=2 > softtabstop=2 shiftwidth=2 in my .vimrc file. It works if I am editing only one file. But if I am editing multiple files, it cannot set the tab stops correctly for all the buffers. It seems the file type is detected and set only on startup, and never change since. I want the FileType set each time I switch the buffer, how can I do that?


Jump to start of the line in Bash's Vi mode

I'm using Bash Vi mode (aka `set -o vi`). Still I miss the `Ctrl-A` shortcut from Emacs mode, which is very handy. Many times I'm retrieving the last command and append an echo to the beginning of the line in order to save it to a file. Is there a convenient way to jump to the start of the line while in insert mode? And by convenient I mean that it's accessible by two sensible buttons shortcut. So `Esc,I` is not good enough, because `Esc` is too far, and `Ctrl+[`,`I` is not good because I need to type three consecutive letters, not sleek enough.


Multiple X startup profiles

I run XMonad window manager and use .XSession to startup things like Dropbox and launch other apps I need, at login manager i select User Defined Session. I like to know is there a login manager where I can have .XSession1, .XSession2 and .XSession3 where I have different profiles. So 1st one 'daily dev', 'just browsing' and thirdly 'offline' ?


What are the advantages of building tools/libs from source?

By building from source do you gain any benefits? Is the code better optimized to your hardware architecture? Is it optimized better in general? Why would someone choose to build from source rather than using a package management system like APT/yum? If there is some kind of optimization gain when does that outweigh the benefit of a package management system?


Why can't I upgrade Linux Mint 15 from Cinnamon 1.8.8 to Cinnamon 2.0, and how do I fix it?

So Cinnamon 2.0 is out, and I've followed the steps people have given for upgrading.               sudo add-apt-repository ppa:gwendal-lebihan-dev/cinnamon-stable      sudo apt-get update     sudo apt-get dist-upgrade      This however doesn't work. It says I'm already on the newest version. I've tried doing this from a different DE, but that also didn't work. I don't appear to have any held packages in apt, so that's not the problem. Do I need to uninstall Cinnamon and reinstall it? Is there something I'm missing? Thanks.


avconv stops streaming after some time

I am using raspberry-pi board and a usb camera attached with it. i use avconv tool to capture live video from camera and streaming it on network using rtp protocol. My command on server(raspberry-pi board) is as below: **avconv -f video4linux2 -s 160x120 -i /dev/video0 -vcodec mpeg2video -r 25 -pix_fmt yuv420p -me_method epzs -b 2600k -bt 256k -f rtp rtp://192.168.1.141:8554** streaming works successfully using this command. Here IP address 192.168.1.141 is the ip address of my client pc. i can play live streaming on client side using vlc successfully. But Issue is after some time encoding and streaming on server stop automatically. And command hangs there. Output on server is as below:               $ avconv -f video4linux2 -s 160x120 -v debug -i /dev/video0 -vcodec mpeg2video -r 25 -pix_fmt yuv420p -me_method epzs -b 2600k -bt 256k -f rtp rtp://192.168.1.141:8554     avconv version 0.8.10-6:0.8.10-1+rpi1, Copyright (c) 2000-2013 the Libav developers       built on Mar 22 2014 02:13:15 with gcc 4.6.3       configuration: --arch=arm --enable-pthreads --enable-runtime-cpudetect --extra-version='6:0.8.10-1+rpi1' --libdir=/usr/lib/arm-linux-gnueabihf --prefix=/usr --disable-yasm --enable-bzlib --enable-libdc1394 --enable-libdirac --enable-libfreetype --enable-frei0r --enable-gnutls --enable-libgsm --enable-libmp3lame --enable-librtmp --enable-libopencv --enable-libopenjpeg --enable-libpulse --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-vaapi --enable-vdpau --enable-libvorbis --enable-libvpx --enable-zlib --enable-gpl --enable-postproc --enable-swscale --enable-libcdio --enable-x11grab --enable-libx264 --enable-libxvid --shlibdir=/usr/lib/arm-linux-gnueabihf --enable-shared --disable-static       libavutil    51. 22. 2 / 51. 22. 2       libavcodec   53. 35. 0 / 53. 35. 0       libavformat  53. 21. 1 / 53. 21. 1       libavdevice  53.  2. 0 / 53.  2. 0       libavfilter   2. 15. 0 /  2. 15. 0       libswscale    2.  1. 0 /  2.  1. 0       libpostproc  52.  0. 0 / 52.  0. 0     [video4linux2 @ 0x54d7a0] [4]Capabilities: 84000001     [video4linux2 @ 0x54d7a0] The V4L2 driver changed the pixel format from 0x32315559 to 0x56595559         Last message repeated 1 times     [video4linux2 @ 0x54d7a0] The V4L2 driver changed the pixel format from 0x50323234 to 0x56595559     [video4linux2 @ 0x54d7a0] The V4L2 driver set input_id: 0, input: Camera 1     [rawvideo @ 0x54f860] err{or,}_recognition separate: 1; 1     [rawvideo @ 0x54f860] err{or,}_recognition combined: 1; 1     [video4linux2 @ 0x54d7a0] All info found     [video4linux2 @ 0x54d7a0] Estimating duration from bitrate, this may be inaccurate     Input #0, video4linux2, from '/dev/video0':       Duration: N/A, start: 21891.364784, bitrate: 9216 kb/s         Stream #0.0, 1, 1/1000000: Video: rawvideo, yuyv422, 160x120, 1/30, 9216 kb/s, 30 tbr, 1000k tbn, 30 tbc     [buffer @ 0x54f220] w:160 h:120 pixfmt:yuyv422     [avsink @ 0x54d740] auto-inserting filter 'auto-inserted scaler 0' between the filter 'src' and the filter 'out'     [scale @ 0x54f7e0] w:160 h:120 fmt:yuyv422 -> w:160 h:120 fmt:yuv420p flags:0x4     [mpeg2video @ 0x54ea60] err{or,}_recognition separate: 1; 1     [mpeg2video @ 0x54ea60] err{or,}_recognition combined: 1; 1     [mpeg2video @ 0x54ea60] detected 1 logical cores     [mpeg2video @ 0x54ea60] Unsupported bit depth: 0     [rawvideo @ 0x54f860] err{or,}_recognition separate: 1; 1     [rawvideo @ 0x54f860] err{or,}_recognition combined: 1; 1     Output #0, rtp, to 'rtp://192.168.1.141:8554':       Metadata:         encoder         : Lavf53.21.1         Stream #0.0, 0, 1/90000: Video: mpeg2video, yuv420p, 160x120, 1/25, q=2-31, 2600 kb/s, 90k tbn, 25 tbc     Stream mapping:       Stream #0:0 -> #0:0 (rawvideo -> mpeg2video)     SDP:     v=0     o=- 0 0 IN IP4 127.0.0.1     s=No Name     c=IN IP4 192.168.1.141     t=0 0     a=tool:libavformat 53.21.1     m=video 8554 RTP/AVP 32     b=AS:2600          Press ctrl-c to stop encoding     *** drop!         Last message repeated 1 times     *** 1 dup!     *** 16 dup! fps= 25 q=2.0 size=    1027kB time=5.24 bitrate=1605.2kbits/s dup=1 drop=2         *** drop!         Last message repeated 11 times     *** drop!49 fps= 26 q=2.0 size=    1059kB time=5.92 bitrate=1464.9kbits/s dup=17 drop=14             Last message repeated 2 times     *** drop!76 fps= 25 q=2.0 size=    2022kB time=11.00 bitrate=1505.7kbits/s dup=17 drop=17         *** drop!48 fps= 25 q=2.0 size=    4086kB time=21.88 bitrate=1529.8kbits/s dup=17 drop=18         *** 1 dup!     *** 1 dup!0 fps= 25 q=2.0 size=    4171kB time=22.36 bitrate=1528.2kbits/s dup=18 drop=19         *** 1 dup!1 fps= 25 q=2.0 size=    4859kB time=26.00 bitrate=1530.8kbits/s dup=19 drop=19         *** 1 dup!0 fps= 25 q=2.0 size=    5152kB time=27.56 bitrate=1531.5kbits/s dup=20 drop=19         *** 1 dup!3 fps= 25 q=2.0 size=    5250kB time=28.08 bitrate=1531.7kbits/s dup=21 drop=19         *** drop!64 fps= 25 q=2.0 size=    7215kB time=38.52 bitrate=1534.5kbits/s dup=22 drop=19         *** 1 dup!6 fps= 25 q=2.0 size=    7306kB time=39.00 bitrate=1534.6kbits/s dup=22 drop=20         *** drop!07 fps= 25 q=2.0 size=    8288kB time=44.24 bitrate=1534.7kbits/s dup=23 drop=20         *** 1 dup!0 fps= 25 q=2.0 size=   10054kB time=53.56 bitrate=1537.8kbits/s dup=23 drop=21         *** 1 dup!9 fps= 25 q=2.0 size=   10342kB time=55.12 bitrate=1537.1kbits/s dup=24 drop=21             Last message repeated 1 times     *** drop!93 fps= 25 q=1.6 size=   10445kB time=55.68 bitrate=1536.7kbits/s dup=26 drop=21         *** 1 dup!     *** 7036829 dup! 25 q=2.0 size=   10630kB time=56.68 bitrate=1536.4kbits/s dup=27 drop=22       Any ideas? Thanks in advance. EDIT: Output of **v4l2-ctl --list-formats-ext** command is as below:               pi@raspberrypi ~ $ v4l2-ctl --list-formats-ext     ioctl: VIDIOC_ENUM_FMT         Index       : 0         Type        : Video Capture         Pixel Format: 'YUYV'         Name        : YUV 4:2:2 (YUYV)             Size: Discrete 640x480                 Interval: Discrete 0.033s (30.000 fps)                 Interval: Discrete 0.067s (15.000 fps)             Size: Discrete 352x288                 Interval: Discrete 0.033s (30.000 fps)                 Interval: Discrete 0.067s (15.000 fps)             Size: Discrete 320x240                 Interval: Discrete 0.033s (30.000 fps)                 Interval: Discrete 0.067s (15.000 fps)             Size: Discrete 176x144                 Interval: Discrete 0.033s (30.000 fps)                 Interval: Discrete 0.067s (15.000 fps)             Size: Discrete 160x120                 Interval: Discrete 0.033s (30.000 fps)                 Interval: Discrete 0.067s (15.000 fps)


How does LVM find drives after setup

I want to move all my 14.5 TB of media drives (not OS) to a combined LVM file system due to constant problems arranging things to fit into multiple smaller file systems. My question is if after setup any of the 6 drives moves to a different location (`/dev/sd*`), is that going to be a problem? I have always mounted them based on UUID, but I don't know LVM enough to know how it works with multiple drives. I know I can still mount the file system based on UUID, but I want to make sure LVM is not going to be messed up finding the individual parts of the system. I have to ask this since, for some reason, if I reboot with USB drives inserted they get lower `sd*` letters than some of the media drives and it causes those media drives to be rearranged for that boot only. PS. I maintain off site backups of my media so I'm not to worried about if one drive fails breaking stuff. Only mentioned since my Google searches of LVM always have someone trying to talk the person out of it because one problem loses everything.