title: autofs with sshfs not working anymore

text: I just upgraded from Ubuntu 12.04 to 12.10. Before that I backed up my autofs config which worked fine. I appended the line from my old `/etc/auto.master` to the new one:               +dir:/etc/auto.master.d     +auto.master     /mnt /etc/auto.sshfs uid=1000,gid=1000,--timeout=30,--ghost,--verbose      my `/etc/auto.sshfs` looks like this:               mymount -fstype=fuse,rw,nodev,nonempty,noatime,allow_other,max_read=65536 :sshfs\#myuser@mydomain:/mnt/mymount      Trying this manually I got `Connetion reset by peer` so I added the option `IdentityFile=/home/myuser/.ssh/id_rsa`. Now this happens when I try to access `/mnt` (both with manual and autofs):               myuser@laptop /mnt % la     ls: cannot access mymount: No such file or directory     total 4     drwxr-xr-x  3 root root    0 Oct 19 10:34 ./     drwxr-xr-x 25 root root 4096 Oct 18 23:17 ../     d?????????  ? ?    ?       ?            ? mymount/      The relevant entries from my `/var/log/syslog` are this:               Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: lookup(program): lookup for mymount failed     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: attempting to mount entry /mnt/mymount     Oct 19 00:17:56 laptop automount[1250]: failed to mount /mnt/mymount     Oct 19 00:18:01 laptop automount[1250]: attempting to mount entry /mnt/.hidden     Oct 19 00:18:01 laptop automount[1250]: lookup(program): lookup for .hidden failed     Oct 19 00:18:01 laptop automount[1250]: failed to mount /mnt/.hidden     Oct 19 00:18:03 laptop automount[1250]: attempting to mount entry /mnt/.hidden     Oct 19 00:18:03 laptop automount[1250]: failed to mount /mnt/.hidden     Oct 19 00:18:03 laptop automount[1250]: attempting to mount entry /mnt/.hidden     Oct 19 00:18:03 laptop automount[1250]: failed to mount /mnt/.hidden     Oct 19 00:18:24 laptop automount[1250]: attempting to mount entry /mnt/.hidden     Oct 19 00:18:24 laptop automount[1250]: failed to mount /mnt/.hidden     Oct 19 00:21:57 laptop automount[1250]: umount_autofs_indirect: ask umount returned busy /mnt     Oct 19 00:21:59 laptop automount[1250]: shut down path /mnt     Oct 19 00:21:59 laptop automount[3436]: mounted indirect on /mnt with timeout 30, freq 8 seconds     Oct 19 00:21:59 laptop automount[3436]: ghosting enabled      I already checked the UID and GID and they match my user. SSH keys for my user are in place. I also tried to create `/mnt/mymount` manually but strangely it returns "permissions denied" even as root as long as autofs is running (guess it should be this way). Any ideas what might be wrong? There must by a configuration step I forgot which I did before.


title: How can I put my HDMI display into (and out of) power save mode?

text: I am using a Raspberry Pi to run an information display in an office. I want the display in power save mode when outside of business hours. I was going to use `cron` to execute something at the beginning and end of the day, but `xset dpms force off` doesn't work. I have disabled the screen saver (so the display stays on during the day) with the addition of `xset s off`, `xset -dpms` and `xset s noblank` in the `/etc/xdg/lxsession/LXDE/autostart` file. Here are the results from `xset q`:               Keyboard Control:       auto repeat:  on    key click percent:  0    LED mask:  00000000       XKB indicators:         00: Caps Lock:   off    01: Num Lock:    off    02: Scroll Lock: off         03: Compose:     off    04: Kana:        off    05: Sleep:       off         06: Suspend:     off    07: Mute:        off    08: Misc:        off         09: Mail:        off    10: Charging:    off    11: Shift Lock:  off         12: Group 2:     off    13: Mouse Keys:  off       auto repeat delay:  500    repeat rate:  33       auto repeating keys:  00ffffffdffffbbf                             fadfffefffedffff                             9fffffffffffffff                             fff7ffffffffffff       bell percent:  0    bell pitch:  400    bell duration:  100     Pointer Control:       acceleration:  20/10    threshold:  10     Screen Saver:       prefer blanking:  no    allow exposures:  yes       timeout:  0    cycle:  600     Colors:       default colormap:  0x20    BlackPixel:  0x0    WhitePixel:  0xffff     Font Path:       built-ins     DPMS (Energy Star):       Standby: 600    Suspend: 600    Off: 600       DPMS is Disabled      **UPDATE:**`xset s blank && xset +dpms && xset dpms force off` will blank the display, but it doesn't put it in power save mode. After reading a lot of threads, I still can't get the system time correct either (I think that may be a firewall issue)...


title: Where does gnome-session/gnome-shell store its configuration?

text: Long story short; I have a debian system that's been running the `unstable` tree for over a decade straight (through fire, flames, and multiple hardware upgrades, but that aside). However, a while ago while Debian was transitioning to gnome3 and the `gnome-shell` desktop there were a couple of hitches in the process, and one or another of those left my regular user with an unusable configuration -- `gnome-shell` starts up and immediately crashes. I tried setting up a completely blank new user, and everything runs fine for that one, so it's definitely an issue with a setting local to my main user somewhere... It's just that I have no idea where to start looking, and I don't want to blanket erase all configuration files because I kind of need the vast majority of them. So instead I'm looking to surgically remove all the configuration files and/or options that pertain to `gnome-shell` and let it rebuild them from scratch when I start it, then work from there. **EDIT** : My bad, slight naming fail. The problem seems to be in `gnome- shell` rather than `gnome-session`.


title: Building GCC inside a chroot from source

text: In a previous question I asked about creating a chroot that simulates my embedded device environment. It was suggested that I build from source GCC and binutils first inside my chroot. To attempt this I copied the version of libc and gcc binary on my host machine to the chroot. I then wrote a simple hello world program to a file test.c and tried to build in my chroot as follows                 phil@phil-desktop:/usr$ sudo chroot /usr/embedded_chroot1/       bash-4.2# gcc test.c        gcc: error trying to exec 'cc1': execvp: No such file or directory      I am not too sure what is going on here with this error. I have copied the gcc binary and libc to my chroot so why am I unable to compile? Must I copy all system source and header files into my chroot also?? I think I have a conceptual misunderstanding with the whole process of using a chroot.


title: Run unix command precisely at very short intervals WITHOUT accumulating time lag over time

text: # Question I'd like to be able to run a UNIX command **precisely** every second **over a long time period**. I need a solution, which does not lag behind after a certain time, because of the time the command itself needs for execution. _sleep_ , _watch_ , and a certain _python script_ all failed me in this regard. On the microcontroller's such as the http://Arduino.cc I'd do that through hardware clock interrupts. I'd like to know whether there is a similar time- precise shell script solution. All the solutions which I found within StackExchange.com, resulted in a noticeable time lag, if run over hours. See details below. # Practical purpose / application I want to test wether my network connection is continuously up by sending timestamps via `nc` (netcat) every 1 second. Sender:               precise-timestamp-generator | tee netcat-sender.txt | nc $receiver $port      Receiver:               nc -l -p $port > netcat-receiver.txt      After completion, compare the two logs:               diff netcat-sender.txt netcat-receiver.txt      The diffs would be the untransmitted timestamps. From this I would know at what time my LAN / WAN / ISP makes troubles. * * * # Solution SLEEP               while [ true ]; do date "+%Y-%m-%d %H:%M:%S" ; sleep 1; done | tee timelog-sleep.txt      Gets a certain offset over time, as the command within the loop also takes a little time. ## Precision               cat timelog-sleep.txt          2012-07-16 00:45:16     [...]     2012-07-16 10:20:36      Seconds elapsed: 34520               wc -l timelog-sleep.txt      Lines in file: 34243 Precision summarized:   * 34520-34243 = 277 timing problems   * 34520/34243 = 1.008 = 0.8 % off # Solution REPEAT PYTHON Found at: Repeat a unix command every x seconds forever               repeat.py 1 "date '+%Y-%m-%d %H:%M:%S'" >> timelog-repeat-py.txt      Supposed to avoid the time offset, but fails to do so. ## Precision               wc -l timelog-repeat-py.txt          2012-07-16 13:42:44     [...]     2012-07-16 16:45:24      Seconds elapsed: 10960               wc -l timelog-repeat-py.txt      Lines in file: 10859 Precision summarized:   * 10960-10859 = 101 timing problems   * 10960/10859 = 1.009 = 0.9 % off # Solution WATCH               watch -n 1 "date '+%Y-%m-%d %H:%M:%S' >> ~/Desktop/timelog-watch.txt"      ## Precision               wc -l timelog-watch.txt     2012-07-16 11:04:08     [...]     2012-07-16 13:25:47      Seconds elapsed: 8499               wc -l timelog-watch.txt      Lines in file: 8366 Precision summarized:   * 8499-8366 = 133 timing problems.   * 8499/8366 = 1.016 = 1.6 % off.


title: How to capitalize word (i.e. first letter to upper) in KornShell

text: Is there a builtin way in KornShell to capitalize a word, e.g. `korn` -> `Korn`? A Bash 4 example to clarify:               str='korn'     echo "${str^}"      If there is not a bultin way to do this in KornShell, what is the most concise and efficient way to write a function that will do it?


title: How do I get a list of shared library filenames under Linux?

text: Is there a GNU Linux built-in for getting a list of the filenames of shared libraries? I have considered parsing the output of `ldconfig -p`. However, I'm not sure about consistency in output from system to system. I am already aware that I could use `find` but given that the linker / loader has a cache of libraries and locations, it seems more efficient to use it in some way. Additionally, the paths that the linker / loader searches are the only ones I'm concerned with--i.e libraries that have been processed by `ldconfig`.


title: How to backup virtual drives with PlayOnLinux?

text: PlayOnLinux installs the applications in separate virtual drives. Each virtual drive represents a different windows machine. I have configured PlayOnLinux on my laptop and installed several programs in it. These programs go in the hidden `.PlayOnLinux` directory in `home`. My `.PlayOnLinux` directory is about 12 GB in size. Along with virtual drives it also contains resources that PlayOnLinux downloads from internet such as Windows Service Pack and alternate versions of Wine. Not wanting to download/install everything again I copied the `.PlayOnLinux` directory to my second computer before running PlayOnLinux. However on startup PlayOnLinux initialized that directory to its own taste, flattening the 12GB directory to a mere 500 Kilobytes. My question is - **Is it possible to backup PlayOnLinux virtual drives? How?** This would be tremendously helpful in taking snapshots of drives for reverting later and for transferring settings to another system.


