title: Cannot connect to wired ethernet after hibernate

text: When I am at home I use wired connection on my laptop and it works fine. Then I put it to hibernate with `sudo pm-hibernate` and start it up again when I am work. I am not able to connect to internet without a reboot of the machine. I have tried:                ifconfig eth0 down      ifconfig eth0 up      But it does not help. Also:                dhclient eth0      This took a long time to run and when finished still no success. Found this in `/var/log/syslog`:               Jul 15 08:22:38 frank dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7 (xid=0x4183b95d)     Jul 15 08:22:45 frank dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 8 (xid=0x4183b95d)     Jul 15 08:22:53 frank dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 10 (xid=0x4183b95d)     Jul 15 08:23:03 frank dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 15 (xid=0x4183b95d)     Jul 15 08:23:18 frank dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 11 (xid=0x4183b95d)     Jul 15 08:23:29 frank dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 16 (xid=0x4183b95d)     Jul 15 08:25:33 frank avahi-autoipd(eth0)[5647]: Callout STOP, address 167.198.2.6 on interface eth0     Jul 15 08:25:33 frank avahi-autoipd(eth0)[5648]: client: RTNETLINK answers: No such process     Jul 15 08:25:33 frank avahi-autoipd(eth0)[5648]: client: RTNETLINK answers: Cannot assign requested address     Jul 15 08:25:33 frank avahi-autoipd(eth0)[5648]: Script execution failed with return value 2     Jul 15 08:26:59 frank NetworkManager[949]: <info> (eth0): IP6 addrconf timed out or failed.     Jul 15 08:26:59 frank NetworkManager[949]: <info> Activation (eth0) Stage 4 of 5 (IPv6 Configure Timeout) scheduled...     Jul 15 08:26:59 frank NetworkManager[949]: <info> Activation (eth0) Stage 4 of 5 (IPv6 Configure Timeout) started...     Jul 15 08:26:59 frank NetworkManager[949]: <info> Activation (eth0) Stage 4 of 5 (IPv6 Configure Timeout) complete.      Exact same thing happens when I put the laptop to hibernate at work and start it up again at home. Anyone got a clue to why I have to reboot to make wired connection work after hibernate? I am using `Mint 17` with the latest updates.


title: Can we add ports to OVS AFTER the VM is created?

text: I wanted to write up a program where I can create VMs first using libvirt. Initially they would not be added to any network. Then I want them to be attached to an OVS bridge where I can specify the name of the virtual interface. I have seen that openstack does something similar. Is it possible to do so using libvirt and ovs commands?


title: Why TCP TIME-WAIT State is present at both ends after a connection termination?

text: I am reading how the TCP states work and especially the connection termination part. All of the books or online material I read, shows that for the termination procedure these states are followed from the side initiated (active) the connection termination: **ESTABLISHED, FIN-WAIT-1, FIN-WAIT-2, TIME-WAIT, CLOSED** And these from the receiving (passive) side: **ESTABLISHED, CLOSE-WAIT, LAST-ACK, CLOSED** Now here comes the question: I have modprobed the nf_conntrack_ipv4 module to both sides to check the connection states in /proc/net/ip_conntrack. To my surprise, when the connection is terminated, both the initiator (active) and the receiver (passive) goes to the TIME-WAIT state. I would expect only the initiator to go through this state, and the receiver just close the connection. Can someone explain why this is happening? UPDATE: How do I perform this test I have a virtual machine with IP 10.0.0.1 (Ubuntu 12.04) and I start two ssh connections to 10.0.0.2 (Debian 6) from it (10.0.0.2 is a VM as well). I check the ip_conntrack of both ends and this is what I get.               root@machine1:~# cat /proc/net/ip_conntrack | grep 10.0.0.1     tcp      6 431997 ESTABLISHED src=10.0.0.1 dst=10.0.0.2 sport=53925 dport=22 src=10.0.0.2 dst=10.0.0.1 sport=22 dport=53925 [ASSURED] mark=0 use=2     tcp      6 431944 ESTABLISHED src=10.0.0.1 dst=10.0.0.2 sport=53924 dport=22 src=10.0.0.2 dst=10.0.0.1 sport=22 dport=53924 [ASSURED] mark=0 use=2          root@machine2:~# cat /proc/net/ip_conntrack | grep 10.0.0.1     tcp      6 432000 ESTABLISHED src=10.0.0.1 dst=10.0.0.2 sport=53925 dport=22 packets=206 bytes=19191 src=10.0.0.2 dst=10.0.0.1 sport=22 dport=53925 packets=130 bytes=18177 [ASSURED] mark=0 secmark=0 use=2     tcp      6 431947 ESTABLISHED src=10.0.0.1 dst=10.0.0.2 sport=53924 dport=22 packets=16 bytes=4031 src=10.0.0.2 dst=10.0.0.1 sport=22 dport=53924 packets=17 bytes=3741 [ASSURED] mark=0 secmark=0 use=2      So far everything looks fine. Now I disconnect one of the ssh connections from machine2 and this is what I get:               root@machine1:~# cat /proc/net/ip_conntrack | grep 10.0.0.1     tcp      6 431989 ESTABLISHED src=10.0.0.1 dst=10.0.0.2 sport=53925 dport=22 src=10.0.0.2 dst=10.0.0.1 sport=22 dport=53925 [ASSURED] mark=0 use=2     tcp      6 117 TIME_WAIT src=10.0.0.1 dst=10.0.0.2 sport=53924 dport=22 src=10.0.0.2 dst=10.0.0.1 sport=22 dport=53924 [ASSURED] mark=0 use=2          root@machine2:~# cat /proc/net/ip_conntrack | grep 10.0.0.1     tcp      6 432000 ESTABLISHED src=10.0.0.1 dst=10.0.0.2 sport=53925 dport=22 packets=211 bytes=19547 src=10.0.0.2 dst=10.0.0.1 sport=22 dport=53925 packets=133 bytes=18925 [ASSURED] mark=0 secmark=0 use=2     tcp      6 115 TIME_WAIT src=10.0.0.1 dst=10.0.0.2 sport=53924 dport=22 packets=31 bytes=5147 src=10.0.0.2 dst=10.0.0.1 sport=22 dport=53924 packets=25 bytes=4589 [ASSURED] mark=0 secmark=0 use=2


title: Why do my sshd logs show many trys on invalid ports?

text: My ssh daemon is setup to listen on port 2221. I have also disabled root login from ssh. I don't understand why in auth.log I have attempts to log on other ports (example with 4627 here).               May 17 15:36:04 srv01 sshd[21682]: PAM service(sshd) ignoring max retries; 6 > 3     May 17 15:36:08 srv01 sshd[21706]: User root from 218.10.19.134 not allowed because none of user's groups are listed in AllowGroups     May 17 15:36:08 srv01 sshd[21706]: input_userauth_request: invalid user root [preauth]     May 17 15:36:10 srv01 sshd[21706]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=218.10.19.134  user=root     May 17 15:36:12 srv01 sshd[21706]: Failed password for invalid user root from 218.10.19.134 port 4627 ssh2     May 17 15:36:15 srv01 sshd[21706]: Failed password for invalid user root from 218.10.19.134 port 4627 ssh2     May 17 15:36:17 srv01 sshd[21706]: Failed password for invalid user root from 218.10.19.134 port 4627 ssh2     May 17 15:36:19 srv01 sshd[21706]: Failed password for invalid user root from 218.10.19.134 port 4627 ssh2     May 17 15:36:24 srv01 sshd[21706]: Failed password for invalid user root from 218.10.19.134 port 4627 ssh2     May 17 15:36:27 srv01 sshd[21706]: Failed password for invalid user root from 218.10.19.134 port 4627 ssh2     May 17 15:36:27 srv01 sshd[21706]: Disconnecting: Too many authentication failures for root [preauth]      SSHD is supposed not to take into account these trys. Why logs say user/password is not matching whereas it shouldn't receive the request (wrong port) ? Am I missing something ?


title: How to enable on access scanning and the like in Debian Squeeze?

text: I am using Debian squeeze. I want to enable on access scanning and scanning of downloaded files and all options which are employed by a proprietary virus scanner for Windows on Linux. I am using Debain 6. How to do it? I am given clamfs dazuko (clamuko) avfs as options. But I can't find the steps to enable it.


title: Diagnose unplanned shutdowns

text: I have a problem with a server that is shutting down for some unknown reason. I check the logs each time it happens and cannot find anything of particular interest which would suggest why its going down. Can anyone suggest anything I should do to help diagnose the problem?


title: Send update ping to ping services in Terminal?

text: I want to send ping from `http://www.mysite.com/rss.xml` to `http://rpc.pingomatic.com` Is there any way using terminal to achieve this?


title: pptp differs between 3.7 and 3.8 linux kernel milestone with 3.2.0-4 milestone

text: Unfortunately, current kernel of `debian` has problem with my hardware: `3.2.0-4-686-pae` , and when i compile one of 3.7.x milestone or 3.8.1 itself , my problem is solved. **But my problem with new kernel:** I'm forced to use VPN connection for more hours. (6 7 hours) But when i connect with vpn , after a few second i disconnect. **NOTE:** i didn't have any problem with old kernel : `3.2.0-4-686-pae` **Question:** How can i solve it? **NOTE:** all of vpn driver are compiled.


title: How to detect particular system call called or not in a whole workflow?

text: **EDIT No. 1** **My task is mirroring , i.e., copying updated data from master server to all mirrors, by using rsync and rsh. But during rsync and rsh, I found some delay. My thinking is , the reason for delay is reverse DNS lookup. So I want to make log for time consumed in reverse dns lookup process, when master server connects with mirror server.** In my application I want to detect reverse DNS lookup system call called or not. So, for that which command helps ? For reverse DNS Lookup , system call is getnameinfo(),. if you any other , tell me. I just want to trace only this system call in my project. Which command can I use? I know ltrace/strace command to trace all system call called till script exits, but that makes extra overhead, because all system call trace is not of use in my project. I want to make log for time consumed in reverse dns lookup during rsync and rsh. Help me in my problem.


title: Extracting lines around keys from a file

text: I have a large file with around 15 million lines. The odd lines contains the keys (but not only the keys) and the even lines are the data. That is, the file is something like:               WRTZ Tyrosine     1287998798     ASDF Proline     9408654860     TYSR Serine     9809804090     ASDF Cytosine     4950409808      The keys here are `ASDF`, `TYSR`, and `WRTZ`. I have a list of around 100000 keys. I want to extract the data (both lines) corresponding to these keys. One approach I tried was to `grep` the lines containing the keys to get the line numbers and then extract the line and the next line using `head` and `tail` in a loop. However, this seems to take a long time to run. Is there a more efficient way to do this?


title: How is yum atomicity ensured?

text: The installers do change a lot of system files. System may become unbootable if something fails during the software updates. Yet, it is almost impossible to ensure atomicity of even simple single file write operations. How is all of that is resolved in unix installers? Are they file-system dependent?


title: How can I move a directory onto an existing directory?

