title: How to manipulate output from commands with shell scripts

text: Simple question, having a `ls -l` command it makes a list on the command prompt and if we want to manipulate it we pipeline it with `awk` command, for instance if we want to to show specific files. Is that possible without using the `awk` command but instead using a shell script, if so what would be the column variables how would we manipulate that on fly list do you have also any suggestions on educative links or books. * * * EDIT:for example a `ls -l|awk '{print $1}'` the `$1` is referring to the first column,is there any way to do that with a shell script variable, for instance if we would like to run the `ls -l` command inside a shell script and print the exact filenames of which we are searching for. How to do this? Sorry for the misconception I am new to this.


title: gnu screen: automatic session on split

text: Inactive region appears after 'split' command in gnu screen now. You must go to the new region and type :screen. Only after that shell session appears in this region. Is it possible to make new region with shell session or other program? Not from config file, but from running screen.


title: Setting the TOPCOLORS environment variable

text: I don't seem to be able to find any examples on the Internet for this environment variable, which `top` will apparently read and use to display colours. How would I set this variable correctly so `top` used alternate colours in its output? I have Solaris `top` version 3.5beta9.


title: Memory allocation for sparse array in awk

text: I have searched but didnt reach to any conclusion that when i defined an sparse array does it reserve all the **contiguous memory** upto maximum index or it allocate the memory at that particular index only.               array[100000]="ID1"     array[1001]="ID2"      Similarly when i do for loop for an array does it scan all the indexes where **array[i] exist** or It point only **defined array's index** for ex. 100000 & 1001.               for(i in array){...}      I have to store some value at specific index but i am afraid of memory allocation,so it become so much important for me to know,how does it actually allocate memory in case of sparse array,thanks.


title: Gentoo virt-manager on system without GNOME cannot connect to libvirtd due to polkit throwing a missing file error

text: I am running Gentoo Linux for AMD64 using kernel 3.12.21 AMD64 on an HP Pavilion Touch 14-N009LA with an AMD A8-4555M CPU. My desktop environment is KDE 4.12.5. I have installed KVM, libvirtd, polkit and virt-manager. However, when I open virt-manager, I get the following error and am unable to do anything with virtual machines:               Unable to connect to libvirt.          authentication failed: polkit: Error getting authority: Error initializing authority: Could not connect: No such file or directory      Detail output is here:               Unable to connect to libvirt.          authentication failed: polkit: Error getting authority: Error initializing authority: Could not connect: No such file or directory          Libvirt URI is: qemu:///system          Traceback (most recent call last):       File "/usr/share/virt-manager/virtManager/connection.py", line 1002, in _open_thread         self.vmm = self._try_open()       File "/usr/share/virt-manager/virtManager/connection.py", line 984, in _try_open         flags)       File "/usr/lib64/python2.7/site-packages/libvirt.py", line 105, in openAuth         if ret is None:raise libvirtError('virConnectOpenAuth() failed')     libvirtError: authentication failed: polkit: Error getting authority: Error initializing authority: Could not connect: No such file or directory      Googling around I found the following tips to try and make it work, and here's how they went:   * Making sure that a polkit authentication agent is running. I checked and it is indeed running:               black@rockshooter ~ $ ps -ef | grep polkit     black     5039     1  0 04:31 ?        00:00:00 /usr/lib64/kde4/libexec/polkit-kde-authentication-agent-1   * Creating a group called kvm, adding my user ID to it, and creating a polkit rule to authenticate users of group kvm who wish to manage VMs. I did it like this and it didn't work:               root@rockshooter /etc/polkit-1/rules.d # cat 50-default.rules     polkit.addRule(function(action, subject) {         if (action.id == "org.libvirt.unix.manage" &&             subject.isInGroup("kvm")) {                 return polkit.Result.YES;         }     });     root@rockshooter /etc/polkit-1/rules.d # grep kvm /etc/group     kvm:x:78:qemu,black   * Connecting to the hypervisor from the command line (using `virsh`). I get the exact same error.               black@rockshooter ~ $ virsh --connect qemu:///system     error: failed to connect to the hypervisor     error: authentication failed: polkit: Error getting authority: Error initializing authority: Could not connect: No such file or directory


title: Why is my trap not printing any log message?

text: What I'm doing is,               trap 'rm -f /path/of/file/fileName.running; echo "TRAPPED & READY";' 1 2 9 15 >> trap.log      I didn't get anything in log & the file which should have been deleted still exists, I'm not sure of which signal could be stopping the script while it's running as I'm just killing the servers which are being used by the script. NB: My Cron-Scheduled job won't run if that file is present & I don't think I've missed any possible signal. where am I wrong?


title: text replacing in data file with peculiar spacing

text: I have a text (`.qdp`) file with many data stored. In some rows, the data are too many to be on just one line. Then, the program that saves the data, use a minus sign (`-`) to go on the new line, and continue the data writing, with two blank spaces at the beginning of the new line. How can I `find and replace` the minus plus the two blank spaces, in order to rewrite the data without any interruption? This is an example of what I have:               1 2 3 4 5 6 7-       8 9 10      And here what I want:               1 2 3 4 5 6 7 8 9 10


title: sending mail using telnet

text: I'm trying to send mail via the telnet command. I've looked at several tutorials online to use `telnet <servername> 25`. But I've tried `telnet mail.aol.com 25` and it gets stuck on `trying <ipAddress>....` Is there something wrong with my command?


title: debian: remove all packages installed on a specific day

text: I have to remove all packages installed on a specific day. My solution is to look up the file `/var/log/dpkg.log`, find out the entry with the right date, extract the names of the packages and remove them. Can I be sure sure that, in this way, I will find all desired packages? Is there another way to do it, in a more secure/formal way?


title: Creating a linux user with limited privileges for ssh tunnelling

text: I am following this post to create ssh tunnel to mysql. The details description of my application scenario is given in my other SOQ. I exactly followed these steps to create a user:               useradd -s /bin/false myuser     mkdir /home/myuser/.ssh     touch /home/myuser/.ssh/authorized_keys     chown -R myuser:myuser /home/myuser/.ssh     chmod 755 /home/myuser/.ssh     chmod 600 /home/myuser/.ssh/authorized_keys      It did not work for me. Not even able to ssh into remote server. Given the post very old I am looking for sane way to create a limited privileges user which only connect to mysql and nothing else. I am testing this under ubuntu. The other issue with this is to test the ssh connection from my system. So how I will create authorization keys for a system ( my local machine) which does not have a static IP. However the network in which I am working have a static IP. Is it possible to create authorization keys for that IP ? **Edit** Re-tested with two vagrant ubuntu instances, it works using ubuntu user with password , but unable to connect with `myuser` and `rsa key` as created in given article. **SSH KEY**               ssh-keygen -t rsa     Generating public/private rsa key pair.     Enter file in which to save the key (/home/vagrant/.ssh/id_rsa):      /home/vagrant/.ssh/id_rsa already exists.     Overwrite (y/n)? y     Enter passphrase (empty for no passphrase):      Enter same passphrase again:      Your identification has been saved in /home/vagrant/.ssh/id_rsa.     Your public key has been saved in /home/vagrant/.ssh/id_rsa.pub.      **Upload to server**               scp /home/vagrant/.ssh/id_rsa.pub vagrant@192.168.33.55:.     vagrant@192.168.33.55's password:      id_rsa.pub              100%      **Append RSA key to ghost user ssh keys**               ubuntu@DEV:~ cat id_rsa.pub >> /home/ghost/.ssh/authorized_keys      **SSH LOG**               vagrant@precise64:~$ ssh -fNg -vvv -L 3307:127.0.0.1:3306 ghost@192.168.33.55      OpenSSH_5.9p1 Debian-5ubuntu1, OpenSSL 1.0.1 14 Mar 2012     debug1: Reading configuration data /etc/ssh/ssh_config     debug1: /etc/ssh/ssh_config line 19: Applying options for *     debug2: ssh_connect: needpriv 0     debug1: Connecting to 192.168.33.55 [192.168.33.55] port 22.     debug1: Connection established.     debug3: Incorrect RSA1 identifier     debug3: Could not load "/home/vagrant/.ssh/id_rsa" as a RSA1 public key     debug1: identity file /home/vagrant/.ssh/id_rsa type 1     debug1: Checking blacklist file /usr/share/ssh/blacklist.RSA-2048     debug1: Checking blacklist file /etc/ssh/blacklist.RSA-2048     debug1: identity file /home/vagrant/.ssh/id_rsa-cert type -1     debug1: identity file /home/vagrant/.ssh/id_dsa type -1     debug1: identity file /home/vagrant/.ssh/id_dsa-cert type -1     debug1: identity file /home/vagrant/.ssh/id_ecdsa type -1     debug1: identity file /home/vagrant/.ssh/id_ecdsa-cert type -1     debug1: Remote protocol version 2.0, remote software version OpenSSH_5.9p1 Debian-5ubuntu1     debug1: match: OpenSSH_5.9p1 Debian-5ubuntu1 pat OpenSSH*     debug1: Enabling compatibility mode for protocol 2.0     debug1: Local version string SSH-2.0-OpenSSH_5.9p1 Debian-5ubuntu1     debug2: fd 3 setting O_NONBLOCK     debug3: load_hostkeys: loading entries for host "192.168.33.55" from file "/home/vagrant/.ssh/known_hosts"     debug3: load_hostkeys: found key type ECDSA in file /home/vagrant/.ssh/known_hosts:1     debug3: load_hostkeys: loaded 1 keys     debug3: order_hostkeyalgs: prefer hostkeyalgs: ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521     debug1: SSH2_MSG_KEXINIT sent     debug1: SSH2_MSG_KEXINIT received     debug2: kex_parse_kexinit: ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1     debug2: kex_parse_kexinit: ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-rsa-cert-v01@openssh.com,ssh-dss-cert-v01@openssh.com,ssh-rsa-cert-v00@openssh.com,ssh-dss-cert-v00@openssh.com,ssh-rsa,ssh-dss     debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se     debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se     debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-sha2-256,hmac-sha2-256-96,hmac-sha2-512,hmac-sha2-512-96,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96     debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-sha2-256,hmac-sha2-256-96,hmac-sha2-512,hmac-sha2-512-96,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96     debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib     debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib     debug2: kex_parse_kexinit:      debug2: kex_parse_kexinit:      debug2: kex_parse_kexinit: first_kex_follows 0      debug2: kex_parse_kexinit: reserved 0      debug2: kex_parse_kexinit: ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1     debug2: kex_parse_kexinit: ssh-rsa,ssh-dss,ecdsa-sha2-nistp256     debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se     debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se     debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-sha2-256,hmac-sha2-256-96,hmac-sha2-512,hmac-sha2-512-96,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96     debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-sha2-256,hmac-sha2-256-96,hmac-sha2-512,hmac-sha2-512-96,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96     debug2: kex_parse_kexinit: none,zlib@openssh.com     debug2: kex_parse_kexinit: none,zlib@openssh.com     debug2: kex_parse_kexinit:      debug2: kex_parse_kexinit:      debug2: kex_parse_kexinit: first_kex_follows 0      debug2: kex_parse_kexinit: reserved 0      debug2: mac_setup: found hmac-md5     debug1: kex: server->client aes128-ctr hmac-md5 none     debug2: mac_setup: found hmac-md5     debug1: kex: client->server aes128-ctr hmac-md5 none     debug1: sending SSH2_MSG_KEX_ECDH_INIT     debug1: expecting SSH2_MSG_KEX_ECDH_REPLY     debug1: Server host key: ECDSA 11:5d:55:29:8a:77:d8:08:b4:00:9b:a3:61:93:fe:e5     debug3: load_hostkeys: loading entries for host "192.168.33.55" from file "/home/vagrant/.ssh/known_hosts"     debug3: load_hostkeys: found key type ECDSA in file /home/vagrant/.ssh/known_hosts:1     debug3: load_hostkeys: loaded 1 keys     debug1: Host '192.168.33.55' is known and matches the ECDSA host key.     debug1: Found key in /home/vagrant/.ssh/known_hosts:1     debug1: ssh_ecdsa_verify: signature correct     debug2: kex_derive_keys     debug2: set_newkeys: mode 1     debug1: SSH2_MSG_NEWKEYS sent     debug1: expecting SSH2_MSG_NEWKEYS     debug2: set_newkeys: mode 0     debug1: SSH2_MSG_NEWKEYS received     debug1: Roaming not allowed by server     debug1: SSH2_MSG_SERVICE_REQUEST sent     debug2: service_accept: ssh-userauth     debug1: SSH2_MSG_SERVICE_ACCEPT received     debug2: key: /home/vagrant/.ssh/id_rsa (0x7f446fe9ada0)     debug2: key: /home/vagrant/.ssh/id_dsa ((nil))     debug2: key: /home/vagrant/.ssh/id_ecdsa ((nil))     debug1: Authentications that can continue: publickey,password     debug3: start over, passed a different list publickey,password     debug3: preferred gssapi-keyex,gssapi-with-mic,publickey,keyboard-interactive,password     debug3: authmethod_lookup publickey     debug3: remaining preferred: keyboard-interactive,password     debug3: authmethod_is_enabled publickey     debug1: Next authentication method: publickey     debug1: Offering RSA public key: /home/vagrant/.ssh/id_rsa     debug3: send_pubkey_test     debug2: we sent a publickey packet, wait for reply     debug1: Authentications that can continue: publickey,password     debug1: Trying private key: /home/vagrant/.ssh/id_dsa     debug3: no such identity: /home/vagrant/.ssh/id_dsa     debug1: Trying private key: /home/vagrant/.ssh/id_ecdsa     debug3: no such identity: /home/vagrant/.ssh/id_ecdsa     debug2: we did not send a packet, disable method     debug3: authmethod_lookup password     debug3: remaining preferred: ,password     debug3: authmethod_is_enabled password     debug1: Next authentication method: password     ghost@192.168.33.55's password:      **192.168.33.55 /etc/ssh/sshd_config**               RSAAuthentication yes     PubkeyAuthentication yes     #AuthorizedKeysFile %h/.ssh/authorized_keys      **192.168.33.55 SSHD LOGS**               tail /var/log/auth.log -n 100          Feb 28 10:15:42 precise64 sudo: pam_unix(sudo:session): session closed for user root     Feb 28 10:15:53 precise64 sshd[2154]: Failed password for ghost from 192.168.33.31 port 52350 ssh2     Feb 28 10:15:53 precise64 sshd[2154]: Failed password for ghost from 192.168.33.31 port 52350 ssh2     Feb 28 10:15:53 precise64 sshd[2154]: Connection closed by 192.168.33.31 [preauth]     Feb 28 10:17:01 precise64 CRON[2157]: pam_unix(cron:session): session opened for user root by (uid=0)     Feb 28 10:17:01 precise64 CRON[2157]: pam_unix(cron:session): session closed for user root