title: Why do I get this 'Erase is backspace' message after I do a reset in xterm?

text: So when I do a reset in xterm I get something like this: > Erase is backspace.   >  [omarg@computer]: I've already checked my `.bashrc` and `.Xdefaults` files but it doesn't seem like that message is being invoked from there. Notes:   * When I do a reset in a TTY I don't get that message.   * Arch Linux user.


title: How to upgrade Local Server with Local Upgrade Server

text: This is the case We have One Upgrade Server and it is connected to Redhat Network and it downloads all the updates. Means it is fully up to date. What I need is that I need to connect the client Servers to connect with this server (Manually , by using YUM UPGRADE command)and download and install all the updates from this Local Upgrade Server. What are the steps required to get this job done.


title: Kernel headers for VMware tools

text: I tried to compile VMware tools on my server. I compiled the kernel myself, I didn't use RPM. As VMware tools needs the kernel header files, I executed the following command in my kernel folder source:               make headers_install INSTALL_HDR_PATH=/tmp/header/      All files are exported to `/tmp/header/include/`. When I start the `vmware- config-tools.pl` and I specify the folder `/tmp/header/`, VMware tools says: > The path "/tmp/header/include/" is not a valid path to the 3.3.0 kernel What is wrong here? * * * **Edit** : I'm running RHEL 6, kernel 3.3, trying to compile VMware tools for ESXi 4.1 & 5


title: Unable to install libevent without admin priviledges

text: I just downloaded libevent-2.0.21-stable, which I am hoping to compile so that I can use `tmux`. However, when I run:               ./configure --prefix=/path/to/libevent-2.0.21-stable/     make     make install      everything seems to work well until the last few lines, where I get the following error:               ...     make[3]: Leaving directory `/nfs/titan7/u11/vid/bin/utils/libevent-2.0.21-stable'     make[2]: Leaving directory `/nfs/titan7/u11/vid/bin/utils/libevent-2.0.21-stable'     Making install in include     make[2]: Entering directory `/nfs/titan7/u11/vid/bin/utils/libevent-2.0.21-stable/include'     make[3]: Entering directory `/nfs/titan7/u11/vid/bin/utils/libevent-2.0.21-stable/include'     make[3]: Nothing to be done for `install-exec-am'.      /bin/mkdir -p '/d4m/vid/bin/utils/libevent-2.0.21-stable/include'      /bin/mkdir -p '/d4m/vid/bin/utils/libevent-2.0.21-stable/include/event2'      /usr/bin/install -c -m 644  event2/buffer.h event2/buffer_compat.h event2/bufferevent.h event2/bufferevent_compat.h event2/bufferevent_ssl.h event2/buffereve     nt_struct.h event2/dns.h event2/dns_compat.h event2/dns_struct.h event2/event.h event2/event_compat.h event2/event_struct.h event2/http.h event2/http_compat.h      event2/http_struct.h event2/keyvalq_struct.h event2/listener.h event2/rpc.h event2/rpc_compat.h event2/rpc_struct.h event2/tag.h event2/tag_compat.h event2/t     hread.h event2/util.h '/d4m/vid/bin/utils/libevent-2.0.21-stable/include/event2'                                                                                /usr/bin/install: `event2/buffer.h' and `/d4m/vid/bin/utils/libevent-2.0.21-stable/include/event2/buffer.h' are the same file     /usr/bin/install: `event2/buffer_compat.h' and `/d4m/vid/bin/utils/libevent-2.0.21-stable/include/event2/buffer_compat.h' are the same file     /usr/bin/install: `event2/bufferevent.h' and `/d4m/vid/bin/utils/libevent-2.0.21-stable/include/event2/bufferevent.h' are the same file     /usr/bin/install: `event2/bufferevent_compat.h' and `/d4m/vid/bin/utils/libevent-2.0.21-stable/include/event2/bufferevent_compat.h' are the same file     /usr/bin/install: `event2/bufferevent_ssl.h' and `/d4m/vid/bin/utils/libevent-2.0.21-stable/include/event2/bufferevent_ssl.h' are the same file     /usr/bin/install: `event2/bufferevent_struct.h' and `/d4m/vid/bin/utils/libevent-2.0.21-stable/include/event2/bufferevent_struct.h' are the same file     /usr/bin/install: `event2/dns.h' and `/d4m/vid/bin/utils/libevent-2.0.21-stable/include/event2/dns.h' are the same file     /usr/bin/install: `event2/dns_compat.h' and `/d4m/vid/bin/utils/libevent-2.0.21-stable/include/event2/dns_compat.h' are the same file     /usr/bin/install: `event2/dns_struct.h' and `/d4m/vid/bin/utils/libevent-2.0.21-stable/include/event2/dns_struct.h' are the same file     /usr/bin/install: `event2/event.h' and `/d4m/vid/bin/utils/libevent-2.0.21-stable/include/event2/event.h' are the same file     /usr/bin/install: `event2/event_compat.h' and `/d4m/vid/bin/utils/libevent-2.0.21-stable/include/event2/event_compat.h' are the same file     /usr/bin/install: `event2/event_struct.h' and `/d4m/vid/bin/utils/libevent-2.0.21-stable/include/event2/event_struct.h' are the same file     /usr/bin/install: `event2/http.h' and `/d4m/vid/bin/utils/libevent-2.0.21-stable/include/event2/http.h' are the same file     /usr/bin/install: `event2/http_compat.h' and `/d4m/vid/bin/utils/libevent-2.0.21-stable/include/event2/http_compat.h' are the same file     /usr/bin/install: `event2/http_struct.h' and `/d4m/vid/bin/utils/libevent-2.0.21-stable/include/event2/http_struct.h' are the same file     /usr/bin/install: `event2/keyvalq_struct.h' and `/d4m/vid/bin/utils/libevent-2.0.21-stable/include/event2/keyvalq_struct.h' are the same file     /usr/bin/install: `event2/listener.h' and `/d4m/vid/bin/utils/libevent-2.0.21-stable/include/event2/listener.h' are the same file     /usr/bin/install: `event2/rpc.h' and `/d4m/vid/bin/utils/libevent-2.0.21-stable/include/event2/rpc.h' are the same file     /usr/bin/install: `event2/rpc_compat.h' and `/d4m/vid/bin/utils/libevent-2.0.21-stable/include/event2/rpc_compat.h' are the same file     /usr/bin/install: `event2/rpc_struct.h' and `/d4m/vid/bin/utils/libevent-2.0.21-stable/include/event2/rpc_struct.h' are the same file     /usr/bin/install: `event2/tag.h' and `/d4m/vid/bin/utils/libevent-2.0.21-stable/include/event2/tag.h' are the same file     /usr/bin/install: `event2/tag_compat.h' and `/d4m/vid/bin/utils/libevent-2.0.21-stable/include/event2/tag_compat.h' are the same file     /usr/bin/install: `event2/thread.h' and `/d4m/vid/bin/utils/libevent-2.0.21-stable/include/event2/thread.h' are the same file     /usr/bin/install: `event2/util.h' and `/d4m/vid/bin/utils/libevent-2.0.21-stable/include/event2/util.h' are the same file     make[3]: *** [install-nobase_includeHEADERS] Error 1     make[3]: Leaving directory `/nfs/titan7/u11/vid/bin/utils/libevent-2.0.21-stable/include'     make[2]: *** [install-am] Error 2     make[2]: Leaving directory `/nfs/titan7/u11/vid/bin/utils/libevent-2.0.21-stable/include'     make[1]: *** [install-recursive] Error 1     make[1]: Leaving directory `/nfs/titan7/u11/vid/bin/utils/libevent-2.0.21-stable'     make: *** [install] Error 2     make install  6.15s user 8.22s system 86% cpu 16.622 total      Running `make verify` also returns the following error:               EPOLL      test-eof: OKAY      test-weof: OKAY      test-time: OKAY      test-changelist: OKAY      regress: OKAY     EPOLL (changelist)      test-eof: OKAY      test-weof: OKAY      test-time: OKAY      test-changelist: OKAY      regress:        FAIL regress.c:717: assert(abs(timeval_msec_diff(((&start)), ((&res.tvs[2]))) - (500)) <= 50): 145 vs 50main/persistent_active_timeout:        [persistent_active_timeout FAILED]     1/179 TESTS FAILED. (0 skipped)     FAILED     DEVPOLL     Skipping test     POLL      test-eof: OKAY      test-weof: OKAY      test-time: OKAY      test-changelist: OKAY      regress: OKAY     SELECT      test-eof: OKAY      test-weof: OKAY      test-time: OKAY      test-changelist: OKAY      regress: OKAY     WIN32     Skipping test     FAIL: ../test/test.sh     ==================     1 of 1 test failed     ==================     make[4]: *** [check-TESTS] Error 1     make[4]: Leaving directory `/nfs/titan7/u11/vid/bin/utils/libevent-2.0.21-stable/test'     make[3]: *** [check-am] Error 2     make[3]: Leaving directory `/nfs/titan7/u11/vid/bin/utils/libevent-2.0.21-stable/test'     make[2]: *** [check] Error 2     make[2]: Leaving directory `/nfs/titan7/u11/vid/bin/utils/libevent-2.0.21-stable/test'     make[1]: *** [check-recursive] Error 1     make[1]: Leaving directory `/nfs/titan7/u11/vid/bin/utils/libevent-2.0.21-stable'     make: *** [check] Error 2     make verify  22.71s user 24.82s system 16% cpu 4:41.78 total      I am stuck at this point. Why do the compilation and verification fail?


title: Installing proprietary ethernet drivers in Fedora

text: I have an HP HDX16-1354CA Laptop that I've installed Fedora 19 on, and my ethernet port is not being detected. I am sure that it is because I have not installed the drivers for it, but I can't seem to find any proprietary ethernet drivers for linux anywhere. Is there some way to search for all proprietary drivers that match your system, like Ubuntu does with the "Additional Drivers" option? The windows equivalent to the driver that I need is the Realtek PCI-E Fast Ethernet NIC Driver.


title: Apt-Get No installation candidate. Can't install anything

