title: Automounting not working correctly for CIFS shares; weird results

text: I followed the guide on this page to get samba shares working via autofs: http://www.howtoforge.com/accessing_windows_or_samba_shares_using_autofs **Servers and Configuration** My Samba server (remote) is on a server named "mattserver" (that's its Windows server name). It has four shares, called "backup", "matt", "print", and "web". The Samba client (local) is named "bird". My setup is very similar to the examples in the aforementioned tutorial, except for some differences:   * `/cifs /etc/auto.cifs --ghost` instead of `/cifs /etc/auto.cifs --timeout=60` in `/etc/auto.master`   * `uid=1000,gid=1000` instead of `uid=user,gid=users` in `/etc/auto.cifs` Here's my `/etc/auto.master`:               matt@bird:~ $ cat /etc/auto.master     /cifs /etc/auto.cifs --ghost      Here's my `/etc/auto.cifs`:               matt@bird:~ $ cat /etc/auto.cifs     #!/bin/bash     key="$1"     credfile="/etc/auto.smb.$key"     mountopts="-fstype=cifs,file_mode=0644,dir_mode=0755,uid=1000,gid=1000"     smbclientopts=""     for P in /bin /sbin /usr/bin /usr/sbin     do         if [ -x $P/smbclient ]             then             SMBCLIENT=$P/smbclient             break         fi     done     [ -x $SMBCLIENT ] || exit 1     if [ -e "$credfile" ]     then         mountopts=$mountopts",credentials=$credfile"         smbclientopts="-A "$credfile     else         smbclientopts="-N"     fi     $SMBCLIENT $smbclientopts -gL $key 2>/dev/null \         | awk -v key="$key" -v opts="$mountopts" -F'|' -- '             BEGIN   { ORS=""; first=1 }             /Disk/  { if (first) { print opts; first=0 };             gsub(/ /, "\\ ", $2);             sub(/\$/, "\\$", $2);             print " \\\n\t /" $2, "://" key "/" $2 }             END     { if (!first) print "\n"; else exit 1 }             '      So here's what I get when I call `/etc/auto.cifs` directly:               matt@bird:~ $ sudo bash /etc/auto.cifs mattserver     -fstype=cifs,file_mode=0644,dir_mode=0755,uid=1000,gid=1000,credentials=/etc/auto.smb.mattserver \                 /print\$ ://mattserver/print\$ \                 /matt ://mattserver/matt \                 /web ://mattserver/web \                 /backup ://mattserver/backup      So far, so good, I think. **Testing** When I try to access the `/cifs` directory, I should get one directory called `mattserver`, right? I did put the `\--ghost` option in there. I don't get anything though:               matt@bird:~ $ ls -l /cifs     total 0      When I access the server directory, I get a list of shares but it's screwed up:               matt@bird:~ $ ls -l /cifs/mattserver     ls: cannot access /cifs/mattserver/web: No such file or directory     ls: cannot access /cifs/mattserver/print$: No such file or directory     ls: cannot access /cifs/mattserver/matt: No such file or directory     ls: cannot access /cifs/mattserver/backup: No such file or directory     total 0     d????????? ? ? ? ?                ? backup     d????????? ? ? ? ?                ? matt     d????????? ? ? ? ?                ? print$     d????????? ? ? ? ?                ? web      When I try to access an actual share, I get nothing:               matt@bird:~ $ ls -l /cifs/mattserver/web     ls: cannot access /cifs/mattserver/web: No such file or directory      As a test, I added a line to `/etc/hosts` for `mattserver`. Still no ghosting:               matt@bird:~ $ ls -l /cifs     total 0      When I try accessing the server directory again, I no longer get a list of shares:               matt@bird:~ $ ls -l /cifs/mattserver     ls: cannot access /cifs/mattserver: No such file or directory      But when I access an actual share, I get full access:               matt@bird:~ $ ls -l /cifs/mattserver/web     [correct listing of files -- removed]      I should be able to rely on broadcasting and I shouldn't need to have anything in /etc/hosts (right?). Broadcasting is working:               matt@bird:~ $ nmblookup mattserver     querying mattserver on 192.168.0.255     192.168.0.2 mattserver<00>      **Problems**   * When I try and access a list of servers by calling `ls -l /cifs`, I get nothing.   * When I try and access a list of shares by calling `ls -l /cifs/mattserver`, I get a screwed up list (see above).   * I can't get a share mounted without adding an entry for the servername to `/etc/hosts`. I don't want to rely on a kludgy entry in `/etc/hosts`. What are my options here?


title: How do I move some but not all files from one directory to another?

text: I need to move my files from one directory to other. But there is some issues. My file name pattern is like:                 apple.0, apple.<n>, n -> {0,1,2,3 ...~ }      so `mv apple.*` will not work, because I need to keep apple.0, which is always the active one. How do I move them with exceptions (in this case, keeping apple.0)?


title: Shell script error message

text: I am trying to learn shell scripting by reading linuxcommand.org. For some reason I keep getting the error "Not Found", even though it runs all the commands. The error codes I get are:               minecraft_backup.sh: 21: run_backup: not found          minecraft_backup.sh: 23: function: not found      Here's the script:               #!/bin/bash     #MineCraft backup script by          #Variables     APP=MineCraft     SERVICE=Minecraft_Mod.jar     APPDIR=/opt/MineCraft_Server/bin     BACKUPDIR1=/opt/MineCraft_Server/backup1     BACKUPDIR2=/opt/MineCraft_Server/backup2                    #First i want to check if minecraft server is running.     if(ps ax | grep -v grep | grep $SERVICE > /dev/null)     then         echo "$APP is running"         $(run_backup)     else         echo "$APP is not running"         exit 1     fi          function run_backup     {         echo "Starting back up"              #create backup dirs of they do not exit         if [ ! -d "$BACKUPDIR1" ]         then             mkdir $BACKUPDIR1         fi              if [ ! -d "$BACKUPDIR2" ]         then             mkdir $BACKUPDIR2             echo "test"         fi              #backup save1 to save2         rsync -av --delete "$BACKUPDIR1/" "$BACKUPDIR2"              #backup running app to save 1         rsync -av --delete "$APPDIR/" "$BACKUPDIR1"          }


title: scp, globbing, and different shells

