title: Bash option to get resolved executable path?

text: Bash is able to trace execution script commands with the `-x` command line option. Each command is then output to `stderr`, prefixed by `PS4` as stated in the man page. > >      -x      After expanding each simple command, for command,  case > command, >              select  command,  or arithmetic for command, display the > expanded >              value of PS4, followed by the command and its expanded > arguments >              or associated word list. >   Albeit useful, the resolved executable path of each command is not given. So I have to figure out which executable has been run by guessing shell aliases and `PATH` value while reading execution trace. For example, `ruby` has multiple command candidates on my workstation:               $ type -a ruby     ruby is /home/cbliard/.rvm/rubies/ruby-2.1.0/bin/ruby     ruby is /home/cbliard/.rvm/bin/ruby     ruby is /usr/bin/ruby     ruby is /home/cbliard/.rvm/bin/ruby      If executing this script with `/bin/bash -x`               #!/bin/bash     echo "compute"     ruby script/run_something.rb     echo "deploy"     bundle install     bundle exec cap deploy      Trace execution will be               + echo "compute"     compute     + ruby script/run_something.rb     [output of ruby script]     + bundle install     Using rake (10.1.0)     Using i18n (0.6.9)     [...]     Your bundle is complete!     Use `bundle show [gemname]` to see where a bundled gem is installed.     + bundle exec cap deploy         triggering load callbacks       * 2014-01-14 09:12:42 executing `deploy'       * 2014-01-14 09:12:42 executing `deploy:update'     [...]     Finished: SUCCESS      I had some oddities with resolved executables, mainly due to my usage of `rvm`. The output I would like is with fully resolved path, like this:               + [builtin] echo "compute"     compute     + /home/cbliard/.rvm/rubies/ruby-1.9.3-p484/bin/ruby script/run_something.rb     [output of ruby script]     + /home/cbliard/.rvm/gems/ruby-1.9.3-p484@global/bin/bundle install     Using rake (10.1.0)     Using i18n (0.6.9)     [...]     Your bundle is complete!     Use `bundle show [gemname]` to see where a bundled gem is installed.     + /home/cbliard/.rvm/gems/ruby-1.9.3-p484@global/bin/bundle exec cap deploy         triggering load callbacks       * 2014-01-14 09:12:42 executing `deploy'       * 2014-01-14 09:12:42 executing `deploy:update'     [...]     Finished: SUCCESS      Having the resolved command would really help me debugging weird `rvm`/`bundler` issues. The `-x` option helps a lot but sometimes it is not enough. **Is there any trick that helps knowing the full characteristics of the commands while running a`bash` script?**. It is better if the original script does not have to be modified.


title: Using awk to parse AIX's lsuser output in stanza format

text: I'm creating a simple awk script to parse AIX's `lsuser -f ALL` output and return information in one line. A sample of the output is something like this.               root:         id=0         pgrp=something         groups=something         home=/         shell=/usr/bin/csh         auditclasses=general         login=true         su=false      Here is my code so far:-               $1 ~ /[^=]:[ ]*$/ {sub(/:/,"",$1);printf $1" ";FS="="}     $1 ~ /login/         {printf $2" "}     $1 ~ /su/     {printf $2" "}     $1 ~ /account_locked/         {printf $2" "}     $1 ~ /time_last_login/     {print $2}      The script does not work well with fields that does not exist for certain ID such as `time_last_login` because some user may not have logged in before. Example as per below.               root something ALL false 1360813178     **daemon staff ALL true sysadm1 something ALL false 1352015794**     sysadm2 staff ALL true 1352015794      sysadm1 line should be in a new line. How do I fix this?


title: How would I automate sending highly similar emails with one word changed?

text: E.g. if I want to send a bunch of emails along the lines of "What does it feel like to X?" to ask@qr.ae (Quora allows and even somewhat encourages me to ask highly similar questions there). And then give a dictionary of words that I want to substitute for X? I know that the mailx readme has a small section on how to send mail with scripts, but I'm still a UNIX newbie so I'm not sure how I would be able to configure a script in conjunction with mailx just from that.


title: Correct way to document variable length options in man pages

text: Sometimes I see usage information like               some_utility [arg [arg [...]]]      or               some_utility [arg[, arg[...]]]      that indicates that you can pass more than one of the same argument. I've also seen it like               some_utility [args]      or               some_utility [arg][, arg][...]      Is there a standard way to do this?


title: Orphaned connections in CLOSE_WAIT state

text: I've got a SLES machine that accumulates TCP connections in a CLOSE_WAIT state for what appears to be forever. These descriptors eventually suck up all available memory. At the moment, I've got 3037 of them, but it was much higher before a hurry-up reboot recently. What's interesting is that they're not from connections to local ports that I expect to have listening processes. They have no associated PIDs, and their timers seem to have expired.               # netstat -ton | grep CLOSE_WAIT     tcp      176      0 10.0.0.60:54882     10.0.0.12:31663      CLOSE_WAIT  off (0.00/0/0)     tcp       54      0 10.0.0.60:60957     10.0.0.12:4503       CLOSE_WAIT  off (0.00/0/0)     tcp       89      0 10.0.0.60:50959     10.0.0.12:3518       CLOSE_WAIT  off (0.00/0/0)          # netstat -tonp | grep CLOSE_WAIT     tcp       89      0 10.0.0.59:45598     10.0.0.12:1998       CLOSE_WAIT  -                        tcp       15      0 10.0.0.59:60861     10.0.0.12:1938       CLOSE_WAIT  -                        tcp        5      0 10.0.0.59:56173     10.0.0.12:1700       CLOSE_WAIT  -           I'm not a black-belt when it comes to the TCP stack, or kernel networking, but the TCP config seems sane, since these values are default, per the man page:               # cat /proc/sys/net/ipv4/tcp_fin_timeout      60     # cat /proc/sys/net/ipv4/tcp_keepalive_time      7200      So what gives? If the timers have expired, shouldn't the stack automatically clear this stuff out? I'm effectively giving myself a long-term DoS as these things build up.


title: Best way to archive attachments?

text: My saved-messages and sent-mail "folders" (actually Unix MBX files) are huge because of attachments, most of which I've saved to disk anyway. I want to keep the messages, but replace the attachment w/ a text file saying "Attachment removed: /full/path/to/attach.txt". How do I do this? I'm using Alpine, but any tool that does this for Unix MBX is fine. Alpine _does_ let me delete attachments from emails, but I can't replace them w/ a text file. Notes:   * I realize I can save the message to a file and edit the file using emacs, but that's kludgey and probably messes up "Content-Length" headers and stuff.    * I also realize I can forward the message, with headers, to myself after removing the attachment. Again, kludgey.    * I don't think Alpine lets me add attachments to stored mail (unless I want to send it somewhere [which messes up headers]), so I can't delete the big attachment and add a smaller one.    * I realize I could write a Perl script to do this, but hoping for an existing well-tested solution.


title: Differences in package management between Debian and Arch

text: A discussion from this post made me curious of differences between Debian and Arch package management. Also, people tend to say that Arch is very light- weight, so I wonder what that has to do with package management. Is it maybe because Debian treats _Recommends_ as hard dependencies by default? Can you also mention the flexibility/power between the two package managers: which of the two lets you do more. I'm aware that some features available on a Debian package management system would be irrelevant on an Arch system, since Arch has a single Suite and Debian has multiple (e.g. APT pinning and advanced dependency handling come to mind), so please compare features that are applicable to both systems (i.e. assume that for Debian, I only use _unstable_ ).


title: Resetting password expiry date by number of days instead of specifying date

text: Is there a way with either commands passwd or chage to force the password to expire 90 days from the time of command execution? I know I can do it by date, such as:               chage -E "2014-07-31" userid      But I'm looking for a way to do it by with a number instead of a specific date. Thank you!


title: Character encoding of .netrc

text: Does anyone know which character encoding is used in `.netrc`? As a German user, I sometimes put umlauts in passwords. So my question is, are these treated as latin1 or may I assume that I am doing fine encoding the file in UTF-8?


title: Can I configure apache to limit access to a directory only from my ssh connection?

text: I have a virtual machine running a number of websites. All users have access these via the external IP address of the machine. I am running Debian Stable on this machine. I can access the machine via `ssh` and have organized it so I port forward my local `10080` port to `localhost:80` so I can connect my browser to localhost port `10080`/phpmyadmin and gain access to phpmyadmin. My machine is on a `192.168.0.0/24` network Trouble is, you can also access it via any of the external web sites - because Debian has placed it in the top level Apache config. I would like to limit access to only connections via the `ssh` port. But there doesn't appear to be the equivalent of a listen directive for a directory. However there is Allow from IP_address. What IP address does apache think I connected on when I come over the `ssh` tunnel.


title: To grep 20 characters after and before match

text: I have the problem that I get too much information after the match for               grep -RnisI --color=auto "pseudomonas" *      I want to get only like 20 characters or 10 words after and before the match. **What is the right tool to do such a thing?**


title: iptables: allow certain ips and block all other connection

text: How do I allow certain ips and block all other connection in iptables?


title: Trying to get vimpager (to replace less) working with nerdTREE

text: I'm trying to get switch over to vim as my primary editor and I've installed the nerdTree plugin, but now when I try and use vimpager to replace less I get               Error detected while processing VimEnter Auto commands for "*":     E492: Not an editor command: NERDTree        I've narrowed it down to this line in my `.vimrc`, but I don't know much about configuring vim, I got this `.vimrc` off the internet.               autocmd VimEnter * NERDTree       My best guess is that vimpager is trying to disable plugin, but the `.vimrc` is trying to load it, so they're getting an error. Any advise on resolving this?


title: sort but keep header line at the top

text: I am getting output from a program that first produces one line that is a bunch of column headers, and then a bunch of lines of data. I want to cut various columns of this output and view it sorted according to various columns. Without the headers, the cutting and sorting is easily accomplished via the `-k` option to `sort` along with `cut` or `awk` to view a subset of the columns. However, this method of sorting mixes the column headers in with the rest of the lines of output. Is there an easy way to keep the headers at the top?


title: How to share files between Linux and Windows?

text: I am wondering, is there any way to easily share a folder between Linux and Windows?


title: How to install b43-firmware on arch without internet access?

text: I currently don't have wire internet access in the PC I'm trying to install arch to, but my other PC (win7) can access the internet just fine. I tried downloading the b43 package from the AUR and copy it with a pendrive but when I run `makepkg -s --asroot` it goes and tries to download the source from "http://www.lwfinger.com/b43-firmware/broadcom-wl-5.100.138.tar.bz2" which doesn't work since I still don't have internet access. I manually downloaded the source on my other pc but I guess I have to modify the PKGBUILD file to reflect this so instead of trying to fetch it online it looks in my local folder? How can I do this?


title: CPU usage by kernel modules, routing and forwarding rules

text: I have a system with a loopback kernel module installed. Through a bunch of routing and iptable rules, packets coming out of the loopback interface are sent over an ipsec tunnel. I am seeing that under load, the kernel panics or dumps a lot of messages that say "BUG: soft lockup - CPU#0 stuck for X secs". The stack trace is always in an encryption function like crypto_cbc_encrypt or des3_ede_encrypt. There is a lot of traffic going over the ipsec tunnels and the system is spending lot of time in encryption+decryption. My concern is that it is always CPU 0. How do I ensure that other CPUs are also sharing the crypto load. I have seen sometimes when the ksoftirq0 thread is at 100%. Again it is always cpu0. This is mostly happening when packets are being forward from the loopback interface, go through the xfrm rules and into the tunnels. How do I also check the CPU mask for the loopback kernel module? Is there such a thing?