text: So, I am running a MineOS Linux, which is based on Debian turnkey, and the installation was around 250 MB, so probably not all of the commands that come with Linux were installed. I use this to run my minecraft server, and I have a noip account to make a static IP to redirect it my IP. I am going away now for 7 days, and I have a dynamic IP. Normally, I change it manually on the noip account, but now I won't be able to. The noip company has a software called Dynamic Update Client, which is installed and manually changes your ip on your account. So, I need to install that on my server. But here is the problem, in order to install, I need to do it with the `make` command, and that command is not found. I spent a lot of time searching on how to fix it, tried to add URLs to my `/etc/apt/sources.list` file, running `apt- get` commands like: `install make`, `upgrade`, `update`, `install build- essential` etc. but to no avail. I still can't get to install `make`, because on everything I tried to install using `apt-get`, it keeps saying, "not found" or "obsoleted", "No install candidate". So what is the problem with this?


title: CONFIG_RTC_SYSTOHC: how to use the NTP synchronization option in the kernel

text: I have noticed in kernel 3.10, there is an option `CONFIG_RTC_SYSTOHC`               Device Drivers -> RTC -> Set the RTC time based on NTP synchronization      The help says:               If you say yes here, the system time (wall clock) will be stored     in the RTC specified by RTC_HCTOSYS_DEVICE approximately every 11     minutes if userspace reports synchronized NTP status.      I don't understand how I can make use of this function. Does it mean, I don't need any userspace tools anymore (`ntpdate`) to synchronize time ? How is this different from using `ntpdate` ? Where do I specify the ntp server to be used? Could somebody please clarify ?


title: What is sources.list?

text: I know `sources.list` is a file that contains a list of HTTP links pointing to some software downloads. I would like to know more detailed explanations and various conventions followed in the `sources.list` file.


title: Multiple daemons init script

text: I have two daemons currently running on my development server (OpenSUSE 12). There are two daemon that work together as a whole and must start together and die together.   1. Is there a standard way to accomplish such a thing with init scripts ?   2. Should I create an init script for each one of them, or should they be in the same script ?   3. Is there some kind of service that can check if both the daemons are running and if one is not restart both of them ?


title: How to add NFS options flag to anaconda?

text: These options work for Kickstart to load the install tree from NFS: The Fedora Kickstart documentation states               nfs --server=nfsserver.example.com --dir=/tmp/install-tree --opts="username=u1,password=p1"      The RedHat6 documentation install guide does not mention the options flag but they are mentioned in the Fedora guide:               ks=nfs[:options]:<server>:<path>      How to add nfs options parameter to Anaconda in RHEL6.x?


title: iptables routing

text: I believe this question has been answered a 100 times before, but I'm almost sure that I'm searching into the wrong direction. My desired setup is the following: I have a virtual host using KVM and libvirt. I have a simple 192.168.1.0/24 home network, which I would like to extend by a server network. I will use 192.168.12.0/24 for the new network. But since there will be a few servers still running in the normal network, I added a virtual network to libvirt. Basicly I would like to route between br0(which is a bridge to eth0) and virbr0(which is the virtual network interface).I have tried to route the traffic using iptables and I have managed it to gain access to the network using these commands               iptables -I FORWARD -d 192.168.12.0/24 -s 0.0.0.0/0 -j ACCEPT     iptables -I FORWARD -s 192.168.12.0/24 -d 0.0.0.0/0 -j ACCEPT     iptables -I FORWARD -s 192.168.1.0/24 -d 0.0.0.0/0 -j ACCEPT     iptables -I FORWARD -d 192.168.1.0/24 -s 0.0.0.0/0 -j ACCEPT      Could someone show me the right direction? EDIT 1: Thanks for your answers. I completely forgot about the kernel rules and applied them. I am now able to ping the machine from the 192.168.1.0/24 network and vice versa. But I unfortunately am not able to connect via ssh to this machine neither is it possible to ping anything else then 192.168.1.0/24 (and its origin network of course). The "core" router is properly configured, to route anything to the server network, to the kvm hypervisor. I also thought about the bridge as routed interface, and I added a new interface (eth0:1) which is now my "outside" interface, but this also doesn't change anything.


title: Is it possible to change the priority of a message in rsyslog?

text: I have a very dramatic and hypocondriac program, and it likes to spew alarming messages to syslog in cases when nothing really important happens. Besides, it sends them with priority "alert", so they float above the rest of messages of lower priority (anything lower than "err"), that I usually skip. The messages have a very specific format that I could filter or match, given the tools. Is it possible, using rsyslog, to change the priority of these messages so they become "warning"? I don't want to get rid of them, just put them in their proper place.


title: How can I fix/install/reinstall grub?

text: So I started out with a 250GB HDD, the stock drive from an EeePC 1015pem that I am trying to turn into a MintBook. The drive is physically operable, but all data has been nuked, including the old OS. Given this, I attached the HDD to my desktop and installed Linux Mint 16 Xfce from a live USB created through Unetbootin-585. Set aside 10GB for swap and 240GB for Ext4 and /. The drive now refuses to boot for either the desktop or netbook. Both motherboards are sounding the correct sequence of beeps, so they seem healthy, and I can successfully access the BIOS on both systems. However, the only thing that comes up after starting the computer is a nonresponsive command- line. There is no error message, no grub or grub-rescue, nothing. Is there anything I can try besides reformatting and starting over? How would I go about installing a boot loader that can boot my OS?


title: Why do I get dropped into a GRUB rescue console?

text: I've been setting up my environment on a fedora 20 64bit, the last week. After a restart tonight I am unable to boot into my system. It boots into this terminal/prompt and it says:                [ Minimal bash-like editing is supported. For the first word, TAB lists possible completions of a device/filename. ]          grub>      I've tried to rescue the system, with the dvd, but no luck. I'm a noob, and could really need some help on this. I have installed a lot of software and I would rather not have to do it for the third time this week, last crash was because I installed grub2 and made some configurations, to include xen hypervisor support in the bootup forgetting to turn "Secure boot" off in the bios. Can anyone tell me what to do? What I can do. EDIT: This is not a duplicate, I installed the system some days ago, and had a working grub, mount of drives and so on. **It was after changes(installing software, configuring the system) that I got dropped into this prompt** I used the other answer to find the solution, I didn't follow it in it's entirety.


title: Installing Grub from a 32bit rescue disk to a disk with 64bit Linux

text: Is it possible to reinstall Grub on a disk with 64bit Linux using a 32bit Linux rescue disk?


title: Getting the extra GPT info; a "fdisk -l" equivalent

text: What is the equivalent for GPT using HDDs of: `# fdisk -l /dev/hda > /mnt/sda1/hda_fdisk.info` I got this from https://wiki.archlinux.org/index.php/disk_cloning (under "Create disk image") for getting the extra hdd info which may be important for restoring or extracting from multi-partition images. When I do this I get an error similar to: "WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted."


title: How to use a separated user with GUI on OpenBSD?

text: A webbrowser is a GREAT attack vector since people use it to access the "dangerous" internet. Very bad things can come in through to the desktop. So in general for a desktop, we can do the following: have a separated*, ex.: "firefox" user that we use only for running the Firefox webbrowser.               vi /etc/ssh/sshd_config          Ports 44444 # increased port number to avoid simpler automated attacks     ListenAddress 127.0.0.1 # only listen on localhost!     PasswordAuthentication no # allow only pubkey     PubkeyAuthentication yes # allow only pubkey     etc.          And of course we could limit in pf who can have access to port 44444, have port knocking, etc.      Then the normal "user" start firefox with this               ssh -p 44444 firefox@127.0.0.1 -X /home/firefox/.firefox/firefox-bin > /dev/null 2>&1      **The Question is:** Are there any better solution to use the webbrowser with a separated user? I didn't find "gksu" in the ports. Asking it specifically for OpenBSD using the default FVWM. Why isn't the SSH solution OK? AFAIK:               - Using "ssh -X" is not a very secure solution     - Using "ssh -X" can cause performance problems for the webbrowser      *using a separated user we can limit the attack, so the attacker will not see the normal user "user"'s private files if it gets in to the desktop via the browser.  UPDATE#1: copy&paste function should work for the webbrowser that we use with the separated user.


title: Does BitTorrent work in the background after quitting qBitTorrent?

text: Recently I installed qBitTorrent so I could download some episodes of a Creative Commons-licensed TV series. I simply used `apt-get install qbittorrent`, ran `qbittorrent`, then added the torrent files, and pressed "start". I noticed that the series would take too long to download, so I quit qBitTorrent when it was at 10%. The next day, I launched qBitTorrent again, and was surprised to find the downloads complete. Either the 2.5 GBs downloaded within 3 seconds or something else occurred. Does BitTorrent continue to exchange files after starting the download in qBitTorrent and then quitting qBitTorrent?


title: Archlinux proper PKGBUILD: Python executable error

text: In a previous question, I asked about how to write a `PKGBUILD` to install a binary `.deb` package. The solution was to extract the contents of the `.deb` and copy the data to the archlinux package fakeroot, `"${pkgdir}/"`. That means if the `.deb` contains a `data.tar.gz` with the binaries stored in a `usr/lib` directory, the process to install this package is (In the `PKGBUILD`):               package()     {         cd $srcdir              tar -xvzf data.tar.gz              install -dm755 "${pkgdir}/usr/lib"         cp -r -f "${srcdir}/usr/lib" "${pkgdir}/"     }      However if I do that the package is installed successfully, but I cannot open the binaries (Written in python). If I execute a binary installed in that way, returns this error: > Cannot open self [path to executable] or file [path to executable].pkg On the other hand, if I write the `PKGBUILD` in the wrong way, that is, copying the binaries directly to the system root during `package()`:               cp -r -f "${srcdir}/usr/lib "/"      The programs work perfectly. **Is there something I'm missing?** Here is the package.


title: A Panel with FvwmButtons

text: I am trying to make a simple panel out of `FvwmButtons`. I want to use it instead of `FvwmTaskBar`. Because there was too many old stuff in the web I asked for Help here. I want to **understand** `FvwmButton` and the process it involves; So I devise a scenario.               +--------------------------------+---------+--------------+-----------+     |                                |         |              |   Stand   |     |    FvwmIconMan                 |FvwmPager|    Xclock    |   alone   |     |                                |         |              |    Tray   |     +--------------------------------+---------+--------------+-----------+        1. How to split `FvwmButtons` into this scheme?    2. How to `Swallow` this things into it?   3. How to manage The Space as it grows? (`FvwmIconMan` will grow by windows opened) `Auto-Resize in FvwmButtons seems not doable`   4. *How to tell the whole deal to sit at the bottom of the desktop (all the desktops) and other windows like (firefox and so on) to respect its place and no to go under or over it?