text: The other day at work I tried doing               scp remotehost:~/*.txt .      and I received an error about the `*`, `*.txt file not found` _sorry, not at work and I forget the exact error_ on my workstation I run `zsh` 4.3. on the remotehost `bash` is the default shell, and the version of `zsh` is older ( _4.2_ vs _4.3_ ) on that. I then tried switching to bash on my workstation, and doing the exact same command. This time it worked. What is the root 'cause of this. Is there anyway to do globbing, or wildcards between these 2 systems (without switching to bash)?


title: How to have the Bookmarks toolbar show up on Firefox 4?

text: I've upgraded Firefox from 3 to 4 beta8. My Bookmarks toolbar has disappeared and I can't find the option to make it appear again.


title: Sending mail using sendmail

text: Need a few clarifications regarding sending mail using `sendmail`. I actually configured Bugzilla on a test server. The configuration was successful and I am now able to use it. I also want that, whenever a new bug is created or any bug is updated, a mail to be sent. For that, I already installed sendmail on my system and started the service, but mails are not being sent. Following can be seen in my maillog file:               Apr 18 21:56:50 serverlinux sendmail[3827]: r3IGQhF1003825:          to=<xxxxx@ymail.com>,         ctladdr=<zaman@serverlinux.example.com> (500/500),         delay=00:00:07,         xdelay=00:00:06,         mailer=esmtp,         pri=120372,         relay=mta6.am0.yahoodns.net. [66.196.118.240],         dsn=5.0.0,         stat=Service unavailable      I am not sure whether just starting the sendmail service will help me to send mails or if I need to configure some parameter in sendmail. How can I send mails using sendmail to any valid email-ids in the Internet domain?


title: Diff 2 files ignoring strings between @ and [

text: I am comparing two files. I am trying to ignore the alphanumeric characters after `@` and before `[` . A line looks like               model.Field@d6b0d6b[fieldName


title: how to resize horizontally a screen region

text: I am using `screen` to split my terminals but I would like to be able to resize the horizontal dimension of the split screens. If I do `C-a :resize 10` I only change the vertical dimension to 10 lines. How do I achieve the same but for the horizontal dimension?


title: VMware Tools repo

text: I maintain a local repository for all the installation packages. I'm attempting to use reposync (the first time, I generally use rsync to mirror what I need) and I'm getting some odd behavior. Any repos I have enabled system wide at _/etc/yum.repos.d/MYREPO.conf_ are being pulled in to the list of directories to sync.               ./reposync -n -c vmware-tools.cfg -p tmp -u      I really don't want to provide a list of repos to include - I'd like to simply add the necessary lines to the above file and have it work. The contents of vmware-tools.cfg.               [6-i386]     name=VMware Tools 6 x32     baseurl=http://packages.vmware.com/tools/esx/latest/rhel6/i386     enabled=1     gpgcheck=1          [6-x86_64]     name=VMware Tools 6 x64     baseurl=http://packages.vmware.com/tools/esx/latest/rhel6/x86_64     enabled=1     gpgcheck=1          [5-i386]     name=VMware Tools 5 x32     baseurl=http://packages.vmware.com/tools/esx/latest/rhel5/i386     enabled=1     gpgcheck=1          [5-x86_64]     name=VMware Tools 5 x64     baseurl=http://packages.vmware.com/tools/esx/latest/rhel5/x86_64     enabled=1     gpgcheck=1      How do I correct this behavior and / or sync these files in a better fashion?


title: Not enough space on / to install new kernel update

text: During a recent update I received this:               Installing: kernel-default-2.6.37.6-0.11.1 [error]     Installation of kernel-default-2.6.37.6-0.11.1 failed:     (with --nodeps --force) Error: Subprocess failed. Error: RPM failed:    installing package kernel-default-2.6.37.6-0.11.1.x86_64 needs 147MB on the / filesystem               Abort, retry, ignore? [a/r/i] (a): i     Installing: kernel-desktop-2.6.37.6-0.11.1 [error]     Installation of kernel-desktop-2.6.37.6-0.11.1 failed:     (with --nodeps --force) Error: Subprocess failed. Error: RPM failed:    installing package kernel-desktop-2.6.37.6-0.11.1.x86_64 needs 148MB on the / filesystem               Abort, retry, ignore? [a/r/i] (a): i     Installing: kernel-source-2.6.37.6-0.11.1 [error]     Installation of kernel-source-2.6.37.6-0.11.1 failed:     (with --nodeps --force) Error: Subprocess failed. Error: RPM failed:    installing package kernel-source-2.6.37.6-0.11.1.noarch needs 432MB on the / filesystem      Which I am assuming means my `/` partition needs some room. So I checked the size/space:               Filesystem            Size  Used Avail Use% Mounted on     /dev/sda1              25G   24G  208M 100% /      How did `/` grow to be so huge!? Is this a common occurrence and is there a quick trick to freeing up some space? I assume that there are things I'm not using in there and I've been able to update kernels easily for the past year -- so something is accumulating. I'd rather figure out what I free up (are old kernels kept?) instead of re- partitioning my whole drive to grow `/`.


title: Why does rsync look for DSA instead of RSA key when run from cron job?

text: I want to backup files from a server to my local computer using rsync. I can only log-in to the server with an RSA ssh key. I have stored the passphrase to the key in Seahorse Passwords and Keys, which means I can log-in to the server without having to enter the passphrase everytime. I can also execute an rsync command related to the server without entering the passphrase. When the same rsync command is executed from a cron job, it fails, because it is looking for a DSA key (as shown in the logs) instead of the RSA key.


title: Once you mount a file system, how do you read and write the files?

text: I understand that a file system can be visualized as a "tree" of files and directories. I also understand that "mounting" a file system means to placing or rooting that tree within an existing directory. http://askubuntu.com/questions/20680/what-does-it-mean-to-mount-something With that said, I have a fuse system "mounted" and I'm trying to understand how to query and use it. I know that it is mounted because when I type this command I see this...               $mount      ...     FuseHandler on /home/memsql/mount      So I have mounted a fuse system. How do I add files, remove files, list files, etc. In other words, how do I use a mounted file system? If I cd into /home/memsql/mount I get a flashing cursor as if I am at a prompt.


title: How to install GNU/Linux on a Windows PC without the BIOS password?

text: I want to install a GNU/Linux based operating system on a computer with Windows preinstalled, but unfortunately, the BIOS is set to only boot from the harddisk, and there is no way to boot from something else without altering BIOS settings, and I don't know the BIOS password. I'd rather not dismantle my computer to reset it or use password crackers. Now how can I install GNU/Linux on my PC?


title: Difference between Oracle VM and Citrix XEN?

text: I`ve been testing Oracle-VM this day. Is there anyone out there who has tested both XEN-based solutions? What are the main differences?


title: Is it possible to create a directory and file inside /proc/sys?

text: I am running CentOS 6.2 and I need to create a subdirectory named "crypto" inside `/proc/sys`. Inside `/proc/sys/crypto`, I need to create a file named `test` which contains the value "1". I have tried many things and nothing works. Can someone help me?


title: Trouble communicating with FTDI FT245RL on ttyUSB0. works fine on Win7x64

text: I purchased a Sainsmart 4 channel USB relay board which seems to be based on a FTDI FT245RL chip. I should be easy enough to use. when you plug it in it appears as a serial port (VCP). You send it three bytes which tell it what to turn on and off. E.g. \xFF\x00\x01 turns on just relay 1 and \xff\x00\x03 turns on relay 1 and 2. I wrote a very simple python program to test this on a Debian squeeze machine:               import serial     ser = serial.Serial('/dev/ttyUSB0') # Defaults to 9600 8N1     ser.open()     ser.write(chr(255) + chr(0) + chr(3))     ser.close      ...and nothing happened. Sometimes I get nothing, and sometimes it blocks. I installed the drivers on a win7x64 machine, and changed one line to point to COM3, it works great. I then tried it on a CentOS 5 machine and it doesn't work here either. I don't think it is permissions, I've added the users to the dialout and uucp groups respectively. I've also tried it as root. I was able to set up a udev rule on Debian which seems to work. If I do **lsusb** , this is the relevant result:               Bus 005 Device 002: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC      If I do stty -F /dev/ttyUSB0 -a I get               speed 9600 baud; rows 0; columns 0; line = 0;     intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^A; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z;     rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O; min = 0; time = 0;     -parenb -parodd cs8 hupcl -cstopb cread clocal -crtscts     -ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon -ixoff -iuclc -ixany -imaxbel -iutf8     -opost -olcuc -ocrnl -onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0     -isig -icanon -iexten -echo -echoe -echok -echonl -noflsh -xcase -tostop -echoprt -echoctl -echoke


title: What is a reliable way to automate FTP upload of 'the newest file in directory X'?

text: I have this folder full of files. Once per day, I want the newest of the files to be FTPed automatically to a file server.


title: grep: Trailing backslash

text: I want to do a grep for `\resources\`. How do I do this? I've tried:               grep \resources\     grep \\resources\\     grep "\resources\"     grep "\\resources\\"      None of these work.


title: ping -c1, wait for all responses from broadcast

text: I want to send one packet to the broadcast address, but wait for all responses. If I do `ping -c 1 192.168.1.255`, it sends just one packet, but it quits after getting the first response.


title: ssh "-f" don't give back hand in bash when listening to stdout/stderr

text: Please look at these:               ## Does NOT return to the shell, but Ctrl-C can exit     ssh -S none -fNR 13018:localhost:22 example.com | cat          ## Returns to the shell (no "-S none")     ssh         -fNR 13019:localhost:22 example.com | cat          ## Returns to the shell (no "| cat")     ssh -S none -fNR 13020:localhost:22 example.com      Why the first command does not return to the shell ? I expected it to return to the shell as the other did (as the `-f` _Requests ssh to go to background just before command execution._ ) and is present in the 3 samples I gave and seem to behave erraticaly upon redirection of its output (symbolized here by the `| cat`). The `-S none` is not a related option (especially that `-S none` should be the default behavior as I haven't any ControlMaster options set) and it seems nevertheless to change the behavior of `-f`. All this puzzles me. Is there any way to catch the stdout/stderr of the last command with this command returning to the shell, to be able to react according to its output ? The whole story: I want to run SSH tunnel and upon failure, check if it is related to port being in use. In that case I'll try another port. I can't use error level as it is not distinctive, and while trying to catch stderr, I ran in ssh behaviors that are not clear for me and they seem even bogus (there shouldn't be any differences between using `-S none` and not using it, because it is the default value and I checked my `~/.ssh/config` that was empty, and the `/etc/ssh/ssh_config` had no `ControlMaster` related option set.) EDIT:   * It seems that I cannot reproduce the second example as described. Could the `ssh` process terminates sometimes _before_ and sometimes _after_ `cat` process opens the pipe ?


title: Gentoo on VM setting IP Manually

text: I installed Gentoo on Virtualbox with the minimal image. This is the first time I am running gentoo. I need to do               ifconfig eth0 192.168.0.10     route add default gw 192.168.0.1      everytime it boots on VM and then I need to start `sshd`. I've added sshd to startup with `rc-update add default sshd` But How can I avoid seting the UP manually each time on start up ?


title: Denied permission to change ownership

text: I am trying to change the ownership of a folder and all its contents to `www- data`, but am being denied permission to change it. I am root. and I've tried using `sudo` but nothing works.               eyedea@eyedea-ER912AA-ABA-SR1810NX-NA620:/var/www$ chown -R www-data.www-data /var/www/drupal/     chown: changing ownership of `/var/www/drupal/scripts/run-tests.sh': Operation not permitted     chown: changing ownership of `/var/www/drupal/scripts/code-clean.sh': Operation not permitted     chown: changing ownership of `/var/www/drupal/scripts/drupal.sh': Operation not permitted


title: Wifi stops to work in idle

text: I checked Xfce power manager seems settings correct but laptop screen goes black after 10 minutes of inactivity. Actually the problem is that shared Wi- Fi (configured using hostapd package) stops to work. After that I can't get WIFI to work again without system reboot. **Here is what I have and what have tried:**   1. Linux debian-dell-netbook 3.2.0-0.bpo.2-amd64   2. RTL8188CE chip with latest driver installed from sources   3. Checked /var/log/* northing happens in logs   4. WiFi works in 802.11g, with 'n' I got the same issue.   5. sudo modprobe -rfv rtl8192ce && sudo modprobe -v rtl8192ce ips=0 fwlps=0   6. sudo iwconfig wlan0 mode managed


title: Bulk rename, change prefix

text: How can I bulk replace the prefix for many files? I have a lot of files like   * TestSRConnectionContext.h   * TestSRConnectionContext.m I would like to change all them to   * CLConnectionContext.h   * CLConnectionContext.m How would I do this?


title: String syntax for the kbd macro in Emacs

text: > **Possible Duplicate:**   >  Associating a function in Emacs after looking up the code with M-x > describe-key I have typed the following macros on my `.emacs` file               (global-set-key (kbd "M-<left>") 'windmove-left)          ; move to left windnow     (global-set-key (kbd "M-<right>") 'windmove-right)        ; move to right window     (global-set-key (kbd "M-<up>") 'windmove-up)              ; move to upper window     (global-set-key (kbd "M-<down>") 'windmove-down)          ; move to lower window      However, when I press `Alt`+`left` or any of the other keyboard combinations, I get errors like the following in the minibuffer `M-o 3 c is undefined`. Why doesn't it work? I thought I was following the syntax described here (`kbd` macro).


title: My `which` command may be wrong (sometimes)?

text: I've compiled the last emacs version from the source code (v24.2) because the version installed on my machine is (quite) old for me (v21.3). I've done the usual:               $configure --prefix=$HOME     make      make install Now I am testing emacs and realized that it still launches the previous version ... while my `$HOME/bin` path is supposed to override the system one (since it is prepended to $PATH in my `.bashrc` file). My first thought was to see the `which` command output. And surprise, it gives the path to the new emacs. I can't understand where is the discrepancy here. In the same session here is the different outputs:               $ emacs --version     GNU Emacs 21.3.1          $ `which emacs` --version     GNU Emacs 24.2.1      I have no alias involving emacs. At all.               $ alias | grep emacs     $      Any idea what is going on please?


title: What would happen if a hard drive failed while the Linux kernel was running?

text: I've always been curious of what would happen if a hard drive failed while the Linux kernel was running. Since the kernel image itself is loaded completely into RAM, I don't imagine there would be any kernel failures. Obviously any software that attempted to access the disk would fail. Is there any chance that the system would continue running indefinitely? If not, what would cause it to panic (or at least become inoperable)? Please consider each of the following scenarios:   * The kernel may or may not have the swapfile enabled.   * No attempts to load kernel modules are made after the failure.   * Does it make a difference if certain parts of the filesystem are on different disks?


title: Are there any desktop email clients that implement gmail style conversation view?

text: I don't like threaded email views as much as the inline "conversation view" of gmail, however gmail is not as fast as I'd like it to be. Are there any desktop clients which provide a "conversation view"?


title: Audio/video out of sync when playing MP4s in mplayer

text: When I try to play MP4 files in mplayer, after a few seconds I get the "Your system is too SLOW to play this!" warning and the video starts lagging behind the audio. It only happens with MP4s, and seems to happen with just about all of them. mplayer doesn't seem to be overtaxing my system, it's just something with playing that particular format. I tried all the mplayer suggestions (different video driver, `-framedrop`, etc.); the only one that even partially helps is `-autosync 30`, but that's a hack. What could be wrong? How do I go about debugging/fixing it? * * * **Edit** : My video card is an nVidia; I use the official drivers. My available video output drivers according to mplayer are:                   xv  X11/Xv         gl_nosw OpenGL no software rendering         x11 X11 ( XImage/Shm )         xover   General X11 driver for overlay capable video output drivers         gl  OpenGL         gl2 X11 (OpenGL) - multiple textures version         matrixview  MatrixView (OpenGL)         null    Null video output         mpegpes MPEG-PES file         yuv4mpeg    yuv4mpeg output for mjpegtools         png PNG file         jpeg    JPEG file      I haven't tried any other players (I don't think I even have any), but I'll try installing another one and see if it has the same problem. I forgot to mention that I have this problem on multiple computers, but they all have essentially the same setup so it's probably a common cause


title: change terminal title

text: I want to make a shell `alias` that starts a certain program and also changes the title of the terminal to the name of the program. How can I do that? In case it matters, I am running the terminal on Ubuntu and connecting to a Debian server via ssh.


title: How can I recursively search directories for a pattern and just print out file names and line numbers

text: Currently I am using grep as follows:               grep -lr <PATTERN> .      This gives me the following output, containing a list of all files whose contents (not name) contain :               ./path/to/file1     ./path/to/file2     ...      This is okay but knowing the line numbers would be useful. The following output would be ideal but having gone through the man page for grep, I can't seem to figure out the right switches:               ./path/to/file1 15, 22, 54     ./path/to/file2 16, 17     ...      Is this possible with grep or some other tool?


title: What potential ills can be brought by 'deleting' a live kernel?

text: I recently deleted my active Linux kernel and continued using the system as if nothing drastic happened. Are there any side-effects to deleting the Linux kernel that's currently in use? What about other non-Windows kernels?


title: How to replace one char with another in all filenames of the current directories?

text: How do you rename all files/subdirs in the current folder? Lets say, I have many files and subdirs that are with spaces and I want to replace all the spaces with an underscore.               File 1     File 2     File 3     Dir 1     Dir 3      should be renamed to               File_1     File_2     File_3     Dir_1     Dir_3


title: Is there a way to count the number of matches in Vim using :g?

text: I know this works:               :%s/<string>//gn      But it seems a bit strange to use the substitution command to count, rather than global..


title: Change executable reference for app icon in in GNOME 3 launcher

text: I've created a custom script to launch VirtualBox that replaced the original script in ¸/usr/bin/¸. So running VirtualBox in a terminal launches my script. However, pressing `super` key and type "virtualbox" in Gnome Shell launcher brings the old original script. How can I change that behavior so that when I type _virtualbox_ in Gnome Shell launcher my custom script runs?


title: Mathematical processing on text file

text: I have 200 text files. Each text file contains one column of mathematical numbers (100k rows). I want to do some statistical processing on these data (finding the probit or quantile). I know the mean and sigma value associated for each file. Is there any direct way to calculate probit or quantile of a dataset? If not, then I know the formula for quantile which is =(sorted data- mean)/sigma. e.g. _input_file.txt_               12.2       10.11       15.55       5.01       ...     ...     12.9 _temp.txt_               5.01       10.11       12.2       12.9       15.55       ...      ... Final output file should contain two columns. First column is same as `temp_output.txt` and second column is the following mathematical function on each element:               = (row(i)-mean)/sigma      Where mean and sigma are two mathematical number say 10.1 and 2.02 respectively. Final output file should look like this for above values _output.txt_               5.01 -2.51980198       10.11 0.004950495       12.2 1.03960396       12.9 1.386138614       15.55 2.698019802       ...      ...


title: How to access a RHEL desktop remotely without unlocking the screen?

text: I usually leave a lot of processes running on my RHEL 6 workstation, and sometimes need to access the desktop remotely on my Macbook. I have used Screen Sharing on Mac and it works fine, except that the RHEL desktop gets unlocked every time I do, so anybody that wants to play the smart-ass can simply drop by my desk and wreak havoc with the mouse and keyboard. Is there any way to leave the desktop screen locked when I access it remotely?


title: In tcsh how can I prepend 'cd ' to the output of a pipe?

text: As in, say I execute `pwd` to return the current directory and want to dump this in a script file so that I can come back, but I then need to prefix it with 'cd '?


title: How to set keycodes manually in vim?

text: Sometimes when I fire up vim, my `Insert` key doesn't work (need to use `i`) and my arrows don't work (they give me letters instead). I'm guessing this has to do with my keys not being mapped correctly. How can I fix this for good?


title: List all files containing a specific string

text: I need to recursively look for all files containing a specific string so that I can copy a new file over the old one. E.g.: If a file has the string "replace me":   1. find the full path of the files:              /dir/of/file/filename.php     /dir/of/different/file/filename.php        2. replace the file with my new `filename.php` file. It sounds simple, but I have wasted several hours on it getting nowhere.


title: How can I get entries for a given time period from a 400MB+ log file?

text: I have a 400MB+ Tomcat log file (`catalina.out`). How can I pull out entries for a given time period?


my debian becomes slow after connecting a camera i use gnome 3 512mb ram 3 GHz Pentium dual processor 256 MB graphics. please help. it hangs and does not respond


title: Combining options in find command

text: Using the `find` command is there a way to combine options: i.e.               find . -type fd -name "somefile"      Although `-type` ignores the second option; I'm looking to find only files or directories.


title: Is there any DLP solution for linux?

text: I'm looking for a DLP (Data Leak Prevention) solution for linux environments. I know OpenDLP, but it's only a way to Prevent Clear-text file, and source codes from malicious access. There are lots of good solutions from Symantec, McAfee, Sophos and etc , But They all work with Windows and there's no Linux agent!


title: Does the installation computer affect performance?

text: I recently installed Debian Wheezy onto a hard drive I later intend to connect to a different computer, though the computers use different brands of hardware. Will this work? Or am I setting myself up for failure?


title: virt-install error: install methods 'cannot be specified for container guests'

text: I was following the Dell RHEL VM guide but working on CentOS 6.4 i386/686, and got to the virt-install step. After correcting a typo, I went back and deleted the vm.xml file it was suggested I create, and restarted libvirtd. Now I get this error, which Google mainly returns github localization pages about:               $ sudo virt-install --network bridge:br0 --name vm1 --ram=1024 --vcpus=1 --disk path=/var/lib/libvirt/images/vm1.img,size=4 --cdrom ~/winxp.iso     ERROR    Install methods (--location URL, --cdrom CD/ISO, --pxe, --import, --boot hd|cdrom|...) cannot be specified for container guests      What's a container guest and why can't I install with one? What do I need to do to fix this so I can install Windows on KVM? (And why does this, which is taken from a Dell guide, not work?)


title: How to check Grub2 config file?

text: When I boot my Fedora 19, I get a very brief error message when Grub2 loads. It's too quick to read, as it switches to the graphical mode almost instantly. My idea is to test the config file. I tried using the Grub2 CLI:               grub> configfile /boot/grub/grub2.cfg      and               grub> source /boot/grub/grub2.cfg      but nothing turns up. The system runs fine otherwise, even "most" of the grub2.cfg seems to work, as boot proceeds normally. I came across this error, when I tried to enable nVidia framebuffer mode in 1920x1080x24 mode, which I failed in doing so. I'd like to test the config file, while the system is booted, and inspect error messages if possible. _I believe the error message says something about a file not found, but again, it's that quick, that I can't be sure what it actually says_


title: mutt weird action

text: I wrote a little script to send multiple mails from a list with differents subjects.                #!/bin/bash           while read -a line      do      mailadd=${line[0]}      subject=${line[1]}            mutt -s `echo $subject` `echo $mailadd` < /home/emanuele/testomail.txt           done < prova.txt      The scripts works fine and sends the mails, but mutt tell me that he needs a `-s` option.               mutt: option requires an argument -- 's'     Mutt 1.5.21 (2010-09-15)      I don't understand why the script works fine but mutt exit with an error. How can I fix it?


title: Adding a time stamp when moving a file in bash

text: #!/bin/bash     while read server <&3; do   #read server names into the while loop          if [[ ! $server =~ [^[:space:]] ]] ; then  #empty line exception         continue      fi        echo "Connecting to - $server"     #ssh "$server"  #SSH login         while read updatedfile <&3 && read oldfile <&4; do                  echo Comparing $updatedfile with $oldfile             if diff "$updatedfile" "$oldfile" >/dev/null ; then                 echo The files compared are the same. No changes were made.             else                 echo The files compared are different.                 # copy the new file and put it in the right location                 # make a back up of the old file and put in right location (time stamp)                 # rm the old file (not the back up)                 #cp -f -v $newfile                          mv $oldfile /home/u0146121/backupfiles/$oldfile_$(date +%F-%T)                  fi               done 3</home/u0146121/test/newfiles.txt 4</home/u0146121/test/oldfiles.txt     done 3</home/u0146121/test/servers.txt      This is my whole script               mv $oldfile /home/u0146121/backupfiles/$_$(date +%F)      This moves the file correctly but it removes the actualy file name and just adds the date. I want to keep the original file name and add the current date to the file name.


title: bash script error stty: standard input: Inappropriate ioctl for device

text: I'm using here-documents in a bash script to automate installation and setup where a password is required many times. I enter the password once and the script passes it to the various commands. In most instances the here-document approach handles this fine. However, in one case I get this error:               Enter VNC password: stty: standard input: Inappropriate ioctl for device     Verify password:         stty: standard input: Inappropriate ioctl for device      Please notice that this error message is from `x11vnc -storepassword` (not from `sudo`.) My problem is related to `x11vnc -storepasswd` and here's my code:               sudo x11vnc -storepasswd ~/.vnc/passwd << ENDDOC     password     password     y     ENDDOC      That obviously (from the error) does not work. I would appreciate a working example of how to implement `sudo x11vnc -storepasswd ~/.vnc/passwd` in a script. In case it helps, the prompts look like this: > Enter VNC password:   >  Verify password:   >  Write password to /home/user/.vnc/passwd? [y]/n n Will using `expect` be a better solution? If so, how would I use it in this case? (I have never used `expect` before but I have looked at a lot of examples since posting this question and I cannot get `expect` to work on my own.)


title: Accessing Pendrive in Ubuntu using Wine

text: We use ubuntu in our college and they have blocked pendrive access. When we insert pendrive it displays a dialog that says "There is no application to handle this file" (or something like that). So, as a workaround some one suggested us to use wine in ubuntu to access the pendrive. We already have wine installed on the system, is there any software(windows particularly as it has to be opened using wine) to get this going ? I'm not sure how far I'm correct with what I'm retrospecting. And yes, we don't have root access


title: How to purge package in debian without affecting other packages?

text: I had mysql-server-5.1 installed, then upgraded to mysql-server-5.5 and now upgraded to percona server (package percona-server-server-5.5). So now I have 2 mysql-server packages removed, but not purged (in "rc" state). I tried to purge mysql-server-5.1 and during this, it stopped the percona server!               dpkg -L mysql-server-5.1     /etc     /etc/mysql     /etc/mysql/conf.d     /etc/init.d     /etc/logrotate.d     /etc/logcheck     /etc/logcheck/ignore.d.server     /etc/logcheck/ignore.d.server/mysql-server-5_1     /etc/logcheck/ignore.d.paranoid     /etc/logcheck/ignore.d.paranoid/mysql-server-5_1     /etc/logcheck/ignore.d.workstation     /etc/logcheck/ignore.d.workstation/mysql-server-5_1      How can I get rid from mysql-server-* packages without affecting the running system?


title: How to change permissions of multiple files found with find command?

text: I have a directory with numerous files. Part of the files have the `755` permissions and the other part have `644` permissions. I'd like to convert the files with `755` permissions to `644`. I have tried the following line by running it from the directory itself:               find . -perm 755 -exec chmod 644 {}\;      However as a result, the permission changed only for the directory itself and after changing it back I found out that the files permissions remained unchanged. Do I miss something?


title: problem on installing nagios plugin on RHEL-5.1

text: I am trying to install nagios plugin 1.4.16 on RHEL-5.1 while I am configuring with command `./configure`. I have hanged here checking for ps syntax... I have also tried this command               ./configure --with-nagios-user=nagios --with-nagios-group=nagios --enable-redhat-pthread-workaround      but still I am stucking please help me what to do.


title: How to run sudo commands remotely via ssh -t?

text: I have a script that logs into a remote host via `ssh -t` and uses `sudo service foo restart`. The requirement is to avoid the prompt for a password on the remote host. The remote host authenticates via SSH certificate. The `sudoers` file on the remote host allows that user to execute the service command with `NOPASSWD`. However, during my tests, I'm prompted for a password and this is unacceptable. If I run this manually without the `-t` flag, it works. However the `-t` flag throws everything off. Is there a way around this?


title: Can i start bluetooth deamon without usb dongle connected?

text: I'm installing bluetooth for my debian installation (non desktop) and I wonder about the deamon. The guide states that in order to start it I have to type:               /etc/init.d/bluetooth start      but really, I want to do this everytime the computer starts up... but the usb dongle is not always connected. Can I still do it? And how do i add it (rc?) so it starts up everytime.


title: Decrypt files encrypted with gpg using xargs

text: I have a lot of files encrypted with _gpg_. All files have the same password. Is it possible to use xargs to decrypt files? `ls | xargs -n 1 gpg` asks for the password for every file.


title: vpn conntect over an additional server

text: I (A) want to connect to my virtual XEN-server (B) with Ubuntu OS via vpn. This server (B) should than connect to another server (C). The traffic should be routed from A to C. C is using CISCO VPN. But how do I do that? Is there a howto that I can read? Thanks for y'all help


title: Unix/Linux C++ debugger that supports STL containers?

text: Currently I am using gcc-4.3.6 and Eclipse IDE for c++ development. I want to debug my project in Eclipse with `gdb`. I am having a hard time debugging code when it contains STL containers. Also I am not using STL directly, I have wrappers for each container. I know we have to use pretty printing for looking into STL containers, but it is not working in Eclipse. I have worked in Visual Studio in the past. I migrated to `gcc` and Eclipse because compilation time in VS is too much wrt gcc. However, the debugger in VS is very good. I don't know much about `gcc` and Eclipse. I just want to know if there is a similar debugger in linux or unix.


title: How to make a module dynamically loadable on Debian?

text: I'm applying an API from maxmind. They require additional an module for Apache. Now they recommend the command:               apxs -i -a -L/usr/local/lib -I/usr/local/include -lGeoIP -c mod_geoip.c        * `-I/usr/local/include` specifies wherethe GeoIP.h header file is installed   * `-L/usr/local/lib` specifies where the libGeoIP library is located This doesn't look like Debian command, so I guess I will need to look for command that will include those files in the environment so I can run them on the localhost server. An equivalent command on Debian would be appreciated.


title: Getting diff (or git diff) to show inserted hunks properly

text: Let's say I have two files. The first one has the contents:               line 1     foo     line 2          line 1     bar     line 2      And the second one has a new section inserted in the middle, so it looks like this:               line 1     foo     line 2          line 1     new text     line 2          line 1     bar     line 2      Now, when I do a "diff -u", I get output like this:               --- file1   2013-06-25 16:27:43.170231844 -0500     +++ file2   2013-06-25 16:27:59.218757056 -0500     @@ -1,7 +1,11 @@     line 1     foo     line 2          line 1     +new text     +line 2     +     +line 1     bar     line 2      This doesn't properly reflect that the middle stanza was inserted -- instead, it makes it look like the second stanza was changed, and a new one added to the end (this is because the algorithm starts at the first differing line). Is there any way to get diff (either by itself, or using git diff) to show this output instead?               --- file1   2013-06-25 16:27:43.170231844 -0500     +++ file2   2013-06-25 16:27:59.218757056 -0500     @@ -1,7 +1,11 @@     line 1     foo     line 2     +     +line 1     +new text     +line 2          line 1     bar     line 2      This is mostly an issue when generating a patch for someone to review, where a new function gets inserted into a group of similar functions. The default behavior doesn't reflect what really changed.


title: Search for files with a specific size inside recursive zipped archives

text: I have a folder with several files. These files are either `.xml` or `.zip` files. These `.zip` files contain `.xml` and/or `.zip` files. These `.zip` contains also `.xml` or `.zip`, and so on... until we finally found `.xml` files. In others words, I can have several "levels" of zip before finding my `.xml` files (cf. example below). My requirement is to detect which **root** ZIP files contain at least one XML file that is bigger than 100Mb. When a ZIP file is in such case, it should be moved to another directory (let say `~/big-files`). Also, if a non zipped `.xml` file is bigger than 100Mb, then it should be moved to this directory. For example:               foo1.xml     foo2.xml     baz.xml [MORE THAN 100Mb]     one.zip       +- foo.xml       +- bar.xml [MORE THAN 100Mb]       +- foo.xml     two.zip       +- foo.xml       +- zip-inside1.zip       |   +- bar.xml [MORE THAN 100Mb]       +- foo.xml     three.zip       +- foo.xml       +- zip-inside2.zip       |   +- zip-inside3.zip       |       +- foo.xml       |       +- bar.xml [MORE THAN 100Mb]       +- foo.xml     four.zip       +- foo.xml       +- zip-inside1.zip           +- foo.xml      In this example, _baz.xml_ , _one.zip_ , _two.zip_ and _three.zip_ should be moved to `~/big-files` as they host at least one XML file bigger than 100Mb, but not _four.zip_. How can I achieve that in bash shell? Thanks.


title: Fedora, Android phone mounting?

text: I am using Fedora 15 and I just plugged in my Samsung Vibrant Android phone, but my phone does not even give me the option to mount over USB like usual. It still charges though. Is there some configuration I need to do for Fedora?


title: bash: cd to the most recently modified child directory

text: Wondering if there's an easy and/or portable way to say "change to the most recently modified child directory." I can use ls and awk but there's probably a better way.               cd $( ls -ltrd */ | tail -1 | awk '{ print $8 }' )      I have to run a command in an "output files" directory with hundreds of subdirectories and 99% of the time I want to go to the most recently changed directory. I don't know what the names of the directories will be in advance.


