title: pfsense long ping to google

text: I have a pfsense box set up. What happens is I set a rule so I can't hit the admin interface `192.168.3.1` from the box. With the rule enabled               --- www.l.google.com ping statistics ---          2 packets transmitted, 2 received, 0% packet loss, time 5080ms     rtt min/avg/max/mdev = 37.684/37.776/37.869/0.215 ms     root@bad-apple:/etc#      Rule disabled               --- www.l.google.com ping statistics ---     2 packets transmitted, 2 received, 0% packet loss, time 1001ms     rtt min/avg/max/mdev = 42.064/44.104/46.144/2.040 ms      disallow Rule that causes it.               ID  Proto   Source  Port    Destination     Port    Gateway     Queue   Schedule    Description                       *   APPLESERVER net     *   192.168.3.1     *           *        none           I don't want the server to be able to hit admin interface, but would like to hit internet for configuration of the machine. Has anybody had this problem before? I have below this disallow rule an allow all from APPLESERVER NET to * because if I set destination to WAN net dns dies. Well what happens is with the rule enabled I ping and it shows up about every 5-10 seconds for a line to appear in ssh. Without the rule it runs like a normal machine, very fast-like. This issue doesn't either of my LANS and they have the same respective dns servers and block [pfsense]admin. [one lAN is admin lan so no block rule on that] I run everything on LAN2 and plug in manually to LAN1 for administration. Update - added /tmp/debug.config * * *               #System aliases          loopback = "{ lo0 }"     WAN = "{ re0 }"     ADMIN = "{ re1 }"     LAN = "{ re2 }"     APPLESERVER = "{ re3 }"          #SSH Lockout Table     table <sshlockout> persist     table <webConfiguratorlockout> persist     #Snort tables     table <snort2c>          table <virusprot>          # User Aliases      table <EasyRuleBlockHostsWAN> {   10.35.0.1/32 }      EasyRuleBlockHostsWAN = "<EasyRuleBlockHostsWAN>"          # Gateways     GWOPT1GW = " route-to ( re2 192.168.1.1 ) "     GWWAN = " route-to ( re0 wan ip ) "               set loginterface re1     set optimization normal     set limit states 23000     set limit src-nodes 23000          set skip on pfsync0          scrub in on $WAN all    fragment reassemble     scrub in on $ADMIN all    fragment reassemble     scrub in on $LAN all    fragment reassemble     scrub in on $APPLESERVER all    fragment reassemble               no nat proto carp     no rdr proto carp     nat-anchor "natearly/*"     nat-anchor "natrules/*"               # Outbound NAT rules          # Subnets to NAT      tonatsubnets    = "{ 192.168.1.0/24 192.168.2.0/24 192.168.3.0/24 127.0.0.0/8  }"     nat on $WAN  from $tonatsubnets port 500 to any port 500 -> 24.220.153.106/32 port 500       nat on $WAN  from $tonatsubnets to any -> 24.220.153.106/32 port 1024:65535                 # Load balancing anchor     rdr-anchor "relayd/*"     # TFTP proxy     rdr-anchor "tftp-proxy/*"     rdr pass on re2 proto udp from any to any port tftp -> 127.0.0.1 port 6969     table <negate_networks> { 24.220.152.0/23 192.168.1.0/24 192.168.2.0/24 192.168.3.0/24 }     # NAT Inbound Redirects     rdr on re0 proto { tcp udp } from any to any port 21 -> 192.168.2.3     rdr on re0 proto { tcp udp } from any to any port 5000:5050 -> 192.168.2.3     rdr on re0 proto { tcp udp } from any to any port 80 -> 192.168.3.2     rdr on re0 proto { tcp udp } from any to any port 443 -> 192.168.3.2     # UPnPd rdr anchor     rdr-anchor "miniupnpd"          anchor "relayd/*"     #---------------------------------------------------------------------------     # default deny rules     #---------------------------------------------------------------------------     block in log all label "Default deny rule"     block out log all label "Default deny rule"          # We use the mighty pf, we cannot be fooled.     block quick proto { tcp, udp } from any port = 0 to any     block quick proto { tcp, udp } from any to any port = 0          # Block all IPv6     block in quick inet6 all     block out quick inet6 all          # Snort package     block quick from <snort2c> to any label "Block snort2c hosts"     block quick from any to <snort2c> label "Block snort2c hosts"          # SSH lockout     block in log quick proto tcp from <sshlockout> to any port 22 label "sshlockout"          # webConfigurator lockout     block in log quick proto tcp from <webConfiguratorlockout> to any port 443 label "webConfiguratorlockout"     block in quick from <virusprot> to any label "virusprot overload table"     table <bogons> persist file "/etc/bogons"     # block bogon networks     # http://www.cymru.com/Documents/bogon-bn-nonagg.txt     block in log quick on $WAN from <bogons> to any label "block bogon networks from WAN"     antispoof for re0     # block anything from private networks on interfaces with the option set     antispoof for $WAN     block in log quick on $WAN from 10.0.0.0/8 to any label "block private networks from wan block 10/8"     block in log quick on $WAN from 127.0.0.0/8 to any label "block private networks from wan block 127/8"     block in log quick on $WAN from 172.16.0.0/12 to any label "block private networks from wan block 172.16/12"     block in log quick on $WAN from 192.168.0.0/16 to any label "block private networks from wan block 192.168/16"     # allow our DHCP client out to the WAN     pass in on $WAN proto udp from any port = 67 to any port = 68 label "allow dhcp client out WAN"     pass out on $WAN proto udp from any port = 68 to any port = 67 label "allow dhcp client out WAN"     # Not installing DHCP server firewall rules for WAN which is configured for DHCP.     antispoof for re1     # allow access to DHCP server on ADMIN     pass in quick on $ADMIN proto udp from any port = 68 to 255.255.255.255 port = 67 label "allow access to DHCP server"     pass in quick on $ADMIN proto udp from any port = 68 to 192.168.1.1 port = 67 label "allow access to DHCP server"     pass out quick on $ADMIN proto udp from 192.168.1.1 port = 67 to any port = 68 label "allow access to DHCP server"     antispoof for re2     # allow access to DHCP server on LAN     pass in quick on $LAN proto udp from any port = 68 to 255.255.255.255 port = 67 label "allow access to DHCP server"     pass in quick on $LAN proto udp from any port = 68 to 192.168.2.1 port = 67 label "allow access to DHCP server"     pass out quick on $LAN proto udp from 192.168.2.1 port = 67 to any port = 68 label "allow access to DHCP server"     antispoof for re3     # allow access to DHCP server on APPLESERVER     pass in quick on $APPLESERVER proto udp from any port = 68 to 255.255.255.255 port = 67 label "allow access to DHCP server"     pass in quick on $APPLESERVER proto udp from any port = 68 to 192.168.3.1 port = 67 label "allow access to DHCP server"     pass out quick on $APPLESERVER proto udp from 192.168.3.1 port = 67 to any port = 68 label "allow access to DHCP server"          # loopback     pass in on $loopback all label "pass loopback"     pass out on $loopback all label "pass loopback"     # let out anything from the firewall host itself and decrypted IPsec traffic     pass out all keep state allow-opts label "let out anything from firewall host itself"     pass out route-to ( re0 wan ip ) from 24.220.153.106 to !24.220.152.0/23 keep state allow-opts label "let out anything from firewall host itself"     # make sure the user cannot lock himself out of the webConfigurator or SSH     pass in quick on re1 proto tcp from any to (re1) port { 80 443  22 } keep state label "anti-lockout rule"          # User-defined rules follow          anchor "userrules/*"     block  in  quick  on $WAN reply-to ( re0 wan ip )  from   $EasyRuleBlockHostsWAN to any  label "USER_RULE: Easy Rule: Blocked from Firewall Log View"     pass   in  quick  on $WAN reply-to ( re0 wan ip )  proto { tcp udp }  from any to   192.168.2.3 port 21   label "USER_RULE: NAT "     pass   in  quick  on $WAN reply-to ( re0 wan ip )  proto { tcp udp }  from any to   192.168.2.3 port 4999 >< 5051   label "USER_RULE: NAT "     pass   in  quick  on $WAN reply-to ( re0 wan ip )  proto { tcp udp }  from any to   192.168.3.2 port 80   label "USER_RULE: NAT Rule for web 80"     pass   in  quick  on $WAN reply-to ( re0 wan ip )  proto { tcp udp }  from any to   192.168.3.2 port 443   label "USER_RULE: NAT ssl web "     block  in  quick  on $WAN reply-to ( re0 wan ip )  from any to any  label "USER_RULE"     block  in  quick  on $ADMIN  from any to any  label "USER_RULE"     block  in  quick  on $LAN  from any to   192.168.2.1  label "USER_RULE"     block  in  quick  on $LAN  from any to   192.168.1.1  label "USER_RULE"     block  in  quick  on $LAN  from any to   192.168.3.1  label "USER_RULE"     pass  in  quick  on $LAN  from 192.168.2.1/24 to any keep state  label "USER_RULE: Default allow OPT1 to any rule"     pass  in  quick  on $LAN  proto tcp  from any to 192.168.3.1/24 port 22  flags S/SA keep state  label "USER_RULE"     pass  in  quick  on $LAN  proto tcp  from any to 192.168.3.1/24 port 80  flags S/SA keep state  label "USER_RULE"     pass  in  quick  on $LAN  proto tcp  from any to 192.168.3.1/24 port 81  flags S/SA keep state  label "USER_RULE"     pass  in  quick  on $LAN  proto { tcp udp }  from any to   192.168.3.2 port 10000  keep state  label "USER_RULE"     pass  in  quick  on $LAN  proto tcp  from 192.168.2.1/24 to 192.168.3.1/24 port 443  flags S/SA keep state  label "USER_RULE"     block  in  quick  on $LAN  from any to any  label "USER_RULE"     block  in  quick  on $APPLESERVER  from any to 192.168.2.1  label "USER_RULE"     block  in  quick  on $APPLESERVER  proto { tcp udp }  from any to   192.168.3.1 port 80   label "USER_RULE"     block  in  quick  on $APPLESERVER  proto { tcp udp }  from any to   192.168.3.1 port 443   label "USER_RULE"     block  in  quick  on $APPLESERVER  proto { tcp udp }  from any to   192.168.3.1 port 22   label "USER_RULE"     block  in  quick  on $APPLESERVER  from any to 192.168.1.0/24  label "USER_RULE"     pass  in  quick  on $APPLESERVER  from 192.168.3.1/24 to any keep state  label "USER_RULE"          # VPN Rules     anchor "tftp-proxy/*"      I've updated it with the debug.config file. So my workaround for the fix was to only block 22,80,443 from the 192.168.3.0/24 subnet [appleserver subnet]. This fixed my speed issue, but I'm not sure if this is a great way for a correct fix. Perhaps it could be a dns issue, but then entering in a wan ip on a remote machine takes about the same[long] amount of time with all block rule enabled as domain name route.


title: Map Caps Lock to Control in Linux Mint

text: I am running the latest version of Linux Mint with Cinnamon. I'm trying to map caps lock to control, but I cannot figure out how to do it. All web searches i've done has lead me to older versions of Linux Mint (there is no keyboard layout option in my settings). How can I do this?


title: Cannot enter a forward slash character when logging in via ssh

text: When I `ssh` into one of our servers, I cannot enter a forward slash character, which makes it difficult to do pretty much anything (like `ls /`). **How can I get the forward slash to work?** Some additional information:   * `/etc/issue` claims it's running "CentOS release 5.7 (Final)"   * The only way I know this is by running `ssh me@some-host cat /etc/issue`   * I'm using Mac OS X Terminal.app, and I've never had trouble with this, on Centos 5 systems or otherwise   * I don't know who or how the machine was built and set up   * `echo $TERM` reports `xterm-256color`   * i don't know if this makes sense to anyone (it doesn't make sense to me), but i `diff`'ed the `/etc/inputrc` of the malfunctioning server with one that works and got the following:              $ diff /tmp/{good,bad}_inputrc     1c1     < # do not bell on tab-completion     ---     > /# do not bell on tab-completion     37a38,49     >      > # Home Key     > "\e[7~":beginning-of-line     >      > # End Key     > "\e[8~":end-of-line     >      > # Delete Key     > "\e[3~":delete-char     >      > # Insert Key     > "\e[2~":paste-from-clipboard