title: xmodmap configuration reset after time

text: I wrote a simple layout changing configuration for xmodmap (Caps/Ctrl swap, and such) and stored the config to `$HOME/.Xmodmap`. When I run `xmodmap ~/.Xmodmap` everything works fine, the layout is changed in every window. But after some time, approx. 10 min, the layout is reset to default. This happens without my restarting the computer, closing the terminal where I called xmodmap, going to sleep-mode, whatever. Is there a process that could rewrite the layout automatically? I am not sure if it is distribution-specific, but I am running Debian Wheeze with xfce4.


title: Is pvcreate destructive? Attempting to recover an lvm2 volume group

text: I don't want to lose any data, so I'm asking if the solution Novell offers is safe to try. If not, are there safe alternatives? Step-by-tedious-step:   1. I have two volume groups: main and Rand; Rand is what I boot from while main is an older group.   2. main/home stopped mounting due to a possible bad superblock. (this error)   3. I found this Novell link suggesting `vgcfgrestore` yesterday, so I tried it. No bueno.   4. I then ran `fsck.jfs` on `/dev/main/home`, which allowed it to mount. Success!   5. This morning, I see errors. `df -h` shows `/dev/mapper/Rand-root` has 0 bytes free. Deleting a debian .iso--and more-- fails to change that. (20+ gigs were free yesterday.)   6. `vgscan`, `pvscan`--a lot of utilities fail to work due to a "disk full" error.   7. I reboot. `df -h` still reports 0 bytes free, but `vgscan` and `pvscan` work now.   8. Something one of those utilities returned led me to try `vgcfgrestore Rand`. No change in `df -h` and now main/home (mounted at `/mnt/10.10/`) starts spewing I/O errors.   9. Reboot. A BIOS/SMART error on a disk along with a `pvscan` error saying can't find device with uuid="uZ1fiS-5Wo4-VNzC-gzs0-ekVz-Bepn-1MZe82", which `blkid` identifies as `/dev/sdb5`.   10. `fdisk -l` shows:              Disk /dev/sdb: 120.0 GB, 120034123776 bytes     255 heads, 63 sectors/track, 14593 cylinders     Units = cylinders of 16065 * 512 = 8225280 bytes     Sector size (logical/physical): 512 bytes / 512 bytes     I/O size (minimum/optimal): 512 bytes / 512 bytes     Disk identifier: 0x00039f8a          Device Boot      Start         End      Blocks   Id  System     /dev/sdb1   *           1          32      248832   83  Linux     Partition 1 does not end on cylinder boundary.     /dev/sdb2              32       14594   116969473    5  Extended     /dev/sdb5              32       14594   116969472   8e  Linux LVM     Note: sector size is 4096 (not 512)        11. The Novell link says my problem fits Symptom 2 and provides a solution, but says nothing about `fdisk` reporting a partition error. (Which may be causing the SMART error.) The Novell solution says to first identify the device, then run `pvcreate` with the UUID and device as parameters, then `vgcfgrestore`, `vgscan`, `vgchange -ay`, and `fsck`. If I try this, is there a chance `pvcreate` will damage anything? Also, for the pvcreate command, should I use `/dev/sdb` or `/dev/sdb5` as the device? Output:               ~ » sudo vgscan                                                                                steven@Rand     [sudo] password for steven:        Reading all physical volumes.  This may take a while...       Found volume group "Rand" using metadata type lvm2       Couldn't find device with uuid uZ1fiS-5Wo4-VNzC-gzs0-ekVz-Bepn-1MZe82.       Found volume group "main" using metadata type lvm2     ------------------------------------------------------------     ~ » sudo pvscan                                                                                steven@Rand       Couldn't find device with uuid uZ1fiS-5Wo4-VNzC-gzs0-ekVz-Bepn-1MZe82.       PV /dev/sdb5        VG Rand   lvm2 [111.55 GiB / 0    free]       PV unknown device   VG main   lvm2 [1.36 TiB / 0    free]       PV /dev/sda1        VG main   lvm2 [465.76 GiB / 461.76 GiB free]       Total: 3 [1.93 TiB] / in use: 3 [1.93 TiB] / in no VG: 0 [0   ]     ------------------------------------------------------------     ~ » blkid                                                                                steven@Rand     /dev/sdb1: UUID="ba9a3955-0b9c-4660-9852-0f9f405d2f8e" SEC_TYPE="ext2" TYPE="ext3"      /dev/sdb5: UUID="uZ1fiS-5Wo4-VNzC-gzs0-ekVz-Bepn-1MZe82" TYPE="LVM2_member"      /dev/sde1: LABEL="My Book" UUID="A2CA0AEBCA0ABC13" TYPE="ntfs"      /dev/sdf1: UUID="5F8C6ED4773C3763" TYPE="ntfs"      ------------------------------------------------------------          ~ » sudo lvs            Couldn't find device with uuid uZ1fiS-5Wo4-VNzC-gzs0-ekVz-Bepn-1MZe82.       LV     VG   Attr   LSize   Origin Snap%  Move Log Copy%  Convert       root   Rand -wi-ao 106.98g                                             swap_1 Rand -wi-ao   4.56g                                             home   main -wi---   1.35t                                             root   main -wi---   2.00g                                             swap   main -wi---   4.00g                                             tmp    main -wi--- 512.00m                                             usr    main -wi---   6.00g                                             var    main -wi---   2.00g                                           ------------------------------------------------------------     ~ » sudo lvscan       ACTIVE            '/dev/Rand/root' [106.98 GiB] inherit       ACTIVE            '/dev/Rand/swap_1' [4.56 GiB] inherit       Couldn't find device with uuid uZ1fiS-5Wo4-VNzC-gzs0-ekVz-Bepn-1MZe82.       inactive          '/dev/main/swap' [4.00 GiB] inherit       inactive          '/dev/main/root' [2.00 GiB] inherit       inactive          '/dev/main/usr' [6.00 GiB] inherit       inactive          '/dev/main/var' [2.00 GiB] inherit       inactive          '/dev/main/tmp' [512.00 MiB] inherit       inactive          '/dev/main/home' [1.35 TiB] inherit     ------------------------------------------------------------     ~ » sudo pvs       Couldn't find device with uuid uZ1fiS-5Wo4-VNzC-gzs0-ekVz-Bepn-1MZe82.       PV             VG   Fmt  Attr PSize   PFree         /dev/sda1      main lvm2 a-   465.76g 461.76g       /dev/sdb5      Rand lvm2 a-   111.55g      0        unknown device main lvm2 a-     1.36t      0      ------------------------------------------------------------     ~ » blkid     /dev/sdb1: UUID="ba9a3955-0b9c-4660-9852-0f9f405d2f8e" SEC_TYPE="ext2" TYPE="ext3"      /dev/sdb5: UUID="uZ1fiS-5Wo4-VNzC-gzs0-ekVz-Bepn-1MZe82" TYPE="LVM2_member"      /dev/sde1: LABEL="My Book" UUID="A2CA0AEBCA0ABC13" TYPE="ntfs"      /dev/sdf1: UUID="5F8C6ED4773C3763" TYPE="ntfs"      ------------------------------------------------------------     ~ » sudo vgs       Couldn't find device with uuid uZ1fiS-5Wo4-VNzC-gzs0-ekVz-Bepn-1MZe82.       VG   #PV #LV #SN Attr   VSize   VFree         Rand   1   2   0 wz--n- 111.55g      0        main   2   6   0 wz-pn-   1.82t 461.76g     ------------------------------------------------------------     ~ » sudo vgscan       Reading all physical volumes.  This may take a while...       Found volume group "Rand" using metadata type lvm2       Couldn't find device with uuid uZ1fiS-5Wo4-VNzC-gzs0-ekVz-Bepn-1MZe82.       Found volume group "main" using metadata type lvm2     ------------------------------------------------------------     ~ » sudo pvscan       Couldn't find device with uuid uZ1fiS-5Wo4-VNzC-gzs0-ekVz-Bepn-1MZe82.       PV /dev/sdb5        VG Rand   lvm2 [111.55 GiB / 0    free]       PV unknown device   VG main   lvm2 [1.36 TiB / 0    free]       PV /dev/sda1        VG main   lvm2 [465.76 GiB / 461.76 GiB free]       Total: 3 [1.93 TiB] / in use: 3 [1.93 TiB] / in no VG: 0 [0   ]     ------------------------------------------------------------


title: How to make a process invisible to other users?

text: How could you launch a process and make it invisible to the `top` command? The process is started by a normal user (not root), and should not be visible to other normal users.


title: Use/See whole the flash memory space

