title: Import VPN config files to NetworkManager from command line

text: One can import `.ovpn` files to NetworkManager through GUI tool `nm- connection-editor` (right click on `nm-applet` and click on `Edit connections`): `Add` -> `Import a saved VPN configuration...`. My goal is to do same thing but via command line using tools like `nm-cli`. Is it possible somehow?


title: What directories can be shared between distros?

text: After getting some information about partition scheme, I came to know that using discrete partitions will be more useful. If I'd to install another OS, and see having `/home` directory in seperate partition would be useful. What I want to know is, which directories are used during installation of Arch Linux. Do directries like `/boot`, `/`,`/data` and `/var` get changed while installing another Linux distribution?


title: How to send a running process to jail?

text: _"Go directly to jail; do not pass go, do not collect $200"_ — Monopoly Is there any way to make a _running_ process's all future file access behave as if it has always been in a `chroot` environment?


title: How to truncate only given column length?

text: INPUT:               a@notebook:~$ cat in.csv     'XYZ843141'^'ASDFSAFXYVFSHGDSDg sdGDS  dsGDSgfa assfd faSDFAS saDFSAFD adFSA343fa sdfSADF'^'BAAAR'^'YYY'^'..... and so on, further columns     'YYZ814384'^'ASfdEtRiuognfnseaFREQTzKb   aSFfdsaADSFSA  adsFdsa34 34 ASFfsas  saftrzj etrzrasdfasffasf safs'^'foooobaaar'^'ZZZ'^'..... and so on, further columns      OUTPUT:               a@notebook:~$ cat in.csv | SOMEMAGIC     'XYZ843141'^'ASDFSAFXYVFSHGDSDg s'^'BAAAR'^'YYY'^'..... and so on, further columns     'YYZ814384'^'ASfdEtRiuognfnseaFRE'^'foooobaaar'^'ZZZ'^'..... and so on, further columns      **My question** : If:               '^'      is the separator, then how can SOMEMAGIC (an awk/sed??) truncate the second column to given length? Example: 20 chars max, from this:               ASDFSAFXYVFSHGDSDg sdGDS  dsGDSgfa assfd faSDFAS saDFSAFD adFSA343fa sdfSADF      to this:               ASDFSAFXYVFSHGDSDg s      and preserve all the other things :\


title: How much memory is lost on startup

text: I was wondering the following: As I start my computer and Xubuntu, it starts many programs before the login screen. Is it possible to measure by Valgrind the total number of lost bytes during startup? Something like               For every program i do       valgrind i


title: is there a "goto" like command in ksh

text: Here is my script:               #!/bin/ksh          #this is where I want to go again if user enter      #an answer other than "yes or no"          echo "yes or no?"     read ans          case $ans in              [yY]*)             echo "yes"             ;;              [nN]*)             echo "no"             ;;              *)             echo "yes or no only"             # here, if the answer is not "Y" or "N",              # I want to go back to asking "yes or no?"             ;;     esac      Can anyone give me a hint?


title: How to alter PATH within bash script?

text: I have several projects that require me to change versions of Java/Grails/Maven. I'm trying to handle this with some Bash scripts that would make the changes. For example:               #!/bin/sh          export JAVA_HOME=/cygdrive/c/dev/Java/jdk1.5.0_22     export PATH=$JAVA_HOME/bin:$PATH     export GRAILS_HOME=/cygdrive/c/dev/grails-1.0.3     export PATH=$GRAILS_HOME/bin:$PATH     export MAVEN_HOME=/cygdrive/c/dev/apache-maven-2.0.11     export PATH=$MAVEN_HOME/bin:$PATH     which java     which grails     which mvn      When this executes, it successfully changes the PATH within the context of the script, but then the script ends, and no change has been accomplished. How can I run a script in a way to change the PATH in for the shell in which I am currently working? I'm using Cygwin.


title: How do I echo just 1 column of output from ls command?

text: Lets say when I do ls command the output is: file1 file2 file3 file4 Is it possible to display only a certain column of output, in this case file2? I have tried the following with no success:               echo ls | $2      Basically all I want to do is echo only the second column, in this case, I want to echo: file2


title: Why would cvs check in a diff instead of a file?

text: I did a checkout recently, and one of the files was not the file that I checked in, but rather it was a `diff` of that file and the previous version. Is `cvs` known for this kind of error?


title: BCache and disk encryption

text: I recently bought a new laptop with a 16Gb mSATA SSD cache drive. I haven't used that one yet. I have, however, opted for Ubuntu 13.04 with "Full Disk Encryption" for the main partition (is that what's called LUKS?). With bcache making it's way into 3.10, I'd like to take advantage of the aforementioned cache drive. According to this, one has to format one's backing and cache drives in order to take advantage of bcache. My questions are:   1. Which order do I proceed in? Set up bcache, then (re)setup LUKS or the other way around?   2. Except for the few files pertaining to the encrypted setup (incl. /etc/fstab), can I tar/rsync/whatever the rest of the existing fs to another disk, set up bcache and LUKS and then tar/rsync/whatever back and expect things to work?   3. Are there other things I should know about?


title: Using key file as password with OpenSSL

text: I got an assignment to decrypt a binary file which is encrypted using aes. I have a 32 byte binary file which is a key for decryption. I know how to decrypt if the key is a passphrase by using               openssl enc -d -aes-256-cbc -in file.out      In this case, the key is a binary file. How do I use it?


title: Removing access privileges to backup while maintaining current setup

text: I have a giant directory, and I am dealing with a backup. I would like to store this backup in as safe of a way as possible. One of the ways of doing that is removing rwx privileges through chmod. Best would be if I could somehow lock the folder to anyone other than root. I can do that by running chmod -R, but that effectively removes whatever access settings there were on all files beforehand. I don't want that for we may want to use this backup one day and then it would be good not to have changed whatever mod settings we have set within the folder. So how can I best remove access privileges for all but root without permanently loosing whatever access setting was there before, within the folder? Is there some 'lock folder' mechanism?


title: How to automate connecting to multiple network devices, running a command and saving the output to a file?

text: I have to run a command on around 1000 network devices and save the output to a file. In a file I have a list of all the network device names that have to be connected to using SSH. I then have to run a command, let's say `show interface description` for instance, then save the output to a file. The devices are all set up with a generic username and password that is the same on all devices. So basically I need a script to run these commands on all devices in the list file:               ssh user@device1     password: passwordhere     user@device1> show interface description     user@device1> exit      Then save all the output to a file. I am using Red Hat Enterprise Server.


title: Matlab gets "crazy" after type special characters

text: I'm using a computer running Ubuntu and I'm connected through ssh to a RedHat machine where I use Matlab in command line mode (matlab -nodesktop). Matlab version is `7.10.0.499 (R2010a)`. My problem occurs when I type any key which produces "special characters", such as `ñ`, `á`, etc... I managed to solve this, by setting this alias to matlab:               alias mat 'xmodmap -e "keycode 47 = Escape" -e "keycode 34 = Escape"; matlab -nodesktop; setxkbmap;'      ...but this solution makes these changes globally, and I cannot type those characters (as long as matlab is running) in any other application including terminals, browsers, etc. I read that this is a problem for this version of Matlab, but in that case, a new question arises: if I use xmodmap in a terminal (xterm) connected to other machine, why are those changes spread globally to my session?


title: What's the difference between sh script and sh < script

text: What's the difference between               sh myscript      and               sh < myscript      I played around and they seem to have the same effect. Are they equivalent?


title: How can I mount filesystems with > 4KB block sizes?

text: I have a 3TB hard disk pulled out of a WD Mybook Live NAS. The partition table is as follows:               Model: ATA WDC WD30EZRS-11J (scsi)     Disk /dev/sdb: 3001GB     Sector size (logical/physical): 512B/4096B     Partition Table: gpt          Number  Start   End     Size    File system  Name     Flags      3      15.7MB  528MB   513MB                primary      1      528MB   2576MB  2048MB  ext3         primary  raid      2      2576MB  4624MB  2048MB  ext3         primary  raid      4      4624MB  3001GB  2996GB  ext4         primary      So I'm trying to access partition 4 (the big one!):               root@john-desktop:~/linux-3.9-rc8# mount -t ext4 /dev/sdb4 /mnt/     mount: wrong fs type, bad option, bad superblock on /dev/sdb4,            missing codepage or helper program, or other error            In some cases useful info is found in syslog - try            dmesg | tail  or so      Dmesg output:               [ 2058.085881] EXT4-fs (sdb4): bad block size 65536      This is fair enough. As far as I can tell my kernel isn't configured to support block sizes of over 4K. My question is, what symbol should I be searching for in my kernel config to allow bigger block sized partitions to be mounted? I've scoured google for this, and I thought I saw the option before but I can't find any mention of it in the latest stable kernel source. _Edit_ : Full hard disk info from hdparm here: http://pastebin.com/hDdbUzjd _Edit_ : dumpe2fs output:               Mount count:              0     Maximum mount count:      30Last checked:             Wed May 30 15:22:14 2012Check interval:           15552000 (6 months)Next check after:         Mon Nov 26 14:22:14 2012Lifetime writes:          319 GBReserved blocks uid:      0 (user root)Reserved blocks gid:      0 (group root)First inode:              11     Inode size:               256     Required extra isize:     28     Desired extra isize:      28     Journal inode:            8     Default directory hash:   half_md4     Directory Hash Seed:      cd7a28a0-714c-9942-29f4-83bca1209130     Journal backup:           inode blocks     Journal features:         journal_incompat_revoke     Journal size:             2048M     Journal length:           32768     Journal sequence:         0x00010146     Journal start:            0


title: string and number comparsion in bash in test statements?

text: I am not sure about this comparison i am doing:                  if [ "$exit_status" -eq 0 ];then        #some statements        fi      is this correct way of comparing numbers or quotes make the variable `exit_status` a string to be compared with 0.I don't know if this could fail in some scenario.


title: extend reiserfs filesystem size

text: I have a VM server with an extra disk mounted on it. I have increased size on it from VMWare. The disk uses reiserfs file system.                /dev/sdb1 /data/mysql_data reiserfs rw,relatime 0 0  After expanding disk size, I run this               # fdisk -l     Disk /dev/sdb: 39.3 GB, 39322648576 bytes     255 heads, 63 sectors/track, 4780 cylinders     Units = cylinders of 16065 * 512 = 8225280 bytes     Sector size (logical/physical): 512 bytes / 512 bytes     I/O size (minimum/optimal): 512 bytes / 512 bytes     Disk identifier: 0x00000000             Device Boot      Start         End      Blocks   Id  System     /dev/sdb1               1        2611    20971488+  83  Linux      After this, I run               # resize_reiserfs -f /dev/sdb1     resize_reiserfs 3.6.21 (2009 www.namesys.com)          /dev/sdb1 already is of the needed size. Nothing to be done      and then df -h but still file system size hasn't increased.               # df -h     Filesystem            Size  Used Avail Use% Mounted on     /dev/mapper/vg_0-lv_root                            21G   12G  7.9G  60% /     tmpfs                1004M     0 1004M   0% /dev/shm     /dev/sda1             485M  156M  305M  34% /boot     /dev/sdb1              20G   15G  5.6G  73% /data/mysql_data      At the moment, my partition table says this               # cat ~/sfdisk_sdb.txt      # partition table of /dev/sdb     unit: sectors          /dev/sdb1 : start=       63, size= 41942977, Id=83     /dev/sdb2 : start=        0, size=        0, Id= 0     /dev/sdb3 : start=        0, size=        0, Id= 0     /dev/sdb4 : start=        0, size=        0, Id= 0      So, what am I doing wrong?


