title: Running setuid binary temporarily without setuid?

text: Currently setting up xpra, which wants to run an X instance as non-root using the dummy driver, but the system Xorg binary is SUID. Since the system auto- updates, I would prefer not making and maintaining a non-SUID copy of the binary. I'm also trying to avoid using a hack like copy-execute-delete, e.g. in the tmp directory (would prefer to make it a clean one-liner, which I instinctively believe should be possible, though there may be some subtle security hole this capability would open). Symlinks would be acceptable, though AFAIK they don't provide permission bit masking capabilities. My current best solution is a nosuid bind mount on the bin directory, which seems to do the trick, but as above I'd still prefer a solution that doesn't leave crunk in my system tree/fstab (e.g. some magic environment variable that disables suid the same way a nosuid mount does, or some commandline execute jutsu that bypasses the suid mechanism). Any thoughts?


title: How can I figure out the reason of the lagging of Cinnamon?

text: So I am using Mint 15 with Cinnamon on my Dell XPS L502x (Sandy Bridge i7 + 8G + GTX540M + 300G SSD). I am using Numix theme and a custom font. I installed Bumblebee, but I am not using nVidia card in daily usage. In everyday work, I use a lot of Java based software, and I am using manually extracted Oracle JDK 1.7 update 25 x64. I also have VirtualBox installed. Now I've an annoying problem: the whole GUI becomes very laggy randomly, and the only way to recover is to log out or reboot. When it's laggy, the CPU usage and memory usage are very normal. So I've no idea about how to research into this problem. So, where should I start to research into this lagging problem? * * * Update: Checked again with top, Xorg is using 1/8 of the whole CPU (looks like it is fully utilizing a logic core).


title: Unable to find root device / sda partitions missing

text: I have installed Archlinux, and after that GRUB. I manually entered menu entries for both my Windows and Arch installation. GRUB has no problems booting, and can successfully load in Windows. It can't load in Arch though. Linux will kick me into a recovery shell with no `/deb/sda` files. The USB is properly detected however. What is causing this and how to fix? Must I copy the whole error log? It's not that long, it just tells me it cannot find device '' and it is unable to access tty.


title: Random bug in Linux

text: Some time ago, I remember reading an article on randomization in computing, and how _random_ you can actually get a system to be. The article came about, if I'm not mistaken, because of some seemingly minor change in the code, but resulted in a big security vulnerability.   I can't find the article, and I can't recall what bug it was specifically. Searching the web with nothing but a vague recollection of some bug that was fixed a few years back turns out to be harder than I like it to be. I did however, find this. It seems to fit the description, but only touches on openssl. I was wondering if, by any chance, this bug was broader than just random numbers in openssl, and actually messed up the entire entropy pool. If this bug has nothing to do with the entropy pool, then: was there ever such a bug (one that caused significant reduction in entropy, and thus predictable randomization)? If so, I'd like to know which distro's were/are vulnerable and where to find the reports of these bugs.   If such a bug doesn't exist... I've had a terrible night (insomnia), which has been known to cause hallucinations and delusions in people... forgive me. _To whom it might concern:_   The reason for my asking this is because I'm working on some code, and we've been getting a lot of Higgs-Bugson bug-reports. We've been looking into what could be causing certain issues, and it just _has_ to have something to do with predictable randomization.   I can't go into too much detail, given that I, sadly, am not working for an open-source company, and had to sign an NDA.


title: Open clickable text in emacs in new/neighboring window

text: Currently I have a mode (magit to be precise) when I have clickable text switches buffer to the file. However I'd prefer sometimes to open in new or neighboring window. Is it possible to do it? PS. By Window I mean Emacs window not Emacs frame.


title: Unable to view traps through snmptrad?

text: I've been unable to view traps through `snmptrapd`. I generated a SNMP trap manually using the below provided `snmptrap` command:               snmptrap -c public -v 2c -n "" localhost 0 uptime      But I'm unable to capture the trap using the below provided `snmptrapd` command:               snmptrapd -f -M /usr/share/snmp/mibs -m inUnixPlatformApp-MIB -Os      **Question:** How can I capture the `snmptrap` in `snmptrapd`? ### Installed software I have the following RPM packages installed on the RHEL 6.3 server:               # rpm -qa|grep -i snmp     net-snmp-libs-5.5-41.el6.x86_64,     net-snmp-libs-5.5-41.el6.i686,     net-snmp-devel-5.5-41.el6.x86_64,     net-snmp-5.5-41.el6.x86_64,     net-snmp-perl-5.5-41.el6.x86_64,     net-snmp-utils-5.5-41.el6.x86_64,     perl-SNMP_Session-1.12-4.el6.noarch      ### System info   * Linux Rhel: 6.3   * SNMP Master Agent version: 5.5   * SNMP Protocol version: v2C


title: How to mount USB stick on Debian Sid?

text: I've just installed Debian Sid on my computer but I cannot mount external USB drives as you can see in the image. ![enter image description here](http://i.stack.imgur.com/vVxlt.png) > Mounting failed   >  Cannot mount "SENZATITOLO"   >  Not authorized What should I do?


title: Start a program at the start of xfce

text: I've installed volumeicon-alsa, I'd like to add in the panel the icon without typing each time that I switch on the computer in the terminal `volumeicon` but I'd like to let it start at the start of XFCE, how can I do? Thank you.


title: How can I set power button (on computer case) to power off system with `systemd`?

text: How can I set the power button (on my computer case, not keyboard) to power off the system with `systemd` (without `acpid`)?


title: Restrict password-less backup with SFTP

text: I need to perform backup of a server to my computer using Duplicity:               duplicity /etc sftp://backup@my.dynamic.ip.address//home/backup      Before this can be done, I need to allow password-less access by doing the following:               $ ssh-keygen     $ ssh-copy-id backup@my.dynamic.ip.address     $ ssh backup@my.dynamic.ip.address      My question is, how do I restrict the command to just this SFTP transfer in the public key that is generated? > `command="restrict to sftp",no-port-forwarding,no-X11-forwarding,no-agent- > forwarding,no-pty ssh-rsa AAAA…` And since I am on a dynamic IP address, how do I overcome the "missing known host" problem each time my IP changes?


title: Debian VirtualBox Guest - Common Files to Remove for Space Saving?

text: I have created a VirtualBox guest using debian-6.0.7-amd64. I am using it as a clone template to create Java work nodes, so my needs are pretty much limited to the JVM, networking, SSH and the basics needed to actually work on the box. When I picked install package categories on install, I deselected everything except "basics" and SSH. I want to shrink this guy as much as possible (though I will need some available file-space) and then use it to clone up a bunch of new instances as I need them. My question is, can you suggest a set of files that would be included in this distro, that I could safely delete and most likely not need for everyday support of what amounts to a JVM ? Thanks.


title: Error after remove thunar

text: I'm not a Thunar fan, so I removed it and installed Nautilus. When I try to open picture or folder I have this error ![Error message](http://i.stack.imgur.com/JQO6G.png) What should I do?


title: How to merge multiple WebDAV accounts for backup?

text: I use davfs, aufs, rsync:               sudo mount -t davfs -o uid=wd,gid=wd,dir_mode=777,rw https://wd1.wd.wd/ /mnt/webdav1     sudo mount -t davfs -o uid=wd,gid=wd,dir_mode=777,rw https://wd1.wd.wd/ /mnt/webdav2     sudo mount -t davfs -o uid=wd,gid=wd,dir_mode=777,rw https://wd2.wd.wd/ /mnt/webdav3     sudo mount -t aufs none /mnt/webdav/ -o br:/mnt/webdav1=rw:/mnt/webdav2=rw:/mnt/webdav3=rw,create=mfs,sum     rsync -r /home/user/bp /mnt/webdav/backup      But I have many problems:   1. aufs pumped into one stream on webdav server   2. rsync does not work resume files (tried - ignore-existing but not working) Does anyone know how to fix these problems or advise other software? I thought of using ownCloud but I'm not sure whether it can unite WebDAV server into one for backup.


title: VGA and DVI, set default kernel console to one

text: this seems like a very basic question, but after searching the web for 2 hours I couldn't find any real help on the subject and it's driving me nuts. It's brutally simple: I have a radeon 4670 video card (rv770xt), use Arch Linux' repo kernel and have monitors on VGA and DVI. KMS is enabled and doing fine. The VGA monitor has a smaller resolution than the DVI monitor and by default the screen is mirrored to both with the VGA monitor's resolution. Now I don't want to use the VGA monitor at all for the kernel framebuffer/console and want the kernel to use the (bigger) DVI monitor. Note: This is not about X.org dual-head, it's about the kernel framebuffer/console. Now here's the question: Are there kernel parameters to specify a default output for my framebuffer and if so, which? The best way to do that I have found so far seems to use con2fb on startup to move all the VTs to the 2nd monitor, but I don't even know if the radeon driver creates 2 fbs and it would only be a workaround anyways. **Edit1:** I checked, the driver just creates fb0, so `con2fb` is a no-go


title: Building MariaDB 5.5.27 without OQGraph: How to deselect the plugin?

text: I'm trying to build MariaDB 5.5.27 from source. In fact, I just need the client, but I seem to have to build the complete database system anyway. While configuring with `cmake` and later compiling with `make`, I ran into the following problem:               In file included from /usr/include/boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp:27:0,                      from /usr/include/boost/smart_ptr/detail/sp_counted_base.hpp:36,                      from /usr/include/boost/smart_ptr/detail/shared_count.hpp:29,                      from /usr/include/boost/smart_ptr/shared_ptr.hpp:32,                      from /usr/include/boost/shared_ptr.hpp:17,                      from /usr/include/boost/property_map/vector_property_map.hpp:14,                      from /usr/include/boost/property_map/property_map.hpp:844,                      from /home/bereziak/make/mariadb-5.5.27/storage/oqgraph/graphcore.cc:36:     /usr/include/boost/detail/sp_typeinfo.hpp: In instantiation of ‘boost::detail::sp_typeinfo boost::detail::sp_typeid_<boost::checked_array_deleter<unsigned char> >::ti_’:     /usr/include/boost/smart_ptr/detail/sp_counted_impl.hpp:149:75:   instantiated from ‘void* boost::detail::sp_counted_impl_pd<P, D>::get_deleter(const boost::detail::sp_typeinfo&) [with P = unsigned char*, D = boost::checked_array_deleter<unsigned char>]’     /home/bereziak/make/mariadb-5.5.27/storage/oqgraph/graphcore.cc:1101:1:   instantiated from here     /usr/include/boost/detail/sp_typeinfo.hpp:77:48: error: conversion from ‘const char*’ to non-scalar type ‘boost::detail::sp_typeinfo’ requested     make[2]: *** [storage/oqgraph/CMakeFiles/oqgraph.dir/graphcore.cc.o] Error 1     make[1]: *** [storage/oqgraph/CMakeFiles/oqgraph.dir/all] Error 2     make: *** [all] Error 2      Now, since I just need the client, I was thinking of deactivating the OQGraph plugin completely when configuring. But how should I do that? This is what I did:               cmake .      Inside my MariaDB directory, of course. How do I deactivate plugins/parts from it? with `configure` I'd simply use the option `\--without-plugin_oqgraph`, I tried that with `cmake` as well, but it didn't work.


title: How to unlock read-only filesystem on OpenWRT router linux distribution?

text: I have installed minimal OpenWRT firmware on Linksys router. When I try to modify some of the files withing `/etc/` directory for example `firewall.user` file by using command `vi firewall.user` it opens file in `read-only` attributes only. How can I enable editing of files? The `chmod` command isn't accessible and my memory in router is very limited, therefore installing any extra resources is not an option.


title: File sharing between Windows, Linux and Android over network

text: I have a desktop running Windows 7, a laptop running OpenSUSE 13.1 and an Android 4.1 Tablet, all connected to the same network via a router (the desktop through a LAN cable and the others via WiFi). What would be the best way to share files over this network seamlessly among all three devices? I have somewhat managed to share files between my laptop and desktop via Samba, but even there it works sometimes if I'm lucky while at other times Dolphin simply crashes. Also I can only share one folder on Windows for some reason (the user folders).