title: what is $# used in a script for?

text: In many scripts in my organisation and even on online tutorials, this is a common `if` clause I come across :               if [ $# -eq "somethng" -o $# -eq "somethng" ]      what does this `$#` condition match--some user input by default?   Can this be used on command line directly too??


title: Debian: Screen stays black occasionally during boot with Asus P8Z68-V Pro/Gen3

text: I'm running Debian Wheezy on a Asus P8Z68-V Pro/Gen3 mainboard. My graphics card is a Radeon 6850, I'm using the Open Source radeon drivers (xserver-xorg- video-radeon). During boot, my screen occasionally stays black after boot menu selection. I cannot even switch to a terminal console. It freezes forever in that state. Its really strange cause it only happens around half of the time and I cannot see any cause for this behavior. The other half of the times Debian boots successfully.


title: How to direct bash network request through a socket5 proxy?

text: I know how to use `http_proxy` to redirect http request, but how to redirect the data with a socket5 proxy such as a SSH tunnel?


title: How do I prevent wget from loading Apache directory listings in different orders?

text: I’m trying to recursively download a directory using this command:               wget -r -l2 --no-parent -A "*.pdf" -nd -N -e robots=off http://…      The script gets executed every 15 minutes, so I want to reduce the requests as much as possible. I saw that there are a lot of requests like `?C=M;O=A` which originate from the directory order modifier buttons like _Name_ , _Date_ or _Size_ (example). How can I prevent these requests from happening?


title: Is uninterruptible sleep the only case?

text: French wikipedia say: > Un processus en sommeil ininterruptible ne peut s'arrêter (ni libérer ses > ressources) même lorsque SIGKILL apparaît. **Il s'agit d'un des rares cas > dans lequel un système UNIX doit être redémarré afin de régler un problème > logiciel temporaire.** In english (c/p from old revision of english wikipedia): > An uninterruptibly sleeping process may not terminate (and free its > resources) even when sent SIGKILL. > > **This is one of the few cases in which a UNIX system may have to be > rebooted to solve a temporary software problem.** It imply that there is other case than uninterruptible sleep than can need a reboot to solve temporary problem, I thought it was the only one. What are the other cases?


Where does Samba 4 store user passwords? How can I import my password hashes from Samba 3 in Samba 4? I am using my own LDAP server with samba 3, and the password hash is stored within the `userpassword` attribute of the user entry (passdb backend: ldapsam). However Samba 4 uses it own LDAP server and shema, and it does not seem to work when I copy this attribute in the Samba 4 user entry. How can I store Samba 4 passwords within an LDAP attribute?


title: Symlink with @ symbol?

text: I found that there is a symlink generated by ruby which has a `@` sign at the path: > default -> /Users/MyUserName/.rvm/rubies/ruby-2.0.0-p247@gemset The folder `/Users/MyUserName/.rvm/rubies/ruby-2.0.0-p247` exists, but what is the `@gemset` part ?


title: Weird SSH/SCP progress meter behavior

text: I've got a very weird SSH behavior and it's making me a bit nervous. Basically the progress meter is totally bogus: so bogus that it's nearly useless. And I fear that there may be something else going on (more on this below). Basically I only have a 60 KB/s upload link or so, yet every single scp I initiate starts saying it's doing 2 MB/s. Then it invariably tries to "fix" that number, slowly converging toward the real value. Then, for "big" files (a few MB or more), it invariably stalls at 100% for many seconds (and eventually it succeeds and I get back to the prompt). The output looks like this:               ...     test.tgz 16% 2112KB   2.1MB/s   00:04 ETA     test.tgz 17% 2208KB   1.7MB/s   00:06 ETA     test.tgz 18% 2320KB   1.2MB/s   00:08 ETA     test.tgz 19% 2448KB   1.1MB/s   00:08 ETA     test.tgz 20% 2576KB 942.2KB/s   00:10 ETA     test.tgz 21% 2704KB 697.3KB/s   00:14 ETA     test.tgz 22% 2832KB 576.3KB/s   00:16 ETA     test.tgz 23% 2960KB 478.3KB/s   00:20 ETA     test.tgz 24% 3088KB 399.0KB/s   00:23 ETA     test.tgz 25% 3216KB 334.7KB/s   00:27 ETA     test.tgz 26% 3344KB 282.6KB/s   00:32 ETA     test.tgz 27% 3472KB 240.4KB/s   00:37 ETA     test.tgz 28% 3600KB 185.6KB/s   00:48 ETA     test.tgz 29% 3728KB 161.9KB/s   00:54 ETA     test.tgz 30% 3856KB 142.7KB/s   01:01 ETA     ...      (it's on a single line: I did paste multiple lines here, which I got using `scp -vvv` to better explain my issue). At the end, when the output is invariably stuck at 100%, there's actually quite a lot of data missing: I've checked this on the other end and the file is definitely not there in its entirety yet. All the measurements in percentage are basically pointless: when it says that 80% of a 12 MB file are there, there are only about 65% on the server. What can explain this? I'm posting here because I was wondering how these numbers would look like if a man-in-the-middle attack was happening close to my system (maybe on a compromised router or something). I'm using Linux and SSH / SCP since many years and I don't remember that these numbers were _that_ off. **EDIT** Download works as expected: if I scp from the remote host to my computer, then the %, ETA and KB/s are all correct.


title: Robustly segmenting a csv file containing noisy data

text: Say I have a csv file with these columns:               timestamp,cpu,memory      An example of the shape of the actual data would be this chart: ![cpu/mem csv data as chart](http://i.stack.imgur.com/gdvrb.png) Having the data visualized in this way, it's easy for the human eye to make out where any of the 4 cpu intensive activities start and end. What would be an easy way, using standard unix cmd line tools, ideally not resorting to `R` or `octave` etc, to **"grep" only the 8 lines of the file that denote the onset and end of these 4 activities** , based on the "cpu" column? Obviously this is somewhat fuzzy, and there is noise in the data, but any solution that gives me 8 lines that are somewhere close to onset/end is appreciated. A short excerpt of the csv file, showing only the first of those 4 bursts of activity:               10:44:21.310,0,53567488     10:44:22.310,1.56257,53575680     10:44:23.326,0,53854208     10:44:24.325,34.3761,57405440     10:44:25.325,73.43985,61747200     10:44:26.325,3.1251,69459968     10:44:27.325,0,69459968     10:44:28.325,0,69459968     10:44:29.325,65.6271,74756096     10:44:30.325,53.1267,77783040     ...     10:50:56.450,35.93865,142700544     10:50:57.450,10.93785,142897152     10:50:58.450,1.56255,142897152     10:50:59.450,0,142897152     10:51:00.450,0,142897152     10:51:01.450,0,142897152      Ideally, this would result in the following 2 lines.               10:44:24.325,34.3761,57405440     10:50:58.450,1.56255,142897152      However, as there is no cpu activity for a couple of seconds between `10:44:26.325` and `10:44:28.325`, I don't expect the answer to be that smart and do something akin to 'smoothing' the data. So if a csv snippet like the above would e.g. yield the following 4 lines, that would suffice.               10:44:24.325,34.3761,57405440     10:44:26.325,3.1251,69459968     10:44:29.325,65.6271,74756096     10:50:58.450,1.56255,142897152


title: mmcqd hangs and burns the CPU on the embedded device

text: On my embedded system I'm writing an intensive video stream to SD. I don't mount partitions, just write to `/dev/mmcblk0p1`. After a while my writing process hangs. I get               [16952.240000] INFO: task vrec:1297 blocked for more than 120 seconds.      `[mmcqd]` eats 90% and dmesg shows me               [64142.350000] mmc0: starting CMD13 arg e6240000 flags 00000015     [64142.350000] mmc0: req done (CMD13): 0: 00000c00 00000000 00000000 00000000     [64142.350000] mmc0: starting CMD13 arg e6240000 flags 00000015     [64142.350000] mmc0: req done (CMD13): 0: 00000c00 00000000 00000000 00000000     [64142.350000] mmc0: starting CMD13 arg e6240000 flags 00000015     [64142.350000] mmc0: req done (CMD13): 0: 00000c00 00000000 00000000 00000000     [64142.350000] mmc0: starting CMD13 arg e6240000 flags 00000015     [64142.350000] mmc0: req done (CMD13): 0: 00000c00 00000000 00000000 00000000     [64142.350000] mmc0: starting CMD13 arg e6240000 flags 00000015     [64142.350000] mmc0: req done (CMD13): 0: 00000c00 00000000 00000000 00000000      After a card eject/inject all works fine. Please, help me to debug it. Linux kernel: 2.6.28.9


title: sed - how to (not) match unmatched brackets

text: How can I do my operation only on lines that close their brackets? For example I want to change ".is" lines and add a bracket but not for lines with unclosed brackets. so these are changed               this_thing.is 24  ->   (this_thing).is 24     that.is 50        ->   (that).is 50     a[23].is == 10    ->     a[23].is == 10     a.is true         ->   (this_thing).is 24     this_thing.is 24  ->   (this_thing).is 24      but these aren't:               this_thing.is (24     ((that).is 50     (a[23].is == 10     a.is ( true     (this_thing.is 24      ideally also (not)               a{.is true     this_thing{.is 24      and (not)               a[.is true     this_thing[.is 24       I have a matcher with /.is/ but how to match unmatched brackets?


title: Logging interactive input and output without capturing all typed input and control characters

text: I am trying to log output from an interactive command-line program; `units`, specifically. I have tried using `tee` like this:               units | tee units.log      or script like this:               script -c units units.log      but they both log all the backspaces and tab completions as special characters like this:               You have: 55 horsepower ^G/^H^[[K^M     You want: wat^Gt ^M         * 41013.493^M         / 2.438222e-05^M      The manpage for `script` mentions this issue.               BUGS          Script places everything in the log file, including linefeeds and backspaces.  This is not what the naive user expects.      I am aware of the work-around with viewing the file using `cat` and `more` or stripping the escape characters with `col` as mentioned here: http://stackoverflow.com/questions/7152339/format-output-from-unix-script- command-remove-backspaces-linefeeds-and-delet As well as the perl script here: http://log.guidoderosa.net/2009/05/another-old-post-which-may-be-useful.html But I don't especially want to fix an existing log file: I want to avoid creating new log files garbled with deleted input and control characters. I thought I had fixed the problem using `rlwrap`, but it conflicts with the `units` readline functionality, so that it either fails to capture the output, or with `rlwrap -a` it captures the output but negates the ability of `units` to use tab-completion. `rlwrap -a -N` does not help. This is well-documented in the man page:               BUGS and LIMITATIONS            Though  it  is  flexible, delivers the goods (readline functionality), and adheres to the Unix "many small tools" paradigm, rlwrap  is a kludge. It            cannot know anything about command's internal state, which makes context-sensitive completion impossible. Using the readline  library  from  within        command is still the best option.      Is there any way to cleanly log interactive input and output that doesn't mess with the existing `readline` functionality? Update: I would be happy with something like               units | col -b | tee units.log      but that hangs while waiting for interactive input. Can this be fixed?


title: Resize / remount /dev/shm not working

text: I've got a linux box dedicated to playing host to an Oracle server installation. It's got 4Gb RAM and by default, 50% (2Gb) has been allocated to /dev/shm. I want to change this to 3Gb, but I am unable to do so. I've tried:   * Changing the relevant line of /etc/fstab to:               tmpfs     /dev/shm     tmpfs     size=3g     0 0        * Trying to temporarily resize using `mount` For whatever reason, it does not appear to resize. Even after a restart (to effect the /etc/fstab change) df -h shows /dev/shm as 2Gb still. Am I doing something wrong?


title: Unable to log in. xsession-errors file looks like it could be useful if I understood

text: I am unable to log in to my account, having recently installed Linux Mint. I had this problem with Ubuntu 13.10, and no amount of re-installations seemed to fix it. However, Mint gives me a _very_ useful window alerting me that my session lasted less than 10 seconds, and displays the contents of my ~/.xsession-errors file, before returning me to the login screen. I have been able to access the terminal to execute commands thus far, and I have verified that my $PATH variable is:               /usr/local/sbin:/usr/local/bin:/usr/sbin:/user/bin:/sbin:/bin:/usr/local/games:/usr/games      The contents of my .xsession-errors is:               /etc/mdm/Xsession: Beginning session setup...     /etc/mdm/Xsession: 1: /etc/profile: id: not found     /etc/mdm/Xsession: 12: [: Illegal number:      /etc/mdm/Xsession: Executing default failed, will try to run x-terminal-emulator     /etc/mdm/Xsession: 205: exec: x-terminal-emulator: not found      EDIT: After being advised to select "Cinnamon" from the login option screen, I tried it and it didn't work. The new .xsession-errors file can be found at: http://pastebin.com/36F4daQU It looks like useful information, but, being new to Linux, I'm not sure what to do with it.


title: Centos6.4 Kickstart stuck at %POST

text: I have the below kickstart %post, but it hangs at the Post Installation Screen. Any thing I had missed or done wrongly? Thanks.               %post --log=/root/my-post-log     (     echo "# Running Post Configuration   #"     #Switch to virtual terminal 3 so that user's input is accepted     chvt 3     exec < /dev/tty3 > /dev/tty3 2>&1     echo "################################"     echo "# Running Post Configuration   #"     echo "################################"     #Get the input     echo "Please specify IP address:"     read ip     echo "Please specify Netmask:"     read mask     echo "Please specify Gateway:"     read gateway     echo "Please specify Nameserver:"     read nameserver     echo "Please specify Timezone (Asia/Singapore):"     read timezone     echo "Please specify NTP Server:"     read ntpserver     #Substitute with sed the hardcoded IP address with the one we've specified     echo "Updating Network Configurations..."     sed -i "s/2\.2\.2\.2/$ip/" /etc/sysconfig/network-scripts/ifcfg-eth0     sed -i "s/4\.4\.4\.4/$mask/" /etc/sysconfig/network-scripts/ifcfg-eth0     sed -i "s/1\.1\.1\.1/$gateway/" /etc/sysconfig/network-scripts/ifcfg-eth0     sed -i "s/1\.1\.1\.1/$gateway/" /etc/sysconfig/network     sed -i "s/8\.8\.4\.4/$nameserver/" /etc/resolv.conf     sed -i "s/Asia\/Singapore/$timezone/" /etc/sysconfig/clock     sed -i "s/0\.centos\.pool\.ntp\.org/$ntpserver/" /etc/ntp.conf     service network restart     echo "Network Configurations Updated"     #Switch back to virtual terminal 1 for the installation to finish     exec < /dev/tty1 > /dev/tty1     chvt 1     echo "End of post-install steps"     ) 2>&1 | /usr/bin/tee /root/post_install.log | tee /dev/console     %end      I have tested the below as well, still doesn't work:               %post     #Switch to virtual terminal 3 so that user's input is accepted     chvt 3     exec < /dev/tty3 > /dev/tty3     echo "################################"     echo "# Running Post Configuration   #"     echo "################################"     #Get the input     echo "Please specify IP address:"     read ip     echo "Please specify Netmask:"     read mask     echo "Please specify Gateway:"     read gateway     echo "Please specify Nameserver:"     read nameserver     echo "Please specify Timezone (Asia/Singapore):"     read timezone     echo "Please specify NTP Server:"     read ntpserver     #Substitute with sed the hardcoded IP address with the one we've specified     echo "Updating Network Configurations..."     sed -i "s/2\.2\.2\.2/$ip/" /etc/sysconfig/network-scripts/ifcfg-eth0     sed -i "s/4\.4\.4\.4/$mask/" /etc/sysconfig/network-scripts/ifcfg-eth0     sed -i "s/1\.1\.1\.1/$gateway/" /etc/sysconfig/network-scripts/ifcfg-eth0     sed -i "s/1\.1\.1\.1/$gateway/" /etc/sysconfig/network     sed -i "s/8\.8\.4\.4/$nameserver/" /etc/resolv.conf     sed -i "s/Asia\/Singapore/$timezone/" /etc/sysconfig/clock     sed -i "s/0\.centos\.pool\.ntp\.org/$ntpserver/" /etc/ntp.conf     service network restart     echo "Network Configurations Updated"     #Switch back to virtual terminal 1 for the installation to finish     exec < /dev/tty1 > /dev/tty1     chvt 1     %end


title: How to Determine the Amount of RAM Slots In Use?

text: I forgot how many RAM modules are installed on my laptop. I do not want to unscrew it but want to look it up on the console. How do I gather this information?


title: How do I avoid echoing password (two simultaneous prompts)?

text: The command I'm talking about is this:               mysqldump -u root -p DB | mysql -u root -p DB2      And here's the output:               Enter password: Enter password:     MYPASS      As far as I can tell, after I enter first password supposedly `mysqldump` turns on echo, and as a result the second password is echoed. Now that I think about it, how do they even manage to both read the password?


title: Where do open file handles go when they die?

text: What happens to the files that are deleted while they have a file handle open to them? I have been wondering this ever since I figured out I could delete a video file while it was playing in MPlayer and it would still play through to the end. Where is it pulling the data from? Is it still coming from the hard drive? Did it get copied to RAM once I deleted the file? If it's still on the hard drive, what happens if I fill up the file system while the program is running reading from what is essentially unallocated space? If it's buffered in RAM, what happens if I flush the buffers? What happens if the file was on an NFS share-is it stored on the server? (Isn't that a security risk-DoS by tons of open remote file handles?) Doing an `lsof -n |grep '(deleted)'` sometimes yields interesting results; if I'm upgrading packages that swap out shared library files, then running programs that had been using those libraries will still be able to use them as if nothing changed. Bonus question: Is there some way to get the data back from the dead in this situation?


title: Is there any gnome-shell mixer icon relying on alsa and not pulseaudio?

text: So, long story short, when I installed Mint 12 on my Dell laptop I realized my HDA-intel sound board have problems with pulseaudio. I uninstalled pulseaudio and got my sound back, but removing pulseaudio also removes that nice little mixer icon on the top panel of gnome-shell, and messes up with the sound configuration app. Is there any other solution to just removing pulseaudio? I also tried just killing it, but the same thing happens. If not, is there any gnome-shell extension that will create a similar icon based on alsa and not on pulseaudio (the old mixer from Gnome2 would be great). The longer story can be read here: http://forums.linuxmint.com/viewtopic.php?f=49&t=88747


title: Banshee Won't Update (Linux Mint 12)

text: Anyone else having problems getting the latest version of Banshee from `apt- get`? I'm adding the Banshee PPA, using `apt-get update`, and then trying `apt-get upgrade` and then to be totally sure, uninstalling and reinstalling Banshee, after purging:               sudo apt-add-repository ppa:banshee-team/ppa     You are about to add the following PPA to your system:     PPA for Banshee Team     This PPA contains the latest stable debs of Banshee for Ubuntu. To install Banshee, you must first enable the PPA on your system:     1. Open Software Sources (System->Administration->Software Sources)     2. Navigate to the "Third Party Sources" tab.     3. Click "Add"     4. Enter the APT line below that corresponds to your Ubuntu version that starts with "deb".     5. Click "Add Source"     6. Click "Close"     7. It will prompt you to reload your software cache. Click "Reload".     8. Now install the package "banshee" from Synaptic, or using the command below:     sudo apt-get install banshee          For those who wish to compile from trunk, add the deb-src line and then run "sudo apt-get build-dep" to install all required dependencies before starting to compile.          Unstable (version which have odd minor version numbers) debs of Banshee can be found here:     https://launchpad.net/~banshee-team/+ar ... e-unstable     More info: https://launchpad.net/~banshee-team/+archive/ppa     Press [ENTER] to continue or ctrl-c to cancel adding it          Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --secret-keyring /tmp/tmp.5ixe5tv1GJ --trustdb-name /etc/apt/trustdb.gpg --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver hkp://keyserver.ubuntu.com:80/ --recv 9D2C2E0A3C88DD807EC787D74874D3686E80C6B7     gpg: requesting key 6E80C6B7 from hkp server keyserver.ubuntu.com     gpg: key 6E80C6B7: "Launchpad PPA for Banshee Team" not changed     gpg: Total number processed: 1     gpg: unchanged: 1      And then `apt-get update` (sparing you the output there.) And then `apt-get upgrade` yeilds nothing. (At this point I have 2.2.0 installed when I want to get 2.2.1 from the PPA above there... So, I then `apt-get purge banshee`:               Reading package lists... Done     Building dependency tree     Reading state information... Done     The following packages will be REMOVED:     banshee* banshee-extension-soundmenu*     0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.     After this operation, 14.9 MB disk space will be freed.     Do you want to continue [Y/n]?     (Reading database ... 267078 files and directories currently installed.)     Removing banshee-extension-soundmenu ...     Removing banshee ...     Purging configuration files for banshee ...     Processing triggers for shared-mime-info ...     Processing triggers for man-db ...     Processing triggers for desktop-file-utils ...     Processing triggers for gnome-menus ...     Processing triggers for bamfdaemon ...     Rebuilding /usr/share/applications/bamf.index...     Processing triggers for hicolor-icon-theme ...      And then `apt-get install banshee`:               Reading package lists... Done     Building dependency tree     Reading state information... Done     The following extra packages will be installed:     banshee-extension-soundmenu     Suggested packages:     banshee-extension-ubuntuonemusicstore banshee-dbg     The following NEW packages will be installed:     banshee banshee-extension-soundmenu     0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.     Need to get 0 B/4,361 kB of archives.     After this operation, 14.9 MB of additional disk space will be used.     Do you want to continue [Y/n]?     Selecting previously deselected package banshee.     (Reading database ... 266361 files and directories currently installed.)     Unpacking banshee (from .../banshee_2.2.0-2linuxmint1_amd64.deb) ...     Selecting previously deselected package banshee-extension-soundmenu.     Unpacking banshee-extension-soundmenu (from .../banshee-extension-soundmenu_2.2.0-2linuxmint1_amd64.deb) ...     Processing triggers for hicolor-icon-theme ...     Processing triggers for desktop-file-utils ...     Processing triggers for gnome-menus ...     Processing triggers for bamfdaemon ...     Rebuilding /usr/share/applications/bamf.index...     Processing triggers for man-db ...     Processing triggers for shared-mime-info ...     Setting up banshee (2.2.0-2linuxmint1) ...     Setting up banshee-extension-soundmenu (2.2.0-2linuxmint1) ...      Never had this problem before. I even went and checked `/etc/apt/sources.list.d/`:               -rw-r--r-- 1 root root 136 2011-12-17 03:51 banshee-team-ppa-oneiric.list     -rw-r--r-- 1 root root 136 2011-12-17 03:51 banshee-team-ppa-oneiric.list.save     <snip>      And the contents of `banshee-team-ppa-oneiric.list`:               deb http://ppa.launchpad.net/banshee-team/ppa/ubuntu oneiric main     deb-src http://ppa.launchpad.net/banshee-team/ppa/ubuntu oneiric main      And, I did check the Packages folder on the PPA -- about six lines down:               Version: 2.2.1-1ubuntu2~hyper1+oneiric      And oddly, the PPA doesn't show up under the Origin tab in Synaptic? But I've definitely added it...? So, I'm totally stumped... Not sure what's going on here, but any help would be totally appreciated. No matter what I do, it seems to only grab:               2.2.0-2linuxmint1


title: Ignore whitespaces changes in all git commands

text: I've found tons of sites that explain how to have git warn you when you're changing line endings, or miscellaneous other techniques to prevent you from messing up an entire file. Assume it's too late for that -- the tree already has commits that toggle the line endings of files, so `git diff` shows the subtraction of the old file followed by the addition of a new file with the same content I'm looking for a git configuration option or command-line flag that tells `diff` to just ignore those -- if two lines differ only by whitespace, pretend they're the same. I need this config option/flag to work for anything that relies on file differences -- `diff`, `blame`, even `merge`/`rebase` ideally -- I want `git` to completely ignore trailing whitespace, particularly line endings. How can I do that?


title: Why can't I find wireless-tools in Debian repositories?

text: I have installed the squeeze version of Debian on a computer in offline mode (no internet connection during installation). After the installation (that was successful) I edited `/etc/apt/sources.list` to comment the cd-rom source and uncomment the official Debian repositories. With the computer connected to Internet, the package database seems to update as planned (with `apt-get update`) but I can't find the `wireless-tools` package in the repository: `apt-cache search wireless` does not return anything. here is the content of `/etc/apt/sources.list`               #          # deb cdrom:[Debian GNU/Linux 6.0.6 _Squeeze_ - Official i386 CD Binary-1 20120929-15:56]/ squeeze main          # deb cdrom:[Debian GNU/Linux 6.0.6 _Squeeze_ - Official i386 CD Binary-1 20120929-15:56]/ squeeze main          deb http://security.debian.org/ squeeze/updates main     deb-src http://security.debian.org/ squeeze/updates main          # squeeze-updates, previously known as 'volatile'     # A network mirror was not selected during install.  The following entries     # are provided as examples, but you should amend them as appropriate     # for your mirror of choice.     #          deb http://ftp.debian.org/debian/ squeeze-updates main contrib non-free     deb-src http://ftp.debian.org/debian/ squeeze-updates main contrib non-free      Any idea? Thanks


title: Change sysctl parameters for all interfaces

text: How can i change a parameter for all interfaces in systemd ? For example:               sysctl -w "net.ipv4.conf.eth0.rp_filter=0"     sysctl -w "net.ipv4.conf.eth1.rp_filter=0"      How can change it for all interfaces ?


title: Enabling IOMMU in the kernel for graphics card pass-through

text: **Short question:** How can I turn on the `intel_iommu` setting in the Linux kernel? I run a Debian host, using the grub2 bootloader. Documentation I've seen says to edit `/boot/grub/menu.lst`, which seems to be relevant only for grub 1.x, as I don't have that file. It is my understanding (and last option I can think of) that changing this boot option might get rid of the following error message in `/var/log/kern.log`               vboxpci: No IOMMU domain (attach)      **Long question:** **Giving a guest OS direct access to graphics card** I recently realised that it's possible to pass through a PCI-express device to guest OS's running in Virtualbox. Cool, I thought! I've got two NVIDIA Quadro FX graphics cards (with SLI bridge connection in place, which I hope isn't causing the grief) and would like to dedicate the 2nd graphics card to the guest OS, so that I can use OpenGL features within Photoshop et al. NVIDIA market this "SLI Multi-OS" configuration, which is basically what I've wanted to set up for ages, but I don't want to spend over a grand on the Virtualisation software (Parallels workstation extreme), when I have been using VirtualBox quite happily for years now. **Host System** I'm running linux-3.5.0-19 from the Debian repositories, on quite high-end workstation equipment (Asus P6T7 WS Supercomputer mobo w/ Intel ICH10R chipset and Xeon W3680 CPU) and would like to turn on IOMMU support in the kernel, preferably without having to compile it myself. **BIOS** In the BIOS settings, I have VT-x and VT-d support enabled. I couldn't see anything specifically mentioning IOMMU, though. **Attaching the PCI device** This was pleasantly surprisingly simple! The official VirtualBox documentation is here. What I did, which I found less ambiguous, was to open `nvidia- settings`, select the secondary graphics card and note the Bus ID ("PCI:5:0:0" in my case). Then, from the host's command line:-               VBoxManage modifyvm "Windows Guest" --pciattach 05:00.0      (When I first ran this, there was an error because VirtualBox was emulating a PIIX chipset; it said that PCI pass-through only works with ICH9 chipsets. So I changed the Chipset to ICH9 in the VirtualBox VM System settings and turned on the guest to install the necessary new drivers. A reboot later and everything was working fine, so I shut down the guest, and re-ran the command.) There was no output, and I was returned to the command line almost immediately. **Using host GPU from the guest** Before turning on the guest, I first rebooted the host machine, in case something undocumented needed to happen in the kernel, by virtualbox-dkms. As I ran the previous command without `sudo` privileges, I doubt any changes were made, though. When I next started the guest, Windows Update started doing its thing and automatically detected and installed the correct NVIDIA drivers. All looking good so far. Before I could use the device though, I had to reboot the guest... **Problem** Now that the graphics card drivers are installed on the guest and the PCI device attached, I can't get into the Windows desktop. I get to the Windows login screen, then after logging in, the screen freezes, just saying "Welcome", with a should-be-spinning-but-isn't blue circle next to it. In `/var/log/kern.log`, the last messages printed are:-               vboxpci: vboxPciOsDevInit: dev=500     vboxpci: detected device: 10de:05ff at 05:00.0, driver pci-stub     vboxpci: vboxPciOsDevInit: dev=500 pdev=ffff88061bea0000     pci-stub 0000:05:00.0: irq 76 for MSI/MSI-X     vboxpci: enabled MSI     500: linux vboxPciOsDevGetRegionInfo: reg=0     got mmio region: fa000000:16777216     500: linux vboxPciOsDevGetRegionInfo: reg=1     got mmio region: d0000000:268435456     500: linux vboxPciOsDevGetRegionInfo: reg=3     got mmio region: f8000000:33554432     500: linux vboxPciOsDevGetRegionInfo: reg=5     got pio region: 8c00:128     500: linux vboxPciOsDevGetRegionInfo: reg=6     got mmio region: fb980000:524288     got PCI IRQ: 76     device eth0 entered promiscuous mode     power state: 0     vboxpci: No IOMMU domain (attach)      Any idea how to fix this? **UPDATE:** I've got the kernel booting now with `intel_iommu=on`, but things still aren't working fully.. After rebooting the host, the guest starts, logs in okay and everything seems as it was before starting any of this. My 2nd graphics card isn't outputting anything. In Device Manager, there is an exclamation mark next to the Quadro FX device, and there is an error code of 12 in the device properties, with a message saying "This device cannot find enough free resources". Further description on technet.microsoft.com. In the host kernel log, it looks promising:-               vboxpci: detected device: 10de:05ff at 05:00.0, driver pci-stub     vboxpci: vboxPciOsDevInit: dev=500 pdev=ffff88061baa0000     pci-stub 0000:05:00.0: irq 76 for MSI/MSI-X     vboxpci: enabled MSI     500: linux vboxPciOsDevGetRegionInfo: reg=0     got mmio region: fa000000:16777216     500: linux vboxPciOsDevGetRegionInfo: reg=1     got mmio region: d0000000:268435456     500: linux vboxPciOsDevGetRegionInfo: reg=3     got mmio region: f8000000:33554432     500: linux vboxPciOsDevGetRegionInfo: reg=5     got pio region: 8c00:128     500: linux vboxPciOsDevGetRegionInfo: reg=6     got mmio region: fb980000:524288     got PCI IRQ: 76     created IOMMU domain ffff88058377c9a0     device eth0 entered promiscuous mode     power state: 0     vboxpci: iommu_attach_device() success      If I start the guest OS a second time, without rebooting the host, the display freezes again at the "Welcome" stage. It definitely finishes the log-in stage though, as I could use windows shortcuts to shutdown the machine without forcing a shutdown.. Now I'm kind of out of ideas... Any suggestions to get this working? Any more info I can provide? **UPDATE2:** `dmesg` contains some more interesting errors, but I don't know what I can do about them:               IOMMU 0 0xfbfff000: using Queued invalidation     IOMMU 1 0xfbffe000: using Queued invalidation     ------------[ cut here ]------------     WARNING: at /build/buildd/linux-3.5.0/drivers/iommu/intel-iommu.c:4254 init_dmars+0x39b/0x74f()     Hardware name: System Product Name          Your BIOS is broken; DMA routed to ISOCH DMAR unit but no TLB space.          BIOS vendor: American Megatrends Inc.; Ver: 0811   ; Product Version: System Version     ...     Your BIOS is broken; RMRR ends before it starts!


title: Replace dots with underscores in filenames, leaving extension intact

text: I have a bash script which I'm trying to get to replace dots in filenames and replace them with underscores, leaving the extension intact (I'm on Centos 6 btw). As you can see from the output below, the script works when there is a dot to replace, but in cases where the only dot is the extension, the script still tries to rename the file, instead of ignoring it. Can anyone point out how I should handle this better? Thanks for any help. My (faulty) script:               #!/bin/bash          for THISFILE in *     do       filename=${THISFILE%\.*}       extension=${THISFILE##*\.}       newname=${filename//./_}       echo "mv $THISFILE ${newname}.${extension}"       #mv $THISFILE ${newname}.${extension}     done      Sample input:               1.3MN-Pin-Eurotunnel-Stw505.51.024-EGS-130x130.jpg     Wear-Plates.jpg      Output:               mv 1_3MN-Pin-Eurotunnel-Stw505_51_024-EGS1-130x130.jpg 1_3MN-Pin-Eurotunnel-Stw505_51_024-EGS1-130x130.jpg     mv Wear-Plates_jpg.Wear-Plates_jpg Wear-Plates_jpg.Wear-Plates_jpg


title: Deleted GRUB root directory. How do I reinstall grub?

text: I have the following partition structure               /dev/loop0 squashfs     /dev/sda1  system reserved ( ntfs )     /dev/sda2  ntfs ( windows partition )     /dev/sda3  ntfs      /dev/sda5  ntfs     /dev/sda6  ext4      I have Ubuntu installed inside windows. I formatted /dev/sda6 from inside Ubuntu ( using Gparted ). What I totally forgot was /dev/sda6 had Fedora which was the root directory of GRUB. Now how do I recover grub. I have tried chrooting to the ubuntu partition and installing grub. But the boot fails with, " No such device... ". And I cannot install elementaryOS on /dev/sda6 since the installer doesn't go beyond a couple of windows.


title: Error dropping database in MySQL 5.1 on Ubuntu

text: I am using **MySQL v5.1** on **Ubuntu** machine. I have a database named my_db which I would like to drop it, so I execute command:               mysql> drop database my_db;          ERROR 1010 (HY000): Error dropping database (can't rmdir './my_db/', errno: 17)      As you see above, there is an error....Why I can not drop database? **P.S.** I know all the database related files are located on `/var/lib/mysql/my_db/`


title: Best Distro For Artificial Intelligence Research?

text: Is there a definite best distro for AI research? I want to build a AI that can be used to help me manage all my emails intelligently.


title: timed out, nothing received

text: I tried all and googled a lot! But I can't make work NTP on my server. This post is last hope! I have installed **ntp** on debian server with this configuration (`/etc/ntp.conf`):               driftfile /var/lib/ntp/ntp.drift          statdir /var/log/ntpstats/          statistics loopstats peerstats clockstats     filegen loopstats file loopstats type day enable     filegen peerstats file peerstats type day enable     filegen clockstats file clockstats type day enable          server 0.it.pool.ntp.org iburst     server 1.it.pool.ntp.org iburst     server 2.it.pool.ntp.org iburst     server 3.it.pool.ntp.org iburst          restrict -4 default nomodify nopeer noquery notrap     restrict -6 default nomodify nopeer noquery notrap          # Restrict eth0 ip     restrict 192.168.1.1     restrict 127.0.0.1 noserve nomodify     restrict ::1      Now when I try:               ntpq -pn     127.0.0.1: timed out, nothing received     ***Request timed out      When I try:               ntpdate -q     9 Mar 18:08:01 ntpdate[27896]: no servers can be used, exiting      But with:               ntpdate -d 0.it.pool.ntp.org      I recieve incoming packets and set time offset. This lead me to wrong **ntp.conf** configuration. Any clues why this is happening.


title: Texmaker won't compile unless opened through terminal

text: I am running Linux mint 16. I have installed Texmaker on my machine and everything works fine when I open it through the terminal, i.e. `$ texmaker foo.tex`; however, when I open the file by double-clicking on the `foo.tex` file in Nemo and picking `display` (which opens it in Texmaker), I cannot typeset the file. When I try to do a quick build, pdflatex, etc. it IMMEDIATELY displays the log messages from my last build, sits looking like it's doing something for a few seconds (quick build is greyed out) and then does nothing; it doesn't open the pdf as usual, and if I check it separately, it hasn't written anything. I realise this may be a question more suited to tex stack exchange but to me it seems like it's more of a fundamental linux problem (a problem with my knowledge of it that is) because it just depends on how I open Texmaker. EDIT I checked the differences in processes when opened both ways; when opened through the terminal, I get:               me 6092 16.6 0.9 497100 55952 pts/3 Sl+ 17:05 0:00 texmaker foo.tex      When opened through Nemo, I get:               me 6099 13.2 0.9 644560 55972 ? Sl 17:05 0:00 texmaker /home/me/dir/foo.tex


title: Is there a way to beep when tail -F stops to fetch new results?

text: A few days ago I asked Is there a way to make tail -F beep? Now I want to know if there is any way to use *nix utilities, to beep when a `tail -F` stops returning new lines for a while! I know, I can write a simple application in any language to do this, but I was curious to know if there is a way to do this just by standard (or semi standard) utils. The goals is to beep when a file (like a log file) no longer grows.


title: Does Geary support Right-to-Left?

text: I wanted to use Geary as my mail client instead of Thunderbird. But I don't know if it supports Right-to-Left text! (I want to be able to write languages like Persian, Arabic, Hebrew etc)


title: slow Matlab on Ubuntu LTS and ZERO Swap

text: I was using Matlab2012 under Win7 and my algorithm was consuming a huge amount of memory though it was fast (80 seconds for one iteration). Now I am using Matlab2013 under Ubuntu 12.04 LTS and though the usage of the RAM is very small, but the time is extremely higher than it was on windows (30 minutes for the iteration and not finished untill now). As I said the RAM is showing a usage of 1G out of 8G ...while the swap is showing 0% of 8G. I checked the default value and it is 60, but not used by anyhow!! What might be the problem, and how to speed up Matlab the way it was before?


title: Error when creating BTRFS Filesystem

text: I'm attempting to install Arch Linux using the `btrfs` filesystem. I'm at the beginning of the install processes preparing my drive and I'm hitting an issue. Firstly I begin to clear any GTP and MBR records from any previous installation attempts using:               gdisk /dev/sda      I then go into expert mode using `x` command and then use `z` to remove GTP and/or MBR. I then use `fdisk` to create a new partition using the entire space on the drive - which is 119GB. After creating the partition, and writing it, I then attempt to create the filesystem using:               mkfs.btrfs /dev/sda1      But I get an error:               /dev/sda1 appears to contain an existing filesystem (btrfs)      How is this so? All I have done is created a partition, so how can btrfs already exist as the filesystem type?


title: setting up sendmail on debian?

text: I have a LAMP localhost server setup for some development and I want to test out if my code is working. Some of the tests involve checking if the correct emails are sent out by the code at the correct time. For this, my code needs to be able to send emails. It does not need to receive emails back. I have LAMP running on Debian. How do I setup setup sending emails on Debian? Apparently it already has something called exim instead of sendmail?


title: syntax highlighting in vim over ssh

text: When I ssh from work to the local network, I can turn syntax on in my vim instance and it works. When I go home and ssh in, I turn on syntax highlighting and nothing happens. While at home, if I use my local vim, I have syntax highlighting. This leads me to believe it's something to do with ssh. In my ssh session, folders still have a different color than files. `echo $term` for work computer:               xterm-color      `echo $term` when ssh from work computer:               xterm-color      `echo $term` when ssh from home computer:               xterm      `echo $term` from home computer:               xterm      (will add the others when I get home) **.vimrc:**               colorscheme elflord     set number     syntax on


title: Who is responsible for the Linux kernel?

text: As of today, there are many Linux distributions like Ubuntu, Fedora, Gentoo, Mint, Debian, etc. These distributions update at different cycles. Ubuntu seems to update its kernel weekly or monthly, while Debian is reluctant to update the kernel. I am wondering whether these distributions maintain their own kernels. Or do they just get the original kernel code from Linus Torvalds, modify it a little bit as need, and then release their revised kernel with their package management system? Do all the distributions use the same kernels from Linus Torvalds? If it is the case, why do different distributions update/release their kernels at the different cycles?


title: Problem with Xorg on Debian after upgrade to Wheezy

text: After I upgrade to wheezy I have a strange problem. See this image http://i.imgbox.com/accFOaW4.png to see what happening to my PC. As I move my mouse, artifacts of the pointer are left all over the screen. What Can I do?               uname -a     Linux debian-pc 3.2.0-4-686-pae #1 SMP Debian 3.2.46-1 i686 GNU/Linux My GPU info:               sudo lspci -v -s `lspci | awk '/VGA/{print $1}'`          01:00.0 VGA compatible controller: NVIDIA Corporation NV5M64 [RIVA TNT2 Model 64/Model 64 Pro] (rev 15) (prog-if 00 [VGA controller])         Flags: bus master, 66MHz, medium devsel, latency 32, IRQ 11         Memory at e6000000 (32-bit, non-prefetchable) [size=16M]         Memory at e4000000 (32-bit, prefetchable) [size=32M]         [virtual] Expansion ROM at e7000000 [disabled] [size=64K]         Capabilities: [60] Power Management version 1         Capabilities: [44] AGP version 2.0         Kernel driver in use: nouveau


title: How can I run a "grep | grep" command as a string in a bash function?

text: I'm trying to build a command that pipes the results of one grep command to another grep command in a bash function. Ultimately, I want the command executed to look like this:               grep -I -r FooBar /code/internal/dev/ /code/public/dev/ | grep .c:\|.h:      The function I'm writing stores the first part of the command in a string, then appends the second part:               grep_cmd="grep -I -r $pattern $@"          if (( ${#file_types[@]} > 0 )); then         file_types="${file_types[@]}"         file_types=.${file_types// /':\|.'}:              grep_cmd="$grep_cmd | grep $file_types"     fi          echo "$grep_cmd"     ${grep_cmd}      This throws an error after the output from the first part:               grep: |: No such file or directory     grep: grep: No such file or directory     grep: .c:\|.h:: No such file or directory      Changing the last line from `${grep_cmd}` to just `"$grep_cmd"` displays no output from the first part and throws a different error:               bash: grep -I -r FooBar /code/internal/dev/ /code/public/dev/ | grep .c:\|.h:: No such file or directory      Per this SO answer, I tried changing the last line to `$(grep_cmd)`. This throws another error:               bash: grep_cmd: command not found      This SO answer suggests using `eval $grep_cmd`. This suppresses the errors but also suppresses the output. This one suggests using `eval ${grep_cmd}`. This has the same results (suppresses the errors and output). I tried enabling debugging in bash (with `set -x`), which gives me this:               + eval grep -I -r FooBar /code/internal/dev/ /code/public/dev/ '|' grep '.c:\|.h:'     ++ grep -I -r FooBar /code/internal/dev/ /code/public/dev/     ++ grep '.c:|.h:'      It looks like the pipe is being escaped, so the shell interprets the command as two commands. How do I properly escape the pipe character so it interprets it as one command?


title: How does DNS name resolution work, in principle?

text: Right now I'm taking an online course for Linux sysadmin and I was asked a question I just generally don't understand. I know how to search for a name server, if I'm correct at least it's using the dig command to find the addressed in the additional section command, but I became a bit lost when asked the following question. > Assuming your configured nameserver does not have any cached results at its > disposal, how many nameservers must your nameserver query in order to > resolve maps.google.com? What command(s) would you use to find all these > nameservers? List one from each level and explain why this level is needed. I don't want the answer, I would just like to know what I am being asked to do exactly.


title: Expansion in zsh prompt

text: I'm struggling with zsh prompt, trying to convert my bash prompt to zsh hooks. This code should display the current kerberos ticket and update accordingly, but colors don't work, neither does the update:               # initialize advanced prompt     autoload -U promptinit && promptinit     # allow functions in prompt     setopt prompt_subst          #initialize colors     autoload -U colors && colors          # add the add-zsh-hook command     autoload add-zsh-hook          # Configure History     setopt hist_ignore_all_dups     setopt inc_append_history     export HISTIGNORE="history"          source $HOME/.zsh/prompt_krb.zsh          update_krb_env() {     if [ "`which klist 2>/dev/null`" != "" ]; then              # got kerberos support installed         ticket=`klist 2>/dev/null | grep "Principal:" | sed 's/.*Principal:\ //'`;              klist -s         if [ $? -eq 0 ]; then             __KRB_PROMPT="%{$fg_no_bold['green']%}krb id \"$ticket\"";         else             if [ "$ticket" != "" ]; then                 __KRB_PROMPT="%{$fg_no_bold['orange']%}expired krb id \"$ticket\"";             else                 __KRB_PROMPT="%{$fg_no_bold['yellow']%}no krb id";             fi         fi     else         __KRB_PROMPT="%{$fg_no_bold['yellow']%}no krb id";     fi          _KRB_PROMPT="${__KRB_PROMPT}%{$reset_color%}";     }          krb_hook_preexec() {         case "$2" in             kinit*|kdestroy*)                 __EXECUTED_KRB_CMD=1;             ;;         esac     }          krb_hook_postexec() {         if [ -n "$__EXECUTED_KRB_CMD" ]; then             update_krb_env;             unset __EXECUTED_KRB_CMD;         fi     }          add-zsh-hook preexec krb_hook_preexec     add-zsh-hook precmd krb_hook_postexec     update_krb_env;          get_krb() {         echo -n $__KRB_PROMPT;     }          PROMPT="$(get_krb) >"      I have been looking into multiple tutorials, trying to build upon the code, but I seem to be missing something.


title: Is CentOS exactly the same as RHEL?

text: I'm sure this question has been asked again and again elsewhere (I did not find anything specific to CentOS vs RHEL in SE), but I would still like to ask and confirm a few specific points. I am well aware that CentOS removes all RH trademarks, logos, etc. and is based on the same codes with packages built by the community.   * Are the packages built for CentOS exactly the same? Will the contents of the packages and the behavior of the programs be identical to those found on RHEL?   * What is RHN other than a medium for license registration? What is it to CentOS? I'm an Ubuntu desktop user. Attended a RH299 course which did not really touch anything about the support aspect (i.e. RHN). Other than that I've no professional Linux knowledge or experience. **EDIT** I did read the CentOS 6.2 release notes, but I found the details unsatisfactory. The release notes mentions packages modified, removed or added to upstream. But it neither explains nor links to any document detailing what exactly is different in the modified packages. Granted the branding packages are self-explanatory, but it mentions packages like `kernel`, `ntp`, `anaconda`, etc. which have nothing to do with branding as far as I'm aware.


title: display sco unix 5.0.6 samba usage

text: Is there a command on sco unix which will show which files are being accessed by the samba process ? Something like lsof in linux maybe, or similar.


title: Expand regex on multiple lines in Vim

text: I am working on removing comments from a C source file. Let's focus on multiline comments **/* ... */** and ignore the inline ones (//) The following command seems to work with (solaris) sed:               s:/\*.*\*/::g      However in Vim (7.2) it only works if the whole comment is on one line. How can I make it so the `.*` spreads over multiple lines? I tried doing the follwing               s:/\*.*[\r]*.*\*/::g      but it didn't work ...


title: Iptables GEOIP not working under Debian Squeeze

text: I've just installed xtables-*, compiled the geoip database, but when I try to use an iptables command it always gives back the following error: Command: `iptables -I INPUT -p tcp --dport 80 -m geoip --src-cc 'DE' -j DROP` Error: `Could not open /usr/share/xt_geoip/LE/DE.iv0: No such file or directory` `iptables v1.4.8: Could not read geoip database` The problem is, that the support scripts create the geoip database, but they all end as iv4 and iv6, not iv0. When I rename the DE.iv4 file to DE.iv0, the error becomes: `iptables: No chain/target/match by that name.` How can I breathe life into the system?


title: SD card reader on Linux: SPI or SD protocol underneath

text: I've a notebook with a SD card reader and I was wondering if the GNU/Linux driver is using the SPI protocol or the proprietary SD protocol (one or four bits). I'm asking this because I'm testing a SPI based SD card reader device I'm working on and when I check the reading speed on my notebook it reads a card at 6MB/s... Another thing, I would like to take a look to the driver sources, do you know where can I find them? Thanks in advance!


title: Can't load X server Mint 15

text: I've already spend nearly 10 hours trying to solve my problem. After I've installed nvidia-current package and reboot, system shows Mint logo and stacks on it, whithout any output. Because of the installation of nvidia-current I thought the problem is whith X-Server. I've tried comlete uninstall nvidia*. - no effect, tried `dpkg-reconfigure xserver-xorg`, `X --configure`, reinstalling `libgl1-mesa-dev`... but nothing helped I've got an Integral Intel Graphics and Nvidia card, my system was running whith internal Card, and I used primusrun to use Nvidia, when I nedded. Hope smb-dy helps) So here is the output of `/var/log/Xorg.0.log`:               | grep EE              (WW) warning, (EE) error, (NI) not implemented, (??) unknown.     [   933.571] Initializing built-in extension MIT-SCREEN-SAVER     [   933.585] (EE) open /dev/dri/card0: No such file or directory     [   933.585] (EE) open /dev/dri/card0: No such file or directory     [   933.585] (EE) open /dev/dri/card0: No such file or directory     [   933.585] (EE) open /dev/dri/card0: No such file or directory     [   933.586] (EE) [drm] KMS not enabled     [   933.586] (EE) Screen 0 deleted because of no matching config section.     [   933.586] (EE) Screen 0 deleted because of no matching config section.     [   933.589] (EE) FBDEV(0): FBIOBLANK: Invalid argument     [   933.596] (EE) AIGLX error: dlopen of /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so failed (/usr/lib/x86_64-linux-gnu/dri/swrast_dri.so: cannot open shared object file: No such file or directory)     [   933.596] (EE) GLX: could not load software renderer     [   933.627] (EE) FBDEV(0): FBIOBLANK: Invalid argument                    [   933.539]      X.Org X Server 1.13.4     Release Date: 2013-04-17     [   933.541] X Protocol Version 11, Revision 0     [   933.542] Build Operating System: Linux 2.6.24-32-xen x86_64 Ubuntu     [   933.543] Current Operating System: Linux pavel-UX32VD 3.8.0-35-generic #50-Ubuntu SMP Tue Dec 3 01:24:59 UTC 2013 x86_64     [   933.543] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-3.8.0-35-generic root=UUID=045f6a10-329d-4292-b1f5-cea2ec563e93 ro recovery nomodeset     [   933.545] Build Date: 08 May 2013  02:34:03PM     [   933.547] xorg-server 2:1.13.4~git20130508+server-1.13-branch.10c42f57-0ubuntu0ricotz~raring (For technical support please see http://www.ubuntu.com/support)      [   933.548] Current version of pixman: 0.30.2     [   933.550]    Before reporting problems, check http://wiki.x.org         to make sure that you have the latest version.     [   933.550] Markers: (--) probed, (**) from config file, (==) default setting,         (++) from command line, (!!) notice, (II) informational,         (WW) warning, (EE) error, (NI) not implemented, (??) unknown.     [   933.553] (==) Log file: "/var/log/Xorg.0.log", Time: Thu Apr 10 00:35:34 2014     [   933.554] (==) Using config file: "/etc/X11/xorg.conf"     [   933.555] (==) Using system config directory "/usr/share/X11/xorg.conf.d"     [   933.556] (==) ServerLayout "X.org Configured"     [   933.556] (**) |-->Screen "Screen0" (0)     [   933.556] (**) |   |-->Monitor "Monitor0"     [   933.556] (**) |   |-->Device "Card0"     [   933.556] (**) |-->Screen "Screen1" (1)     [   933.556] (**) |   |-->Monitor "Monitor1"     [   933.556] (**) |   |-->Device "Card1"     [   933.556] (**) |-->Screen "Screen2" (2)     [   933.556] (**) |   |-->Monitor "Monitor2"     [   933.556] (**) |   |-->Device "Card2"     [   933.556] (**) |-->Screen "Screen3" (3)     [   933.556] (**) |   |-->Monitor "Monitor3"     [   933.556] (**) |   |-->Device "Card3"     [   933.556] (**) |-->Screen "Screen4" (4)     [   933.556] (**) |   |-->Monitor "Monitor4"     [   933.556] (**) |   |-->Device "Card4"     [   933.556] (**) |-->Screen "Screen5" (5)     [   933.556] (**) |   |-->Monitor "Monitor5"     [   933.556] (**) |   |-->Device "Card5"     [   933.556] (**) |-->Input Device "Mouse0"     [   933.556] (**) |-->Input Device "Keyboard0"     [   933.556] (==) Automatically adding devices     [   933.556] (==) Automatically enabling devices     [   933.557] (==) Automatically adding GPU devices     [   933.557] (WW) The directory "/usr/share/fonts/X11/100dpi/" does not exist.     [   933.557]    Entry deleted from font path.     [   933.557] (WW) The directory "/usr/share/fonts/X11/75dpi/" does not exist.     [   933.557]    Entry deleted from font path.     [   933.557] (WW) The directory "/usr/share/fonts/X11/100dpi" does not exist.     [   933.557]    Entry deleted from font path.     [   933.557] (WW) The directory "/usr/share/fonts/X11/75dpi" does not exist.     [   933.557]    Entry deleted from font path.     [   933.557] (WW) The directory "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType" does not exist.     [   933.557]    Entry deleted from font path.     [   933.557] (WW) The directory "/usr/share/fonts/X11/100dpi/" does not exist.     [   933.557]    Entry deleted from font path.     [   933.557] (WW) The directory "/usr/share/fonts/X11/75dpi/" does not exist.     [   933.557]    Entry deleted from font path.     [   933.557] (WW) The directory "/usr/share/fonts/X11/100dpi" does not exist.     [   933.557]    Entry deleted from font path.     [   933.557] (WW) The directory "/usr/share/fonts/X11/75dpi" does not exist.     [   933.557]    Entry deleted from font path.     [   933.557] (WW) The directory "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType" does not exist.     [   933.557]    Entry deleted from font path.     [   933.557] (**) FontPath set to:         /usr/share/fonts/X11/misc,         /usr/share/fonts/X11/cyrillic,         /usr/share/fonts/X11/Type1,         built-ins,         /usr/share/fonts/X11/misc,         /usr/share/fonts/X11/cyrillic,         /usr/share/fonts/X11/Type1,         built-ins     [   933.557] (**) ModulePath set to "/usr/lib/xorg/modules"     [   933.557] (WW) Hotplugging is on, devices using drivers 'kbd', 'mouse' or 'vmmouse' will be disabled.     [   933.557] (WW) Disabling Mouse0     [   933.557] (WW) Disabling Keyboard0     [   933.557] (II) Loader magic: 0x7f01afcebd20     [   933.557] (II) Module ABI versions:     [   933.557]    X.Org ANSI C Emulation: 0.4     [   933.557]    X.Org Video Driver: 13.1     [   933.557]    X.Org XInput driver : 18.0     [   933.557]    X.Org Server Extension : 7.0     [   933.557] (--) PCI:*(0:0:2:0) 8086:0166:1043:1507 rev 9, Mem @ 0xf7400000/4194304, 0xd0000000/268435456, I/O @ 0x0000f000/64     [   933.557] (--) PCI: (0:1:0:0) 10de:1140:1043:1507 rev 161, Mem @ 0xf6000000/16777216, 0xe0000000/268435456, 0xf0000000/33554432, I/O @ 0x0000e000/128, BIOS @ 0x????????/524288     [   933.557] (WW) Open ACPI failed (/var/run/acpid.socket) (No such file or directory)     [   933.558] Initializing built-in extension Generic Event Extension     [   933.559] Initializing built-in extension SHAPE     [   933.560] Initializing built-in extension MIT-SHM     [   933.561] Initializing built-in extension XInputExtension     [   933.562] Initializing built-in extension XTEST     [   933.563] Initializing built-in extension BIG-REQUESTS     [   933.564] Initializing built-in extension SYNC     [   933.565] Initializing built-in extension XKEYBOARD     [   933.566] Initializing built-in extension XC-MISC     [   933.566] Initializing built-in extension SECURITY     [   933.567] Initializing built-in extension XINERAMA     [   933.568] Initializing built-in extension XFIXES     [   933.568] Initializing built-in extension RENDER     [   933.569] Initializing built-in extension RANDR     [   933.570] Initializing built-in extension COMPOSITE     [   933.570] Initializing built-in extension DAMAGE     [   933.571] Initializing built-in extension MIT-SCREEN-SAVER     [   933.572] Initializing built-in extension DOUBLE-BUFFER     [   933.572] Initializing built-in extension RECORD     [   933.573] Initializing built-in extension DPMS     [   933.574] Initializing built-in extension X-Resource     [   933.574] Initializing built-in extension XVideo     [   933.575] Initializing built-in extension XVideo-MotionCompensation     [   933.575] Initializing built-in extension SELinux     [   933.576] Initializing built-in extension XFree86-VidModeExtension     [   933.577] Initializing built-in extension XFree86-DGA     [   933.577] Initializing built-in extension XFree86-DRI     [   933.578] Initializing built-in extension DRI2     [   933.578] (II) "glx" will be loaded. This was enabled by default and also specified in the config file.     [   933.578] (II) LoadModule: "glx"     [   933.578] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so     [   933.580] (II) Module glx: vendor="X.Org Foundation"     [   933.580]    compiled for 1.13.4, module version = 1.0.0     [   933.580]    ABI class: X.Org Server Extension, version 7.0     [   933.580] (==) AIGLX enabled     [   933.581] Loading extension GLX     [   933.581] (II) LoadModule: "modesetting"     [   933.581] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so     [   933.581] (II) Module modesetting: vendor="X.Org Foundation"     [   933.581]    compiled for 1.13.3, module version = 0.7.0     [   933.581]    Module class: X.Org Video Driver     [   933.581]    ABI class: X.Org Video Driver, version 13.1     [   933.582] (II) LoadModule: "intel"     [   933.582] (II) Loading /usr/lib/xorg/modules/drivers/intel_drv.so     [   933.582] (II) Module intel: vendor="X.Org Foundation"     [   933.582]    compiled for 1.13.4, module version = 2.99.906     [   933.582]    Module class: X.Org Video Driver     [   933.582]    ABI class: X.Org Video Driver, version 13.1     [   933.582] (II) LoadModule: "nouveau"     [   933.582] (II) Loading /usr/lib/xorg/modules/drivers/nouveau_drv.so     [   933.582] (II) Module nouveau: vendor="X.Org Foundation"     [   933.582]    compiled for 1.13.4, module version = 1.0.9     [   933.582]    Module class: X.Org Video Driver     [   933.582]    ABI class: X.Org Video Driver, version 13.1     [   933.582] (II) LoadModule: "fbdev"     [   933.582] (II) Loading /usr/lib/xorg/modules/drivers/fbdev_drv.so     [   933.582] (II) Module fbdev: vendor="X.Org Foundation"     [   933.582]    compiled for 1.12.99.902, module version = 0.4.3     [   933.582]    Module class: X.Org Video Driver     [   933.582]    ABI class: X.Org Video Driver, version 13.0     [   933.582] (II) LoadModule: "vesa"     [   933.582] (II) Loading /usr/lib/xorg/modules/drivers/vesa_drv.so     [   933.582] (II) Module vesa: vendor="X.Org Foundation"     [   933.582]    compiled for 1.12.99.902, module version = 2.3.2     [   933.582]    Module class: X.Org Video Driver     [   933.582]    ABI class: X.Org Video Driver, version 13.0     [   933.582] (II) modesetting: Driver for Modesetting Kernel Drivers: kms     [   933.582] (II) intel: Driver for Intel(R) Integrated Graphics Chipsets:         i810, i810-dc100, i810e, i815, i830M, 845G, 854, 852GM/855GM, 865G,         915G, E7221 (i915), 915GM, 945G, 945GM, 945GME, Pineview GM,         Pineview G, 965G, G35, 965Q, 946GZ, 965GM, 965GME/GLE, G33, Q35, Q33,         GM45, 4 Series, G45/G43, Q45/Q43, G41, B43     [   933.582] (II) intel: Driver for Intel(R) HD Graphics: 2000-5000     [   933.582] (II) intel: Driver for Intel(R) Iris(TM) Graphics: 5100     [   933.582] (II) intel: Driver for Intel(R) Iris(TM) Pro Graphics: 5200     [   933.582] (II) NOUVEAU driver      [   933.582] (II) NOUVEAU driver for NVIDIA chipset families :     [   933.582]    RIVA TNT        (NV04)     [   933.582]    RIVA TNT2       (NV05)     [   933.582]    GeForce 256     (NV10)     [   933.582]    GeForce 2       (NV11, NV15)     [   933.583]    GeForce 4MX     (NV17, NV18)     [   933.583]    GeForce 3       (NV20)     [   933.583]    GeForce 4Ti     (NV25, NV28)     [   933.583]    GeForce FX      (NV3x)     [   933.583]    GeForce 6       (NV4x)     [   933.583]    GeForce 7       (G7x)     [   933.583]    GeForce 8       (G8x)     [   933.583]    GeForce GTX 200 (NVA0)     [   933.583]    GeForce GTX 400 (NVC0)     [   933.583] (II) FBDEV: driver for framebuffer: fbdev     [   933.583] (II) VESA: driver for VESA chipsets: vesa     [   933.583] (--) using VT number 2          [   933.585] (EE) open /dev/dri/card0: No such file or directory     [   933.585] (EE) open /dev/dri/card0: No such file or directory     [   933.585] (WW) Falling back to old probe method for modesetting     [   933.585] (EE) open /dev/dri/card0: No such file or directory     [   933.585] (EE) open /dev/dri/card0: No such file or directory     [   933.586] (EE) [drm] KMS not enabled     [   933.586] (II) Loading sub module "fbdevhw"     [   933.586] (II) LoadModule: "fbdevhw"     [   933.586] (II) Loading /usr/lib/xorg/modules/libfbdevhw.so     [   933.586] (II) Module fbdevhw: vendor="X.Org Foundation"     [   933.586]    compiled for 1.13.4, module version = 0.0.2     [   933.586]    ABI class: X.Org Video Driver, version 13.1     [   933.586] (**) FBDEV(2): claimed PCI slot 0@0:2:0     [   933.586] (II) FBDEV(2): using default device     [   933.586] (WW) Falling back to old probe method for vesa     [   933.586] (EE) Screen 0 deleted because of no matching config section.     [   933.586] (II) UnloadModule: "modesetting"     [   933.586] (EE) Screen 0 deleted because of no matching config section.     [   933.586] (II) UnloadModule: "modesetting"     [   933.586] (==) FBDEV(0): Depth 24, (==) framebuffer bpp 32     [   933.586] (==) FBDEV(0): RGB weight 888     [   933.586] (==) FBDEV(0): Default visual is TrueColor     [   933.586] (==) FBDEV(0): Using gamma correction (1.0, 1.0, 1.0)     [   933.586] (II) FBDEV(0): hardware: EFI VGA (video memory: 3072kB)     [   933.586] (II) FBDEV(0): checking modes against framebuffer device...     [   933.586] (II) FBDEV(0): checking modes against monitor...     [   933.586] (--) FBDEV(0): Virtual size is 1024x768 (pitch 1024)     [   933.586] (**) FBDEV(0):  Built-in mode "current": 78.7 MHz, 59.9 kHz, 75.7 Hz     [   933.586] (II) FBDEV(0): Modeline "current"x0.0   78.65  1024 1056 1184 1312  768 772 776 792 -hsync -vsync -csync (59.9 kHz b)     [   933.586] (==) FBDEV(0): DPI set to (96, 96)     [   933.586] (II) Loading sub module "fb"     [   933.586] (II) LoadModule: "fb"     [   933.586] (II) Loading /usr/lib/xorg/modules/libfb.so     [   933.588] (II) Module fb: vendor="X.Org Foundation"     [   933.588]    compiled for 1.13.4, module version = 1.0.0     [   933.588]    ABI class: X.Org ANSI C Emulation, version 0.4     [   933.588] (**) FBDEV(0): using shadow framebuffer     [   933.588] (II) Loading sub module "shadow"     [   933.588] (II) LoadModule: "shadow"     [   933.588] (II) Loading /usr/lib/xorg/modules/libshadow.so     [   933.588] (II) Module shadow: vendor="X.Org Foundation"     [   933.588]    compiled for 1.13.4, module version = 1.1.0     [   933.588]    ABI class: X.Org ANSI C Emulation, version 0.4     [   933.588] (II) UnloadModule: "vesa"     [   933.588] (II) Unloading vesa     [   933.588] (==) Depth 24 pixmap format is 32 bpp     [   933.589] (EE) FBDEV(0): FBIOBLANK: Invalid argument     [   933.590] (==) FBDEV(0): Backing store disabled     [   933.590] (==) FBDEV(0): DPMS enabled     [   933.591] (==) RandR enabled     [   933.595] (II) SELinux: Disabled on system     [   933.596] (II) AIGLX: Screen 0 is not DRI2 capable     [   933.596] (II) AIGLX: Screen 0 is not DRI capable     [   933.596] (EE) AIGLX error: dlopen of /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so failed (/usr/lib/x86_64-linux-gnu/dri/swrast_dri.so: cannot open shared object file: No such file or directory)     [   933.596] (EE) GLX: could not load software renderer     [   933.596] (II) GLX: no usable GL providers found for screen 0     [   933.609] (II) XKB: reuse xkmfile /var/lib/xkb/server-B20D7FC79C7F597315E3E501AEF10E0D866E8E92.xkm     [   933.611] (II) config/udev: Adding input device Power Button (/dev/input/event1)     [   933.611] (**) Power Button: Applying InputClass "evdev keyboard catchall"     [   933.611] (II) LoadModule: "evdev"     [   933.611] (II) Loading /usr/lib/xorg/modules/input/evdev_drv.so     [   933.613] (II) Module evdev: vendor="X.Org Foundation"     [   933.613]    compiled for 1.13.3, module version = 2.7.3     [   933.613]    Module class: X.Org XInput Driver     [   933.613]    ABI class: X.Org XInput driver, version 18.0     [   933.613] (II) Using input driver 'evdev' for 'Power Button'     [   933.613] (**) Power Button: always reports core events     [   933.613] (**) evdev: Power Button: Device: "/dev/input/event1"     [   933.613] (--) evdev: Power Button: Vendor 0 Product 0x1     [   933.613] (--) evdev: Power Button: Found keys     [   933.613] (II) evdev: Power Button: Configuring as keyboard     [   933.613] (**) Option "config_info" "udev:/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0C:00/input/input1/event1"     [   933.613] (II) XINPUT: Adding extended input device "Power Button" (type: KEYBOARD, id 6)     [   933.613] (**) Option "xkb_rules" "evdev"     [   933.613] (**) Option "xkb_model" "pc105"     [   933.613] (**) Option "xkb_layout" "us,ru"     [   933.613] (**) Option "xkb_variant" ","     [   933.613] (**) Option "xkb_options" "grp:alt_shift_toggle,grp_led:scroll"     [   933.614] (II) XKB: reuse xkmfile /var/lib/xkb/server-5BD46092C922CD443B4EABE4B26B5EFCDED629BD.xkm     [   933.615] (II) config/udev: Adding input device Lid Switch (/dev/input/event0)     [   933.615] (II) No input driver specified, ignoring this device.     [   933.615] (II) This device may have been added with another device file.     [   933.615] (II) config/udev: Adding input device Sleep Button (/dev/input/event2)     [   933.615] (**) Sleep Button: Applying InputClass "evdev keyboard catchall"     [   933.615] (II) Using input driver 'evdev' for 'Sleep Button'     [   933.615] (**) Sleep Button: always reports core events     [   933.615] (**) evdev: Sleep Button: Device: "/dev/input/event2"     [   933.615] (--) evdev: Sleep Button: Vendor 0 Product 0x3     [   933.615] (--) evdev: Sleep Button: Found keys     [   933.615] (II) evdev: Sleep Button: Configuring as keyboard     [   933.615] (**) Option "config_info" "udev:/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0E:00/input/input2/event2"     [   933.615] (II) XINPUT: Adding extended input device "Sleep Button" (type: KEYBOARD, id 7)     [   933.615] (**) Option "xkb_rules" "evdev"     [   933.615] (**) Option "xkb_model" "pc105"     [   933.615] (**) Option "xkb_layout" "us,ru"     [   933.615] (**) Option "xkb_variant" ","     [   933.615] (**) Option "xkb_options" "grp:alt_shift_toggle,grp_led:scroll"     [   933.615] (II) config/udev: Adding input device HDA Intel PCH HDMI/DP,pcm=3 (/dev/input/event6)     [   933.615] (II) No input driver specified, ignoring this device.     [   933.615] (II) This device may have been added with another device file.     [   933.615] (II) config/udev: Adding input device HDA Intel PCH Headphone (/dev/input/event7)     [   933.615] (II) No input driver specified, ignoring this device.     [   933.615] (II) This device may have been added with another device file.     [   933.615] (II) config/udev: Adding input device 2.4G Wireless Optical Mouse (/dev/input/event4)     [   933.615] (**) 2.4G Wireless Optical Mouse: Applying InputClass "evdev pointer catchall"     [   933.615] (II) Using input driver 'evdev' for '2.4G Wireless Optical Mouse'     [   933.615] (**) 2.4G Wireless Optical Mouse: always reports core events     [   933.615] (**) evdev: 2.4G Wireless Optical Mouse: Device: "/dev/input/event4"     [   933.615] (--) evdev: 2.4G Wireless Optical Mouse: Vendor 0x1130 Product 0x3a5d     [   933.615] (--) evdev: 2.4G Wireless Optical Mouse: Found 12 mouse buttons     [   933.615] (--) evdev: 2.4G Wireless Optical Mouse: Found scroll wheel(s)     [   933.615] (--) evdev: 2.4G Wireless Optical Mouse: Found relative axes     [   933.615] (--) evdev: 2.4G Wireless Optical Mouse: Found x and y relative axes     [   933.615] (II) evdev: 2.4G Wireless Optical Mouse: Configuring as mouse     [   933.615] (II) evdev: 2.4G Wireless Optical Mouse: Adding scrollwheel support     [   933.615] (**) evdev: 2.4G Wireless Optical Mouse: YAxisMapping: buttons 4 and 5     [   933.615] (**) evdev: 2.4G Wireless Optical Mouse: EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200     [   933.615] (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/input/input4/event4"     [   933.615] (II) XINPUT: Adding extended input device "2.4G Wireless Optical Mouse" (type: MOUSE, id 8)     [   933.616] (II) evdev: 2.4G Wireless Optical Mouse: initialized for relative axes.     [   933.616] (**) 2.4G Wireless Optical Mouse: (accel) keeping acceleration scheme 1     [   933.616] (**) 2.4G Wireless Optical Mouse: (accel) acceleration profile 0     [   933.616] (**) 2.4G Wireless Optical Mouse: (accel) acceleration factor: 2.000     [   933.616] (**) 2.4G Wireless Optical Mouse: (accel) acceleration threshold: 4     [   933.616] (II) config/udev: Adding input device 2.4G Wireless Optical Mouse (/dev/input/mouse0)     [   933.616] (II) No input driver specified, ignoring this device.     [   933.616] (II) This device may have been added with another device file.     [   933.616] (II) config/udev: Adding input device USB2.0 HD UVC WebCam (/dev/input/event5)     [   933.616] (**) USB2.0 HD UVC WebCam: Applying InputClass "evdev keyboard catchall"     [   933.616] (II) Using input driver 'evdev' for 'USB2.0 HD UVC WebCam'     [   933.616] (**) USB2.0 HD UVC WebCam: always reports core events     [   933.616] (**) evdev: USB2.0 HD UVC WebCam: Device: "/dev/input/event5"     [   933.616] (--) evdev: USB2.0 HD UVC WebCam: Vendor 0x4f2 Product 0xb330     [   933.616] (--) evdev: USB2.0 HD UVC WebCam: Found keys     [   933.616] (II) evdev: USB2.0 HD UVC WebCam: Configuring as keyboard     [   933.616] (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.5/2-1.5:1.0/input/input5/event5"     [   933.616] (II) XINPUT: Adding extended input device "USB2.0 HD UVC WebCam" (type: KEYBOARD, id 9)     [   933.616] (**) Option "xkb_rules" "evdev"     [   933.616] (**) Option "xkb_model" "pc105"     [   933.616] (**) Option "xkb_layout" "us,ru"     [   933.616] (**) Option "xkb_variant" ","     [   933.616] (**) Option "xkb_options" "grp:alt_shift_toggle,grp_led:scroll"     [   933.616] (II) config/udev: Adding input device Asus WMI hotkeys (/dev/input/event8)     [   933.616] (**) Asus WMI hotkeys: Applying InputClass "evdev keyboard catchall"     [   933.616] (II) Using input driver 'evdev' for 'Asus WMI hotkeys'     [   933.616] (**) Asus WMI hotkeys: always reports core events     [   933.616] (**) evdev: Asus WMI hotkeys: Device: "/dev/input/event8"     [   933.616] (--) evdev: Asus WMI hotkeys: Vendor 0 Product 0     [   933.616] (--) evdev: Asus WMI hotkeys: Found keys     [   933.616] (II) evdev: Asus WMI hotkeys: Configuring as keyboard     [   933.616] (**) Option "config_info" "udev:/sys/devices/platform/asus-nb-wmi/input/input8/event8"     [   933.616] (II) XINPUT: Adding extended input device "Asus WMI hotkeys" (type: KEYBOARD, id 10)     [   933.616] (**) Option "xkb_rules" "evdev"     [   933.616] (**) Option "xkb_model" "pc105"     [   933.616] (**) Option "xkb_layout" "us,ru"     [   933.616] (**) Option "xkb_variant" ","     [   933.616] (**) Option "xkb_options" "grp:alt_shift_toggle,grp_led:scroll"     [   933.617] (II) config/udev: Adding input device AT Translated Set 2 keyboard (/dev/input/event3)     [   933.617] (**) AT Translated Set 2 keyboard: Applying InputClass "evdev keyboard catchall"     [   933.617] (II) Using input driver 'evdev' for 'AT Translated Set 2 keyboard'     [   933.617] (**) AT Translated Set 2 keyboard: always reports core events     [   933.617] (**) evdev: AT Translated Set 2 keyboard: Device: "/dev/input/event3"     [   933.617] (--) evdev: AT Translated Set 2 keyboard: Vendor 0x1 Product 0x1     [   933.617] (--) evdev: AT Translated Set 2 keyboard: Found keys     [   933.617] (II) evdev: AT Translated Set 2 keyboard: Configuring as keyboard     [   933.617] (**) Option "config_info" "udev:/sys/devices/platform/i8042/serio0/input/input3/event3"     [   933.617] (II) XINPUT: Adding extended input device "AT Translated Set 2 keyboard" (type: KEYBOARD, id 11)     [   933.617] (**) Option "xkb_rules" "evdev"     [   933.617] (**) Option "xkb_model" "pc105"     [   933.617] (**) Option "xkb_layout" "us,ru"     [   933.617] (**) Option "xkb_variant" ","     [   933.617] (**) Option "xkb_options" "grp:alt_shift_toggle,grp_led:scroll"     [   933.617] (II) config/udev: Adding input device ETPS/2 Elantech Touchpad (/dev/input/event9)     [   933.617] (**) ETPS/2 Elantech Touchpad: Applying InputClass "evdev touchpad catchall"     [   933.617] (**) ETPS/2 Elantech Touchpad: Applying InputClass "touchpad catchall"     [   933.617] (**) ETPS/2 Elantech Touchpad: Applying InputClass "Default clickpad buttons"     [   933.617] (II) LoadModule: "synaptics"     [   933.617] (II) Loading /usr/lib/xorg/modules/input/synaptics_drv.so     [   933.618] (II) Module synaptics: vendor="X.Org Foundation"     [   933.618]    compiled for 1.13.1.901, module version = 1.6.99     [   933.618]    Module class: X.Org XInput Driver     [   933.618]    ABI class: X.Org XInput driver, version 18.0     [   933.618] (II) Using input driver 'synaptics' for 'ETPS/2 Elantech Touchpad'     [   933.618] (**) ETPS/2 Elantech Touchpad: always reports core events     [   933.618] (**) Option "Device" "/dev/input/event9"     [   933.624] (II) synaptics: ETPS/2 Elantech Touchpad: found clickpad property     [   933.624] (--) synaptics: ETPS/2 Elantech Touchpad: x-axis range 0 - 3260     [   933.624] (--) synaptics: ETPS/2 Elantech Touchpad: y-axis range 0 - 2119     [   933.624] (--) synaptics: ETPS/2 Elantech Touchpad: pressure range 0 - 255     [   933.624] (--) synaptics: ETPS/2 Elantech Touchpad: finger width range 0 - 15     [   933.624] (--) synaptics: ETPS/2 Elantech Touchpad: buttons: left double triple     [   933.624] (--) synaptics: ETPS/2 Elantech Touchpad: Vendor 0x2 Product 0xe     [   933.624] (**) Option "SoftButtonAreas" "50% 0 82% 0 0 0 0 0"     [   933.624] (--) synaptics: ETPS/2 Elantech Touchpad: touchpad found     [   933.624] (**) ETPS/2 Elantech Touchpad: always reports core events     [   933.624] (**) Option "config_info" "udev:/sys/devices/platform/i8042/serio4/input/input9/event9"     [   933.624] (II) XINPUT: Adding extended input device "ETPS/2 Elantech Touchpad" (type: TOUCHPAD, id 12)     [   933.624] (**) synaptics: ETPS/2 Elantech Touchpad: (accel) MinSpeed is now constant deceleration 2.5     [   933.624] (**) synaptics: ETPS/2 Elantech Touchpad: (accel) MaxSpeed is now 1.75     [   933.624] (**) synaptics: ETPS/2 Elantech Touchpad: (accel) AccelFactor is now 0.051     [   933.624] (**) ETPS/2 Elantech Touchpad: (accel) keeping acceleration scheme 1     [   933.624] (**) ETPS/2 Elantech Touchpad: (accel) acceleration profile 1     [   933.624] (**) ETPS/2 Elantech Touchpad: (accel) acceleration factor: 2.000     [   933.624] (**) ETPS/2 Elantech Touchpad: (accel) acceleration threshold: 4     [   933.624] (--) synaptics: ETPS/2 Elantech Touchpad: touchpad found     [   933.624] (II) config/udev: Adding input device ETPS/2 Elantech Touchpad (/dev/input/mouse1)     [   933.624] (**) ETPS/2 Elantech Touchpad: Ignoring device from InputClass "touchpad ignore duplicates"     [   933.627] (EE) FBDEV(0): FBIOBLANK: Invalid argument


title: nested case - why must ";;" be put after possible commands and not directly behind "esac"?

text: I would like an explanation about the termination `;;` in a nested case statement. Is it documented somewhere ? Why doesn't it work like this:                    #!/bin/ksh            ...              esac          ;;           print "why here?"          ...      but works like this:               #!/bin/ksh          var1="C"      var2=0          case ${var1} in       A) print "A"         ;;            B) print "B"       ;;            C) print "C"               case $var2 in            0)              print "A B"              ;;            1)              print "C"                         ;;          esac          print "why here?"          ;;              *) print ${var1}       ;;     esac


title: Clear Memory Cache on Amazon EC2

text: In our project we have a few tests which run for about 3-4 hours continuously. In due course, the tests fail as they couldn't find enough memory. On googling, I found that running the following command helps me to resume my tests:               sync; echo 3 > /proc/sys/vm/drop_caches      However, these are nightly tests and it would help us a great deal if we can run it without manual intervention. I am just looking at the options to get this done. I found a few links 1 and 2 which, from the looks of it could be useful. I just wanted to know my other options before I could go ahead and update the cron tabs. Is it ok to clean up cache periodically? Will it cause other issues? Will increasing the RAM be helpful? What are my alternatives?


title: Mint 12: I can't open synaptic package manager

text: I have Mint 12 Lisa DVD edition, 32 bit verion. I have `kde` and `gnome`. I can't open the Synaptic package manager. When I click on it, I am asked to enter my password, I do so and click `authenticate`, and then nothing happens! I dual booted my XP, installing Mint last week and didn't have this problem. Is this problem happening because I installed `kde`? **@Kevin** when i type `synaptic` in a terminal i see: a popup window that says `starting without Administrative privileges` and so one, i press ok and senaptic opens up! **@Arochester** that didn't solve the problem but thanks coz you just help me update and clean my pc :) there was many packages than needed to be updated!


title: Host system keyboard layout changes when starting LXC container

text: I successfully created an archlinux container on an archlinux host with lxc. However, whenever I start a container via                   lxc-start -n GUESTNAME      the keyboard layout changes to the default us-layout on the host and in the container. But I want it to be de-latin1. What is surprising is that this keeps happening despite the fact that in                   /etc/vconsole.conf      on the host and in the container I have set the options                   KEYMAP=de-latin1      The cause of this problem seems to be that the systemd service responsible for setting the vconsole options is not running inside the container:                           systemctl status systemd-vconsole-setup          ● systemd-vconsole-setup.service - Setup Virtual Console            Loaded: loaded (/usr/lib/systemd/system/systemd-vconsole-setup.service; static)            Active: inactive (dead)                    start condition failed at Mon 2014-06-02 20:53:10 UTC; 27s ago                    ConditionPathExists=/dev/tty0 was not met              Docs: man:systemd-vconsole-setup.service(8)                    man:vconsole.conf(5)      Somehow it states that                   /dev/tty0 was not met      but I am unsure what it is trying to tell me. The archlinux linux containers page (https://wiki.archlinux.org/index.php/Linux_Containers#Terminal_settings) is not helping me. Can someone please explain the error and how to solve it? * * * UPDATE: (1) The keyboard layout does not change when I start the container directly from the console (e.g. by starting tmux `tmux new -s stoic` then running `sudo lxc-start -n stoic` and then detaching from the tmux session via `CTRL-a-d`) i.e. before logging into `X`. This points to another possible explanation: When I log into `X` the keyboard layout gets set by my `.xinitrc` which has the content:                   setxkbmap -model pc105 -layout de -variant ,qwertz -option lv3:caps_switch         if [ -s ~/.Xmodmap ]; then             xmodmap ~/.Xmodmap         fi         [[ -f ~/.Xresources ]] && xrdb -merge ~/.Xresources      If I then run a container via `sudo lxc-start -n stoic` within `X` it will also boot to the console and not to `X` (that’s the way I set up all my systems). Hence, it resets the keyboard layout I guess. But this wouldn’t be that big a problem if the container would at least respect the aformentioned `/etc/vconsole.conf`. (2) I use a privileged container. (3) Here is my current `config`-file:                   lxc.utsname=stoic         lxc.autodev=1         lxc.tty=1         lxc.pts=1024         lxc.mount=/var/lib/lxc/stoic/fstab         lxc.cap.drop=sys_module mac_admin mac_override sys_time         lxc.kmsg=0         lxc.stopsignal=SIGRTMIN+4         #networking         lxc.network.type=veth         lxc.network.link=br0         lxc.network.flags=up         lxc.network.name=eth0          lxc.network.mtu=1500         #cgroups         lxc.cgroup.devices.deny = a         lxc.cgroup.devices.allow = c *:* m         lxc.cgroup.devices.allow = b *:* m         lxc.cgroup.devices.allow = c 1:3 rwm         lxc.cgroup.devices.allow = c 1:5 rwm         lxc.cgroup.devices.allow = c 1:7 rwm         lxc.cgroup.devices.allow = c 1:8 rwm         lxc.cgroup.devices.allow = c 1:9 rwm         lxc.cgroup.devices.allow = c 4:1 rwm         lxc.cgroup.devices.allow = c 5:0 rwm         lxc.cgroup.devices.allow = c 5:1 rwm         lxc.cgroup.devices.allow = c 5:2 rwm         lxc.cgroup.devices.allow = c 136:* rwm         lxc.rootfs = /var/lib/lxc/stoic/rootfs         lxc.pts = 1024


title: shell script to download info. about movies from imdb/thmb and putting it into an .nfo file for per-use

text: Does anybody know of a tool which will extract info. from imdb.com/themoviedb.corg and dumping it into a text file ? I have been searching but with no luck . I usually get the movie name but want to have the plot, actor's names, keywords whatever info. is there from imdb.com. If it's not possible from imdb.com then perhaps themoviedb.org ? Either of the above would be useful. As of now I have to manually scrap the movie synopsis from the imdb site, create the .nfo using mediainfo's --LogFile option to create an .nfo. Looking forward to make it easier and also down the road use more of the fields.


title: Vim: pasting lines line by line

text: Let's suppose I have a file containing:               xxx     yyy     zzz      and another file:               kkk     qqq     ppp      I want to obtain:               xxxkkk     yyyqqq     zzzppp      Is that possible in Vim with some command? (I've tried using VISUAL BLOCK but with no success). In my particular case I have two big files with many lines to paste so the answer could also be some shell command but i would like to know if there's a way to do it even within the same file.