title: File permission execute only

text: How can I set file to be executable only to other users but not readable/writable, the reason for this I'm executing something with my username but I don't want to give out the password. I tried :               chmod 777 testfile     chmod a=x     chmod ugo+x      I still get permission denied when executing as another user.


title: What do I install into a given install prefix

text: Which directories should I expect to have in an install prefix when I'm writing makefiles? I've noticed that in the common prefix `/usr`, there is no `/etc`, yet there is an `/include` dir, which isn't in the root directory. Which paths are hard-coded such as `/etc` and `/var` maybe and which directories lie in a prefix? As far as I can see `/bin` and `/lib` are standard.


title: How can I tell if a third-party repository is reputable?

text: Among other things, I want to install ffmpeg on a CentOS server of mine (just a personal server - nothing too special). I noticed that one set of installation instructions advise to add a DAG repository:               [dag]     name=Dag RPM Repository for Red Hat Enterprise Linux     baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag     gpgcheck=1     enabled=1      The name sounds familiar but I'm not sure if I've used this one before. How can I tell if it's reputable / safe / reliable?


title: Resolving pseudo domain name to private IP

text: Assume I have a VM running on OSX with private IP 10.0.0.1 which can be accessed from the host machine. I was wondering how can I map a pseudo domain, `*.app.dev`, to the private IP on my host machine so that on my host machine I can resolve the domain `*.app.dev` to 10.0.0.1. The purpose of this setup is to have virtual environment for development and not pollute my host machine with unnecessary packages and services. edit: I realize that `/etc/hosts` can accomplish non wildcard domain names, I should have been more clear and mention wildcard domain names.