title: Using grep to find first two numbers of IP addresses?

text: I'm trying to figure out how to use grep to pull out only the first two numbers of an IP address in a list. I've got a routine that is isolating the log entires (from Exim) that I need, now I just need to determine what the first two IP address numbers are. I've tried this:               unique_ips2=$(grep "$email" tmp_exim|grep -oE "[0-9]{1,3}\.[0-9]{1,3}"|sort -u)      But instead of just getting the first two numbers in a 4 IP set, this is giving me 8 pairs of numbers, i.e the first two and the last two of each IP. The original statement uses `sed` to pull out the complete IPs, like so:               unique_ips=$(grep "$email" tmp_exim|sed 's/.*[[]\([0-9\.]*\)[]].*/\1/'|sort -u|wc -l)      But I don't have any familiarity with `sed` at all, and have no idea how to modify this statement as every attempt has only caused errors.


title: how to find out the ip of an ssh HostName

text: Is there a simple way to retrieve the IP of a `HostName` from an ssh config on the command line? Many times I have to use `scp` and would like to connect to a machine, but I remember only the HostName.


title: Is there more, less, or equal overhead for elisp, as for a bash script, to call awk, ps, etc?

text: Hopefully the question explains itself well enough. I'm referring to exta time and system resources involved for one vs. the other... I tend to think it would be the same, but I want to go beyond just think. Do the both make the same system calls?


title: Wireless indicator light flashing for activity on laptop keyboard

text: Here's wireless:               $ lspci | grep -i wireless     0d:00.0 Network controller: Intel Corporation Centrino Wireless-N 1000      OS is Linux Mint 12, using gnome2/compiz. I've got HP Pavilion dv7 899AW, sandybridge 915 chipset The problem is that the orange/blue light for the wireless won't stop flashing. Probably flashing due to activity. I tried this fix, but it didn't work: http://ubuntuforums.org/showthread.php?t=1699037&page=3 Also, the mute light stays permanently orange. Thanks.


title: Saving a email as file in mutt?

text: When I press `S` in mutt, it saves the mail to a mail folder format (`cur/ tmp/ new/`), but I want a single file to be saved, just like how the attachment is saved, is that configurable?


title: cron every X exact meaning

text: In cron you can specify */n where n means every n times period, for instance in the first column is minute.               */5 means every 5 minutes, but which minutes? 0, 5, 10, ...?      What happens if the number specified is not a divisor of 60?               */7 what will happen, will it start to skew in the next hour?


title: Is it possible (and a good idea) to do `pw lock root` on FreeBSD?

text: I have set up `sudo` on my FreeBSD server. As I now never want to log in as root anymore, I was wondering whether I should do `sudo pw lock root`. My questions are:   * Is this possible, without forever disabling my machine?   * Is it a smart idea, or is there a good reason to not do this?   * Will I still be able to do `sudo su` to get a root shell?


title: Labeling/Aliasing multiple network addresses

text: If my machine is connected to several networks and configured with multiple addresses (ipv4), is it wise to configure and use labels to identify them ? By labels I mean the iproute2 ip command's "label" tag:               ip address add 192.168.0.1 dev eth0 label eth0:local      I want to be able to identify the address and change it using a script when needed. I'm asking because the man page refers to Linux-2.0 net aliases compatibility which sounds deprecated. Also, I might be missing a better solution.


title: Deny external SSH access to a user

text: Is it possible to deny access to a user (in my case `www-data`) from outside the network? Or possibly deny this:               ssh www-data@example.com      But allow this if already logged in:               su www-data


title: Small Linux distro with Ruby

text: I have been using Puppy Linux for basic Linux needs, however now I would prefer one that has Ruby included, so that it does not have to be downloaded. I would prefer a small distro that can run from a CD, smaller size preferred to decrease boot time. What would be a good choice for this?


title: sudo source: command not found

text: I want to run this program as root. It activates a virtual environment and runs a python program in that virtual environment. The program looks like this               $cat myfile.sh     source /pathto/venv/bin/activate     python /pathto/rsseater.py      If I just run it as root I get               $ sudo ./myfile.sh      ./myfile.sh: 2: ./myfile.sh: source: not found      I found this but if I try to add `sudo -s` to the top of the file it seems to change the prompt to a # -- but the python does not run as expected. I'm not sure what the program is doing when I have sudo -s at the top of the file like that. How can I get this program to run as root?


title: Can't install lsb-core on Ubuntu Server 11.10

text: I'm attempting to install lsb-core on an Ubuntu server. Did `apt-get update` then did `apt-get install lsb-core`               root@quackwall:~# apt-get install lsb-core     Reading package lists... Done     Building dependency tree     Reading state information... Done     You might want to run 'apt-get -f install' to correct these:     The following packages have unmet dependencies:      lsb-core : Depends: lsb-invalid-mta but it is not going to be installed or                          mail-transport-agent                 Depends: binutils but it is not going to be installed                 Depends: libc6-dev but it is not going to be installed or                          libc-dev                 Depends: cups-bsd but it is not going to be installed or                          lpr                 Depends: lprng or                          cups-client but it is not going to be installed                 Depends: m4 but it is not going to be installed                 Depends: mailx or                          mailutils but it is not going to be installed                 Depends: make but it is not going to be installed                 Depends: ncurses-term but it is not going to be installed                 Depends: pax but it is not going to be installed                 Depends: alien (>= 8.36) but it is not going to be installed     E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).      So apparently Ubuntu doesn't feel like installing `lsb-core`. The one thing I can find on Google says that there mirror was out of date. However I can't find whats wrong with my sources.list. Below is a copy of it               # deb cdrom:[Ubuntu-Server 11.10 _Oneiric Ocelot_ - Release i386 (20111011)]/ oneiric main restricted          #deb cdrom:[Ubuntu-Server 11.10 _Oneiric Ocelot_ - Release i386 (20111011)]/ oneiric main restricted          # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to     # newer versions of the distribution.     deb http://us.archive.ubuntu.com/ubuntu/ oneiric main restricted     deb-src http://us.archive.ubuntu.com/ubuntu/ oneiric main restricted          ## Major bug fix updates produced after the final release of the     ## distribution.     deb http://us.archive.ubuntu.com/ubuntu/ oneiric-updates main restricted     deb-src http://us.archive.ubuntu.com/ubuntu/ oneiric-updates main restricted          ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu     ## team. Also, please note that software in universe WILL NOT receive any     ## review or updates from the Ubuntu security team.     deb http://us.archive.ubuntu.com/ubuntu/ oneiric universe     deb-src http://us.archive.ubuntu.com/ubuntu/ oneiric universe     deb http://us.archive.ubuntu.com/ubuntu/ oneiric-updates universe     deb-src http://us.archive.ubuntu.com/ubuntu/ oneiric-updates universe          ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu      ## team, and may not be under a free licence. Please satisfy yourself as to      ## your rights to use the software. Also, please note that software in      ## multiverse WILL NOT receive any review or updates from the Ubuntu     ## security team.     deb http://us.archive.ubuntu.com/ubuntu/ oneiric multiverse     deb-src http://us.archive.ubuntu.com/ubuntu/ oneiric multiverse     deb http://us.archive.ubuntu.com/ubuntu/ oneiric-updates multiverse     deb-src http://us.archive.ubuntu.com/ubuntu/ oneiric-updates multiverse          ## N.B. software from this repository may not have been tested as     ## extensively as that contained in the main release, although it includes     ## newer versions of some applications which may provide useful features.     ## Also, please note that software in backports WILL NOT receive any review     ## or updates from the Ubuntu security team.     deb http://us.archive.ubuntu.com/ubuntu/ oneiric-backports main restricted universe multiverse     deb-src http://us.archive.ubuntu.com/ubuntu/ oneiric-backports main restricted universe multiverse          deb http://security.ubuntu.com/ubuntu oneiric-security main restricted     deb-src http://security.ubuntu.com/ubuntu oneiric-security main restricted     deb http://security.ubuntu.com/ubuntu oneiric-security universe     deb-src http://security.ubuntu.com/ubuntu oneiric-security universe     deb http://security.ubuntu.com/ubuntu oneiric-security multiverse     deb-src http://security.ubuntu.com/ubuntu oneiric-security multiverse          ## Uncomment the following two lines to add software from Canonical's     ## 'partner' repository.     ## This software is not part of Ubuntu, but is offered by Canonical and the     ## respective vendors as a service to Ubuntu users.     # deb http://archive.canonical.com/ubuntu oneiric partner     # deb-src http://archive.canonical.com/ubuntu oneiric partner          ## Uncomment the following two lines to add software from Ubuntu's     ## 'extras' repository.     ## This software is not part of Ubuntu, but is offered by third-party     ## developers who want to ship their latest software.     # deb http://extras.ubuntu.com/ubuntu oneiric main     # deb-src http://extras.ubuntu.com/ubuntu oneiric main               ###################     # MODS     ###################          # Webmin     deb http://download.webmin.com/download/repository sarge contrib     deb http://webmin.mirror.somersettechsolutions.co.uk/repository sarge contrib       Now I'm not entirely sure if that's good or not, but I know that I can run basic updates just fine. And since I'm using the US mirror, it shouldn't be out of date Any idea's on what's wrong?