title: free video editing software for Linux with audio tracks auto matching

text: I have a few video files which basically cover the same action from different perspectives. I would like to merge them into one "split-screen" kind of video (two or four panes). The problem is videos are different lengths and align partially, for example one is 40mins long and the other one is only 5mins long somewhere in the middle, another one covers 10mins from the end of the first one and a few mins after that. I am not able to precisely match the tracks visually, I need the software that will match/align/sync the videos based on the audio tracks which contain some common "events". Is there anything available for Linux that will do the job?


title: Can't pin Wheezy on Linux Mint Debian Edition (LMDE)

text: I'd like to have your advice on yet another pinning problem that hit me recently. I've been through `man apt_preferences` several times, and I can't find anything wrong in what I did. I was having kernel panics in Linux Mint Debian Edition (LMDE), when I decided that I wanted to use packages from Debian Wheezy to get a newer kernel that could fix them. I decided to try with pinning. The plan was to add a deb source for wheezy, and pin it with a very small priority, so that Wheezy packages would be installed only if explicitly requested for. Then, I would install the kernel- image from Wheezy. I added this source:               deb http://ftp.uninett.no/pub/linux/debian wheezy main contrib non-free      And this pin:               Explanation: Disable Wheezy     Package: *     Pin: origin "ftp.uninett.no"     Pin-Priority: 1      But didn't work. I tried several other approaches like:               Explanation: Disable Wheezy     Package: *     Pin:  release o=Debian,n=wheezy     Pin-Priority: 1      or even               Explanation: Disable Wheezy     Package: *     Pin:  release n=wheezy     Pin-Priority: 1      No matter what, and even with negative priorities, Wheezy packages still had the same priority (500) as the LMDE's, and they were preferred to LMDE's since they were newer. Can you see anything that I missed so far? PS: If you're interested in the specific panic problem, you can read the full story here


title: How much success can I expect with Qemu On PowerPC Linux?

text: I'm on Ubuntu 12.04 for PowerPC and I installed Qemu just for kicks, having experience using it in the past to build an iso for an arm tablet, and upon doing a search I found this installed on my system:               /usr/bin/qemu-alpha     /usr/bin/qemu-arm     /usr/bin/qemu-armeb     /usr/bin/qemu-cris     /usr/bin/qemu-ga     /usr/bin/qemu-i386     /usr/bin/qemu-ifdown     /usr/bin/qemu-ifup     /usr/bin/qemu-img     /usr/bin/qemu-io     /usr/bin/qemu-launcher     /usr/bin/qemu-m68k     /usr/bin/qemu-microblaze     /usr/bin/qemu-mips     /usr/bin/qemu-mipsel     /usr/bin/qemu-nbd     /usr/bin/qemu-ppc     /usr/bin/qemu-ppc64     /usr/bin/qemu-ppc64abi32     /usr/bin/qemu-sh4     /usr/bin/qemu-sh4eb     /usr/bin/qemu-sparc     /usr/bin/qemu-sparc32plus     /usr/bin/qemu-sparc64     /usr/bin/qemu-system-arm     /usr/bin/qemu-system-cris     /usr/bin/qemu-system-i386     /usr/bin/qemu-system-m68k     /usr/bin/qemu-system-microblaze     /usr/bin/qemu-system-mips     /usr/bin/qemu-system-mips64     /usr/bin/qemu-system-mips64el     /usr/bin/qemu-system-mipsel     /usr/bin/qemu-system-ppc     /usr/bin/qemu-system-ppc64     /usr/bin/qemu-system-ppcemb     /usr/bin/qemu-system-sh4     /usr/bin/qemu-system-sh4eb     /usr/bin/qemu-system-sparc     /usr/bin/qemu-system-sparc64     /usr/bin/qemu-system-x86_64     /usr/bin/qemu-x86_64      But these can't all work for real can they? On PowerPC? Sure they are installed but… what actually works? Anyone know which architecture I would have fair success emulating with qemu on my PowerPC Ubuntu G4 Powerbook?


title: List all files with the same inode number?

text: Lets say, when I do `ls -li` inside a directory, I get this:               12353538 -rw-r--r-- 6 me me 1650 2013-01-10 16:33 fun.txt      As the output shows, the file _fun.txt_ has _**6**_ hard links; and the inode number is _12353538_. Given the case, how do I find all the hard links for the file i.e. files with the same inode number?


title: Can I duplicate my Apache server settings on a new Linux install?

text: I have an Apache 2 server set up on my computer that I use for local testing. To be clear, it is _not_ hosting sites on the internet. It's just for local debugging and designing. I was using Ubuntu Linux, but now I have a new computer using Linux Mint. What I'd like to do is take all the Apache sites and settings that I have on the old Ubuntu machine and reproduce them on the new Linux Mint machine. I only know how to do this manually, one site at a time, starting from scratch. Creating a file for each site in the `sites-available` directory and activating them with `a2ensite`. And then making edits to any configuration files, like adding some lines to my `php.ini` file to enable Xdebug, and hoping I haven't missed anything. I'm sure I'm doing this inefficiently and in a way that's prone to human error. Is it not possible to in some way copy the entirety of the Apache 2 settings and sites on my Ubuntu machine and put them on my Linux Mint machine in one go? Or at least, in a minimum of steps that is less than recreating each site and setting from scratch? Please note that I am more of a designer than an administrator, so please assume my knowledge of Linux commands and server settings is minimal.


title: What difference between openssh key and putty key?

text: I've found ssh-keygen ("ssh" package) comand produce another keys that puttygen command ("putty" package). If I create public and private keys with ssh-keygen some ssh-servers can not accept my keys. If I create keys with puttygen one server accept it. Why linux repositories don't propose some common solution (package) for it? I've found another package ssh-3.2.9.1 which produce another keys that must work with putty. But why there is no handy solution in SSH?


title: Do you recognize this audio panel?

text: Wondering if anyone recognizes the app in the images presented at the top of this question? Change PulseAudio Input/Output from Shell? I loaded Fedora 18 - MATE and don't see this app. Your assistance is appreciated. If you are able to post the name of the app to the question, as well, that would be helpful to future users struggling with ASLA issues.


title: Was my CPU kinda broken?

text: Today I've received some message from `mcelog` utility,               Processor 3 heated above trip temperature. Throttling enabled.     Please check your system cooling. Performance will be impacted      It happens when I build a huge program, I'm not sure if it means something. Did I broke my CPU in some way? Or was it just a normal message


title: Change a value in a config file, or add the setting if it doesn't exist?

text: When modifying config files from the command line, I often want to find the setting in the config file and modify that line if that setting exists. If that setting doesn't exist, I want to add it to the end of the file. I end up doing something like:               if [ `grep -c '^setting=' example.conf` == 0 ]     then          echo "setting=value" >> example.conf     else          sed -i 's/^setting=.*/setting=value/g' example.conf     fi      Which seems like an awful lot of code for something so simple. This doesn't even do basic things like check that the config file already ends in a new line before appending to it. Surely there is a utility that does this, or a simpler command that I can use.


title: How do I sort the signal buses with bits in ascending order?

text: I am trying to sort a file with signal buses. I am looking for result where the bits are in ascending order -- 2 followed by 3 and not 20.               cat file1 |sort          file1     cls_16_snap[2]     cls_16_snap[20]     cls_16_snap[21]     cls_16_snap[22]     cls_16_snap[23]     cls_16_snap[24]     cls_16_snap[25]     cls_16_snap[26]     cls_16_snap[27]     cls_16_snap[28]     cls_16_snap[29]     cls_16_snap[3]     cls_16_snap[30]      result               -------     cls_16_snap[2]     cls_16_snap[20]     cls_16_snap[21]     cls_16_snap[22]     cls_16_snap[23]     cls_16_snap[24]     cls_16_snap[25]     cls_16_snap[26]     cls_16_snap[27]     cls_16_snap[28]     cls_16_snap[29]     cls_16_snap[3]     cls_16_snap[30]


title: Copy-paste for vim is not working when mouse (:set mouse=a) is on?