text: I need to essentially merge changes on two trees, applying the changes from branch 2 to branch 1. I have trees like this:               media     ├── cd     │   ├── 0     │   │   ├── file1     │   │   ├── file2     │   │   └── file3     │   ├── 1     │   │   ├── file1     │   │   ├── file2     │   │   └── file3     │   └── 2     │       ├── file1     │       ├── file2     │       └── file3     ├── dvd     │   ├── 0     │   │   ├── file1     │   │   ├── file2     │   │   └── file3     │   ├── 1     │   │   ├── file1     │   │   ├── file2     │   │   └── file3     │   └── 2     │       ├── file1     │       ├── file2     │       └── file3     └── stuff         ├── 0         │   ├── file1         │   ├── file2         │   └── file3         ├── 1         │   ├── file1         │   ├── file2         │   └── file3         └── 2             ├── file1             ├── file2             └── file3      I've changed the files in my branch 2, and I need to apply them to branch 1. If I just try moving them over branch 1, I get the following errors:               mv: cannot move `/branch2/media/cd' to `/branch1/media/cd': Directory not empty.      Is there another command I should be using for this? `mv -f` doesn't seem to do the trick.


title: Check bash/shell script dependencies

text: Is there a method/command to check for the dependencies of a bash script? In other words, a response to this question : Which libraries should a user install to run the script? I can do this manually by reading the script and check what other libraries/commands it calls but this not evident for long scripts.


title: Installing GRUB in a dual-boot

text: I've just installed my OSes on a new HDD: Windows 7 and Debian 7. As usual I first installed Windows, then Debian. At the first attempt, GRUB seems to not have been installed properly, because my computer would just boot into Windows. I found this on debian.org, so I followed its advice: > When there is more than one disk available during installation (for example > one hard disk and one USB stick, as it is commonly the case when booting the > installer from a USB stick), grub-install may run into problems: it was > reported several times, that the GRUB bootloader was installed onto the USB > stick instead of the hard disk containing the newly-installed system. > > To avoid running into this, make sure to answer "No" when the following > question is asked during the installation process: "Install the GRUB boot > loader to the master boot record?"; it should be possible to specify the > right device at the next step: "Device for boot loader installation". After I did this, GRUB would show up on boot, but when I selected Windows, the screen would go black and immediately pop back to the GRUB menu. I installed GRUB into the first partition, as that was the one with the boot flag. My partitions are as follows:   1. 100MB System Reserved   2. 195GB Windows   3. 2GB Swap   4. 40GB Linux I managed to fix the MBR with the Windows CD afterwards, but of course, now Debian is unavailable. Should I have installed GRUB somewhere else, or is it a different problem ?


title: How to change the flag pictures XFCE Keyboard Layouts applet uses for its indication?

text: XFCE Keyboard Layouts panel applet offers to use either textual or graphical indications. But the font used for textual indication is too small and the flag icons used for graphical are too blowzy. How can I set up another flags set?


title: How to get information from sshd about established remote tunnels

text: I have a server running on which from many different places people log on via ssh and open remote ssh-tunnels to other places behind different firewalls. Now I want to try to get an overview, which LISTEN-port connects to which connected ssh-session with an opened remote tunnel. I have no access to the client ssh-computers. e.g. the LISTEN-ports on the server               $ lsof -i4 -sTCP:LISTEN     sshd     5543   usera    9u  IPv4 97603715      0t0  TCP *:8888 (LISTEN)     sshd     5543   userb   11u  IPv4 97603719      0t0  TCP *:3060 (LISTEN)     sshd     5543   userc   13u  IPv4 97603723      0t0  TCP *:8889 (LISTEN)      How can I find out, which LISTEN port connects to the established ssh- connections given by:               $ lsof -i TCP:22 -a -u root     sshd     5546 root    3u  IPv4 97603798      0t0  TCP server:ssh->client1:42896 (ESTABLISHED)     sshd    11846 root    3u  IPv4 97193507      0t0  TCP server:ssh->client2:51586 (ESTABLISHED)     sshd    11847 root    3u  IPv4 97193512      0t0  TCP server:ssh->client3:51588 (ESTABLISHED)      I know that they are related, but I can not make the mapping of ssh-connection (lower output) to LISTEN ports. The sshd-process knows this but how can I get this information from him? Any help would be appreciated. Thanks!


title: What does `chown root.root $file` mean?

text: I'm trying to install `colordiff` in a custom directory because I do not have `sudo` privileges. I did make the directories hard-coded in the Makefile as stated in the README, but I'm getting this error:               ...     chown root.root /share/edu-mei/colordiff/1.0.13/etc/colordiffrc     chown: changing ownership of `/share/edu-mei/colordiff/1.0.13/etc/colordiffrc': Operation not permitted     make: [install] Error 1 (ignored)     ...      Changing this file ownership is not really a problem (probably the reason that the author ignores this). However I'm not familiar with this usage of `chown`. The manpage from chown says that the command syntax is:               chown [OPTION]... [OWNER][:[GROUP]] FILE...     chown [OPTION]... --reference=RFILE FILE...      But the command executed is `chown root.root $file`. What does the syntax with a dot rather than a colon mean?


title: Why should 'Character Classes' be preferred over 'Character Ranges' In Shell (Bash)?

text: The Linux Command Line (Book - page count 47) says: > ... you have to be very careful with them [character ranges] because they > will not produce the expected results unless properly configured. For now, > you should avoid using them and use character classes instead. The book gives no reason, other than that. **Question - 1:** So, why exactly should _Character Classes_ (e.g. `[:alnum:]`, `[:alpha:]`, `[:digit:]`, etc) be preferred over _Character Ranges_ (e.g. `[a-z]`, `[A-Z]`, `[0-9]`, etc)? **Question - 2:** Does `[:alpha:]` stand for `[a-z]`, `[A-Z]`, and **upper and lower-case alphabets from other languages too**? And similarly, does `[:digit:]` include numerals from other languages too? If they match, that is. (Two questions, I know, but in this case, they are pretty much interrelated, IMO.)


title: ls shows a timestamp with no time for a file on NFS