title: What does my router need to act as a name server for my home network?

text: I am happily using an old PC as a router. Two network cards, Debian wheezy, NAT, ... everything just fine. My home network uses static IPs, which I am also happy with. However, every box on my home network needs my provider's name servers in its own `/etc/resolv.conf` file for _the internet_ to work. I thought this would be the way to go, but I notice that when using a notebook on a commercial router, the `/etc/resolv.conf` file gets overwritten once I `dhclient` to the router, and just the router's own IP address is listed, no external name servers. I figure that (1) the only way for this to work is that the router has some way of accepting the clients' name resolving requests and passes them on to the provider's name servers and (2) this is actually a quite handy solution because it would allow me to just put my router's IP into any client's `/etc/resolv.conf` and not worry about telling each client my provider's name servers.   1. Are these assumptions (1, 2) correct?   2. Is this a feature buried in DHCP requiring my router to be a DHCP server, or would it work with static IPs, too?   3. What do I need to configure on my router in order to enable forwarding/handling my clients' name server requests?


title: System Backup in Fedora 14

text: Does anyone know how I can backup an entire system, such that if the disk drive failed, I could quickly restore the backup onto another disk? I'm running Fedora 14.


title: Why doesn't my ~/.bash_profile work?

text: I'm using Linux Mint. My login shell (`cat /etc/passwd | grep myUserName`) is bash. After I start my graphical desktop environment and run terminal emulator from it, I could see that `.bash_profile` is not sourced (environment vars that `export` in it is unset). But if I login from text console (`ctrl`+`alt`+`F1`) or manually run `bash -l` from terminal emulator, `.bash_profile` works fine. Am I wrong when I think that `.bash_profile` should source when X starts and all `export`'ed vars should be available in terminal, running from X? P.S. Placing all in `.bashrc` and sourcing it from `.bash_profile` is not good idea (http://stackoverflow.com/questions/902946/): environment stuff should be sourced only once.


title: Cannot open GUI's via SSH connection?

text: I've just connected to a Linux terminal using an `ssh` client. I'm running Linux on both desktops, but cannot open PDFs, IDE, or other graphics from the ssh client. How can I fix this?


title: How to view Graphical view of Application using ssh

text: > **Possible Duplicate:**   >  How to forward X over SSH from Ubuntu machine? Is it possible that I can view the GUI of application when I pass some command to Redhat linux Server using ssh. Like when I pass command Firefox it launches the Firefox and I can see GUI Firefox. Note :: I have not installed vnc server.


title: importing data from a text file to a bash script

text: I need to import a text file like this below:               AMBI     CBNK     CCXI     CERE     CLACW     CNYD     DAEG     DLIA     DLLR     DNDN     DSGX     HAST     HIBB,     HPOL     IRDMZ     MARK     NEPT     NFEC     NINE     NRCIB     OMER     PLCC     PLPM     PSUN     UNTK      There are 25 entries, I need to pass them into a bash script. I want to run the program once for each symbol. The symbols are Nasdaq stock symbols. I'm trying to pull a quote with the script. I've been able to do this command manually:               sh stock (symbol) > /home/user/Desktop/stockquote.txt      by inputting the (symbol) manually, I need a a script to do it automatically.


title: RHEL/CentOS: Installing a new version of Java, why not just change the path?

text: I am installing a new version of Java on a CentOS/RHEL Linux distro for a single developer to develop java. The way I want to install on this development system is to just put the new java version somewhere and then update my path so that the new java is earlier on the path (and thus executes always) instead of the old version of java (which will be later on the path). But while looking online I came across an official multi-page howto for this distro... and it describes a completely different idea of what I SHOULD do: http://wiki.centos.org/HowTos/JavaOnCentOS **For a single developer, is modifying the path (to point to the new java) going to work for developing java?** **Why would you ever want to go through the laborious description seen on the above referenced official wiki page?**


title: using the mail command

text: How do I use the mail command to check email (and send email) from gmail. Does it support labels? I couldn't have figure out where to put the username and password. I tried to search for instruction but couldn't find any


title: Bring Debian to second Position in the GRUB Menu at startup

text: So, I currently have BOSS Linux and I am going to install debian (currently installing right now) And I want my older OS (BOSS linux), on the first position and the debian, (freshly installed) to be on the second. Please tell me how to do that


title: How to delete a specific line and the following blank line using GNU sed?

text: I have the following text:               Start-Date: 2013-11-11  07:43:49     Commandline: apt-get install --no-install-recommends catfish          Start-Date: 2013-11-11  11:27:07          Start-Date: 2013-10-16  22:53:02          Start-Date: 2013-10-16  22:55:16          Start-Date: 2013-10-17  22:41:09          Start-Date: 2013-10-17  22:42:02          Start-Date: 2013-10-17  22:42:33          Start-Date: 2013-10-17  22:46:01          Start-Date: 2013-10-17  23:00:06     Commandline: apt-get install shimmer-themes          Start-Date: 2013-10-17  23:01:52     Commandline: apt-get install --no-install-recommends gedit      I would like to delete lines beginning with "Start-Date" and the following blank line. In other words, I would like to have just:               Start-Date: 2013-11-11  07:43:49     Commandline: apt-get install --no-install-recommends catfish          Start-Date: 2013-10-17  23:00:06     Commandline: apt-get install shimmer-themes          Start-Date: 2013-10-17  23:01:52     Commandline: apt-get install --no-install-recommends gedit      I hope my question isn't a duplicate of Remove line containing certain string and the following line


title: GUI tool for managing Samba shares?

text: My understanding is that swat is no longer actively maintained. [1] Is there a GUI tool for maintaining Samba shares. PS Platform:LDME [1] Not only that I can't get it to work with xinetd on my system.


title: Avconv Error when trying to save an updating snapshot of an IP-camera stream

text: I'm trying to save an updating image of my camera stream on my Desktop.               avconv -i rtsp://admin:12345@192.168.1.199/h264 -f image2 -r 1     /home/nuc/Images/img.jpg      Protocol               avconv version 9.16-6:9.16-0ubuntu0.14.04.1, Copyright (c) 2000-2014 the Libav developers       built on Aug 10 2014 18:16:02 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)     [h264 @ 0x1eb8180] RTP: missed 5 packets     [h264 @ 0x1eb8180] concealing 2447 DC, 2447 AC, 2447 MV errors     [rtsp @ 0x1eb4020] Estimating duration from bitrate, this may be inaccurate     Input #0, rtsp, from 'rtsp://admin:12345@192.168.1.199/h264':       Metadata:         title           : Media Presentation       Duration: N/A, start: 0.000044, bitrate: N/A         Stream #0.0: Video: h264 (Main), yuv420p, 1920x1080, 25 fps, 45k tbr, 90k tbn, 50 tbc     Output #0, image2, to '/home/nuc/Bilder/img.jpg':       Metadata:         title           : Media Presentation         encoder         : Lavf54.20.4         Stream #0.0: Video: mjpeg, yuvj420p, 1920x1080, q=2-31, 200 kb/s, 90k tbn, 1 tbc     Stream mapping:       Stream #0:0 -> #0:0 (h264 -> mjpeg)     Press ctrl-c to stop encoding     [h264 @ 0x1fe5740] concealing 2447 DC, 2447 AC, 2447 MV errors      Error:               Could not get frame filename number 2 from pattern '/home/nuc/Bilder/img.jpg'     av_interleaved_write_frame(): Input/output error     nuc@nuc:~$


title: Can only get one network to be accessible from outside

text: So here's a quick overview of my setup: I purchased a new Mac Mini server and I am hosting it with a Mac Mini co-lo facility. At first I had them keep OSX installed and I was using VirtualBox to place CentOS 6.4 (minimal) in a VM. I have 5 public IP's assigned to my Mac Mini (one physical NIC). All are on the same subnet and IP block thus have the same gateway. I ran into an issue with running the VM in VirtualBox where only one of the IP addresses setup in CentOS would work from the outside (public) BUT all of them would work if accessed from the host system (using the public IP). I figured OSX was doing something weird so I had the host install ESXi 5.5 on the Mac Mini (had contemplated doing that anyway). So now I have ESXi 5.5 installed and a single VM (CentOS 6.4 minimal) running on it. I proceeded to setup my IP addresses for CentOS and now I'm running into the same exact issue. I can ping (and obviously access) the main ESXi IP, and I can ping and access the IP for eth0 in CentOS, but any additional IP's aren't accessible. Here are pertinent files and their current setup: **/etc/sysconfig/network** :               NETWORKING=yes     HOSTNAME=my.hostname.com     GATEWAY=208.x.x.1      **/etc/sysconfig/network-scripts/ifcfg-eth0** :               DEVICE=eth0     HWADDR=00:0C:29:78:42:C4     TYPE=Ethernet     UUID=1eeafa3a-87b1-4080-9de0-8e4dd9420ba3     ONBOOT=yes     NM_CONTROLLED=no     BOOTPROTO=static     IPADDR=208.x.x.12     NETMASK=255.255.255.0      **/etc/sysconfig/network-scripts/ifcfg-eth0** :               DEVICE=eth1     HWADDR=00:0C:29:78:42:CE     TYPE=Ethernet     UUID=be671894-6044-4870-b1e1-2a9c1758c551     ONBOOT=yes     NM_CONTROLLED=no     BOOTPROTO=static     IPADDR=208.x.x.13     NETMASK=255.255.255.0      **ip addr** :               1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN          link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00         inet 127.0.0.1/8 scope host lo         inet6 ::1/128 scope host             valid_lft forever preferred_lft forever     2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000         link/ether 00:0c:29:78:42:c4 brd ff:ff:ff:ff:ff:ff         inet 208.x.x.12/24 brd 208.x.x.255 scope global eth0         inet6 fe80::20c:29ff:fe78:42c4/64 scope link             valid_lft forever preferred_lft forever     3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000         link/ether 00:0c:29:78:42:ce brd ff:ff:ff:ff:ff:ff         inet 208.x.x.13/24 brd 208.x.x.255 scope global eth1         inet6 fe80::20c:29ff:fe78:42ce/64 scope link             valid_lft forever preferred_lft forever     4: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000         link/ether 00:0c:29:78:42:d8 brd ff:ff:ff:ff:ff:ff         inet 208.x.x.14/24 brd 208.x.x.255 scope global eth2         inet6 fe80::20c:29ff:fe78:42d8/64 scope link             valid_lft forever preferred_lft forever     5: eth3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000         link/ether 00:0c:29:78:42:e2 brd ff:ff:ff:ff:ff:ff         inet 208.x.x.15/24 brd 208.x.x.255 scope global eth3         inet6 fe80::20c:29ff:fe78:42e2/64 scope link             valid_lft forever preferred_lft forever      **ip route** :               208.x.x.0/24 dev eth0  proto kernel  scope link  src 208.x.x.12      208.x.x.0/24 dev eth1  proto kernel  scope link  src 208.x.x.13      208.x.x.0/24 dev eth2  proto kernel  scope link  src 208.x.x.14      208.x.x.0/24 dev eth3  proto kernel  scope link  src 208.x.x.15      169.254.0.0/16 dev eth0  scope link  metric 1002      169.254.0.0/16 dev eth1  scope link  metric 1003      169.254.0.0/16 dev eth2  scope link  metric 1004      169.254.0.0/16 dev eth3  scope link  metric 1005      default via 208.x.x.1 dev eth0       **ifconfig -a** :               eth0      Link encap:Ethernet  HWaddr 00:0C:29:78:42:C4                 inet addr:208.x.x.12  Bcast:208.x.x.255  Mask:255.255.255.0               inet6 addr: fe80::20c:29ff:fe78:42c4/64 Scope:Link               UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1               RX packets:3549 errors:0 dropped:0 overruns:0 frame:0               TX packets:1188 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:1000                RX bytes:256360 (250.3 KiB)  TX bytes:120840 (118.0 KiB)          eth1      Link encap:Ethernet  HWaddr 00:0C:29:78:42:CE                 inet addr:208.x.x.13  Bcast:208.x.x.255  Mask:255.255.255.0               inet6 addr: fe80::20c:29ff:fe78:42ce/64 Scope:Link               UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1               RX packets:3160 errors:0 dropped:0 overruns:0 frame:0               TX packets:17 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:1000                RX bytes:223374 (218.1 KiB)  TX bytes:1238 (1.2 KiB)          eth2      Link encap:Ethernet  HWaddr 00:0C:29:78:42:D8                 inet addr:208.x.x.14  Bcast:208.x.x.255  Mask:255.255.255.0               inet6 addr: fe80::20c:29ff:fe78:42d8/64 Scope:Link               UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1               RX packets:2266 errors:0 dropped:0 overruns:0 frame:0               TX packets:17 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:1000                RX bytes:136142 (132.9 KiB)  TX bytes:1238 (1.2 KiB)          eth3      Link encap:Ethernet  HWaddr 00:0C:29:78:42:E2                 inet addr:208.x.x.15  Bcast:208.x.x.255  Mask:255.255.255.0               inet6 addr: fe80::20c:29ff:fe78:42e2/64 Scope:Link               UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1               RX packets:2260 errors:0 dropped:0 overruns:0 frame:0               TX packets:17 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:1000                RX bytes:135782 (132.5 KiB)  TX bytes:1238 (1.2 KiB)          lo        Link encap:Local Loopback                 inet addr:127.0.0.1  Mask:255.0.0.0               inet6 addr: ::1/128 Scope:Host               UP LOOPBACK RUNNING  MTU:16436  Metric:1               RX packets:937 errors:0 dropped:0 overruns:0 frame:0               TX packets:937 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:0                RX bytes:123340 (120.4 KiB)  TX bytes:123340 (120.4 KiB)      I'm only including the setup for eth0 and eth1 since eth2/3 are setup the same way. Again, I can only access one at a time. What am I missing?


title: How to recognize harmful AUR packages

text: How do I recognize if a package which is installed via yaourt on arch linux could be harmful to my pc? I read in the wiki that I should check every installation I make with yourt. But what exactly do I have to check and how do I recognize malicious packages?


title: combine output from two commands in bash

text: Is it possible to combine output from these two commands?               node ~/projects/trunk/index.js      python ~/projects/trunk/run.py run      Neither command exits so I'm not sure how to do this.


title: IPFW Port Forwarding

text: This is my situation: I want to connect to an OpenVPN server from my office (we're using a proxy, only ports 80 and 443 are allowed). Server IP address is: 176.31.250.232:843 My static IP address is: 192.168.78.241 Is possibile to forward the 843 TCP port to the 443 port using IPFW? (I'm on OSX). Thanks for the answers.


title: Apache web server configuration with a DNS server Linux 14.04 LTS

text: I need to configure a Apache web server with a DNS server, it can be a simple local server configuration just to practice and see how a DNS server resolves a URL to an ip address and connects to a web server. I already have LAMP installed on my computer but I don't know how or where to start with the DNS server. If there are any tutorials similar to what Iam trying to do I would appreciate it.


title: Ctrl-w closes my Chrome window

text: As I become more used to Emacs, I mix it with other applications quite a lot. For killing some text in Chrome browser windows, I repeatedly type `Ctrl``w`, and close chrome windows and lost my unfinished input. Is `Ctrl``w` a window-closing shortcut for Chrome only, or for majority applications in Ubuntu 12.04? I opened Chrome's settings, but didn't find that setting.


title: Strip specific option from a response in dhclient

text: I aim to prohibit `dhclient` from updating my NTP config with servers received via DHCP, as it is the default on Debian/Ubuntu. However, my DHCP server ignores the list of requested options (from the `request` setting) and its answers always contain an NTP server. So I want to remove the option before further processing or at least overwrite it with an empty value. Overwriting is possible using the `supersede` setting, but I didn't manage to make it empty. I also couldn't find a way to completely delete an option. What in fact results in an empty value is specifying an invalid one in `supersede` (e.g. containing letters, as only numerical values are allowed). This is actually invalid and causes errors in the logfile though. Is anyone aware of a better way?


title: what does *-*-c-*-*-* mean in a font-setting

text: I often see Fonts being set like this: (e.g. in dmenu or bar-ain't-recursive)               -*-terminus-medium-r-normal-*-14-*-*-*-c-*-*-*      what does these `*-c*-*` sign mean? I really don't get it...


title: Limit internet speed without tc

text: I'm using deb based linux for years and I never had problems limiting the internet speed using wondershaper. The problem is that on sisters PC I had to install puppy linux because it's a very old PC. The problem is, wondershaper won't work since it requires tc. I got a suggestion to try using trickle, which also seems to be a nice bandwidth shaper but I was unable to get it working on puppy. Anyone has experience with puppy and bandwidth shaping, or maybe a suggestion how to get the tc command on puppy? Thanks!


title: Using data read from a pipe instead than from a file in command options

text: Per man definition, this command gets the input from a file.               $ command -r FILENAME      Suppose that `FILENAME` is a file containing a list of filenames, as it was generated using `ls > FILENAME`. How can I, instead, feed the command with the result of `ls` directly? In my head something like this should be possible: `$ ls | command -r` But it doesn't, the output of `ls` doesn't get hooked as an argument. Output:               Usage: command -r FILENAME     error: -r option requires an argument      How could I obtain the desired effect?


title: What do the tags in `monitors.xml` do?

text: I have a GNOME 3 desktop environment installed on my Arch Linux box, and I would like to manually configure my desktop settings. I understand there is a file `~/.config/monitors.xml` but I am quite puzzled about what the tags in the file actually do. I am particularly interested in the `presentation`, `clone`, `reflect_x` and `reflect_y` tags. I could not find a manual online for this configuration file. I understand they might have something to do with dual head support?


title: how to detect video completion in vlc

text: Vlc provide documents in which there are lots of command are given to control vlc from command line. Here is the link of documentation. Now in my task, I need to run a video in a loop, for this I am using this command               vlc --fullscreen --loop t.mp4      where t.mp4 is my video.This is working fine.Now on some particular input I have to run some another video, for this I am again using this command               vlc --fullscreen t1.mp4      Now the problem is, after completing this video I want to run previous video. For this somehow I need to know my current video is completed. For this please tell me the command through which I can know the completion of vlc video.


title: Ls with spaces + variables

text: I want to do something like this, but it doesn't save the variable after the piping ends:               fs=( )     echo ${fs[@]}     ls -A1 |     while read f     do         echo ${fs[@]}         fs+=( "$f" )         echo ${fs[@]}     done     echo "All files/dirs: "${fs[@]}      With files 1, 2 and 3 in the current dir I get this output:               # Output:               1     1     1 2     1 2     1 2 3     All files/dirs:       How do I keep the fs variable's value, after the piping ends? **Update:**   * Can't use *, becuase i need hidden files   * Can't just use fs=($(ls)), while sometimes the file/dir names will have spaces in them


title: What are some of the main differences between vim and vi?

text: What are a few of the main differences between vi and vim? Are there any significant keyboard shortcut differences, any features that one has that the other does not? Yes, I do know that I asked another question similar to this (Vi vs vim, or, is there any reason why I would ever want to use vi?), but the purpose of that question was not a complete comparison between the two, but merely asking if there were any possible situations where vi had the advantage. _This_ post is a direct comparison between the feature-sets of vi and vim. Edit: I was wrong, this is not a comparison between the features of vi and vim. vim, being Vi IMproved, has many, many more features then vi. What I am asking is, if you have been using vi all your life and one day you sit down and start using vim, what will be different? Or if you were a vim user previously and tried out vi, what differences would you notice?


title: Is it possible to prevent eth0 network traffic from accessing eth1 network?

text: I am not really sure how this is possible but I have a linux(ubuntu 14.04) box with 2 interfaces. eth0 is connected to our lan `192.168.0.*` and eth1 is connected to a dlink wifi router on network `192.168.3.*` . Wifi network is only available for mobile devices. They are only supposed to access a web application installed on the box. I want to prevent any eventualities such as accessing 192.168.0.* network even if someone gets authorized access to the box via ssh. Is something like that possible? if yes please explain how to and give any resource you have for better understanding. Networking is not my strongest area but can understand much of the concept when explained clearly so please bear with me. **EDIT** In /etc/sysctl.conf I have now `net.ipv4.ip_forward=0` with sudo -p /etc/sysctl.conf with a restart of the machine. But it didn't work. I can ping 192.168.0.* network               #sysctl -a     net.ipv4.conf.all.accept_local = 0     net.ipv4.conf.all.accept_redirects = 1     net.ipv4.conf.all.accept_source_route = 0     net.ipv4.conf.all.arp_accept = 0     net.ipv4.conf.all.arp_announce = 0     net.ipv4.conf.all.arp_filter = 0     net.ipv4.conf.all.arp_ignore = 0     net.ipv4.conf.all.arp_notify = 0     net.ipv4.conf.all.bootp_relay = 0     net.ipv4.conf.all.disable_policy = 0     net.ipv4.conf.all.disable_xfrm = 0     net.ipv4.conf.all.force_igmp_version = 0     net.ipv4.conf.all.forwarding = 0     net.ipv4.conf.all.igmpv2_unsolicited_report_interval = 10000     net.ipv4.conf.all.igmpv3_unsolicited_report_interval = 1000     net.ipv4.conf.all.log_martians = 0     net.ipv4.conf.all.mc_forwarding = 0     net.ipv4.conf.all.medium_id = 0     net.ipv4.conf.all.promote_secondaries = 0     net.ipv4.conf.all.proxy_arp = 0     net.ipv4.conf.all.proxy_arp_pvlan = 0     net.ipv4.conf.all.route_localnet = 0     net.ipv4.conf.all.rp_filter = 1     net.ipv4.conf.all.secure_redirects = 1     net.ipv4.conf.all.send_redirects = 1     net.ipv4.conf.all.shared_media = 1     net.ipv4.conf.all.src_valid_mark = 0     net.ipv4.conf.all.tag = 0      **EDIT 2** below is my iptables               Chain INPUT (policy ACCEPT)     target     prot opt source               destination                   Chain FORWARD (policy ACCEPT)     target     prot opt source               destination                   Chain OUTPUT (policy ACCEPT)     target     prot opt source               destination        Thanks in advance.


title: Power management hook for running *X11* scripts on wake

text: Earlier I asked a similar question, but that one was about running system- level scripts. I have a script that runs a series of `xinput` commands in order to enable two-finger scrolling on my touchpad. It has to be re-run every time the computer sleeps and wakes up again, and it has to be run from within the X11 session. How do I trigger a script to be run on my X11 desktop when the computer wakes up? P.S. I _suspect_ there's a way to do this with DBUS, but I' m fuzzy on the specifics. Maybe someone with stronger DBUS-fu could point me in the right direction.


title: Can I get an 8-bit clean connection with 'socat'?

text: This question is mostly about "socat", but here's some background to go with it: I am trying -- for reasons having mostly to do with nostalgia -- to write a virtual modem driver for use with VirtualBox. It should listen to the socket that VirtualBox connects to the virtual guest, and emulate (a) a standard Hayes command set and (b) let one connect to remote systems using "atd some.host.name". Mostly it works, but I've run into problems with data transfers. I assume the problem is mine, because I seldom have the chance to muck about with mult-channel communication, select loops, and the like... ...so I though I would prototype my solution using the "socat" command, like this:               socat UNIX-CONNECT:/tmp/vbox.port EXEC:"telnet -E8 some.remote.host"      This works, sort of, just like my solution -- basic interactive typing seems fine, but try a file transfer and it just falls over. I've also tried this, just in case there was some sort of tty line discipline in the way:               socat UNIX-CONNECT:/tmp/vbox.port EXEC:"telnet -E8 some.remote.host",pty,raw,cs8      That didn't work any better. I'm wondering if anyone here has thoughts on solving this. The problem is not with telnet; using `-E8` provides an 8-bit clean path that works fine by itself (e.g., when not involved in this sort of pty-proxying). This is obviously not a critical problem, but I'm hoping that someone else out there finds it at least mildly interesting.


title: pppoe connection keeps disconnecting every 30 seconds

text: I have hotspot connection. We first connect to wireless and enter a username / password on pppoe connection with windows. When I use the ubuntu (11.04) I have to use pppoeconf module. Today I setup this module. Then I connect. However, after the 30 seconds wireless will be disconnect. I connect to wireless, then again after the 30 seconds it will be disconnect. What can I do ? There is no problem driver (I think because when I dont use the pppoeconf, I try to connect to wireless, then did disconnected.What can I do ? Ever 30 seconds I connect the wireless,It's so boring


title: Why does cd // work?

text: > **Possible Duplicate:**   >  unix, difference between path starting with '/' and '//' On my Mac OS X Lion box, with Bash:               $ cd //     $ pwd     //     $ ls     Applications    System      cores      mach_kernel    sbin     Developer       Users       dev        net            tmp     Library         Volumes     etc        opt            usr     Network         bin         home       private        var      This has to be some mysterious backwards-compatibility thing, but what is it?


title: "cd //" and "cd /" what is the difference?

text: > **Possible Duplicate:**   >  unix, difference between path starting with '/' and '//' If I make a `cd //` followed by a `pwd` I see:               # cd //     # pwd     //      why is that? what's the differece with:               cd /     pwd     /      Everything looks the same to me...


title: Install ffmpeg 0.7.1-5 from debian package

text: I downloaded this package for ffmpeg. When I try to install it with command `sudo dpkg -i ffmpeg_0.7.1-5_i386.deb` it writes this error message:               Unpacking ffmpeg (from ffmpeg_0.7.1-5_i386.deb) ...     dpkg: error processing ffmpeg_0.7.1-5_i386.deb (--install):     trying to overwrite '/usr/share/ffmpeg/libx264-ipod640.ffpreset', which is also in package libavcodec-extra-52 4:0.5.1-1ubuntu1.2     dpkg-deb: subprocess paste killed by signal (Broken pipe)     Errors were encountered while processing: ffmpeg_0.7.1-5_i386.deb Could you help me with the installation of this particular version (0.7.1-5) for Ubuntu 10.04? EDIT: after command `sudo apt-get remove libavcodec52 libavcodec-extra-52` new output Should I go manually now step by step and install the dependencies (and possibly their dependencies) or is there some trick?


title: ZSH: insert completion on first tab even if ambiguous?

text: Currently ZSH displays a menu when I first hit tab and the completion is ambiguous. So, if I have 'cd ' in the command prompt and I hit tab, it will show the different available completions. If I hit tab again, it will select the first available completion. I would like to merge these two steps into a single press of the tab key. So, if I'm at 'cd ' and I tab, I would like ZSH to insert the first available match (when ambiguous) and display the menu, which I can then tab through if the first match wasn't the directory I had in mind. The ZSH setup tool put this in my .zshrc, in case any of this is affecting the behavior of my shell:               zstyle ':completion:*' completer _expand _complete _ignored     zstyle ':completion:*' list-colors ''     zstyle ':completion:*' list-prompt %SAt %p: Hit TAB for more, or the character to insert%s     zstyle ':completion:*' matcher-list 'm:{[:lower:][:upper:]}={[:upper:][:lower:]}' '' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]}'     zstyle ':completion:*' menu select=5     zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s     zstyle :compinstall filename '/home/robb/.zshrc'


title: Minimize need for sudo

text: Very often I need to use the `sudo` command because the command I'm running needs higher privileges. Is there some method to minimize the usage of `sudo` and/or a way to use it that's faster than typing my password, but which is still secure?


title: Error handling in shell script

text: I wrote a shell script `run_script.sh`, which includes a step which creates an empty file `run_script.lck`. Everytime the shell script was called by the cronjob, it will check for the existence of `run_script.lck`. If the lock is presence, it indicates that `run_script.sh` is already running and hasn't finished yet. The `run_script.lck` file will be deleted in the end of the program. The trouble is to remove the lock file when the shell script crashed and before it exits. I wrote a line like this:               trap "rm -f run_script.lck" EXIT      But it will remove the lock file in an undesired condition like this: I execute `run_script.sh` in shell A, and it is running, the lock file was created. Then I execute it again in shell B, and it said that the script is already running and the script will be aborted. However, because the trap received an EXIT signal including the signal from shell B, which is exiting an aborted script, then it removes the lock file. And the script in shell A is still running, but the lock was deleted and anyone can call another `run_script.sh` again while there is already one script running. Any idea how to solve this?


title: No route to host after upgrade to Fedora 19

text: I recently upgraded a system from Fedora 17 to 19. Now, I am not able to connect to any service **other than ssh** (perhaps a few others may be available but not sure) on it. Earlier this was not a problem. I have tried to disable any firewall:               $ sudo service iptables stop     Redirecting to /bin/systemctl stop  iptables.service     $ sudo /etc/init.d/ebtables stop     Stopping ebtables (via systemctl):                         [  OK  ]      Also tried `nc` at arbitrary port:               $ nc -l 28000      and tried to connect from another host:               $ nc myhost 28000     Ncat: No route to host.      Any ideas? I am using KVM on this host to support Linux guests with bridged networking (note I am trying to troubleshoot the physical host not the guests), if that helps. Also, here is the output of `chkconfig`.               Note: This output shows SysV services only and does not include native           systemd services. SysV configuration data might be overridden by native           systemd configuration.                If you want to list systemd services use 'systemctl list-unit-files'.           To see services enabled on particular target use           'systemctl list-dependencies [target]'.          btseed          0:off   1:off   2:off   3:off   4:off   5:off   6:off     bttrack         0:off   1:off   2:off   3:off   4:off   5:off   6:off     ceph            0:off   1:off   2:off   3:off   4:off   5:off   6:off     dkms_autoinstaller      0:off   1:off   2:on    3:on    4:on    5:on    6:off     ebtables        0:off   1:off   2:off   3:off   4:off   5:off   6:off     jexec           0:on    1:on    2:on    3:on    4:on    5:on    6:on     livesys         0:off   1:off   2:off   3:on    4:on    5:on    6:off     livesys-late    0:off   1:off   2:off   3:on    4:on    5:on    6:off     netconsole      0:off   1:off   2:off   3:off   4:off   5:off   6:off     network         0:off   1:off   2:on    3:on    4:on    5:on    6:off     vboxballoonctrl-service 0:off   1:off   2:off   3:off   4:off   5:off   6:off     vboxdrv         0:off   1:off   2:off   3:off   4:off   5:off   6:off     vboxweb-service 0:off   1:off   2:off   3:off   4:off   5:off   6:off


title: How to boot on Fedora 18 (Grub2)

text: I have Fedora 18 and Windows 7 on my laptop. I had grub2 bootloader and the default is been set to windows 7. After I turn on my laptop it just automatically boots into windows 7. Now I want to set the default to Fedora 18 again, can you help?


title: Accidentally garbled a bunch of file names in /tmp... ssh keys asking for passwords

text: I accidentally garbled the file names of the contents of my /tmp directory (don't ask) to the point where they're not recoverable. Since doing so, I'm always asked for the password to my ssh keys (particularly in git). Any suggestions/fixes? * * * **Edit:** Per the suggestion below, a reboot did the trick.


title: Deadlock in a crontab between cron and its child defunct processes

text: I'm having a strange case of deadlock, where the two processes launched by `cron` are defunct, but `cron` does not pick the return code and exit. I don't have access to the root user.               myuser@myserver:~) ps -ef | grep 30163                                  11:29AM     3701     28964 29950  0 11:30 pts/13   00:00:00 grep 30163     root     30163  6622  0 11:00 ?        00:00:00 /usr/sbin/cron     3701     30199 30163  0 11:00 ?        00:00:00 [monitor_daemon] <defunct>     3701     30598 30163  0 11:00 ?        00:00:00 [sendmail] <defunct>     myuser@myserver:~)        1. Is there a known reason why we would end up in such a situation?   2. How, without having access to the root user, can I get rid of those three processes that consume memory? I'm using the following kernel/distribution:               Linux myserver 2.6.32.23-0.3-default #1 SMP 2010-10-07 14:57:45 +0200 x86_64 x86_64 x86_64 GNU/Linux     LSB_VERSION="core-2.0-noarch:core-3.2-noarch:core-4.0-noarch:core-2.0-x86_64:core-3.2-x86_64:core-4.0-x86_64"     SUSE Linux Enterprise Server 11 (x86_64)     VERSION = 11     PATCHLEVEL = 1