title: Method bzip2 has died unexpectedly -Unable to update /upgrade /installl Ubuntu 14.04

text: Unable to update/upgrade/install Ubuntu 14.04, and it shows the below:               Get:21 http://us.archive.ubuntu.com trusty/universe Translation-en [4,089 kB]      E: Method bzip2 has died unexpectedly!      E: Sub-process bzip2 received signal 25.      Also while upgrading - shows '0%': I was fixing as error ' sts...0% ' while upgrading Ubuntu. I tried creating a manual `sources.list`. I reverted the changes to the file, but the error is still there.


title: Problems running python script from motion

text: I'm trying to set up the raspberry pi with my webcam as a motion detecting cctv that uploads the videos to google drive using Jeremy Blythe's script I have motion working correctly and the python script runs when I test it from the terminal. However the script doesn't run when I add it to the on_movie_end option in motion.conf. The script I am using in the file is               On_Movie_End /etc/motion/uploader.py /etc/motion/uploader.cfg %f      I have also tried getting the on_movie_end to run a bash script that runs the python script and this doesn't work either. I am new to linux though so not entirely sure I have it correct. The script is:               #!/bin/bash     VIDEO=$1      /etc/motion/uploader.py /etc/motion/uploader.cfg VIDEO      In motion.conf /etc/motion/uploaderscript.sh %f


title: Why does Vi have multiple modes?

text: Why does Vi have multiple modes? I'm not interested in the functions of the modes unless that was a reason to have different modes. I'm only interested in the design / engineering reasons for multiple modes.


title: How can I turn the behavior of `gedit sOmEtHiNg & disown` into the default behavior when calling gedit from the command line?

text: When I `gedit` files from the command line, it's always locking the terminal, and I'm tired of explicitly commanding a detached process for it. I tried to alias `gedit` as something like `gedit $* & disown`, but either that's not the right syntax or you're not allowed to overload executable binary commands with aliases (tried using that in a .bash_aliases function,               alias gedit=editorz          function editorz()     {       gedit $* & disown     }      ), but it doesn't take. So how do I make the command `gedit test.txt` not lock the originating terminal window?


title: How to report back system installation progress

text: I'd like to do some reporting from the system setup progress for virtualised (libvirt/kvm) Ubuntu servers. I expected some kind of such system to already exist out there, but couldn't find anything. Is it possible that there's no such thing? For a custom solution I've found there's a good interface available via `virt- install`'s `\--channel` option. Essentially I can start a daemon listening for messages on the host and on the client pipe messages to either a virtio device or to a pre-configured address using `netcat`. Alternatively I could make sure kernel logging is done into a file on the host and send my messages that way. Are there some other reasonable / tried solutions?


title: Run autostart program in a terminal instead of having it run hidden in background

text: I have added to `sudo nano /etc/xdg/lxsession/LXDE/autostart` the line: `python /path/to/script.py` This launches `script.py` on boot. Which is what I want. However, I can't see the output from `script.py` about what it is doing. Autostart just runs it in the background. How can I get `script.py` to run in a terminal? I'm using debian.


title: Using awk, how to get desired output from multiple file sources

text: I have two files: file1:               A,D     B,E     C,F      file2:               G,H,I     J,K,L      Using `awk`, I want to print:               A,D     B,E,I     C,F,L      How can I use `awk` to achieve this?


title: C Shell Array Declaration Syntax, () vs. {}

text: In my C-shell script (tcsh specifically) I have been trying to declare an array with six values: x, nx, y, ny, z, nz. After some trial and error I discovered three different ways of declaring the array I want:               set arrname = ("x" "nx" "y" "ny" "z" "nz")     set arrname = (x,nx,y,ny,z,nz)     set arrname = {x,nx,y,ny,z,nz}      but the following line doesn't work:               set arrname = {"x" "nx" "y" "ny" "z" "nz"}      The above line produces the following error:               Missing }.      My question is what is different between () and {} that makes the fourth declaration I've listed not work?


title: /usr/bin/ld: cannot find -lcrypt (rhel 6 )

text: **System info**               [root@xilinx busybox-1.22.1]# uname -r     2.6.32-71.el6.x86_64      Following errors come when I make busybox on rhel 6:               /usr/bin/ld: cannot find -lcrypt     collect2: ld returned 1 exit status     make: *** [busybox_unstripped] Error 1      Also I can see the libraries are there in lib:               [root@xilinx busybox-1.22.1]# ls  -ld /lib/libcry*     -rwxr-xr-x. 1 root root 38380 Sep  7  2010 /lib/libcrypt-2.12.so     lrwxrwxrwx. 1 root root    16 Jan 25 16:48 /lib/libcrypt.so.1 -> libcrypt-2.12.so          [root@xilinx busybox-1.22.1]# ls -ld /usr/bin/ld*     -rwxr-xr-x. 1 root root  595192 May  5  2010 /usr/bin/ld     -rwxr-xr-x. 1 root root 1685416 Aug 24  2010 /usr/bin/ldb3add     -rwxr-xr-x. 1 root root 1685416 Aug 24  2010 /usr/bin/ldb3del     -rwxr-xr-x. 1 root root 1685416 Aug 24  2010 /usr/bin/ldb3edit     -rwxr-xr-x. 1 root root 1685424 Aug 24  2010 /usr/bin/ldb3modify     -rwxr-xr-x. 1 root root 1685424 Aug 24  2010 /usr/bin/ldb3rename     -rwxr-xr-x. 1 root root 1685424 Aug 24  2010 /usr/bin/ldb3search     -rwxr-xr-x. 1 root root    5656 Sep  7  2010 /usr/bin/ldd      Why this is happening ? **Additional Info:**               [root@xilinx busybox-1.22.1]# yum install glibc-*     Loaded plugins: refresh-packagekit, rhnplugin     There was an error parsing the RHN proxy settings.     RHN support will be disabled.     Setting up Install Process     Package glibc-devel-2.12-1.7.el6.x86_64 already installed and latest version     Package glibc-2.12-1.7.el6.x86_64 already installed and latest version     Package glibc-headers-2.12-1.7.el6.x86_64 already installed and latest version     Package glibc-utils-2.12-1.7.el6.x86_64 already installed and latest version     Package glibc-common-2.12-1.7.el6.x86_64 already installed and latest version     Nothing to do      Also these are the installed packages starting with glib*               [root@xilinx busybox-1.22.1]# yum list installed |grep glibc*     There was an error parsing the RHN proxy settings.     RHN support will be disabled.     NetworkManager-glib.x86_64          1:0.8.1-5.el6                      @anaconda-RedHatEnterpriseLinux-201009221801.x86_64/6.0     PackageKit-glib.x86_64              0.5.8-13.el6                       @anaconda-RedHatEnterpriseLinux-201009221801.x86_64/6.0     avahi-glib.x86_64                   0.6.25-8.el6                       @anaconda-RedHatEnterpriseLinux-201009221801.x86_64/6.0     dbus-glib.x86_64                    0.86-5.el6                         @anaconda-RedHatEnterpriseLinux-201009221801.x86_64/6.0     dbus-glib-devel.x86_64              0.86-5.el6                         @anaconda-RedHatEnterpriseLinux-201009221801.x86_64/6.0     glib.x86_64                         1:1.2.10-33.el6                    @epel         glib-devel.x86_64                   1:1.2.10-33.el6                    @epel         glib2.x86_64                        2.22.5-5.el6                       @anaconda-RedHatEnterpriseLinux-201009221801.x86_64/6.0     glib2-devel.x86_64                  2.22.5-5.el6                       @anaconda-RedHatEnterpriseLinux-201009221801.x86_64/6.0     glibc.i686                          2.12-1.7.el6                       @server       glibc.x86_64                        2.12-1.7.el6                       @anaconda-RedHatEnterpriseLinux-201009221801.x86_64/6.0     glibc-common.x86_64                 2.12-1.7.el6                       @anaconda-RedHatEnterpriseLinux-201009221801.x86_64/6.0     glibc-devel.x86_64                  2.12-1.7.el6                       @anaconda-RedHatEnterpriseLinux-201009221801.x86_64/6.0     glibc-headers.x86_64                2.12-1.7.el6                       @anaconda-RedHatEnterpriseLinux-201009221801.x86_64/6.0     glibc-utils.x86_64                  2.12-1.7.el6                       @server       glibmm24.x86_64                     2.22.1-1.el6                       @anaconda-RedHatEnterpriseLinux-201009221801.x86_64/6.0     poppler-glib.x86_64                 0.12.4-3.el6                       @anaconda-RedHatEnterpriseLinux-201009221801.x86_64/6.0     pulseaudio-libs-glib2.x86_64        0.9.21-13.el6                      @anaconda-RedHatEnterpriseLinux-201009221801.x86_64/6.0     taglib.x86_64                       1.6.1-1.1.el6                      @anaconda-RedHatEnterpriseLinux-201009221801.x86_64/6.0      **glibc is installed:**               [root@xilinx busybox-1.22.1]# yum list installed glibc     Loaded plugins: refresh-packagekit, rhnplugin     There was an error parsing the RHN proxy settings.     RHN support will be disabled.     Installed Packages     glibc.i686                                              2.12-1.7.el6                                             @server                                                     glibc.x86_64                                            2.12-1.7.el6                                             @anaconda-RedHatEnterpriseLinux-201009221801.x86_64/6.0      **Tried RPM**               [root@xilinx Downloads]# rpm -ivh glibc-static-2.12-7.2.x86_64.rpm      warning: glibc-static-2.12-7.2.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 2ca06d46: NOKEY     error: Failed dependencies:         glibc-devel = 2.12-7.2 is needed by glibc-static-2.12-7.2.x86_64      **Now here is a chicken and egg problem**               [root@xilinx Downloads]# rpm -ivh glibc-2.12-7.2.x86_64.rpm      warning: glibc-2.12-7.2.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 2ca06d46: NOKEY     error: Failed dependencies:         glibc-common = 2.12-7.2 is needed by glibc-2.12-7.2.x86_64      Ok then I installed this dependency:               [root@xilinx Downloads]# rpm -ivh glibc-common-2.12-7.2.x86_64.rpm     warning: glibc-common-2.12-7.2.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 2ca06d46: NOKEY     error: Failed dependencies:         glibc = 2.12-7.2 is needed by glibc-common-2.12-7.2.x86_64      i.e when I install glibc-2.12-7.2 , it says I need glibc-common-2.12-7.2 but now when I install glibc-common-2.12-7.2, it says it need glibc-2.12-7.2 How do break this chicken-egg cycle? **But actually all required glibc are installed**               [root@xilinx busybox-1.22.1]# yum install glibc-*          Package glibc-devel-2.12-1.7.el6.x86_64 already installed and latest version     Package glibc-2.12-1.7.el6.x86_64 already installed and latest version     Package glibc-headers-2.12-1.7.el6.x86_64 already installed and latest version     Package glibc-utils-2.12-1.7.el6.x86_64 already installed and latest version     Package glibc-common-2.12-1.7.el6.x86_64 already installed and latest version     Nothing to do


title: Are there any command line utilities that can capture joystick button presses?