text: When we create a file on Linux we notice that the timestamp is not visible and the `stat` on the file shows a time in future, the filesystem is an NFS mount, has anyone seen this before?               aa:/usr/data> touch test     aa:/usr/data> ls -al test     -rw-r----- 1 iaaadm sapsys 0 Jun 30  2014 test     aa:/usr/data>  stat test     File: `test'     Size: 0               Blocks: 0          IO Block: 32768  regular empty file     Device: 14h/20d Inode: 114999298   Links: 1     Access: (0640/-rw-r-----)  Uid: ( 1002/  aaadm)   Gid: (   86/  sys)     Access: 2014-06-30 18:35:44.000000000 -0500     Modify: 2014-06-30 18:35:44.000000000 -0500     Change: 2014-06-30 18:35:44.000000000 -0500     Birth: -


title: What are valid keys for tmux?

text: I was trying to learn how to use the `bind-key [-cnr] [-t key-table] key command [arguments]` better, but was having some trouble figuring out what "valid _keys_ " are for `bind-key` command. I tried doing `man tmux` and Google too, but I couldn't find anything useful.   * How can I figure out what the syntax for valid keys are?   * Is there a help command or a `man` page for this?   * Maybe I don't know the technical term for this valid keys, is there a term for these keys so that I can do a better google search? For example, I was trying to figure out what the following remapping of commands meant:               bind-key -n M-S-Left resize-pane -L 2     bind-key -n M-S-Right resize-pane -R 2     bind-key -n M-S-Up resize-pane -U 2     bind-key -n M-S-Down resize-pane -D 4      The `-n` was easy to find in the `man` page (doesn't need prefix). But I can't figure out what `M-S-Left` key means. I am guessing that its mapping shift and the left arrow plus whatever `M` means to the `resize-pane -L 2` command.   * How do I figure out what `M` means?   * What if I wanted control + whatever key I wanted. Is control = `C` ?   * How can I figure this out without just trying random keys on my keyboard until something works?   * Also, how do I confirm, figure out if I am not mapping it to a key set that is already used?   * Is there such a thing as "show all aliases" or something?   * As an addition to the question, are these valid keys the same as the ones for `vim`? The thing is that `vim` seems to have a different scripting for its own language since it sometimes require and stuff.


title: Issue with network switching

text: I have a desktop PC running debian that has two network cards installed. One network card is connected to a secure company network and requires a static IP. The other network card (eth1) is connected to a dlink router and then to a cable modem with DHCP addressing. I'd like to create a script to switch between the two networks. I want to make sure that the two networks aren't connected at the same time. Right now my script checks the up/down status of each interface and toggles them with ifup/ifdown. However, I'm having a number of issues trying to switch networks which I'll attempt to outline but I get the feeling that I'm just going about this the wrong way. If I configure /etc/network/interfaces to reflect the static IP settings required for the company network connection and the DHCP required for the cable connection than I get the error "RTNETLINK answers: file exists" because I have more than one gateway defined in the file. If I define the gateways via 'route add' and include metering ifup won't bring up eth0. If I leave eth0 and eth1 undefined in the interfaces file and use network manager to manage them, ifup won't bring up either interface. In both cases I get the error "Failed to bring up eth#" (replace # with either 0 or 1) with no explanation for further detail when I try to use ifup. If I replace ifup/ifdown with "ifconfig eth# up/down" than the interfaces go up and down properly but the DNS settings in resolv.conf don't update so I can't do much. Adding "resolvconf -u" doesn't seem to do the trick either. I can get everything working properly on either network if I manually edit resolv.conf after switching but I'd like to have this as automated and easy as possible. Any help you can provide is greatly appreciated. ---update--- /etc/network/interfaces               auto lo       iface lo inet loopback          auto eth0       iface eth0 inet static       address 10.0.0.152       netmask 255.255.255.0       gateway 10.0.0.1       network 10.0.0.0       broadcast 10.0.0.255       dns-search company.com       dns-nameservers 10.0.0.2 10.0.0.3 10.0.0.4       meter 100  #without this line I get RNETLINK answers: file does not exist          auto eth1       iface eth1 inet dhcp  #assigns an address in the 192.168.0.0/24 space with 192.168.0.1 as DNS       meter 200  #without this line I get RNETLINK answers: file does not exist      /etc/resolv.conf               nameserver 10.0.0.2     nameserver 10.0.0.3     nameserver 10.0.0.4     search company.com cable.provider.com      Unless I manually edit the file, my resolv.conf always has the DNS servers for the eth0 connection and both domains in the search path. In order to get the cable connection to work I have to delete the other nameserver lines and add 192.168.0.1 and in order for the company connection to work I just have to delete the cable provider search path.


title: Problem in writing message from one terminal to another terminal

text: I have a user of name `x` in tty1 and `y` in tty2. `x` wants to write some message to `y` and vice-versa. When I typed `write y tty2` in the tty1 terminal, it said:               write:you have write permission turned off     write:y has messages disabled      I then tried to enable messages:               $ mesg     is n     $ mesg y      Now I can successfully write a message from `x` to `y` or vice-versa, but the first line of error continues to appear. I have tried logging out and back in again, but the symptom doesn't change. I also looked through the file `/etc/default/devpts` and saw that `TTYMODE=620`.


title: diff where lines are mostly the same but out of order?

text: I want to diff two sets of mod_rewrite rules. The set of lines are about 90% identical, but the order is so different that diff basically says they are completely different. How can I see which lines are truly different between two files, regardless of their line number?


title: find . .[^.]* -type f -print0 | xargs -0 sudo chmod 664; does not work

text: I am using this command to set permissions for files recursively               clime@vm6879 /srv/www-php/steeltrading $ find . .[^.]* -type f -print0 | xargs -0 sudo chmod 664      But after executing that command permissions of some files (most of them) are still not changed.               clime@vm6879 /srv/www-php/steeltrading $ ll media/xmlconnect/system/ok.gif      -rwxrwxr-x. 1 www www 295 Jul  5  2012 media/xmlconnect/system/ok.gif      If I run just `find` to look if the file is in the list, I can see it:               clime@vm6879 /srv/www-php/steeltrading $ find . .[^.]* -type f | grep ok.gif     ./media/xmlconnect/custom/ok.gif     ./media/xmlconnect/original/ok.gif     ./media/xmlconnect/system/ok.gif      If I move into directory media a run the command again, the file finally gets the right permissions.               clime@vm6879 /srv/www-php/steeltrading $ cd media/     clime@vm6879 /srv/www-php/steeltrading/media $ find . .[^.]* -type f -print0 | xargs -0 sudo chmod 664     clime@vm6879 /srv/www-php/steeltrading/media $ ll xmlconnect/system/ok.gif      -rw-rw-r--. 1 www www 295 Jul  5  2012 xmlconnect/system/ok.gif      It looks like `sudo chmod 664` is not performed for some files and it seems that `xargs` is the problem but It is strange (no error messages). Any idea what might be the cause, please? EDIT: Or maybe piping lots of data might be a problem?


title: Piping into less and editing: "cannot edit standard input" error. Workarounds?

text: I recently learned that if I page my files with `less`, I can press `v` and open the buffer in Emacs. This works as long as I have the environment variable `$EDITOR` set up correctly, which in my case I have it as:               export EDITOR='env TERM=xterm-256color emacs -nw'      The above gives me the ability to load emacs within the terminal that runs `less`. However, the trick above does not work when **piping** commands to `less`. When doing this, `less` complains with the following message:               Cannot edit standard input (press RETURN)      My question is, why does this happen? But most importantly, **is there any workaround to it**?


title: How can the log-in screen sound of linux mint 11 be changed?

text: How can I customize the sound that occurs when the log-in screen pops up on linux mint 11?


title: How do I configure the GNOME gdm login screen?

text: I recently installed Arch Linux and have it mostly set up. With many other Linux distributions, there is a tool that is used to configure the look and feel of the login screen. I would like to change the wallpaper used, the date/time format from something like "Sat 6:27 PM" to "26 Feb 11 18:27", and the refresh rate of the monitor (it's fine when I'm logged in, but not at the login screen). Where can I find these configuration options or (preferably) a GNOME application to allow for me to make these configuration changes?


title: verify: command not found exception when trying to get value from user

text: **Code Explanation:** The below code is a simple script written by me to send a Installation status alert mail. It will be sent after completion of a linux software installation. In this code, If the user accept the mail notification he will be asked to enter his mail id. Then the mail will be send to him after installation completed.               #!/bin/bash          #######################################     # Independent Variables and  Properties Here     #######################################     PL_EMAIL_ALERT=""     #######################################     # User to get Email Alert     #######################################     echo "This will help user to get an email of an installation status."     verify -s "Do want to send Email"     if [ "$VerAns" = "y" ]     then         read -e -p "Enter Email ID: " PL_EMAIL_ALERT     fi     #######################################     # Sending Email Alert     #######################################     echo "Sending Mail"     if [ ${#PL_EMAIL_ALERT} -ne 0 ]     then         mail -s "software INSTALLATION MAIL ALERT" $PL_EMAIL_ALERT <<< "message1"     fi     echo ""     echo "Final step"     echo ""      **Problem:** My problem is when I try to execute the code I am getting the following error. _`verify: command not found`_ As I am very new to linux I am unable to fix this issue. Can you please help me to understand what exactly I missed.


title: LVM not coming up after reboot, couldn't find device with uuid

text: Had a VM that was, up until recently working without issue, but needed to be rebooted after some configuration changes. However after rebooting the VM didn't come back up, saying it couldn't find the root device (which was an LVM volume under /dev/mapper). Booting into recovery mode, I saw that the filesystems under /dev/mapper, and /dev/dm-* did indeed, not exist. The filesystem should be layed out with   * `/dev/sda1` as the boot partition   * `/dev/sda2` extended partition containing   * `/dev/sda5` and `/dev/sda6` as LVM partitions   * `/dev/sda{5,6}` are both PVs in a single VG   * with 2 LVs for the root FS and swap Doing an `lvm pvshow` gives me:                 Couldn't find device with uuid '8x38hf-mzd7-xTes-y6IV-xRMr-qrNP-0dNnLi'.       Couldn't find device with uuid '8x38hf-mzd7-xTes-y6IV-xRMr-qrNP-0dNnLi'.       Couldn't find device with uuid '8x38hf-mzd7-xTes-y6IV-xRMr-qrNP-0dNnLi'.       --- Physical volume ---       PV Name               unknown device       VG Name               of1-server-lucid       PV Size               19.76 GiB / not usable 2.00 MiB       Allocatable           yes (but full)       PE Size               4.00 MiB       Total PE              5058       Free PE               0       Allocated PE          5058       PV UUID               8x38hf-mzd7-xTes-y6IV-xRMr-qrNP-0dNnLi            --- Physical volume ---       PV Name               /dev/sda6       VG Name               of1-server-lucid       PV Size               100.00 GiB / not usable 2.66 MiB       Allocatable           yes (but full)       PE Size               4.00 MiB       Total PE              25599       Free PE               0       Allocated PE          25599       PV UUID               cuhP6R-QbiO-U7ye-WvXN-ZNq5-cqUs-VVZpux      So it appears as though `/dev/sda5` is not listed as a PV and is causing errors. `fdisk -l`:               Disk /dev/sda: 128.8 GB, 128849018880 bytes     255 heads, 63 sectors/track, 15665 cylinders     Units = cylinders of 16065 * 512 = 8225280 bytes     Sector size (logical/physical): 512 bytes / 512 bytes     I/O size (minimum/optimal): 512 bytes / 512 bytes     Disk identifier: 0x00044a6c             Device Boot      Start         End      Blocks   Id  System     /dev/sda1   *           1          32      248832   83  Linux     Partition 1 does not end on cylinder boundary.     /dev/sda2              32       15665   125579256+   5  Extended     /dev/sda5              32        2611    20722970   8e  Linux LVM     /dev/sda6            2612       15665   104856223+  8e  Linux LVM      So I can see the `/dev/sda5` device exists, but `blkid` isn't reporting anything for it:               ~ # blkid     /dev/sda1: UUID="d997d281-2909-41d3-a835-dba400e7ceec" TYPE="ext2"      /dev/sda6: UUID="cuhP6R-QbiO-U7ye-WvXN-ZNq5-cqUs-VVZpux" TYPE="LVM2_member"       After taking a snapshot of the disks, I tried recovering the PV from the archive config:               ~ # pvremove -ff /dev/sda5     Labels on physical volume "/dev/sda5" successfully wiped     ~ # pvcreate --uuid=8x38hf-mzd7-xTes-y6IV-xRMr-qrNP-0dNnLi /dev/sda5 --restorefile=/etc/lvm/archive/of1-dev-server_00000.vg     Couldn't find device with uuid '8x38hf-mzd7-xTes-y6IV-xRMr-qrNP-0dNnLi'.       Physical volume "/dev/sda5" successfully created     ~ # vgchange -a y     2 logical volume(s) in volume group "of1-dev-server" now active"      So at least now the device has a `blkid`:               /dev/sda1: UUID="d997d281-2909-41d3-a835-dba400e7ceec" TYPE="ext2"      /dev/sda6: UUID="cuhP6R-QbiO-U7ye-WvXN-ZNq5-cqUs-VVZpux" TYPE="LVM2_member"      /dev/sda5: UUID="8x38hf-mzd7-xTes-y6IV-xRMr-qrNP-0dNnLi" TYPE="LVM2_member"       Doing a `pvdisplay` now also shows the correct device:                 --- Physical volume ---       PV Name               /dev/sda5       VG Name               of1-dev-danr-lucid       PV Size               19.76 GiB / not usable 2.00 MiB       Allocatable           yes (but full)       PE Size               4.00 MiB       Total PE              5058       Free PE               0       Allocated PE          5058       PV UUID               8x38hf-mzd7-xTes-y6IV-xRMr-qrNP-0dNnLi            --- Physical volume ---       PV Name               /dev/sda6       VG Name               of1-dev-danr-lucid       PV Size               100.00 GiB / not usable 2.66 MiB       Allocatable           yes (but full)       PE Size               4.00 MiB       Total PE              25599       Free PE               0       Allocated PE          25599       PV UUID               cuhP6R-QbiO-U7ye-WvXN-ZNq5-cqUs-VVZpux      And the mapper devices exist:               crw-rw----    1 root     root      10,  59 Jul 10 10:47 control     brw-rw----    1 root     root     252,   0 Jul 10 11:21 of1--dev--server-root     brw-rw----    1 root     root     252,   1 Jul 10 11:21 of1--dev--server-swap_1      Also the LVMs seem to be listed correctly:               ~ # lvdisplay       --- Logical volume ---       LV Name                /dev/of1-dev-danr-lucid/root       VG Name                of1-dev-danr-lucid       LV UUID                pioKjE-iJEp-Uf9S-0MxQ-UR0H-cG9m-5mLJm7       LV Write Access        read/write       LV Status              available       # open                 0       LV Size                118.89 GiB       Current LE             30435       Segments               2       Allocation             inherit       Read ahead sectors     auto       - currently set to     256       Block device           252:0            --- Logical volume ---       LV Name                /dev/of1-dev-danr-lucid/swap_1       VG Name                of1-dev-danr-lucid       LV UUID                mIq22L-RHi4-tudV-G6nP-T1e6-UQcS-B9hYUF       LV Write Access        read/write       LV Status              available       # open                 0       LV Size                888.00 MiB       Current LE             222       Segments               1       Allocation             inherit       Read ahead sectors     auto       - currently set to     256       Block device           252:1      But trying to mount the root device gives me an error:               ~ # mount /dev/mapper/of1--dev--server-root /mnt2     mount: mounting /dev/mapper/of1--dev--server-root on /mnt2 failed: Invalid argument      So I tried a disk consistency check:               ~ # fsck.ext4 -f /dev/mapper/of1--dev--server-root     e2fsck: Superblock invalid, trying backup blocks...     e2fsck: Bad magic number in super-block while trying to open /dev/mapper/of1--dev--server-root     [...]      So I tried another superblock:               ~ # mke2fs -n /dev/mapper/of1--dev--server-root     Filesystem label=     OS type: Linux     Block size=4096 (log=2)     Fragment size=4096 (log=2)     Stride=0 blocks, Stripe width=0 blocks     7798784 inodes, 31165440 blocks     1558272 blocks (5.00%) reserved for the super user     First data block=0     Maximum filesystem blocks=4294967296     952 block groups     32768 blocks per group, 32768 fragments per group     8192 inodes per group     Superblock backups stored on blocks:              32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,              4096000, 7962624, 11239424, 20480000, 23887872     ~ # fsck.ext4 -y -b 23887872 /dev/mapper/of1--dev--server-root      Upon which I received ridiculous numbers of errors, the main ones I saw were:   * Superblock has an invalid journal   * One or more block group descriptor checksums are invalid.   * Truncating orphaned inode ()   * Already cleared block #0 () found in orphaned inode   * /dev/mapper/of1--dev--server-root contains a filesystem with errors, check forced   * Resize inode not valid. Recreate   * Root inode is not a directory.   * Reserved inode 3 () has invalid mode   * HTREE directory inode has invalid root node   * Inode , i_blocks is , should be 0.   * Unconnected directory inode  After a lot of messages, it says it's done. Mounting the directory as above works fine, but the directory is empty with a `lost+found` directory full of files, most just numbers, some have filenames vaguely relating to files that once existed. **So, how do I bring the VM back up?** Whenever I see disk errors, my first instinct is to snapshot so things don't get worse, so I have a snapshot from just after reboot when I first saw the error. I know the data is there somewhere, as the VM worked without issue until I rebooted. The user can't remember changing anything on the filesystem recently, but it had almost a year of uptime when I rebooted it so all sorts could have happened since then. We also, unfortunately, don't have backups as Puppet had been disabled on this node. The original OS was Ubuntu Lucid, running on VMWare.


title: CentOS 6.5 installation hangs on first screen

text: I'm trying to install CentOS 6.5 in Virtual Box. The problem is, the installation hangs on the first screen after waiting about 10 seconds. How can I pass this screen? The steps I installed: 1) Create virtual machine ![enter image description here](http://i.stack.imgur.com/TJNl6.png) 2) Start it It shows "Automatic boot in 10 seconds" and count down, then it freezes as below ![CentOS 6.5 Installation Screen](http://i.stack.imgur.com/ykq2u.png) After many times failing, I tried to press Print key. It shows multiple options, choosing any option causes hanging. The only selectable option is "Install (Text Mode)", press it, it shows `"This kernel requires an x86-64 CPU, but only detected an i686 CPU. Unable to boot - please use a kernel appropriate for your CPU"`.


I am starting my application in the background using `nohup` as mentioned below -               root@phx5qa01c:/bezook# nohup java -jar ./exhibitor-1.5.1/lib/exhibitor-1.5.1-jar-with-dependencies.jar -c file --fsconfigdir /opt/exhibitor/conf --hostname phx5qa01c.phx.qa.host.com > exhibitor.out &     [1] 30781     root@phx5qa01c:/bezook# nohup: ignoring input and redirecting stderr to stdout      But everytime I see this message -               nohup: ignoring input and redirecting stderr to stdout      Will there be any problem if I am seeing this message and what does it mean? And also how to avoid this?


title: Running time command with cron

text: So I have a crontab that have this line:               30 16 * * * (time sysbench --test=cpu --cpu-max-prime=20000 run) 2>> ~/cpu.out      I use this because time output goes by default to stderr and I want to redirect it to a file When I run the command in the terminal it does write the output I need:               real X.XXXs     user X.XXXs     sys  X.XXXs      But when I run with cron it writes this to the file:               39.69 user 0.92 system 0:40.67elapsed 99%CPU (0avgtext+0avgdata 1400maxresident)k0inputs+1outputs (0major+450minor) pagefaults 0swaps      Can someone help me? PS: In the man page there is the -o option but it is not working, if I try that I get an error


title: Lighttpd rewrite rule

text: Why does a rewrite rule like this not work:               url.rewrite-if-not-file = (         "^parameter/(.*)$" => "/somefunnyfile.php?someparameter=$1"     )      ... but a rule like this does work:               url.rewrite-if-not-file = (         "^/(.*)$" => "/somefunnyfile.php?someparameter=$1"     )      This is the mimed Apache RewriteRule               RewriteRule ^acraproxyphp/(.*)$ acraproxy.php?reportid=$1


title: How to install Suggests dependencies of a package

text: If I want to install a package and its Suggests dependencies, I run:               $ sudo apt-get --install-suggests install <package name>      However, if `<package name>` is already installed, and not all Suggests dependencies are installed, 'nothing' happens... those remaining dependencies remain uninstalled. Is there a solution for this, beyond writing code?


title: How to identify executable path with its PID on AIX 5 or more

text: ## On AIX 5 or 6, `ps -ef` shows the executable full path randomly. Why and how to determine it? I find many thread through internet and also Unix & Linux and this stack overflow post about finding the path of a process and so far I don't succed in applying any method.   I keep falling into having `proftpd` shown instead of having a path. I finally read the `man ps` of AIX and find this : > CMD > > (-f, -l, and l flags) Contains the command name. Under the -f flag, ps tries > to determine the current command name and arguments both of which may be > changed asynchronously by the process. These are then displayed. Failing > this, the command name as it would appear without the option -f, is written > in square brackets. I want to be sure to understand what i means when I have the following output:                ps -ef (truncate output)     root 44900     1   0 11:49:36      -  0:00 proftpd: (accepting connections)     nobody 31986 14976   0   13 feb      -  0:00 /usr/local/apache/bin/httpd -f /usr/local/apache/conf/httpd.conf      For the `httpd` deamon it does show the full path but doesn't show the full path for `proftpd`. First question is why does some process are shown with full path and some don't ? And the second question is fot that case : Can I assume that the path of the `proftpd` is the first I'll find typing `whereis` as `root` ? In my case :                whereis proftpd      proftpd: /etc/proftpd.conf /usr/sbin/proftpd        ~~So I assume that the running deamon is`/usr/sbin/protfpd ?` Am I correct ?~~ * * * **Edit 2** : Let me answer that part: NO I can't make such an assumption it is not relevant at all. I finally find out that the deamon was running from `/opt/proftpd` which is not even in the root path. The why `ps -ef` does work that way is still to determine, and also is there any other way to find out what is the real path knowing the PID? * * * **Edit 1** : Here's the proof that my AIX system are not supporting `exe` link in `/proc/<PID>`.   I test this against AIX versions 5.3.9.0 and 6.1.7.15:               ls -al /proc/44900/*     -rw-------    1 root     nobody            0 14 jan 09:42 /proc/44900/as     -r--------    1 root     nobody          128 14 jan 09:42 /proc/44900/cred     --w-------    1 root     nobody            0 14 jan 09:42 /proc/44900/ctl     lr-x------   53 root     nobody            0 13 jan 16:07 /proc/44900/cwd -> /     -r--------    1 root     nobody            0 14 jan 09:42 /proc/44900/map     -r--r--r--    1 root     nobody          448 14 jan 09:42 /proc/44900/psinfo     -r--------    1 root     nobody         1024 14 jan 09:42 /proc/44900/sigact     -r--------    1 root     nobody         1520 14 jan 09:42 /proc/44900/status     -r--r--r--    1 root     nobody            0 14 jan 09:42 /proc/44900/sysent          /proc/44900/fd:     total 5483376     dr-x------    1 root     nobody            0 14 jan 09:42 .     dr-xr-xr-x    1 root     nobody            0 14 jan 09:42 ..     -r--r--r--    1 root     nobody         5005 12 jul 2004  3     -r--r--r--    1 root     nobody         8655 13 nov 15:13 5     -r--r--r--    1 root     nobody         1607 13 nov 15:12 6     --w-------    1 root     nobody   2378419349 13 jan 16:06 7     --w-------    1 root     nobody    423405131 13 jan 16:06 8          /proc/44900/lwp:     total 0     dr-xr-xr-x    1 root     nobody            0 14 jan 09:42 .     dr-xr-xr-x    1 root     nobody            0 14 jan 09:42 ..     dr-xr-xr-x    1 root     nobody            0 14 jan 09:42 99075          /proc/44900/object:     total 90312     dr-x------    1 root     nobody            0 14 jan 09:42 .     dr-xr-xr-x    1 root     nobody            0 14 jan 09:42 ..     -rwxr-xr-x    1 root     system      1268973 16 okt 2012  a.out     -rwxr-xr-x    1 bin      bin           15265 12 jul 2004  jfs.10.5.12513     -r--r--r--    1 bin      bin         8587637 23 mei 2008  jfs.10.5.16405     -r-xr-xr-x    1 bin      bin         9281793 23 sep 2008  jfs.10.5.4131     -r-xr-xr-x    1 bin      bin           11019 01 okt 2007  jfs.10.5.4149     -r--r--r--    1 bin      bin          162078 19 jun 2008  jfs.10.5.4169     -r--r--r--    1 bin      bin         1161414 23 sep 2008  jfs.10.5.4171     -r--r--r--    1 bin      bin          379513 19 jun 2008  jfs.10.5.4943     -r-xr-xr-x    1 bin      bin           96495 19 jun 2008  jfs.10.5.5248     -rw-r--r--    1 root     system     17160842 05 okt 2011  jfs2.51.3.266241     -rwxr-xr-x    1 root     system       315783 11 mei 2006  jfs2.51.3.266246     -rw-r--r--    1 root     system      3237612 05 okt 2011  jfs2.51.3.266262     -rw-r--r--    1 root     system       125958 25 mrt 2008  jfs2.51.3.270769     -rwxr-xr-x    1 root     system      3140221 20 mei 2011  jfs2.51.3.282757     -rwxr-xr-x    1 root     system      1268973 16 okt 2012  jfs2.51.3.283899      No symbolic link at all.


title: Backporting OpenSSL-1.0.1e to Debian Lenny (armv4l)

text: I have an old embedded board that supports only Debian Lenny. I need to install `OpenSSL-1.0.1e` on it. If I download the source code then try to compile the source code, I get this error               ts7500:/home/openssl-1.0.1e# make     making all in crypto...     make[1]: Entering directory `/home/openssl-1.0.1e/crypto'     gcc -I. -I.. -I../include  -fPIC -DOPENSSL_PIC -DZLIB_SHARED -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -Wa,--noexecstack -DTERMIO -O3 -Wall -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DAES_ASM -DGHASH_ASM   -c -o armcap.o armcap.c     In file included from armcap.c:8:     arm_arch.h:35:5: error: #error "unsupported ARM architecture"     make[1]: *** [armcap.o] Error 1     make[1]: Leaving directory `/home/openssl-1.0.1e/crypto'     make: *** [build_crypto] Error 1      how can I overcome that error?               Note: ts7500:/home/openssl-1.0.1e# `uname -a`     Linux ts7500 3.4.0 #83 Sun May 26 17:07:14 CEST 2013 `armv4l GNU/Linux`      ARMV4 is defined on https://github.com/joyent/node/blob/89dcf22/deps/openssl/openssl/crypto/arm_arch.h EDIT: If I add `#define __ARM_ARCH__ 4` in the beginning of the library, it suppress the problem and compiles the code without any problem. I wonder how correct what I did. I would appreciate a better solution (e.g., without modifying the library)