title: Xmonad: some apps do not start in workspace which I defined in config

text: This is part of my config of xmonad in `~/.xmonad/xmonad.hs`               myWorkspaces            :: [String]     myWorkspaces            = clickable . (map dzenEscape) $ ["web","doc","ssh","devel","chat","temp"]            where clickable l     = [ "^ca(1,xdotool key super+" ++ show (n) ++ ")" ++ ws ++ "^ca()" |                                 (i,ws) <- zip [1..] l,                                 let n = i ]                   myManageHook = composeAll         [ className =? "MPlayer"        --> doFloat         , className =? "Vlc"            --> doFloat         , className =? "Gimp"           --> doFloat         , className =? "skype"           --> doF (W.shift (myWorkspaces !! 4))         , className =? "Mail"           --> doF (W.shift (myWorkspaces !! 4))     --    , className =? "XCalc"          --> doFloat         , className =? "Firefox"       --> doF (W.shift (myWorkspaces !! 0)) -- send to ws 0     --    , className =? "Nautilus"       --> doF (W.shift (myWorkspaces !! 5)) -- send to ws 5         , className =? "gvim"       --> doF (W.shift (myWorkspaces !! 1)) -- send to ws 1     --    , className =? "Terminal"       --> doF (W.shift (myWorkspaces !! 3)) -- send to ws 3         , className =? "Gimp"           --> doF (W.shift (myWorkspaces !! 1)) -- send to ws 1         , className =? "Codeblocks"      --> doF (W.shift (myWorkspaces !! 3)) -- send to ws 3         , className =? "stalonetray"    --> doIgnore         ]      The thing is, that Firefox or Codeblocks start at workspace I want, but skype and mail (Thunderbird) doest respect these settings and always start in active workspace.