text: Here's my situation: I have a Raspberry Pi with Raspbian installed on it. I also have RetroArch installed and a simple USB gamepad hooked up. Everything works fine, but I wanted to set it up so that pressing a key combination (ex L1+L2+R1+R2) would gracefully exit the emulator so that I don't have to keep a keyboard around. RetroArch's default key to gracefully exit is ESC, and I can't remap it to a key combination due to a limitation in RetroArch (I could, however, remap it to a single gamepad key). So I was wondering if there were any utilities out there that could listen to the gamepad's key presses and, when a certain combination is pressed, performs an action (sending the ESC key to the emulator). Or is there an easier way to achieve what I want and I'm just being silly? EDIT: Now that I think about it, it would also be nice if I could have a different key combination execute a bash script that starts the emulator so that I could start it without a keyboard as well.


title: How can I get the version of the pgrep & pkill commands?

text: I looked at the manpages and there is no `-v` or `\--version` argument for pgrep or pkill. How can i get some info on the version? I'm asking because on my version of Ubuntu man `pgrep` is giving me a different manual then on my server. Ideally I would install the same version on my machine too.


title: Is there a one liner which can list public key fingerprints with authorised_keys as input?

text: I'd like to audit the `authorised_keys` file on a number of servers and match them with known AWS key fingerprints. Is there a one-liner which incorporates `ssh-keygen -lf` which will output the fingerprint of every key in an `authorised_keys` file in a nice list with line breaks?


title: How do I set Keyboard and profile preferences when connecting to Solaris via SSH?

text: I'm connecting to a Solaris box from Mac OS X. Whenever I have connected to linux boxes in the past it has been much easier to navigate around. How do I fix these configuration issues on Solaris?   1. Have to use `control+h` instead of backspace key   2. When in `man` the `escape` key does not quit the man page - how do I exit?   3. I didn't see a `.bash_profile` or `.profile` in the home directory, how do I set up things like `alias ll="ls -al"` on the remote machine?


title: NetworkManager Wi-Fi enablement button unselectable

text: I have a Gigabyte Q2532 laptop and `Enable Wi-Fi` of NetworkManager is not selectable. As for the device, here is the relevant entry from `lspci`:               03:00.0 Network controller: Qualcomm Atheros AR9285 Wireless Network Adapter (PCI-Express) (rev 01)      I can see the driver is loaded:               $ lsmod | grep ath     ath9k                  83980  0      ath9k_common           12728  1 ath9k     ath9k_hw              345710  2 ath9k_common,ath9k     ath                    21417  3 ath9k_common,ath9k,ath9k_hw     mac80211              386825  1 ath9k     cfg80211              366201  3 ath,ath9k,mac80211      I also installed the firmware package, `firmware-atheros`, but I still get the same issue. Manually loading the driver gives me this on `/var/log/syslog`:               Jun 27 22:36:53 thome kernel: [ 5758.818796] ath: phy1: ASPM enabled: 0x42     Jun 27 22:36:53 thome kernel: [ 5758.818799] ath: EEPROM regdomain: 0x60     Jun 27 22:36:53 thome kernel: [ 5758.818801] ath: EEPROM indicates we should expect a direct regpair map     Jun 27 22:36:53 thome kernel: [ 5758.818803] ath: Country alpha2 being used: 00     Jun 27 22:36:53 thome kernel: [ 5758.818803] ath: Regpair used: 0x60     Jun 27 22:36:53 thome kernel: [ 5758.820362] ieee80211 phy1: Selected rate control algorithm 'ath9k_rate_control'     Jun 27 22:36:53 thome kernel: [ 5758.820686] ieee80211 phy1: Atheros AR9285 Rev:2 mem=0xffffc90004ec0000, irq=17     Jun 27 22:36:53 thome NetworkManager[1004]: <info> rfkill3: found WiFi radio killswitch (at /sys/devices/pci0000:00/0000:00:1c.1/0000:03:00.0/ieee80211/phy1/rfkill3) (driver ath9k)     Jun 27 22:36:53 thome NetworkManager[1004]: <info> WiFi now disabled by radio killswitch     Jun 27 22:36:53 thome NetworkManager[1004]: <info> (wlan0): using nl80211 for WiFi device control     Jun 27 22:36:53 thome NetworkManager[1004]: <info> (wlan0): driver supports Access Point (AP) mode     Jun 27 22:36:53 thome NetworkManager[1004]: <info> (wlan0): new 802.11 WiFi device (driver: 'ath9k' ifindex: 7)     Jun 27 22:36:53 thome NetworkManager[1004]: <info> (wlan0): exported as /org/freedesktop/NetworkManager/Devices/4     Jun 27 22:36:53 thome NetworkManager[1004]: <info> (wlan0): device state change: unmanaged -> unavailable (reason 'managed') [10 20 2]     Jun 27 22:36:53 thome NetworkManager[1004]: <info> (wlan0): bringing up device.     Jun 27 22:36:53 thome NetworkManager[1004]: <info> (wlan0): deactivating device (reason 'managed') [2]     Jun 27 22:36:53 thome NetworkManager[1004]:    SCPlugin-Ifupdown: devices added (path: /sys/devices/pci0000:00/0000:00:1c.1/0000:03:00.0/net/wlan0, iface: wlan0)     Jun 27 22:36:53 thome NetworkManager[1004]:    SCPlugin-Ifupdown: device added (path: /sys/devices/pci0000:00/0000:00:1c.1/0000:03:00.0/net/wlan0, iface: wlan0): no ifupdown configuration found.      NetworkManager config file:               $ cat /etc/NetworkManager/NetworkManager.conf      [main]     plugins=ifupdown,keyfile          [ifupdown]     managed=false      The other config file:               $ cat /etc/network/interfaces     auto lo     iface lo inet loopback      NetworkManager is at **0.9.8.0** , and...               $ uname --all     Linux thome 3.11-rc4-amd64 #1 SMP Debian 3.11~rc4-1~exp1 (2013-08-08) x86_64 GNU/Linux      It didn't work with Linux versions **3.9** and **3.10** as well. Also:               $ iwconfig wlan0      wlan0     IEEE 802.11bgn  ESSID:off/any                 Mode:Managed  Access Point: Not-Associated   Tx-Power=off                  Retry  long limit:7   RTS thr:off   Fragment thr:off               Power Management:on


title: Reserved space for root on a filesystem - why?

text: I understand that by default, newly created filesystems will be created with 5% of the space allocated for root. I also know you can change the defined space with:               tune2fs -m 1 /dev/sdXY      What I'm curious about though, is what the actual purpose for this reserved space is. Does it serve any practical purpose which would merit more than 5% space in some circumstances? The reason I've stumbled upon this question is that we recently built a 1TB filestore, and couldn't quite figure out why a df -h left us missing 5% of our capacity.


title: How do I stop KDE from changing my screen resolution?

text: I am running Linux Mint 17 with KDE and display drivers from Nvidia. I've configured the display settings using nvidia-settings, and when I first start up everything appears to work correctly. However, when I log in and KDE is loaded, it does something to my display setup which turns off one of my three connected screens. Using the KDE Display settings I am unable to turn the screen back on, but restarting the session and returning to the login screen shows the login dialog on this screen as intended. How do I stop KDE from messing with my screen setup? Alternatively, why is one of my monitors getting turned off? FWIW, the monitor affected by this is connected via HDMI while the other two that keep working are using DVI.


title: Encode directory with GnuPG

text: Is there any way to encrypt the whole directory using `gpg`? It accepts only file as input argument. But I need to encrypt a lot of files on external HDD.


title: How to override anaconda/kickstart package ordering?

text: I am building a bootable ISO to be used to install a Linux image (Oracle Linux, 5.8). This is using anaconda with a kickstart file to select the packages to be loaded. Some of these packages are failing with dependency problems in their %post section. Eg, this is seen in /root/install.log after the installation is complete:               Installing thirdparty-tools-1.00-09.noarch     /var/tmp/rpm-tmp.97891: line 1: ln: command not found     /var/tmp/rpm-tmp.97891: line 2: ln: command not found     /var/tmp/rpm-tmp.97891: line 3: ln: command not found     /var/tmp/rpm-tmp.97891: line 4: ln: command not found     error: %post(thirdparty-tools-1.00-09.noarch) scriptlet failed, exit status 127      I'm trying to find out if it is possible to control/override the package ordering, _without editing any RPMs to add dependencies_. I've been looking through the anaconda / kickstart documentation (https://fedoraproject.org/wiki/Anaconda/Kickstart#Chapter_3._Package_Selection), and searching extensively elsewhere, so I think that the answer is actually 'no, you can't do this', which would be a shame. The problem is that I am trying to include various _third-party_ RPMs, which are not under my control and which have been digitally signed. These include some processing in a %post section. This processing requires some standard Linux commands, eg 'ln', 'touch', etc, which are supplied within the coreutils package. The third-party package does not currently include a dependency on the coreutils package, though obviously it should really. Anaconda uses its own partial ordering algorithm to choose what order to install these packages, and the third-party packages are being installed _before_ the coreutils package. Obviously, the proper solution is to get these RPMs fixed by the third-party; however, this is likely to take too long. I was hoping that their might be some hidden / un-documented option for the kickstart file, which could add in extra dependencies. Ideally, I'd like to be able to add something like this to the %packages section:               %packages     @admin-tools     @base     @core     @system-tools     thirdparty-tools          # We would like to add some magic command to indicate a missing dependency     thirdparty-tools dependson coreutils      So, my question is: Is it possible to control or override the package ordering without editing any RPMs to add dependencies? [ I asked this same question on the main StackOverflow site, before I realised that this Unix StackExchange site existed, but received no answers yet; apologies to anyone who sees this twice. ]


title: How to share the clipboard betwen bash and X11

text: In this thread the top answer shows how to copy text that has been previously selected with the mouse on a gnome-terminal, to the clipboard in X11. My question is: Say I copy a piece of text from the terminal using bash set- mark and copy keyboard shortcuts (i.e. `set-mark` + `M-w`). Is it possible to share this clipboard with X11? **EDIT** : In the original question, I talked about sharing the clipboard with GNOME, but as Guilles points out below, GNOME doesn't specifically have a clipboard (it's general to X), so I have updated the question.


title: Is there way to sync the shell yank buffer and the clipboard?

text: In a terminal I copy a line by `Ctrl+a` and `Ctrl+k`. I want to copy the text into clipboard when another window become active so that I can use the text another application, like a text editor or a browser. Is there way to do it?


title: Humble Bundle 8, Capsized slow yet within system requirements

text: I just got the humble bundle 8, but when I tried to play Capsized, it was unplayably slow. Linux Mint 11.4. Here's my computer specs:               Processor: 2x Pentium(R) Dual-Core CPU E5200 @ 2.50GHz     Memory : 2051MB (700MB used)     OpenGL Renderer : Mesa DRI Intel(R) 945G GEM 20100330 DEVELOPMENT x86/MMX/SSE2      Looking at the hardware requirements for the bundle here: http://support.humblebundle.com/customer/portal/articles/1156426-humble-indie- bundle-8-system-requirements I thought I'd be able to play Capsized, which requires 2GHZ processor and 2GB of memory. No mention of graphics. Yeah, my graphics card is onboard intel, but is there something I'm missing here to make this game go at full speed?


title: Defragging an ext partition?

text: Why don't ext2/3/4 need to be defragmented? Is there no fragmentation at all?


title: Patching Linux kernel on-line (i.e. without rebooting)