While trying to build the NumPy Python math module with Intel's Math Kernel Library (MKL) on OSX 10.8.3, I was running into some problems with the Accelerate and vecLib frameworks overriding the MKL. At any rate, I decided it would be a good idea to rename `/System/Library/Frameworks/Accelerate.framework` and `/System/Library/Frameworks/vecLib.framework` temporarily. Nothing happened (at least, on the command line) after moving `Accelerate.framework`. However, after entering               sudo mv vecLib.framework/ vecLib.framework.old      I got the following error:               sudo: unable to initialize PAM: No such file or directory      Oops. Unfortunately, the `mv` command worked, but now when I try to use `sudo` I get the same error, but the commands **don't** work. When I tried to rename `vecLib` through Finder, I get:               The operation can’t be completed.     An unexpected error occurred (error code -8076).      which apparently is some sort of permissions error. So, my question is how can I get `sudo` working again? App Store.app won't even run, so I can't reinstall XCode (which is apparently where `vecLib.framework` comes from) or anything else. I'm afraid to reboot because I'm worried the computer will hang, whereas (as you can tell) at least it's working for now, albeit without any elevated permissions capabilities. Any suggestions? * * * Normally I wouldn't cross-post, but I need to figure out a way to fix this ASAP.


title: notify-send command with -u critical and -t option