title: Resolving circular dependency hell for libX11 and libXi

text: I'm trying to install `X11` from source. Source files from some repository:               libX11-1.6.0.tar.gz     libXi-1.7.1.901.tar.gz      `libX11-1.6.0`               paulk@node005:libX11-1.6.0$ ./configure --prefix=$HOME/software     XKBExtDev.c:35:31: fatal error: X11/extensions/XI.h: No such file or directory     compilation terminated.     make[3]: *** [XKBExtDev.lo] Error 1     make[3]: Leaving directory `/home/paulk/libX11-1.6.0/src/xkb'     make[2]: *** [all-recursive] Error 1     make[2]: Leaving directory `/home/paulk/libX11-1.6.0/src'     make[1]: *** [all] Error 2     make[1]: Leaving directory `/home/paulk/libX11-1.6.0/src'     make: *** [all-recursive] Error 1      but for `libXi-1.7.1.901`               paulk@node005:libXi-1.7.1.901$      configure: error: Package requirements (xproto >= 7.0.13 x11 >= 1.4.99.1 xextproto >= 7.0.3 xext >= 1.0.99.1 inputproto >= 2.2.99.1) were not met:          No package 'x11' found     No package 'xext' found     No package 'inputproto' found      What could I be missing?


title: how to require sudo to view files?