text: Sorry - I don't remember the exact name. I know there is mechanism to patch the kernel at runtime by loading modules without need of the reboot as long as the structures involved are not affected. It is used by servers for security patches and recently by Ubuntu & Fedora.   1. What is the name of mechanism   2. Is there any how-to for hand-compiled kernels   3. Is it possible to automatically check if the change x.y.z.a -> x.y.z.a+1 changed any structure or not


title: Nested packages for different subdirectories in autoconf?

text: I have different subdirectories that need to be compiled in different ways. For example, some files needs to include some others using CFLAGS. However, CFLAGS can only be set in configuration files, so I guess I need multiple configure.ac's. Is it a good idea to use nested packages (as described on gnu.org) for this, or is this an overkill? Note: I call it overkill because the solution from gnu.org adds a README etc. into _every_ subdirectory. Can this be avoided?


title: What is a "kernel panic"?

text: What does it mean when your computer has a **"kernel panic"**? Does it equate to the windows BsoD? Also, what **methods, tips, tricks** are available to the user when a _kernel panic_ strikes?


title: Any other Linux application similar to Greyhole?

text: Is there any other Linux application similar to Greyhole? Preferably without relying on samba? I'm going to use it for a typical home server. The features that I want are what Greyhole has (from the link):   * JBOD concatenation storage pool   * Easily recoverable files I already tried LVM and RAID, but the drives aren't readable on their own.


title: Unable to 'make' anything.. Kernel-headers problem? Trying to get my RTL8723BE working

text: I'm a starting security/Linux student and I'm having headache-problems getting my wireless to work on Kali Linux. Recently I've bought a new laptop, to be specific the: **Lenovo IdeaPad Z50-70-01418NL** It comes with the wireless card: **Realtek RTL8723BE Wireless LAN 802.11n PCI-E** Lenovo only supports Windows, so I went searching for possibilities to get my wireless to work (After all, I've bought a laptop for a reason) I Really have googled everything, and because of that I'm losing track of what is relevant and what is not, what is the right way and what isn't. The https://github.com/lwfinger/rtl8723be shows the following line: _"Code for new variety of the 8723 PCI cards - temp until code added to kernel"_ So I assume that I must compile the driver and ultimately install the driver into my system as following:   1. command 'make' to compile the driver   2. get the driver in the right place   3. Profit! I try to 'make' the "rtl8723be" code but whatever I try it keeps giving me build errors. Since I have been trying almost anything in the hope it will work there is a long history of errors, but mostly the errors point at the line of:               $(MAKE) -C $(KSRC) M=$(PWD) modules      Ultimately I want to get my rtl8723be driver to work. If I use               ndiswrapper -i <.inf-file>'       It seems that ndiswrapper installs the .inf file and ndiswrapper -l is showing the driver. But I've red that you must use               modprobe ndiswrapper      This results in:               FATAL: Module ndiswrapper not found      ~~~~~~~~~~ EDIT ~~~~~~~~~~~~ So I have reinstalled the OS. (First tried to install kernel 3.15 but still no wifi adapter) Installed the needed kernel-headers. And I downloaded the new "rtl8723be" from https://github.com/lwfinger/rtlwifi_new (The new version fixes the bug in trx.c = Fix version number for _ieee80211_is_robust_mgmt_frame) When I try to use 'make' this results in the following:               root@Kratos:~/rtlwifi_new/rtl8723be# make     make -C /lib/modules/3.14-kali1-amd64/build M=/root/rtlwifi_new/rtl8723be modules     make[1]: Entering directory `/usr/src/linux-headers-3.14-kali1-amd64'       CC [M]  /root/rtlwifi_new/rtl8723be/dm.o       CC [M]  /root/rtlwifi_new/rtl8723be/fw.o       CC [M]  /root/rtlwifi_new/rtl8723be/hw.o       CC [M]  /root/rtlwifi_new/rtl8723be/led.o       CC [M]  /root/rtlwifi_new/rtl8723be/phy.o       CC [M]  /root/rtlwifi_new/rtl8723be/pwrseq.o       CC [M]  /root/rtlwifi_new/rtl8723be/pwrseqcmd.o       CC [M]  /root/rtlwifi_new/rtl8723be/rf.o       CC [M]  /root/rtlwifi_new/rtl8723be/sw.o       CC [M]  /root/rtlwifi_new/rtl8723be/table.o       CC [M]  /root/rtlwifi_new/rtl8723be/trx.o       LD [M]  /root/rtlwifi_new/rtl8723be/rtl8723be.o       Building modules, stage 2.       MODPOST 1 modules     WARNING: "rtl_btc_get_ops_pointer" [/root/rtlwifi_new/rtl8723be/rtl8723be.ko] undefined!       CC      /root/rtlwifi_new/rtl8723be/rtl8723be.mod.o       LD [M]  /root/rtlwifi_new/rtl8723be/rtl8723be.ko     make[1]: Leaving directory `/usr/src/linux-headers-3.14-kali1-amd64'      So what does this error mean? WARNING: "rtl_btc_get_ops_pointer" [/root/rtlwifi_new/rtl8723be I Have the feeling I'm almost there. I Even tried to copy both the driver and firmware to the following folders: /lib/modules/3.14-kali1-amd64/kernel/drivers/net/wireless/rtlwifi/rtl8723be/rtl8723be.ko /lib/firmware/rtlwifi/rtl8723befw.bin


title: apt-get returns strange error

text: I am on kali linux and when I run apt-get update it returns this:               W: Unknown flag value:  yes     W: You may want to run apt-get update to correct these problems      after running `apt-get update` several times it's still the same issue


title: Dual monitors + Parallels 8 + debian lxde

text: My system have two monitors (primary 1920 x 1080 and secondary 1680 x 1050) and on this runs Parallels 8 with Xubuntu 12.10 as guest system. Since old version of Xubuntu will not be maintained, I want to try Debian with LXDE environment. But I bounce to one problem, both monitors are merged into one. How can I configure debian to identificate two monitors.               xrandr: Failed to get size of gamma for output default     Screen 0: minimum 640 x 400, current 3600 x 1080, maximum 3840 x 1600     default connected 3600x1080+0+0 0mm x 0mm        1024x768       60.0          800x600        60.0          640x480        60.0          1024x640       60.0          1024x576       60.0          832x624        60.0          848x480        60.0          800x500        60.0          640x400        60.0          3840x1080      60.0          2560x1600      60.0          3600x1080      60.0*         2048x1536      60.0          1920x1200      60.0          1920x1080      60.0          1600x1200      60.0          1680x1050      60.0          1600x1000      60.0          1400x1050      60.0          1600x900       60.0          1344x1008      60.0          1280x1024      60.0          1440x900       60.0          1280x960       60.0          1344x840       60.0          1360x768       60.0          1280x800       60.0          1152x870       60.0


title: Configuring default static routes with RIPv2

text: I am currently working on an assignment managing a smaller virtual network with virtual box and tiny core Linux. (Using quagga) I am supposed to let RIP handle the default routing, though I cannot figure out how to do it. I've come across two commands that would do this, `default- information originate` and `redistribute static`. I did however not understand how these worked, even after searching some examples, which led me here. PS. The NAT connection comes in on gateway, and router3 is not connected to the network, so disregard that. ![The network in question](http://i.stack.imgur.com/I2pnW.png)


title: Tell Linux to use latest libusbx I have downloaded

text: Background, I'm trying to play with a Kinect camera and Python. When I tried to make freenect (manual install) on Ubuntu 12.04, it complained about undefined libusb_get_parent. However, it works fine on Ubuntu 14.04. Next I go to a Raspberry PI, and try to get that manual install to work there. No dice. Same libusb_get_parent complaint. So I apt-get update, upgrade, dist-upgrade, no dice. I try to get libusb-dev and all sorts of things. So I do `dpkg -s libusb-1.0-0-dev` on Ubuntu 12.02. It says it uses               Source: libusb-1.0      Version: 2:1.0.9~rc3-2ubuntu1      On Ubuntu 14.04 it says:               Source: libusbx     Version: 2:1.0.17-1ubuntu2      And finally on the Raspberry PI:               Source: libusbx     Version: 2:1.0.11-1      So I figure, if I can get a newer version of libusbx onto the Raspberry PI, I should at least get a little farther. I downloaded the latest libusbx here (http://sourceforge.net/projects/libusbx/files/releases/1.0.18/source/) And then did:               $ sudo su     $ ./configure && make && make install && sudo ldconfig      From the directory that I extracted. (It appeared to configure and make.) I again did dpkg -s libusb-1.0-0-dev thinking I'd now have my new 1.0.18 version, but that's not the case. It's still 1.0.11. I'm sure it's something simple I'm missing. Thanks.


title: Fedora 16 ssh over the internet/home network help. Same computer ok

text: I first posted this on serverfault, but this forum seem to be more appropriate. http://serverfault.com/questions/345471/fedora-16-ssh-over-the- internet-home-network-help-same-computer-ok I think I have set up the ssh servers on my home machine, but I don't know how to ssh into it from a client computer on the same network, let alone over the internet. From the same server, I can do: ssh user@server It has a static ip 192.168.1.100 which I have added to /etc/hosts. And everything is fine. If I do so from the client in the same network, I can "ping host", but I can't ssh. It just stays stuck when I type "ssh server". Also, how would I connect over the internet? I have a "name@dyndns.org" setup for the dynamic IP, but I wouldn't know how to ssh into that and then have it be routed to the 192.168.1.100 computer. Appreciate any help! Edit: The things I researched are already written (starting sshd service, editing /etc/hosts, pinging). I haven't been able to find any further info on google, as I'm not sure what I need to look for. Edit2: This is the output from client of "ssh -vvv server". Thanks.               OpenSSH_5.6p1, OpenSSL 1.0.0e-fips 6 Sep 2011     debug1: Reading configuration data /etc/ssh/ssh_config     debug1: Applying options for *     debug2: ssh_connect: needpriv 0     debug1: Connecting to host [192.168.1.100] port 22.     debug1: Connection established.     debug3: Not a RSA1 key file /home/user/.ssh/id_rsa.     debug2: key_type_from_name: unknown key type '-----BEGIN'     debug3: key_read: missing keytype     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug2: key_type_from_name: unknown key type '-----END'     debug3: key_read: missing keytype     debug1: identity file /home/user/.ssh/id_rsa type 1     debug1: identity file /home/user/.ssh/id_rsa-cert type -1     debug1: identity file /home/user/.ssh/id_dsa type -1     debug1: identity file /home/user/.ssh/id_dsa-cert type -1


title: tcplay: cannot mount filesystem on TrueCrypt volume with hidden volume protection after mapping it

text: I am using tcplay to work with a Truecrypt volume with a 4 GB hidden volume located at the final gigabyte. When I mount either the normal volume or the hidden volume, they mount just fine. However, when I mount the normal volume with hidden volume protection (option `\--protect-hidden`, or in short form, `-e`), this is what I get:               [root@oc2222167007 /media]# tcplay -m truecrypt2 -e -d /dev/loop0     Passphrase: <password of external volume>     Passphrase for hidden volume: <password of hidden volume>     All ok!     [root@oc2222167007 /media]# parted -l | grep -B1 -A5 truecrypt          Error: /dev/mapper/truecrypt2: unrecognised disk label     <output ommited>      When I mount the filesystem with `-e`, it won't pick it up...               [root@oc2222167007 /media]# dmsetup remove truecrypt2     [root@oc2222167007 /media]# tcplay -m truecrypt2 -d /dev/loop0     Passphrase: <password of external volume>     All ok!     [root@oc2222167007 /media]# parted -l | grep -B1 -A5 truecrypt     Model: Linux device-mapper (crypt) (dm)     Disk /dev/mapper/truecrypt2: 4295MB     Sector size (logical/physical): 512B/512B     Partition Table: loop          Number  Start  End     Size    File system  Flags      1      0.00B  4295MB  4295MB  ext4      ...but if I mount the external volume just like that, it works fine. What's happening?