text: I sometimes see the command :               notify-send -u critical -t 3000 "Example"      However, with `-u critical`, it seems like the notification doesn't time out. What is the purpose of adding a timeout option then? Do you have a link which explains exactly what the `notify-send` does? The ones I found were not very detailed in their explanations. What is the purpose of the `-u` option, btw?


title: Launch an application with window decorator hints, x/y coordinates, size, etc

text: Is there a way to launch an application with a given size, position, and window decorator hints from the command line? I'd like to lock a certain window in a certain place at a size and without a chrome.


title: Decreasing mouse sensitivity at kernel level

text: I have developed a custom-GUI Server, which runs on virtual console of Linux.For mouse-handling purpose, it reads the mouse device file               /dev/input/mice       and retrieves the event data and updates the pointer position.How can I add the facility of the feature of changing mouse-sensitivity to this software?               One solution may be is to change the mouse driver config file.      But i dont know where it is located or is there any such options, that fulfills my need.Thank you


title: Printing Latex source with a2ps

text: When I try to print out latex source code with               a2ps somefile.tex      I get error messages from egrep like               egrep: Das Ende des angegebenen Intervalls ist nicht gültig      which translates to "the end of the given interval is invalid." After that texi2dvia4ps tries to compile my tex file and fails. I can print other source code just fine. Any idea what's wrong? Edit: jofels answer fixes the problem with egrep. a2ps still tries to compile my .tex file instead of pretty printing it as source code. Using               a2ps --delegate=no somefile.tex      stops it (partly) from doing so. Minor commands like \item or \phi are still interpreted instead of printed out as they are in the file.


title: Why could mount.cifs mount an empty folder?

text: **gentoo, kernel 3.7.10   samba 3.6.12   SMB/CIFS server: Windows Server 2003 3790 Service Pack 2** I've encountered the situation when `mount.cifs` behaves differently from `smbclient` program. The following command works fine. I can log in the server and navigate through the share's contents.               smbclient -U domainname/username //server.name/sharename      And if I try to mount this very share folder with the following command,               mount -t cifs //server.name/sharename /mount/point -o user=domainname/username      then the command itself works fine (return code is 0, no error message). But `/mount/point` looks empty. What's the problem? Why `mound.cifs` and `smbclient` behave differently? Maybe `smbclient` uses some hidden settings? BTW, I don't know whether it is relevant to the problem but anyway. If I run `mount.cifs` command several times, I don't get any `folder already mounted` kind of message. Though afterwards I can run `umount` the same number of times until I get error `umount: /mount/point/: not mounted`


title: How to add RAID5 to existing crypto-LVM?

text: I recently installed Debian Wheezy and let the installer guide partition the disk using a whole partition with encryption (LVM). Later on I've added four disks and setup RAID5 on them (using `mdadm`). My question is: How do I add the RAID-set to the existing crypto-lvm, making the RAID encrypted as well?


title: How to find out which package a file belongs to?

text: In the Debian family of OSes, `dpkg --search /bin/ls` gives:               coreutils: /bin/ls      That is, the file `/bin/ls` belongs to the Debian package named **coreutils**. (see this post if you are interested in a package containing a file that isn't installed) What is the Fedora equivalent?


title: svn switch --relocate: wrong uuid?

text: I am trying to switch to a new SVN repository. I currently have the following checkout:               $ svn info     svn+ssh://some.server.edu/home/name/svn-repositories/proj/trunk      Now I wanted to switch, but I get an error:               $ svn switch --relocate \       svn+ssh://some.server.edu/home/name/svn-repositories/proj/trunk \       https://subversion.assembla.com/svn/name/trunk/proj .     svn: The repository at 'https://subversion.assembla.com/svn/name/trunk/proj'      has uuid '...', but the WC has '...'      I thought the whole point of `svn switch --relocate` was that there are two repositories with different uuids? How can I correctly switch to the new repos? BTW, the directories should be correct: The old `proj/trunk` and the new `trunk/proj` contain exactly the same files etc.:               $ svn ls https://subversion.assembla.com/svn/<name>/trunk/proj     foo.txt     $ svn ls svn+ssh://some.server.edu/home/name/svn-repositories/proj/trunk     foo.txt      I am using svn 1.6.5 on the Mac.


title: How do I debug a kernel module in which a NULL pointer appears?

text: I have a custom kernel module that I compiled from this patch that adds support for the `logitech G19` keyboard among other G series devices. I compiled it just fine against Ubuntu's maverick kernel's master branch (2.6.35). I can boot and load the module, but I'm running into a really strange situation. As soon as I load the module (either on boot or through modprobe), I get a black screen and my console locks up. The weird part is that it doesn't lock my system up, it's just the current console session. I can SSH into my box, and it gives me a terminal and a session. And I can type, and I can even run a command and it gives me the output. It then draws my next prompt and immediately locks up. I see in `dmesg` that there's a null pointer, and I get the following stacktrace:               [  956.215836] input: Logitech G19 Gaming Keyboard as /devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2.1/1-2.1.2/1-2.1.2:1.1/input/input5     [  956.216023] hid-g19 0003:046D:C229.0004: input,hiddev97,hidraw3: USB HID v1.11 Keypad [Logitech G19 Gaming Keyboard] on usb-0000:00:1d.7-2.1.2/input1     [  956.216065] input: Logitech G19 as /devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2.1/1-2.1.2/1-2.1.2:1.1/input/input6     [  956.216128] Registered led device: g19_97:orange:m1     [  956.216146] Registered led device: g19_97:orange:m2     [  956.216178] Registered led device: g19_97:orange:m3     [  956.216198] Registered led device: g19_97:red:mr     [  956.216216] Registered led device: g19_97:red:bl     [  956.216235] Registered led device: g19_97:green:bl     [  956.216259] Registered led device: g19_97:blue:bl     [  956.216872] Console: switching to colour frame buffer device 40x30     [  956.216899] BUG: unable to handle kernel NULL pointer dereference at 000000000000001c     [  956.216903] IP: [<ffffffffa040b21b>] sys_imageblit+0x21b/0x4ec [sysimgblt]     [  956.216911] PGD 273554067 PUD 2726ca067 PMD 0      [  956.216914] Oops: 0000 [#1] SMP      [  956.216917] last sysfs file: /sys/devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2.1/1-2.1.2/1-2.1.2:1.1/usb/hiddev1/uevent     [  956.216921] CPU 5      [  956.216922] Modules linked in: hid_g19(+) led_class hid_gfb fb_sys_fops sysimgblt sysfillrect syscopyarea btrfs zlib_deflate crc32c libcrc32c ufs qnx4 hfsplus hfs minix ntfs vfat msdos fat jfs xfs exportfs reiserfs snd_hda_codec_atihdmi snd_hda_intel snd_hda_codec snd_hwdep snd_pcm snd_seq_midi snd_rawmidi snd_seq_midi_event snd_seq snd_timer snd_seq_device ioatdma snd i5000_edac soundcore snd_page_alloc psmouse edac_core i5k_amb shpchp serio_raw dca ppdev parport_pc lp parport usbhid hid floppy e1000e     [  956.216953]      [  956.216956] Pid: 3147, comm: modprobe Not tainted 2.6.35-26-generic #46 DSBF-DE/System Product Name     [  956.216959] RIP: 0010:[<ffffffffa040b21b>]  [<ffffffffa040b21b>] sys_imageblit+0x21b/0x4ec [sysimgblt]     [  956.216963] RSP: 0018:ffff8802766db738  EFLAGS: 00010246     [  956.216965] RAX: 0000000000000000 RBX: ffff880273e71000 RCX: ffff880272e93b40     [  956.216968] RDX: 0000000000000007 RSI: 0000000000000010 RDI: ffff880272e93b40     [  956.216970] RBP: ffff8802766db7d8 R08: 0000000000000000 R09: ffff880272e93b98     [  956.216972] R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000000     [  956.216974] R13: 0000000000000010 R14: 0000000000000008 R15: ffff8802766db8c8     [  956.216977] FS:  00007fcae7725700(0000) GS:ffff880001f40000(0000) knlGS:0000000000000000     [  956.216979] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b     [  956.216981] CR2: 000000000000001c CR3: 000000026ba26000 CR4: 00000000000006e0     [  956.216983] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000     [  956.216986] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400     [  956.216988] Process modprobe (pid: 3147, threadinfo ffff8802766da000, task ffff8802696a16e0)     [  956.216990] Stack:     [  956.216991]  ffff8802766db778 ffffffff810746ae ffff8802766db700 ffff88026b2cadc0     [  956.216994] <0> ffff8802766db778 ffffffff812beef9 ffff8802f66db947 ffff8802766db94f     [  956.216998] <0> ffff8802766db848 00000000812bf22e ffff880272e93b40 ffffffff812feb40     [  956.217001] Call Trace:     [  956.217011]  [<ffffffff810746ae>] ? send_signal+0x3e/0x90     [  956.217018]  [<ffffffff812beef9>] ? put_dec+0x59/0x60     [  956.217023]  [<ffffffff812feb40>] ? fbcon_resize+0xd0/0x230     [  956.217027]  [<ffffffffa04175da>] gfb_fb_imageblit+0x1a/0x30 [hid_gfb]     [  956.217031]  [<ffffffff813051b9>] soft_cursor+0x1c9/0x270     [  956.217034]  [<ffffffff81304e8b>] bit_cursor+0x65b/0x6c0     [  956.217037]  [<ffffffff812c1796>] ? vsnprintf+0x316/0x5a0     [  956.217043]  [<ffffffff81061045>] ? try_acquire_console_sem+0x15/0x60     [  956.217046]  [<ffffffff81300ca8>] fbcon_cursor+0x1d8/0x340     [  956.217049]  [<ffffffff81304830>] ? bit_cursor+0x0/0x6c0     [  956.217054]  [<ffffffff81368139>] hide_cursor+0x29/0x90     [  956.217057]  [<ffffffff8136b078>] redraw_screen+0x148/0x240     [  956.217060]  [<ffffffff8136b42e>] bind_con_driver+0x2be/0x3b0     [  956.217063]  [<ffffffff8136b569>] take_over_console+0x49/0x70     [  956.217066]  [<ffffffff812ff7fb>] fbcon_takeover+0x5b/0xb0     [  956.217069]  [<ffffffff81303ca5>] fbcon_event_notify+0x5c5/0x650     [  956.217076]  [<ffffffff8158e7f6>] notifier_call_chain+0x56/0x80     [  956.217080]  [<ffffffff8108510a>] __blocking_notifier_call_chain+0x5a/0x80     [  956.217084]  [<ffffffff81085146>] blocking_notifier_call_chain+0x16/0x20     [  956.217089]  [<ffffffff812f366b>] fb_notifier_call_chain+0x1b/0x20     [  956.217092]  [<ffffffff812f4c8c>] register_framebuffer+0x1ec/0x2e0     [  956.217098]  [<ffffffff814084f8>] ? usb_init_urb+0x28/0x40     [  956.217101]  [<ffffffffa041790f>] gfb_probe+0x21f/0x4f0 [hid_gfb]     [  956.217107]  [<ffffffffa0425778>] g19_probe+0x558/0xedc [hid_g19]     [  956.217115]  [<ffffffff811c059c>] ? sysfs_do_create_link+0xec/0x210     [  956.217128]  [<ffffffffa00330c7>] hid_device_probe+0x77/0xf0 [hid]     [  956.217131]  [<ffffffff81388aa2>] ? driver_sysfs_add+0x62/0x90     [  956.217134]  [<ffffffff81388bc8>] really_probe+0x68/0x190     [  956.217138]  [<ffffffff81388d35>] driver_probe_device+0x45/0x70     [  956.217140]  [<ffffffff81388dfb>] __driver_attach+0x9b/0xa0     [  956.217143]  [<ffffffff81388d60>] ? __driver_attach+0x0/0xa0     [  956.217146]  [<ffffffff81388008>] bus_for_each_dev+0x68/0x90     [  956.217149]  [<ffffffff81388a3e>] driver_attach+0x1e/0x20     [  956.217151]  [<ffffffff813882fe>] bus_add_driver+0xde/0x280     [  956.217154]  [<ffffffff81389140>] driver_register+0x80/0x150     [  956.217157]  [<ffffffff8158e7f6>] ? notifier_call_chain+0x56/0x80     [  956.217161]  [<ffffffffa042a000>] ? g19_init+0x0/0x20 [hid_g19]     [  956.217166]  [<ffffffffa0032913>] __hid_register_driver+0x53/0x90 [hid]     [  956.217169]  [<ffffffff81085115>] ? __blocking_notifier_call_chain+0x65/0x80     [  956.217173]  [<ffffffffa042a01e>] g19_init+0x1e/0x20 [hid_g19]     [  956.217178]  [<ffffffff8100204c>] do_one_initcall+0x3c/0x1a0     [  956.217184]  [<ffffffff8109bd9b>] sys_init_module+0xbb/0x200     [  956.217192]  [<ffffffff8100a0f2>] system_call_fastpath+0x16/0x1b     [  956.217195] Code: 83 e1 fc 48 89 4d c8 eb d3 8b 83 14 01 00 00 83 f8 04 74 09 83 f8 02 0f 85 7b 01 00 00 48 8b 4d b0 48 8b 83 00 04 00 00 8b 51 10 <44> 8b 04 90 8b 51 14 8b 3c 90 44 8b 4d ac 45 85 c9 75 16 41 b9      [  956.217218] RIP  [<ffffffffa040b21b>] sys_imageblit+0x21b/0x4ec [sysimgblt]     [  956.217221]  RSP <ffff8802766db738>     [  956.217223] CR2: 000000000000001c     [  956.217227] ---[ end trace 95d6c6d6913ccc79 ]---      Can anyone point me in the right direction as to how to go about debugging this? The stacktrace leads me to believe that it's not the hid-g15 driver but the hid-gfb driver, which creates a frame buffer for the LCD on the keyboard. This makes sense since it's locking up my display/console but digging into the kernel code isn't really going anywhere. So much of it is assembly and macro functions. The last function on the stacktrace that involves my new code is `gfb_fb_imageblit`. The entirety of that function is                  struct gfb_data *par = info->par;        sys_imageblit(info, image);        gfb_fb_update(par);      Am I reading the stacktrace wrong? Am I missing something? Any tips on how to debug this?


title: Show Display Numbers on each Display

text: On Windows, there is an option to click on a button in the display properties called like "Identify Displays", it then shows a number over each monitor for a few seconds so that you know which display is which. Is there something similar in Linux? I am running Arch, and have six (6) identical LCD flat panels, 3 dual head NVidia cards. So you can imagine why I ask :P


title: Why can't Rhythmbox play most of the files from my mt-daap share?

text: I have the Firefly Media Server (mt-daap) set up on an Ubuntu 10.10 VM, and I Ubuntu 10.10 set up on my laptop. I am running Rhythmbox and using that to play the music files off the daap share. Unfortunetly, very few of the files play -- Rhythmbox just skips right over them and jumps to the next file. It has occasionally asked me to install a codec, and everytime it has asked I have authorized it to. Almost all the files are `m4a` files, both the ones that play as well as the ones that don't/ The output of `file` for one that plays is: > ISO Media, MPEG v4 system, iTunes AAC-LC The `file` command produces the same output for files which won't play. How can I troubleshoot this further / how can I make Rhythmbox play these other files?


title: How to copy a file from a remote network to the local desktop

text: So I used SSH to remotely login to another computer on a network. I have many files that I would like to copy over to my local desktop. ![A screenshot of the files I want](http://i.stack.imgur.com/YnwJX.png) I am trying to follow this How-to : However, I think one of the problems is that I may not know what goes in place of `/home/name/dir` I tried using `scp`               scp rrtigga@pc35.cs.ucdavis.edu:CPUTimer.h /Users/Spicycurryman/Desktop      But then I got this error:               /Users/Spicycurryman/Desktop: No such file or directory


title: Play a sound file slower or faster

text: How can you play a sound slower or faster? That would be useful for listening carefully one audio passage or to listen fast forward to find a concrete passage. Is there something with the play sox command that would do this? Alternative simple solutions also welcome.


title: debian7 cron.allow & cron.deny files

text: Almost 3 weeks that, in my downtime, I try to find out where the files `cron.allow` & `cron.deny` are located in **debian7** distro. No way, it seems that by default they are not in the system. 'Just' for hardening purposes, I would have those files available in my system. My question is actually if I can just `touch` them and use them without have to make other configurations.               root@asw-deb:~# touch /etc/cron.allow     root@asw-deb:~# touch /etc/cron.deny      Or if I may have to 'map' those files, maybee editing some cron configuration files, 'saying' where cron can find the two files I created. Sorry if I sound a little nooby.


title: What is parallel memory allocation?

text: I'm trying to understand what parallel memory allocation is. I think I understand what 'memory allocation' is but I don't understand the term 'parallel'. Something to do with multiple processors perhaps? Also I have to implement parallel memory allocation in C. Any recommendation on a good website/page to look at?


title: Is there some way to find out if/when an executable was called?

text: I'm trying to figure out whether AUCTeX is actually calling `dvipng` when it renders LaTeX previews. While this may not the best way to find this out, one possibility is to check whether the executable `dvipng` is being called at all - nothing else on the system would be using it. The compilation output does not mention `dvipng`, and `top` does not show it being run. For non-emacs users, AUCTeX is an emacs package that runs inside emacs and can call external executables, i.e. `dvipng`. So, my question is: for an arbitrary executable, is there some way to check whether and if so when, it has been run in the recent past? More information, like what arguments it has been called with, would also be useful. I tried seeing whether the emacs process called `dvipng` by using `strace` (I don't know if I did this correctly) by doing               $ strace emacs corrmodel.tex 2>&1 | grep dvipng      and then running a compilation, but I just got the output               read(15, "falias 'preview-start-dvipng #[n"..., 4096) = 4096      Is this a correct procedure? Is there a better way?


title: Is 'device' synonymous with 'drive' in Unix-like OS's?

text: In Unix/Linux terminology, are the words 'device' and 'drive' synonymous?


title: Command line input while a running script displays strange symbols

text: If I use the bash shell cli and run some program which doesn't return immediately, then I input some letters (basically typing the next command before noticing the previous didn't finish) and the input always looks something like this (especially when using arrow up and down keys:)               ]]A^ or ]]B^      And I wonder, is this kind of premature input 'harmful' in anyway, or what does the returned string mean?