text: I have a ssh server. I allow people to connect to it if they want. I do my programming homework on it. I am in trouble with my teacher because people were cheating off it. I need to know how to require sudo just to access the file.


title: Linux Kickstart stops with dialog about “CD Found”

text: I'm installing Red Hat in a virtual machine, I'm using a kickstart file from an url, but few moments later the system starts to load, it shows a dialog about "CD Found - To begin testing the CD media..." The kickstart file looks like this:               # Kickstart file automatically generated by anaconda.          url --url=http://rha-server/pub/os/rhel5     reboot               install     cdrom     lang en_US.UTF-8     langsupport --default=en_US.UTF-8 en_US.UTF-8     keyboard us-acentos     xconfig --card "VESA driver (generic)" --videoram 12288 --hsync 31.5-37.9 --vsync 50-70 --resolution 800x600 --depth 16 --startxonboot  --defaultdesktop gnome     network --device eth0 --bootproto dhcp     rootpw --iscrypted $1$ADLUertwert4DAsC7Hi7nN9S/kvbu.     firewall --disabled     selinux --permissive     authconfig --enableshadow --passalgo=md5     timezone America/Costa_Rica     bootloader --location=mbr --append="rhgb quiet"     # The following is the partition information you requested     # Note that any partitions you deleted are not expressed     # here so unless you clear all partitions first, this is     # not guaranteed to work     clearpart --all     part /boot --fstype ext3 --size=100     part pv.8 --size=10200     #volgroup LV0 --pesize=32768 pv.8     #logvol / --fstype ext3 --name=root --vgname=LV0 --size=6080     #logvol swap --fstype swap --name=swap --vgname=LV0 --size=4096          %packages     @ admin-tools     @ editors     @ emacs     @ system-tools     @ text-internet     @ gnome-desktop     @ dialup     @ compat-arch-support     @ smb-server     @ base-x     @ web-server     @ printing     @ server-cfg     @ development-tools     @ graphical-internet     system-config-httpd     system-config-samba     system-config-printer     system-config-boot     system-switch-mail     kernel     system-config-printer-gui     system-config-kickstart     system-switch-mail-gnome     e2fsprogs     kernel-devel     grub     lvm2          %post          echo "192.168.0.254  rha-server" >> /etc/hosts          RHA_PUB=http://rha-server/pub     curl $RHA_PUB/rha/yum/rha-rhel.repo > /etc/yum.repos.d/rha-rhel.repo     curl $RHA_PUB/rha/yum/rha.repo > /etc/yum.repos.d/rha.repo          yum groupinstall -y "Red Hat Academy Student"      Is there something wrong? Thanks! Dialog image: http://img211.imagevenue.com/img.php?image=261712969_Dialog_122_1128lo.jpg