title: How to securely download rpmfusion keys

text: **The Actual Problem I am trying to solve** I am trying to automatically configure my fedora installations via salt to automatically have the rpmfusion repositories installed. In order to do this securely I need the gpg key so that packages can be verified before they are installed. However, I am unable to find a way to securely download rpmfusion's keys. For example, if I was making a google chrome repo I would have something like this.               [google-chrome]     name=google-chrome     baseurl=http://dl.google.com/linux/chrome/rpm/stable/x86_64     enabled=1     gpgcheck=1     gpgkey=https://dl-ssl.google.com/linux/linux_signing_key.pub      However, for rpmfusion the closest thing I have is the following (Note this is untested):               [rpmfusion-nonfree]     name=RPM Fusion for Fedora $releasever - Nonfree      mirrorlist=http://mirrors.rpmfusion.org/mirrorlist?repo=nonfree-fedora-$releasever&arch=$basearch     enabled=1     metadata_expire=7d     gpgcheck=1     gpgkey=http://rpmfusion.org/keys?action=AttachFile&do=get&target=RPM-GPG-KEY-rpmfusion-nonfree-fedora-$releasever      However, note that I am download via an unencrypted channel (http instead of https). So my question is the following: Is there a way for me to securely download rpmfusion's public key?


title: is it possible to determine installed packages on a secondary mounted drive?

text: I'm "upgrading" to a new distro (from Linux Mint 15 -> 16) by performing a fresh installation to a new drive, and referencing my original drive as needed. I've currently booted to my new installation (Linux Mint 16), and I've mounted my original drive (Linux Mint 15), so I can access all the raw data just fine. It'd be convenient if I could see the packages that I had installed previously without the (admittedly minor) hassle of swapping my cables and rebooting back and forth. Basically I'm looking for an alternative to `dpkg --get-selections` (or `apt` equivalents, etc) that I can use on a non-running drive, such as a raw file location where this info may be stored. _(Edit: By "non-running" I mean that it is attached and running, but was not booted, and is mounted on`/mnt/old` or some such.)_ Is this a Thing That Can Be Done?


title: RHEL Error message mounting luks crypted filesystem at boot

text: I am configuring a luks crypted file system to be mounted at boot time using RHEL 6.5 I did all the configuration from command line and tt worked but printed an error message after asking for password               /crypted is password protected:*********     modprobe: FATAL: Error inserting padlock_sha (/lib/modules/2.6.32-431.el6.x86_64/kernel/drivers/crypto/padlock-sha.ko): No such device      I did some research and found some old RedHat ticket regarding this, one of the ticket says this is because that module is only for Via chips. If I configured encrypted file system via anaconda and there is no such error message so I believe there is something I missed or did not do right. Any idea ? here is what I did               echo "modprobe dm_crypt" > /etc/sysconfig/modules/load_dm_crypt.modules     cryptsetup luksFormat /dev/vg01/lv_crypt     cryptsetup luksUUID /dev/vg01/lv_crypt     cryptsetup luksOpen /dev/vg01/lv_crypt lv_crypt     mkfs -t ext4 /dev/mapper/lv_crypt          cat /etc/crypttab     [root@server ~]# cat /etc/crypttab      lv_crypt UUID=5fd651df-f946-40ab-a07b-47cd63207f3f none     [root@server ~]# cat /etc/fstab | grep lv_crypt     /dev/mapper/lv_crypt    /crypted        ext4    defaults        1 2


title: Dual boot Linux Mint in a GPT style hard drive along with Windows 8

text: I have a Sony VAIO e series laptop which came with Windows 8. I wish to install Linux Mint as additional operating system. Only at the time of installation I could find that my HDD is of GPT partition style and my bios was also set in UEFI mode. After setting the bios to legacy mode the HDD became unbootable giving a error that "operating system not found" every time I try to turn on my laptop. Since MBR style HDD is required for legacy mode and booting multiple operating systems, I tried many software which converts GPT to MBR HDD but there was no use in it. How can I install Linux Mint while keeping the Windows 8 untouched? Note: my motherboard can be set to UEFI and legacy boot mode. I want to boot both Windows 8 and Linux. It will be good if you suggest me a solution without formatting my HDD.


title: Why is /dev full?

text: The /dev.. is full:               SERVER:/dev # df -mP /dev     Filesystem         1048576-blocks      Used Available Capacity Mounted on     udev                     12042     12042         0     100% /dev      There is no files that consume space!               SERVER:/dev # find . -ls | sort -r | head -2     2790517    0 -rw-r--r--   1 root     root            0 Dec 16 10:04 ./devnull     1490005831    0 -rw-------   1 root     root            0 Dec 16 07:54 ./nul     120387    0 lrwxrwxrwx   1 root     root           12 Dec 03 05:42 ./disk/by-uuid/xx..foo..xx -> ../../dm-13     SERVER:/dev # du -sm * 2>/dev/null | sort -nr | head -4     1   shm     0   zero     0   xconsole     0   watchdog      swap is used heavily:               SERVER:/dev # free -m              total       used       free     shared    buffers     cached     Mem:         24083      23959        124          0        327      21175     -/+ buffers/cache:       2455      21627     Swap:        10245      10245          0      deleted but still used files (?):               SERVER:/dev # lsof /dev | grep deleted     su         4510   bar   14u   REG    0,14 6269616128 2689827477 /dev/shm/kdfoo.a4o (deleted)     grep       4512       root    1u   REG    0,14 6269616128 2689827477 /dev/shm/kdfoo.a4o (deleted)     bash       4517   bar   14u   REG    0,14 6269616128 2689827477 /dev/shm/kdfoo.a4o (deleted)     sh         4606   bar   14u   REG    0,14 6269616128 2689827477 /dev/shm/kdfoo.a4o (deleted)     ksh       24134       root    1u   REG    0,14 6329864192 2685851781 /dev/shm/foo5.44m (deleted)     ksh       29209       root    1u   REG    0,14 6269616128 2689827477 /dev/shm/kdfoo.a4o (deleted)     su        29571   bar   14u   REG    0,14 6329864192 2685851781 /dev/shm/foo5.44m (deleted)     grep      29573       root    1u   REG    0,14 6329864192 2685851781 /dev/shm/foo5.44m (deleted)     bash      29578   bar   14u   REG    0,14 6329864192 2685851781 /dev/shm/foo5.44m (deleted)     sh        29694   bar   14u   REG    0,14 6329864192 2685851781 /dev/shm/foo5.44m (deleted)     SERVER:/dev #       **My question** : what is using up all the 12 GByte space of "udev on /dev type tmpfs (rw)"?


title: How to create a short path?

text: We have so many useful folders, which are in different path, for our working in Linux. For example :   1. `$ cd ~/Documents/Courses/EDX/physics2013/`   2. `$ cd ~/Documents/Company/OpenGL/Proj/...`   3. `$ cd ~/Documents/Freelance/Android/Proj/...` .... How to create some short paths which can be used like   1. `$ cd edxPhy2013`   2. `$ cd cglProj-v-2.13`   3. `$ cd flAndrProj-v-1.1`


title: Nested filtering in rsyslogd

text: I'm using rsyslogd and trying to figure out why things like               if $hostname startswith 'd.42ba7373' and $programname == 'app' then /var/log/bla2app      work just fine, but               if $hostname startswith 'd.42ba7373' and $programname == 'heroku' then {        action(type='omfile' file='/var/log/bla2heroku')     }      gives an error `unknown priority name`. Ideas? Using version 5.8.6 on EC2 ubuntu instance.


title: using GPS with Linux & output only certain data

text: Hello I am currently using BU-353 S4 USB GPS in my Linux, the command,               cgps -s      Output various parameters including, Time, Latitutde, Longitute, Speed, Heading etc... is there any way to output only Longitude and Latitude instead of the complete details ? I have gone through all the available arguments of `cgps` command and as far as I can tell, this command only output the complete table.


title: ssh/scp works but rsync just constantly says "no"

text: Hi I have a windows 2003 server that I need to back up onto a `linux` client so I install `cygwin` on the `Win2k3`. On the `Win2k3` I have enabled `ssh`, `scp` but (because the `Win2k3` server uses an customised windows SFTP server listening on port 22) I had to set `scp` / `ssh` to run on `port 222` on cygwin. It works fine. As long as I use ssh/scp and use the -p/-P switch at command line. I established a `SSH Public/Private Key Pair` for my user over ssh/scp it works lovely from `linux client` to `Win2k3 server`. I then I start the rsyncd on Win2k3 and add the user in the `/etc/rsyncd.conf`, created the `/etc/rsyncd.secrets` and assigned privilages and it seems fine. Then when I try to rsync connect /not/ over ssh it works but I want to /only/ connect via ssh and when I do that it fails every time with 0 bytes. I have tried multiple users and rewritten the rsyncd.conf a million times but it constantly fails. I am beginning to think I need to tell rsync client that the ssh port is 222 from the clients perspective. If so how do I do it?