title: Stopping e2fsck early

text: I had some drive errors so I ran `e2fsck -cckty` to find bad blocks on a 2TB drive. It found some bad blocks at the beginning, but hasn't found any in a day and a half. `e2fsck` has been running for 40 hours and is 53% done. If I `Ctrl`-`C` it, will it update the bad blocks information in the filesystem to reflect the bad blocks it found at the beginning?


title: Testing if a port was forwarded correctly in Ubuntu

text: I have a Ubuntu box connected to a wifi router. This wifi router is connected to a d-link adsl modem/router. I am preparing this Ubuntu box to run a server that will use some special ports in UDP and TCP. I have setup this wifi router to put my Ubuntu box on a DMZ. So, the Ubuntu is on the DMZ of the wifi router, what means it is still on the local network of the D-link. The big question is: how do I test, using Ubuntu, if these special ports are getting thru? I mean: there is some command I can type to check if a port is getting thru and certify that the computer is really on DMZ? Part on the premise that the D-link is port-forwarding the ports correctly.


title: How do I create a structured list of all the files and directories under a particular directory (recursively)?

text: I need to have an "image" of a file system without actual contents of the files - just all the names and the structure, so that I can read the file and know what files were stored there and how were they located. As always in these kinds of cases, I tend to believe that there is a beautiful "Unix way" to achieve this with a combination of some standard GNU command-line utilities. Am I right? What is it?


title: Capture user input while doing other things

text: Is there a way to have the output of a subprocess (something other than 'sleep' below) be dovetailed with the output from a foreground command-loop? For example:               while true     do         echo "updating screen..."         sleep 3 & # Replace with command which takes some time and updates the screen         read -s -n 1 -p "Input: " input         case "$input" in         q)             exit         ;;         f)             echo 'foo'         ;;         esac     done


title: really basic bootstrap logger - (preferably syslog, cascade to http/raw)

text: I have a bootstrap shell script that is run as the very first thing when a fresh Linux server is booted up to multi-user mode with networking. Once it is complete, I would like to report the error status to a central loghost server, which is currently running syslog-ng with udp/tcp port 514 and a webserver on port 80 (hence I could use php/perl to listen to http formatted messages...) However I can't install any packages, as the build is specified by the customer, and also I would like to not make any changes to the config files. Hence the syslog is pristine, and possibly wget/curl are not installed. I was going to do something like;               exec 3<>/dev/tcp/www.google.com/80     echo -e “GET / HTTP/1.1\nhost: http://loghost.local/message\n\n” >&3      but it turns out these devices are disabled on debian boxes. I can obviously cascade the different options, eg;               if [ -x wget ]; then       echo "using wget to post message"     elif [ -x curl ]; then       echo "using curl to post message"     elif [  ]; then       exec 3<>/dev/tcp/loghost.local/80       echo -e “GET / HTTP/1.1\nhost: http://loghost.local/message\n\n” >&3     else       echo nc ## some netcat command so send stuff to udp 514...     fi      logger looks like it only supports local and socket connections, and would presumably suffer from the debian restriction I appear to have many options, as I can configure many things on the service. one such **_very silly idea_** was to configure the local nameserver to cache missing records for certain domains, and have the bootstrap script run something like               getent hosts logmessage.sourceserver.mydomain.com      and presumably, I could parse the status from the named log file.... ;-) obviously netcat is an option if it is installed, however some of the server builds aggressively remove stuff like netcat because it is so flexible. Anyway, this problem is more for informational interest rather than practical purposes, because I can swap the syslog.conf file out temporarily, but it would be interesting to do it with no touching on the remove server...


title: Opensuse 12.3 icewm-session to gnome

text: I'm using icewm session but I would like to install gnome and set it to default desktop environment but I would like to not erase the xsession that I actually have (in case something screw up and not redump ^^"). My .xsession : /usr/bin/icewm-session


title: How would I run Django and LAMP on different subdomains, but on the same Apache server?

text: I am currently working on a development project where I need to run four different PHP programs (both with MySQL backends) and one Django project. Current Plan:   * XenForo (forums.domain.com) [PHP Forum]   * OSQA (qa.domain.com) [Django/Python QA Site]   * PHPFox (social.domain.com) [PHP Social Network]   * BugTrackr (bugs.domain.com) [PHP Bug Tracker, custom made]   * Wordpress (www.domain.com) [PHP CMS] How would this be possible so that they could all coexist on the same Apache, play nice with each other, and not crash the system every _n_ hours?


title: Selecting different accounts in a mutt send-hook

text: I use the instructions outlined here to use different accounts in `mutt`. I'd like to be able to select different accounts depending on sender--`send-hook` seems like the right way to go. ` send-hook wife@mydomain.com 'source ~/.mutt/account.personal' ` This works fine to send mail, but if I've done this from my work account, I'm still in my work context (in my work `INBOX`), but `folder`, `imap_user`, `smtp_url` and friends are all set to my personal account. Is there a hook that will fire _after_ a mail is sent so I can affect all my work settings?


title: Unrar local files to remote server

text: I have two Linux servers, one which has several RAR files and another empty one. I would like to extract the archives and move the content to Server 2. The problem is: I do not have enough storage to extract the files at Server 1. Also I cannot use SSHFS, as no FUSE modules can be loaded on Server 1. I have seen that `unrar` has the `p` option which sends the output to STDOUT. Is it somehow possible to use this to solve the problem?


title: to make password less login to same linux server with same user

text: I have performed below steps to make password less login               ssh-keygen -t rsa          copy ~/.ssh/id_rsa.pub into authorized_keys          chmod 600 ~/.ssh/authorized_keys      but still unable to make password less login. debug logs as below               [amt@Test-mViewReport:/apps/amt]> ssh -v amt@10.114.8.161     OpenSSH_4.3p2, OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008     debug1: Reading configuration data /etc/ssh/ssh_config     debug1: Applying options for *     debug1: Connecting to 10.114.8.161 [10.114.8.161] port 22.     debug1: Connection established.     debug1: identity file /apps/amt/.ssh/identity type -1     debug1: identity file /apps/amt/.ssh/id_rsa type -1     debug1: identity file /apps/amt/.ssh/id_dsa type -1     debug1: loaded 3 keys     debug1: Remote protocol version 2.0, remote software version OpenSSH_4.3     debug1: match: OpenSSH_4.3 pat OpenSSH*     debug1: Enabling compatibility mode for protocol 2.0     debug1: Local version string SSH-2.0-OpenSSH_4.3     debug1: SSH2_MSG_KEXINIT sent     debug1: SSH2_MSG_KEXINIT received     debug1: kex: server->client aes128-ctr hmac-md5 none     debug1: kex: client->server aes128-ctr hmac-md5 none     debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent     debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP     debug1: SSH2_MSG_KEX_DH_GEX_INIT sent     debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY     The authenticity of host '10.114.8.161 (10.114.8.161)' can't be established.     RSA key fingerprint is 1e:8a:ad:78:86:1d:59:50:75:b1:8f:a3:8a:3c:9b:b4.     Are you sure you want to continue connecting (yes/no)? yes     Failed to add the host to the list of known hosts (/apps/amt/.ssh/known_hosts).     debug1: ssh_rsa_verify: signature correct     debug1: SSH2_MSG_NEWKEYS sent     debug1: expecting SSH2_MSG_NEWKEYS     debug1: SSH2_MSG_NEWKEYS received     debug1: SSH2_MSG_SERVICE_REQUEST sent     debug1: SSH2_MSG_SERVICE_ACCEPT received     debug1: Authentications that can continue: publickey,gssapi-with-mic,password     debug1: Next authentication method: gssapi-with-mic     debug1: Unspecified GSS failure.  Minor code may provide more information     No credentials cache found          debug1: Unspecified GSS failure.  Minor code may provide more information     No credentials cache found          debug1: Unspecified GSS failure.  Minor code may provide more information     No credentials cache found          debug1: Next authentication method: publickey     debug1: Trying private key: /apps/amt/.ssh/identity     debug1: Trying private key: /apps/amt/.ssh/id_rsa     debug1: Trying private key: /apps/amt/.ssh/id_dsa     debug1: Next authentication method: password     amt@10.114.8.161's password:


title: Shortest way to extract last 3 characters of base (minus suffix) filename

text: I'm trying to set a variable in an sh script to the last 3 characters of the base name of a file (by base name I mean without the path _and_ without the suffix). I've succeeded in doing this but, purely out of curiosity, I'm wondering if there is a shorter, single command I can use. Originally I had a one-liner with `awk`, but it was rather long. Currently I have this two-line script (assuming a complete filename is in `$1`):               filebase=`basename "$1"`     lastpart=`echo -n ${filebase%.*} | tail -c3`      So for example, _"/path/to/somefile.txt"_ ends up with _"ile"_ in `$lastpart`. Can I somehow combine `basename` and the bit to strip the suffix into a single command, and is there a way to send it to `tail` (or something else I can use) without using a pipe? The suffix is unknown so I can't base it as a parameter to `basename`. The main goal isn't actually so much to be as short as possible, as to be as readable at a glance as possible. The actual context of all of this is this question on Superuser, where I'm trying to come up with a reasonably simple answer.


title: How to get EDID for a single monitor?

text: Pending an answer to xrandr detects amplifier as monitor a possible workaround is to blacklist devices with specific EDIDs. Unfortunately `xrandr --verbose` prints everything in a format which is cumbersome to parse and doesn't support querying single devices, and `get-edid`'s output doesn't seem to be easy to map to `xrandr`'s monitor IDs (for example `DVI-1`). **Is there some way to get an _easily parseable_ EDID for a _single_ monitor?**


title: Using a glob pattern as an argument to "which"

text: Is it possible to use the `which` command on a glob pattern to return multiple results? For example, I want to know the full path of all my `latex` commands. I can try:               [lucas@lucas-ThinkPad-W520]/home/lucas$ which latex     /usr/bin/latex      or:               [lucas@lucas-ThinkPad-W520]/home/lucas$ which pdflatex      /usr/bin/pdflatex      or:               [lucas@lucas-ThinkPad-W520]/home/lucas$ which xelatex      /usr/bin/xelatex      but I cannot use:               [lucas@lucas-ThinkPad-W520]/home/lucas$ which *latex      which returns nothing. Any suggestions on how to use a glob pattern with the `which` command?


title: Desktop environment that just starts a full screen terminal

text: I have the following xsession file:               [Desktop Entry]                                                                      Name=...     Comment=This session will start ...     Exec=????     TryExec=???     Type=????      After choosing my desktop environment and after logging in I want to see a full screen terminal running `echo "Hello World"` command. What values have I pass to `Exec`, `TryExec` and `Type` field fields? I already tried this:               Exec=gnome-terminal --full-screen -x "echo 'hello'"      But the terminal doesn't start in full screen mode. When I run this command in normal session it starts correctly.