title: Begin root process at boot?

text: I'd like to start a background process as root when my Linux install boots. Can I just add it to a directory or a configuration file?


title: How to combine 2 -name conditions in find?

text: I would like to search for files that would not match 2 `-name` conditions. I can do it like so :               find /media/d/ -type f -size +50M ! -name "*deb" ! -name "*vmdk"      and this will yield proper result but can I join these 2 condition with OR somehow ?


title: grep + operator

text: According to the grep manual:                 * The preceding item will be matched zero or more times.       + The preceding item will be matched one or more times.      Let's test it               echo 'agb' | grep 'a.*b' # returns agb     echo 'agb' | grep 'a.+b' # returns nothing      Why + did not match three gs? According to my knowledge 3 is more than 1.


title: Asus G750JH with pre-installed Windows 8 - I want to dual boot ArchLinux

text: I have a new Asus G759JH laptop and it has Windows 8 installed on it. I have resized and fixed the partitions in a way I thought would work (now, I'm not sure that what I've done is actually going to work due to UEFI, which is the big problem here) but I have not dared touching the EFI partition other than mounting it to /boot/efi as a step on Arch's wiki suggested if you wanted to use the EFISTAB boot option. (?) So, I got to the step where I would normally install grub and chain-boot it through windows->grub->arch but I didn't want to mess anything up because I don't have time to do recovery work on it if I do mess up... Anyway, so to the point: I have my partitions for Windows, like normal, and my partitions for Linux. The Linux partitions are on the SSD disk along with the partitions for Windows. And What I'm not sure is how to give me the option of booting either Windows 8 or Arch as soon as possible. With that I mean where/how do I set it up so that I can pick either one as early in the boot process as possible. What I gathered about UEFI is that each OS can have their own EFI firmware or something and that you could boot different ones and go that way, or chain- load it if I go into Legacy mode. Or something like that. This is the whole reason I'm asking this question, becuase I'm very very confused. So how do I add the option of booting Arch through UEFI and not Legacy mode? If possible. Edit: One thing that confused me that I would want clarified is this: If I have Windows on the EFI partition (which btw is only 100mb, but as far as I know I can't resize without wiping windows) does grub just add my ArchLinux entry to it or is it a chain-load or is it wiping it clean? That's where I actually got stuck yesterday when I tried to do it on my own. I wasn't sure what it would do so I didn't do anything without being certain.


title: How can I solve the error in svn mailer.py?

text: I got this error, please help me:               Sep  6 18:29:50 dmayavanlo1 logger: Going to execute the email notification command         Sep  6 18:29:50 dmayavanlo1 logger:   File "/home/bugzilla/mysvn/hooks/mailer.py", line 972         Sep  6 18:29:50 dmayavanlo1 logger:     if data.commit_url         Sep  6 18:29:50 dmayavanlo1 logger:     ^         Sep  6 18:29:50 dmayavanlo1 logger: IndentationError: unexpected indent         Sep  6 18:42:38 dmayavanlo1 logger: Going to execute the email notification command         Sep  6 18:42:38 dmayavanlo1 logger:   File "/home/bugzilla/mysvn/hooks/mailer.py", line 972         Sep  6 18:42:38 dmayavanlo1 logger:     if data.commit_url:         Sep  6 18:42:38 dmayavanlo1 logger:     ^         Sep  6 18:42:38 dmayavanlo1 logger: IndentationError: unexpected indent


I'm preparing CentOS 6.5 x86_64 system with following mount points               /usr/local – 10 GB or more ***     /var       – 10 GB or more ***     /root      – 200 MB or more ***     /tmp       – 200 MB or more ***      The mount points are created successfully but the system does not allow me to complete installation and issues an error:               this mount point is invalid. The /root directory must be on / file system      Kindly help in this regard. Regards, Asim


title: Alternate option field

text: In a script i have a list of options that needs to be entered by the user. They are `-c cell name` -> it must be there `-n node` -> it must be there `-s server` -> it must be there Uptill here its all fine my code until here looks like `while getopts c:n:s:` The problem starts from here, I have two other fields that needs to be entered in an and/or conditon. `-i initial heap size` `-m max heap size` The user inputs either both these options or either one. Currently i have something like               #get the arguments -c for cell, -n for node, -s for server, -i for initial heap, -m for max heap     while getopts c:n:s:im opt; do             case $opt in               c)                     CELL=$OPTARG                     ;;               n)                     NODE=$OPTARG                     ;;               s)                     SERV=$OPTARG                     ;;               i)                     INI_HEAP=$OPTARG                     ;;               m)                     MAX_HEAP=$OPTARG                     ;;               ?)                     echo "a.sh -c <CELL> -n <NODE> -s <SERVER> [-i <INITAIL HEAP> | -m <MAX HEAP>"                     ;;             esac     done          #test if cell name is not null     if ! test "$CELL" || ! test "$NODE" || ! test "$SERV" ; then             echo "a.sh -c <CELL> -n <NODE> -s <SERVER> [-i <INITAIL HEAP> | -m <MAX HEAP>]"             exit 1     fi          #test if both initial heap and max heap are null     flag=0     if ! test "$INI_HEAP" ; then             if ! test "$MAX_HEAP" ; then                     flag=1;             fi     fi          if [[ $flag -eq 1 ]] ; then             echo "flag a.sh -c <CELL> -n <NODE> -s <SERVER> [-i <INITAIL HEAP> | -m <MAX HEAP>]"             exit 1     fi          #test for non numeric value of initial heap size     if [[ "$INI_HEAP" == +([0-9]) ]] ; then             continue     else             echo "num a.sh -c <CELL> -n <NODE> -s <SERVER> [-i <INITAIL HEAP> | -m <MAX HEAP>]"             exit 1     fi      How can i get to implement the and/or feature of `-i` and `-m` option.


title: Download Only a Part of a File

text: I am trying to find if it is possible to download a part of a file (any file) via `axel` or `aria2` or any other tools available. For example there is a movie file (because doing this kind of thing make sense in A/V files). How could I download only the last 50MB or the 3rd 60Mb from the first of the file?


title: Webmin administrative panel options are missing

text: * When I log into Webmin, with the Ubuntu administrative user `frank`, I cannot see most of the administrative options: ![Where O' where has my little option gone?](http://i.stack.imgur.com/nmKGT.png)   * `frank` is shown as the `Administration username` in Webmin.   * I accidentally removed the `frank` user from the `sudo` group, last week.   * My VSP provider added the `frank` account back to the sudo group.              # Allow members of group sudo to execute any command     %sudo   ALL=(ALL:ALL) ALL      It appears that Webmin is not recognizing that `frank` is back in the `sudo` group. How do I get Webmin to show all the administrative options for `frank`?


title: Linux cannot compile without GCC optimizations; implications?

text: One can find several threads on the Internet such as this: http://www.gossamer-threads.com/lists/linux/kernel/972619 where people complain they cannot build Linux with -O0, and are told that this is not supported; Linux relies on GCC optimizations to auto-inline functions, remove dead code, and otherwise do things that are necessary for the build to succeed. I've verified this myself for at least some of the 3.x kernels. The ones I've tried exit after a few seconds of build time if compiled with -O0. Is this generally considered acceptable coding practice? Are compiler optimizations, such as automatic inlining, predictable enough to rely on; at least when dealing with only one compiler? How likely is it that future versions of GCC might break builds of current Linux kernels with default optimizations (i.e. -O2 or -Os)? And on a more pedantic note: since 3.x kernels cannot compile without optimizations, should they be considered technically incorrect C code?


title: Two arrays have slightly different array size with same size disks/partitions, why?

text: I created a software RAID 5 array one year ago using mdadm v3.2.x which shipped from CentOS 6.3, after few months, I moved/assembled the array to/in Fedora 19 (now Fedora 20). It had three 3TB disks (Seagate ST3000DM001) in it, and it's almost full, so I added 2 disks and grow the array to 4 disks + 1 hot spare disk. Now it's size is **8383.55 GiB**.               # mdadm -D /dev/md127      /dev/md127:             Version : 1.2       Creation Time : Fri Jan 11 17:56:18 2013          Raid Level : raid5          Array Size : 8790792192 (8383.55 GiB 9001.77 GB)       Used Dev Size : 2930264064 (2794.52 GiB 3000.59 GB)        Raid Devices : 4       Total Devices : 5         Persistence : Superblock is persistent              Update Time : Tue Mar 25 11:04:15 2014               State : clean       Active Devices : 4     Working Devices : 5      Failed Devices : 0       Spare Devices : 1                   Layout : left-symmetric          Chunk Size : 512K                     Name : RecordBackup01:127  (local to host RecordBackup01)                UUID : dfd3bbe7:4b0231fe:9007bc4a:e106acac              Events : 7264              Number   Major   Minor   RaidDevice State            0       8       17        0      active sync   /dev/sdb1            1       8       33        1      active sync   /dev/sdc1            3       8       49        2      active sync   /dev/sdd1            5       8       81        3      active sync   /dev/sdf1                 4       8       65        -      spare   /dev/sde1      Then I created another array (RAID 6) using mdadm v3.3 (which shipped from Fedora 20) with 5 3TB disks (Toshiba DT01ACA300), but it's size is **8383.18 GiB** , which is slightly smaller than 8383.55 GiB.               # mdadm -D /dev/md127      /dev/md127:             Version : 1.2       Creation Time : Fri Mar 21 18:12:00 2014          Raid Level : raid6          Array Size : 8790402048 (8383.18 GiB 9001.37 GB)       Used Dev Size : 2930134016 (2794.39 GiB 3000.46 GB)        Raid Devices : 5       Total Devices : 5         Persistence : Superblock is persistent            Intent Bitmap : Internal              Update Time : Tue Mar 25 11:18:51 2014               State : active       Active Devices : 5     Working Devices : 5      Failed Devices : 0       Spare Devices : 0                   Layout : left-symmetric          Chunk Size : 512K                     Name : RecordBackup02:127  (local to host RecordBackup02)                UUID : 923c9658:12739258:506fc8b0:f8c5edf3              Events : 8172              Number   Major   Minor   RaidDevice State            0       8       17        0      active sync   /dev/sdb1            1       8       33        1      active sync   /dev/sdc1            2       8       49        2      active sync   /dev/sdd1            3       8       65        3      active sync   /dev/sde1            4       8       81        4      active sync   /dev/sdf1      The partition size of each disk in the two arrays are identical (all partitions have 5860531087 logical sectors, see the following partition information), so why the array size are different? Is it caused by different mdadm version or different array level or something else? ## Array 1 (RAID 5) disks/partitions information               # LANG=en parted /dev/sdb "unit s print all"                                                                                Model: ATA ST3000DM001-1CH1 (scsi)     Disk /dev/sdb: 5860533168s     Sector size (logical/physical): 512B/4096B     Partition Table: gpt     Disk Flags:           Number  Start  End          Size         File system  Name  Flags      1      2048s  5860533134s  5860531087s               pri               Model: ATA ST3000DM001-1CH1 (scsi)     Disk /dev/sdc: 5860533168s     Sector size (logical/physical): 512B/4096B     Partition Table: gpt     Disk Flags:           Number  Start  End          Size         File system  Name     Flags      1      2048s  5860533134s  5860531087s  ext4         primary               Model: ATA ST3000DM001-1CH1 (scsi)     Disk /dev/sdd: 5860533168s     Sector size (logical/physical): 512B/4096B     Partition Table: gpt     Disk Flags:           Number  Start  End          Size         File system  Name     Flags      1      2048s  5860533134s  5860531087s  ext4         primary               Model: ATA ST3000DM001-1CH1 (scsi)     Disk /dev/sde: 5860533168s     Sector size (logical/physical): 512B/4096B     Partition Table: gpt     Disk Flags:           Number  Start  End          Size         File system  Name     Flags      1      2048s  5860533134s  5860531087s               primary               Model: ATA ST3000DM001-1CH1 (scsi)     Disk /dev/sdf: 5860533168s     Sector size (logical/physical): 512B/4096B     Partition Table: gpt     Disk Flags:           Number  Start  End          Size         File system  Name     Flags      1      2048s  5860533134s  5860531087s               primary                         Model: Linux Software RAID Array (md)     Disk /dev/md127: 17581584384s     Sector size (logical/physical): 512B/4096B     Partition Table: loop     Disk Flags:           Number  Start  End           Size          File system  Flags      1      0s     17581584383s  17581584384s  xfs      ## Array 2 (RAID 6) disks/partitions information               # LANG=en parted /dev/sdb "unit s print all"     Model: ATA TOSHIBA DT01ACA3 (scsi)     Disk /dev/sdb: 5860533168s     Sector size (logical/physical): 512B/4096B     Partition Table: gpt     Disk Flags:           Number  Start  End          Size         File system  Name     Flags      1      2048s  5860533134s  5860531087s               primary               Model: ATA TOSHIBA DT01ACA3 (scsi)     Disk /dev/sdc: 5860533168s     Sector size (logical/physical): 512B/4096B     Partition Table: gpt     Disk Flags:           Number  Start  End          Size         File system  Name     Flags      1      2048s  5860533134s  5860531087s               primary               Model: ATA TOSHIBA DT01ACA3 (scsi)     Disk /dev/sdd: 5860533168s     Sector size (logical/physical): 512B/4096B     Partition Table: gpt     Disk Flags:           Number  Start  End          Size         File system  Name     Flags      1      2048s  5860533134s  5860531087s               primary               Model: ATA TOSHIBA DT01ACA3 (scsi)     Disk /dev/sde: 5860533168s     Sector size (logical/physical): 512B/4096B     Partition Table: gpt     Disk Flags:           Number  Start  End          Size         File system  Name     Flags      1      2048s  5860533134s  5860531087s               primary               Model: ATA TOSHIBA DT01ACA3 (scsi)     Disk /dev/sdf: 5860533168s     Sector size (logical/physical): 512B/4096B     Partition Table: gpt     Disk Flags:           Number  Start  End          Size         File system  Name     Flags      1      2048s  5860533134s  5860531087s               primary                                   Model: Linux Software RAID Array (md)     Disk /dev/md127: 17580804096s     Sector size (logical/physical): 512B/4096B     Partition Table: loop     Disk Flags:           Number  Start  End           Size          File system  Flags      1      0s     17580804095s  17580804096s  xfs


title: Does Public and Private key remain the same for a user or system?

text: I had requested access to a git repository and it was granted after I gave my public and private keys. ( generated using the common method `ssh-keygen -t rsa` which gave me :               <user> @ <hostname> : ~/.ssh $ > ll     total 20K     -rw-------. 1 <user> 1.7K Mar 02 10:14 id_rsa     -rw-r--r--. 1 <user>  407 Mar 02 10:14 id_rsa.pub     -rw-r--r--. 1 <user> 1.3K Mar 01 14:25 known_hosts      ) However, I accidentally deleted my home directory. Fortunately, I had the backup of all my important files and so, it was not much of a hassle to recover those. But, trying to clone the git repository again using the old public and private key, I could not. The git asked me for a password just like it would treat any non-authorised users. So, I then had to request the access again using my current public and private keys. Upon comparison, I found out that, the new keys are in fact different from the first ones. * * * So, my question is,   1. Why does the public and private key change for a user in the same machine?   2. In continuation of that question, why cant I use my old public and private key to access a repository when nothing else has changed?   3. Will the keys change if I create them again using `ssh-keygen -t rsa`? * * * I can provide more info if needed.


title: How to provide crt1.o and crti.o for LFS?

text: I have tried to create a Linux distribution with the Linux From Scratch (LFS) website. Everything went good until step **5.7. Glibc-2.19** , but when I tried:               $LFS_TGT-gcc dummy.c      I get:               /tools/lib/gcc/i686-lfs-linux-gnu/4.8.2/../../../../i686-lfs-linux-gnu/bin/ld: cannot find crt1.o: No such file or directory     /tools/lib/gcc/i686-lfs-linux-gnu/4.8.2/../../../../i686-lfs-linux-gnu/bin/ld: cannot find crti.o: No such file or directory      So I googled it for a while, and I realize that Debian changed some directory, and I searched for those files and I found them in:               /usr/libx32/      I realize from those searches that it happen with trying to compile 64 bit in 32 bit structures, and I should create virtual link of theme in:               /tools/lib/gcc/i686-lfs-linux-gnu/4.8.2/      But when I did that I got:               /tools/lib/gcc/i686-lfs-linux-gnu/4.8.2/crt1.o: file not recognized: File format not recognized      In this step I really don't know what to do next. How can I fix it?


title: Can I combine two "keybinds" into one in Openbox?

text: I'm using Lubuntu 13.04 with its default window manager, Openbox. Is there a way to edit `~/.config/openbox/lubuntu-rc.xml` to combine the following two "keybinds" in the "keyboard" section into one?               <!-- Launch gedit -->     <keybind key="W-g">       <action name="Execute">         <command>gedit</command>       </action>     </keybind>      and               <!-- Undecorate -->     <keybind key="C-S-d">       <action name="Undecorate"/>     </keybind>      In other words, I'd like to open `gedit` without window decorations. I know I can have the same result by retaining the first keybind as it is and having the following entry in the "applications" section of `lubuntu-rc.xml`:               <application name="gedit" type="normal">       <decor>no</decor>     </application>


title: location of struct ifnet on AIX

text: In which header file on AIX struct ifnet is defined? I want to use this structure to get network interface information on AIX.


title: How to customize vertical panel in cinnamon menu?

text: ![enter image description here](http://i.stack.imgur.com/5v02c.png) I want to edit highlited area: for example, change firefox with chromium or remove any item. Menu editor can change only right part of menu, changing default application has no effect on this panel.


title: Does the Linux Mint installer include an option to replace/upgrade ONLY Linux Mint on a dual boot system?

text: I have a dual boot system running Windows 7 64-bit and Linux Mint 16 (with Cinnamon). I'd like to replace Mint 16 with Mint 17 (I'm OK with completely wiping JUST Mint). I want to leave Windows just like it is. Does the Linux Mint installer include an option that basically says "yeah... we're going to replace your old linux mint install but not touch anything else." I thought there was something for this but the release notes for Mint 17 says:               In the installer, "Replace OS with Linux Mint" means erase the entire drive          If another operating system is present on the disk, the second option suggested by the installer is to "replace the OS with Linux Mint".          This option doesn't just wipe the partition used by the mentioned OS, but the entire drive and all its partitions.          For more information on this issue please visit: https://bugs.launchpad.net/linuxmint/+bug/1325786


title: How to update 'command cache' after change of soft links?

text: I have changed multiple soft links on my system with `ln -f -s`. When I view the link with `ls -l`, I see they point to the right target. However, when I try to run the command, it still tries to use the 'old' target. Is there a Linux command to refresh the 'command cache' to tell the system to use the newly-created soft links? For example:               OPEN_MPI_PATH=/usr/lib64/mpi/gcc/openmpi     ln -f -s ${OPEN_MPI_PATH}/bin/mpirun  /usr/bin/mpirun     ls -l /usr/bin/mpirun     $ /usr/bin/mpirun -> /usr/lib64/mpi/gcc/openmpi/bin/mpirun      Execution of `mpirun -np 4 hello_world` results in a call to Intel MPI, which was an 'old' target.


title: Changing permissions on an NFS mount + sharing directories with a guest VM

text: I'm building a development environment where folders from a host environment (OSX) are mounted in VirtualBox VMs running Ubuntu guests. Our experience is that straightforward VirtualBox shared directories are too slow, so we've typically done this by mounting the directory as an NFS mount within the guest. Real-time editing from the host environment is a requirement. The problem with this is that operations like `chown` and `chgrp` fail, and we need to replicate something close to our production environment (e.g. `www- data` owning the files used by Apache). bindfs looked like a promising possibility: > bindfs - mirrors or overlays a local directory with altered permissions But it doesn't seem to be possible to change permissions with native unix utilities and system calls. This won't work for me, as I need to integrate with existing configuration management systems (Salt, Puppet) that provision the boxes. Is there some other way to get an NFS mount to look like a regular directory as far as permissions go? Or another alternative for mounting a directory into a VirtualBox VM? **EDIT** : Here is the output of mount:               192.168.34.1:/Users/$me/src/states /etc/apps/state type nfs (rw,vers=3,addr=192.168.34.1)     192.168.34.1:/Users/$me/src/apps on /srv/apps type nfs (rw,vers=3,addr=192.168.34.1)      When I say that changing permissions 'fails', I mean that I get "operation not permitted" errors. For example:               $ ls -l /srv/www     total 8     drwxrwxr-x 4 501 dialout 136 May 31 16:20 default_vhost     drwxrwxr-x 5 501 dialout 170 May 31 16:20 default_vhost_ssl     $ chown root /srv/www/*     chown: changing ownership of `/srv/www/default_vhost': Operation not permitted     chown: changing ownership of `/srv/www/default_vhost_ssl': Operation not permitted


title: Source of biggest machine-code optimization

text: I've read somewhere that recompiling `libc` with the `-march=native` and `-mtune=native` flags will provide the maximum benefit for programs, where shared libraries are used instead of static libraries. Is this true, and might there be any additional benefit by recompiling other programs?


title: varnish start failed + nginx

text: I did install `varnish` with this guide. Then I want to start it, but `FAILD` and I cannot start `varnish`. I ran it in debug mode and I got this error: `No VCL Available` ! What is the problem here? Also enabled `varnishlog`, but no error log there.


title: Find and regex

text: What am I doing wrong with this find expression?               ; touch ook ooks     ; find . -name 'ook' -or -name 'ooks' -type f     ./ook     ./ooks     ; find . -name 'ook[s]?' -type f           [returns nothing]     ; echo $?     0


title: ext4 drive takes forever to ls?

text: I've had an external HDD formatted in ext4 for a while. For some reason, it's started to take forever to list directories. Sometimes just running `ls /mount/point/of/drive` takes minutes, sometimes that directory will `ls` fine, but not directories in it, etc. Could this be a sign that the drive it getting old, or even about to fail? Copying files is as fast as ever over USB 2.


title: Swap alt and super

text: I have a Macbook Air that runs Linux. I want to swap the `alt` and `super` keys in both sides of the keyboard with each other. How do I do this with cli tools? **Update** Following Drav Sloan's answer I used the following:               keycode 64 = Alt_L     keycode 133 = Super_L     remove Mod1 = Alt_L     remove Mod4 = Super_L     add Mod1 = Super_L     add Mod4 = Alt_L          keycode 108 = Alt_R     keycode 134 = Super_R     remove Mod1 = Alt_R     remove Mod4 = Super_R     add Mod1 = Super_R     add Mod4 = Alt_R


title: Strange ping behavior

text: I built a linux distribution using the Yocto Project, with little customization. It runs on a Single Board Computer. When I ping this machine, I get the following result:               PING 10.128.11.1 (10.128.11.1) 56(84) bytes of data.     64 bytes from 10.128.11.1: icmp_req=1 ttl=64 time=11.6 ms     64 bytes from 10.128.11.1: icmp_req=2 ttl=64 time=9.79 ms     64 bytes from 10.128.11.1: icmp_req=3 ttl=64 time=7.76 ms     64 bytes from 10.128.11.1: icmp_req=4 ttl=64 time=5.78 ms     64 bytes from 10.128.11.1: icmp_req=5 ttl=64 time=3.75 ms     64 bytes from 10.128.11.1: icmp_req=6 ttl=64 time=1.80 ms     64 bytes from 10.128.11.1: icmp_req=7 ttl=64 time=99.7 ms     64 bytes from 10.128.11.1: icmp_req=8 ttl=64 time=97.8 ms     64 bytes from 10.128.11.1: icmp_req=9 ttl=64 time=95.8 ms     64 bytes from 10.128.11.1: icmp_req=10 ttl=64 time=93.8 ms     64 bytes from 10.128.11.1: icmp_req=11 ttl=64 time=91.8 ms     64 bytes from 10.128.11.1: icmp_req=12 ttl=64 time=89.8 ms     64 bytes from 10.128.11.1: icmp_req=13 ttl=64 time=87.8 ms     -- snip --     64 bytes from 10.128.11.1: icmp_req=52 ttl=64 time=15.7 ms     64 bytes from 10.128.11.1: icmp_req=53 ttl=64 time=13.7 ms     64 bytes from 10.128.11.1: icmp_req=54 ttl=64 time=11.7 ms     64 bytes from 10.128.11.1: icmp_req=55 ttl=64 time=9.77 ms     64 bytes from 10.128.11.1: icmp_req=56 ttl=64 time=7.78 ms     64 bytes from 10.128.11.1: icmp_req=57 ttl=64 time=5.75 ms     64 bytes from 10.128.11.1: icmp_req=58 ttl=64 time=3.78 ms     64 bytes from 10.128.11.1: icmp_req=59 ttl=64 time=1.76 ms     64 bytes from 10.128.11.1: icmp_req=60 ttl=64 time=99.7 ms      The value keeps decreasing by 2 ms for each packet, then it goes up to 100 ms, and decreases by 2ms again. When I configure the interface, I get strange errors (but the interface works):               [   65.404850] irq 15: nobody cared (try booting with the "irqpoll" option)     [   65.404957] Pid: 661, comm: ifconfig Not tainted 3.8.1-yocto-standard #2     [   65.405036] Call Trace:     [   65.405136]  [<c10a9a39>] __report_bad_irq+0x29/0xd0     [   65.405237]  [<c13b18fd>] ? add_interrupt_randomness+0x1d/0x160     [   65.405329]  [<c10a9e65>] note_interrupt+0x165/0x1b0     -- snip --         [   65.405617]  [<c112fcc3>] ? sys_ioctl+0x63/0x90     [   65.405617]  [<c1662970>] ? syscall_call+0x7/0xb     [   65.405617] handlers:     [   65.405617] [<c1473100>] rtl8139_interrupt     [   65.405617] Disabling IRQ #15      I searched for variables in `sysctl -A` output that could cause this behaviour, changed a few, but to no avail. I diabled IPv6. I tried a RT- kernel. I tried the kernel parameters `acpi=noirq` and `irqpoll`. I checked `dmesg` and saw that the driver registered the IRQ15 correctly:               [    6.926691] 8139too: 8139too Fast Ethernet driver 0.9.28     [    6.927813] 8139too 0000:00:09.0 eth0: RealTek RTL8139 at 0x0001fc00, 00:05:b7:dd:53:25, IRQ 15      I have searched Documentation/ and Documentation/networking/ folders of the kernel for information, but found none. I used Google extensively, didn't find anything. Any ideas of what might be the source of this behavior?


title: Password length and complexity

text: I am using CentOS and I want to set the minimum password length, minimum password expiry , maximum password expiry and password complexity in my system. I have looked over some tutorials to change the system-auth file, but it didnt work. Hoping to get some answers here. Thanks in advance :D