text: I was trying to copy paste something from vim to another application and also, from that application to `vim` using right click with mouse and then copy and paste (or with `Ctrl`+`v` and `Ctrl`+`c` and also tried the `Command` version for mac OSX, obviously.). However, when I try doing it, it only copies the first word when I do it from `vim` or when I copy from the application to `vim`, it copies everything, but inserts strange tabs and spaces. I think this happened when I decided to set my mouse on in the terminal. As in:               :set mouse=a      I have that line on my `.vimrc` file on iTerm (mac os x). Though, is it possible to make my copy paste with other applications that are not in `vim` not to break with the `mouse=a` on? Or is it at least possible to set my mouse off while I do the copy paste? I did `:help` mouse but the comments were not useful for me. I would paste them here but... my copy paste tool is broken! I did try `:set mouse!` and `:set mouse=a!` but these did nothing useful... :( * * * Additional info of my environment: I am also using tmux most of the time, though, I tested this error/bug without a tmux session, thats why I posted this mainly as a vim question. * * * Bounty Message: Please ask for more information of my environment if you need it (forgot to put this in the bounty message sorry).


title: What does "command1 -> command2" indicate in results from my ls -al?

text: when I do a `ls -al` in `/usr/sfw/bin` I see: `make -> gmake` What does this indicate? Is this a symbolic link? I've googled and have not found the answer to this question.


title: How does Fedora name wireless interfaces?

text: Until recently, my network interfaces were always named `eth{0..x}` or `wlan{0..x}` depending on what type they were. However, now I see that I have `em1` for the ethernet card and `wlp3s0` for the wireless. Also, the interface name never used to change but it seems inconsistent now. Why is this? How does Fedora and/or Linux name these interfaces? Is this a Fedora thing or a Linux in general thing?


title: System freezes when browsing internet

text: About a week ago my system began to freeze (deadlock, only manual shutdown with laptop button helped) from time to time. The frequency of deadlock is increasing. Today it was about 10 deadlocks with only browsing the internet and terminal emulator and vim. It usually happens when loading new url and then all the system is dead. It's very annoying for me as it happens more often. My system is `Lubuntu 11.10` with `xmonad` window manager. Could you help me to find the cause of this problem? Are there some logs associated with deadlocks? Could it be hardware problem? (the system was dead twice while writing this question too) thank you


title: Installing opensuse through an USB

text: Can anyone explain **BRIEFLY** as to how to install OpenSUSE through an USB?. I searched in lot of forums, but i couldn't find anything helpful. Moreover, there was something written about installing it with the dd_rescue command, but that doesn't seem to work. So please give me a brief idea for installing OpenSUSE, through an USB.


title: How to use three monitors on a laptop?

text: I have a laptop running Ubuntu 9.04 with a dual-head setup: laptop panel + external monitor. I'd like to add another monitor but the laptop has a single VGA port, so my question is:   what are my options for setting up a triple-head system on a Linux laptop? (note that I'm open to "distributed display" systems such as xdmx, if it's not too messy to set up :) )


title: Multiple distros in VM with encrypted disk

text: I want to have a GNU/Linux setup on my computer, where I could use different distributions and isolated environments inside an operating system-level virtual machine. Then I also want to share my personal data between all of the OSes and their configurations. And also this data needs to be encrypted. **What should my setup look like?** I thought of the following:   1. Install minimal base distribution like Parabola or Debian.   2. Install VM on it - for example OpenVZ.   3. Install multiple distros inside VM.   4. Create a separate /home partition, which will be encrypted - for example dm-crypt.   5. Share /home partition between distros. Any reason for encrypted /? gave me an idea to use LVM instead of physical partitions, but I had no experience with it. Answers in Different linux distros sharing the same /home folder? state that sharing /home can be problematic. What are alternatives or clarifications to the scheme above?


title: apt-get install openssl doesn't upgrade openssl

text: re heartbleed, I'm trying to upgrade openssl, **WITHOUT** upgrading all packages on my system so I am running `apt-get install openssl` as shown here, it's implied that doing this should upgrade openssl: How to upgrade a single package using apt- get? I verify via apt-cache that it's installed:               root@nyc2-04-www:~# apt-cache policy openssl         openssl:           Installed: 1.0.1g-1           Candidate: 1.0.1g-2           Version table:              1.0.1g-2 0                 500 http://http.debian.net/debian/ sid/main amd64 Packages          *** 1.0.1g-1 0                 100 /var/lib/dpkg/status              1.0.1e-2+deb7u6 0                 500 http://security.debian.org/ wheezy/updates/main amd64 Packages              1.0.1e-2+deb7u4 0                 500 http://ftp.us.debian.org/debian/ wheezy/main amd64 Packages                 500 http://http.debian.net/debian/ wheezy/main amd64 Packages      however after rebooting, **i see that the old vunerable openssl is still active**. running `openssl version -a` shows that **1.0.1f** is still active. also confirmed that my server is still vunerable to heartbleed via http://filippo.io/Heartbleed/#www.uat.phantomjscloud.com **EDIT: fyi i took down nginx so I'm not leaving a vunerable server on the internet.** That's my uat server. I already did a full `apt-get upgrade` on my production server and that succsesfully updates openssl. but back to my question: how can I upgrade openssl without upgrading all packages?


title: Rsync specific pattern, but exclude other files in same path

text: There are lots of files in `/dapp/parsD/parsapp/object`. I only want to `rsync` the files in this directory that match * _.sql_ , * _.pl_ and * _.sh_ , but I also want to exclude 2 specific patterns in the same directory that end in _.sh_. Is this possible? I am running **HP-UX 11i** on both source and destination. `rsync` version is _3.1.0_. The below may be easier to visualize. On the dev server, the ' _x_ ' or ' _X_ ' is replaced by ' _d_ ' or ' _D_ ', and on production server, it will be ' _p_ ' or ' _P_ '. Include the following files:               /xapp/parsX/parsapp/object/*.sql     /xapp/parsX/parsapp/object/*.pl     /xapp/parsX/parsapp/object/*.sh      But exclude the following files:                /xapp/parsX/parsapp/object/getbackdate*autosys.sh      /xapp/parsX/parsapp/object/parssendevent*.sh


title: What does ^Z mean?

text: I tried using ^Z to send and application to the background(to then use `fg` to restore) but I notice that it says "Stopped" and in another terminal while monitoring htop, everything just freezes. Is there a way I can send to background without stopping/suspending the process?


title: openfire chat server Deamon not getting start while server up every time

text: we using a Chat server, its installed with openfire, for local office use we installed it, every day morning while server getting ON openfire service is not getting started, I have added it in run levels too, Using command , chkconfig , Operating system we using is Centos 6.5 final.               chkconfig --level 0123456 openfire on      The output of chkconfig was below               openfire        0:on    1:on    2:on    3:on    4:on    5:on    6:on      And still its not getting started when ever the Server was up and running, Every time i have to start the service manually using               /etc/init.d/openfire start      So this Step's not worked for me, so what i edited the rc.local file and added the service too, its too not working for me               vim /etc/rc.local      Entered like below in the rc.local               sh /etc/init.d/openfire start      If any one face the same issue please let me know how can i get fix.


title: How to install Ubuntu Software Center on Kali Linux

text: Each time I try installing * _software-center *_ on Kali, I get: > E: Package 'software-center' has no installation candidate


title: pkg2ng throwing tons of errors about unknown keywords

text: So... the `pkg_*` tools are deprecated, EOL scheduled for September 2014. Time to convert to pkgng. They have provided the `pkg2ng` tool provided for that. But when I run it, it throws tons of error messages. I don't know if I can ignore them or if that will introduce subtle errors.               # pkg2ng     Converting packages from /var/db/pkg     Converting libsigsegv-2.10...     pkg: fopen(/usr/ports/Keywords/display.yaml): No such file or directory     pkg: unknown keyword display, ignoring @display     Installing libsigsegv-2.10... done     Converting m4-1.4.17,1...     pkg: fopen(/usr/ports/Keywords/mtree.yaml): No such file or directory     pkg: unknown keyword mtree, ignoring @mtree     Installing m4-1.4.17,1... done     Converting libiconv-1.14_2...     pkg: fopen(/usr/ports/Keywords/mtree.yaml): No such file or directory     pkg: unknown keyword mtree, ignoring @mtree     Installing libiconv-1.14_2... done     Converting tdb-1.2.12,1...     pkg: fopen(/usr/ports/Keywords/conflicts.yaml): No such file or directory     pkg: unknown keyword conflicts, ignoring @conflicts     Installing tdb-1.2.12,1... done          (and so on)      Google doesn't give me much, only numerous repetitions of the thread that this post stems from: http://lists.freebsd.org/pipermail/freebsd- pkg/2013-June/000052.html I find that pretty weird, it looks as if there were only 2 or 3 people on the planet having this problem, one of whom would be me. So...   * Anyone had this problem, too?   * Can the error messages be ignored? (But why are they printed, then? Remember, this is the package database, which is pretty central to the system.)   * What can I do to rectify the situation.


title: Removing a directory that has no files in it

text: I recently created a username and a group called `gamesForAdmin`. Since then I deleted it and the folder I made for it is still there:               drwxr-xr-x  5 root     root       4096 Jul  4 11:28 .     drwxr-xr-x 23 root     root       4096 May 29 12:41 ..     drwxr-xr-x  2 sftpuser sftpaccess 4096 Jul  4 11:24 gamesForAdmin     drwxr-xr-x 27 ryan     ryan       4096 Jul  4 11:31 ryan     drwxr-xr-x  3 root     sftpaccess 4096 Jul  4 11:29 sftpuser      When I try to run a `sudo rmdir gamesForAdmin`, I get this error message:               rmdir: failed to remove ‘gamesForAdmin’: Directory not empty      But theres nothing in the directory! When I run an `ls`, there is nothing listed.   * Why does this occur?   * How I can successfully remove this directory? Output of `ls -la gamesForAdmin`:               total 28     drwxr-xr-x 2 sftpuser sftpaccess 4096 Jul  4 11:24 .     drwxr-xr-x 5 root     root       4096 Jul  4 11:28 ..     -rw------- 1 sftpuser sftpaccess  471 Jun  9 19:49 .bash_history     -rw-r--r-- 1 sftpuser sftpaccess  220 Apr  8 21:03 .bash_logout     -rw-r--r-- 1 sftpuser sftpaccess 3637 Apr  8 21:03 .bashrc     -rw-r--r-- 1 sftpuser sftpaccess  675 Apr  8 21:03 .profile     -rw------- 1 sftpuser sftpaccess  644 Jun  9 17:48 .viminfo


title: Location of wifi password/ssid in OpenELEC (Rasperry Pi version)

text: Where OpenELEC stores wifi password/ssid? Is it protected somehow or anybody who can get my SD card can read it? I unpacked my OpenELEC's squashfs image so I can browse freely inside its contents but I can't find the location where my password/ssid are stored.


title: Removing lines with a single common field

text: I have a tab separated file that looks like this:               123   some text     123   some different text     334   some other text     341   more text      and I want to do two things. One is to order everything numerically (this is easy to do) and the other is to remove a line if it's number is already present. I.e. the output would look like this:               123   some text     334   some other text     341   more text      I tried getting a file of just the unique numbers, i.e.               123     334     341      and joining it with the original file with:               join -j 1 justNumbers.txt original.txt      but this gave me the original file back. Any ideas?


title: insert value at the end of every record based on unique IDs

text: I have 2 files , one with Delimited and other one is Positional file. These two files shares same unique ID's as shown below but both the files contains different information. `del.txt`               11111|abc|01|||||||||          22222|xyz|09|||||||||      `pos.txt`               11111  abc newyork US           22222  xyz dallas  US      The del.txt file consist of unique member id followed by name and Alternative ID separated by | (delimited) and similarly pos.txt has unique ID along with name except alternative id in positional format. I want to insert alternative ID in pos.txt only if Unique Member ID matches in both the file as shown below `pos.txt`               11111  abc newyork US 01          22222  xyz  dallas US 09      How can we achieve this using shell script?


title: How do I get absolute path from using find unix command

text: How to get absolute path by using find command.   actually I am running the following script:-                 find . -size +20M | while read a     do          i=$(echo $a | sed 's:/: :g')          echo $a;          j=($i)          fileName=${j[${#j[@]}-1]}          userName=${j[${#j[@]}-3]}     done      but here variable `$a` showing path starting from `./Downloads/filename` but I want absolute path from `/`.


title: Error with a file name containing parentheses

text: when I tried to change file name from `old.file(1).gz` to `new.file.gz`, It says syntax error, I am using ubuntu 12.04.               mv old.file(1).gz new.file.gz     bash: syntax error near unexpected token `('


title: How to find out a process gets end?

text: How can I tell when a given process exits? Like when it's done running and stuff. For instance:               # Command 1     wget http://releases.ubuntu.com/14.04/ubuntu-14.04-desktop-amd64.iso                    # Command 2     echo "I'm a command"      How would I schedule to have `Command 2` run when `Command 1` exits?


title: Passing data from kernel space to user space in FreeBSD

text: I need some information regarding write requests from all applications on FreeBSD. I put a function inside the file system write call `ffs_write()` which collects the information into an array of structures. So I want to pass this information to the user space now. There can be a process running in the user space which can collect this gathered info, process it and put it into a file which can be accessed later. I tried finding ways to establish a channel between user space and kernel space, but I couldn't find anything helpful. Can somebody elaborate on this subject?


title: Locating files and displaying their owner

text: I have to search for a specific file type on a storage unit and also want to know their owners. With `locate '*.txt' >> result.txt` I find all files I'm looking for but I'm missing the owner this way. Any suggestions on how I could do it properly?


title: HTTP tunnel on debian through a web UI

text: Using webmin today I noticed that it has an interesting feature: an HTTP tunnel. I usually use openVPN (installed on a VPS that i rent) to access my home computer (which does not have a public IP). In my university though I can use no VPN (I tried l2tp and openVPN) because of the firewall that restricts internet access through port 80 and 443 only. Since I could not make my openVPN server listen on port 80 or 443 for obvious reasons, initially I used a SSH reverse tunnel, which I don't like because my home pc is running Windows and it's a pain to keep the ssh session alive. **So the question is:** is there an HTTP tunneling software that can run on Debian (Wheezy) which works like webmin's http tunnel? I would like it to have a web user interface, so I can access to it from any computer. If you think this does not exist, anyone who comes up with an alternative solution is very welcome.


title: Mac equivalent application "shortcat"

text: There is a mac application called Shortcat and it make me envious. For those of you averse to clicking links here is a summary: > Keep your hands on the keyboard and boost your productivity! Shortcat is a > keyboard tool for Mac OS X that lets you "click" buttons and control your > apps with a few keystrokes. Think of it as Spotlight for the user interface. So basically it lets you search within a GUI application. As I prefer typing for things than looking for things it sounds quite useful. I will probably be dreaming about this tonight.. and maybe looking for APIs to make it possible tomorrow. Unless of course... there an equivelant available for gnome?


title: how to copy and rename files with ":" and incrementing number in the filename

text: I need to copy and rename (and then edit) a group of files in the `/etc/sysconfig/network-scripts` folder. The files are `ifcfg-eth1:*` I have `ifcfg-eth1` through `ifcfg-eth1:121` but need to extend with more addresses, so I want to copy e.g `ifcfg-eth1:22` and `ifcfg-eth1:23` into `ifcfg-eth1:122` and `ifcfg-eth1:123` and then edit the copy. I know how to edit, but not how to copy and rename. Found a lot of renaming info on this site, but I think I don't get the : part right... How do I handle filenames including ":" ??


title: Install system to Disk on Chip

text: I'm looking for an easy way to install linux on a PC104 (x86 no cmov) system with a Disk-on-Chip. It can be a very simple system (BusyBox, etc) or a distro the installs in under 512mb. I just need to boot to a prompt. Does anyone know a simple path to get this done?


title: Issues with process substitution

text: I am quite new to Linux and currently I am using Cygwin on my Windows machine. My problem is I made a script to automate my analytics work and used process substitution in it and it worked fine when running on Cygwin. But when running that same script on a Linux machine it is showing problems with process substitution. So I'm bit confused. Snippet of my script is:               echo "enter url"     read val     echo "enter file name "     read file     let cnt=0     while read -r line     do         arr[$cnt]="$line"         x=${arr[cnt]}         cnt=$(( $cnt + 1 ))         cd /cygdrive/c/nutch         bin/nutch readseg -get crawl/segments/$x $val -nogenerate -noparse \           -nocontent -noparsetext >>out.txt      done < <(ls -1 /cygdrive/c/nutch/crawl/segments)


title: Ubuntu : unable to copy file to dir created under same credentials

text: I am Windows 7 remoting to Ubuntu 12.04.2 LTS I am new to Ubuntu ( and *nix in general ) and need to understand how permissions are assigned to newly created dirs. Via Putty ssh session :               $bash     myaccount@mybox:/$ cd /etc/puppet     myaccount@mybox:/etc/puppet$ sudo mkdir device     myaccount@mybox:/etc/puppet/device$      myaccount@mybox:/etc/puppet/device$ ls -ld     drwxr-xr-x 2 root root 4096 Jul 2 17:57      Then via WinSCP session ( SCP mode , also logged-in as myaccount@mybox ) I attempt to copy a file to /etc/puppet/device However this operation fails with an error displayed in pop-up:               Error     Copying file 'myfile' failed.     scp: /etc/puppet/device/myfile: Permission denied      It seems logical to me that if my account is assigned sufficient rights to create a dir then it should also have rights to copy a file into that dir ? Or do creating dirs and moving files fall under separate roles ? NOTE: If you are going to down-tick my post, please explain why in a comment. Just anonymously down-ticking doesn't help me understand how these forums work. Seems like I'm playing by the rules, full details, following-up on comments, etc.


title: Recommended Linux Distro for 'MMO' Server

text: Given its UNIX ancestry (the de facto standard for mainframes, back in the days when I first learned programming), using Linux as the OS for an experimental MMO is something of a no-brainer. That being said, there are so many distros out now that trying to figure which to try is pretty daunting. Therefore, I turn to more experienced voices for their perspectives. Some of the criteria includes:   1. Efficient utilization of multi-core CPUs (it's for an MMO server, after all)   2. Light-weight with minimal overhead (initial development is on an older system)   3. Stable enough to run indefinitely (I suspect some distros leak as bad as Windows)   4. Can use a simple Window Manager instead of a full Desktop Environment (preferably one which gets along well with Code::Blocks)   5. Gigabit+ networking support is key; some USB/video for basic use; everything else is negligible   6. Good community support (I know I'm diving into a rough ocean - I'd feel better knowing there's a life preserver nearby) I've sort of narrowed things down to Debian, CentOS (RHEL-based), Gentoo, and Slackware. Of course, each of these (excepting CentOS) have numerous derivatives, which means I haven't really narrowed things down much at all. DSL has obvious appeal, but I haven't found much in the way of a community or third-party documentation. Any advice and/or recommendations in this endeavor would be greatly appreciated. **EDIT:** It seems that the question I should have asked was "Which _KERNEL_ should I look for in a distro?" I don't have much experience with Linux (primarily using Ubuntu via DE), so I'm concerned that trying to remove extraneous features may compromise its integrity. Adding features still entails risks, but less than removing them.


title: Do Links to /tmp files get deleted?

text: I have a script that creates a temp directory using `mktemp -d`. A folder generated in the temp directory is the output of the script that will be copied to another part of the machine. I was considering using `ln` to use the same folder instead copying the contents somewhere else. I was wondering if it would still be around if the version of the folder in the `/tmp` directory got cleaned up by the OS?


title: How to load virtualbox video kernel module?

text: I have a virtual quantal (12.10) Ubuntu machine. Upon starting, it says in it its `boot.log`                Loading VirtualBox video kernel module                                [fail]      What is this component and do I need it if I only want to ssh the virtual machine anyway. And for completeness sake, how would I fix it?


title: passing dd skip|seek offset as hexadecimal

text: # dd if=2013-Aug-uptime.csv bs=1 count=1 skip=3 2> /dev/null     d     # dd if=2013-Aug-uptime.csv bs=1 count=1 skip=0x3 2> /dev/null     f      Why the second command outputs a different value? Is it possible to pass the skip|seek offset to dd as an hexadecimal value?


title: Assigning an identity to an IPsec policy in Linux

text: Page 36 of RFC2367 (PF_KEYv2 Key Management API) states that when the kernel needs an IPsec security association for an outbound packet, but does not have one, it will ask the key management daemon (usually an IKEv2 daemon like racoon or charon) for an association. It does this by sending an SADB_ACQUIRE message to all registered key management daemons for the IPsec protocol in question (AH or ESP). The layout of the message indicates that identity headers can be included in the SADB_ACQUIRE message, and I am wondering how you would get the kernel to pass that information to the key management daemon, because I am writing such a daemon and require a strong level of authentication with the remote machine. The most scalable way I can think of to do this is to have X.509v3 certificates with the CommonName set to an identifier of the remote machine, usually the hostname. However, the machines have multiple IP addresses, and different PTR records for each of those, so confirming their identity by reverse lookup of their IP address and matching it to the CommonName is impractical; it would require multiple certificates per machine. I toyed with the idea of implementing RFC3779 IP address extensions in the certificates, so the remote machine could attest that it is allowed to negotiate security associations for those addresses (which would prevent another trusted, malicious machine from pretending to be the one we are trying to negotiate an association with), but upon reflection of RFC2367's mentioning of the fact that the SADB_ACQUIRE message can include an identity header, that seems the better approach: a policy could be created for each of the IP addresses, with the policy containing the CommonName that should be expected, and the kernel would relay this CommonName as the identity header. My question is, under what circumstances would the kernel present such an identity header, and can I attach an expected CommonName to a security policy so that it would be included? I could then simply receive the identity in the SADB_ACQUIRE message, begin the negotiation with the remote machine, and compare the CommonName in their certificate to it. If this is not possible (because Linux does not implement it), I shall have to go with RFC3779 extensions, which means re-issuing a machine's certificate whenever it obtains or loses an IP address...


title: tar a specific number of files listed in a text file

text: I have a text file which contains a list of files. I use.               tar --null --no-recursion -uf abc.tar --directory= /tmp/temp --files-from abc.txt      This command simply creates a tar with all the files listed in the text file. Is there any way where I can tar only selected number of files from the list? Say for example only first 50 files listed in the text file.


title: find subdirectories with lowest number

text: I am trying to list all subdirectories with the lowest number. For example, for the following list:               /100/2001       /100/2003       /101/2001       /101/2004       /102/2000       /102/2003       /102/2005        I am looking to obtain only:               /100/2001       /101/2001       /102/2000


title: emacs meta key and Mint window manager

text: First, I'm not sure what window manager is running on my Mint installation. The "Control Center" yields no clues. Nevertheless - whatever I have is grabbing the emacs "meta" key (the option key on my Mac) and dropping down a window menu. Being a Mac person, I could do without _any_ of those option key shortcuts into the menus. Is there a way to turn them off completely? Barring that, is there a way to at least tell the manager to listen for some obscure key, so that I can get my meta keystrokes into emacs?


title: GlusterFS use Geo-replication or normal gluster?

text: We have 4 offices with ipsec lan2lan over fibre net (20-100 mbit on eache office, except one office with 10 mbit fibre). Latency is below 20 ms (between to of the offices with fastest network we have 2 ms). All offices have lan2lan between each other. iperf between offices is typical 50-80 mbit. We will have 0,5 - 1 tb data with little daily changes. Is it recomended to use Geo-replication, or normal gluster replication?


title: Test for monitor resolutions

text: I want to buy a new display device, but I don't know if it will be supported by my card because the weirder/higher resolutions: 2560 x 1080, or 2560 x 1440. Is there any method to create a virtual display with that resolutions to prove that is actually possible to get that resolutions with this card? Of course, a testing method that works for any graphics card is welcomed. But for instance, the graphics card is an Intel from a i5-M520 processor. Using Ubuntu 12.04.


title: How can a version of a package conflict with itself?

text: I want to install `fillup` and get:                rpm -i fillup-1.42-268.1.x86_64.rpm          file /usr/bin/fillup conflicts between attempted installs of \         fillup-1.42-268.1.x86_64 and fillup-1.42-268.1.x86_64      It looks like it's the same package that conflicts itself. Why does this happen, and what can be done about it so that I can install `fillup`?


title: shell command to get pixel size of an image

text: Is there a shell command that returns the pixel size of an image? I'm trying to produce an animated gif starting from different gifs with different sizes using `convert` (e.g. `convert -delay 50 1.gif 2.gif -loop 0 animated.gif`). The problem is that convert simply overlaps the images using the first image's size as the size of the animated gif, and since they have different sizes the result is a bit of a mess, with bits of the old frames showing under the new ones.


title: Excluding kernel modules through /etc/modprobe.d/blacklist.conf does not work

text: I don't want to load the kernel module nouveau on my debian box at startup, so I put the following in /etc/modprobe.d/blacklist.conf:               blacklist ttm     blacklist drm     blacklist nouveau      I even did a `update-initramfs -u` but nonetheless those three modules get loaded each time I boot. Does anyone know why and how to fix this.


title: Replace string with contents of a file using sed

text: I have two different files: ### File1               /home/user1/       /home/user2/bin       /home/user1/a/b/c      ### File2               <TEXT1>     <TEXT2>      I want to replace the `<TEXT1>` of _File2_ with the contents of _File1_ using `sed`. I tried this command, but not getting proper output:               cat File2|sed "s/<TEXT1>/$(cat File1|sed 's/\//\\\//g'|sed 's/$/\\n/g'|tr -d "\n")/g"      You can use other tools also to solve this problem.


title: Rsync - Corrupted MAC on input

text: **Background**   I have a script on my NAS which is a Synology DS212J which is running on a special distro where `uname -a` gives me `Linux DS212J 2.6.32.12 #4493 Wed Jul 16 11:37:16 CST 2014 armv5tel GNU/Linux synology_88f6281_212j` which is suppose to run `rsync` to backup my Raspberry Pi running Raspbian (based on Debian). The backup script looks like this                 /usr/syno/bin/rsync -aEv --ignore-errors --delete --rsync-path="sudo usr/bin/rsync" --exclude-from=/volume1/backup_hdd1/rsync-pi/rsync-exclude.txt -e "ssh -p 22" pi@192.168.0.103:/ /volume1/backup_hdd1/rsync-pi/backup >> /volume1/backup_hdd1/rsync-pi/rpi_backup.log 2>&1      **Problem**   The backup script was working until recently when I checked the logs where I'm getting multiple errors but they all can be traced back to these two lines:               Corrupted MAC on input.     Disconnecting: Packet corrupt      **What I've tried**   Disabled TCP checksum offload by this command               ethtool -K eth0 tx off rx off      And basically trying everything Google suggest. Sometimes it transfers up to 50 MBs where sometimes it only reaches a few MBs before aborting. I'm completely lost since it was working flawlessly the other day. Only thing that I've done on the system is update a few programs - nothing major. I've also tried removing these programs but it didn't help. Does anyone have any ideas or tips of what I can do to get it working again?


title: Why is brk(0) called?

text: On a first shell I run the command `tail` with no argument. On a second shell I kill the first tail using strace to monitor the system calls.               qdii@nomada ~ $ strace kill 1713     execve("/bin/kill", ["kill", "1713"], [/* 82 vars */]) = 0     brk(0)                                  = 0x2533000     mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f9dacfe8000     access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)     open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3      I didn’t know the `brk` command so I looked it up and found that it changes the end of the data segment of the process. Why would `kill` do that? especially setting the data segment to `0` seems to make little sense.