title: Text substitution inside compressed files

text: I have several zip files, each one having several text files inside them. I want to substitute all occurrences of `a` in these text files with `b`, and leave them zipped with the same structure. If I just wanted to find the occurrences of `a`, I know I could use the `zgrep` command, but I also want to perform string substitution. Unfortunately, there is no `zsed` command. Do I have no choice but to write a script with a loop?


title: Cat and Less give different output

text: I executed the following command      `# top > /home/user/top_output.txt`      Nothing Happened for a while and then i pressed `Ctrl+C`. When i checked the file that was created, it had the contents in it. So i fired ` cat` command on it and it gave me this output.   ![cat output of the text file](http://i.stack.imgur.com/X0tc1.jpg)    But when i tried the same thing with the `less` command i got this. ![less output of the files](http://i.stack.imgur.com/tLNw3.jpg)    According to this post the job of `Cat,less or More` is just to display the contents of the file not translating the encoding. Can someone please tell me what's happening here?   P.S: I'm currently using Fedora 19


title: GRUB-EFI installation fails while installing Kali Linux in external hard disk

text: I was trying to install Kali Linux from a live USB to an 1TB external hard disk. At first I was unable to boot the live USB with my H2O Insyde BIOS. Then I converted my pen drive partition table to GPT and created a 500MB FAT32 partition labeled EFI and copied `BOOTX64.efi` and `grubx64.efi` to the directory boot inside my EFI partition. I created the live USB using a Ubuntu in a VirtualBox (when i created with unetbootin and universal installer, it doesn't boot.) and then only I succeeded to boot the live USB. Then I tried to install Kali Linux in my external hard disk. the whole installation procedure succeeds with both guided partition and manual partition, but GRUB installation fails. I referred online forums and wikis to fix that, but nothing works. I tried to install GRUB-EFI manually from terminal using the live USB. I followed wiki.archlinux.org and How to reinstall GRUB2 EFI?, but both have failed. for the 1st link, i'm succeeding but same unable to boot to Kali linux. For the second, when I try to install grub-efi package after mounting the partitions and doing `chroot`, it asks to insert the Kali Linux CD/DVD in cdrom0 partition. As I'm installing from a live USB, I don't have it in CD/DVD. I tried to do the same process what I've followed for my live USB, creating a EFI FAT32 partition in the external HDD and copying those 2 files, but no success. I aasked a question here before. Got suggestion to edit the hard coded UEFI- BIOS. but I want to install the whole linux os with boot loader and EFI partition, all in my external HDD. and set the 1st boot device as external device. So when my HDD is plugged in, it'll boot from linux else from Windows 7. As i've succeeded in booting the live USB, i guess, there is no problem with the hard coded UEFI-BIOS. I tried the same process with Ubuntu by creating a Live USB, but the installation doesn't proceeds after it asks to select the network during installation. Though I select to not use the netwrok or use the network, it doesn't proceed to the partitioning. I got another suggestion to install the linux using BIOS in legacy mode and then install the GRUB-EFI to convert it to boot using UEFI. But with my GPT partition, it doesn't boot in Legacy mode and with my MBR partition it doesn't boot in UEFI. So when I'll install using Legacy mode, I can't be able to boot in UEFI without cleaning the installation and converting the disk to GPT partition. So it's of no use. Can anybody please help? my hard disk is 1TB Seagate. (converted to GPT partition.)


title: Can't get Wireshark to run as user on CentOS

text: It's the first time I'm installing and configuring Wireshark in a rpm-based distro. In the past I've installed it properly on Ubuntu, Mint or Debian. Don't know why, but it seems I cannot run it as standard user. I've done the process of creating the wireshark group and adding the user to that group and then change the group of dumpcap to wireshark, but no way, it doesn't work. In .deb systems I haven't had any problem following such steps, so don't know what could be missing. Thoughts?


title: Overwritten MBR: Is partial/complete recovery possible?

text: I have a Sony VIAO laptop setup as dual boot (Ubuntu 12.10/Windows 7). Since I wanted to try Archlinux, I installed VirtualBox in Ubuntu. To create a bootable USB stick (from the ISO image on my hard drive), I followed the instructions from archlinux installation guide. However, accidentally gave the following command:               sudo dd bs=4M if=/path/to/archlinux.iso of=/dev/sda && sync      Note `/dev/sda` instead of `/dev/sdb`. So the MBR was overwritten here. BAD mistake. Did not realise the mistake at that time and tried to install archlinux in the virtualbox (allocated 8GB of disk space), couldn't complete the process and shutdown. Now, after booting, I get the first screen of the archlinux installation process. `df` only shows various partitions made during the archlinux installation process of 8GB of the total 320 GB harddisk. I had not taken any backup of the MBR. Is there a way to restore the MBR or salvage some data? Devendra


title: What is the equivalent of Active Directory on Linux

text: I have a couple of machines at home (plus a number of Linux boxes running in VMs) and I am planning to use one of them as a centralized file server. Since I am more a Linux user rather than a sysadmin, I'd like to know what is the equivalent of, let's say "Active Directory"? My objective is to have my files in any of the machines that I logon in my network.


title: Merging two directory without copying the files

text: Let's say I have as follows :               Folder A         C1             file a         A2          Folder B          C1          B2              file b          B3      What I want is to merge these two folders, which would give me :               Folder C         C1         A2         B2         B3      Notice I didn't write `file a` and `file b`. I only want to merge the architecture. Each repository contains different files and I don't want them to be added to the merged directory. As a consequence, `mv Folder\ A/* Folder\ B` is not adequate. Do you guys see a way to do so ?


title: Public key for git-.....rpm is not installed

text: When attempting to install git (and probably other packages), I get this error:               $ sudo yum -y install git          Installing:      git                       x86_64           1.7.11.3-1.el6.rfx           rmit-res-rhel6-local                             7.5 M     ...     Downloading Packages:     warning: rpmts_HdrFromFdno: Header V3 DSA/SHA1 Signature, key ID 6b8d79e6: NOKEY               Public key for git-1.7.11.3-1.el6.rfx.x86_64.rpm is not installed      I see from other questions (Public key not found for RPM) that the answer will probably be:               sudo rpm --import <SOMEKEY>      But what is the value of SOMEKEY here? Also, what happened to my system to make this happen? What went wrong? (This is a RHEL VM provisioned by a university ITS group. I have root access [obviously] but don't know its setup terribly well.)


title: Increment look back value within a configuration file daily +1

text: I have a configuration file that needs to be incremented daily. E.g.               report.lookback.days.to.retrieve.data=60      This file contains multiple entries such as the one above that contains different values. I need to open the property file search for this specific entry, and increment the value by +1 each day for a total of 30 days. E.g.               report.lookback.days.to.retrieve.data=61          report.lookback.days.to.retrieve.data=62          report.lookback.days.to.retrieve.data=63      I am new to scripting, and I'm not sure what method would accomplish this task. Should I use awk, sed, implement a counter, or a combination of methods?


title: Extend one alias in second alias

text: It is possible to do this:               alias tm=cd /opt/tomcat     alias tmbin=tm/bin          $ tmbin     $pwd        /opt/tomcat/bin      ?? I know that I can do:               alias tmbin=tm;cd bin


title: Smallest Linux/BSD distribution for IPv6 testing?

text: I'd like to do some IPv6 testing at home, using VirtualBox. I could create a few VMs and leave it at that, but I feel that to really test IPv6 you have to scale up to many nodes. So I wonder: what's the smallest distribution of Linux or BSD that I could use for this? I only need IPv6 support, a shell and a few net utilities (ping, telnet, nslookup/dig, and little more). My aim is to create many small VMs, ideally with RAM-backed storage (I've got 12GB of RAM, and using multiattach images I should be able to store them in tmpfs for quicker access) and little RAM (<=64MB). Then I'd unleash them against some radvd and/or dhcp6 server to test IPv6 stuff.


title: How to run a program in a clean environment in bash?

text: I want to run a program in an empty environment (i.e. with no envariables set). How to do this in bash?


title: How to effectively use screen and SSH?

text: I'd like to configure SSH and screen such that a login will always reattach to a screen session. Ideally, that session would not quit but detach when I press C-d. How can this be achieved? And what other useful settings are there to make my SSH-life easier?


title: bash function execution from command line

text: I love to play with bash script a lot. But I want to enhance the way I use bash script. I have a script(`nepleaks.sh`) as below used during my programming,               ~   1 clean(){                                                                                ~   2  lein clean                                                                                +   3  lein deps                                                                                +   4 }             5                                                                                6 runApp(){                                                                                7   echo("[info] : make sure you've started neo4j.")                                                          8   #lein run -m nepleaks-engine.core           ............        34                 35 clean                                                                                36 #runApp        When I need to `clean` my project, I have been commenting on `runApp` and vice-versa and then fire               $./nepleaks      Now, I want to amend this to something like               $ nepleaks clean or $ nepleaks runApp      I didn't like idea of sourcing `nepleaks.sh` and then call `clean` or `runApp`. Here's one of the lovely thing I used https://github.com/cosmin/s3-bash/blob/master/s3-get, I am looking into but their script looked complex to me. They support something as below,               s3-get -k {accesskey} -s /{path}/{secretid} /{bucketname}


title: Do VmPeak & VmHWM have any measurement periods?

text: While reading kernel documentation I came across VmPeak & VmHWM, and it's a bit unclear to me. VmPeak in `/proc/<pid>/status` is described to be peak virtual memory size. Peak for what period? Is this period the same for VmHWM, aka peak resident set size ("high water mark")?


title: xfce4-power-manager not updating; ACPI finding an unknown battery but working fine?

text: I recently upgraded my Asus S56CA Ultrabook and unfortunately my battery indicator in xfce4 stopped working. I am running Debian 8 (Jessie). `uname -a` gives me this:               Linux 3.14-2-amd64 #1 SMP Debian 3.14.13-2 (2014-07-24) x86_64 GNU/Linux      The battery indicator in the system tray is not updating at all to anything. If I start the computer with the AC plugged in, it will continue to say it is plugged in at the same percentage it was at when I started my computer even though I unplugged the cord. Running `xfce4-power-manager --debug` returns this message:               Xfce Power Manager: Another power manager is already running      Despite the message, I am almost positive I have no other power manager running on my computer (although I do not know how to check to make sure this is the case). I have tried to purge and reinstall acpi* and xfce4-power-manager* with no success. Running `acpi -V` gives me this when the AC cord is plugged in:               Battery 0: Unknown, 97%     Battery 0: design capacity 2950 mAh, last full capacity 2424 mAh = 82%     Adapter 0: on-line     Thermal 0: ok, 51.0 degrees C     Thermal 0: trip point 0 switches to mode critical at temperature 108.0 degrees C     Thermal 0: trip point 1 switches to mode passive at temperature 110.0 degrees C     Cooling 0: x86_pkg_temp no state information available     Cooling 1: TEFN no state information available     Cooling 2: T_VR no state information available     Cooling 3: TAMB no state information available     Cooling 4: TSKN no state information available     Cooling 5: intel_powerclamp no state information available     Cooling 6: Processor 0 of 3     Cooling 7: Processor 0 of 3     Cooling 8: Processor 0 of 3     Cooling 9: Processor 0 of 3     Cooling 10: LCD 0 of 100      and when the cord is unplugged, `acpi -V` gives me this:               Battery 0: Discharging, 97%, 02:59:50 remaining     Battery 0: design capacity 2950 mAh, last full capacity 2424 mAh = 82%     Adapter 0: off-line     Thermal 0: ok, 49.0 degrees C     Thermal 0: trip point 0 switches to mode critical at temperature 108.0 degrees C     Thermal 0: trip point 1 switches to mode passive at temperature 110.0 degrees C     Cooling 0: x86_pkg_temp no state information available     Cooling 1: TEFN no state information available     Cooling 2: T_VR no state information available     Cooling 3: TAMB no state information available     Cooling 4: TSKN no state information available     Cooling 5: intel_powerclamp no state information available     Cooling 6: Processor 0 of 3     Cooling 7: Processor 0 of 3     Cooling 8: Processor 0 of 3     Cooling 9: Processor 0 of 3     Cooling 10: LCD 0 of 100      I am not sure if this is an error as well, but is the battery supposed to be displayed as unknown? I would like to have my **battery indicator fixed** first and foremost, then any other issues would be bonus. Any alternatives for a battery indicator would be greatly appreciated.


title: Permission denied when trying to run script as other user

text: I'm trying to run a script as another user that starts a piece of software (Etherpad), which is run like so (from root): `su -c "/var/www/etherpad- lite/bin/run.sh" -s /bin/bash etherpad` but I'm getting the following error: `bash: /var/www/etherpad-lite/bin/run.sh: Permission denied` This had previously worked perfectly, and only stopped working after I installed a bunch of things for another project I'm working on, none of which should have affected etherpad. /var/log/auth.log shows this:               Aug 12 19:59:21 bhs1 su[7289]: Successful su for etherpad by root     Aug 12 19:59:21 bhs1 su[7289]: + /dev/pts/1 root:etherpad     Aug 12 19:59:21 bhs1 su[7289]: pam_unix(su:session): session opened for user etherpad by root(uid=0)     Aug 12 19:59:21 bhs1 su[7289]: pam_unix(su:session): session closed for user etherpad      I've done some searching and I found a couple of things that could cause this, but none are relevant to my problem:   * The file is chmodded to 777 (`-rwxrwxrwx`) and it's owned by the etherpad user. I only changed it to 777 to make sure it wasn't a permissions issue, it was something like 700 before.    * The file system doesn't have noexec enabled I'm running Debian 7.6 on a dedicated server.


title: startx cannot open /dev/fb0: Permission denied

text: When I try to start my WM using `startx`, I am unable to because the permission of something called `/dev/fb0` are restricted. From `home/user/.local/share/xorg/Xorg.0.log`:               [   198.569] (--) controlling tty is VT number 1, auto-enabling KeepTty     [   198.569] (II) Loading sub module "fbdevhw"     [   198.569] (II) LoadModule: "fbdevhw"     [   198.569] (II) Loading /usr/lib/xorg/modules/libfbdevhw.so     [   198.570] (II) Module fbdevhw: vendor="X.Org Foundation"     [   198.570]    compiled for 1.16.0, module version = 0.0.2     [   198.570]    ABI class: X.Org Video Driver, version 18.0     [   198.570] (EE) open /dev/fb0: Permission denied     [   198.570] (WW) Falling back to old probe method for fbdev     [   198.570] (II) Loading sub module "fbdevhw"     [   198.570] (II) LoadModule: "fbdevhw"     [   198.570] (II) Loading /usr/lib/xorg/modules/libfbdevhw.so     [   198.570] (II) Module fbdevhw: vendor="X.Org Foundation"     [   198.570]    compiled for 1.16.0, module version = 0.0.2     [   198.570]    ABI class: X.Org Video Driver, version 18.0     [   198.571] (EE) open /dev/fb0: Permission denied      Now of course I can change it using chmod, but I shouldn't have to do that every time I reboot the computer, so it seems like something is wrong / I haven't set up something properly. What should I do to fix this?


title: upstart script that runs another script, constantly launching

text: I have an `expect` script named `ex.sh` that interacts with another script 'vpn.sh'. the `vpn.sh` script runs a vpn client so I need Upstart to automatically start it when my server reboots. Currently I have an upstart job 'myjob.conf' on /etc/init/myjob.conf and what it does is just run `ex.sh`. The problem is that when I see the logs for /var/log/upstart/ex I see that, obviously, ex.sh is being run every minute because the script finish running and starts again, but I don't need this becaus I only need to launch the vpn process once. How can I fix this ?


title: How many volume groups can be created in physical volume?

text: I want to know the details regarding LVM: please provide some link regarding Linux to study and understand it.


title: Problem with log in after change locale, maybe relate to PAM

text: System information: Debian Wheezy   CPU: intel core i7 3770 I initially only had `en_US.UTF-8` as the default language. This morning, I changed the `/etc/local.gen` file and un-comment the `zh_CN.UTF-8` and run `locale-gen`:               # nano /etc/local.gen     # locale-gen      After that, I reboot the system, then I cannot see the log in screen. It is a black screen without any word, any sign or anything on the screen Then, I log into the recovery mode, and check the locale, I saw this               locale          LANG=     LC_CTYPE="POSIX"     LC_NUMERIC="POSIX"     LC_TIME="POSIX"     LC_COLLATE="POSIX"     LC_MONETARY="POSIX"     LC_MESSAGES="POSIX"     LC_PAPER="POSIX"     LC_NAME="POSIX"     LC_ADDRESS="POSIX"     LC_TELEPHONE="POSIX"     LC_MEASUREMENT="POSIX"     LC_IDENTIFICATION="POSIX"     LC_ALL=      I used `dpkg-reconfigure locales` to set the locale to `en_US.UTF-8` again (disable `zh_CN.UTF-8`), but the locale still stays in POSIX.               dpkg-reconfigure      I reinstalled the locale by using `dpkg --reinstall install locales`. It didn't help either.               dpkg --reinstall install locales      I think the default locale being set to POSIX might be the problem. Then I edit the `.bashrc` file (for both root and my account) and added               # nano ~/.bashrc      added               export LC_ALL= "en_US.UTF-8"     export LANG = "en_US.UTF-8"     export LANGUAGE = "en_US.UTF-8"      Now I can see all locale setting being changed to `en_US.UTF-8` but I still cannot see the log in page. I did some search, and guess might be related to this bug, which is an really old issue. http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=330500 I looked at it, but don't know how to use it. And this is highly possibly related to PAM. What else can I do? * * * **Update** , I have exported the logs. In the auth.log, I saw the following,               Jan 21 10:09:13 QLin gnome-keyring-daemon[3864]: couldn't allocate secure memory to keep passwords and or keys from being written to the disk     ...     ...     Jan 21 10:14:18 QLin polkitd(authority=local): Unregistered Authentication Agent for unix-session:/org/freedesktop/ConsoleKit/Session2 (system bus name :1.58, object path /org/gnome/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8) (disconnected from bus)      All log files can be found at dropbox


title: Static IP addressing issue in Ubuntu on BeagleBoneBlack Rev C

text: I have my BBB configured to use a static IP address using the following in the file /etc/network/interfaces:               allow-hotplug eth0     iface eth0 inet static         address 192.168.0.1         netmask 255.255.255.0         network 192.168.0.0      This seems to work ok on boot, but when the ethernet cable is unplugged and then plugged back in, I lose the IP address. Any ideas what's going on here? Another weird symptom: If I boot the BBB with the network cable unplugged, but the switch it's plugged into off, I'll get my static IP. But, when I turn the switch on, I'll get a DHCP-assigned address. This is even though I have it configured with a static IP address. One last thing. If I ifdown etho, the interface will be gone when I do an ifconfig. If I wait a few seconds, though, and then re-run ifconfig, it will reappear, without an IP address. (Before I disabled IPv6, I used to get a IPv4 DHCP address in this case... weird). When that happens, I get a message like this in /var/log/messages:               Apr 23 20:32:06 beaglebone kernel: [  737.170172] libphy: 4a101000.mdio:00 - Link is Up - 100/Full     Apr 23 20:32:06 beaglebone kernel: [  737.170304] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready      Here's my uname -a:               root@beaglebone:/etc# uname -a     Linux beaglebone 3.8.13-bone47 #1 SMP Fri Apr 11 01:36:09 UTC 2014 armv7l GNU/Linux      Any ideas what's going on here?


title: Installing Citrix receiver on 64bit Debian Wheezy

text: I am trying to install Citrix receiver v. 13 on my 64 bit Debian Wheezy. I tried both amd64 as well as i386 packages (in multiarch), but I fail. **i386 version first**               The installation looks like this:     root@grzes:/home/ga/Downloads# dpkg -i icaclient_13.0.0.256735_i386.deb      Selecting previously unselected package icaclient.     (Reading database ... 338506 files and directories currently installed.)     Unpacking icaclient (from icaclient_13.0.0.256735_i386.deb) ...     dpkg: dependency problems prevent configuration of icaclient:      icaclient depends on libxmu6.      icaclient depends on libxerces-c3.1.      icaclient depends on libcurl3 (>= 7.19.1).      icaclient depends on libwebkit-1.0-2 | libwebkitgtk-1.0-0.          dpkg: error processing icaclient (--install):      dependency problems - leaving unconfigured     Processing triggers for gnome-menus ...     Processing triggers for desktop-file-utils ...     Processing triggers for menu ...     Errors were encountered while processing:      icaclient      When I try to fix the problem, I get:               root@grzes:/home/ga/Downloads# apt-get -f install     Reading package lists... Done     Building dependency tree            Reading state information... Done     Correcting dependencies... Done     The following packages were automatically installed and are no longer required:       glib-networking:i386 libcurl3:i386 libdbus-glib-1-2:i386 libgail18:i386 libhunspell-1.3-0:i386 libproxy0:i386 librtmp0:i386 libsoup2.4-1:i386 libssh2-1:i386 libxerces-c3.1:i386 libxmu6:i386     Use 'apt-get autoremove' to remove them.     The following extra packages will be installed:       libcurl3:i386 libicu48:i386 librtmp0:i386 libssh2-1:i386 libxerces-c3.1:i386 libxmu6:i386     The following packages will be REMOVED:       enchant icaclient:i386     The following NEW packages will be installed:       libcurl3:i386 libicu48:i386 librtmp0:i386 libssh2-1:i386 libxerces-c3.1:i386 libxmu6:i386     0 upgraded, 6 newly installed, 2 to remove and 0 not upgraded.     1 not fully installed or removed.     Need to get 6,560 kB of archives.     After this operation, 3,090 kB of additional disk space will be used.     Do you want to continue [Y/n]?      Basically it is trying to fix the problem by removing the package I am trying to install. Now this might explain a bit why:               root@grzes:/home/ga/Downloads# apt-get install     Reading package lists... Done     Building dependency tree            Reading state information... Done     You might want to run 'apt-get -f install' to correct these.     The following packages have unmet dependencies:      icaclient:i386 : Depends: libxmu6:i386 but it is not installed                       Depends: libxerces-c3.1:i386 but it is not installed                       Depends: libcurl3:i386 (>= 7.19.1) but it is not installed                       Depends: libwebkit-1.0-2:i386 but it is not installable or                                libwebkitgtk-1.0-0:i386 but it is not installed                       Recommends: hptc-ica-support:i386 but it is not installable     E: Unmet dependencies. Try using -f.      **amd64 version**               root@grzes:/home/ga/Downloads# dpkg -i icaclient_13.0.0.256735_amd64.deb      Selecting previously unselected package icaclient.     (Reading database ... 338506 files and directories currently installed.)     Unpacking icaclient (from icaclient_13.0.0.256735_amd64.deb) ...     dpkg: dependency problems prevent configuration of icaclient:      icaclient depends on libc6-i386 (>= 2.7-1); however:       Package libc6-i386 is not installed.      icaclient depends on ia32-libs; however:       Package ia32-libs is not installed.      icaclient depends on lib32z1; however:       Package lib32z1 is not installed.      icaclient depends on lib32asound2; however:       Package lib32asound2 is not installed.      icaclient depends on nspluginwrapper; however:       Package nspluginwrapper is not installed.          dpkg: error processing icaclient (--install):      dependency problems - leaving unconfigured     Processing triggers for gnome-menus ...     Processing triggers for desktop-file-utils ...     Processing triggers for menu ...     Errors were encountered while processing:      icaclient     root@grzes:/home/ga/Downloads# apt-get install     Reading package lists... Done     Building dependency tree            Reading state information... Done     You might want to run 'apt-get -f install' to correct these.     The following packages have unmet dependencies:      icaclient : Depends: libc6-i386 (>= 2.7-1) but it is not installed                  Depends: ia32-libs but it is not installed                  Depends: lib32z1 but it is not installed                  Depends: lib32asound2 but it is not installed                  Depends: nspluginwrapper but it is not installable     E: Unmet dependencies. Try using -f.     root@grzes:/home/ga/Downloads# apt-get install -f     Reading package lists... Done     Building dependency tree            Reading state information... Done     Correcting dependencies... Done     The following packages were automatically installed and are no longer required:       ia32-libs lib32asound2 lib32z1 libc6-i386     Use 'apt-get autoremove' to remove them.     The following extra packages will be installed:       freeglut3:i386 ia32-libs ia32-libs-i386:i386 lesstif2:i386 lib32asound2 lib32z1 libacl1:i386 libaio1:i386 libaudiofile1:i386 libbsd0:i386 libc6-i386 libcaca0:i386 libcurl3:i386 libdirectfb-1.2-9:i386 libedit2:i386 libesd0:i386       libfltk1.1:i386 libgdbm3:i386 libjpeg62:i386 liblzo2-2:i386 libncursesw5:i386 libnspr4:i386 libnspr4-0d:i386 libnss3:i386 libnss3-1d:i386 libpam0g:i386 libpopt0:i386 librtmp0:i386 libsdl1.2debian:i386 libsigc++-2.0-0c2a:i386       libslang2:i386 libssh2-1:i386 libstdc++5:i386 libsvga1:i386 libsysfs2:i386 libtdb1:i386 libts-0.0-0:i386 libvorbisfile3:i386 libx86-1:i386 libxaw7:i386 libxcb-render-util0:i386 libxmu6:i386 libxmuu1:i386 libxp6:i386       odbcinst1debian2:i386 xaw3dg:i386     Suggested packages:       ia32-libs-gtk ia32-libs-gtk-i386:i386 pulseaudio-esound-compat:i386 libpam-doc:i386     The following packages will be REMOVED:       icaclient     The following NEW packages will be installed:       freeglut3:i386 ia32-libs ia32-libs-i386:i386 lesstif2:i386 lib32asound2 lib32z1 libacl1:i386 libaio1:i386 libaudiofile1:i386 libbsd0:i386 libc6-i386 libcaca0:i386 libcurl3:i386 libdirectfb-1.2-9:i386 libedit2:i386 libesd0:i386       libfltk1.1:i386 libgdbm3:i386 libjpeg62:i386 liblzo2-2:i386 libncursesw5:i386 libnspr4:i386 libnspr4-0d:i386 libnss3:i386 libnss3-1d:i386 libpam0g:i386 libpopt0:i386 librtmp0:i386 libsdl1.2debian:i386 libsigc++-2.0-0c2a:i386       libslang2:i386 libssh2-1:i386 libstdc++5:i386 libsvga1:i386 libsysfs2:i386 libtdb1:i386 libts-0.0-0:i386 libvorbisfile3:i386 libx86-1:i386 libxaw7:i386 libxcb-render-util0:i386 libxmu6:i386 libxmuu1:i386 libxp6:i386       odbcinst1debian2:i386 xaw3dg:i386     0 upgraded, 46 newly installed, 1 to remove and 0 not upgraded.     1 not fully installed or removed.     Need to get 12.5 MB of archives.     After this operation, 5,949 kB of additional disk space will be used.     Do you want to continue [Y/n]?      **QUESTION:** How can I install one of these two versions? In the first case I need to install `libwebkit-1.0-2:i386` but it seems to conflict with the amd64 version, and in the latter I need `nspluginwrapper` but it is not in the repositories for some reason.


title: How to execute the .exe which code by opengl in Ubuntu?

text: Here, I have some sample code which are tutorials for OpenGL. They are developed in Visual Stdio 2008 or 2010. Now, I want to execute the .exe through by wine. How to do that?


title: java add to the path

text: I have some .jar files in a directory, `/home/unix/dfernand/bin/picard/picard- tools-1.106`. But when I add the directory to the `PATH` and `CLASSPATH` in my bashrc, java still does not recognize the .jar files and I have no idea why. I have tried:               >export PATH="/home/unix/dfernand/bin/picard/picard-tools-1.106:$PATH"     > export CLASSPATH=$CLASSPATH:/home/unix/dfernand/bin/picard/picard-tools-1.106     > java -jar AddOrReplaceReadGroups.jar -h     Unable to access jarfile AddOrReplaceReadGroups.jar     >export CLASSPATH="/home/unix/dfernand/bin/picard/picard-tools-1.106:$CLASSPATH"     >java -jar AddOrReplaceReadGroups.jar -h     Unable to access jarfile AddOrReplaceReadGroups.jar      If I do, > [niveum]dfernand> java -jar /home/unix/dfernand/bin/picard/picard- > tools-1.106/AddOrReplaceReadGroups.jar -h it works!, but I want them in my `PATH/CLASSPATH` Does anyone have an idea on where is my bug? Do I have to add something else to the `PATH/CLASSPATH`? Am I using some wrong syntax?


title: Using rsync + cron to sync a machine behind a firewall with my dropbox

text: I have a machine (A) behind a firewall with no access to the Internet, on this machine I can NFS mount directories on another machine (B) which can access internet, and is accessible from Internet, but I cannot install anything on this machine (B). I want to keep a directory on (A) in sync with my Dropbox (that I use on all my other machines (not A or B), all of them connect to Internet regularly). The solution that I came up with is to have a `cron` job on (A), to call two `rsync` commands to sync a directory on (A) with an NFS mounted directory which is actually on (B). Then I can have a cron job on some other machine on the Internet that syncs my Dropbox with the directory on (B). Anyone can see any problems with this plan, or has a better suggestion? Anything other unix utility besides `cron` and `rsync`?


title: Make Ekiga always ring on the speakers

text: I'm running Fedora 20. I'd like to make Ekiga always ring using my speakers instead of my headset. The list of devices for ringing are:   * HDA Intel   * Alsa output   * PulseAudio   * Default I have no idea of how this maps into real world hardware. How to always make it ring on the speakers?


title: Permanently enable scl for RHEL6 RedHat

text: RedHat provides a way to install packages with newer versions of packages than officially supported with Software Collections. After the installation of a software collection it is necessary to enable the alternative version, in my case python27 on RHEL6.                   scl enable python27 bash      Is there a way to permanently enable an alternative version?


title: How do I take a screenshot while using Gnome?

text: There's a pretty detailed set of instructions for how to take screenshots under debian online. The first paragraph suggests that debian supports an inbuilt screenshot facility: > >     "Print Screen" key to take a screenshot of the whole screen. >     Alt+"Print Screen" key to take a screenshot of the current active > window. >   ![debian screenshot popup](http://i.stack.imgur.com/FbPCt.png) The instructions imply that when I press `PrtScn` I should see this popup. However, I am running Debian Jessie and when I press `PrtScn` I just hear a camera shutter sound and don't see a popup. I tried pasting into `GIMP` (`edit`->`paste`) but there was nothing on the clipboard. The fact that I'm hearing the shutter sound suggests that _something_ is happening, but how do I get a copy of the image?


title: Binary to hexadecimal and decimal in a shell script

text: I have a context where I need to convert binary to hexadecimal and decimal and viceversa in a shell script. Can someone suggest me a tool for this?


title: UDev automounting drives as 'usbhd' regardless of type and name on Ubuntu 12.10

text: I have 3 drives which I use for storage on my system. Here are their mounting points in `/etc/fstab`               # <file system> <mount point>   <type>  <options>       <dump>  <pass>     # / was on /dev/sda1 during installation     UUID=f3cfbb3a-5014-4e0a-9b9d-ef4fde8f4031 /               ext4    errors=remount-ro 0       1     # swap was on /dev/sda6 during installation     UUID=9322c5b4-9157-49ab-b890-0b8d909b416f none            swap    sw              0       0          #store1     UUID=a2d57cda-515c-43e1-8d93-4f0d8714b713 /media/store1 ext4 errors=remount-ro 0 1     #store2     UUID=4f6bc0a9-5c9f-413b-9f8b-dc95e5a9462b /media/store2 ext4 errors=remount-ro 0 1     #store3     UUID=bb214693-06bc-412f-a7f9-b60bf7618fc5 /media/store3 ext4 errors=remount-ro 0 1      For some reason, Ubuntu is automounting the drives again as the `usbhd-*` naming convention.               /dev/sda5 on /media/store1 type ext4 (rw,errors=remount-ro)     /dev/sdb3 on /media/store2 type ext4 (rw,errors=remount-ro)     /dev/sdc1 on /media/store3 type ext4 (rw,errors=remount-ro)     /dev/sdc1 on /media/usbhd-sdc1 type ext4 (rw,relatime)     /dev/sdb1 on /media/usbhd-sdb1 type ext4 (rw,relatime)     /dev/sdb3 on /media/usbhd-sdb3 type ext4 (rw,relatime)      My `/etc/udev/rules.d/media-by-label-auto-mount.rules` contains               # Start at sdb to avoid system harddrive.     KERNEL!="sd[b-z][0-9]", GOTO="media_by_label_auto_mount_end"          # Import FS infos     IMPORT{program}="/sbin/blkid -o udev -p %N"          # Get a label if present, otherwise specify one     ENV{ID_FS_LABEL}!="", ENV{dir_name}="%E{ID_FS_LABEL}"     ENV{ID_FS_LABEL}=="", ENV{dir_name}="usbhd-%k"          # Global mount options     ACTION=="add", ENV{mount_options}="relatime"     # Filesystem-specific mount options     ACTION=="add", ENV{ID_FS_TYPE}=="vfat|ntfs", ENV{mount_options}="$env{mount_options},utf8,gid=100,umask=002"          # Mount the device     ACTION=="add", RUN+="/bin/mkdir -p /media/%E{dir_name}", RUN+="/bin/mount -o $env{mount_options} /dev/%k /media/%E{dir_name}"          # Clean up after removal     ACTION=="remove", ENV{dir_name}!="", RUN+="/bin/umount -l /media/%E{dir_name}", RUN+="/bin/rmdir /media/%E{dir_name}"          # Exit     LABEL="media_by_label_auto_mount_end"      Which I thought meant it ignored `/dev/sd*` drives. Any ideas on how I can stop this from happening?