text: When we bought a N Giga Byte flash memory, the free space that the OS provide for us, is less than N GigaBytes. For example, for a 2 GB flash memory, total space that we can use, is 1.86 GB. ![enter image description here](http://i.stack.imgur.com/jUF2E.jpg) As far as I know, the difference is for metadata. Is that right? **My question :** Is there any command or program in linux, to see or use whole the 2GB space? can I see those metadata and filesystems? Appreciate your time and consideration.


title: Script always runs two instances

text: I was just curious, what may be the reason why script run two instances when executed. Whenever I run my script `foo.sh`, and when I check using:               $ ps -ef | grep foo.sh      It always returns two instances.               user 30643 28793  0 11:09 pts/4    00:00:00 /bin/sh /foo.sh     user 30645 30643  0 11:09 pts/4    00:00:04 /bin/sh /foo.sh      ### foo.sh Here's the contents of the script.               #!/bin/sh           string="<IPADDRESS>"      string2="<HOSTNAME>"      string3="|"      _date=$(date +"%D")      _time=$(date +"%T")                tail -n 0 -F /tmp/snmp_debug.log | \      while read LINE      do      echo $LINE | grep -q $string      if [ $? = 0 ]      then      hostAdd=$(echo $LINE | awk -F'[][]' '{print $2;}')      echo "HostIP: $hostAdd" >> sqlInsert.log      fi           echo $LINE | grep -q $string2      if [ $? = 0 ]      then      echo "$_date $_time" >> sqlInsert.log      hostName=$(echo $LINE | awk -F'[<>]' '{print $4}')      echo "Hostname: $hostName" >> sqlInsert.log      fi           echo $LINE | grep -q $string3      if [ $? = 0 ]      then      #output number of delimiters      pipeNo=$(echo $LINE | awk -F '|' '{print NF-1}')           #CCN Alarms      if [ $pipeNo == 8 ]      then      echo $pipeNo >> sqlInsert.log      errorTrim=$(echo $LINE | awk -F '[|-]' '{print $7}')      echo $errorTrim >> sqlInsert.log           #map CCN severity      sevLev=$(echo $LINE | awk -F '|' '{print $7}')      if [ $sevLev == 1 ]      then      sevLev=1;      elif [ "$sevLev" -ge 2 ] && [ "$sevLev" -lt 6 ]      then      sevLev=10;      elif [ $sevLev == 6 ]      then      sevLev=5;      fi      echo "Sev $sevLev" >> sqlInsert.log           probCause_t=$(echo $LINE | awk -F '|' '{print $6}')      probCause=$(grep -E "^$probCause_t" CCNProbCause.lookup | awk -F '|' '{ print $2 }')      echo "ProbCause $probCause" >> sqlInsert.log      alarmRem1=$(echo $LINE | awk -F '|' '{print $3 $8 $9}')      alarmRem2=$(echo $alarmRem1 | sed "s/\"//g;s/\://g")      alarmRem="$probCause $alarmRem2"      echo "Rem $alarmRem" >> sqlInsert.log      C_type=$(echo $LINE | awk -F '|' '{print $5}')      echo "C-type $C_type" >> sqlInsert.log      alarmType=$(grep -E "^$C_type" EricssonEventsCCN.lookup | awk -F '|' '{ print $2 }')      echo "Type $alarmType" >> sqlInsert.log                ##Connect and insert to DB >> CCN      sqlplus -s UPM_USER/UPM_USER << EOF >> sqlInsert.log      insert into alarmlog_06 (errorid,agentid,moduleid,moduleinstance,hostaddress,severity,remarks,status,entrydate,umuidate,classid) VALUES ($errorTrim,28,6034,1,'$hostAdd',$sevLev,'$alarmRem','P',sysdate,sysdate,$alarmType);      commit;      exit;      EOF           #echo "Done Inserting to DB" >> sqlInsert.log      echo "======================================" >> sqlInsert.log           #SDP & AIR Alarms      elif [ $pipeNo == 5 ]      then      echo "Pipe: $pipeNo" >> sqlInsert.log      probCause_t=$(echo $LINE | awk -F '|' '{print $5}')      probCause=$(grep -E "^$probCause_t" SDPAIRProbCause.lookup | awk -F '|' '{ print $2 }')      echo "ProbCause $probCause" >> sqlInsert.log      alarmRem1=$(echo $LINE | awk -F '|' '{print $3}')      alarmRem2=$(echo $alarmRem1 | sed "s/\"//g;s/\://g;s/\;//g")      #alarmRem="$alarmRem2 $probCause"      alarmRem="$alarmRem2"      echo "Rem $alarmRem" >> sqlInsert.log      SA_type=$(echo $LINE | awk -F '|' '{print $4}')      alarmEType=$(grep -E "^$SA_type" EricssonEventsSDP.lookup | awk -F '|' '{ print $2 }')      echo "EventType $alarmEType" >> sqlInsert.log      alarmModesc=$(echo $LINE | awk -F '[|-]' '{print $7}')      echo "AlarmModelDesc $alarmModesc" >> sqlInsert.log      moduleid=$(grep "$alarmModesc" EricssonLookup.lookup | awk -F '|' '{ print $4 }')      echo "MOduleID $moduleid" >> sqlInsert.log           #map Severity for SDP & AIR      sev1=$(echo $LINE | awk -F '|' '{print $6}')      echo "Severity $alarmSev" >> sqlInsert.log      if [ -z "$sev1" ]      then      sev=$(grep "$alarmModesc" EricssonLookup.lookup | awk -F '|' '{ print $3 }')      if [ -z "$sev" ]      then      sev=10; #default severity for sdp&air (10) error      else      #map returned severity value      if [ $sev == 1 ]      then      sev=1;      elif [ "$sev" -ge 2 ] && [ "$sev" -lt 6 ]      then      sev=10;      elif [ $sev == 6 ]      then      sev=5;      fi      fi      echo "Severity $sev" >> sqlInsert.log      else      sev=$sev1      fi           errornum=$(grep "$alarmModesc" EricssonLookup.lookup | awk -F '|' '{ print $2 }')      if [ -z "$errornum" ]      then      errornum=      insertstring="insert into alarmlog_06 (agentid,moduleinstance,hostaddress,severity,remarks,status,entrydate,umuidate,classid) VALUES (28,1,'$hostAdd',$sev,'$alarmRem','P',sysdate,sysdate,$alarmEType);"      echo "ErrorID Not Found" >> sqlInsert.log      else      insertstring="insert into alarmlog_06 (errorid,agentid,moduleid,moduleinstance,hostaddress,severity,remarks,status,entrydate,umuidate,classid) VALUES ($errornum,28,$moduleid,1,'$hostAdd',$sev,'$alarmRem','P',sysdate,sysdate,$alarmEType);"      echo "ErrorID $errornum" >> sqlInsert.log      fi           ##Connect and insert to DB      sqlplus -s UPM_USER/UPM_USER << EOF >> sqlInsert.log      $insertstring      commit;      exit;      EOF      echo "========================================" >> sqlInsert.log      fi      fi      done


title: zip -r v/s zip -R

text: What is the difference between `-r` and `-R` in `zip` command. Obviously, I have googled about it. Also, I have referred this in quest of finding the difference, but didn't got clarification. Can anyone from community help me for this?


title: Making htop summaries respect --pid

text: I'm running this:               $ htop --pid=3907,3940,3941,3947      and would like to make the CPU/Memory at the top _only_ count those PIDs. Is this possible? ### Other questions Also, are there flags for:   1. enter 'tree' mode on startup, or    2. change columns displayed?  I'm trying to do it in a script, I know there are interactive methods.


title: How can I tell what version of OS X I'm on from the command line?

text: I frequently find myself SSHing into various OS X machines, and it'd be useful if I could tell what version of OS X I was on when I'm doing that. `uname -a` doesn't quite work, since Darwin kernel versions don't always change with the rest of the system.


title: Debian web server inaccessible after moving VM

text: I have a dev laptop with Debian + LAMP as the dev env. We are using virtualbox and there are 2 network adapters : NAT and VB Host Only. I copied the VHD over to my desktop and setup the VM using the VHD and added NAT and VB Host only adapters to the VM in the VirtualBox interface. However when I boot up the VM I can no longer access the website on 192.168.56.101 On Firefox there is a weird message saying "the connection has been reset" but I don't know how to fix this. Is this a DNS cache problem?


title: UDP commands for Linux and Mac?

text: I'm trying to test UDP between 2 terminals in the same machine. For instance: **Terminal 1**   * UDP listener@port:3000    * UDP sender to port:3001 **Terminal 2**   * UDP listener@port:3001   * UDP sender to port:3000 and testing the above under the environment - MacOSX terminal and Linux Terminal (Android Emulators). Anyone knows command for this? I've googled and found `nc` for UNIX, but for OSX https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/nc.1.html               $ nc                                                                     [~]     usage: nc [-46AcCDdFhklMnOortUuvz] [-K tc] [-b boundif] [-i interval] [-p source_port]           [-s source_ip_address] [-w timeout] [-X proxy_version]           [-x proxy_address[:port]] [hostname] [port[s]]      It seems that `nc` does not have `-u` option for UDP. * * * EDIT: I've got answers that suggest the OSX `nc` does have `-u` option. Having said that. Aside from this Question, here's what I've done as the final approarch; **For OSX:** I use node.js instead of Shell commands for these UDP testing. This is much more powerful and comfortable to me. **For Android(Linux):** I prepared a test Android App project to test. Clone the project, and open the identical projects, and run 2 identical instances(emulators). Just for future references.


title: How do I make Iceweasel\Firefox only display images on specified sites?

text: Summary: In Iceweasel (it's effectively Firefox), I want to block all images, but allow images on websites I specify. But the standard method to do this is not working. The way you're supposed to be able to do this is as follows. In Iceweasel, select Edit/Preferences/Content and UNCHECK LoadImagesAutomatically. Select Exceptions, enter a website name, select "Allow". Now, Iceweasel should display images for websites with the "Allow" designaton, but not for any other site. But images are NOT displayed on the "Allowed" sites. NO images are shown on any sites. And I've got the NoScript extension disabled. I have no other extensions. Am I doing something wrong? If I have to use a workround, I don't want an extension that just toggles images on and off. I want to have images blocked by default, and only allow them on sites I choose. Many thanks if you have a solution. Full Details: I'm using Iceweasel 10.0.4. Is this an Iceweasel bug? Is there a workround? CHECKING LoadImagesAutomatically does display images on all sites as you'd expect.


title: Acpitool no information

text: When I run as root `acpitool` I recieved                Battery is not present, bailing out.        AC adapter     : <info not available>        Thermal info   : <not available>      I can understand why all the acpi modules are compiled in the kernel (3.14.4), this is the output of `cat /boot/config | grep acpi` I get               CONFIG_ACPI_AC=y     CONFIG_ACPI_BATTERY=y     CONFIG_ACPI_BUTTON=y     CONFIG_ACPI_VIDEO=m     CONFIG_ACPI_FAN=y     CONFIG_ACPI_DOCK=y     CONFIG_ACPI_PROCESSOR=y     # CONFIG_ACPI_IPMI is not set     CONFIG_ACPI_HOTPLUG_CPU=y     CONFIG_ACPI_PROCESSOR_AGGREGATOR=m     CONFIG_ACPI_THERMAL=y     # CONFIG_ACPI_CUSTOM_DSDT is not set     CONFIG_ACPI_DEBUG=y     # CONFIG_ACPI_PCI_SLOT is not set     CONFIG_ACPI_CONTAINER=y     # CONFIG_ACPI_SBS is not set     # CONFIG_ACPI_HED is not set     # CONFIG_ACPI_CUSTOM_METHOD is not set     # CONFIG_ACPI_APEI is not set     # CONFIG_ACPI_EXTLOG is not set     CONFIG_X86_ACPI_CPUFREQ=y     CONFIG_X86_ACPI_CPUFREQ_CPB=y     # CONFIG_HOTPLUG_PCI_ACPI is not set     CONFIG_PNPACPI=y     CONFIG_BLK_DEV_IDEACPI=y     CONFIG_ATA_ACPI=y     CONFIG_PATA_ACPI=y     # ACPI drivers     CONFIG_GPIO_ACPI=y     # ACPI drivers     CONFIG_SENSORS_ACPI_POWER=m     # CONFIG_ACPI_INT3403_THERMAL is not set     # CONFIG_MMC_SDHCI_ACPI is not set     CONFIG_DMA_ACPI=y     # CONFIG_ACPI_QUICKSTART is not set     CONFIG_THINKPAD_ACPI=m     CONFIG_THINKPAD_ACPI_ALSA_SUPPORT=y     CONFIG_THINKPAD_ACPI_DEBUGFACILITIES=y     CONFIG_THINKPAD_ACPI_DEBUG=y     CONFIG_THINKPAD_ACPI_UNSAFE_LEDS=y     CONFIG_THINKPAD_ACPI_VIDEO=y     CONFIG_THINKPAD_ACPI_HOTKEY_POLL=y     CONFIG_ACPI_WMI=y     CONFIG_ACPI_TOSHIBA=m     # CONFIG_ACPI_CMPC is not set      The ACPI_TOSHIBA module is loaded.The acpid daemon is running. Can someone help me and suggest me how to investigate more in the problem?


title: Merge files using zipper method / late merge

text: I am searching for a nice method of merging two or more files line by line using the zipper method (also called late merge). Assuming we have three files, the result should look like this:               line1 file1     line1 file2     line1 file3     line2 file1     line2 file2     line2 file3     ...      **EDIT** I wrote a little python script capable of doing this:               #!/usr/bin/python          import sys, itertools          fileList = []     for file in sys.argv[1:]:         f = open(file, "r")         fileList.append(f.read().split("\n"))          for z in itertools.izip_longest(*fileList):         print "\n".join([i for i in z if i is not None])      I still wonder if there is any standard tool or a clever combination of them doing the same thing.


title: How to implement a horizontal cat?

text: Standard `cat` concatenates files line by line (row by row, if you will). I find myself needing a _horizontal_ `cat` command more and more often recently; i.e. a command that takes a list of files and concatenates them horizontally, column by column. So far I’ve used ad-hoc workarounds but I’d like to know if there exists a good solution for this. To clarify, consider the following comparison between `cat` and `hcat` of two files:               $ cat a.dat 1.dat     a b     c d     1 2     3 4     $ hcat -s ' ' a.dat 1.dat     a b 1 2     c d 3 4      (Unlike for `cat` we need to specify a separator since by convention UNIX files don’t have a column separator at the end.)


title: BSD Books - Best books for OpenBSD and FreeBSD

text: I will begin a thorough study of the OpenBSD and FreeBSD, which are the most complete books? * * * I found these, which are the best?   * Openbsd books   * Freebsd books


title: Crontab not working

text: I'm trying execute a basic shutdown crontab to run M-F at 10PM. So I did the following:               sudo crontab -e      Once inside of the crontab I added the following line:               0 22 * * 1-5 shutdown now      The job doesn't seem to be running properly and I cannot find any errors in `/var/log/syslog`. Is there anything glaringly wrong here?


title: Terminal freezes after using tar or gz

text: On Linux within `bash` the Pseudo Terminal window (`terminator`) as well as the Terminal itself "freezes" when trying to use autocomplete (`TAB`) as well as after getting an error message using `gzip` and `tar`. So far this only happens with `gzip` and `tar`…   * after getting an error message (own fault, typos, etc.)   * using autocomplete `CTRL`+`C` somehow solves the problem in so far as I can work on and have (up to now) no problems with other commands EXCEPT `tar`. Thus, the problem is repeatable. I would very much appreciate help from here on. I can isolate the problem further, as it had a "comback": As hinted in a comment, ~~un~~ commenting the following section in **`~/home/USER/.bashrc`**               # if ! shopt -oq posix; then     #  if [ -f /usr/share/bash-completion/bash_completion ]; then     #    . /usr/share/bash-completion/bash_completion     #  elif [ -f /etc/bash_completion ]; then     #    . /etc/bash_completion     #  fi     # fi      helped in so far as _trying_ to use autocomplete   * still sends the Terminal Emulation (`pts`) into deep freeze when using `TAB` after the first occurrence of `\--` until `CTRL`+`C` ends it   * the real terminal (`tty`) seems to ignore `TAB` completely with `gzip` and `tar`. I could live that and a long face, but then … really? **Config Files** The other config file (I know) for completion would be `/etc/bash.bashrc` which would turn completion off completely I guess. Not good. The config files for the terminal emulator doesn't have any settings for autocomplete or such I can type some characters and then the Terminal freezes - takes no more keystrokes. This happens both in an emulated terminal window (`pts`) in the GUI and also "real" promt (`tty`). I work from a keyboard connected via USB, and not on a laptop or the like. What would be a proper way to kill a terminal session like: »kill `tty1` from `tty2`« because this is exactly what I'm stuck here!


title: Editing a sequence of fields in vim

text: I have a file like this:               INSERT INTO `example`     (`name`, `location`, `height`)     VALUES     ('A', '', ''),     ('B', '', ''),     ('C', '', '');      I want to fill in the middle set of quote marks (the ones under `location`) so that I end up with               INSERT INTO `example`     (`name`, `location`, `height`)     VALUES     ('A', 'one',   ''),     ('B', 'two',   ''),     ('C', 'three', '');      What's a good way to do that? Aligning the third column of quotes isn't necessary, but preferred.


title: How to set on executable bit for a particular file automatically

text: I want that when i make create a particular file, suppose i create it in vim editor, the created file should get executable permission as well when it gets created . I want this as i am creating some python files and don't want to explicitly set permissions for the file so i want some way so that executable bit is set as soon i create a file with particular extension or with a particular editor.


title: How can I use netconsole to help solve a kernel panic?

text: When I try to use a raid as root, my system panics. I want to read the kernel output right before the panic, but can't scroll up. After Googling a bit, I wanted to try netconsole. but I get no output at all on the 2nd machine **relevant parts of my current grub.conf**               title Gentoo Linux 3.0.6     root (hd0,0)     kernel /boot/linux-3.0.6-gentoo root=/dev/md3          title Gentoo Linux 3.0.6 (debug netconsole)                                                                                root (hd0,0)                                                                                kernel /boot/linux-3.0.6-gentoo-debug root=/dev/md3 netconsole=@/,6666@192.168.0.27/00:18:f3:a8:09:61                                               #kernel /boot/linux-3.0.6-gentoo-debug root=/dev/md3 netconsole=6665@192.168.0.26/eth0,6666@192.168.0.27/00:18:f3:a8:09:61          title Gentoo Linux 3.0.6 (no root/auto root)     root (hd0,0)     kernel /boot/linux-3.0.6-gentoo        * the 1st fails with a kernel panic   * the 2nd is the one i try to use netconsole   * the 3th starts but use the wrong/old root The other computer is running a Kubuntu LiveCD where I started `nc -u -l 6666`.   And if I start the (first) computer with 3th grub option, I can run `nc -u 192.168.0.27 6666` to communicate with the 2nd computer. The difference between `/boot/linux-3.0.6-gentoo` and `/boot/linux-3.0.6-gentoo-debug` is that I enabled:   * Kernel hacking -> Kernel debugging   * Kernel hacking -> Delay each boot printk message by N milliseconds   * Device Drivers -> Network device support -> Network console logging support ## Questions   1. Is my (2nd) grub config correctly defined?   2. Are there more kernel config options I should be enabling?   3. Is there more information about the specific machine hardware I should provide detail for?   4. Is there some way to just enable me to scroll back up after a panic?


title: Why can't tar extract .zip files?

text: I tried a majority of the formats (gzip, etc.) to extract a zip file with `tar`, and when I became frustrated enough to Google for it, I found no way to extract a zip file with `tar` and only recommendations to use `zip` or `unzip`. As a matter of fact, my Linux system doesn't even have a `zip` utility, but only `unzip` (leaving me to wonder why this is the main recommended option). Of course `unzip` worked, solving my problem, but why can't `tar` extract zip files? Perhaps I should instead be asking, what is the difference between zip and the compression methods supported by `tar`?


title: Grub2 unable to boot encrypted root

text: I'm using ArchLinux, I followed their tutorial on encrypting your root filesystem: https://wiki.archlinux.org/index.php/Using_DM-Crypt But I cannot get grub to boot the encrypted partition. My grub file looks like this:               root (hd0,2)     kernel /vmlinuz-linux cryptdevice=/dev/sda4:root root=/dev/mapper/root ro     initramfs /intiramfs-linux.img      I've tried editing this to everything I could think of, and everything I could find online, but nothing will boot. It always gives me this error:               ERROR: device '/dev/mapper/root' not found. Skipping fsck.     ERROR: unable to find root device '/dev/mapper/root'.      Any help would be greatly appreciated.


title: Migrating a Virtualbox virtual machine into a physical dual-boot system

text: I'm running a Linux Mint 12 virtual machine in Virtualbox. I would like to move it into a dual-boot setup with my Windows 7 installation. I have lot of settings in there, and apps installed, and my research says that I cannot just copy files. I guess I could accomplish this by having some kind of list that I could then import for apt-get to install, and then have a back-up of my ~/ files... Am I on the right track, or totally lost?


title: How do I find the full history of a file?

text: I need to know the full history of a file, like if someone changed or moved it to some other places since the time when it is created.


title: Installing Xmgrace on Mac problem

text: Hi I'm totally new to UNIX, I use my console for 2 months only and only know the very basic commands... I have worked on a machine previously and have been using the xmgrace command to make some figures. Now I do not have physical access to this machine and have to ssh to it from mine. This takes a long time and modifying xmgrace figures through ssh is really really slow. I'm trying to install xmgrace on my MacBook Pro to be able to do it on my laptop and then transfer the file through ssh... Problem is, I do not understand anything on how install xmgrace. So I've tried what they tell here : http://www.phy.ohiou.edu/~hadizade/MRHadizadeh/Blog/Entries/2013/8/5_Installing_XmGrace_%28Grace%29_on_Mac_OS_X.html. I have installed motif libraries and then copied exactly this :               cd Desktop     curl -O ftp://ftp.fu-berlin.de/unix/graphics/grace/src/grace5/grace-latest.tar.gz     tar xzvf grace-latest.tar.gz     cd grace-5.1.24     ./configure --x-includes=/usr/X11/include --x-libraries=/usr/X11/lib \--with-motif-library=-lXm  --with-extra-incpath=/usr/OpenMotif/include:/Users/sm4082/fftw-2.1.5/include \--with-extra-ldpath=/usr/OpenMotif/lib:/Users/sm4082/fftw-2.1.5/lib     make     sudo make install     echo "export PATH=$PATH:/usr/local/grace/bin" >> ~/.bashrc     source ~/.bashrc     xmgrace      Problem is, at line ./configure*...* I get an error :               checking for a Motif >= 1002 compatible API... no     configure: error: M*tif has not been found      (Actually I get a ton of others messages but these are the last two lines) I have no idea on what I should do to get xmgrace... Could anyone help on this ?


title: Local mail delivery not working

text: We are using RHEL 6.1 server. We need to send a mail from server to local domain (tcs.com). we are using mail command for this purpose.               [bsoauser@hsluabsoa ~]$ echo "hi" | mail -s "test" abc.d@tcs.com     [bsoauser@hsluabsoa ~]$      command is working but we are not getting mails.In /var/log/maillog we found the following error:               Nov  7 15:58:05 hsluabsoa postfix/local[13579]: 02A86FAB:          to=<abc.d@tcs.com>, relay=local, delay=0.51,          delays=0.1/0.35/0/0.06, dsn=5.1.1, status=bounced          (unknown user: "abc.d")


title: (KDE or X ) Script opens konsole in wrong virtual desktop

text: I have this script. I put it in ~/Desktop. I view the script on my desktop in a "Folder View" widget. When I click on the script, I get list of users, then I get an authorization dialog box ( for a password ), then I get a "konsole" which I would like to appear in the same virtual desktop. Unfortunately it appears in a random virtual desktop. Because I do not know how much of the "protocol" of VDs is X and how much is KDE's, I do not know where the problem lays. What causes this behavior? How can I fix this behavior, so it appears in the active VD? I tried asking this question on the freenode IRC channel #linux where a person nicked Psi_Jack gaver me a lot of grief over the script, ,ostly because I called ruby from bash. Here are the facts, I wanted to only access "real" users eg "mom","pop","sis","mouse" and not "saned","mysqld","fethmail" etc. So I had to test user ids. While not very hard in bash it is messier then I like. In those cases I use ruby, because -- well part of ruby's raison d'etre is to cleanup some of the mess of perl, and part of perls raison d'etre is to clean up the mess of the various scripting shells. The thing is I know the ruby is correct, and AFAICS there is no real problem with the script except in the line "/usr/lib/kde4/libexec/kdesu -u $KA_USER konsole". So please lay off the script.               #!/usr/bin/env sh          #  kstart --desktop [#] [command]     # Assign to dlg the specified user.     dlg=$(ruby <<EOF          command = "zenity  --list --column=User root"     File.new("/etc/passwd").readlines.each{|l|     fields=l.split(":")     if ( fields[2].to_i > 1000 and fields[2].to_i<60000) then       command = command+" #{fields[0]}"     end     }     puts command     EOF     )          # Execute zenity dialog, assign choice to KA_USER     KA_USER=$($dlg)     if [ -n "$KA_USER" ]      then         t=$(mktemp --suffix=log /tmp/sukon-XXXX)         /usr/lib/kde4/libexec/kdesu -u $KA_USER konsole      fi


title: Host CPU does not scale frequency when KVM guest needs it

text: I have asked this question on serverfault, but it could also have been posted here. I will synchronise the answers if one is found. **Observation:**   I have an HP server with an AMD dual core CPU (Turion II Neo N40L) which can scale frequencies from 800 to 1500 MHz. The frequency scaling works under FreeBSD 9 and under Ubuntu 12.04 with the Linux kernel 3.5. However, when I put FreeBSD 9 in a KVM environment on top of Ubuntu the frequency scaling does not work. The guest (thus FreeBSD) does not detect the minimum and maximum frequencies and thus does not scale anything when CPU occupation gets higher. On the host (thus Ubuntu) the KVM process uses between 80 and 140 % of the CPU resource but no frequency scaling happens, the frequency stays at 800 MHz, although when I run any other process on the same Ubuntu box, the ondemand governor quickly scales the frequency to 1500 MHz! **Concern and question:**   I don't understand how the CPU is perhaps virtualised, and if it is up to the guest to perform the proper scaling. Does it require some CPU features to be exposed to the guest for this to work? **Apendix:**   The following Red Hat release note tends to suggest that frequency scaling out to work even in a virtualised environment (see chapter 6.2.2 and 6.2.3), thought the note fails to address which virtualisation technology this work with (kvm, xen, etc.?) For information, the `cpufreq-info` output on Ubuntu is:               $ cpufreq-info     cpufrequtils 007: cpufreq-info (C) Dominik Brodowski 2004-2009     Report errors and bugs to cpufreq@vger.kernel.org, please.     analyzing CPU 0:       driver: powernow-k8       CPUs which run at the same hardware frequency: 0       CPUs which need to have their frequency coordinated by software: 0       maximum transition latency: 8.0 us.       hardware limits: 800 MHz - 1.50 GHz       available frequency steps: 1.50 GHz, 1.30 GHz, 1000 MHz, 800 MHz       available cpufreq governors: conservative, ondemand, userspace, powersave, performance       current policy: frequency should be within 800 MHz and 1.50 GHz.                       The governor "ondemand" may decide which speed to use                       within this range.       current CPU frequency is 800 MHz.       cpufreq stats: 1.50 GHz:14.79%, 1.30 GHz:1.07%, 1000 MHz:0.71%, 800 MHz:83.43%  (277433)     analyzing CPU 1:       driver: powernow-k8       CPUs which run at the same hardware frequency: 1       CPUs which need to have their frequency coordinated by software: 1       maximum transition latency: 8.0 us.       hardware limits: 800 MHz - 1.50 GHz       available frequency steps: 1.50 GHz, 1.30 GHz, 1000 MHz, 800 MHz       available cpufreq governors: conservative, ondemand, userspace, powersave, performance       current policy: frequency should be within 800 MHz and 1.50 GHz.                       The governor "ondemand" may decide which speed to use                       within this range.       current CPU frequency is 800 MHz.       cpufreq stats: 1.50 GHz:14.56%, 1.30 GHz:1.06%, 1000 MHz:0.79%, 800 MHz:83.59%  (384089)      The reason I want this feature to work is: save energy, run quieter (less hot) and also simple curiosity to understand better why this is not working and how to make it work.


title: The NTFS partition is in an unsafe state

text: I try to mount a NTFS partition in nautilus, and it refuse to mount it and suggests `resume and shutdown Windows fully (no hibernation or fast restarting)`, the problem is that I have already disabled fast restart and there is no options to hibernate in Windows 8.


title: Why does every user have his own group?

text: One thing I've noticed in a lot of recent distros is that users all have their own groups with the same name as their user name. What's the purpose of that? Groups are made to group users together in some ways, such as _users_ , _management_ , _IT_ , etc. Seems pointless to have all these single-user groups. I seem to recall Unix systems before did have everyone's default group be _users_.


title: Why is the output of this paste command split on separate lines with indents?

text: I was trying to merge files using either of these commands:               paste data_{1..2}.txt > 1_2.txt          paste <(awk '{print $1}' data_2.txt ) <(awk '{print $1}' data_2.txt) > 1_2.txt      But the columns in the output _don't line up_. I tried to clean tabs and spaces but I still get the same result. Here is my sample data below for _data_1.txt_ :               TMAX     34.2481     19.1582     -0.903817     -0.408851     -0.849964     0.596377     0.922126     -5.13179     -17.4449     -15.1031     -12.5849     -12.2548      ...and for _data_2.txt_ :               TMAX     33.629     18.5924     -1.37411     -1.00714     -1.48201     0.0046866     0.295162     -5.69127     -18.0672     -15.7163     -13.1048     -12.8443     -11.9689      The combined _output_ :               TMAX         TMAX     34.2481         33.629     19.1582         18.5924     -0.903817         -1.37411     -0.408851         -1.00714     -0.849964         -1.48201     0.596377         0.0046866     0.922126         0.295162     -5.13179         -5.69127     -17.4449         -18.0672     -15.1031         -15.7163      What is expected of course is for the columns to line up like so:               TMAX    TMAX     34.2481 33.629     19.1582 18.5924     -0.903817   -1.37411     -0.408851   -1.00714     -0.849964   -1.48201     0.596377    0.0046866     0.922126    0.295162     -5.13179    -5.69127     -17.4449    -18.0672     -15.1031    -15.7163     -12.5849    -13.1048     -12.2548    -12.8443     -11.371 -11.9689      Why am I getting the distorted output with lines split and indentation?


title: "E: Sub-process /usr/bin/dpkg returned an error code (1)" when I try and install OpenVPN. What is this?

text: Whenever I try and install OpenVPN on My Debian x86 Minimal VPS I get that error. Here is the full code if that helps:               root@fadvps:/# sudo apt-get install openvpn     Reading package lists... Done     Building dependency tree            Reading state information... Done     openvpn is already the newest version.     The following packages were automatically installed and are no longer required:       gconf-service gconf2 gconf2-common libasound2-dev libavahi-client-dev libavahi-common-dev libcaca-dev libdbus-1-dev libdbus-glib-1-2       libdirectfb-extra libelfg0 libevent-2.0-5 libgconf-2-4 libgd2-xpm libglib2.0-bin libglib2.0-dev libicu48 libjbig-dev libjpeg8-dev libnatpmp1       libpcre3-dev libpcrecpp0 libpng12-dev libpthread-stubs0 libpthread-stubs0-dev libpulse-dev libpulse-mainloop-glib0 libslang2-dev       libtiff4-dev libtiffxx0c2 libts-dev libva-egl1 libva-glx1 libva-tpi1 libva-x11-1 libvdpau1 libwebp-dev libx11-doc libxau-dev libxcb1-dev       libxdmcp-dev postgresql-common ssl-cert transmission-common transmission-gtk x11proto-core-dev x11proto-fixes-dev x11proto-input-dev       x11proto-kb-dev x11proto-xext-dev xorg-sgml-doctools xtrans-dev     Use 'apt-get autoremove' to remove them.     0 upgraded, 0 newly installed, 0 to remove and 368 not upgraded.     1 not fully installed or removed.     After this operation, 0 B of additional disk space will be used.     Do you want to continue [Y/n]? Y     perl: warning: Setting locale failed.     perl: warning: Please check that your locale settings:         LANGUAGE = (unset),         LC_ALL = (unset),         LANG = "en_US.UTF-8"         are supported and installed on your system.     perl: warning: Falling back to the standard locale ("C").     locale: Cannot set LC_CTYPE to default locale: No such file or directory     locale: Cannot set LC_MESSAGES to default locale: No such file or directory     locale: Cannot set LC_ALL to default locale: No such file or directory     Setting up fuse (2.9.3-15) ...     Creating fuse device...     /run/udev or .udevdb or .udev presence implies active udev.  Aborting MAKEDEV invocation.     chmod: cannot access `/dev/fuse': No such file or directory     dpkg: error processing fuse (--configure):      subprocess installed post-installation script returned error exit status 1     Errors were encountered while processing:      fuse     E: Sub-process /usr/bin/dpkg returned an error code (1)      What's causing these errors?


title: Keymapping problem when working with Emacs and Openbox

text: I have an Apple keyboard and I had to do some remapping of the keys to make the `mod-4` key the first key to the left of the `Space` bar for when working with Emacs. The below script worked fine when I was using the dwm window manager, but after switching to Openbox I have found that instead of swapping keycodes between the option and command keys, both of the keys are doing the same thing. One odd thing I noticed, was on the new setup when I click run `showkey` and press the option and command keys I get 56 and 125 respectively, but these keys don't work at all when inserting them into the below script instead of the 64 and 133. I must admit I created the script below by continually tweaking it until it worked so there could be a much better way of doing it. ### .xmodmap               # switch alt and command...the switch is not being done properly     xmodmap -e "keycode 64 = Alt_L"     xmodmap -e "keycode 133 = Meta_L"          # remap of mod 4     xmodmap -e "clear Mod4"     xmodmap -e "add Mod4 = Super_L"      # Update I got used to the previous keyboard setup and gave up trying to tweak it. Unfortunately, after a recent restart the `CapsLock` to `Ctrl` no longer worked so here I am again. This time instead of the mapping used above I ran `xmodmap -pke > ~/.xmod` and tweaked the keys there instead (which is much easier). However, things are still not quite right. The `CapsLock` still functions as normal except when the `xev` command is run, then it returns the following which does seem to show the correct mapping:               # caplock     KeyRelease event, serial 40, synthetic NO, window 0x2200001,     root 0x156, subw 0x0, time 4858000, (57,-31), root:(426,402),     state 0x2, keycode 66 (keysym 0xffe3, Control_L), same_screen YES,     XKeysymToKeycode returns keycode: 37     XLookupString gives 0 bytes:      XFilterEvent returns: False          # ctrl-L     KeyRelease event, serial 40, synthetic NO, window 0x2200001,     root 0x156, subw 0x0, time 4805947, (686,148), root:(1055,581),     state 0x4, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,     XLookupString gives 0 bytes:      XFilterEvent returns: False          # Alt-L     KeyPress event, serial 40, synthetic NO, window 0x2200001,     root 0x156, subw 0x0, time 4555825, (-158,-649), root:(959,133),     state 0x0, keycode 64 (keysym 0xffeb, Super_L), same_screen YES,     XLookupString gives 0 bytes:      XmbLookupString gives 0 bytes:      XFilterEvent returns: False          # Super-L     KeyRelease event, serial 40, synthetic NO, window 0x2200001,     root 0x156, subw 0x0, time 4920564, (-63,169), root:(306,602),     state 0x40, keycode 133 (keysym 0xffe9, Alt_L), same_screen YES,     XLookupString gives 0 bytes:      XFilterEvent returns: False


title: "vmware-installer: command not found" when trying to uninstall VMware Player

text: I am using fedora 16` and I need to uninstall VMware Player and VMware Workstation. I tried this:               [root@Feddy non-admin]# vmware-installer --uninstall-product vmware-player     bash: vmware-installer: command not found...      but the result says , `command not found`. In this case how do I uninstall VMware?


title: How to set library searching path using environment variable in compile-time

text: -I option set header file searching path for **gcc/g++** , and CPLUS_INCLUDE_PATH/CPATH append the searching path list. Then what about libs? It seems that **LD_LIBRARY_PATH** is just a path list for **run-time** library searching. -L option is necessary to specify any lib path other than /usr/lib and /usr/local/lib. Is there an environment variable similar to CPATH/CPLUS_INCLUDE_PATH, to do the **compile-time** job?


title: How to get text of a page using wget without html?

text: If I try wget on a webpage, I am getting the page as html. Is it possible to retrieve only text of a file without associated html ? (This is required for me since some of the HTML pages contains c program is getting downloaded with html tags. I have to open it in browser and manually copy the text to make a .c file.)


title: How do I preserve coloured output when piping to `less -R`?

text: $ ffmpeg -v debug ...       Coloured output.               $ ffmpeg -v debug ... |& less -R      Dull output. How do I make the output coloured while piping it to something?


title: svn checkout shows only one file

text: anisha@linux-y3pi:~/Desktop/mysvn> svn list https://earthhtml.googlecode.com/svn/     branches/     manual.cpp     ogmap.html     svn-book.pdf     tags/     trunk/     wiki/      But, this downloads only one file:               anisha@linux-y3pi:~/Desktop/mysvn> svn checkout https://earthhtml.googlecode.com/svn/trunk     Checked out revision 3.          anisha@linux-y3pi:~/Desktop/mysvn> ls     manual.cpp  manual.cpp~  ogmap.html  svn-book.pdf  trunk          anisha@linux-y3pi:~/Desktop/mysvn> cd trunk/     anisha@linux-y3pi:~/Desktop/mysvn/trunk> ls     ogmap.html      Why is that so? http://code.google.com/p/earthhtml/source/browse/#svn%2Ftrunk


What is the difference between DISPLAY :0 and :0.0? On RedHat 5.8, I can right click the desktop to start a shell and DISPLAY will be ":0". If I go to the Menu-System-Terminal to start a shell then DISPLAY will be ":0.0". Can I always assume that these are really the same display? For example, if I VNC in to a machine on DISPLAY 33, can I assume that ":33.0" and ":33" are the same display with the same permissions?


title: How to mount a USB drive

text: I have a USB drive that used to mount with another computer, but won't appear when it should with another. I'm running Ubuntu 11.04 and the drive should appear under "Places". Here's the output of **`dmesg`** :               1:00.0: no space while unhiding cursor     [293385.423359] [drm] nouveau 0000:01:00.0: no space while unhiding cursor     ...     [293445.824471] exe (29828): /proc/29828/oom_adj is deprecated, please use /proc/29828/oom_score_adj instead.     [299465.937891] [drm] nouveau 0000:01:00.0: no space while unhiding cursor      Update: new lines added are               Aug 14 17:47:23 ubuntu kernel: [  128.502091] usblp0: USB Bidirectional printer dev 2 if 0 alt 1 proto 2 vid 0x03F0 pid 0x1004     Aug 14 17:47:23 ubuntu kernel: [  128.502416] usbcore: registered new interface driver usblp     Aug 14 17:47:25 ubuntu kernel: [  130.703847] HDA Intel 0000:00:1b.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16     Aug 14 17:47:25 ubuntu kernel: [  130.703909] HDA Intel 0000:00:1b.0: irq 44 for MSI/MSI-X     Aug 14 17:47:25 ubuntu kernel: [  130.703935] HDA Intel 0000:00:1b.0: setting latency timer to 64     Aug 14 17:47:30 ubuntu kernel: [  135.755667] lp0: using parport0 (interrupt-driven).     Aug 14 17:47:32 ubuntu kernel: [  137.450048] eth0: no IPv6 routers present     Aug 14 17:47:35 ubuntu kernel: [  140.788119] usb 7-1: usbfs: interface 0 claimed by usblp while 'usb' sets config #1


title: UNIX commands help - find

text: I'm trying to learn UNIX commands and I'm playing this game to learn and I'm really stuck at the moment. I'm in a server through ssh and the directory is full of random files and folders and the password for the next level is inside one of the files. I have been told that the file has the following attrbutes:   * human-readable   * 1033 bytes   * non-executable I am guessing that I should use the `find` command and I tried `find ! -executable` but that returned a load of files. The only human-readable help I can find in the manual or online is printing out the file sizes in human readable. So I'm a bit lost there? Also I did try `find ~ -size 1033b` but that returned nothing. But when I tried `find ~ -size -1033b` it returned every file in the directory.


title: No response on a Linux machine

text: I am using centOS, sometimes the system just does not respond at all. In windows box, I can ctrl-alt-delete. On a Linux machine, how should I handle this?


title: What a good text editor with RTL (right-to-left) support?

text: gvim doesn't seem to support it out of the box on my Ubuntu lucid.


title: Linux Mint Wifi

text: I'm running Linux Mint 15 Xfce on a Compaq Presario desktop from 2009. I can't seem to get the wifi working. Rather than ask a general question, here's a simple question: If               $ iwlist wlan0 scanning      returns all the wireless networks available, that means that my wifi card is working? So, if that's true, then the problem is that I'm just not setting it up properly, isn't that so? I've tried to configure it using the tools that Mint provides -> Failure. I've tried to configure it the same way I configured my Slackware laptop -> Failure. ( My Slackware config parameters fail on Mint, even though it's the same network) Looking over 2 or 3 unanswered questions on this site, I can see that others have had similar problems. So, is it a mistake to try to set up a wireless connection on Mint by configuring files, rather than use their GUI wireless system (which seems not to work properly)? Does anyone know whether the Mint developers have set it up so that the usual Linux/Unix way of doing things is disabled (to make things easier for the user, no doubt).


title: Pulseaudio rapidly switches ouputs at high volumes

text: I'm using Pulseaudio. The image is of the Output Devices tab and shows the Port set to Analog Output. This is fine and works great. There's another option called Headphones but if you try and set the Port to Headphones it automatically switches back to Analog Output. This is also fine because I don't want to use that port The problem is that if the volume increases over 87% it automatically switches to Headphones port, which in turns auto switches back to Analog and back and forth quickly and forever making lots of clicking noises. Perhaps related to that "Base" marker on the volume control? No idea here, very strange behavior. ![enter image description here](http://i.stack.imgur.com/2LJHv.png)


title: How many bits is the access flags of a file?

text: How many bits on a linux file system is taken up for the permissions of a file?