title: Pattern repetition and regexp

text: Take the pattern               [UGLER]*      Can the string UUG match against it? I mean to say, is repetition allowed?


title: Tools to inspect local network, and find local IP address of device?

text: This is my specific context (Latex/TikZ code for the diagram below): ![netlan.png](http://i.stack.imgur.com/fPpAh.png) Now this local "Router", has broke down several times, and several different devices have had its role (sometimes they have a wireless interface too, sometimes not; currently, as on the image, they don't). The same goes for the "Cable modem". However, regardless of such differences, I typically experience that:   * I can just wire this setup, and I get internet on the (Ubuntu GNU/Linux) PCs without any further tinkering with setups   * The local addresses of the PCs and the Router are always known (e.g. I can use tools like `nmap` to list the addresses of the local PCs and the local router).    * The "global"/Public IP is always known on the local PCs (through the use of whatismyip.com and such)  The problem is the cable modem. I know it serves an administration page on port 80, because I've seen it before, when I had a different router. But, the thing is, I had forgotten what local IP is this cablemodem webpage supposed to be served on - I think with my previous local router, there was a page on its web interface which listed the cable modem local IP; I cannot find the same in the current router. So, the thing is - I want to access the administration page of the cable modem from PC1-3, but don't know what its local address should be; the other addresses are known as on the image. What tools (command-line or GUI) and approaches could I use, to find the cable modem's web server local IP address? Code for diagram:               % drawn with tikzedt; to compile,     % save as test.tex, and call: `pdflatex test.tex`     \documentclass{standalone}          \usepackage{tikz}     \usetikzlibrary{shapes.symbols}     \pagecolor{yellow!15}          \begin{document}     \begin{tikzpicture}          \tikzstyle{rcn} = [draw,rectangle,inner sep=10pt,line width=1pt,align=center];     \tikzstyle{ln} = [line width=1pt]     \tikzstyle{cln} = [shape=cloud,draw,line width=1pt,fill=black!10,minimum width=10em,aspect=1.2]     \tikzstyle{cln2} = [shape=cloud,cloud puffs=20,draw,line width=0.5pt,inner sep=0pt,align=center,aspect=3]          \node[rcn] (PC1) at (1,4) {PC1\\Local IP: 10.0.0.2};     \node[rcn] (PC2) at (1,2.5) {PC2\\Local IP: 10.0.0.3};     \node[rcn] (PC3) at (1,1) {PC3\\Local IP :10.0.0.4};          \node[rcn] (Router) at (6,2.5) {Router\\Local IP: 10.0.0.1\\\small(wired,LAN)};     \node[rcn] (Modem) at (10.5,2.5) {Cable modem\\Local IP: ??.??.??.??\\\small(wired,wireless,router)};     \node[cln] (Internet) at (15,2.5) {\Large Internet};               \draw[ln] (PC1) -| (3.5,3) -| (Router.west);     \draw[ln] (PC2) -| (Router.west);     \draw[ln] (PC3) -| (3.5,2) -| (Router.west);          \draw [ln](Router) -- (Modem) -- (Internet);     \node [cln2] at (10.5121,4.7455) {Public IP (known):\\AAA.AAA.AAA.AAA};          \end{tikzpicture}     \end{document}


title: killall <processname> throughout the system

text: I'm opening two terminal windows. **Terminal 1** - I run process1 **Terminal 2** - I run process2 I then terminate both process using `Ctrl`+`Z` in each window. I type `killall -9 process1` in Terminal 2 , and there's no feedback. I realise later that in Terminal 1, process1 is not really killed. How do I kill process1 in Terminal 1 from Terminal 2 console?


title: How to set a Thunar window as the desktop in XFce?

text: I want to setup one computer ask a kiosk for eBooks. I'd like any user to be able to see all available books right on the desktop. These can be clicked on and loaded in the PDF software. Is there some way to place a fullscreen Thunar window, at a specific folder, as the desktop of XFce, so that the desktop has a folder showing all of the PDFs and can be navigated like a file manager?


title: SSH tunnel hanging

text: I'm trying to use an SSH tunnel from home to a computer in the university so I can access some articles. Both machines are running Ubuntu 11.04, the university machine runs `openssh- server`. I my home machine I followed these instructions:   1. open an ssh session:              ssh -D 9999 -C user@my_addr.com         2. Then I configured Firefox to user SOCKS5 connection on port `9999` of `localhost`. This works for some time. Then suddenly it hangs and the terminal where the SSH session was opened freezes, too. What am I missing here?


title: Restart GNOME without restarting Xorg?

text: sometimes happens that some applications crash and make Gnome desktop unstable for example the upper bar vanishes. by restarting X ctrl+shift+backspace i can reset it. but is there a way just to re enable the bar or Gnome entirely?


title: archlinux check disks on boot

text: How can I check and mark bad blocks on Linux startup? There are a number of options available and most of them require accessing hardware and running live CD's. But I would like to avoid and perform everything using command line without going to the server room and talking to admins who have the keys. I have ArchLinux with `/` on `ext4fs`.


title: Is there a way to tell how many times my computer has rebooted in a 24 hour period?

text: I was doing a 24 hour code-a-thon and had to reboot numerous times and was wondering if there was a way to tell exactly how many the computer was rebooted or crashed.


title: ffmpeg hardcode subs on flv

text: Giving up on trying to use `videosub.js`, I am now trying to hard code subtitles to the video file using `ffmpeg`. Have run into trouble with configuration files not found, when trying to hard code the `srt` type of subtitle on `flv` type of video file.I decided to convert the `srt` file to an `ass` type subtitle but that didn't work either. Now I am wondering, if it is because you can't do it with an `flv` type video or I need to go back to fixing the error I'm getting when trying to run the command. I am using Linux `CentOS 6.4` using latest static release of `ffmpeg` for 32bit. That being : > `Fontconfig error: Cannot load default config file` This is what I see in `ffmpeg` static folder:               -bash-4.1# cd ffmpeg-static     -bash-4.1#      -bash-4.1# ls     32bit     -bash-4.1# cd 32bit     -bash-4.1# ls     var     -bash-4.1# cd var     -bash-4.1# ls     cache     -bash-4.1# cd cache     -bash-4.1# ls     fontconfig     -bash-4.1# cd fontconfig     -bash-4.1# ls     3830d5c3ddfd5cd38a049b759396e72e-.cache-3  CACHEDIR.TAG      I have since noticed besides the ffmpeg script residing in /usr/bin there is only one other folder at root being the listed one above with only the cache so obviously I have missed many added installs because also I have no fplayer.


title: where to put binaries so they are always in path and can be found easily

text: I am making quite some binaries, scripts etc that I want to install easily (using my own rpms). Since I want them accessible for everyone, my intuition would be to put them in /usr/bin;   * no need to change PATH however; my executables now disappear in a pool of all the others; how can I find back all the executables I put there in an easy way. I was thinking of:   * a subdirectory in /usr/bin (I know I cannot do this; just to illustrate my thinking)   * another directory (/opt/myself/bin) and linking each executable to /usr/bin (lots of work)   * another directory (/opt/myself/bin) and linking the directory to /usr/bin (is this possible?) what would be the "best, most linux-compliant way" to do this? EDIT: we had a discussion on this in the company and came up with this sub- optimal option: put binaries in /usr/bin/company with a symbolic link from /usr/bin. I'm not thrilled with this solution (disussion ongoing)


title: System got stuck,  cannot return to console

text: I am using Solaris on a Sun Netra 240 box. In the ok prompt I ran `init 3` by accident, and now the system is stuck and I can't write anything. I have access to the ALOM prompt, but when I run a console command the system gets stuck again. How can I return to a normal console without physically rebooting the system?


title: Setting maximum volume

text: I usually work in a WM (i.e., i3wm) and use `alsamixer` to adjust sound volume. The recent Linux installation on a Dell t5500 machine gives a very loud sound when set the maximum volume in `alsamixer`. It would damage my eardrum, if I mistakenly set the volume to be maximum as I usually use in-ear earphone. Is there anyway to set the peak sound volume?


title: How to rename filename with ' or ? in file name?

text: I have a problem renaming a file that I'm not even sure which special characters I have in the file. I'm using CentOS 6 64bit. When I `ls` the file:               Giko Suzo San?e - Ep1.avi      but when view it in FTP:               Giko Suzo San’e - Ep1.avi      When I try to `mv` it:               [root@server ]# mv 'Giko Suzo San?e - Ep1.avi' 'Giko Suzo Sane - Ep1.avi' mv: cannot stat `Giko Suzo San?e - Ep1.avi': No such file or directory I also tried renaming it in FTP using FlashFXP. I get:               [L] 550 Giko Suzo San’e - Ep1.avi: No such file or directory Rename Failure! How can I rename with this problem?


title: Create animated WebP file from WebP files?

text: I have converted a sequence of images to WebP, and I want to compile them into an animation. I downloaded `libwebp`, but it's a `tar.gz` archive and I don't know how to install those. Is there another way to create an animated WebP file some other way?


title: Typing punctuation adds an accent to the preceding letter after my laptop is docked for a few minutes

text: I am running Manjaro XFCE. Everything worked like a charm for months now, but 2 weeks ago the keyboard configuration from my external keyboard seems damaged. Writing on my laptop itself works flawlessly. But when my laptop is docked and I use my usb keyboard for like 10 minutes, it suddenly starts to behave weird. Typing `e`+`.` yields `ė`. `e`+`,` yields `ę`. And, there are many more. Typing with this is unbelievable disapointinġ. The last written letter is always composed with the preceding punctuation. The only thing I can do in this case is to open my laptop lid so the screen turns on. Then I can write just as usual with my USB keyboard. Also, it changes back to normal sometimes without even doing anything.


title: Linux Mint brightness has too few settings

text: There are many questions to do with screen brightness on Linux Mint (this and this refer to default brightness being zero, and this to there being only two brightness levels.) My problem is a bit different: I have _too few_ brightness levels to choose from when using the function keys. There are only three settings between full and completely off! If I'm working in a dark room, I need a very low brightness, but it still needs to be more than off! I have Linux Mint 17 running on an HP Envy 14. The brightness settings in `Screensaver and Lock Settings` works better than the function keys do (I can get a dimmer level there) but it's still not brilliant.


title: Is LILO still usable on modern PC?

text: How does LILO work on modern hardware with today's kernels? Do I have to fulfill any preconditions, or is it just about writing the configuration file and running `lilo` command like in the old days? Does the kernel package update (Debian/Ubuntu) update LILO as it does with GRUB2?


title: How does iptables recognize packet state?

text: Consider these two sets of rules: Set A               -A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT     -A INPUT -j REJECT     -A OUTPUT -j ACCEPT      Set B               -A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT     -A INPUT -j REJECT     -A OUTPUT -m conntrack --ctstate NEW,ESTABLISHED,RELATED -j ACCEPT      Previously I was under the impression that the two were functionally the same, however someone recently remarked to me: > To have an **ESTABLISHED,RELATED** connection you have to have a rule that > add the connection into the db that this rule looks at. This is done with > the **NEW** rule. Once the connection is accepted it is placed into the db > so the **ESTABLISHED,RELATED** rules can match against it. Without the > **NEW** rules nothing is laced into the db and thus **ESTABLISHED,RELATED** > will never match anything. So I admit I'm a bit confused as to how the internals of `iptables` operate, exactly how does `iptables` go about tagging packets based on the packet state?


title: can we know the password for the other users if we have root access?

text: If a person has root access to a particular RHEL machine, will they be able to retrieve the password of the other users?


title: Debian: Can I remount / read-only in single user mode?

text: I'd like to use fsarchiver in the safest way possible but have no live medium for booting from. I vaguely remember having read something like this though:   Is it possible to remount / readonly when in single user mode?


title: diff -r only for certain file types

text: Is there a way I can perform a recursive diff of two directories but only compare (in their respective places) files that match a specific filename or filetype predicate? E.g. I would like to do _something_ like               diff -r dir-a dir-b -filenames *.java, ivy.xml, build.xml      ... or even better:               diff -r dir-a dir-b -filetype text      Clearly it is not mandatory to use `diff` as I suppose an incantation with `find` and `-exec diff` might also do the trick (I just don't know how to generate the complementary filepaths in the latter case).


title: arping equivalent for IPv6

text: What is an equivalent for IPv6 of   `arping -q -c 3 -A -I [device] [ip]`? I know, there is not an arp in IPv6 and Neighbor solicitation used instead, but which linux user space tool can send such solicitation?


title: IPv6 NDP timer problem

text: Need to change Fedora Linux's IPv6 stack for NDP DAD timer changes. How to locate the Fedora's IPv6 and IPv4 stack in Fedora distribution dvd/site so that, we can recompile and generate new stack ?


title: Why does Vim have different cursor positions for different modes?

text: Why does vim have different cursor positions for the different modes? First, in insert mode, the cursor is between characters (like every other editor), second, in command mode, the cursor is under a character, thus requiring an 'i' or 'a' to put it between characters for writing mode. I mean, why isn't the cursor always positioned between characters regardless of mode? This is related to the question Why does `ESC` move the cursor back in vim?


title: Automatic Volume settings?

text: When I watch a Movie on my Desktop PC - Fedora 14 - In many times the Movie is too quiet to hear, but sometimes....it's too loud - Because there's suddenly music, or an explosion, that's really loud... Are there any solutions/script or anything to make the sound volume constant? E.g.: the volume automatically turns down, if there is a loud explosion in the Movie, or something?


title: Alternatives for "lsof" command?

text: In many cases "lsof" is not installed on the machines that with I have to work, but the "function" of lsof would be needed very much (ex. on AIX). :\ Are there any "lsof" like applications in the non-windows world? UPDATE: for ex.: I need to know that what processes use the "/home/username" directory?


title: Align Partition Of HDD Using fdisk?

text: I first asked this question on SuperUser.com but got no responses. I have found how to align the partition of my SSD using fdisk (SSD article on Gentoo Wiki) but haven't been able to find any resources about aligning the partitions of a HDD. Is this practice necessary, or should I just let something like GPartEd align them as default? If it's something I should do to the HDD as well, where can I find a resource for the size to use for the sector and head portion of the command?


title: Is there a way to redirect nohup output to a log file other than nohup.out?

text: I frequently use the program `nohup` so that my processes are immune to hangups. So if I want to make the program `program` immune to hangups, I use the command               nohup program &      where `&` puts the process in the background. When starting, `nohup` gives me the message: > nohup: appending output to `nohup.out' Is there any way to send the output to a file other than `nohup.out`? Often I want to run many processes in the same directory using `nohup`, but if I do this, all the output gets lumped together in a single `nohup.out` file. The manual page (for example, here) does not seem to have an option for specifying the log file. Can you please confirm this? Also, do you have any thoughts of how I can work around this problem?


title: What is the relation between DISPLAY :1.0 and port 5901

text: When I start a new X server using vncserver I can connect it using port 5901. From, say, a terminal, I can also do a: export DISPLAY=:1.0 xterm _(it's just an example)_ And I get an xterm on the Xvncserver. What is the relation between :1.0 and port 5901?


title: Where Is MySQL installed on My Machine?

text: What is going on, everybody? Recently I have installed MySQL server on my Debian machine using Advanced Packaging Tool, and I am curious where it is installed and how I can find all the source files and user databases. I have only been able to find the configuration at /etc/mysql, and to find some other small pieces using "whereis" command and 'find / -name "mysql"', but besides that, nothing much exciting appears on screen.


I have a vps, and I try to run the comand in CentOs 6.5 32 bits:               sudo yum install sd-agent      And I Get:               Loaded pluings: fasestmirrors     Determining fastest mirrors     Error: cannot find a valid baseurl for repo: rpmfusion-free      I have try to update yum but I get the same error. If I try to `ping` or `gid` a host all works fine. How I can fix this error?


title: UDP sending two strings in a datagram

text: I'm wondering if its possible to send two strings within one datagram in a UDP packet. Assume I had string 1 with text: unix and string 2 with text: linux. I don't want to merge the strings but keep them separate when there transferred This is my working code that succesfully reads on the server unix                String name1 = "unix";          String name2 = "linux";                      toSend = name1.getBytes();                     DatagramPacket packSend = new DatagramPacket (toSend, toSend.length, ipConn, 9876);                      connection.send(packSend);      Would it be wise two create 2 separate datagram packets and send the data separately?


title: find and rysnc?

text: I want to be able to search for files over 14 days and over 10k and than rsync those found files to a destination. Is there a way to combine these two commands?               find ./ -mtime +14 -size +10k      rsync --remove-sent-files -avz /src /dest


title: Is it safe to use lvresize -r to reduce LVM

text: I know I can increase the size of file system and LV in one go using `lvresize -r` but is it safe to use the sam approach to reduce a LV file system ? here is the man page of `-r`               -r, --resizefs         Resize underlying file system together with the logical volume using fsadm(8).      I would thought it should be safe if file system gets reduce first. Thanks


title: Command in a variable

text: I am trying to run a statement where the name of the command is in a variable. For example:               my_command='/path/to/some/command'          $my_command -f foo -b bar -s something else       But the above does not work. I get errors that suggest that the shell is trying to interpret my arguments as commands. How can I do this in Bash and Zsh?


title: how to install VMware vSphere Client on centos 6.5

text: How can I install "VMware vSphere Client" on CentOS 6.5?


title: Linux Networking routing to virtual ip addresses from a different subnet

text: New to linux networking, had a question about routing to virtual ip addresses from a different subnet. I have three servers (they can all ping each other): > **A** 10.10.51.182 (connected to router Y)   >  **B** 10.10.51.183 (connected to router Y)   >  **C** 10.10.60.10 (connected to router Z) On server **A** , I created 1000 virtual interfaces:               # ifconfig eth0:0 192.168.1.1 netmask 255.255.0.0       # ifconfig eth0:1 192.168.1.2 netmask 255.255.0.0       ....       # ifconfig eth0:999 192.168.5.200 netmask 255.255.0.0        Each virtual interface is simulating a camera device, with camera simulation software. On server **B** , I added the following route:               # route add -net 192.168.0.0 netmask 255.255.0.0 eth0      And voila, **B** can access/ping the virtual interfaces of machine **A**. Server **C** that is on a different subnet (10.10.60.0), added this route, but even I had super low hope for it to work:               # route add -net 192.168.0.0 netmask 255.255.0.0 eth0      As expected, I wasn't able to reach the virtual interfaces of server **A** , so I removed the route and added the following route using gateway ip of router **Y** :               # route add -net 192.168.0.0 netmask 255.255.0.0 gw 10.10.51.1 eth0     SIOCADDRT: Network is unreachable      The gateway 10.10.51.1 is pingable by server **C** , however I think the error message implies that the _gw_ is not directly on the same subnet (10.10.60). What configuration/route can be configured on server **A** and/or **C** for **C** to ping/access the virtual interfaces of server **A**. I don't have access to change the configuration of the routers. Though, if it's absolutely not possible using changing just the configuration of the servers, could someone please explain in networking terms why **B** can access virtual interfaces of **A** , but **C** cannot access them. Does the router **Y** see packets bound to '192.168.0.0' from **C** and automatically drop them, whereas when packets originating from the same subnet ( **B** ) get allowed?


title: how to use qemu to run build root linux images?

text: I have compiled an embedded linux with build root for i386. I didn't edited much, just defaults. Now I want to run it under qemu. But the only thing I see is this: ![enter image description here](http://i.stack.imgur.com/Kgwl1.jpg) I'm running qemu with these options:               qemu-system-i386 -kernel vmlinux -hda rootfs.ext2 -m 256      Why this is happening? I have compiled like the example in the buildroot documentation.


title: "Requires: perl(:MODULE_COMPAT_5.8.8)"

text: I use CentOS 6.5 for my server with below repository:   * IUS   * epel   * ces-standard-*   * base/upgrade/extras When I tried to update today (it's been a while I haven't updated this server), I got the following errors:               ---> Package perl-Clone.x86_64 0:0.31-3.1.el6 will be installed     ---> Package perl-DBI.x86_64 0:1.616-1.of.el5 will be an update     --> Processing Dependency: perl(:MODULE_COMPAT_5.8.8) for package: perl-DBI-1.616-1.of.el5.x86_64     ---> Package perl-MLDBM.noarch 0:2.04-1.of.el5 will be installed     --> Processing Dependency: perl(:MODULE_COMPAT_5.8.8) for package: perl-MLDBM-2.04-1.of.el5.noarch     --> Processing Dependency: perl(FreezeThaw) for package: perl-MLDBM-2.04-1.of.el5.noarch     ---> Package perl-SQL-Statement.noarch 0:1.33-1.of.el5 will be installed     --> Processing Dependency: perl(Params::Util) >= 1.00 for package: perl-SQL-Statement-1.33-1.of.el5.noarch     --> Processing Dependency: perl(Params::Util) for package: perl-SQL-Statement-1.33-1.of.el5.noarch     --> Processing Dependency: perl(:MODULE_COMPAT_5.8.8) for package: perl-SQL-Statement-1.33-1.of.el5.noarch     ---> Package perl-YAML.noarch 0:0.72-1.el5.rf will be installed     ---> Package subversion-perl.x86_64 0:1.6.11-10.el6_5 will be installed     --> Running transaction check     ---> Package git.x86_64 0:1.7.11.3-1.el5.rf will be an update     --> Processing Dependency: libcurl.so.3()(64bit) for package: git-1.7.11.3-1.el5.rf.x86_64     ---> Package perl-DBI.x86_64 0:1.616-1.of.el5 will be an update     --> Processing Dependency: perl(:MODULE_COMPAT_5.8.8) for package: perl-DBI-1.616-1.of.el5.x86_64     ---> Package perl-FreezeThaw.noarch 0:0.5001-1.of.el5 will be installed     --> Processing Dependency: perl(:MODULE_COMPAT_5.8.8) for package: perl-FreezeThaw-0.5001-1.of.el5.noarch     ---> Package perl-MLDBM.noarch 0:2.04-1.of.el5 will be installed     --> Processing Dependency: perl(:MODULE_COMPAT_5.8.8) for package: perl-MLDBM-2.04-1.of.el5.noarch     ---> Package perl-Params-Util.x86_64 0:1.07-1.of.el5 will be installed     --> Processing Dependency: perl(:MODULE_COMPAT_5.8.8) for package: perl-Params-Util-1.07-1.of.el5.x86_64     ---> Package perl-SQL-Statement.noarch 0:1.33-1.of.el5 will be installed     --> Processing Dependency: perl(:MODULE_COMPAT_5.8.8) for package: perl-SQL-Statement-1.33-1.of.el5.noarch     --> Finished Dependency Resolution     Error: Package: perl-DBI-1.616-1.of.el5.x86_64 (ces-standard)                Requires: perl(:MODULE_COMPAT_5.8.8)     Error: Package: perl-Params-Util-1.07-1.of.el5.x86_64 (ces-standard)                Requires: perl(:MODULE_COMPAT_5.8.8)     Error: Package: perl-FreezeThaw-0.5001-1.of.el5.noarch (ces-standard-noarch)                Requires: perl(:MODULE_COMPAT_5.8.8)     Error: Package: git-1.7.11.3-1.el5.rf.x86_64 (ces-standard-deps)                Requires: libcurl.so.3()(64bit)     Error: Package: perl-MLDBM-2.04-1.of.el5.noarch (ces-standard-noarch)                Requires: perl(:MODULE_COMPAT_5.8.8)     Error: Package: perl-SQL-Statement-1.33-1.of.el5.noarch (ces-standard-noarch)                Requires: perl(:MODULE_COMPAT_5.8.8)      You could try using --skip-broken to work around the problem      You could try running: rpm -Va --nofiles --nodigest      _I use IOS repo to get PHP5.5 so I would understand getting conflicts on it but the error concerns PERL which I never used…_ Am I supposed to report this in repository mailing list? I could try `skip- boken` but I don't consider it as a good solution.


title: Which wiki software does CentOS.org use?

text: Like the title says, if you goto CentOS.org and hit up the wiki, I am trying to figure out which wiki software it is. Usually I can scroll to the bottom and get the wiki software name and version from the footer.


title: How to have a newline before bash prompt?

text: How can I configure my bash prompt to have a newline before it? Instead of:               Output1     Output2     kshitiz@ksh$      It should have:               Output1     Output2          kshitiz@ksh$


title: How can I set a top limit for the PCM value when changing the loudness with pulseaudio?

text: when I change the loudness with pulseaudio, pulseaudio acts on several of the values I can see when I use `alsamixer -c0` I have a problem: when the PCM loudness exceeds a certain value (80%), the sound crackles (or soaks? I don't know if this is the word). I'd like to make sure the PCM value is fixed to 80%, so that pulseaudio only changes the value of the "Front" channel. How can I achieve that? My configuration: Fedora, KDE


title: Vim: How to get rid of filetype-specific map?

text: Edit: Working version. I've mapped `[[` and `]]` to my own functions:               nmap <silent> ]] :let &tabstop += 1 <CR> :echo 'tabstop =' &tabstop <CR>     nmap <silent> [[ :let &tabstop -= &tabstop > 1 ? 1 : 0 <CR> :echo 'tabstop =' &tabstop <CR>      However, according to `:verbose map [[` these are overridden by `/usr/share/vim/vim72/ftplugin/php.vim`. How do I get rid of the PHP mappings while keeping my own? I've tried               autocmd FileType php unmap! [[     autocmd FileType php unmap! ]]      according to the tutorial, but then I get error messages at Vim startup:               Error detected while processing FileType Auto commands for "php":     E31: No such mapping     E31: No such mapping     Press ENTER or type command to continue      Using `nnoremap` instead of `nmap` doesn't help. Putting the mappings in `~/.vim/after/ftplugin/php.vim` also didn't work. `vim -V` shows:               ...     finished sourcing /usr/share/vim/vim72/ftplugin/php.vim     ...     finished sourcing /home/user/.vim/after/ftplugin/php/php.vim      So it does find the supposed override. Combining `nnoremap` and the "after" script doesn't work either.


title: How to copy all html files from a directory tree to a single directory?

text: I want to copy all the `.html` files in `myDir` and its subdirectories to `~/otherDir`. Here's what I tried (it doesn't work):               $ find myDir -name *.html -print | xargs -0 cp ~/otherDir     usage: cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file target_file            cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file ... target_directory


title: wdfs mount problem

text: I'm running Fedora/Gnome 3.4.2 64bit and I'm trying to mount a webdav file system to work with. As root, I run the command               #mkdir /mnt/webdav     #wdfs https://www.webiste.com:port/directory /mnt/webdav -o allow_other      It asks for the user and pass which I provide and then gives me back the prompt. Then I go and check /mnt/webdav and there are no files. Either as root or my normal user. Then, to try and see what is happening I try               #cd /mnt     #ls     ls: cannot access webdav: No such file or directory     webdav     #      So webdav doesn't exist but bash lists it as a folder? What am I doing wrong?


title: Preloading the OOM Killer

text: I don't have any swap partition/file on my machine, and only 2GB of RAM. Sometimes it happens that the memory gets saturated by some process (Xorg+browser+compiler+...) and the system hangs indefinitely, and the only way to restart it (other than hard reset) is with SysRq. I understood that the Out Of Memory Killer won't help me because when the memory is completely full, kernel cannot allocate the OOM Killer itself. Is there any way to preload the OOM Killer, so that it can actually work when memory is completely full?   Or is it possible to tweak the kernel so that OOM Killer gets activated when my ram is full at `${TOTAL_RAM} - 10MB`?


title: Edit the .config file when en/disabling a particular option like CONFIG_CPU_FREQ?

text: From here: http://www.xenomai.org/index.php/FAQs#Which_kernel_settings_should_be_avoided.3F > Which kernel settings should be avoided?   >  Note that Xenomai will warn you about known invalid combinations during > kernel configuration.   >  - CONFIG_CPU_FREQ   >  - CONFIG_APM   >  - CONFIG_ACPI_PROCESSOR Now, when I look in the `.config`, I do find these options clearly but I don't know their dependencies. So, it is wise to simply put a `n` next to these options in the `.config` file? Will the make procedure take care of the dependencies? The `make menuconfig` window do not present these options _explicitly_.


title: Garbage characters appear on screen when typing

text: When typing, garbage characters somehow appear on the screen for all the letters that I type. The garbage character is a small rectangle box, and this prevents me from executing any commands on the terminal. This happens when I login as root. However, when I log in as a different user, I can type and view the normal characters on the screen. I am using SUSE Linux Professional 10. I am a newbie to Linux, and I am going into circle for several days trying to figure this problem. Any responses will help. Thanks.


title: How to fix "login: no shell: No such file or directory" when I can not even login?

text: I installed fishfish(a user-friendly interactive command line shell) on a Linux server, later somebody uninstalled it but I don't know it. After I run `chsh -s /usr/local/bin/fish` without caution, I cannot login the server now. Error message "login: no shell: No such file or directory" showed up which apparently says that shell fish do not exist anymore. The server provides only a CLI interface, so how can I change the login shell when I cannot even login?


title: How to get Xorg to use the wacom driver for my graphics tablet?

text: I just got a Wacom graphics tablet, plugged it in, installed the drivers and it mostly works. However `xsetwacom` and the KDE tablet settings module don't recognize it. Upon inspection of `Xorg.0.log` I have discovered that Xorg uses the `evdev` driver instead of the proper `wacom` one. What do I have to do in order to use the correct driver?


title: Wifi AP with ASUS USB-N10

text: I am trying to configure wifi AP with subj device. According documentation in web, it requires `master mode` hardware support and `hostapd` software. It seems I have master mode:               # iwconfig     ...     wlp0s29u1u2  unassociated  Nickname:"rtl_wifi"           Mode:Master  Access Point: Not-Associated   Sensitivity:0/0             Retry:off   RTS thr:off   Fragment thr:off           Encryption key:off           Power Management:off           Link Quality:0  Signal level:0  Noise level:0           Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0           Tx excessive retries:0  Invalid misc:0   Missed beacon:0      But, when I try to start hostapd `hostapd -dd /etc/hostapd/hostapd.conf`, it silently exits with `$? = 1`. When I tried it on laptop, it works out of a box, but, probably it worth noting that I had to build N10 driver(8712u) from source. `Linux Dungeon 3.7.10-gentoo-gnu #11 SMP Sun Mar 31 23:12:28 MSK 2013 i686 Intel(R) Core(TM) i3-2100 CPU @ 3.10GHz GenuineIntel GNU/Linux` Here is content of `/etc/hostapd/hostapd.conf`:               ssid=YourWifiName     interface=wlan0     bridge=br0     auth_algs=3     channel=7     hw_mode=g     logger_stdout=-1     logger_stdout_level=2     max_num_sta=5     rsn_pairwise=CCMP      Also, I found probably intresting thing in `$(dmesg)`:               [193240.231986] WARNING: at kernel/timer.c:1056 del_timer_sync+0x2b/0x50()     [193240.231988] Hardware name: System Product Name     [193240.231990] Modules linked in: 8712u(O)     [193240.231995] Pid: 0, comm: swapper/0 Tainted: G        W  O 3.7.10-gentoo-gnu #11     [193240.231998] Call Trace:     [193240.232005]  [<c103170d>] warn_slowpath_common+0x6d/0xa0     [193240.232008]  [<c104001b>] ? del_timer_sync+0x2b/0x50     [193240.232011]  [<c104001b>] ? del_timer_sync+0x2b/0x50     [193240.232015]  [<c103175d>] warn_slowpath_null+0x1d/0x20     [193240.232018]  [<c104001b>] del_timer_sync+0x2b/0x50     [193240.232032]  [<f880f460>] surveydone_event_callback+0x2e/0x130 [8712u]     [193240.232041]  [<f87ffc52>] ? fwdbg_event_callback+0x2d/0x33 [8712u]     [193240.232048]  [<f8800373>] event_handle+0xf3/0x107 [8712u]     [193240.232063]  [<f88198e5>] rxcmd_event_hdl+0x21/0x31 [8712u]     [193240.232068]  [<f88047d4>] usb_read_port_complete+0x84/0x182 [8712u]     [193240.232071]  [<c147d626>] usb_hcd_giveback_urb+0x36/0x90     [193240.232073]  [<c148cb14>] ehci_urb_done+0x64/0xa0     [193240.232076]  [<c148ef7a>] qh_completions+0x26a/0x500     [193240.232078]  [<c1054b31>] ? hrtimer_start_range_ns+0x21/0x30     [193240.232081]  [<c14901b1>] ehci_work+0x641/0x850     [193240.232083]  [<c13da5bb>] ? ata_qc_complete+0x7b/0x1d0     [193240.232086]  [<c13eae50>] ? ata_sff_error_handler+0xf0/0xf0     [193240.232088]  [<c148e7fb>] ? qh_link_async+0x2b/0xb0     [193240.232090]  [<c109ca00>] ? unmask_irq+0x20/0x20     [193240.232092]  [<c14911c7>] ehci_irq+0x1c7/0x3a0     [193240.232095]  [<c105b220>] ? __wake_up+0x40/0x50     [193240.232098]  [<c12ed068>] ? __mix_pool_bytes+0x38/0x70     [193240.232100]  [<c12ee53d>] ? add_interrupt_randomness+0x13d/0x160     [193240.232102]  [<c12ee53d>] ? add_interrupt_randomness+0x13d/0x160     [193240.232104]  [<c109ca00>] ? unmask_irq+0x20/0x20      Any advices?


title: shell scripting escaping madness - sending single quotes to subshell

text: I'm beyond my skill level in getting this to work properly...               #!/bin/bash -x     # mxfbc.sh - mxf video file batch converter     # pass at the command line ...     # (1) the directory to batch convert (typically called CLIPS00X from the Canon XF100 and,      # (2)the file type to convert (typically MXF from the Canon XF100)          # updated 2012-Feb-18          CLIPS_dir="$1"     type="$2"               function ffconvert()     {     #   ffmpeg -i "$1"  -r 30 -f mov -vcodec libx264 -acodec pcm_s16le -map 0:0 -map 0:1 -map 0:2 "${1%%.*}"\.MOV         ffmpeg -i "$1"  -r 30 -f mov -vcodec libx264 -acodec copy -threads 0 -map 0:0 -map 0:1 -acodec copy -map 0:2 -acodec copy "${1%%.*}"\.MOV     #   ffmpeg -i "$1"  -r 30 -f mov -vcodec copy -acodec pcm_s16le -map 0:0 -map 0:1 -map 0:2 "${1%%.*}"\.MOV     }     #12          SAVEIFS=$IFS     IFS=$(echo -en "\n\b")          date     for item in $CLIPS_dir* ; do          if [ -d $item ]; then              inputs=""         map=""         count=0              #echo -e "Item: $item"                 for file in $item/* ; do                          if [ ${file#*.} = "$type" ]; then                         #date                         #echo -e "Now processing: ${file##*/} \n"                         #echo "File name: ${file%%.*}"                         #echo "File type: ${file##*.}"                         #inputs="$inputs -i ${file##*/}"                         inputs="$inputs -i ""'""$file""'"                         map="$map[$count:0] [$count:1] [$count:2] "                         count=$(($count+1))                               # ffconvert "$CLIPS_dir$item/$file"                 #       echo -e "Finished processing: ${file##*/} \n"                          fi                 done                 filter=$map                 #echo -e $inputs                 echo -e $count                 #echo -e $map                 #echo -e $filter               echo ffmpeg "$inputs"" -r 29.97 -f mov -vcodec libx264 -acodec pcm_s16le -threads 0 -filter_complex ""'""$filter""concat=n=""$count"":v=1:a=2 [v] [a1] [a2]'" -map \'[v]\' -map \'[a1]\' -map \'[a2]\' "'""$item"\.MOV"'"     fi          done                    # restore $IFS     IFS=$SAVEIFS      this script currently echos the ffmpeg command with perfect formatting, but I can't get it to execute the command. It always complains with an error about "Invalid Argument". Basically, I need to pass a lot of single quote characters in the command that goes to the subshell. The final product to send to subshell looks like this:               ffmpeg  -i '/Volumes/localtank/card2/CONTENTS/CLIPS001/AA0715/AA071501.MXF' -i '/Volumes/localtank/card2/CONTENTS/CLIPS001/AA0715/AA071502.MXF' -i '/Volumes/localtank/card2/CONTENTS/CLIPS001/AA0715/AA071503.MXF' -i '/Volumes/localtank/card2/CONTENTS/CLIPS001/AA0715/AA071504.MXF' -i '/Volumes/localtank/card2/CONTENTS/CLIPS001/AA0715/AA071505.MXF' -r 29.97 -f mov -vcodec libx264 -acodec pcm_s16le -threads 0 -filter_complex '[0:0] [0:1] [0:2] [1:0] [1:1] [1:2] [2:0] [2:1] [2:2] [3:0] [3:1] [3:2] [4:0] [4:1] [4:2] concat=n=5:v=1:a=2 [v] [a1] [a2]' -map '[v]' -map '[a1]' -map '[a2]' '/Volumes/localtank/card2/CONTENTS/CLIPS001/AA0715.MOV'      ## Edit: Ok... nevermind .... Got it... thanks for listening. And for anyone who is looking to take files from a video camera (which automatically segments the files) and rejoin or concatenate them into a continuous video using ffmpeg, here's a script. ...               #!/bin/bash -x     # mxfbcc.sh - mxf video file batch converter and concatenate parts into a whole     # pass at the command line ...     # (1) the directory to batch convert (typically called CLIPS00X from the Canon XF100 and, nothing else          # updated 2013-April-3          CLIPS_dir="$1"               function ffconvert()     {     #   ffmpeg -i "$1"  -r 30 -f mov -vcodec libx264 -acodec pcm_s16le -map 0:0 -map 0:1 -map 0:2 "${1%%.*}"\.MOV              ffmpeg -i "$1"  -r 30 -f mov -vcodec libx264 -acodec copy -threads 0 -map 0:0 -map 0:1 -acodec copy -map 0:2 -acodec copy "${1%%.*}"\.MOV     #   ffmpeg -i "$1"  -r 30 -f mov -vcodec copy -acodec pcm_s16le -map 0:0 -map 0:1 -map 0:2 "${1%%.*}"\.MOV          }     #12          SAVEIFS=$IFS     IFS=$(echo -en "\n\b")          date     for item in $CLIPS_dir* ; do          if [ -d $item ]; then              inputs=""         map=""         count=0              #echo -e "Item: $item"                 for file in $item/* ; do                          if [ ${file#*.} = "MXF" ]; then                         #date                         #echo -e "Now processing: ${file##*/} \n"                         #echo "File name: ${file%%.*}"                         #echo "File type: ${file##*.}"                         #inputs="$inputs -i ${file##*/}"                         input+="-i '${file}' "                         map="$map[$count:0] [$count:1] [$count:2] "                         count=$(($count+1))                               # ffconvert "$CLIPS_dir$item/$file"                 #       echo -e "Finished processing: ${file##*/} \n"                          fi                 done                 filter=$map                 #echo -e $inputs                 #echo -e $count                 #echo -e $map                 #echo -e $filter                 #echo -e                eval ffmpeg ${input} -r 29.97 -f mov -vcodec libx264 -acodec pcm_s16le -threads 0 -filter_complex \'$filter concat=n=$count:v=1:a=2 [v] [a1] [a2]\' -map \'[v]\' -map \'[a1]\' -map \'[a2]\' \'$item\.MOV\'     fi          done                    # restore $IFS     IFS=$SAVEIFS


title: Variable scope in multiple pipes

text: I was trying to do something following,               find . -name "*.dat" | get the basename of file | move filename returned by first command to basename returned by second command      To give a concrete example, I want `./mydir1/dir2/file1.dat` to be renamed as `file1.dat` . Can I do it using pipes. If yes, how to I store output of first command in a variable in first pipe and use it in second pipe. I hope that I am using the term pipe correctly.


title: How to insert the result of a command into the text in vim?

text: For instance, `:echo strftime(%c)` will show the current time on the bottom, but how to insert this time string to the text (right after the cursor)?


title: How to change the Linux Mint Nadia splash screen?

text: I was wondering if it is possible for me to change the splash screen when Linux Mint is loading? I am talking about the logo of mint which appears when you start the computer. If so what kind of file format is it? And is it difficult to do?


title: | Grep, Find which file the strings came from

text: I have a set of PDFs, and I am running               strings * | grep message      This returns the strings containing that method, is there anyway I can get grep to tell me which file it is from?


title: How to use IBus with kde

text: The KDE install on my PC includes IBus and the Japanese Anthy IME. In the IBus preference, I have enabled the Anthy IME. The IBus daemon is running and there is an IBus icon in the system tray, however, there does not appear to be any way of switching IMEs. This is on PC-BSD 8.2. What am I doing wrong here? Thanks


title: Will a "customized" initrd survive a kernel update via yum?

text: I have a CentOS 5.5 installation with the stock CentOS 5.5 kernel. I have modified the init script in the initrd, commenting out some unneeded modules, lowering the interval time of the "stabilized" command , etc. My question is, what will happen in the future when Yum updates the kernel? Will my initrd modifications make it into the initrd of the new kernel?


title: More free blocks than reserved, but still I get "no space on device"

text: As you see in this dumpe2fs -h output (snipped the end, left the head in case something is important), I have more (about 86000 more, in fact) 'Free blocks' than are reserved, but I get a "no space on device" error even for a little tiny file (echoing something into a file for testing). Color me stumped.               dumpe2fs 1.41.12 (17-May-2010)     Filesystem volume name:        Last mounted on:               Filesystem UUID:          b7d8fde6-faa4-4c13-b310-32f302cc6db6     Filesystem magic number:  0xEF53     Filesystem revision #:    1 (dynamic)     Filesystem features:      has_journal ext_attr resize_inode dir_index filetype needs_recovery sparse_super large_file     Filesystem flags:         signed_directory_hash     Default mount options:    (none)     Filesystem state:         clean     Errors behavior:          Continue     Filesystem OS type:       Linux     Inode count:              9707520     Block count:              38808000     Reserved block count:     1940400     Free blocks:              2026361     Free inodes:              9583170     First block:              0     Block size:               4096     Fragment size:            4096     Reserved GDT blocks:      1014     Blocks per group:         32768     Fragments per group:      32768     Inodes per group:         8192     Inode blocks per group:   512