title: Preventing output to /var/log/syslog

text: I have rules such as:                if $hostname startswith 'd.42ba7373' and $programname == 'app' then /var/log/applog      and don't want to output messages that go into that log to /var/log/syslog as well. Is that possible?


title: Open GNOME session remotely through SSH

text: I have a laptop connected wirelessly to my home network. I'm planning on installing a CentOS server on my network, used for a web server, a file server, and experimentation. I want to access it from my laptop in the form of a dual-boot - one main operating system, and one that's just a very simple system that automatically starts a remote connection to the server and opens up a GNOME session on the server that is then displayed on my computer. I'm thinking about using Arch Linux as the OS which will connect to the server, since I've been meaning to try it for a while and it seems rather configurable. My questions are the following :   1. How can I start a GNOME session on my laptop which controls the other computer (no ssh -X tunneling or VNC remote control; I want my computer to be a "dumb terminal" to the server)?   2. Will speed be an issue over wireless? Would SSH compression help?   3. Is Arch Linux indeed the best option for the terminal OS?


title: Fedora 20 and windows 7 can't create partions

text: I have installed Windows 7 SP1 in my laptop. I have 4 partitions:   1. System reserved (Primary partition): 100mb   2. C (Primary partition): 70GB   3. D (Logical partition): 150GB   4. E (Logical partition): 175GB I have 2 primary and one extended partition with 2 logical partitions. When I tried to install Fedora 20 automatic partition failed. And when I try to manually create partitions, I am only able to create one partition. When I try to create second partition it says "not enough space". I think it's the problem of partition table, since Windows only allows 3 primary partitions. But I have only 2 primary partitions, so it shouldn't be a problem. Any idea what’s happened?


title: How to download & install “heidisql” on linux?

text: First time I am starting working on "heidisql". I want to download & install "heidisql" on Linux Mint. May anybody please provide me the link to download "heidisql" for Linux version & how to install? Actually after googling I am not getting proper result.


title: How do I set the keyboard layout to something like us qwerty in Manjaro Linux?

text: After a fresh installation of _Manjaro Linux_ and selecting _2 languages_ for the system, I can't access the us english layout anymore! I have selected the `Alt` + `Shift` in order to change layout but it doesn't work. I can't login, I have rebooted and the problem persists. How do I set the default us layout?


title: nuke all Google Chrome processes

text: I like Chrome and such, I don't really want to switch back to Firefox or anything else. My issue is that occasionally it really feels like the whole process needs a restart. I've noticed that if I just close it and close its little bubble in the top-right, processes (`ps -A`) stick around. Is there a quick/easy way I could just create a button that says "nuke chrome" and kill all processes related to it with one click? I think it would be helpful. Using Xubuntu 14.04 and no longer stuck on it, so it's even alright with me if you're like: > "Try this other distro that won't have those sorts of issues." Yes, it probably is one of these many buggy extensions I've installed. But I'd like to use this same method with other applications as well.


title: Restoring output to the terminal after having issued "exec &>filename"

text: I am trying to execute the following:               exec &>filename      After this I am not able to see anything including what I typed, alright. I frantically try , `exec 1>&1` and `exec 2>&2` , but nothing happens. Now , without killing the shell , how do I get back the output redirected to the stdout and error redirected to stderr respectively? Are the file descriptors the only way to refer standard [in|out]put and stderr?


title: Make VIM act as Notepad++ on mixed line endings

text: I've googled all around and found tons of weird solutions to ^M problem, but couldn't find one and simple: how could I just open any file, like in Notepad++ and work on it? I don't want to mess with LF and CR stuff, anyway git will correct it on push. Is there a "stupid" solution for this issue? One little thing, I'm forced to work in the World Evil OS right now, so the solution should work for it.


title: Empathy integration with Gnome3 failed

text: I've migrated recently to the new Debian stable, by installing the new system but saving all my data in the `/home` partition. I do this because I don't want the data to be lost between installations, besides, it also saves the configuration of all my applications like Icewaesel bookmarks, Icedove mail accounts. However, I think my old configuration is breaking some features of Gnome3. For example, it seems like if Empathy weren't integrated with Gnome3 at all. I can't set my status with the user menu and notifications aren't showed when anyone talks to me. I've tried to remove some folders like `.gnome`, `.gnome2`, `.conf`... to reset the configuration to defaults, but it didn't work. Any idea about what's the problem?


title: How to add new gcc compiler to my Linux mint OS

text: I want to add new gcc cross compiler to my Linux mint. I need this compiler to compile codes that should run on a Khepera III Robot. I have searched a round but I didn't find any clear answer to my question. I'm about to graduate so I can't afford trying and ruining my current OS. I would appreciate it if anyone can help me to add this new compiler. This is what's written on the Khepera III website. The GCC cross compiler, combined with the libKorebot API, and any standard library available for the Linux operating system, provide a powerful standard development environment. An application running on KoreBot can use all the POSIX functions from the standard C library as well as many other libraries (such as libjpeg, libpthread, libcrypto, etc...). More Information about Korebot of the robot: Processor : Marvell PXA270 with XScale @ 600MHz OS : Linux OS, Angström distribution (OpenEmbedded tools), kernel 2.6.24 Memory : 128MB RAM/32MB Flash


title: How do I pick up a previous modification in VIM?

text: If I did several modifications to the original file, i.e.               1 delete a line     2 insert some text     3 delete another line     4 delete the text added in step 2     5 insert some other text     6 ...      Now I want to recover the text deleted in step 2, is there a way of showing modifications and pick up something?


title: How to lock one mouse/keyboard pair to each screen?

text: Using the ATI Catalyst Control Center (fglrx), I setup two desktops (the multidesktop option) via dual-head. Now I have two mice and keyboards (USB) attached which, using `xinput` can be put in two separate groups. Can I lock each group to one screen? And how can this be done permanently? Alternatively, instructions for turning this "lite multiseat" configuration into multiseat are appreciated as well. This is the xorg.conf as setup by the Catalyst Center:               Section "ServerLayout"         Identifier     "amdcccle Layout"         Screen      0  "amdcccle-Screen[1]-0" 0 0         Screen         "amdcccle-Screen[1]-1" 1400 0     EndSection          Section "Module"         Load  "glx"     EndSection          Section "Monitor"         Identifier   "0-CRT1"         Option      "VendorName" "ATI Proprietary Driver"         Option      "ModelName" "Generic Autodetecting Monitor"         Option      "DPMS" "true"         Option      "PreferredMode" "1400x1050"         Option      "TargetRefresh" "60"         Option      "Position" "0 0"         Option      "Rotate" "normal"         Option      "Disable" "false"     EndSection          Section "Monitor"         Identifier   "0-DFP1"         Option      "VendorName" "ATI Proprietary Driver"         Option      "ModelName" "Generic Autodetecting Monitor"         Option      "DPMS" "true"         Option      "PreferredMode" "1400x1050"         Option      "TargetRefresh" "60"         Option      "Position" "0 0"         Option      "Rotate" "normal"         Option      "Disable" "false"     EndSection          Section "Device"         Identifier  "Default Device"         Driver      "fglrx"     EndSection          Section "Device"         Identifier  "amdcccle-Device[1]-0"         Driver      "fglrx"         Option      "Monitor-DFP1" "0-DFP1"         BusID       "PCI:1:5:0"     EndSection          Section "Device"         Identifier  "amdcccle-Device[1]-1"         Driver      "fglrx"         Option      "Monitor-CRT1" "0-CRT1"         BusID       "PCI:1:5:0"         Screen      1     EndSection          Section "Screen"         Identifier "Default Screen"         DefaultDepth     24         SubSection "Display"         EndSubSection     EndSection          Section "Screen"         Identifier "amdcccle-Screen[1]-0"         Device     "amdcccle-Device[1]-0"         DefaultDepth     24         SubSection "Display"             Viewport   0 0             Depth     24         EndSubSection     EndSection          Section "Screen"         Identifier "amdcccle-Screen[1]-1"         Device     "amdcccle-Device[1]-1"         DefaultDepth     24         SubSection "Display"             Viewport   0 0             Depth     24         EndSubSection     EndSection          Section "DRI"         Group        "vglusers"         Mode         0660     EndSection      (the latter entry is from VirtualGL, see this question, it should be irrelevant here)


title: Permanent Environment Variable with # linux Ubuntu

text: I am trying to set some environment variables permanently by editing the /etc/environment file. One of my environment variables has a "#" in it and some text after the "#". Everything after the "#" gets commented out. How do you set a variable with a "#" so the "#" is part of the variable and doesn't comment out the rest of the variable after the "#"? Is there a better way I should be setting environment variables so that I do not need to set them every time I log in? Thanks!


title: confuse with awk user define function

text: I have solved Projecteuler Problem 3, but the thing is that I am not able to create the function in awk. I have tried this working code ( **without** function):               #!/usr/bin/awk -f     BEGIN{                     n=600851475143;                     x=2; # minimual prime                     while ( x<n ) {                             if ( (n%x) == 0 ) {                                     n = n/x                                     print n                             } else { # if n not devisable then increment x+1                                     x++                             }            }     }      Not working **with** the function               #!/usr/bin/awk -f     # The prime factors of 13195 are 5, 7, 13 and 29.     # What is the largest prime factor of the number 600851475143 ?          function get.PrimeFactor(n) {                x=2; # minimual prime                while ( x<n ) {                        if ( (n%x) == 0 ) {                                n = n/x                                print n                         }                              else { # if n not devisable then increment x+1                                x++                         }             }          BEGIN {                  n = $1 # input number by user             get.PrimeFactor(n)     }      I have tried several ways to work with the function but no luck. Can anyone highlight what I'm doing wrong?


title: Why does "$(( ~33 ))" produce -34?

text: $ echo $(( 255 ))     255     $ echo $(( 33 ))     33     $ echo $(( ~33 ))     -34     $ echo $(( ~255 ))     -256     $       and my kernel is:               $ uname -a     Linux HOSTNAME 3.2.0-40-generic-pae #64-Ubuntu SMP Mon Mar 25 21:44:41 UTC 2013 i686 i686 i386 GNU/Linux      * * * **QUESTION:** `~` is for negating the number AFAIK. But why does `~33` produce `-34` and why does `~255` produce `-256`?


title: include a binded folder for each new users created

text: In a nutshell, my ftp server consists of 2 folders for each individual users. so _john_ has this on his directory               /home       +/john          +/pub   <-- binded to /var/ftp          +/private      my public folder is `binded` with `/var/ftp/` to `/home/john/pub`. each time i create a user, i need to bind my `/var/ftp` to the `/home/newuser/public` and do it over and over again when i create user. How can I automatically create a `/pub` folder (binded to `/var/ftp`) for each new user? This is how command when I create a new user with home directory `/usr/sbin/adduser -g ftpgroup -d /home/mark mark` it create `/home/mark` I know this can be done, I just don't know how.