title: Copy and paste text in Xterm on OpenBSD

text: I installed OpenBSD 5.5 using the recommended defaults. The OS came with fvwm as the window manager. How do I copy text within an Xterm and paste it into another Xterm? Using the mouse? Using only the keyboard? Before making this post, I checked the man page of fvwm and there is nothing that answers my question.


title: Is the GNU Coreutils copied from Unix?

text: `Linux` itself is not a copy of `Unix` because one can argue it simply conforms to the `POSIX` standard. However, how about the `GNU Coreutils` which contains utilities like `ls`, `cd` and `rm`, etc...? Is there any standard defining the names of these basic utilities and their behaviors? If not, can we say it was copied from `Unix`?


title: What is the maximum memory a 64bit process can consume?

text: I know that there is a hardware capacity of 2^48 bits, and I know that there isn't a lot of native limiting of app memory constraints in general by the kernel, but is there an upper bound of the memory that an app can consume in general besides 2^48 because that's the number of channels available on the DIMM sockets? For reference, Redmond limits their products to ~2TB on most server products.


title: Terminating an infinite loop

text: I have a command that I want to have run again automatically each time it terminates, so I ran something like this:               while [ 1 ]; do COMMAND; done;      but if I can't stop the loop with `Ctrl-c` as that just kills `COMMAND` and not the entire loop. How would I achieve something similar but which I can stop without having to close the terminal?


title: Extract value from different column and replace in another column

text: I am a biologist, I need one more help in text file editing. I would like to get the help of computer experts               ##fsdfsd     ##sdd-ver gen 5.5.7     Xm Gen CDS     1       148     .       +       .       Name=;created by=User;modified by=User;ID=Bm     Xm Gen CDS     149     193     .       +       .       Name=;created by=User;modified by=User;ID=Bm     Xm Gen CDS     194     279     .       +       .       Name=;created by=User;modified by=User;ID=Bm     Xm Gen CDS     280     412     .       +       .       Name=;created by=User;modified by=User;ID=Bm     Xm Gen CDS     413     499     .       +       .       Name=;created by=User;modified by=User;ID=Bm     Xm Gen CDS     500     702     .       +       .       Name=;created by=User;modified by=User;ID=Bm     Xm Gen extracted region        1       148     .       +       .       Name=Extracted region from gi|371442828|gb|JH557032.1|;Extracted interval="437225 <- 437372";ID=Bm     Xm Gen extracted region        149     193     .       +       .       Name=Extracted region from gi|371442828|gb|JH557032.1|;Extracted interval="436969 <- 437013";ID=Bm     Xm Gen extracted region        194     279     .       +       .       Name=Extracted region from gi|371442828|gb|JH557032.1|;Extracted interval="435418 <- 435503";ID=Bm     Xm Gen extracted region        280     412     .       +       .       Name=Extracted region from gi|371442828|gb|JH557032.1|;Extracted interval="435209 <- 435341";ID=Bm     Xm Gen extracted region        413     499     .       +       .       Name=Extracted region from gi|371442828|gb|JH557032.1|;Extracted interval="434376 <- 434462";ID=Bm     Xm Gen extracted region        500     702     .       +       .       Name=Extracted region from gi|371442828|gb|JH557032.1|;Extracted interval="434084 <- 434286";ID=Bm      Replace (Xm Gen CDS) rows with values present in (Xm Gen extracted region) rows. i.e first row ($4 column:1 is replaced with 437225 value and $5 column:148 is replaced with 437372, in row 2 ($4 column:149 replaced with 436969, $5 column:193 replaced with 437013 and so on) and print output like below               ##gff-version 2     ##source-version geneious 5.5.7     Xm Gen CDS     437225       437372     .       +       .       Name=;created by=User;modified by=User;ID=Bm     Xm Gen CDS     436969     437013     .       +       .       Name=;created by=User;modified by=User;ID=Bm     Xm Gen CDS     435418     435503     .       +       .       Name=;created by=User;modified by=User;ID=Bm     Xm Gen CDS     435209     435341     .       +       .       Name=;created by=User;modified by=User;ID=Bm     Xm Gen CDS     434376     434462     .       +       .       Name=;created by=User;modified by=User;ID=Bm     Xm Gen CDS     434084     434286     .       +       .       Name=;created by=User;modified by=User;ID=Bm     Xm Gen extracted region        1       148     .       +       .       Name=Extracted region from gi|371442828|gb|JH557032.1|;Extracted interval="437225 <- 437372";ID=Bm     Xm Gen extracted region        149     193     .       +       .       Name=Extracted region from gi|371442828|gb|JH557032.1|;Extracted interval="436969 <- 437013";ID=Bm     Xm Gen extracted region        194     279     .       +       .       Name=Extracted region from gi|371442828|gb|JH557032.1|;Extracted interval="435418 <- 435503";ID=Bm     Xm Gen extracted region        280     412     .       +       .       Name=Extracted region from gi|371442828|gb|JH557032.1|;Extracted interval="435209 <- 435341";ID=Bm     Xm Gen extracted region        413     499     .       +       .       Name=Extracted region from gi|371442828|gb|JH557032.1|;Extracted interval="434376 <- 434462";ID=Bm     Xm Gen extracted region        500     702     .       +       .       Name=Extracted region from gi|371442828|gb|JH557032.1|;Extracted interval="434084 <- 434286";ID=Bm


title: yum translation of rpm -Uvh

text: I'm trying to understand what `yum` version of `rpm -Uvh` is. I found this question about that command and `yum`, but it doesn't have what I'm looking for. Looking at `\--help`, would this be the equivalent of `-Uvh`?               $ yum -v update <package>      I'm using `yum 3.2.22`


title: strange NTP traffic

text: I have a number of openSUSE VMs (mostly 13.1). One of the VMs is configured to sync its time with the outside world, the other ones sync with this one. This has never caused problems (I am aware of). Now I noticed that ntpd on the outside-connected VM causes about 9% CPU load (permanently!) and makes connections to 15+ hosts causing outbound traffic of about 100K/s and inbound traffic at a little lower level (all from/to my UDP port 123) – which even continues (now for several minutes) after I have stopped ntpd and there is no such outbound traffic any more. I had configured ntpd to the pool address de.pool.ntp.org but that does not make a difference. I made a distro upgrade (booting from DVD) and afterwards even reinstalled ntp without any change. **Edit: problem "solved"** After I have blocked incoming UDP 123 completely `ntpd` acts normally. I still don't understand what may have caused this. It should not be possible to connect to this VM port from the outside. There is no port forwarding in the VDSL router. But: A few minutes ago I sent a UDP packet to port 123 from the Internet and (whyever) the VDSL router passed it to the VM. If I repeat that now then the packet does not reach the VM any more. Maybe that was a strange NAT side effect of the many UDP 123 connections. I am going to block this traffic except for the intended servers.


title: I installed Linux Mint 13 Maya (MATE) 64 bit, what should I choose when asked between Ubuntu, Fedora, etc?

text: Every other download for Linux, I'm being asked what distribution I have (Ubuntu, Fedora, Debian etc) What should I choose having installed Linux Mint 13 Maya (MATE) 64 bit?


title: Redirect all non-local traffic to a socks proxy

text: Is it possible to redirect all non-local traffic to a socks proxy? so, for example i have:                4 computers (clients A-D: 10.0.0.1-3 or dhcp)      1 computer with 2 network cards (gateway-server, eth0: 10.0.0.254, eth1: 192.168.1.1)      1 computer with 2 network cards (router, eth0: 192.168.1.254, eth1: public-ip)      i need to make all computer that through my gateway-server to use socks proxy that installed on gateway-server without need to configure each client's browser. the purpose is to log all urls and bandwidth usages. the question is..   1. is it possible? and if so, how to do it?   2. if is it not possible, what are the alternative?


title: Howto use Google DNS with ppp

text: I have a mobile broadband device that I use to connect to the internet. I wish to use the google dns service, their nameservers being `8.8.8.8` and `8.8.8.4`. I add them to `/etc/resolv.conf` but when I connect with wvdial,               ➜  ~  sudo wvdial mts     --> WvDial: Internet dialer version 1.61     --> Initializing modem.     --> Sending: ATZ     OK     --> Modem initialized.     --> Sending: ATDT#777     --> Waiting for carrier.     ATDT#777     CONNECT 3100000     --> Carrier detected.  Starting PPP immediately.     --> Starting pppd at Sat Sep  1 19:45:18 2012     --> Pid of pppd: 3298     --> Using interface ppp0     --> local  IP address 180.215.45.164     --> remote IP address 10.228.138.133     --> primary   DNS address 10.228.129.114     --> secondary DNS address 10.228.129.113      This updates my `resolv.conf` to the new DNS servers. The problem is that my ISP's DNS service is buggy and I wish to use either google dns or opendns. How do I achieve this? I am running chakra linux (2012.08.22 - Claire)