title: How to open a directory and save code in it Gerris in Linux?

text: I am new to this Unix and Gerris (software) world. I have to simulate. but I cannot open and type these codes below in vortivcity directory.I am using remote connection from mac to university machine.               [sbalta@dps11 bin]$ cd vorticity     [sbalta@dps11 vorticity]$ 1 2 GfsSimulation GfsBox GfsGEdge {} {      -bash: 1: command not found     [sbalta@dps11 vorticity]$ 1 2 GfsSimulation GfsBox GfsGEdge {} {     -bash: 1: command not found     [sbalta@dps11 vorticity]$   GfsTime { end = 0 }     -bash: GfsTime: command not found     [sbalta@dps11 vorticity]$ }     -bash: syntax error near unexpected token `}'     [sbalta@dps11 vorticity]$ GfsBox {}     -bash: GfsBox: command not found     [sbalta@dps11 vorticity]$ 1 1 right     -bash: 1: command not found     [sbalta@dps11 vorticity]$ 1 1 top     -bash: 1: command not found


title: Strange IOStat xk. Moving a mere 40GB data is too slow. Can anyone explain?

text: iostat -xk 5               avg-cpu:  %user   %nice %system %iowait  %steal   %idle                0.99    0.00    1.10   11.01    0.00   86.89          Device:         rrqm/s   wrqm/s     r/s     w/s    rkB/s    wkB/s avgrq-sz avgqu-sz   await  svctm  %util     sda               0.00     0.00    0.00    1.50     0.00     6.00     8.00     0.00    1.73   0.40   0.06     sdb               0.00     0.00    0.00    0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00     sdd               0.00   836.00    0.00   37.50     0.00  3506.00   186.99     0.33    8.75   0.28   1.06     sdc               0.00   961.80  137.60   17.80  3221.20  3928.40    92.02     3.36   21.78   6.21  96.53          avg-cpu:  %user   %nice %system %iowait  %steal   %idle                0.53    0.00    0.69   14.48    0.00   84.30          Device:         rrqm/s   wrqm/s     r/s     w/s    rkB/s    wkB/s avgrq-sz avgqu-sz   await  svctm  %util     sda               0.00     0.00    0.00    0.70     0.00     2.80     8.00     0.00    1.43   0.86   0.06     sdb               0.00     0.00    0.00    0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00     sdd               0.00   775.10    0.00   39.70     0.00  3270.40   164.76     0.52   13.13   0.24   0.94     sdc               0.00   466.60  103.20  170.60  2480.80  2552.80    36.77    72.97  266.53   3.59  98.42      Why it's strange?   1. The sole main operation is moving 40G data from sdc to sdd.   2. So sdd is being written and sdc is being read. Yet sdc, which is being read, has huge write   3. total disk activity is around 4MB/s and hard disk is already at full speed capacity. C'mon..... Only 4 MB/s? I know hard disk is not fast. But my hard disk at home does more than 4MB/s.


title: Creating launchable tmux configurations?

text: I find myself often doing the same thing with `tmux`:   1. `cd` to a given directory.   2. `tmux`   3. Rename window to what I'm doing.    4. Split the window vertically 50%.   5. Start one process in the left window.   6. Start another process in the right window.   7. Profit. Is there a way for me to automate launching all of this so that I can run a single command and get the window I'm looking for?


title: Screen flickers and will not advance to login on Fedora 18

text: When I try to load Fedora on my desktop, the screen flickers as the "f" fills up. After the "f" fills up, the screen continues to flicker but does not advance to the login screen. Additionally, the screen is offset a random amount (that changes each time) so that when I move my mouse all the way to the left it wraps around to the right for a few hundred pixels. I used to deal with this problem by tapping the power button to enter sleep mode - when I tapped it again to resume the problem would be fixed. However, after recent updates, the power button no longer seems to start sleep mode and I can't figure out another way to do it. I can't open the terminal from this view to debug in any meaningful way. I've tried the last three kernels (I don't have more previous ones saved) and they all have the same problem. Searching around, I can't find much on Fedora flickering + not properly booting. Does anyone have any suggestions? What kind of hardware specs should I provide to make this an easier problem to solve? I'm not sure if this is a Fedora specific problem or a general linux one because I have only Fedora and Windows installed on this computer.


title: Is it better to upgrade Fedora 17 or install new Fedora 18?

text: I have a good and configured Fedora 17, I am very happy with it. I am going to upgrade it to Fedora 18 using `FedUp`, I was wondering can i do it easily without any break or problem or it is better to install a fresh Fedora 18. I have several concerns after upgrading:   * My Fedora performance.   * Break My fedora and does not boot.   * Some of my software does not run. I must mention that i have installed RPM fusion packages on my Fedora 17. Please advise me if you have any knowledge or experience about this issue.


title: Are there a way to block a program from starting during certain times?

text: As the title says. I want to prevent a certain program from being started during specific times. Are there a good way of accomplishing this at *nix distros?


title: Build minimal centos

text: I'm building a miniminal Centos5 for use in xen but i having problems when go to use yum this are the steps:               $ mkdir -p images/x86_64/5     $ cd images/x86_64/5     $ mkdir -p proc etc dev var/{cache,log,lock/rpm} sys     # yum -c yum.conf --installroot=images/x86_64/5 -y groupinstall Base      the last command throw the following error:               error: could not open Packages index using db3 - No such file or directory (2)     error: can not open Packages database in images/x86_64/5/var/lib/rpm     Traceback (most recent call last):       File "/usr/bin/yum", line 29, in ?         yummain.user_main(sys.argv[1:], exit_code=True)       File "/usr/share/yum-cli/yummain.py", line 309, in user_main         errcode = main(args)       File "/usr/share/yum-cli/yummain.py", line 157, in main         base.getOptionsConfig(args)       File "/usr/share/yum-cli/cli.py", line 187, in getOptionsConfig         self.conf       File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 665, in <lambda>         conf = property(fget=lambda self: self._getConfig(),       File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 240, in _getConfig         self._conf = config.readMainConfig(startupconf)       File "/usr/lib/python2.4/site-packages/yum/config.py", line 805, in readMainConfig         yumvars['releasever'] = _getsysver(startupconf.installroot, startupconf.distroverpkg)       File "/usr/lib/python2.4/site-packages/yum/config.py", line 878, in _getsysver         idx = ts.dbMatch('provides', distroverpkg)     TypeError: rpmdb open failed      ## How i can solve this?


title: Make cd follow symbolic links

text: I have my code mounted as an sshfs in my home directory, but the hierarchy is difficult to remember, so I created a symlink in my home directory leading to that directory. Is there a way so that when I cd to that symbolic link, instead of cding to the symbolic link, it will actually cd to that directory? If the question was unclear, here is an example of what I am looking for:               foo@foo:~$ ls -l     lrwxrwxrwx  1 foo      foo              5 2012-11-14 08:20 foo -> bar/bar          foo@foo:~$ cd foo     foo@foo:~/bar/bar/$


title: Attempting to insert characters via shell script bound to hotkey

text: I added the following to `/root/.config/openbox/rc.xml`:               <keybind key="C-A-t">             <action name="Execute">                 <command>/root/my-applications/test1.sh</command>             </action>     </keybind>        The `test1.sh file` consists of an executable shell script which outputs `ñ`. The idea being to tie the key combination to the output, so when I press `C`-`A`-`t` it will output an `ñ`. However, it doesn't work; pressing it in (for example) Geany does nothing. I have reconfigured openbox. What am I doing wrong?


title: How can I access a directory outside a chroot from within it?

text: I have a user which is chrooted to her home directory, but I want her to also be able to manage files within `/var/www`. As such, I did the following:               root@server:/home/username# ln -s /var/www www     root@server:/home/username# cd www     root@server:/home/username/www# chown username:username *      However, when I try to open `/www` with FileZilla it returns "no such file or directory". I can see the linked directory, but I can't access it. What am I doing wrong?


title: What happens if I set default system runlevel to 0 or 6?

text: What I understand from runlevels is that in each level some programs have permission to be executed and some don't. runlevel 3 boots system into CLI and runlevel 5 starts the default GUI. But I don't understand what do 0(shutdown) and 6(reboot) mean?(Start in shutdown/reboot mode?!). What happens If set initdefault to these values?


title: What are some ways to compare file type and encodings to resolve buggy grep...?

text: In this case I have a folder of .txt files I created using _drag and copy and paste_ from Adobe Acrobat PDFs and Text Editor in OSX. I've been editing these files in vim. Now I'm using grep to find notes in these files. For example,               grep -c "\[t\]" Herbert*      `[t]` is the note and the directory has 22 files with the name-prefix `Herbert*` (as in `Herbert-02-Transformation.txt`, `Herbert-14-Classification.txt`). The trouble is `grep` only finds the search string in one file (`Herbert-03-Square.txt`), but each file has the same note many times. The trouble files display `converted` in the status bar when I open them,               "Herbert-02-Transformation.txt" [converted] 276L, 57171C      A post at unix.stack suggests special characters from the original have survived the trip from PDF to vim to cause this trouble with `grep`. I've been deleting the borked characters and manually inserting the proper `:digraphs`. Some of the edited files are searchable by grep and other edited files are not. I attempted to use,               :e Herbert-02-Transformation.txt     :set encoding=utf-8`      :w      but the file still opens as shown above. Now I'm thinking I need to figure out how to compare the encodings of those files where `grep` is working and those where it is not. There are enough help pages detailing _how to set up file detection_ in .vimrc to avoid this problem that I've spent over 1.5 hours researching this, and I now think its a good question...


title: How to decide that mv moves into a directory rather than replacing directory?

text: Say I have a directory `/hello`. Then I do `mv /hello /hello2`. Am I moving `/hello` into `/hello2/hello`? Or am I moving `/hello` to `/hello2`? It seems that when I do something like this, I get inconsistent results.


title: equivalent of update-grub for rhel/fedora/centos systems

text: In Ubuntu (and I guess in Debian too) there is a system script named `update- grub` which automatically executes `grub-mkconfig -o` with the correct path for the grub configuration file. Is there any similar command for redhat based system? If not, how do the system knows where is the grub configuration file to update when a new kernel version is installed?


title: Ctrl + Right and Right send same Sequence in Putty > Screen > Vim

text: I'm using putty > screen > vim, and screen is sending the same sequence for `Ctrl`+`Right` and `Right` in application mode for vim. There is an option to make putty send the cursor mode sequences (disable application cursor keys mode) when in application mode and that works, but when screen is introduced, something isn't right. How would I go about fixing this?


title: Linux md RAID: /dev/md0 vs. /dev/md/0

text: On newer systems `/usr/share/mdadm/mkconf` (the script that is used to generate `/etc/mdadm/mdadm.conf`) tends to use the device name `/dev/md/0` instead of `/dev/md0`:               new-system ~ # /usr/share/mdadm/mkconf | grep ARRAY     ARRAY /dev/md/0 metadata=1.2 UUID=a0021927:0e4f10bf:2c47dc72:ca0b352e name=unassigned:0      This may cause some irritation for users who expect `/dev/md0` there, but apparently it works fine because the server boots without problems. In `/proc/mdstat` the device is still called `/dev/md0`:               new-system ~ # cat /proc/mdstat     Personalities : [raid1]     md0 : active raid1 sdb2[2] sda2[0]           1953381184 blocks super 1.2 [2/2] [UU]          unused devices: <none>      `ls` shows that `/dev/md/0` is a symlink to `/dev/md0`:               new-system ~ # ls -l /dev/md/0      lrwxrwxrwx 1 root root 6 Nov 20 14:06 /dev/md/0 -> ../md0      On another older system `mkconf` still uses `/dev/md0` instead, and `/dev/md` is empty:               old-system ~ # /usr/share/mdadm/mkconf | grep ARRAY     ARRAY /dev/md0 UUID=76472cf5:83fd8e5a:ad617046:69b2ebf1     old-system ~ # ls -l /dev/md     total 0      I'd like to know the difference between these device names, and I can't find any explanation on Google. Is `/dev/mdN` the old name, and `md` is planning to move to `/dev/md/N` device names? Is this change related to the 1.2 metadata (I've noticed that the new server is using md 1.2, while the old one is still using 0.90)?


title: How do I multiply and sum column data using awk and or sed?

text: I have several columns of data. I always have the same number of rows (say 5). In the 2nd column, I want to multipy the first value by 5, then the second value by 4, the third value by 3, etc. I then want to sum these values, and divide by the sum of the values in the second column. How would I do this in sed and/or awk? Example:               4 5 7 1 2 3     5 1 2 3 1 2     4 2 3 6 1 2     3 4 1 6 3 3     2 3 1 2 1 6 Answer: `(5*5 + 4*1 + 3*2 + 2*4 + 1*3)/(5 + 1 + 2 + 4 + 3) = 3.067`


title: Export an env variable to be available at all sub shells, and possible to be modified?

text: Suppose I have               export MY_VAR=0      in `~/.bashrc`. I have an opened gnome terminal, and in this terminal, I change `$MY_VAR` value to `200`. So, if I do               echo $MY_VAR      in this terminal, `200` is shown. Now, I opened another tab in my gnome terminal, and do               echo $MY_VAR      ...and instead of `200`, I have `0`. What should I do to persist the 200 value when a terminal modifies an environment variable, making this modification (setting to 200) available to all subsequent sub shells and such? Is this possible?


title: Periodically unable to connect to WPA2-EAP access point

text: I have setup a WPA2-EAP TLS WiFi access point at home and everything works fine usually. Unfortunately, though, many times I'll drop my connection to the access point and won't be able to reconnect. Here's output from `/var/log/syslog`:               Feb 19 13:45:55 mightymoose NetworkManager[1520]: <warn> Activation (eth2/wireless): association took too long.     Feb 19 13:45:55 mightymoose NetworkManager[1520]: <info> (eth2): device state change: config -> need-auth (reason 'none') [50 60 0]     Feb 19 13:45:55 mightymoose NetworkManager[1520]: <warn> Activation (eth2/wireless): asking for new secrets     Feb 19 13:45:55 mightymoose wpa_supplicant[1823]: CTRL-EVENT-DISCONNECTED bssid=00:00:00:00:00:00 reason=0     Feb 19 13:45:55 mightymoose kernel: [ 7683.962658] cfg80211: Calling CRDA to update world regulatory domain     Feb 19 13:45:55 mightymoose kernel: [ 7683.968693] cfg80211: World regulatory domain updated:     Feb 19 13:45:55 mightymoose kernel: [ 7683.968698] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)     Feb 19 13:45:55 mightymoose kernel: [ 7683.968701] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)     Feb 19 13:45:55 mightymoose kernel: [ 7683.968703] cfg80211:   (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)     Feb 19 13:45:55 mightymoose kernel: [ 7683.968706] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)     Feb 19 13:45:55 mightymoose kernel: [ 7683.968708] cfg80211:   (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)     Feb 19 13:45:55 mightymoose kernel: [ 7683.968710] cfg80211:   (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)     Feb 19 13:45:55 mightymoose NetworkManager[1520]: <info> (eth2): supplicant interface state: associated -> disconnected     Feb 19 13:45:55 mightymoose NetworkManager[1520]: <warn> Couldn't disconnect supplicant interface: This interface is not connected.     Feb 19 13:45:58 mightymoose NetworkManager[1520]: get_secret_flags: assertion `is_secret_prop (setting, secret_name, error)' failed     Feb 19 13:45:58 mightymoose NetworkManager[1520]: <info> Activation (eth2) Stage 1 of 5 (Device Prepare) scheduled...     Feb 19 13:45:58 mightymoose NetworkManager[1520]: <info> Activation (eth2) Stage 1 of 5 (Device Prepare) started...     Feb 19 13:45:58 mightymoose NetworkManager[1520]: <info> (eth2): device state change: need-auth -> prepare (reason 'none') [60 40 0]     Feb 19 13:45:58 mightymoose NetworkManager[1520]: <info> Activation (eth2) Stage 2 of 5 (Device Configure) scheduled...     Feb 19 13:45:58 mightymoose NetworkManager[1520]: <info> Activation (eth2) Stage 1 of 5 (Device Prepare) complete.     Feb 19 13:45:58 mightymoose NetworkManager[1520]: <info> Activation (eth2) Stage 2 of 5 (Device Configure) starting...     Feb 19 13:45:58 mightymoose NetworkManager[1520]: <info> (eth2): device state change: prepare -> config (reason 'none') [40 50 0]     Feb 19 13:45:58 mightymoose NetworkManager[1520]: <info> Activation (eth2/wireless): connection 'Teekopolis' has security, and secrets exist.  No new secrets needed.     Feb 19 13:45:58 mightymoose NetworkManager[1520]: <info> Config: added 'ssid' value 'Teekopolis'     Feb 19 13:45:58 mightymoose NetworkManager[1520]: <info> Config: added 'scan_ssid' value '1'     Feb 19 13:45:58 mightymoose NetworkManager[1520]: <info> Config: added 'key_mgmt' value 'WPA-EAP'     Feb 19 13:45:58 mightymoose NetworkManager[1520]: <info> Config: added 'eap' value 'TLS'     Feb 19 13:45:58 mightymoose NetworkManager[1520]: <info> Config: added 'fragment_size' value '1300'     Feb 19 13:45:58 mightymoose NetworkManager[1520]: <info> Config: added 'ca_cert' value '/home/naftuli/.certs/teekopolis-wifi-client-ca.crt'     Feb 19 13:45:58 mightymoose NetworkManager[1520]: <info> Config: added 'private_key' value '/home/naftuli/.certs/teekopolis-wifi-naftuli-mightymoose.p12'     Feb 19 13:45:58 mightymoose NetworkManager[1520]: <info> Config: added 'private_key_passwd' value '<omitted>'     Feb 19 13:45:58 mightymoose NetworkManager[1520]: <info> Config: added 'identity' value 'naftuli@mightymoose'     Feb 19 13:45:58 mightymoose NetworkManager[1520]: <info> Config: added 'bgscan' value 'simple:30:-45:300'     Feb 19 13:45:58 mightymoose NetworkManager[1520]: <info> Activation (eth2) Stage 2 of 5 (Device Configure) complete.     Feb 19 13:45:58 mightymoose NetworkManager[1520]: <info> Config: set interface ap_scan to 1     Feb 19 13:45:58 mightymoose NetworkManager[1520]: <info> (eth2): supplicant interface state: disconnected -> scanning     Feb 19 13:46:01 mightymoose wpa_supplicant[1823]: Trying to associate with FF:FF:FF:FF:FF:FF (SSID='Teekopolis' freq=2412 MHz)     Feb 19 13:46:01 mightymoose NetworkManager[1520]: <info> (eth2): supplicant interface state: scanning -> associating     Feb 19 13:46:01 mightymoose wpa_supplicant[1823]: Associated with FF:FF:FF:FF:FF:FF     Feb 19 13:46:01 mightymoose wpa_supplicant[1823]: bgscan simple: Failed to enable signal strength monitoring     Feb 19 13:46:01 mightymoose kernel: [ 7689.938155] cfg80211: Calling CRDA for country: US     Feb 19 13:46:01 mightymoose wpa_supplicant[1823]: CTRL-EVENT-EAP-STARTED EAP authentication started     Feb 19 13:46:01 mightymoose NetworkManager[1520]: <info> (eth2): supplicant interface state: associating -> associated     Feb 19 13:46:01 mightymoose kernel: [ 7689.942709] cfg80211: Regulatory domain changed to country: US     Feb 19 13:46:01 mightymoose kernel: [ 7689.942713] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)     Feb 19 13:46:01 mightymoose kernel: [ 7689.942716] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2700 mBm)     Feb 19 13:46:01 mightymoose kernel: [ 7689.942718] cfg80211:   (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 1700 mBm)     Feb 19 13:46:01 mightymoose kernel: [ 7689.942721] cfg80211:   (5250000 KHz - 5330000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)     Feb 19 13:46:01 mightymoose kernel: [ 7689.942723] cfg80211:   (5490000 KHz - 5600000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)     Feb 19 13:46:01 mightymoose kernel: [ 7689.942725] cfg80211:   (5650000 KHz - 5710000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)     Feb 19 13:46:01 mightymoose kernel: [ 7689.942727] cfg80211:   (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 3000 mBm)     Feb 19 13:46:01 mightymoose wpa_supplicant[1823]: CTRL-EVENT-EAP-PROPOSED-METHOD vendor=0 method=13     Feb 19 13:46:01 mightymoose wpa_supplicant[1823]: OpenSSL: pending error: error:0606F076:digital envelope routines:EVP_PKCS82PKEY:unsupported private key algorithm     Feb 19 13:46:01 mightymoose wpa_supplicant[1823]: OpenSSL: pending error: error:140CB00D:SSL routines:SSL_use_PrivateKey_file:ASN1 lib     Feb 19 13:46:01 mightymoose wpa_supplicant[1823]: OpenSSL: pending error: error:140CB009:SSL routines:SSL_use_PrivateKey_file:PEM lib     Feb 19 13:46:01 mightymoose wpa_supplicant[1823]: CTRL-EVENT-EAP-METHOD EAP vendor 0 method 13 (TLS) selected     Feb 19 13:46:01 mightymoose kernel: [ 7690.190340] net_ratelimit: 14 callbacks suppressed     Feb 19 13:46:01 mightymoose kernel: [ 7690.190345] ERROR @wl_cfg80211_get_station : Could not get rate (-1)     Feb 19 13:46:01 mightymoose kernel: [ 7690.190350] ERROR @wl_cfg80211_get_station : Could not get rssi (-1)     Feb 19 13:46:01 mightymoose kernel: [ 7690.190386] ERROR @wl_cfg80211_get_station : Could not get rate (-1)     Feb 19 13:46:01 mightymoose kernel: [ 7690.190389] ERROR @wl_cfg80211_get_station : Could not get rssi (-1)     Feb 19 13:46:02 mightymoose kernel: [ 7690.689071] ERROR @wl_cfg80211_get_station : Could not get rate (-1)     Feb 19 13:46:02 mightymoose kernel: [ 7690.689073] ERROR @wl_cfg80211_get_station : Could not get rssi (-1)     Feb 19 13:46:02 mightymoose kernel: [ 7690.689087] ERROR @wl_cfg80211_get_station : Could not get rate (-1)     Feb 19 13:46:02 mightymoose kernel: [ 7690.689088] ERROR @wl_cfg80211_get_station : Could not get rssi (-1)     Feb 19 13:46:02 mightymoose kernel: [ 7691.188556] ERROR @wl_cfg80211_get_station : Could not get rate (-1)     Feb 19 13:46:02 mightymoose kernel: [ 7691.188564] ERROR @wl_cfg80211_get_station : Could not get rssi (-1)     Feb 19 13:46:05 mightymoose wpa_supplicant[1823]: CTRL-EVENT-EAP-PEER-CERT depth=1 subject='/C=US/ST=California/L=Teekopolis/O=City of Teekopolis/OU=Internet Security Division/CN=Teekopolis Certificate Authority/emailAddress=me@mail.com'     Feb 19 13:46:05 mightymoose wpa_supplicant[1823]: CTRL-EVENT-EAP-PEER-CERT depth=0 subject='/C=US/ST=California/L=Teekopolis/O=City of Teekopolis/OU=Internet Security Division/CN=Teekopolis WiFi/emailAddress=me@mail.com'     Feb 19 13:46:07 mightymoose kernel: [ 7695.679441] net_ratelimit: 34 callbacks suppressed     Feb 19 13:46:07 mightymoose kernel: [ 7695.679446] ERROR @wl_cfg80211_get_station : Could not get rate (-1)     Feb 19 13:46:07 mightymoose kernel: [ 7695.679450] ERROR @wl_cfg80211_get_station : Could not get rssi (-1)     Feb 19 13:46:07 mightymoose kernel: [ 7695.679481] ERROR @wl_cfg80211_get_station : Could not get rate (-1)     Feb 19 13:46:07 mightymoose kernel: [ 7695.679484] ERROR @wl_cfg80211_get_station : Could not get rssi (-1)     Feb 19 13:46:07 mightymoose kernel: [ 7696.178268] ERROR @wl_cfg80211_get_station : Could not get rate (-1)     Feb 19 13:46:07 mightymoose kernel: [ 7696.178274] ERROR @wl_cfg80211_get_station : Could not get rssi (-1)     Feb 19 13:46:07 mightymoose kernel: [ 7696.178318] ERROR @wl_cfg80211_get_station : Could not get rate (-1)     Feb 19 13:46:07 mightymoose kernel: [ 7696.178321] ERROR @wl_cfg80211_get_station : Could not get rssi (-1)     Feb 19 13:46:08 mightymoose kernel: [ 7696.677439] ERROR @wl_cfg80211_get_station : Could not get rate (-1)     Feb 19 13:46:08 mightymoose kernel: [ 7696.677446] ERROR @wl_cfg80211_get_station : Could not get rssi (-1)     Feb 19 13:46:12 mightymoose kernel: [ 7701.168812] net_ratelimit: 34 callbacks suppressed     Feb 19 13:46:12 mightymoose kernel: [ 7701.168817] ERROR @wl_cfg80211_get_station : Could not get rate (-1)     Feb 19 13:46:12 mightymoose kernel: [ 7701.168821] ERROR @wl_cfg80211_get_station : Could not get rssi (-1)     Feb 19 13:46:12 mightymoose kernel: [ 7701.168867] ERROR @wl_cfg80211_get_station : Could not get rate (-1)     Feb 19 13:46:12 mightymoose kernel: [ 7701.168870] ERROR @wl_cfg80211_get_station : Could not get rssi (-1)     Feb 19 13:46:13 mightymoose kernel: [ 7701.667772] ERROR @wl_cfg80211_get_station : Could not get rate (-1)     Feb 19 13:46:13 mightymoose kernel: [ 7701.667778] ERROR @wl_cfg80211_get_station : Could not get rssi (-1)     Feb 19 13:46:13 mightymoose kernel: [ 7701.667808] ERROR @wl_cfg80211_get_station : Could not get rate (-1)     Feb 19 13:46:13 mightymoose kernel: [ 7701.667811] ERROR @wl_cfg80211_get_station : Could not get rssi (-1)     Feb 19 13:46:13 mightymoose kernel: [ 7702.166645] ERROR @wl_cfg80211_get_station : Could not get rate (-1)     Feb 19 13:46:13 mightymoose kernel: [ 7702.166652] ERROR @wl_cfg80211_get_station : Could not get rssi (-1)     Feb 19 13:46:18 mightymoose kernel: [ 7706.657907] net_ratelimit: 34 callbacks suppressed     Feb 19 13:46:18 mightymoose kernel: [ 7706.657912] ERROR @wl_cfg80211_get_station : Could not get rate (-1)     Feb 19 13:46:18 mightymoose kernel: [ 7706.657916] ERROR @wl_cfg80211_get_station : Could not get rssi (-1)     Feb 19 13:46:18 mightymoose kernel: [ 7706.657947] ERROR @wl_cfg80211_get_station : Could not get rate (-1)     Feb 19 13:46:18 mightymoose kernel: [ 7706.657950] ERROR @wl_cfg80211_get_station : Could not get rssi (-1)     Feb 19 13:46:18 mightymoose kernel: [ 7707.156579] ERROR @wl_cfg80211_get_station : Could not get rate (-1)     Feb 19 13:46:18 mightymoose kernel: [ 7707.156585] ERROR @wl_cfg80211_get_station : Could not get rssi (-1)     Feb 19 13:46:18 mightymoose kernel: [ 7707.156700] ERROR @wl_cfg80211_get_station : Could not get rate (-1)     Feb 19 13:46:18 mightymoose kernel: [ 7707.156705] ERROR @wl_cfg80211_get_station : Could not get rssi (-1)     Feb 19 13:46:19 mightymoose kernel: [ 7707.655948] ERROR @wl_cfg80211_get_station : Could not get rate (-1)     Feb 19 13:46:19 mightymoose kernel: [ 7707.655954] ERROR @wl_cfg80211_get_station : Could not get rssi (-1)     Feb 19 13:46:23 mightymoose kernel: [ 7712.147167] net_ratelimit: 34 callbacks suppressed     Feb 19 13:46:23 mightymoose kernel: [ 7712.147173] ERROR @wl_cfg80211_get_station : Could not get rate (-1)     Feb 19 13:46:23 mightymoose kernel: [ 7712.147179] ERROR @wl_cfg80211_get_station : Could not get rssi (-1)     Feb 19 13:46:23 mightymoose kernel: [ 7712.147234] ERROR @wl_cfg80211_get_station : Could not get rate (-1)     Feb 19 13:46:23 mightymoose kernel: [ 7712.147239] ERROR @wl_cfg80211_get_station : Could not get rssi (-1)     Feb 19 13:46:24 mightymoose kernel: [ 7712.646038] ERROR @wl_cfg80211_get_station : Could not get rate (-1)     Feb 19 13:46:24 mightymoose kernel: [ 7712.646044] ERROR @wl_cfg80211_get_station : Could not get rssi (-1)     Feb 19 13:46:24 mightymoose kernel: [ 7712.646076] ERROR @wl_cfg80211_get_station : Could not get rate (-1)     Feb 19 13:46:24 mightymoose kernel: [ 7712.646079] ERROR @wl_cfg80211_get_station : Could not get rssi (-1)     Feb 19 13:46:24 mightymoose kernel: [ 7713.145072] ERROR @wl_cfg80211_get_station : Could not get rate (-1)     Feb 19 13:46:24 mightymoose kernel: [ 7713.145079] ERROR @wl_cfg80211_get_station : Could not get rssi (-1)     Feb 19 13:46:29 mightymoose kernel: [ 7717.636378] net_ratelimit: 34 callbacks suppressed     Feb 19 13:46:29 mightymoose kernel: [ 7717.636383] ERROR @wl_cfg80211_get_station : Could not get rate (-1)     Feb 19 13:46:29 mightymoose kernel: [ 7717.636387] ERROR @wl_cfg80211_get_station : Could not get rssi (-1)     Feb 19 13:46:29 mightymoose kernel: [ 7717.636432] ERROR @wl_cfg80211_get_station : Could not get rate (-1)     Feb 19 13:46:29 mightymoose kernel: [ 7717.636435] ERROR @wl_cfg80211_get_station : Could not get rssi (-1)     Feb 19 13:46:29 mightymoose kernel: [ 7718.135475] ERROR @wl_cfg80211_get_station : Could not get rate (-1)     Feb 19 13:46:29 mightymoose kernel: [ 7718.135484] ERROR @wl_cfg80211_get_station : Could not get rssi (-1)     Feb 19 13:46:29 mightymoose kernel: [ 7718.135530] ERROR @wl_cfg80211_get_station : Could not get rate (-1)     Feb 19 13:46:29 mightymoose kernel: [ 7718.135533] ERROR @wl_cfg80211_get_station : Could not get rssi (-1)     Feb 19 13:46:30 mightymoose kernel: [ 7718.633836] ERROR @wl_cfg80211_get_station : Could not get rate (-1)     Feb 19 13:46:30 mightymoose kernel: [ 7718.633842] ERROR @wl_cfg80211_get_station : Could not get rssi (-1)     Feb 19 13:46:34 mightymoose kernel: [ 7723.125379] net_ratelimit: 34 callbacks suppressed     Feb 19 13:46:34 mightymoose kernel: [ 7723.125384] ERROR @wl_cfg80211_get_station : Could not get rate (-1)     Feb 19 13:46:34 mightymoose kernel: [ 7723.125389] ERROR @wl_cfg80211_get_station : Could not get rssi (-1)     Feb 19 13:46:34 mightymoose kernel: [ 7723.125481] ERROR @wl_cfg80211_get_station : Could not get rate (-1)     Feb 19 13:46:34 mightymoose kernel: [ 7723.125487] ERROR @wl_cfg80211_get_station : Could not get rssi (-1)     Feb 19 13:46:35 mightymoose kernel: [ 7723.624485] ERROR @wl_cfg80211_get_station : Could not get rate (-1)     Feb 19 13:46:35 mightymoose kernel: [ 7723.624491] ERROR @wl_cfg80211_get_station : Could not get rssi (-1)     Feb 19 13:46:35 mightymoose kernel: [ 7723.624527] ERROR @wl_cfg80211_get_station : Could not get rate (-1)     Feb 19 13:46:35 mightymoose kernel: [ 7723.624530] ERROR @wl_cfg80211_get_station : Could not get rssi (-1)     Feb 19 13:46:35 mightymoose kernel: [ 7724.123601] ERROR @wl_cfg80211_get_station : Could not get rate (-1)     Feb 19 13:46:35 mightymoose kernel: [ 7724.123607] ERROR @wl_cfg80211_get_station : Could not get rssi (-1)     Feb 19 13:46:40 mightymoose kernel: [ 7728.614731] net_ratelimit: 34 callbacks suppressed     Feb 19 13:46:40 mightymoose kernel: [ 7728.614736] ERROR @wl_cfg80211_get_station : Could not get rate (-1)     Feb 19 13:46:40 mightymoose kernel: [ 7728.614740] ERROR @wl_cfg80211_get_station : Could not get rssi (-1)     Feb 19 13:46:40 mightymoose kernel: [ 7728.614776] ERROR @wl_cfg80211_get_station : Could not get rate (-1)     Feb 19 13:46:40 mightymoose kernel: [ 7728.614779] ERROR @wl_cfg80211_get_station : Could not get rssi (-1)     Feb 19 13:46:40 mightymoose kernel: [ 7729.113430] ERROR @wl_cfg80211_get_station : Could not get rate (-1)     Feb 19 13:46:40 mightymoose kernel: [ 7729.113436] ERROR @wl_cfg80211_get_station : Could not get rssi (-1)     Feb 19 13:46:40 mightymoose kernel: [ 7729.113584] ERROR @wl_cfg80211_get_station : Could not get rate (-1)     Feb 19 13:46:40 mightymoose kernel: [ 7729.113590] ERROR @wl_cfg80211_get_station : Could not get rssi (-1)     Feb 19 13:46:41 mightymoose kernel: [ 7729.612654] ERROR @wl_cfg80211_get_station : Could not get rate (-1)     Feb 19 13:46:41 mightymoose kernel: [ 7729.612660] ERROR @wl_cfg80211_get_station : Could not get rssi (-1)     Feb 19 13:46:45 mightymoose kernel: [ 7734.103894] net_ratelimit: 34 callbacks suppressed     Feb 19 13:46:45 mightymoose kernel: [ 7734.103898] ERROR @wl_cfg80211_get_station : Could not get rate (-1)     Feb 19 13:46:45 mightymoose kernel: [ 7734.103904] ERROR @wl_cfg80211_get_station : Could not get rssi (-1)     Feb 19 13:46:45 mightymoose kernel: [ 7734.103938] ERROR @wl_cfg80211_get_station : Could not get rate (-1)     Feb 19 13:46:45 mightymoose kernel: [ 7734.103941] ERROR @wl_cfg80211_get_station : Could not get rssi (-1)     Feb 19 13:46:46 mightymoose kernel: [ 7734.602939] ERROR @wl_cfg80211_get_station : Could not get rate (-1)     Feb 19 13:46:46 mightymoose kernel: [ 7734.602945] ERROR @wl_cfg80211_get_station : Could not get rssi (-1)     Feb 19 13:46:46 mightymoose kernel: [ 7734.602985] ERROR @wl_cfg80211_get_station : Could not get rate (-1)     Feb 19 13:46:46 mightymoose kernel: [ 7734.602988] ERROR @wl_cfg80211_get_station : Could not get rssi (-1)     Feb 19 13:46:46 mightymoose kernel: [ 7735.101881] ERROR @wl_cfg80211_get_station : Could not get rate (-1)     Feb 19 13:46:46 mightymoose kernel: [ 7735.101887] ERROR @wl_cfg80211_get_station : Could not get rssi (-1)     Feb 19 13:46:51 mightymoose kernel: [ 7739.593081] net_ratelimit: 34 callbacks suppressed     Feb 19 13:46:51 mightymoose kernel: [ 7739.593086] ERROR @wl_cfg80211_get_station : Could not get rate (-1)     Feb 19 13:46:51 mightymoose kernel: [ 7739.593090] ERROR @wl_cfg80211_get_station : Could not get rssi (-1)     Feb 19 13:46:51 mightymoose kernel: [ 7739.593123] ERROR @wl_cfg80211_get_station : Could not get rate (-1)     Feb 19 13:46:51 mightymoose kernel: [ 7739.593125] ERROR @wl_cfg80211_get_station : Could not get rssi (-1)     Feb 19 13:46:51 mightymoose kernel: [ 7740.092017] ERROR @wl_cfg80211_get_station : Could not get rate (-1)     Feb 19 13:46:51 mightymoose kernel: [ 7740.092023] ERROR @wl_cfg80211_get_station : Could not get rssi (-1)     Feb 19 13:46:51 mightymoose kernel: [ 7740.092059] ERROR @wl_cfg80211_get_station : Could not get rate (-1)     Feb 19 13:46:51 mightymoose kernel: [ 7740.092062] ERROR @wl_cfg80211_get_station : Could not get rssi (-1)     Feb 19 13:46:52 mightymoose kernel: [ 7740.591164] ERROR @wl_cfg80211_get_station : Could not get rate (-1)     Feb 19 13:46:52 mightymoose kernel: [ 7740.591171] ERROR @wl_cfg80211_get_station : Could not get rssi (-1)      also on PasteBin This is, needless to say, extremely annoying and the only workaround I've found in the past is to restart my computer. I've sometimes had success with disabling wireless in the Network Manager and then re-enabling it, but this doesn't always work. I've also tried reloading `wl` with `modprobe`, but that also doesn't usually work. My router is running OpenWRT and I configured the EAP network myself. One thing to note is that my other machines don't have this problem at all with the network. My Android devices and my laptop (running the same distribution as this desktop machine) don't have this problem. Any ideas on where to start to debug this issue? ### EDIT: Adding Output from `lshw -c network`                 *-network            description: Wireless interface            product: BCM43228 802.11a/b/g/n            vendor: Broadcom Corporation            physical id: 0            bus info: pci@0000:0c:00.0            logical name: eth2            version: 00            serial: dc:85:de:7c:c6:02            width: 64 bits            clock: 33MHz            capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless            configuration: broadcast=yes driver=wl0 driverversion=6.20.155.1 (r326264) ip=192.168.100.110 latency=0 multicast=yes wireless=IEEE 802.11abg            resources: irq:18 memory:f6800000-f6803fff      Here is requested output from `wpa_supplicant` on PasteBin. Not sure, but there seems to be an OpenSSL issue.


title: How to check if my battery is healthy?

text: My `Lenovo ThinkPad T61` is rather old, and a couple of years ago I had to replace the battery as the old one was dead. Now the replacement battery seems like dying a slow death, but I get conflicting data from `xfce4-power- manager`. So I'm wondering if there is a way to check whether the battery is healthy. The symptoms are as follows:   * The power manager indicates that the `battery is fully charged`   * If I disconnect the AC charger, then the battery status jumps to `47%` or similar in less than 5min   * And in less than 15min the laptop runs out of juice and shuts down I tried to check `upower` data:               root@malou-laptop:/home/liv# upower --enumerate     /org/freedesktop/UPower/devices/line_power_AC     /org/freedesktop/UPower/devices/battery_BAT0     root@malou-laptop:/home/liv# upower -i /org/freedesktop/UPower/devices/battery_BAT0       native-path:          /sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:00/PNP0C09:00/PNP0C0A:00/power_supply/BAT0       vendor:               SANYO       model:                92P1137       serial:               885       power supply:         yes       updated:              Wed 19 Feb 2014 09:35:37 PM CET (23 seconds ago)       has history:          yes       has statistics:       yes       battery         present:             yes         rechargeable:        yes         state:               fully-charged         energy:              70.38 Wh         energy-empty:        0 Wh         energy-full:         72.42 Wh         energy-full-design:  71.28 Wh         energy-rate:         26.561 W         voltage:             12.4 V         percentage:          97.1831%         capacity:            100%         technology:          lithium-ion      I also looked at `ACPI` data:               root@malou-laptop:/home/liv# cat /proc/acpi/battery/BAT0/info      present:                 yes     design capacity:         71280 mWh     last full capacity:      72420 mWh     battery technology:      rechargeable     design voltage:          10800 mV     design capacity warning: 3621 mWh     design capacity low:     200 mWh     cycle count:          0     capacity granularity 1:  1 mWh     capacity granularity 2:  1 mWh     model number:            92P1137     serial number:             885     battery type:            LION     OEM info:                SANYO     root@malou-laptop:/home/liv# cat /proc/acpi/battery/BAT0/state      present:                 yes     capacity state:          ok     charging state:          charged     present rate:            0 mW     remaining capacity:      70380 mWh     present voltage:         12400 mV      But I cannot pinpoint anything suspicious: the `design capacity` and `last full capacity` seem healthy to me. So is there some other utility that could indicate whether the battery is working as expected, or needs replaced?


title: Move line from output to the front of output or custom reordering

text: I have a command `find "$PWD" -name __openerp__.py|awk -F/ -vOFS=/ 'NF-=2'|sort -u` and I want to take a certain line containing `/web/addons` and push it to the front of output then do the same with `/openerp/addons` making so that line with `/openerp/addons` would be first and line with `/web/addons` would be second. I figured to use grep with that input and from the same output - grep with wildcard and exclude, but yet to figure out how to pass pipe output to multiple greps. Also there is probably multiple ways of doing this. So right now I get:               <my path>/addons     <my path>/development     <my path>/external     <my path>/server/openerp/addons     <my path>/web/addons      And I want it to become:               <my path>/server/openerp/addons     <my path>/web/addons     <my path>/addons     <my path>/development     <my path>/external      P.S. Reversal of sort will not solve this


title: redirecting to /dev/null

text: I'm reading an example bash shell script:               #!/bin/bash          # This script makes a backup of my home directory.          cd /home          # This creates the archive     tar cf /var/tmp/home_franky.tar franky > /dev/null 2>&1          # First remove the old bzip2 file.  Redirect errors because this generates some if the archive     # does not exist.  Then create a new compressed file.     rm /var/tmp/home_franky.tar.bz2 2> /dev/null     bzip2 /var/tmp/home_franky.tar          # Copy the file to another host - we have ssh keys for making this work without intervention.     scp /var/tmp/home_franky.tar.bz2 bordeaux:/opt/backup/franky > /dev/null 2>&1          # Create a timestamp in a logfile.     date >> /home/franky/log/home_backup.log     echo backup succeeded >> /home/franky/log/home_backup.log      I'm trying to understand the use of "/dev/null 2>&1" here. At first, I thought this script uses /dev/null in order to gracefully ignore errors, without causing the script to crash (kind of like try catch exception handling in programming languages). Because I don't see how using tar to compress a directory into a tar file could possibly cause any type of errors.


title: What does 0.0.0.0:* mean in netstat?

text: Could anyone explain the following output of `netstat -plunt`?               udp        0      0 0.0.0.0:58262           **0.0.0.0:***  1163/avahi-daemon:         udp        0      0 0.0.0.0:17500           **0.0.0.0:***  3779/dropbox:u         udp        0      0 0.0.0.0:5353            **0.0.0.0:***  1163/avahi-daemon:      What does 0.0.0.0:* mean? Are all the ports being listened or something else?


title: Backtrack R3 can't find wlan

text: I have installed Backtrack R3 in virtualbox, but i cant find any wireless connections. Cant find anything in wicd either. What i want to do is to run `airmon-ng start wlan0` in terminal, and after that `wash -i mon0` But i find nothing then i run `airmon-ng start wlan0` and the command `wash -i mon0` doesn't work at all. `airmon-ng start wlan0` giving this output: ![airmon-ng start wlan0](http://billedeupload.dk/images/axVXC.png)! `wash -i mon0` giving this output: ![wash -i mon0](http://billedeupload.dk/images/3XGZB.png)! Have no idead about what i need to do


title: How can I close a terminal without killing its children (without running `screen` first)?

text: sometimes I run an app in the gnome-terminal, but then I suddenly have to restart gnome or something. I guess the answer to the question is also useful then I want to disconnect from SSH where something is happenning. Gnome's terminal tree looks like this:               gnome-terminal         bash             some-boring-process      Can I 'detach' `bash` from `gnome-terminal` (or detach `some-boring-process` from bash and redirect its output somewhere)? If I just kill `gnome-terminal`, `bash` will be killed to will all its subprocesses


title: Set makeprg to gradlew

text: First a bit of context for those who don't know gradle. It's basically like `make` except that you don't have to have `gradle` installed on your computer. It ships with projects as a file called `gradlew`. So for instance a gradle project could look like:               .     ├── gradlew     └── src         └── main             └── java                 └── com                     └── foo                         └── bar                             ├── Bar.java                             ├── Baz.java                             ├── Foo.java                             └── Qux.java      And from the root directory I can run commands like `./gradlew build` or `./gradlew test` to build/test my code. Now vim. First I `:set autochdir` in my `.vimrc`. Second, my current buffer is `Foo.java`. I want to run `:make` which would trigger `../../../../../../gradlew`. How can I set `makeprg` such that no matter what's my `:pwd` it'll call `gradlew` (I guess that could be achieved using `dirname` in a loop but I'm not sure if that's the most efficient/cleanest way to do that). Thanks.


title: Did this tutorial block pings to my server?

text: I am a programmer teaching myself linux admin stuff. I followed this tutorial to setup a firewall on a VPS. As a part of that tutorial, I block all traffic except for web traffic and SSH traffic. I checked to see if my server was vulnerable to ping floods and it seems that I can't ping my server ("request timeout for icmp"). A few quick googles show that Ping uses ICMP which does not use ports. ICMP traffic is still regulated by the firewall, right? Just double checking to make sure I am correctly understanding what is happening. ICMP traffic is still traffic -- it just does not use ports. Hence it is governed by the rules in the iptables commands. Here is what my iptables look like:               $sudo iptables -L -nv     Chain INPUT (policy ACCEPT 0 packets, 0 bytes)      pkts bytes target     prot opt in     out     source               destination                  0     0 ACCEPT     all  --  lo     *       0.0.0.0/0            0.0.0.0/0                    2   100 fail2ban-ssh  tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            multiport dports 22      145K 9706K ACCEPT     all  --  *      *       0.0.0.0/0            0.0.0.0/0            ctstate RELATED,ESTABLISHED        10   616 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            tcp dpt:3457      3463  222K ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            tcp dpt:80       192 14090 DROP       all  --  *      *       0.0.0.0/0            0.0.0.0/0                     Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)      pkts bytes target     prot opt in     out     source               destination                   Chain OUTPUT (policy ACCEPT 81298 packets, 505M bytes)      pkts bytes target     prot opt in     out     source               destination                   Chain fail2ban-ssh (1 references)      pkts bytes target     prot opt in     out     source               destination                  2   100 RETURN     all  --  *      *       0.0.0.0/0            0.0.0.0/0                $


title: IPTables allow NTP Time Server

text: I am new to IPTables. I have an existing config that seems to work well. I am not sure I know how to add NTP to the rule `Chain RH-Firewall-1-INPUT` correctly. My goal is to add an additional rule to allow NTP to enter the server so it can act as a NTP server for my network. Would I simply need `iptables -I RH-Firewall-1-INPUT -p udp --dport 123 -j ACCEPT` and then of course if it works `iptables save` I'm not confident whether I should be using -I Insert or -A Append, or if it is much more difficult. Below is my existing config shown with `iptables -L`               Chain INPUT (policy ACCEPT)     target     prot opt source               destination     RH-Firewall-1-INPUT  all  --  anywhere             anywhere          Chain FORWARD (policy ACCEPT)     target     prot opt source               destination     RH-Firewall-1-INPUT  all  --  anywhere             anywhere          Chain OUTPUT (policy ACCEPT)     target     prot opt source               destination          Chain RH-Firewall-1-INPUT (2 references)     target     prot opt source               destination     ACCEPT     all  --  anywhere             anywhere     ACCEPT     icmp --  anywhere             anywhere            icmp any     ACCEPT     esp  --  anywhere             anywhere     ACCEPT     ah   --  anywhere             anywhere     ACCEPT     udp  --  anywhere             224.0.0.251         udp dpt:mdns     ACCEPT     udp  --  anywhere             anywhere            udp dpt:ipp     ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:ipp     ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED     ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:ssh     ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:https     ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:http     ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:squid     REJECT     all  --  anywhere             anywhere            reject-with icmp-host-prohibited


title: Deliver emails outside network, from a server behind router DNS and port forwarding

text: I've been trying to configure webserver to deliver emails outside the local network. Server is connected directly to the router and relay on its DNS service, and one of that online service for resolve the dynamic-ip of the router (like no-ip, or dyndns). That way it can be reachable from the outside pointing always to the same ip. I can't succeed to deliver emails using Postfix or Exim (tried both) outside of local network. I already have excluded that the problem could be related to firewall rules. And I'm starting to believe it is just related to the DNS+no- ip and the dynamic ip address of the server. I don't have any difficulty on configure mail to send outside on 'normal' Virtual Machines. I Did it for testing the configuration before doing it on production server. And i could easily make it work. But on that server really seems it won't work at all. Can anybody confirm that the problem is related to the network config of the server:                -Dynamic ip (dhcp)      -DNS service on router      -no-ip (for resolve the ip from the outside)


title: How can I boot with a compressed rootfs?

text: **My problem is:** I cannot use compressed rootfs (the kernel crashes during boot) but uncompressed ones work fine. **What I did:** I'm using Buildroot 2013.11 to generate Images for my embedded Linux (2.6.39) ARM 9 system, booting from SD card. I'm "dd"ing the Images (e.g. ext4) to the 2nd partition of the SD card with               sudo dd if=/path-to/rootfs.ext4 of=/dev/sdb2 bs=2048      and enable the driver in linux-menuconfig, that is               File systems     - <*> The Extended 4 (ext4) filesystem     - [*] Use ext4 for ext2/ext3 file systems     - [*] Ext4 extended attributes      Now when I like to use the compressed ext4 (e.g. with lzo), buildroot generates an `rootfs.ext4.lzo` when "dd"ing here with               sudo dd if=/path-to/rootfs.ext4.lzo of=/dev/sdb2 bs=2048      the command is executed without any error but from this point "sdb2" isn't accessible anymore until it is formated again. When using this SD to boot the system the kernel crashes telling me it was trying to interpret the partition with ext4 but he wasn't able to read it. Where am I going wrong?


title: Chromebook Crouton Debian xfce4 - Cannot change locale!

text: On the system described in the title, I am trying to change my locale to a UTF-8 one, in order to run the program Anki. However it won't let me, the commands `locale-reconfigure locale-gen` and any `locale-xxx/xxx-locale` command doesn't exist. There was no `locale.gen` so I created one, it looks like this:               en_GB.UTF-8 UTF-8     LC_ALL="en_GB.UTF-8"      When I type in locale it says everything is `POSIX` except `LANG`, `LANGUAGE` and `LC_ALL` which are all left blank. `locale -a` returns:               C     C.UTF-8     POSIX      I've followed the guide on debian wiki and many other guides, all of which involve the use of `locale-gen` or a similar command which I don't have. I've also tried restarting with the new `locale.gen`, but that also didn't work.


title: Linux dmesg errors, motherboard issue?

text: When doing heavy disk IO on my system (16GB RAM, 6 cores, RAID0 PCIe SSD), the system stalls and eventually crashes. Normal day-to-day disk IO is fine, just prolonged read/write such as a database re-index are problematic. Some investigation has revealed dmesg output such as:               [...] ata2: exception Emask 0x10 SAct 0x0 SErr 0x90202 action 0xe frozen     [...] ata1: SError: { RecovComm Persist PHYRdyChg 10B8B }     [...] ata1: hard resetting link     [...] ata4: irq_stat 0x00400000, PHY RDY changed      And tons of other logs for various sata devices attached to the system. When doing heavy disk IO, any other input stalls the system (moving the mouse etc) for a 5-30 seconds. Given the errors are on multiple devices and the system seems sketchy when giving inputs from other devices/causing non-disk interrupts ... im going to assume motherboard. Temps are fine, memcheck passes. The crash is a total soft lockup rather than a kernel crash or switch-off. Does this seem reasonable to you gurus? Anything else I can do to check? Edit: Fedora20, home server on 870A-UD3 board, Intel 910 pcie SSD + OCZ vertex + Intel X25 Edit2: Workstation is in a home office doing officy stuff like churning data in Postgresql. All very boring nothing to warrant another close vote.


title: Cannot connect to Solaris Server when Oracle GoldenGate process uses the port

text: I'm trying to test the Oracle goldengate to replicate data between two databases on **the same server**. So I installed **two** databases and **two** goldengate homes in the same machine. The goldengate processes are started from each home and they are responsible for the replication :   * Process from home 1 configured on port 7809 &   * process for home 2 configured on port 7810. For a successful replication, processes started from goldengate home 1 should communicate with processes started from goldengate home 2. But for some reasons, this is not happening. The goldengate log file has the following error : > OGG-01223 Oracle GoldenGate Capture for Oracle, exthrr.prm: TCP/IP error 131 > (Connection reset by peer). * * * "Googling" for this error, it said that _the connection occurred but the host terminated it._ Tried to telnet the machine with the used port and it gave the following error:               bash-3.00$ telnet 10.10.3.124 7810     Trying 10.10.3.124...     Connected to 10.10.3.124.     Escape character is '^]'.     Connection to 10.10.3.124 closed by foreign host.      Here the communication occurs but for only around 3 seconds then it is closed by the host, which is the same explanation of the above error in the goldengate log file.   * I tried to change the port but still the same error.   * The problem is happening only when the goldengate process is using the port. When other process is using the same port, I can telnet successfully.


title: How I can enable Linux full tickless mode using CONFIG_NO_HZ_FULL?

text: Where do I enable the CONFIG_NO_HZ_FULL kernel configuration? Is it something I can set in conf files or is it something that has to be enabled when I build the kernel? I am using CentOS with an upgraded kernel 3.10.


title: determine what service is running a script

text: I share a dev server with some colleagues, it's a Ubuntu server and we have several scripts there, so basically the usual way we run a process is using a `screen` session. My problem is that when I do `ps aux| grep python` I see a running process:               root     x  x  x x x x  Ss   Apr12  29:58 /usr/bin/python /home/script.py      this script is not being run on a screen session and it automatically starts when killed so I need to know what service is starting/restarting that process. Any help is appreciated.


title: Is there a shortcut for repeat the second proximate command in bash?

text: We all know that `!!` can repeat the last command you do in bash. But sometimes we need to do some operation like               $ python test.py     $ vim test.py          $ python test.py # here is where I need to repeat the second proximate bash command      I can use up-arrow key to do that, but that requires me to move my right hand away to an uncomfortable position. So I'm wondering if there is a command which like `!!` can help me to realize my purpose?


title: Replace a backslash with sed

text: I've been trying to create a script that would replace every occurence of `C:\` in two different types of file by `/root`. My arborescence looks like :               - Batch       - Place of the script     - Conf       - Appli1         - File1.xml         - File2.xml         - ...       - Appli2         - File1.xml         - File2.xml         - ...       - ...     - Info       - File1.conf       - File2.conf       - ...      My script is like so in `/Batch` :               #/bin/bash     find ../ -name "*.xml" -o name "*.conf" -print | xargs sed -i 's C:\ /root/ g'      But, I have an error on the `sed part`, which says that at `character 14: command 's' unfinished` Why is that so?


title: Need to install MySQL Client libaries but RPM not installing them

text: I'm trying install the MySQL Client libraries for the Perl Mod of the same name but when I run               sudo rpm --install -v --allfiles MySQL-client-5.5.16-1.linux2.6.i386.rpm      and querying the rpm database shows the package installed, but the lib files aren't there.                rpm -qa | grep -i mysql      MySQL-client-5.5.16-1.linux2.6      ll /usr/lib/mysql      total 4.0K      4.0K drwxr-xr-x 3 root root 4.0K Oct 11 09:49 plugin/      I'm not finding the files in /usr/lib               ls -ld /usr/lib/*mysql*     drwxr-xr-x 3 root root 4.0K Oct 11 09:49 /usr/lib/mysql     perlstation:~\ ->      Here's the results of rpm -qil MySQL-client                   rpm -qil MySQL-client     Name        : MySQL-client                 Relocations: (not relocatable)     Version     : 5.5.16                            Vendor: Oracle and/or its affiliates     Release     : 1.linux2.6                    Build Date: Fri 09 Sep 2011 11:27:55 AM CDT     Install Date: Tue 11 Oct 2011 02:38:14 PM CDT      Build Host: loki32     Group       : Applications/Databases        Source RPM: MySQL-5.5.16-1.linux2.6.src.rpm     Size        : 53026574                         License: Copyright (c) 2000, 2011,    Oracle and/or its affiliates. All rights reserved. Under GPL license as shown in the Description field.     Signature   : DSA/SHA1, Wed 14 Sep 2011 03:13:49 AM CDT, Key ID 8c718d3b5072e1f5     Packager    : MySQL Build Team <build@mysql.com>     URL         : http://www.mysql.com/     Summary     : MySQL - Client     Description :     This package contains the standard MySQL clients and administration tools.          For a description of MySQL see the base MySQL RPM or http://www.mysql.com/     /usr/bin/msql2mysql     /usr/bin/mysql     /usr/bin/mysql_find_rows     /usr/bin/mysql_waitpid     /usr/bin/mysqlaccess     /usr/bin/mysqlaccess.conf     /usr/bin/mysqladmin     /usr/bin/mysqlbinlog     /usr/bin/mysqlcheck     /usr/bin/mysqldump     /usr/bin/mysqlimport     /usr/bin/mysqlshow     /usr/bin/mysqlslap     /usr/share/man/man1/msql2mysql.1.gz     /usr/share/man/man1/mysql.1.gz     /usr/share/man/man1/mysql_find_rows.1.gz     /usr/share/man/man1/mysql_waitpid.1.gz     /usr/share/man/man1/mysqlaccess.1.gz     /usr/share/man/man1/mysqladmin.1.gz     /usr/share/man/man1/mysqlbinlog.1.gz     /usr/share/man/man1/mysqlcheck.1.gz     /usr/share/man/man1/mysqldump.1.gz     /usr/share/man/man1/mysqlimport.1.gz     /usr/share/man/man1/mysqlshow.1.gz     /usr/share/man/man1/mysqlslap.1.gz     perlstation:~\ ->      I'm at a loss here.


title: How to fix character encoding in bash (arch linux)

text: I have some issues with the encoding of german umlauts in bash. It mostly is working fine, but when i am typing a invalid command, the error message generated by bash contains strange escape sequences and not the actual characters. Here is a log, which shows the problem:               [root@myhost ~]# mkdir ä     [root@myhost ~]# ä     -bash: $'\303\244': Kommando nicht gefunden.     [root@myhost ~]# ü     -bash: $'\303\274': Kommando nicht gefunden.     [root@myhost ~]# ls     ä  äöü  Projects  tbb     [root@myhost ~]# cat äöü     äüö     [root@myhost ~]# rm ä     rm: Entfernen von „ä“ nicht möglich: Ist ein Verzeichnis     [root@myhost ~]# rmdir ä     [root@myhost ~]# rm äöü      the configuration of my `/etc/rc.conf`:               LOCALE="de_DE.UTF-8"     DAEMON_LOCALE="no"     HARDWARECLOCK="localtime"     TIMEZONE="Europe/Berlin"     KEYMAP="de-latin1"     CONSOLEFONT=     CONSOLEMAP=     USECOLOR="yes"      `/etc/locale.gen` only contains the de_DE locales:               de_DE.UTF-8 UTF-8     de_DE ISO-8859-1     de_DE@euro ISO-8859-15      `locale` output:               LANG=de_DE.UTF-8     LC_CTYPE="de_DE.UTF-8"     LC_NUMERIC="de_DE.UTF-8"     LC_TIME="de_DE.UTF-8"     LC_COLLATE="de_DE.UTF-8"     LC_MONETARY="de_DE.UTF-8"     LC_MESSAGES="de_DE.UTF-8"     LC_PAPER="de_DE.UTF-8"     LC_NAME="de_DE.UTF-8"     LC_ADDRESS="de_DE.UTF-8"     LC_TELEPHONE="de_DE.UTF-8"     LC_MEASUREMENT="de_DE.UTF-8"     LC_IDENTIFICATION="de_DE.UTF-8"     LC_ALL=


title: Check version of RPM package available in upstream repo if I have a custom one installed

text: I have a RHEL6.1 machine that's registered with Redhat. I needed to install a customized version of a package (in my case, qemu-kvm), which I installed via RPM. I can see the version info for my customized package by doing: "rpm -qi" or "yum info". How can I see the version information for the (non-customized) version of the RPM that exists in the Redhat repository?


title: "tree" command output with "pure" (7-bit) ASCII output

text: The "tree" command uses nice box-drawing characters to show the tree but I want to use the output in a "code-page-neutral" context (I know that really there's always a code page, but by restricting it to the lower characters I hope to be free of worries that someone in Ulan Bator sees smiley faces, etc). For example instead of:               ├── include     │   ├── foo     │   └── bar      I'd like something like:               +-- include     |   +-- foo     |   \-- bar      but none of the "tree" switch combinations I tried gave this (seems more as if they take the box-drawing chars as the baseline and make it yet prettier) I also looked for box-drawing filters to perform such conversions without finding anything beyond an infinite amount of ASCII art :-). A generic filter smells like something to be cooked-up in 15 mins - plus two more incremental days stumbling into all the amusing corner cases :-)


title: Permissions for non-htdocs directory

text: I have created a folder outside of my htdocs directory as a means of adding extra security for downloadable digital goods to be sold from within a Magento storefront; so my question is: what permissions should I set for this non- htdocs directory ("digitalgoods")? **Ownership:**               [parent]/htdocs apache:apache     [parent]/digitalgoods apache:apache      I currently have the "digitalgoods" folder set to 770. Does the PUBLIC need read or execute permissions to this folder if the web application will be pulling and serving these files via unique links??


title: Getting size with du of files only

text: How can I get the size of all files and all files in its subdirectories using the du command. I am trying the following command to get the size of all files (and files in subdirectories) `find . -type f | du -a` But this prints out the folder sizes as well. How can I get a listing of sizes of all files and files in subdirectories? I also tried the `exec flag` but I am not sure how to pipe the output into another command after it executes the results of `find` into `du`. Sorry should have mentioned this before, the operating system is AIX 6.1 with ksh shell. Thank you.


title: How can I display the time when a command was executed in my bash prompt?

text: Currently my bash prompt looks like this               $ echo $PS1     # \[\e[34m\][\t]\[\e[0m\] \[\e]0;\w\a\]\[\e[34m\]\u@\h: \[\e[34m\]\w\[\e[0m\]\n$     $      The problem is that `\t` will only display the time when the prompt was rendered (which would be very close to the time of completion of the last command). For me, it would be more useful to display the time at which the current command process was started. Is there a way to do this?


title: Physically break into box? (Memory & disk)

text: I have a VPS. I might be able to encrypt my partition but I havent tried. My VPS company I believe can reset my root password although the only SSH key I see is my own. With all my data I have it encrypted with `encfs`. Just in case a hacker gets some kind of access, `encfs` can only mount the drive if my password is correct (SSH keys won't mount it, resetting root password will not mount as the new password is an incorrect passphrase) My question is can my VPS host break into my box? Physically the data is encrypted. I believe root can be changed without resetting the box? If so then they can have access to my already mounted filesystem? If another user with no permission is logged in can the user do something to access the ram and dump sensitive data? can the VPS host easily read the contents of my RAM? Note: This is hypothetical. I'm thinking about if I have big clients I want to know how much security I can promise and this popped into mind. I'd rather not host a box at home nor have the pipes to support it.


title: How to use tshark to do this task

text: I don't have any base knowledge about tshark, and it is hard to find any tutorial to help me with this. So now I have a pcap file which consists a lot of network flows; a time range; an ip addr; a tcp port number; the number of packets sent by the ip addr OR the number of packets received by the ip addr. What I want to do is that first I let tshark to read from that pcap file, and then use the time range to filter out all the network flows that are in that time range, and then use the ip addr to filter out all the network flows from that ip addr on that already-filter-out-by-time flows, and then use the tcp port number and the number of packets sent/received by the ip addr to finally locate the flow I want. Then follow this flow/stream and save the whole conversation to a new pcap file. Anyone can help? I'll be very very appreciate it.


title: Local Account Creation Date

text: For compliance purposes there is the need to fetch information regarding local (user and non-user) accounts creation date on UNIX machines. Is there any way (even if it's not the most reliable or accurate method) for collecting that kind of information? For instance, as an alternative, I went searching for 'home' directory creation date (for user accounts), but I discovered that for POSIX-compliant systems timestamps for file creation are not available. Thanks in advance


title: Why my $PATH is not inherited by the invoked bash?

text: I work on an AIX system where I have no administrator privileges. It has several shells installed, default being `tcsh`. I am not allowed to change the login shell. Usually I start my session from `exec bash`. The problem is that I do not inherit the `$PATH` I had in `tsch`. The first strange thing is that some of the entries in my `$PATH` are duplicated, when I do `exec bash`. Another strange thing is that when I do `exec bash --norc` and then `source .bashrc` everything is fine -- I get the path from tcsh and some additions from my `.bashrc`. I have tried commenting out my `.bashrc` enirely, but it gave no result -- I still do not get the `$PATH` from `tcsh`. It seems that the system wide /etc/profile is manipulating my `$PATH`. I tried running `exec bash --noprofile`, but I still see the changes, that are introduced by `/etc/profile` script (which I have no control over). So in the end perhaps someone spotted a flaw in my investigation and can tell me how to invoke bash with inhereted `$PATH` or can suggest a way to do it without reading the global config scripts? (I have posted this question on superuser as well, I am not sure if it is ok, to duplicate questions, but I got no answer there, so what a heck...)


title: List of modified files of the past 24 hours

text: Is there a reliable way to have a system that mails me the list of files that were modified in the past 24 hours inside a set of directories? (like `/home/*/public_html/*` and `/home/*/*domains/*`)


title: Setting up X server on Centos6 minimal

text: I'm trying to install Centos6, but as it turned out, DVD I downloaded was just couple Mb too large (CentOS-6.0-i386-bin-DVD.iso) for DVD to carry. So, to save time and don't download DVD again, I downloaded minimal (CentOS-6.0-x86_64-minimal.iso) and set up successfully. At first, I did not get that anaconda stuff to show gui for install - only after 4th reinstall, it showed, so I thought install is OK, even thou, I did not get any possibility to customize installable packages. Ok, installed without delays. On first boot up, it did not show X server, just login prompt in a command line. Ok, I logged in, ran a `yum update` and `yum groupinstall "X Window System" "GNOME Desktop Environment"`, as _internets_ suggested. Tried startx and it just flicker and popped out some errors `(EE) SIS(0): Illegal video RAM size (262144K) detected, using BIOS-provided info`, so I understood from _internets_ , that SIS chipset is malfunctioning - something is wrong with integrated gpu - I put PCIe one inside. Reboot, `startx` and nothing - it flickered, popped some messages and then `Witing for X server to shutdown`, `ctrl+alt+F7` shows blinking caret, nothing more. Here is Xorg.0.log. Ok, I'm newbie with linux installation and configuration (usually use GUI desktop), that is why I want to get to environment, I'm familiar with. Can anyone suggest step-by-step tutorial, **what needs to be done, to set up GUI on minimal Centos6 system AND make it default on startup** , so after boot, X server login screen appears, not the one in commandline.


title: Cannot edit crontab as non root user

text: When I use the command `crontab -e` on my Debian server as a non root user (in this case as postgres), I can't edit it because of `"/tmp/crontab.SJlY0Y/crontab" [Permission Denied]` `crontab -l` on the other hand works fine. How can I fix this problem? Here are the current permissions:               $ ls -l /tmp/crontab.SJlY0Y/crontab     -rw------- 1 root postgres 1.2K Aug  3 11:44 /tmp/crontab.SJlY0Y/crontab     $ ls -l /var/spool/cron     total 12K     drwxrwx--T 2 daemon daemon  4.0K Sep 12  2012 atjobs     drwxrwx--T 2 daemon daemon  4.0K Jun  9  2012 atspool     drwx-wx--T 2 root   crontab 4.0K Aug  3 11:15 crontabs     $ ls -l /var/spool/cron/crontabs     total 12K     -rw------- 1 git      crontab 1.3K Mar  2 16:48 git     -rw------- 1 postgres crontab 1.4K Aug  3 11:15 postgres     -rw------- 1 root     root    2.3K Jul 20 20:32 root     $ ls -l /usr/bin/crontab     -rwsr-xr-x 1 root root 36K Jul  3  2012 /usr/bin/crontab     $ ls -ld /tmp/     drwxrwxrwt 6 root root 4.0K Aug  3 11:43 /tmp/


title: Is there a way to determine what packages or libraries should be loaded to support an executable?

text: There is an executable I want to install on a computer that I can't recompile that wasn't built as a package, and I want to download the libraries it requires to run them. Below is part of the output from running `ldd` on it               libpango-1.0.so.0 => /usr/lib/i386-linux-gnu/libpango-1.0.so.0 (0xb702f000)     libcairo.so.2 => /usr/lib/i386-linux-gnu/libcairo.so.2 (0xb6f64000)     libatk-1.0.so.0 => /usr/lib/i386-linux-gnu/libatk-1.0.so.0 (0xb6f43000)     libsqlite3.so.0 => /usr/lib/i386-linux-gnu/libsqlite3.so.0 (0xb6e9e000)     libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xb6cf4000)     /lib/ld-linux.so.2 (0xb786e000)     libxcb.so.1 => /usr/lib/i386-linux-gnu/libxcb.so.1 (0xb6cd3000)     libgio-2.0.so.0 => /usr/lib/i386-linux-gnu/libgio-2.0.so.0 (0xb6b7c000)     libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xb6b4f000)      Is there a tool that can use this information to select which packages should be downloaded or better yet extract only the libraries listed and their dependencies, in order to minimize the disk usage? The system is running on a headless VM and the program will be displayed via VNC. Although I suspect that a full blown graphics desktop will supply most of the libraries needed I want to download only the required libraries, their dependencies and just enough of the X Windows package to support it.


title: How do you configure numpad keys using XKB?

text: I haven't figured out how you configure XKB to use the numpad yet. I found the following in the "us" file.               partial alphanumeric_keys modifier_keys      xkb_symbols "basic" {              name[Group1]= "USA";              // Alphanumeric section         key <TLDE> {    [     grave,    asciitilde  ]   };         key <AE01> {    [     1,    exclam      ]   };         key <AE02> {    [     2,    at      ]   };         key <AE03> {    [     3,    numbersign  ]   };         key <AE04> {    [     4,    dollar      ]   };         key <AE05> {    [     5,    percent     ]   };         key <AE06> {    [     6,    asciicircum ]   };         key <AE07> {    [     7,    ampersand   ]   };         key <AE08> {    [     8,    asterisk    ]   };         key <AE09> {    [     9,    parenleft   ]   };         key <AE10> {    [     0,    parenright  ]   };         key <AE11> {    [     minus,    underscore  ]   };         key <AE12> {    [     equal,    plus        ]   };              key <AD01> {    [     q,    Q       ]   };         key <AD02> {    [     w,    W       ]   };         key <AD03> {    [     e,    E       ]   };         key <AD04> {    [     r,    R       ]   };         key <AD05> {    [     t,    T       ]   };         key <AD06> {    [     y,    Y       ]   };         key <AD07> {    [     u,    U       ]   };         key <AD08> {    [     i,    I       ]   };         key <AD09> {    [     o,    O       ]   };         key <AD10> {    [     p,    P       ]   };         key <AD11> {    [ bracketleft,  braceleft   ]   };         key <AD12> {    [ bracketright, braceright  ]   };              key <AC01> {    [     a,    A       ]   };         key <AC02> {    [     s,    S       ]   };         key <AC03> {    [     d,    D       ]   };         key <AC04> {    [     f,    F       ]   };         key <AC05> {    [     g,    G       ]   };         key <AC06> {    [     h,    H       ]   };         key <AC07> {    [     j,    J       ]   };         key <AC08> {    [     k,    K       ]   };         key <AC09> {    [     l,    L       ]   };         key <AC10> {    [ semicolon,    colon       ]   };         key <AC11> {    [ apostrophe,   quotedbl    ]   };              key <AB01> {    [     z,    Z       ]   };         key <AB02> {    [     x,    X       ]   };         key <AB03> {    [     c,    C       ]   };         key <AB04> {    [     v,    V       ]   };         key <AB05> {    [     b,    B       ]   };         key <AB06> {    [     n,    N       ]   };         key <AB07> {    [     m,    M       ]   };         key <AB08> {    [     comma,    less        ]   };         key <AB09> {    [    period,    greater     ]   };         key <AB10> {    [     slash,    question    ]   };              key <BKSL> {    [ backslash,         bar    ]   };         // End alphanumeric section     };      And I was notified of http://cgit.freedesktop.org/xkeyboard- config/tree/symbols/keypad , but I was wondering if there was a resource/manual to make sense of it, and how to modify it.


title: Kernel does not detect Hardware / Software or Hardware fault

text: I've got more of a basic question for you: My linux kernel (I tried several here from stock 2.6, 3.2 and 3.5 as well as a custom 3.7.3 one) does not detect my synaptics touchpad - or I'am too dumb to find it. I looked into: dmesg, lsusb -v, lspci -v, lshw, /dev/input, /dev/bus/00x/ (...) It shows me several internal usb root hubs and integrated rate matching hubs, my pendrive and optical mouse but nothing else of interest. **Now, as for the question** : is it possible that the kernel does not detect certain hardware if there is no driver available? As far as I understand it, the kernel should at least report some unknown device at some hardware address. Thanks for your time. **dmesg | grep input**               [    3.529623] input: Sleep Button as /devices/LNXSYSTM:00/device:00/PNP0C0E:00/input/input0     [    3.529659] input: Power Button as /devices/LNXSYSTM:00/device:00/PNP0C0C:00/input/input1     [    3.529694] input: Lid Switch as /devices/LNXSYSTM:00/device:00/PNP0C0D:00/input/input2     [    3.529745] input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input3     [    5.196578] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input4     [    5.847405] input: Logitech USB-PS/2 Optical Mouse as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.3/1-1.3:1.0/input/input5     [    5.847752] hid-generic 0003:046D:C050.0001: >input,hidraw0: USB HID v1.10 Mouse [Logitech USB-PS/2 Optical Mouse] on usb-0000:00:1a.0-1.3/input0     [    5.993994] input: Video Bus as /devices/LNXSYSTM:00/device:00/PNP0A08:00/LNXVIDEO:00/input/input6     [   15.474899] input: HDA Intel PCH HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:1b.0/sound/card0/input7     [   15.475781] input: HDA Intel PCH Mic as /devices/pci0000:00/0000:00:1b.0/sound/card0/input8     [   15.475950] input: HDA Intel PCH Headphone as /devices/pci0000:00/0000:00:1b.0/sound/card0/input9      **cat /proc/bus/input/devices**               I: Bus=0019 Vendor=0000 Product=0003 Version=0000     N: Name="Sleep Button"     P: Phys=PNP0C0E/button/input0     S: Sysfs=/devices/LNXSYSTM:00/device:00/PNP0C0E:00/input/input0     U: Uniq=     H: Handlers=kbd event0      B: PROP=0     B: EV=3     B: KEY=4000 0 0          I: Bus=0019 Vendor=0000 Product=0001 Version=0000     N: Name="Power Button"     P: Phys=PNP0C0C/button/input0     S: Sysfs=/devices/LNXSYSTM:00/device:00/PNP0C0C:00/input/input1     U: Uniq=     H: Handlers=kbd event1      B: PROP=0     B: EV=3     B: KEY=10000000000000 0          I: Bus=0019 Vendor=0000 Product=0005 Version=0000     N: Name="Lid Switch"     P: Phys=PNP0C0D/button/input0     S: Sysfs=/devices/LNXSYSTM:00/device:00/PNP0C0D:00/input/input2     U: Uniq=     H: Handlers=event2      B: PROP=0     B: EV=21     B: SW=1          I: Bus=0019 Vendor=0000 Product=0001 Version=0000     N: Name="Power Button"     P: Phys=LNXPWRBN/button/input0     S: Sysfs=/devices/LNXSYSTM:00/LNXPWRBN:00/input/input3     U: Uniq=     H: Handlers=kbd event3      B: PROP=0     B: EV=3     B: KEY=10000000000000 0          I: Bus=0011 Vendor=0001 Product=0001 Version=ab83     N: Name="AT Translated Set 2 keyboard"     P: Phys=isa0060/serio0/input0     S: Sysfs=/devices/platform/i8042/serio0/input/input4     U: Uniq=     H: Handlers=sysrq kbd event4      B: PROP=0     B: EV=120013     B: KEY=402000000 3803078f800d001 feffffdfffefffff fffffffffffffffe     B: MSC=10     B: LED=7          I: Bus=0019 Vendor=0000 Product=0006 Version=0000     N: Name="Video Bus"     P: Phys=LNXVIDEO/video/input0     S: Sysfs=/devices/LNXSYSTM:00/device:00/PNP0A08:00/LNXVIDEO:00/input/input6     U: Uniq=     H: Handlers=kbd event6      B: PROP=0     B: EV=3     B: KEY=3e000b00000000 0 0 0          I: Bus=0000 Vendor=0000 Product=0000 Version=0000     N: Name="HDA Intel PCH HDMI/DP,pcm=3"     P: Phys=ALSA     S: Sysfs=/devices/pci0000:00/0000:00:1b.0/sound/card0/input7     U: Uniq=     H: Handlers=event7      B: PROP=0     B: EV=21     B: SW=140          I: Bus=0000 Vendor=0000 Product=0000 Version=0000     N: Name="HDA Intel PCH Mic"     P: Phys=ALSA     S: Sysfs=/devices/pci0000:00/0000:00:1b.0/sound/card0/input8     U: Uniq=     H: Handlers=event8      B: PROP=0     B: EV=21     B: SW=10          I: Bus=0000 Vendor=0000 Product=0000 Version=0000     N: Name="HDA Intel PCH Headphone"     P: Phys=ALSA     S: Sysfs=/devices/pci0000:00/0000:00:1b.0/sound/card0/input9     U: Uniq=     H: Handlers=event9      B: PROP=0     B: EV=21     B: SW=4          I: Bus=0003 Vendor=046d Product=c050 Version=0110     N: Name="Logitech USB-PS/2 Optical Mouse"     P: Phys=usb-0000:00:14.0-3/input0     S: Sysfs=/devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.0/input/input11     U: Uniq=     H: Handlers=mouse0 event5      B: PROP=0     B: EV=17     B: KEY=ff0000 0 0 0 0     B: REL=143     B: MSC=10      **lsusb**               Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub     Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub     Bus 003 Device 002: ID 0951:1642 Kingston Technology DT101 G2     Bus 003 Device 004: ID 046d:c050 Logitech, Inc. RX 250 Optical Mouse     Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub     Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub     Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub     Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub


title: How do I work out which port to log in on with SSH?

text: I have an Ubuntu 10.04 server setup remotely that I setup a while back. While I recorded the username and password, I seem to have been clever and changed the usual ssh port from 22 to... something else. How do I find out what that port might be? I do have access to the server via the hosting company's back door, so I can execute whatever Unix commands are needed - but I cannot log in using a normal putty shell on my machine.


title: When do you need 'nohup' if you're already forking using '&'?

text: First this question is related but definitely not the same as this very nice question: Difference between nohup, disown and & I want to understand something: when I do '&', I'm forking right? Is it ever useful to do "nohup ... &" or is simply & sufficient? Could someone show a case where you'd be using '&' and still would want to use 'nohup'?


title: Tools to dump entries from arbitrary sets of log files between 2 dates

text: I had a outage incident a few days ago and the support team has asked for any available logs for the period, while thinking about how to do this, it occurred to me that it would be generally handy to be able to parse many log files at once for entries between 2 dates. I see many tools that would make this possible, had we had the foresight to configure them, not least;   `splunk`, `syslog-ng`, `rsyslog`, and others that stash logs to some searchable backend such as mysql. (I am definitely planning to install a central log host to fulfill this requirement) However for the short term I am interested in a tool that would blaze through the `/var/log/*` folder and dump to stdout, preferably with a simple options syntax (find options are nice +mtime etc) and written in something that can do this fast (so probably C rather than perl or ruby) I see a bunch of tools that I am looking at which may or may not be fit for purpose, such as `mergelog`, `logpp`, `sec`, but none are really jumping out as obviously good for this, which is odd because I would expect this to be the sort of thing that is done to death on unix tools.


title: How to get subshell's PID in Korn Shell (equivalent of $BASHPID)

text: In bash you have this handy variable: $BASHPID wich always returns the currently running subshell's PID. How can I get a subshell's PID in ksh? For example see the code below:               #!/usr/bin/ksh93          echo "PID at start: $$"          function run_in_background {       echo "PID in run_in_background $$"       run_something &       echo "PID of backgrounded run_something: $!"     }          function run_something {       echo "*** PID in run_something: $$"       sleep 10;     }              run_in_background     echo "PID of run in background $!"      This outputs the following:               PID at start: 5328     PID in run_in_background 5328     *** PID in run_something: 5328     PID of backgrounded run_something: 5329     PID of run in background 5329      What I want is the line starting with `****` to output the subshell's PID, in the example's case that would be 5329.


title: How umask() system call is masking the permission

text: I am using `umask()` system call to set file permission. I am using the following code :               umask(S_IWGRP | S_IWOTH);     printf("Enter file name that you want to create:");     scanf(" %s",file);     fd = open(file,O_CREAT|O_WRONLY);      But after executing it file is created with the given below permissions               --wS-----T 1 rvi rvi     0 Oct  2 15:20 test.txt      What is this `S` bit and `T` bit for ? and why it is modified automatically ?


title: bash PS1 256 colors with bold

text: I want to list all colors that I can use in bash console. And after it I want to set my prompt to be bold and orange like color. I'm using this to do listing color codes for me:               for code in {0..255}; do echo -e "\e[38;05;${code}m $code: Test"; done      But the question is how to make it **bold** and keep colors? I looked for some advice about making it bold here: http://misc.flogisoft.com/bash/tip_colors_and_formatting but I couldn't found any code that combines bold and one of 256 colors.