title: best way to search my shell's history

text: Is there a better way to search my history file for a command than grep? I do have some idea what the command starts as, but I don't know how far back in the history it is. _update:_ was formerly zsh specific but due to overlapping answers feel free to answer for any shell (or mode (vi/emacs)) here, just note if it is specific.


title: Is there any Virus attack in Linux?

text: Is there any virus attack on any of the current distributions of Linux? if there is any, how was it solved? have they used any anti virus programs which are available now?


title: Linux for a writer, running on a Pentium II

text: > **Possible Duplicate:**   >  Linux for low-end hardware and internet browsing My dad has a rather old computer that's just sitting there that I want to repurpose. Now I know could probably get a Pentium 4 very cheap but where's the fun in that? What I'm after is something that's simple to use that will run on a Pentium II or III (I can't remember) with 4GB of HDD space and probably about 512MB of RAM. What can I install on this to make it work?


title: Linux/UNIX for older (Pentium 4) laptop

text: > **Possible Duplicate:**   >  Linux for low-end hardware and internet browsing What UNIX or Linux would be the most suitable for my old laptop HP Compaq nx9010 hardware? Hardware specs: > Chipset: ATI Radeon IGP 345M (RS200MP) / ALI M1535+ > > CPU: 2.0 GHz Intel Pentium 4 processor with 400-MHz Front Side Bus and > 512-KB L2 cache > > 512 MB DDR SDRAM (256 MB SODIMM in slots 1 and 2) > > 80GB 4200 rpm > > DVD/CD-RW > > 802.11b, 802.11g It will be mainly used for Internet browsing, office work, wireless networking.


title: Ubuntu 13.10 big problem with privilegies

text: I have HP 14 chromebook (with haswell celeron processor and 4 Gb of RAM, 4G), all is okay when I installed Ubuntu 13.10 saucy with crouton script I didn't get any errors. But when I'm trying to install something, it says that I don't have privileges, what should I do?


title: Meaning of "rc5" in "linux kernel 2.6.37-rc5"

text: When I visited the kernel.org website to download the latest Linux kernel, I noticed a package named `2.6.37-rc5` in the repository. What is the meaning of the "rc5" at the end?


title: How to make Python scripts usable on Windows?

text: I have some Python scripts in Linux. How can I make those scripts so that windows user can use and execute them?


title: What is the difference between Context output format and Unicode output format while taking diff?

text: What is the difference between Context output format and Unicode output format when taking a diff?               diff -NBur dir1/ dir2/       diff -NBcr dir1/ dir2/


title: Control bandwidth with iptables

text: How can I control bandwidth in RHEL 5 using `iptables`?


title: Have some 2TB partition for a directory

text: I have 4 2TB HDD on a VmWare ESXi 5.1 server. I have httpd on /var/www/html directory on a Centos VM. can I have full size of 4 HDD (8TB) on this directory? Or I must mount every HDD to seperate directory?


title: What are the origins of rgb.txt?

text: Where did the list of X11 color names come from? Every resource I've found online claims the origin is unknown, but it must be recorded somewhere. The best information I've found was in an archived discussion page at Wikipedia's Wikiproject Color: > The X11 color names were designed (...) by computer scientists making things > up as they went along. and > It is true the X11 colors were the work of mostly clueless grad students Is there anything more substantial about the origins of the X11 color names?


title: Able to connect to my dell printer but cannot print to it

text: PC: Dell Inspiron Mini 10,      Processor: Intel Atom dual core 1.6 GHz,      RAM: 1GB,      OS: Ubuntu 12.04 LTS 32 bit,      Printer: Dell P713W      So I tried to add the printer driver for my ubuntu from the following site. here I followed the instructions to the dot and completed installation. My computer can detect my printer over the network. Yet, when I try to print a test page from the computer, the print job fails on processing and stops. Here are the details. I tried pinging to my printer and they are connected together, and the printer works fine on my other computers in windows environment. What can I do to get my printer working in Ubuntu Linux? I can provide more details if requested.


title: "No such file" warning on terminal launch

text: I ran a source command on a file that was missing. I forgot about it but later noticed that every time I opened a new terminal, the first line would be a warning about the missing file               bash: /software/intel-composer-2011u5-x86_64/bin/compilervars.sh: No such file or directory     ~ $      How do I get rid of this warning?


title: SSH connection refused from inside my LAN

text: I'm on Fedora 19 and I have a problem with `ssh`. Ssh is up and running and I can connect when I enter my lan ip. But when I try my server name (`blahblah.no-ip.org`) I get a connection refused. No-ip is already running as a service and is working properly (sending the correct ip). I've already set up port forwarding on my router, I also changed the port of `ssh` both on the service and on the router port forwarding (in case my beloved ISP decided to block those ports). But still I get a connection refused and when I `nmap` the hostname I see that the ssh port is closed. One thing though: I have two PCs under the same external ip (I've set up the port forwarding to the correct internal ip). When I `nmap blahblah.no-ip.org` I get a Port 23 and 80 open. 80 seems OK but I've never started telnet service on my machine. Any ideas what else to try? Router is zte zxv10 and port forwarding is correctly set up. I say this because I've already set up port forwarding for deluge and it's working properly.


title: Error while running apt-get update

text: I am getting the below mentioned error while I am running "sudo apt-get update" command.               Fetched 1,592 kB in 4min 5s (6,489 B/s)     Reading package lists... Error!     E: Encountered a section with no Package: header     E: Problem with MergeList /var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_precise-security_universe_i18n_Translation-en     E: The package lists or status file could not be parsed or opened.      I have no idea what is this? any help? Please notice that running below commands have no effect on the problem.               $ sudo rm -rvf /var/lib/apt/lists/*            $ sudo apt-get update      First command run successfully while the other fails (complete output is here -> http://paste.ubuntu.com/6589940/).   What I am able to figure out is that second command (apt-get update) download the package > "precise-security_universe_i18n_Translation-en" and then try to install it. Problem is in this package. I think this package is corrupted. This will also prevent opening package manager and software center. If I manually delete this package then both are opening. But then again running update command will lead to same problem. Is there anything like I can update from another server (using command line) (instead of default server used by apt-get update) where this package might be uncorrupted.


title: How to make Qt Creator use KDEs color scheme

text: I have krita-darker color scheme as my KDE color scheme, but the text area in Qt Creator is still white. How can I force Qt Creator to use KDE color scheme (like Kate)?


title: Copy files from a list to a folder

text: I have a text file `abc.txt` and its contents are:                  /lag/cnn/org/one.txt        /lag/cnn/org/two.txt        /lag/cnn/org/three.txt      If I use:               $ tar -cvf allfiles.tar -T abc.txt      I'm getting the tar of files in the list. Similarly is it possible to copy those files in `abc.txt` to a folder? I tried this:               $ cp --files-from test1.txt ./Folder      But it is not working.


title: Readline menu-complete on OS X

text: I'm trying to test out using the `menu-complete` on OS X 10.8, and it's just not working. I have it in my .inputrc as such:               "\M-s": menu-complete      I then tried to do `C-x` `C-r` to reload the `.inputrc` and it's not working. I've quit and re-opened Terminal as well, and it's not working. Is it not supported in OS X? Or am I doing it wrong? * * * **Edit** : It seems to work in `xterm` (from XQuartz), but not in Terminal


title: Viewing Linux Library / Executable version info

text: In Windows, EXE and DLL have version info, including at least the following fields:   1. file version   2. product version   3. internal name   4. product name   5. copyright In Linux Library / Executable:   * Which fields are present?   * How to view such info?   * What tools/libraries to read?


title: What live distro can automatically accept usb tethering from android phone?

text: I want to take my old notebook while travelling. I have to boot up only from usb or cd though. I want to connect to the internet using usb tethering from my android phone (HTC Desire + cyanogen mod 7.1) If connect my android phone to my Windows 7 computer via usb cable and turn usb tethering on Windows does the rest and I am connect to the Internet. Can I be **autoconnected** (usb tethering preferably) to the **internet** using any live usb/cd linux/unix distro? Which one? I'll be creating the usb from Windows7.


title: why we should use create and copytruncate together?

text: thegeekstuff has an example about `logrotate`. `copytruncate` will copy and truncate the original log file. Then why we should use `create`? The original log file has not been removed.               /tmp/output.log {             size 1k             copytruncate             create             compress             compresscmd /bin/bzip2             compressext .bz2             rotate 4             maxage 100     }      Another question is what is the use of `maxage 100`? The `rotate 4` directive will delete old log files after 4 rotation.


title: Why are the UIDs in Solaris so very high? Is it alright to use lower numbers?

text: I'm going to try out Solaris 11, and was wondering why the default UIDs for new users are so ridiculously high - e.g. starting at 65534 and then dropping downwards (65533, 65532, ...)? Is there a good reason for this? I know of course that such high numbers are "negative", and are commonly used for unprivileged users like the nobody-user... but these are normal privileged users. Wouldn't it be more logical to start at some much lower value (e.g. 1000) and count upwards (1001, 1002, ...)? Are there any good reason not to do this? What does more pro Solaris-administrators do when they assign UIDs to their users? Any documents/sources explaining the reason by the default numbering scheme?


title: Locked out of Linux Mint

text: I am running Linux Mint 12 with Cinnamon and sometimes when I leave my computer idle for a while, it will lock the screen. Usually, when I move the mouse a login prompt will pop up, but sometimes it doesn't. Then it's just a black screen with the time and my full name on a bar at the top of the screen. I can move the mouse, but nothing happens when I click on anything. When this happens I am forced to hard shutdown my computer, which is obviously not good. Does anyone know how to solve this?


title: Grub not installing properly with two seperate discs

text: I'm trying to set up a dual boot Windows 7/ Ubuntu 11.10 I have 3 drives Linux - sda1   Swap - sda5 Windows - sdb1 Media - sdc1 I installed Windows first so that it didn't muck up my GRUB loader. While installing GRUB, it was supposed to install to the master boot record on sda. However, after completing the installation, my computer only ever boots directly into Linux. I tried issuing a grub-install and even update-grub but grub simply never appears. Is there something special I need to do to make the grub installer aware that there is an OS on a separate disc. I've honestly never had this issue before but I think I've ever only dual booted on the same disc. Thanks in advance.


title: How to mount bzip2-ed Clonezilla image without using extra drive space?

text: My hard drive seems to be failing and I suspect some data may be already damaged, so I decided to make an entire drive backup with Clonezilla using dd. I have chosen bzip2 compression to fit entire 750 GB drive on a 500 GB one. The image is split into 4000 MB chunks. Right now I'm working off a portable drive and I don't want to put too much strain on the dying drive. I want to recover some files onto that portable drive from the Clonezilla image I've made. My idea is to mount the compressed image so I can copy required files off it. I already know how to access compressed image without extracting it first (AVFS), so I just need to mount the `dd` image. The problem is I have no extra space available, as the smaller drive is almost full (7 GB free), so `cat`-ing archive chunks together is not an option. Is there any way to `cat` archive chunks on the fly, so I can mount the image that's inside the archive? I have found this solution, but I guess AVFS will need to seek the file. Or maybe there's some simplier solution?


title: Standard workflow to digitize magazines or books using OCR while minimizing file size?

text: To scan books containing just text, black&white images and clear borders, the workflow I've been using is:   * digitize the source using a camera or just a scanner   * use `scantailor`   * finally use `djvubind` to make a small (1-7 MB) djvu-file with ocr background This works fine. However if you have magazines or books containing lots of colors in the images, structural elements, backgrounds, or images which overlap the margins of the page, using scantailor (in mixed mode) becomes very difficult, and you have to proceed manually with every single page. So, what would be a good workflow in Linux to digitize such sources and get a small _djvu_ or _pdf_ file with ocr background?


title: How can Window Managers shutdown the computer?

text: When logged in to a virtual shell as an unprivileged user and try to `shutdown`, `reboot`, `init 0` or `init 6` don't work. But if you're running a desktop environment, you can easily select its shutdown functionality. Why is that?


title: How are files opened in unix?

text: What's the internal process of opening a file? To open a file, the system converts the pathname to inode and from the inode search the corresponding driver disk portion to look for the content of the file? Is that it? I only have a vague sense of the process of opening a file, but I want more detail.


title: console (driver) not opening using any of the editor

text: In my initramfs, I have;               [root@xilinx Peta_Microzed_15_05]# ls  initramfs/dev/     console     [root@xilinx Peta_Microzed_15_05]# nano  initramfs/dev/console     [root@xilinx Peta_Microzed_15_05]#       The above nano opens an empty file. So what kind of this file `console` is if it has nothing inside it ?


title: Converting RAID partitions to LVM

text: I have a 3TB HDD. of type RAID 5. I want to convert it to LVM. How can I do this without data loss and without needing for installing the OS again?               $ df -h     Filesystem           Size  Used Avail Use% Mounted on     /dev/mapper/mpatha4   96G  3.7G   88G   5% /     devtmpfs             6.9G     0  6.9G   0% /dev     tmpfs                6.9G   80K  6.9G   1% /dev/shm     tmpfs                6.9G  908K  6.9G   1% /run     tmpfs                6.9G     0  6.9G   0% /sys/fs/cgroup     tmpfs                6.9G  8.1M  6.9G   1% /tmp     /dev/mapper/mpatha2  190M   66M  115M  37% /boot     /dev/mapper/mpatha3  289G  2.3G  272G   1% /var     /dev/mapper/mpatha6  2.3T  1.9T  381G  83% /mydata                    $ cat /proc/driver/cciss/cciss0     cciss0: HP Smart Array E200i Controller     Board ID: 0x3211103c     Firmware Version: 1.72     IRQ: 65     Logical drives: 1     Current Q depth: 0     Current # commands on controller: 0     Max Q depth since init: 1     Max # commands on controller since init: 165     Max SG entries since init: 31     Sequential access devices: 0               $ fdisk -l     Disk /dev/cciss/c0d0: 3000.5 GB, 3000513552384 bytes, 5860378032 sectors     Units = sectors of 1 * 512 = 512 bytes     Sector size (logical/physical): 512 bytes / 512 bytes     I/O size (minimum/optimal): 512 bytes / 512 bytes     Disk label type: dos     Disk identifier: 0x00000000                     Device Boot      Start         End      Blocks   Id  System     /dev/cciss/c0d0p1   *           1  4294967295  2147483647+  ee  GPT          Disk /dev/mapper/mpatha: 3000.5 GB, 3000513552384 bytes, 5860378032 sectors     Units = sectors of 1 * 512 = 512 bytes     Sector size (logical/physical): 512 bytes / 512 bytes     I/O size (minimum/optimal): 512 bytes / 512 bytes     Disk label type: dos     Disk identifier: 0x00000000                       Device Boot      Start         End      Blocks   Id  System     /dev/mapper/mpatha1   *           1  4294967295  2147483647+  ee  GPT          ....


title: Does asynchronous disk IO affect swap usage?

text: I have a server application requiring usage of huge memory but can take little time. I therefore thought it should be economical to run it with a big swap and normal ram. I was reading about serving large files from disk when I learned about asynchronous disk io and heard it is better supported in FreeBSD than Linux. My question is: Does Asynchronous Disk IO affect the performance of swap space because a swap partition will be doing lot of disk reads and writes. Is there a reason to go for FreeBSD. I have reasonable experience working on Linux(Ubuntu) and prefer using it for the application.


title: SSH publickey works for root but not user

text: > **Possible Duplicate:**   >  Why am I still getting a password prompt with ssh with public key > authentication? I'm setting up a remote server. The `sshd` is configured to use publickey only. There are two accounts on the remote machine with identical `.ssh/authorized_keys`, so that I can log in as either using the same key. One of the two is root, and when I try:               ssh -i /path/to/privatekey root@remote.server I get in, no problem. However, when I try the other (non-privelleged) user:               ssh -i /path/to/privatekey bob@remote.server It fails. `-v` reveals:               debug1: SSH2_MSG_SERVICE_REQUEST sent     debug1: SSH2_MSG_SERVICE_ACCEPT received     debug1: Authentications that can continue: publickey     debug1: Next authentication method: publickey     debug1: Offering DSA public key: /path/to/privatekey     debug1: Authentications that can continue: publickey     debug1: Trying private key: /path/to/privatekey     **debug1: key_parse_private_pem: PEM_read_PrivateKey failed**     debug1: read PEM private key done: type <unknown>     Enter passphrase for key '/path/to/privatekey':       The asterisked line does not occur with the successful root@server login. This is also strange since `ssh-agent` already has the passphrase for this key; I am not asked with the root@server login. The failed bob@server login ends:               debug1: read PEM private key done: type DSA     debug1: Authentications that can continue: publickey     debug1: No more authentication methods to try.     Permission denied (publickey).      Permissions, etc. on `/home/bob/.ssh` are correct _[but no execute bit on .ssh directory, see comments]_. This was actually a system upgrade/reinstall, and I have a backup of the previous `/etc` including the `sshd` configuration. I haven't changed anything (although when I allow password authentification, bob can get in), and this was how I was using the system before via git -- so I have a bunch of project `git remote` ids keyed to use bob@server via ssh, and don't want to have to change those because I can't get `sshd` to work the way it did previously...


title: Server does not accept public key for ssh login without password

text: > **Possible Duplicate:**   >  Why am I still getting a password prompt with ssh with public key > authentication? I have ssh access to two sever. One old one and one new one. For the old one I use the tutorial SSH login without password to login without typing the password every time. For the new machine I followed the tutorial again, but this time it is not working. I looked at the debug output from ssh (`-v` option) and it seems to me that the new server does not `accept` my public key. But I checked and bot `authorized_keys` are the same, I even used `md5sum`. What could be the problem and how could I fix this? **Debug output for old server where it does work (snippet):**               debug1: Authentications that can continue: publickey,password     debug1: Next authentication method: publickey     debug1: Offering RSA public key: /home/NICK/.ssh/id_rsa     debug1: Server accepts key: pkalg ssh-rsa blen 277      **Debug output for new server where it does not work (snippet):**               debug1: Authentications that can continue: publickey,password     debug1: Next authentication method: publickey     debug1: Offering RSA public key: /home/NICK/.ssh/id_rsa     debug1: Authentications that can continue: publickey,password     debug1: Trying private key: /home/NICK/.ssh/id_dsa      [ **UPDATE] Ownership of authorized_keys on remote**               NICK@server-new:~/.ssh$ ls -l     total 4     -rwx------ 1 NICK NICK 404 2012-08-08 16:11 authorized_keys      * * * **Complete debug output for the not working server:**               OpenSSH_5.9p1 Debian-5ubuntu1, OpenSSL 1.0.1 14 Mar 2012     debug1: Reading configuration data /home/NICK/.ssh/config     debug1: /home/NICK/.ssh/config line 1: Applying options for foo2     debug1: Reading configuration data /etc/ssh/ssh_config     debug1: /etc/ssh/ssh_config line 19: Applying options for *     debug1: Connecting to foo-serv2.cs.bar.it [XXX.XXX.XXX.XXX] port 22.     debug1: Connection established.     debug1: identity file /home/NICK/.ssh/id_rsa type 1     debug1: Checking blacklist file /usr/share/ssh/blacklist.RSA-2048     debug1: Checking blacklist file /etc/ssh/blacklist.RSA-2048     debug1: identity file /home/NICK/.ssh/id_rsa-cert type -1     debug1: identity file /home/NICK/.ssh/id_dsa type -1     debug1: identity file /home/NICK/.ssh/id_dsa-cert type -1     debug1: identity file /home/NICK/.ssh/id_ecdsa type -1     debug1: identity file /home/NICK/.ssh/id_ecdsa-cert type -1     debug1: Remote protocol version 2.0, remote software version OpenSSH_5.5p1 Debian-4ubuntu6     debug1: match: OpenSSH_5.5p1 Debian-4ubuntu6 pat OpenSSH*     debug1: Enabling compatibility mode for protocol 2.0     debug1: Local version string SSH-2.0-OpenSSH_5.9p1 Debian-5ubuntu1     debug1: SSH2_MSG_KEXINIT sent     debug1: SSH2_MSG_KEXINIT received     debug1: kex: server->client aes128-ctr hmac-md5 none     debug1: kex: client->server aes128-ctr hmac-md5 none     debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent     debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP     debug1: SSH2_MSG_KEX_DH_GEX_INIT sent     debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY     debug1: Server host key: RSA XXX     debug1: Host 'foo-serv2.cs.bar.it' is known and matches the RSA host key.     debug1: Found key in /home/NICK/.ssh/known_hosts:34     debug1: ssh_rsa_verify: signature correct     debug1: SSH2_MSG_NEWKEYS sent     debug1: expecting SSH2_MSG_NEWKEYS     debug1: SSH2_MSG_NEWKEYS received     debug1: Roaming not allowed by server     debug1: SSH2_MSG_SERVICE_REQUEST sent     debug1: SSH2_MSG_SERVICE_ACCEPT received     debug1: Authentications that can continue: publickey,password     debug1: Next authentication method: publickey     debug1: Offering RSA public key: /home/NICK/.ssh/id_rsa     debug1: Authentications that can continue: publickey,password     debug1: Trying private key: /home/NICK/.ssh/id_dsa     debug1: Trying private key: /home/NICK/.ssh/id_ecdsa     debug1: Next authentication method: password


title: SSH Key not working

text: I created an SSH key on my laptop using `ssh-keygen` and then put it on some production servers so that I don' have to type my password every time. On some servers it is working well, but on some it's still asking for my password. Why is that? Even though the `.ssh/*` permissions are for the users. PubkeyAuth is set to Yes:               RSAAuthentication yes     PubkeyAuthentication yes     AuthorizedKeysFile      .ssh/authorized_keys      ssh -vv output:               OpenSSH_5.9p1 Debian-5ubuntu1.1, OpenSSL 1.0.1 14 Mar 2012     debug1: Reading configuration data /etc/ssh/ssh_config     debug1: /etc/ssh/ssh_config line 19: Applying options for *     debug2: ssh_connect: needpriv 0     debug1: Connecting to xxx.xxx.xxx.xxx [xxx.xxx.xxx.xxx] port 22.     debug1: Connection established.     debug1: identity file /home/omipenguin/.ssh/id_rsa type 1     debug1: Checking blacklist file /usr/share/ssh/blacklist.RSA-2048     debug1: Checking blacklist file /etc/ssh/blacklist.RSA-2048     debug1: identity file /home/omipenguin/.ssh/id_rsa-cert type -1     debug1: identity file /home/omipenguin/.ssh/id_dsa type -1     debug1: identity file /home/omipenguin/.ssh/id_dsa-cert type -1     debug1: identity file /home/omipenguin/.ssh/id_ecdsa type -1     debug1: identity file /home/omipenguin/.ssh/id_ecdsa-cert type -1     debug1: Remote protocol version 2.0, remote software version OpenSSH_4.3     debug1: match: OpenSSH_4.3 pat OpenSSH_4*     debug1: Enabling compatibility mode for protocol 2.0     debug1: Local version string SSH-2.0-OpenSSH_5.9p1 Debian-5ubuntu1.1     debug2: fd 3 setting O_NONBLOCK     debug1: SSH2_MSG_KEXINIT sent     debug1: SSH2_MSG_KEXINIT received     debug2: kex_parse_kexinit: ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1     debug2: kex_parse_kexinit: ssh-rsa-cert-v01@openssh.com,ssh-rsa-cert-v00@openssh.com,ssh-rsa,ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ssh-dss-cert-v01@openssh.com,ssh-dss-cert-v00@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-dss     debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se     debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se     debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-sha2-256,hmac-sha2-256-96,hmac-sha2-512,hmac-sha2-512-96,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96     debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-sha2-256,hmac-sha2-256-96,hmac-sha2-512,hmac-sha2-512-96,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96     debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib     debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib     debug2: kex_parse_kexinit:      debug2: kex_parse_kexinit:      debug2: kex_parse_kexinit: first_kex_follows 0      debug2: kex_parse_kexinit: reserved 0      debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1     debug2: kex_parse_kexinit: ssh-rsa,ssh-dss     debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr     debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr     debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96     debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96     debug2: kex_parse_kexinit: none,zlib@openssh.com     debug2: kex_parse_kexinit: none,zlib@openssh.com     debug2: kex_parse_kexinit:      debug2: kex_parse_kexinit:      debug2: kex_parse_kexinit: first_kex_follows 0      debug2: kex_parse_kexinit: reserved 0      debug2: mac_setup: found hmac-md5     debug1: kex: server->client aes128-ctr hmac-md5 none     debug2: mac_setup: found hmac-md5     debug1: kex: client->server aes128-ctr hmac-md5 none     debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent     debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP     debug2: dh_gen_key: priv key bits set: 121/256     debug2: bits set: 527/1024     debug1: SSH2_MSG_KEX_DH_GEX_INIT sent     debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY     debug1: Server host key: RSA d2:5c:eb:cf:9a:55:85:ce:a1:00:71:c8:92:bb:25:fb     debug1: Host 'xxx.xxx.xxx.xxx' is known and matches the RSA host key.     debug1: Found key in /home/omipenguin/.ssh/known_hosts:14     debug2: bits set: 540/1024     debug1: ssh_rsa_verify: signature correct     debug2: kex_derive_keys     debug2: set_newkeys: mode 1     debug1: SSH2_MSG_NEWKEYS sent     debug1: expecting SSH2_MSG_NEWKEYS     debug2: set_newkeys: mode 0     debug1: SSH2_MSG_NEWKEYS received     debug1: Roaming not allowed by server     debug1: SSH2_MSG_SERVICE_REQUEST sent     debug2: service_accept: ssh-userauth     debug1: SSH2_MSG_SERVICE_ACCEPT received     debug2: key: /home/omipenguin/.ssh/id_rsa (0x7fe924a9f3f0)     debug2: key: /home/omipenguin/.ssh/id_dsa ((nil))     debug2: key: /home/omipenguin/.ssh/id_ecdsa ((nil))     debug1: Authentications that can continue: publickey,password     debug1: Next authentication method: publickey     debug1: Offering RSA public key: /home/omipenguin/.ssh/id_rsa     debug2: we sent a publickey packet, wait for reply     debug1: Authentications that can continue: publickey,password     debug1: Trying private key: /home/omipenguin/.ssh/id_dsa     debug1: Trying private key: /home/omipenguin/.ssh/id_ecdsa     debug2: we did not send a packet, disable method     debug1: Next authentication method: password      File and directory permissions:               drwxrwxr-x 2 emerg wheel 4096 Apr 10 11:51 .ssh/     -rw-r--r-- 1 emerg emerg 403 Apr 10 11:51 .ssh/authorized_keys


title: ssh key doesn't work for one server but works for another

text: debug ssh works > Authentications that can continue: publickey               debug1: Next authentication method: publickey     debug1: Offering public key: /home/vinatia/.ssh/id_rsa     debug1: Server accepts key: pkalg ssh-rsa blen 277     debug1: Authentication succeeded (publickey).     debug1: channel 0: new [client-session]     debug1: Requesting no-more-sessions@openssh.com     debug1: Entering interactive session.      debug ssh doesn't work               debug1: Authentications that can continue: publickey     debug1: Next authentication method: publickey     debug1: Offering public key: /home/vinatia/.ssh/id_rsa     debug1: Authentications that can continue: publickey     debug1: No more authentication methods to try.


title: Invoking cp from within BASH and using the -u option

text: Is there a way to have `cp`'s `\--update` option print files that did not copy because the source directory contained a newer version of the file?


title: Unabled to get rid of BIND 9 chroot

text: I had installed bind-chroot from yum not long ago, and saw that there were errors in the daily logs from named. Under further investigation, I noticed a directory loop. The named files resided under **/var/named** , with the chroot being in **/var/named/chroot**. For whatever reason, **/var/named/chroot/var/named** just leads back to **/var/named**. ls -al doesn't show any link between the directories. **OS:** CentOS 6.2 **uname -a:**               Linux plutonium 2.6.32-220.7.1.el6.x86_64 #1 SMP Wed Mar 7 00:52:02 GMT 2012 x86_64 x86_64      x86_64 GNU/Linux      I'm not really the most linux savvy, so I don't really know what more information I can provide you all with. Please let me know if there is some other piece of information I can give you that would be helpful.


title: How can I expand a relative path at the command line, with tab completion?

text: In `bash` is there any way to expand a relative path into an absolute path, perhaps with tab completion? I ask because sometimes I will search for a file, find it, then `vim` it:               cd /etc     cd apache2     cd sites-available     vim 000-default      Then I will do some other things and change directories:               cd /tmp     ls     cd ~     ls      Then I'll find that I need to edit the same file again, but it is not possible to use `history`, (or history search), because the file path is relative. **Current Workaround** If I know I'm going to be reusing a file a lot, after I find it I will grab the full path using something like `realpath`:               $ realpath 000-default     /etc/apache2/sites-available/000-default     (copy and paste path into next command:)     $ vi /etc/apache2/sites-available/000-default      **Caveats** This still requires copying and pasting. I believe there should be an easier way to get a file's full path into my history. What options do I have? I believe that I have (accidentally) pressed some key combination before that expanded a relative path into a full path. I know in bash you can type:               cd /etc     ls bash_*(control+x *)      and get:               ls bash.bashrc bash_completion bash_completion.d      So is there a way I can expand a relative path into an absolute path, so that I can save operations on a file in my history with that file's full path?


title: IPCop v2.0.3 Install via USB

text: I have a SFF (Small Form Factor) PC that I am attempting to install IPCop v2.0.3 onto for use as a firewall in my home network. As it is SFF (Mini-ITX) it did not come with a disk drive and I do not have an external one. I attempted to install via a USB stick, however when I boot up the computer it goes through initial startup and then boots to the SSD to a black screen saying "NO OS Found". I am trying to install IPCop onto a Jetway NF9D-2700 Dual LAN Intel Atom D2700 2.13GHz mini-itx based computer, onto a Crucial 64GB SSD. I used a method by Nicholas Overstreet, and basically used dd for windows to install the IPCop image onto a USB drive. I have tried this with both the ipcop-2.0.3-install-usb-hdd.i486.img and ipcop-2.0.3-install-usb-fdd.i486.img, but neither worked. Does anyone know if there is any problem with this hardware recognizing the IPCop install via USB? Or have any other helpful hints? I went to BIOS and set the boot priority to the USB drive prior to attempting the install, but it didn't help.


title: configure dhcp client without accepting nameserver entries

text: I am trying to configre my openSuSE 12.1 machine as DHCP client, but especially do not want it to set the name server entries to `/etc/resolv.conf` it has got from DHCP server. Can I do it on the client site without manually deleting the entries afterwards? On windows machines this is possible due to the setting > (   ) Obtain DNS server address automatically > > (O) User the following DNS server addresses: and then just leave the fields for Preferred and Alternate DNS server blank.


title: Enable BFQ in Fedora

text: I am running Fedora with the stock kernel and I'd like to enable the BFQ disk I/O scheduler, and ideally BFS. I have built my own kernel and that works, though it is a royal pain dealing with the Nvidia drivers. Can I enable BFQ and BFS without building my own kernel, such as by adding kernel args to grub? If not, is there a kernel package available that supports this?


title: Changing the timestamp of a symlink

text: I know how to change the timestamp of a regular file:               touch -t 201301291810 myfile.txt      I was not able to do the same with a symlink. Is it possible? Distro: RHEL 5.8


title: Why does this add spaces? echo "x ax" | sed 's/x\s*/x /'

text: I want to find a `x`, and replace the 0 or more following spaces (`\s*`) with just a single space.               echo "x ax" | sed 's/x\s*/x /'      For some reason, instead of replacing the spaces with the single space, it just appends one space to however many existed there before:               x  ax      The use of `+` instead of `*` appears to absolutely nothing, regardless of my use of the `-E` flag. It appears that `sed` doesn't do non-greedy expressions, so why doesn't this `*` consume all of the spaces when matching? I'm a regex ninja in non-bash settings, but bash and its tools eat me alive. I've got no idea how to concisely phrase this for a successful search engine query.


title: iptables blocking from internet side on eth1?

text: How to use iptables to deal with two Ethernet ports? eth0 port for LAN use (192.168.1.50 Private IP). eth1 port is connected to the internet via cable modem (80.0.xxx.xxx public IP). `ifconfig` outout:               eth0      Link encap:Ethernet  HWaddr 00:19:99:C1:86:BB               inet addr:192.168.1.50  Bcast:192.168.1.255  Mask:255.255.255.0               UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1               RX packets:137532 errors:0 dropped:0 overruns:0 frame:0               TX packets:55658 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:1000               RX bytes:99968969 (95.3 MiB)  TX bytes:10403525 (9.9 MiB)               Interrupt:50 Memory:fe700000-fe720000          eth1      Link encap:Ethernet  HWaddr 00:19:99:C1:61:3B               inet addr:80.0.xxx.xxx  Bcast:255.255.255.255  Mask:255.255.252.0               UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1               RX packets:144558 errors:0 dropped:0 overruns:0 frame:0               TX packets:70347 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:1000               RX bytes:34500131 (32.9 MiB)  TX bytes:27893843 (26.6 MiB)               Interrupt:177 Memory:fe600000-fe620000      How to use iptables to block all the incoming route to `eth1` but only allow port 22. So that on Internet side can't access to our web server, ftp server, etc. Only allow port 22 for SSH access. Ping should also work too. On the local network (`eth0`), there are over 70 client PC's - They should be able to access anything on the server but just block internal local ip's 192.168.1.20 and 192.168.1.30 from accessing to 192.168.1.50 (private ip) server. How can it be done using iptables?


title: /usr/bin/X :0 -audit process

text: Hello I am trying to solve some internet problems that I have. It is a university computer and I do not have root access. I want to understand what is this processor, that root has started, and if you think it can be related to my slow internet connection. ![enter image description here](http://i.stack.imgur.com/0oni6.png)


title: Is there any useful purpose for directories with permissions -w-?

text: Being aware of this answer I wonder whether there is any useful purpose for write-only directories, i.e. directories with permissions `-w-`. Any directory-"writing" operation I know of (such as `creat`, `mkdir`, `link`, `unlink`, `symlink`, `rename`) fails with permissions `-w-` but works perfectly with permissions `-wx`.


title: Clonezilla Backup software freezes on boot

text: I can get as far as the GRUB menu. After that using any of the menu options I get a gray screen saying "Loading please wait..." and a blinking cursor. The cursor disappears after about 1 second and everything freezes up.


title: Is there a reason why ls does not have a --zero or -0 option

text: This question was prompted by questions about `ls`' `-1` option and the recurring tendency of people to ask question and answers that includes processing the output of `ls`. This reuse of the output `ls` seems understandable, e.g.: if you know how to sort a list of files with `ls` you might want to use the output in that way as input for something else. If those Q&A don't include a reference to the file name list produced consisting of nicely behaving file names (no special characters like spaces and newlines), they are often commented upon by someone pointing out the danger of the command sequence not working when there are files with newlines, spaces etc. `find`, `sort` and other utilities solve the problem of communicating "difficult" file names to e.g. `xargs` by using an option to separate the file names with the NUL character/byte which is not a valid character in file name (the only one in addition to `/`?) on Unix/Linux filesystems. I looked to the man page for `ls` and the output for `ls --help` (which has more options listed) and could not find that ls (from the coreutils) has an option to specify NUL seperated output. It does have a `-1` option which can be interpreted as "output file names separated by newline") **Q** : Is there are technical or philosophical reason why `ls` does not have a `\--zero` or `-0` option that would "output file names separated by NUL"? If you do something that only outputs the file names (and not use e.g. `-l`) that could make sense:               ls -rt -0 | xargs -r0 ...      I could be missing something why this would not work, or is there an alternative for this example that I overlooked _and that is not much more complicated and/or obscure_. * * * Addendum: Doing `ls -lrt -0` probably does not make much sense, but in the same way that `find . -ls -print0` does not, so that is not a reason to not provide a `-0`/`-z`/`\--zero` option.


title: ArchBang dual boot with Windows: HowTo

text: I have been reading up on ArchBang, and I am quite interested to try it. My netbook does not have a CD/DVD drive, so I created USB installation stick using numerous Windows tools, like LiLi, and Linux tools, like UNetBootIn. However, I never seem to succeed to the end! In the 3rd step, i.e. copying the files, I am getting endless input/output failure messages, and then my system freezes. I tried from USB to USB, and from USB to netbook HDD, and it happens in both cases and installation never ultimately succeeds. I want it as dual boot with Windows. On my netbook, I tried it that way, by setting partitions manually lest ArchBang deletes everything. On the USB stick, I tried installing ArchBang standalone. But those input/output failures never leave me! Please help! Thanks in advance.


title: Add character to beginning and end of column

text: I have a file like this:               78@54@this@15@23     65@22@is@92@16     34@12@an@14@18     13@42@example@52@22      And I want to change it to this:               "78"@54@"this"@15@23     "65"@22@"is"@92@16     "34"@12@"an"@14@18     "13"@42@"example"@52@22      I've been struggling on this for a long time and I can't understand how to do it. Any help is appreciated, thank you.


title: Mumble doesn't bind to network address on boot, needs to be restarted (doesn't properly wait for network?)

text: I have a default, unchanged installation of the Mumble server on Debian Squeeze (package "mumble-server"). On a previous setup, starting the server (called murmurd) on boot using the default init scripts worked fine. On a new setup, that seems to me to be identical in every way, murmurd doesn't seem to bind to a network address on boot. No clients can thus connect until I restart the process after booting. The logs are quite telling. On boot:               <W>2012-03-25 00:15:01.543 Murmur 1.2.2 (1.2.2-6+squeeze1) running on     X11: Debian GNU/Linux 6.0.4 (squeeze): Booting servers <W>2012-03-25     00:15:01.617 1 => Announcing server via bonjour <W>2012-03-25     00:15:01.650 1 => Not registering server as public      and no clients can connect. Using `service mumble-server restart` after boot, however, gives:               <W>2012-03-25 00:22:27.529 Murmur 1.2.2 (1.2.2-6+squeeze1) running on     X11: Debian GNU/Linux 6.0.4 (squeeze): Booting servers <W>2012-03-25     00:22:27.549 1 => Server listening on [::]:64738 <W>2012-03-25     00:22:27.559 1 => Announcing server via bonjour <W>2012-03-25     00:22:27.570 1 => Not registering server as public      Notice the third line. It thus seems to me that the init script tries to start the daemon before the network is up and running. The `/etc/rc2.d/S19mumble- server` script that comes with the package says, though:               # Required-Start:       $network $local_fs $remote_fs dbus      The exact same setup works fine on a different machine (also running Debian Squeeze), so I'm beginning to suspect it has something to do with timing on boot, or some other nondeterministic factor. Ideas?


title: Moving /boot to new partition produces: file '/boot/grub/i386-pc/normal.mod' not found

text: I'm attempting to move my `/boot` folder from the `/` partition, to `/dev/sdb`. The following script:               parted -s /dev/sdb mklabel msdos mkpart primary ext2 1M 100% set 1 boot on     mkfs.ext2 /dev/sdb1     mkdir /mnt/boot     mount /dev/sdb1 /mnt/boot     cd /boot     find . -depth -print0 | \         cpio --null --sparse --make-directories --pass-through --verbose /mnt/boot     cd /     umount /mnt/boot     mv /boot /boot.orig     mkdir /boot     echo "/dev/sdb1 /boot ext2 ro 0 2" >>/etc/fstab     mount /dev/sdb1 /boot     parted /dev/sda set 1 boot off     grub-install /dev/sdb     update-grub     reboot      produces this error:               error: file '/boot/grub/i386-pc/normal.mod' not found.     grub rescue>      Any ideas? **Edit** : It appears that the above script works fine, if the original `/boot` directory is on a separate partition (say `/dev/sda2`). It only fails if it's on the same partition as the `/` partition (`/dev/sda1`). I've tried many, many variations of the above script, on both Ubuntu 13.04 and Fedora 19, and have yet to avoid the `file '/boot/grub/i386-pc/normal.mod' not found` error. Any other ideas?


title: Reading grep patterns from a file

text: I have a couple of big text files and in the file `UNIQS.txt` I have a list of strings to `grep` from another file. The code I use is               grep -f UNIQS.txt EEP_VSL.uniqs.sam > UNIQ_templates.sam      which does nothing - the file generated is empty. But when I do               grep -F -f UNIQS.txt EEP_VSL.uniqs.sam > UNIQ_templates.sam      it works correctly. This confuses me because I didn't think `grep` would interpret the entries in `UNIQS.txt` as `regexp` patterns without quotes and slashes and so on being in the file (which there aren't). Is it the case in general that if you are getting the patterns from a file then it will automatically think that they are `regexp` patterns? **Edit:** In the `UNIQS.txt` file, there are newline separated strings of the form               HWI-ST365:215:D0GH0ACXX:2:1101:10034:186783      (called template names) and the file `EEP_VSL...` tab separated columns, with about 14 columns and the first column is the template name, so basically I want to extract the line corresponding to each template in the file.


title: Accept any private key for authentication

text: Is it possible to configure OpenSSH (or any other standard sshd) to accept any key offered by a connecting client? EG `ssh -i ~/arbitraryKey hostname` grants a login shell while `ssh hostanme` doesn't. I ask because of a half remembered anecdote about a misconfigured server but I've had a look and I couldn't find anything that would actually let this happen without some form of deliberate hacking of the daemon. (Recompiling etc)


title: upgrade Python to 2.7.2

text: I have an embedded system running on `Python 2.6.5` and i want it to upgrade to `2.7.2` (I have a running system with different kernel that runs `2.7.2`). I have copied the binary but then it told me: `python: can't load library 'libpython2.7.so.1.0'` when i tried to launch it - fine, i grabbed and copied that as well and now I get:               # python     Could not find platform independent libraries <prefix>     Could not find platform dependent libraries <exec_prefix>     Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]     Segmentation fault      How can I get this system upgraded to `Python 2.7.2` while keeping the old, original kernel — I only want to update Python, not the whole image — possible?


title: How to start teamspeak 3 on boot, ubuntu server 12.04

text: So I'm quite new to linux but I'm starting to understand it. I have a Ubuntu Server 12.04 system, fresh install, and I installed a teamspeak 3 server on it:               $ sudo useradd teamspeak     (provided user info and password)     $ su teamspeak     (entered password)     $ cd /home/teamspeak     $ wget http://ftp.4players.de/pub/hosted/ts3/releases/3.0.10.3/teamspeak3-server_linux-amd64-3.0.10.3.tar.gz     (download teamspeak.tar.gz)     $ tar -zxvf teamspeak3-server_linux-amd64-3.0.10.3.tar.gz     (unpacked the file to teamspeak3-server_linux-amd64)     $ mv teamspeak3-server_linux-amd64 server     (server is no located in /home/teamspeak/server)     $ cd ./server     $ ./ts3server_minimal_runscript.sh createinifile=1     (initialized the server)     $ ./ts3server_startscript.sh start     (started the server)      Now when I reboot my server (e.g. `$ sudo reboot`) the server doesn't start up. Obviously because I haven't configured anything in `/etc/init.d` but I have no idea how to do this. I want the server to start like it does with the `/home/teamspeak/server/ts3server_startscript.sh start` script, ran by the user `teamspeak`. I followed several guides but they didn't work. Can someone help me?