title: Locked out of Ubuntu machine

text: I recently made changes to my EC2/Ubuntu instances by installing OpenSSH, before I was able to SSH just fine, however now I'm getting this error:               ssh: connect to host shopious.com port 22: Connection refused      Any idea why? Here's what it says:               OpenSSH_5.9p1, OpenSSL 0.9.8y 5 Feb 2013     debug1: Reading configuration data /etc/ssh_config     debug1: /etc/ssh_config line 20: Applying options for *     debug1: /etc/ssh_config line 53: Applying options for *     debug2: ssh_connect: needpriv 0     debug1: Connecting to mysite.com [54.251.103.225] port 22.     debug1: connect to address 54.251.103.225 port 22: Connection refused     ssh: connect to host mysite.com port 22: Connection refused


title: Does Linux allow executing the "rm -rf / " command?

text: We all know that we have to use the `-rf` option of `rm` command carefully. What I wonder is does Linux allow executing this command: `rm -rf /`? If so, why? This command could have disastrous consequences if allowed to run:   1. It would delete everything including files on the hard drive and files on connected removable media devices.    2. How can we remedy the situation, especially without the assistance of all the executable commands which would also be deleted?


title: Are multiple @daily crontab entries processed in order, serially?

text: I want two jobs to run sometime every day, serially, in exactly the order I specify. Will this crontab reliably do what I want?               @daily job1     @daily job2      I'm assuming they run one after the other, but I was unable to find the answer by searching the Web or from any of these manpages: `cron(1)`, `crontab(1)`, `crontab(5)`. The crontab above obviously won't do what I want if cron runs things scheduled with `@daily` in parallel or in an unpredictable order. I know I can simply make one shell script to fire them off in order, I'm just curious how cron is supposed to work (and I'm too lazy to gather test data or read the source code). Cron is provided by the `cron` package. OS is Ubuntu 10.04 LTS (server).


title: how to insert many similar records in mysql at a time?

text: we know that we can insert multiple records at a time using this query:               INSERT INTO `TABLE1` (`First`,`Last`) VALUES ('name1','surname1'),     ('name2','surname2'),     ('name3','surname3'),     ('name4','surname4');      but what if we want to add 1000 similar records as above `(name*,surname*)` do we have to write down all the records or we can use something like wildcard? or is there any other solution using mysql (phpmyadmin) ?


title: Check if a variable contains only what I want, and nothing else

text: I'm writing a script to build a software from sources, and there's a `\--platforms` option. I would like to allow the user to select multiple items, but I don't know how to prevent them from making a mistake. Example:               read -p "For what platforms do you wish to build [mac/win/linux32/linux64/all] ? "          if [[ -n "`echo $REPLY | grep 'win\|mac\|linux32\|linux64\|all`" ]] ; then         echo "ok"     else          echo "not ok"     fi      If the user answers `linux32`, it should be OK (and it is) If the user answers `linux32,mac`, it should be OK (and it is) If the user answers `lulz`, it should NOT be OK (and it is not) If the user answers `linux32,lulz`, it should NOT be OK (and it is, that's my issue) I was wondering if you knew a way to allow the user to input whatever they want separated by commas, but only if it's one of the options the script is offering, so in this case `linux32 linux64 mac win all`. Maybe with `case` there is a way to allow multiple inputs, or maybe add an `elif $REPLY contains anything else than what we want`. Another idea, could `awk` be used? I can't figure out myself how to do that.


title: In place upgrade of a software raid 5 array

text: I run a software raid array for my backups, but my data has outgrown capacity. considering I have a full 2.4TB array with 5*600GB drives and also have 5*2TB drives I would like to swap in. What would be the nicest way to upgrade the array? I thought of faulting 1 drive at a time and swapping in a new drive and rebuilding, but I am not sure if at the end of the process I will be able to resize the array Thoughts?


title: Unix file naming convention

text: I was wondering what is the naming convention for files in Unix? I am not sure about this, but I think there is perhaps a universal naming convention that one should follow? For example, I want to name a file say: `backup` with `part 2` and `random` Should I do it like this: `backup_part2_random` OR `backup-part2-random` OR `backup.part2.random` I hope the question is clear. Basically, I want to choose a format that conforms to the Unix philosophy.


title: How to export/extract audio from a DVD under Fedora 14?

text: i have a DVD's content on my HDD: i have these 2 usually folders, ok:      AUDIO_TS   VIDEO_TS      I just can't google a working way to extract the audio from the DVD. the howtos usually write about when the dvd is in the ODD. but i have it on my HDD, and don't want to burn it to a dvd (there are several dvd's exactly).   Are there any good way to extract the audio part from the DVD?      my original problem is that i want to convert them to h263 "AVI". But theres no sound when i open them with avidemux. but: i can import sound files to avidemux, if i had them.


title: How to change keyboard keymap

text: I accidentally set my keyboard type to US during installation, but it actually is UK type. How do I change it? [ **note** ] I use Debian Squeeze.


title: How to make KDE3 visible for GDM?

text: I have Gnome (default), KDE4 and KDE3 installed. When I log out, GDM kicks in and I can select other desktop than Gnome -- among window managers, there is KDE4 (as KDE), but no KDE3. **Question** : how to make KDE3 visible for GDM, so I could select it? openSUSE 11.4.


title: non-case-sensitive sed - OpenWrt

text: the input would be like this in a file:                 <sCripT      and the parsing looks like this:                 sed -i "s/<script//g" SOMETHING.html      the "/gi" is not good, because OpenWrt doesn't knows it (busybox..):                 sed: bad option in substitution expression      Does anybody know how could i delete e.g.: the:               < sCripT or      "<scRiPt"       with one sed?      Plus (the really thing i need): how could i delete the whole line containing               "<sCripT" or      "<scRiPt", etc.?


title: Safe to delete System.map-* files in /boot?

text: I'm experimenting with generating some custom kernels using `genkernel`. However, each iteration leaves a file in `/boot` called `System.map- genkernel-<arch>-<version>`. Is it safe to rename and/or delete the `System.map-*` files?


title: kill unresponsive process

text: According to `top`, process named `pccardd` loads my CPU nearly 100%:                 PID USER      PR  NI  VIRT  RES  SHR S  %CPU %MEM    TIME+  COMMAND                                                                                530 root      20   0     0    0    0 R  96.6  0.0  62:01.52 pccardd          According to `ps`, the process is running state:               root@T60:~# ps -o pid,ppid,command,state,uid,pcpu -p 530       PID  PPID COMMAND                     S   UID %CPU       530     2 [pccardd]                   R     0  0.2     root@T60:~#       If I try to kill the `pccardd` with `SIGTERM` or `SIGKILL` signals, then nothing happens. I am aware that `kill -9` may not work immediately, but I have waited well over an hour. Is it possible that `pccardd` process executes some system calls and thus `SIGKILL` signal is blocked? I tried to ensure this with `strace`, but I can't:               root@T60:~# strace -p 530     attach: ptrace(PTRACE_ATTACH, ...): Operation not permitted     root@T60:~#       Is there a way to kill this `pccardd` process or am I forced to reboot the machine?


title: create numbered files with defined content with bash

text: I want to create 69 files with a filename from 4006 through to 7075 and it each file needs to have some enumerated content, the following code prints on the shell what I would like to have inserted into the respective files but how do I do this?               #!/bin/bash     for i in `seq 4006 4075`; do           echo "vid $i\nports 524288\nactive = 1 >vlan_$i.ini"     done      I have tried to put the part between quotes into ` (back ticks) but then I just get empty files.


title: Zip does not compress files when zipping

text: I have zipped a file recursively in a directory. But what I notice with these last few zips is that the files do not get compressed.                 adding: 1.3.12.2.1107.5.1.4.64517.30000014091005511462300042406.dcm (deflated 0%)       adding: 1.3.12.2.1107.5.1.4.64517.30000014091005511462300042279.dcm (deflated 0%)       adding: 1.3.12.2.1107.5.1.4.64517.30000014091005511462300042466.dcm (deflated 0%)       adding: 1.3.12.2.1107.5.1.4.64517.30000014091005511462300042200.dcm (deflated 0%)       adding: 1.3.12.2.1107.5.1.4.64517.30000014091005511462300042227.dcm (deflated 0%)       adding: 1.3.12.2.1107.5.1.4.64517.30000014091005511462300042372.dcm (deflated 0%)       adding: 1.3.12.2.1107.5.1.4.64517.30000014091005511462300042245.dcm (deflated 0%)       adding: 1.3.12.2.1107.5.1.4.64517.30000014091005511462300042282.dcm (deflated 0%)      Can anyone explain why this would occur when using zip?


title: How can I make xrandr changes persist?

text: I run this command to allow me to move windows between screens: `xrandr --auto` This magic command fixes my screen for me (before I run this my 2nd monitor is just an empty space where I can move my mouse). How can I make whatever this command does stick when I reboot? I'm more interested in fixing my configuration than just re-running this command, but I'm clueless as to how to make this happen. I have 2 monitors, DFP 5 and DFP 6. Running `xrandr` results in this:               DFP1 disconnected (normal left inverted right x axis y axis)     DFP2 disconnected (normal left inverted right x axis y axis)     DFP3 disconnected (normal left inverted right x axis y axis)     DFP4 disconnected (normal left inverted right x axis y axis)     DFP5 connected 1680x1050+1680+0 (normal left inverted right x axis y axis) 474mm x 296mm        1680x1050      60.0*+        1400x1050      60.0          1280x1024      75.0     60.0          1440x900       60.0          1280x960       75.0     60.0          1280x800       75.0     60.0          1152x864       60.0     75.0          1280x768       75.0     60.0          1280x720       75.0     60.0          1024x768       75.0     60.0          800x600        75.0     60.3          640x480        75.0     59.9       DFP6 connected 1680x1050+0+0 (normal left inverted right x axis y axis) 474mm x 296mm        1680x1050      60.0*+        1400x1050      60.0          1280x1024      75.0     60.0          1440x900       60.0          1280x960       75.0     60.0          1280x800       75.0     60.0          1152x864       60.0     75.0          1280x768       75.0     60.0          1280x720       75.0     60.0          1024x768       75.0     60.0          800x600        75.0     60.3          640x480        75.0     59.9       CRT1 disconnected (normal left inverted right x axis y axis)      I have already set up DFP 6 to be right of DFP 5 using the `Displays` menu in debian. Here is my xorg.conf file:               Section "ServerLayout"             Identifier     "aticonfig Layout"             Screen      0  "aticonfig-Screen[0]-0" 0 0     EndSection          Section "Module"     EndSection          Section "Monitor"             Identifier   "aticonfig-Monitor[0]-0"             Option      "VendorName" "ATI Proprietary Driver"             Option      "ModelName" "Generic Autodetecting Monitor"             Option      "DPMS" "true"     EndSection          Section "Device"             Identifier  "aticonfig-Device[0]-0"             Driver      "fglrx"             BusID       "PCI:4:0:0"     EndSection          Section "Screen"             Identifier "aticonfig-Screen[0]-0"             Device     "aticonfig-Device[0]-0"             Monitor    "aticonfig-Monitor[0]-0"             DefaultDepth     24             SubSection "Display"                     Viewport   0 0                     Depth     24                     virtual 3360 1050             EndSubSection     EndSection      It seems to be configured for everything to be one screen, and `xrandr --auto` somehow fixes it. Is there some way of taking a peek at what this command is doing to save the result to xorg.conf? How do you normally use xrandr to get the results to persist? If I search for this I either get told to modify my xorg.conf file (which I don't know how to do because I don't know _what_ `xrandr --auto` is actually doing) or instructions on how to run `xrandr` on startup, which I'm guessing isn't necessary, but I may be wrong.


title: Can one disable tap-to-click in X server configuration, without synclient?

text: I want to configure my system so that tap-to-click is disabled on the touchpad. (It's running a rather old version of ALTLinux distro with xorg- server-1.4.2-alt10.M41.1.) The most popular advice I have found is to execute `synclient MaxTapTime=0` in the user's X session. I could accept this solution, but the problem is that this doesn't work for all users with their different preferred X "environment". The first user has logged in in the linux console, and run `startx`. X server for his session has occupied the 7th virtual linux console. He uses bare ratpoison. The second user has logged in, run `startx`. X server for his session has occupied the 8th virtual linux console. He uses WindowMaker. `synclient MaxTapTime=0` has had an effect in the second user's X session, but has had no effect when executed in the first user's X session. So, can this setting be done system-wide, for the X server, perhaps in `xorg.conf`?


title: crazy layout with GNOME 3 in Mint 14

text: I've installed GNOME 3 in Mint 14 with `sudo apt-get install gnome-shell` but now I have a problem. The general functionality is ok, but the windows look like the windows in Mint or rather like the windows in "GNOME (default) 2D": ![enter image description here](http://i.stack.imgur.com/k5Pbk.png) And worse than that is the right-clicking-menu of the windows! For some reason my screenshot program is not able to make a screenshot of that menu. And a second question: On the Gnome extensions page only 3 pages of extensions are available. Did I forget to install any packages? **Update:** I've also installed the following packages:               sudo apt-get install gnome-shell gnome-session gnome-tweak-tool     sudo add-apt-repository ppa:webupd8team/gnome3     sudo apt-get update && sudo apt-get install gnome-shell-extensions gnome-shell-extensions-common


title: simple script for monitoring a mailserver

text: I would like to use a simple bash script (python would be second best) to monitor regularly (hourly) if my mailserver is online and operating. I know that there are dedicated solutions for this task (Nagios, ...) but I really need something simple that I can use as a cronjob. Only to see the mailserver is alive. I know how to talk with a mailserver with telnet, ie:               telnet mail.foo.org 25     EHLO example.com     mail from:     rcpt to:     ...      but this is interactive. Is it possible to check with a script that the mailserver is communicating? Obviously, I don't want to go the whole way and actually send an email. I just want to test that the mailserver is responding.


title: change smtps port in Postfix

text: Is it possible in `Postfix` to specify a non-standard port for `smtps`? Normally, `smtps` listens on standard port `465`. Standard port is good for publicly used server. But if a server is only intended for private use, non- standard port would be preferable. `smtps` is enabled by uncommenting the line in `master.cf`. There seems to be however no option to specify the port number.


title: How to create a debian 3.x kernel rootfs on a 2.x host

text: I'm trying to build a rootfs for an embedded A10 board. This will be matched up against 3.0.62+ modules and a corresponding vmlinux image. I've been trying for a few days to get a rootfs set up for a 3.x kernel using sid. Attempting to install using debootstrap, ie:               sudo debootstrap --foreign --verbose --arch=armel --include=vim-nox,openssh-server,ntupdate,less --exclude=nano sid . http://ftp.au.debian.org/debian      is just giving me a build which expects the same kernel version as the host system. So, for example, when I `sudo chroot` into the new rootfs, I get:               root@njord:/lib/modules# depmod     ERROR: could not open directory /lib/modules/2.6.32-5-amd64: No such file or directory      which is searching for modules corresponding to the host system, not the kernel image / modules installed. I feel like I must be missing something very obvious here. Is there some flag I can set (either in the rootfs itself, or in the debootstrap phase) which sets the target kernel version to one that is different from the host?


title: Booting 32bit CentOS from external HDD on Lenovo IdeaPad Y580

text: I've got Lenovo IdeaPad Y580 with a 64bit CPU and I would like to boot it from my external Toshiba HDD with a 32bit CentOS 6.4 installed on it. However all my tries ended up with kernel panic: not syncing. I thought it might be because of the UEFI, but it looks like it isn't... Has anyone got any ideas what might be wrong?


title: caja-x-desktop opens up windows 13.04 fix

text: Hi, I installed Ubuntu UE 3.8, I noticed the following problems: sometimes `caja-x-desktop` opens up 10 or less windows. I noticed that it occured when I plugged in a pen-drive and tried to delete a file on it, for sometime nothing happened then suddenly 10 or less `caja-x- desktop` windows One more thing I noticed is that, when I open up a hard disk drive after giving passed, I cannot paste anything to that drive! and when I closed that window and again took that hard disk drive from the desktop, walla!, I can paste files in it, does this have anything to do with caja-x-desktop. When this happens there will not be taskbar both at top and at bottom of the screen. When I close all the caja-x-destop windows and double click user's-home folder which is in the desktop again 10 or less caja-x-windows opens up. When I tried to restart the system, system reboots and it agaings launches 10 or less caja-x-desktop windows, again with not task bars. If you click on any folder in caja-x-desktop windows, all windows closes and again 10 or less caja-x-desktop windows opens up. The fix I got to stop it was that, open my computer folder in desktop, and then click on the places which is shown in that window, then top and bottom taskbar reappears and no more caja-desktops. Why is this happening? I checked for fixes, but all the fixed were unclear and complicated, am not an expert ubuntuist so can you guys give me a fix in step by step procedure which is explained in simple terms so that I can remody this caja-x-desktop problem. Please help, thanks.


title: Beginner question about bash "for loop"

text: When I do,               for ((i=0; i<"${ARRAY}"; i+=2))     do         echo $i         echo ${ARRAY[$i]}     done      `echo $i` works as I expected, also `echo ${ARRAY[0]}` works, but with `$i` as iterator `i` see only blank lines. How to write the for loop correctly?


title: Gnome desktop environment stopped working in kali linux(debian based)

text: Gnome desktop environment stopped working after change in `libudev.so.0` in `/lib/x86_64-linux-gnu/` and showing error:               cannot open shared libraries      I am trying too hard to get rid of this problem but unable to solve. I have 64 bit kali debian based linux(~).Now I donot have any files realted to `libudev.so.*` in `/lib/x86_64-linux-gnu/`. From this my gdm is also not working.


title: Find and close/unlink message queues in the system

text: I have a SLES-11 machine on which I am not the root where I am building software code that makes extensive use of message queues. Due to some bugs, Now have an error: `mq_open: Too many open files` I am using the command `ipcs -a` but I do not see my message queues. So I can't use `ipcrm` command. So, right now I cannot use the machine at all. Is there a way to find message queues (opened by me) in the system and close them ? Info: I do not have a `/dev/mqueue` in my system. I am also not the `root` user


title: Difference between telinit and running scripts manually under rc*.d

text: I was trying to debug my Linux boot process. If I set the default runlevel to 2 or 3, my system hangs without giving me a prompt. I was able to get to runlevel 1 via a kernel parameter, and ran all scripts in `/etc/rc2.d` via `service ***** start/stop` commands and it was fine. But if I do a `telinit` to runlevel 2 or 3, I can't see my shell prompt. So what is the difference between the two approaches? I use SysVinit. Content of `/etc/inittab` (which I haven't modified):               id:3:initdefault:          # System initialization.     si::sysinit:/etc/rc.d/rc.sysinit          l0:0:wait:/etc/rc.d/rc 0     l1:1:wait:/etc/rc.d/rc 1     l2:2:wait:/etc/rc.d/rc 2     l3:3:wait:/etc/rc.d/rc 3     l4:4:wait:/etc/rc.d/rc 4     l5:5:wait:/etc/rc.d/rc 5     l6:6:wait:/etc/rc.d/rc 6          # Trap CTRL-ALT-DELETE     ca::ctrlaltdel:/sbin/shutdown -t3 -r now          # When our UPS tells us power has failed, assume we have a few minutes     # of power left.  Schedule a shutdown for 2 minutes from now.     # This does, of course, assume you have powerd installed and your     # UPS connected and working correctly.       pf::powerfail:/sbin/shutdown -f -h +2 "Power Failure; System Shutting Down"          # If power was restored before the shutdown kicked in, cancel it.     pr:12345:powerokwait:/sbin/shutdown -c "Power Restored; Shutdown Cancelled"               # agetty on serial port     s0:2345:respawn:/sbin/agetty -L -i 9600 ttyS0 vt100     s1:2345:respawn:/sbin/agetty -L -i 9600 ttyS1 vt100          1:2345:respawn:/sbin/agetty 38400 tty1 linux          # Run xdm in runlevel 5     x:5:respawn:/etc/X11/prefdm -nodaemon          # Ask for password at single user prompt     ~~:S:wait:/sbin/sulogin


title: Why can't I use renice to increase a process' nice value?

text: From `man renice`: > Users other than the super-user may only alter the priority of processes > they own, and **can only monotonically increase their ``nice value'' (for > security reasons)** within the range 0 to PRIO_MAX (20) [...] So, I can `renice` my own processes upwards (give them lower priority) but never downwards:               $ renice 10 22316     22316 (process ID) old priority 0, new priority 10     $ renice 9 22316     renice: failed to set priority for 22316 (process ID): Permission denied      Why is this? I can understand why normal users cannot set nice values lower than 0, but why since I can decrease the priority to 10 can't I increase it again to 9? What "security reason" is there for this? I have the right to launch a process with a nice value of 9, so why can't I renice it to 9? * * * EDIT: I should learn to scroll down. Turns out this is listed as a bug in `man renice`:               BUGS          Non super-users can not increase scheduling priorities of their own          processes, even if they were the ones that decreased the priorities           in the first place.      That's even more confusing. If they consider this behavior to be a bug, why not change it? The `renice` command appeared in 4.0BSD which I think is from 1980. This should be very easy to fix so on the one hand they seem to have chosen to leave it and on the other they list it as a bug.


title: Accessing GPIO after kernel boots

text: my rootfs.cpio has only following files:               [root@localhost extract]# ls      dev  init  tmp      dev has console only. init is cross-compiled from the program given at the end: Then I make a my image and run linux. It runs fine but when init comes it shows error similar to the following :               Failed to open /sys/class/gpio/gpio251/direction       Failed to open /sys/class/gpio/gpio251/value      So, I manually created these folders and files and now it looks like this:               [root@localhost extract]# ls          dev  init  tmp sys      inside sys I created required folders and files(empty). But even then code is not executing and kernel panics. **Background** This code I took from a complete file system, which had all the directories expected in a linux system. I took this code cross compiled separately, and renamed it to init. And expecting to work(Light an LED eg). **Another approach**               bash> echo 240 > /sys/class/gpio/export     bash> echo out > /sys/class/gpio/gpio240/direction     bash> echo 1 > /sys/class/gpio/gpio240/value      This approach is described GPIO DRIVER. So after manually creating these required files and I cross-compiled it and renamed it to init. And then made rootfs.cpio and created my OS image. But this also did not work. **Questions** Why is the code not executing properly in my own file system (partial)? Does the code depends upon some other files or dynamic libraries (which are present in complete file system)? Why is my manually created files not working?                   #include <stdio.h>         #include <stdlib.h>         #include <unistd.h>         #include <string.h>         #include <errno.h>         #include <fcntl.h>         #include <signal.h>         int main( )         {             extern char *optarg;             char *cptr;             int gpio_value = 0;             int nchannel = 0;                  int c;             int i;                  opterr = 0;          int argc=5;     char *argv;     char *argv2[] = {"gpio-demo", "-g", "255", "o", "0"}; argv = argv2;              while ((c = getopt(argc, argv, "g:io:ck")) != -1) {                 switch (c) {                     case 'g':                         gl_gpio_base = (int)strtoul(optarg, &cptr, 0);                         if (cptr == optarg)                             usage(argv[0]);                         break;                     case 'i':                         gpio_opt = IN;                         break;                     case 'o':                         gpio_opt = OUT;                         gpio_value = (int)strtoul(optarg, &cptr, 0);                         if (cptr == optarg)                             usage(argv[0]);                         break;                     case 'c':                         gpio_opt = CYLON;                         break;                     case 'k':                         gpio_opt = KIT;                         break;                     case '?':                         usage(argv[0]);                     default:                         usage(argv[0]);                      }             }                  if (gl_gpio_base == 0) {                 usage(argv[0]);             }                  nchannel = open_gpio_channel(gl_gpio_base);             signal(SIGTERM, signal_handler); /* catch kill signal */             signal(SIGHUP, signal_handler); /* catch hang up signal */             signal(SIGQUIT, signal_handler); /* catch quit signal */             signal(SIGINT, signal_handler); /* catch a CTRL-c signal */             switch (gpio_opt) {                 case IN:                     set_gpio_direction(gl_gpio_base, nchannel, "in");                     gpio_value=get_gpio_value(gl_gpio_base, nchannel);                     fprintf(stdout,"0x%08X\n", gpio_value);                     break;                 case OUT:                     set_gpio_direction(gl_gpio_base, nchannel, "out");                     set_gpio_value(gl_gpio_base, nchannel, gpio_value);                     break;                 case CYLON:         #define CYLON_DELAY_USECS (10000)                     set_gpio_direction(gl_gpio_base, nchannel, "out");                     for (;;) {                         for(i=0; i < ARRAY_SIZE(cylon); i++) {                             gpio_value=(int)cylon[i];                             set_gpio_value(gl_gpio_base, nchannel, gpio_value);                         }                         usleep(CYLON_DELAY_USECS);                     }                 case KIT:         #define KIT_DELAY_USECS (10000)                     set_gpio_direction(gl_gpio_base, nchannel, "out");                     for (;;) {                         for (i=0; i<ARRAY_SIZE(kit); i++) {                             gpio_value=(int)kit[i];                             set_gpio_value(gl_gpio_base, nchannel, gpio_value);                         }                         usleep(KIT_DELAY_USECS);                     }                 default:                     break;             }             close_gpio_channel(gl_gpio_base);             return 0;         }


title: Significant difference in speed between fsck using ext3 and ext4 on Debian Squeeze

text: Recently I installed Debian Squeeze, first using `ext3` and then again using `ext4` on the same machine. The automatic `fsck` done after a certain number of mounts is much faster using `ext4` (about 1 min) than `ext3` (about 5 min). What are the reasons for this significant difference in speed? If `ext4` is much faster why does the Debian installer default to using `ext3`?


title: Issues with net-SNMP . MRTG not generating graph to monitor network bandwidth

text: I am monitoring network bandwidth for my servers using MRTG . But suddenly can see graphs are not generated for one of the Linux servers running on CentOS 5.5 . SNMPD service is running on the server.               `# service snmpd status       snmpd (pid  20719) is running...           # uname -r        2.6.18-194.el5           # cat /etc/redhat-release         CentOS release 5.5 (Final)           # rpm -qf /etc/snmp/snmpd.conf         net-snmp-5.3.2.2-9.el5   `      Please find contents from `snmpd.conf` below                com2sec notConfigUser  default    testlinux           group   notConfigGroup v1           notConfigUser      group   notConfigGroup v2c          notConfigUser               # Third, create a view for us to let the group have rights to:          # Make at least  snmpwalk -v 1 localhost -c public system fast again.     #       name           incl/excl     subtree         mask(optional)       view    systemview    included   .1.3.6.1.2.1       view    systemview    included   .1.3.6.1.2.1.25.1.1            # Finally, grant the group read-only access to the systemview view.       #       group          context sec.model sec.level prefix read   write  notif       access  notConfigGroup ""      any       noauth    exact  systemview none none      What might be the issue here ? Please suggest.


title: IP rule table look up does not seem to work

text: I have a sytem with three network interfaces. Below is the configuration that I'm trying to set up. wlan0 (its actually an WiFi AP interface) - other devices connects via this interface. net1 - interface facing internet that has to be linked to wlan0 to provide internet services to devices connected via wlan0. net0 - interface facing restricted internet access to answer queries only for requests from within this subnet. The default interface is net0 and its gateway. The output of ip route show looks like this:               default via 10.228.103.241 dev net0     10.228.103.240/30 dev net0 src 10.228.103.242      Now I would like to system to look up table 7 for route rules for all requests to eth0 and               net1.  So I created ip rules as below:     0:      from all lookup local     32758:  from all lookup main     32762:  from 8.8.0.0/16 lookup iTbl     32764:  from 192.168.225.1 lookup iTbl     32765:  from 192.168.172.2 lookup iTbl     32767:  from all lookup default      8.8.0.0 is for nameservers. Its listed as iTbl because I have defined 7 as iTbl in /etc/iproute2/rt_tables. ip route show for table 7 looks like this:               default via 192.168.172.3 dev net1     8.8.0.0/16 via 192.168.172.3 dev net1     192.168.172.0/24 dev net1  src 192.168.172.2     192.168.225.0/24 dev wlan0  src 192.168.225.1      And finally my iptables looks like this:               iptables -nvL     Chain INPUT (policy ACCEPT 245 packets, 49904 bytes)      pkts bytes target     prot opt in     out     source               destination          Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)      pkts bytes target     prot opt in     out     source               destination         3   180 ACCEPT     all  --  wlan0   *       0.0.0.0/0            0.0.0.0/0          Chain OUTPUT (policy ACCEPT 190 packets, 19182 bytes)      pkts bytes target     prot opt in     out     source               destination          iptables -nvL -t nat     Chain PREROUTING (policy ACCEPT 22 packets, 2205 bytes)      pkts bytes target     prot opt in     out     source               destination          Chain INPUT (policy ACCEPT 21 packets, 2145 bytes)      pkts bytes target     prot opt in     out     source               destination          Chain OUTPUT (policy ACCEPT 91 packets, 7782 bytes)      pkts bytes target     prot opt in     out     source               destination          Chain POSTROUTING (policy ACCEPT 90 packets, 7226 bytes)      pkts bytes target     prot opt in     out     source               destination         2   616 MASQUERADE  all  --  *      net1  0.0.0.0/0            0.0.0.0/0      When I connected a device to wlan0 interface and try to browse internet, tcpdump shows all the requests from wlan0 seem to go via net0, which actually has to go via net1 desirably. I read through many posts and forums. After trying different things I couldn't solve the issue. I am not able to understand where its going wrong. From the tcpdump and logically looking at it, seems like the ip rule lookup to table 7 is not working. Please help to check if any of the rules has to be corrected.


title: Visualization tools for REST-based services

text: Let's say there is a cluster/set of processes that communicate via REST/HTTP (that could describe a whole lot of products these days). What's a good and simple way to view the communication among them in some sort of a nice visual tool? They may be Zookeeper-orchestrated, but not necessarily. (Additionally, if they are on the same machine, ideally I could use netstat to discover who calls whom - would be nice if it was all somehow available). Has to work on Linux. Yes, I know I can use proxies, etc., but that needs a bunch of manual work. Wireshark and related are even more work. Am wondering if there's a more turnkey solution for something like that. One approach is just a Wireshark-based, but geared towards just showing HTTP traffic with certain criteria that already works. The reason Zookeeper is mentioned is perhaps another way is to interrogate Zookeeper, and replace ports in there with proxy ports, and route all traffic through them - but again, I'd like something that already works.


title: How to guarantee availability of $BASH_ENV

text: A non-interactive, non-login shell will try to source any script specified in $BASH_ENV. But how do I guarantee $BASH_ENV is set before a cron job or script has a chance to set $BASH_ENV for any particular session? Is the only option to compile Bash with it hardcoded?


title: Un-archiving single file hanging

text: I am trying to unarchive a very large directory. Here is what works to untar the entire thing:               $ sudo tar -xjf itunes20140618.tbz --verbose     x itunes20140618/     x itunes20140618/genre_artist     x itunes20140618/imix_type     ...etc...      However, if I try and un-archive only a single file, it will correctly do so, but then the command will hang indefinitely. In addition, it doesn't print any of the output when using the --verbose statement. Here is an example:               $ sudo tar -xjf itunes20140618.tbz itunes20140618/imix --verbose     [ nothing prints...it just hangs. But it does un-tar that single file ]


title: SSH alerts for outside IP addresses

text: So i have a script that emails me if a login is from anything besides an ip address that starts with "10.1.":               #!/usr/bin/python          import smtplib, os          server = "10.10.10.10"     From =  "address1@example.com"     to = ["address2@example.com"] # must be a list     subject = "SSH Login from outside network"          ip = os.environ['SSH_CONNECTION'].split()[0]     user = os.environ['USER']               if '10.1.' in ip:         print "---SSH IP Check---"         print 'Inside address, no alert will be sent.'         exit(0)               text = user + " just logged in from " + ip          # Prepare actual message     message = """\     From: %s     To: %s     Subject: %s          %s     """ % (From, ", ".join(to), subject, text)          # Send the mail     server = smtplib.SMTP(server)     server.sendmail(From, to, message)     server.quit()      I've added this to .bashrc for /root/.bashrc and when i login as root to this remote server, this runs, checks the $SSH_CONNECTION variable and emails if it doesn't start with 10.1. But what if someone logs in as user? or another username? I originally had a file /etc/ssh/sshrc which i think is a bash script(no #!/bin/sh on first line though) and it worked ok, but i wanted a check of the ip so thats why i did this in python, in bash it didnt like the double [[ brackets, and i was just piping it out to sendmail. So the question is how can i make this script run on any ssh login? should i keep trying with the sshrc file? I've tried replacing the sshrc file with this python script, but i get this when i log in:               /etc/ssh/sshrc: 3: /etc/ssh/sshrc: import: not found     /etc/ssh/sshrc: 5: /etc/ssh/sshrc: server: not found     /etc/ssh/sshrc: 6: /etc/ssh/sshrc: From: not found     /etc/ssh/sshrc: 7: /etc/ssh/sshrc: to: not found     /etc/ssh/sshrc: 8: /etc/ssh/sshrc: subject: not found     /etc/ssh/sshrc: 10: /etc/ssh/sshrc: Syntax error: "(" unexpected


title: how to install eiskaltdc++ on fedora 19?

text: So, recently i switched from ubuntu to fedora. I was using eiskaltdc++ for file sharing before. I have installed linuxdc++ on fedora but that is not working though. I would like to install eiskaltdc++ on fedora.


title: CPU percentage of a single process

text: How do I get the average CPU percentage (for every second) consumed by a single process since it starts until it ends (exists)? Could I make this with Top?


title: bcache on md or md on bcache

text: bcache allows one or more fast disk drives such as flash-based solid state drives (SSDs) to act as a cache for one or more slower hard disk drives. If I understand correctly,   * an SSD* could be assigned to cache multiple backing HDDs, and then the resulting cached devices could be RAIDed with mdadm   or   * multiple HDDs could be RAIDed into a single backing md device and the SSD assigned to cache that I'm wondering which is the saner approach. It occurs to me that growing a RAID5/6 may be simpler with one or other technique, but I'm not sure which! Are there good reasons (eg growing the backing storage or anything else) for choosing one approach over the other (for a large non-root filesystem containing VM backing files)? * * * * _by "an SSD" I mean some sort of redundant SSD device, eg a RAID1 of two physical SSDs_


title: No result when using Multiple write file & sed in shell script

text: I would like to swap variables from old file to new file when I use single line like this               cat ../oldFile.html | sed "s@$dayMaxInNew@$dayMaxIn@g" > newFile      There's result from newFile. But When I use more than 2 line as follows:               cat ../oldFile.html | sed "s@$dayMaxInNew@$dayMaxIn@g" > newFile          cat newFile | sed "s@$dayAvgInNew@$dayAvgIn@g" > newFile          cat newFile | sed "s@$dayCurInNew@$dayCurIn@g" >  newFile      no result from newFile. I try to use sleep but It doesn't Work. PS. The 2nd and 3rd line I swap variable in samefile. any advice?


title: Does the "Massive Growth in SMTP STARTTLS Deployment" decrease SPAM filtering efficiency?

text: https://www.facebook.com/notes/protect-the-graph/massive-growth-in-smtp- starttls-deployment/1491049534468526               When we posted in May about the state of STARTTLS deployment, we had no idea     that we would see such significant changes to email encryption across the     industry in just a few short months. We previously reported that only 28.6% of     our outbound notification emails were successfully encrypted and passed strict     certificate validation (58% if you count opportunistic encryption). Since     STARTTLS encryption requires both sides to deploy it, we encouraged others to     take the next step. As a result of recent changes by major providers, most     notably Microsoft and Yahoo, 95% of our notification emails are now successfully     encrypted with both Perfect Forward Secrecy and strict certificate validation.      ![enter image description here](http://i.stack.imgur.com/GGz3Z.png) **Question:** Does the good (more encrypted mail) has a bad impact on SPAM filtering?


title: configuration to listen-on different depending on the domain asked

text: I want to configure bind such that the host served differ depending on the domain asked. the use case is the following: it must respond to anyone if the requested domain is in the domain my server is authoritative for, and must accept to respond to a limited range of IP addresses otherwise. (I don't want a open recursive resolver) I think this should be possible through the ''listen-for'' directive, but i'm unsure.


title: Create file in folder: permission denied

text: I'm a newbie in the GNU/Linux-Ubuntu world. I have a problem copying files to a directory on Ubuntu 12.04. I create a directory in the home directory so that the path where I want to copy to is:               /home/sixven/camp_sms/inputs      But when ini run the following command in the terminal to create a sample file as follows:               francisco-vergara@Francisco-Vergara:/home/sixven/camp_sms/inputs$ touch test_file.txt     touch: can not make `touch' on «test_file.txt»: permission denied      I can not copy files directly in that directory. How can I assign permissions with the `chown` & `chmod` commands to copy the files? I do not know which user and group to use.


title: Can I access Nth line number of standard output?

text: Assuming a script that outputs a list of files:               $> bash someScript.sh     path/to/some/file     path/to/the/file/i/want/to/work/with     path/to/yet/another/file      Now I want to have the second file-path as parameter for another command, e.g. `vim`. Is there a way to directly access it? And I want to point out that I do not necessarily want to access the second file, but the next time it could be the third or the 27th. I want to be able to select that Nth line as easily as possible. Right now I do mouse-selecting and insert by middle-clicking or type the path with tab-completion. Now I wonder if there is an easier way. Problem with my own solution is though that I would have to edit all my scripts this way. It would be fun if there was a more general solution to this issue, that would work with any kind of command, e.g. `find`.


title: grub error no such partition

text: I have an HP laptop with 5 partitions. I installed windows 7 on the first one, Ubuntu on the second and Kali on the third and left the other two for general use. Before, when I booted my laptop, I was preseneted with GRUB which asked me to select an OS. Now, when I wanted to remove kali by deleting the same partition in which it was installed, it failed. But now when I boot or start my laptop it says               WELCOME TO GRUB     error:no such partition     Entering rescue mode     grub rescue...


title: How can we obtain a temporary filename in a standard-conforming IEEE 1003.1 script?

text: How can we obtain a temporary file name in a standard-conforming shell script (using no commands or extensions which are not described the 2013 edition of IEEE 1003.1). There doesn't appear to be any utility for generating a temporary filename, only C library functions.


title: Fedora Rawhide - 8330 GPU Driver install?

text: So I have got a new laptop with an AMD A4 5000 APU with the integrated GPU running a 8330 GPU, I know that fedora has problems with AMD, so I have a few questions to ask.   1. RadeonSI on 8330, Is this supported via the SI driver? If so how do I enable RadeonSI as default driver, and what's its power draw like?   2. If not, how can I install AMD Catalyst on Rawhide so it does not crash the system and also I can keep updating without any issues?


title: Good ways for annotating and searching in document (pdf, djvu)

text: For djvu files, I enjoy reading it in djview, because when I search for some words, it can show where all the results are at a glance, and highlight them simultaneously. This is much more convenient than the searching functionality in evince for pdf files. For pdf files, I enjoy using Xournal to annotate it, for example, underscore some lines, add text comments. But for a single file (pdf or djvu), I have to create two files (one in pdf, and the other in djvu) and open them in djview and xournal (and maybe also in evince), in order to achieve the two benefits I outlined above. I haven't tried many other functionalities of djview, xournal and evince, neither have I tried many applications yet. Do you have some convenience ways to achieve what I hope to do and possibly more which I haven't mentioned yet? My OS is Ubuntu 12.04.


title: SSH session through OpenVPN cuts off / locks up after a few lines

text: I have a large number of identical fanless PCs running debian 6 (ARM). Most of these are connected via comcast and work ok. There are some that are connected to 'WiMax' modems and are having communication issues. Specifically: if I ssh to one of these and try a command like 'ps -ax' I'll get about 3 lines back and then the session is locked up. If I let it sit, eventually it will close with a 'session closed by peer'. What I've tried:   * `ssh -vvv` → no error messages    * `ssh <user@host> 'command'` → this will sometimes return the full output of the command. Sometimes it won't connect at all. Suggestions on other things to try? I've found that I can execute some commands successfully: e.g. hitting return a dozen times or more is ok. `cd ~` and then `lf` works as does `df -h`. I can run `df` many times successfully but as soon as I try something with more output (e.g. `ls /etc`) it locks up. Does it make a difference that I'm trying to communicate between these two hosts using OpenVPN?


title: how to install avxsynth on centos?

text: i am using centos 6 x86_64 and i am trying to install avxsynth for centos, but it always failed from link page i found that i have to install > automake libtool MPlayer sudo apt-get install mplayer > > Log4CPP sudo apt-get install liblog4cpp5-dev liblog4cpp5 > > Cairo sudo apt-get install libcairo2-dev > > Pango sudo apt-get install libpango1.0-dev > > LibJPEG sudo apt-get install libjpeg-dev (required to build the frame > capture plugin) > > QT sudo apt-get install libqt4-dev(required if you want to build the GUI app > AvxEdit). > > ffms2 sudo apt-get install libffms2-dev libavcodec-dev libavformat-dev > libavutil-dev > > libpostproc-dev libswscale-dev (required to build the ffms2 plugin) but in yum that packages are not exists, and for compile ffms itself it always failed, i am confused , please help!


title: LDAP Server under Debian vs LDAP Server under Red Hat

text: i have read about **Red Hat Directory Server:** > Red Hat released a directory service, that it acquired from AOL's Netscape > Security Solutions unit,[1] as a commercial product running on top of Red > Hat Enterprise Linux called Red Hat Directory Server and as the community > supported 389 Directory Server project. There is an impact when choose `RHEL` as OS for `LDAP` server instead of Debian OS such as Ubuntu ? or, is it just a issue of performance?


title: How to reuse Physical memory in the absence of swapping?

text: How can I reuse physical memory in the absence of swapping?


title: $DISPLAY environment variable is not properly set error message

text: Is it possible to start an xfreerdp session into Microsoft windows from a command-line only install of Linux? The command I use from a full blown Linux install is this:               $ sudo xfreerdp /v:farm.company.com /d:company.com \         /u:oshiro /p:oshiro_password /g:rds.company.com      This command works fine. However, when I run the same command from a command- line install of Linux, I get the following error message:               Please check that the $DISPLAY environment variable is properly set.     freerdp_set_last_error 0x20001     libfreerdp/core/freerdp.c:97: freerdp_pre_connect failed      Both the GUI based Linux installation and the command-line only installation of Linux I have are Ubuntu 12.04. Both installations have xfreerdp version 1.2.0-beta1


title: Compared to other filesystems why is ZFS so slow, with incoming data?

text: Ok. I get about 1/3 of the speed on the same drives when using ZFS. Now, I understand that ZFS is self-healing and that everything is also stored with its hashes. This makes it safer to use. I haven't used raidz yet, so this excludes that part of the equation - but please tell me if by using raidz I can speed things up. If the hashes are computed for comparison - where and when does this happen. Where does the speed issue come into play? I'm happy now that I have mirrored and safe data, on my system, but would like to know how I can tweak performance.


title: Command-line completion from command history

text: So, I've looked at history and at `Ctrl`+`R`, but they are not what I thought I knew. Is there a way that I can type in the beginning of a command, and cycle through the matches in my history with some bash shortcut?               # mysq(some shortcut key)      Gives me:               # mysqldump  --add-drop-table -e -q -n -C -u      (some shortcut key)     #  mysql -u ben.dauphinee -p


title: How to give a normal user permission to change root password

text: Please do not ask why, but is it possible to do it? p/s: I know it's not a good thing, let's just say someone from the top management who is computer illiterate want some sort of _control_ over the server.


title: Why should a child of a vfork or fork call _exit() instead of exit()?

text: From the man page of `vfork()`: > vfork() differs from fork() in that the parent is suspended until the child > makes a call to execve(2) or _exit(2). The child shares all memory with its > parent, including the stack, until execve() is issued by the child. The > child must not return from the current function or call exit(), but may call > _exit(). Why should the child use an `_exit()` rather than simply calling `exit()`? I hope this is applicable to both `vfork()` and `fork()`.


title: How process substitution is implemented in bash?

text: I was researching the other question, when I realized I don't understand what's happening under the hood, what are those `/dev/fd/*` files and how come child processes can open them.


title: What is the purpose of UUIDs for NICs?

text: On Fedora/RHEL/CentOS there is a line in `/etc/sysconfig/network- scripts/ifcfg-x` files which defines `UUID`:               UUID=30fcd648-ad1e-4428-as6f-951e8e4d16df      NICs have MAC addresses by them selves, so what is the purpose of pointing UUIDs to NICs when there is already an identification number (MAC) and also unlike file systems UUIDs they can't be stored on device itself?


title: How can I configure Wine's default paper settings?

text: I'm having trouble with the locale settings in my Microsoft Office Wine bottle/prefix. When I created it, I had followed the Gentoo Localization Guide's suggestion to not set LC_ALL. However, when I try to print from any application in the bottle, the printer is told to use A4, even though the rest of my locale settings are set to en_US. This is particularly troublesome when using Office 2010 apps, which show Letter as the paper size, but send A4 to the printer. Notepad is an easy test, as it will show what is actually set (A4). I created a new bottle with LC_ALL set, and it defaults to Letter (using the Notepad test). What I'd like to do is fix my existing bottle. Is this possible? The WineHQ forums haven't been too helpful so far.


title: Downloading and installing KDE libraries on Kubuntu 12.04

text: I want to start writing some simple plasmoids. However I am unable to use K-objects in QtCreator or KDevelop. I likely do not have the required libraries / SDK. How do I install it, or if I already have them, how do I make the mentioned IDEs aware of it?


title: add server name before filename with uname -n

text: Here is my command in my script:               mv -f -v $oldfile /infanass/dev/admin/backup/${oldfile##*/}_$(date +%F-%T)      Right now the output is:               file1.txt_2013-07-11-15:08:16       I want the server name to show up before the file name. I think :               uname -n       is the right command but i just can't get it to show up.


title: Logitech MX-510: Some extra buttons not usable

text: I have a Logitech MX-510, that I've been using for about six years. ![Logitech MX-510](http://i.stack.imgur.com/QERCw.jpg) The Mouse has several extra buttons, that I'd like to use in Gnome, but I have problems with the button codes, that the mouse sends to the driver:   * Button 1 (mouse wheel button) works as expected. One `ButtonPress` event with `state 0x10` and `button 1` on press, and `ButtonRelease` with `state 0x110`on release.   * Button 2 (mouse wheel button) works as expected. One `ButtonPress` event with `state 0x10` and `button 2` on press, and `ButtonRelease` with `state 0x210`on release.   * Button 3 (right button) works as expected. One `ButtonPress` event with `state 0x10` and `button 3` on press, and `ButtonRelease` with `state 0x410`on release.   * Button 4 (scroll up) works as expected. It sends a `ButtonPress` event with `state 0x10` and `button 4`, and a `ButtonRelease` event with `state 0x810`. Both events occur instantaneous on each scroll step.   * Button 5 (scroll down) works as expected. It sends a `ButtonPress` event with `state 0x10` and `button 5`, and a `ButtonRelease` event with `state 0x1010`. Both events occur instantaneous on each scroll step. _Buttons 6 and 7 seem to not exist._   * Button 8 (back button) works as expected. It sends a `ButtonPress` event with `state 0x10` and `button 8`, and a `ButtonRelease` event also with `state 0x10`. Both events occur instantaneous on each scroll step.   * Button 9 (back button) works as expected. It sends a `ButtonPress` event with `state 0x10` and `button 9`, and a `ButtonRelease` event also with `state 0x10`. Both events occur instantaneous on each scroll step. The mouse has three additional buttons, as you can see in the picture above.   * Button 10 (on the very top of the mouse) is not usable. It sends a `ButtonPress` event with `state 0x10` and `button 10`, and a `ButtonRelease` event also with `state 0x10`. The button is not usable with Gnome, because it is not selectable. Most option selectors, like that one of CompizConfig Settings Manager just goes up to Button 9.   * Button 11 (extra button to the front of the mouse wheel) is not quite usable. When pressed, it sends a `ButtonPress` event with `state 0x10` and `button 11`, **and** another `ButtonPress` event with `state 0x10` and `button 4` **and** yet another one `ButtonPress` event with `state 0x810` and `button 4` (the last two being the same behaviour as if the scroll wheel was moved one step up). On release it sends a `ButtonRelease` event with `state 0x10` and `button 11`. But the catch is, when the button is held down, it repeats the "mouse wheel simulation" about five times per second. (like a mousewheel cruise-control or something).   * Button 12 (extra button to the back of the mouse wheel) is not quite usable. When pressed, it sends a `ButtonPress` event with `state 0x10` and `button 12`, **and** another `ButtonPress` event with `state 0x10` and `button 5` **and** yet another one `ButtonPress` event with `state 0x1010` and `button 5` (the last two being the same behaviour as if the scroll wheel was moved one step up). On release it sends a `ButtonRelease` event with `state 0x10` and `button 12`. When held down it displays the same cruise-control behavior as button 11, but with the respective button and state parameters. Is there a way how I can remap those additional keys in a way, where I can use them or make them usable with Gnome? And especially, if it is possible, to make buttons 11 and 12 stop sending codes for mouse wheel scroll up and down. And if possible, how can I change the general behavior of the mouse buttons in general?


title: Capture and log GDB backtraces without stopping the process

text: First, a brief description of the situation: a computer sits hidden near a display in a gallery of some sort, acting as the silent workhorse for a piece. Despite its programmer's best intentions the piece may, well, crash, from time to time depending on the passerby's interactions with the display. The programmer has rigged up the computer to automatically restart the relevant program hackishly using a bash loop, since uptime (or something resembling it) is at a premium. The developer would love to determine what the cause of any crashes is, but running the program via GDB -- to the best of this developer's knowledge -- would result in the process stopping upon a crash. This would indeed enable the developer to tap in 'backtrace' and find the cause, but the piece would be inoperable until the developer made his or her way to the gallery in question to check on it. This is no good. How might this intrepid developer secure backtraces of each crash (and presumably store them somewhere) via GDB, but still allow for the original behaviour of automatically restarting the process upon a crash?


title: Backup installed RPM

text: Last night I did `rm -Rf /tmp` as root. I wasn't drunk. But I definitely feel I was dumb to do so. Now X doesn't work. I read few days back that after doing `rm`, one can't recover the lost data. I mounted a USB stick but it doesn't show up in `/media` directory. I need to backup the data in `/home` folder. I think I can recover that data by some live usb. Is there a way to backup the rpms that are installed on Fedora machine? I wish to save bandwidth. So if it's possible, I'd prefer saving all the installed rpms in a directory and then re-installing them simply by doing `rpm -i`. I earlier posted this question but YUMonCD package doesn't work fine on my Fedora 14. I found this to create a list of installed rpms and then re- installing it after formating. But it doesn't save any bandwidth for me.


title: What is a free, small Unix/Linux OS?

text: I have a spare machine with an 80GB HDD and 512 MB RAM. I want to try a Linux distro that's very small (and free too). What should I try?


title: No Package Manager Kali Linux 1.0.9

text: I have been searching for this problem everywhere from last 6 hours but never came to an answer which I understood I don't have much experience on Kali Linux but I recently installed Kali Linux 1.0.9 on Hard Disk and when it asked me to select a package manager, I did but every time it gave an error, `NOT AVAILABLE` Or something, so I skipped it but now when Linux have successfully installed and I try to install anything it gives an error. Here I tried installing Synaptic the error it gave:               :~# apt-get install Synaptic     Reading package list... Done     Building dependency tree     Reading state information... Done     Package synaptic is not available, but is referred to by another package.     This may mean that the package is missing, has been obsoleted, or is only     available from another source     E: Package 'synaptic' has no installation candidate      there has been the same kinda error for every package. Any help please? it will be appreciated


title: Redis: Error writing to client: Broken pipe

text: I would like to use Redis for Magento LestiFPC. Magento/Redis is using Pecl php-redis. I assigned 8 DB's to use over 2 Magento websites. Unfortunately there are only 5 DB's are in use (max 16 redis.conf). There is also an error which I don't understand: Error writing to client: Broken pipe How to solve this?


title: Bumblebee problem

text: I cannot run 'glxspheres'. Here is the result for `optirun glxspheres`:               [   54.811157] [ERROR]Cannot access secondary GPU - error: [XORG] (EE) Problem parsing the config file     [   54.811195] [ERROR]Aborting because fallback start is disabled.      Result for `glxinfo`:               Xlib:  extension "GLX" missing on display ":0.0".     Xlib:  extension "GLX" missing on display ":0.0".     Xlib:  extension "GLX" missing on display ":0.0".     Xlib:  extension "GLX" missing on display ":0.0".     Xlib:  extension "GLX" missing on display ":0.0".     Error: couldn't find RGB GLX visual or fbconfig          Xlib:  extension "GLX" missing on display ":0.0".     Xlib:  extension "GLX" missing on display ":0.0".     Xlib:  extension "GLX" missing on display ":0.0".     Xlib:  extension "GLX" missing on display ":0.0".     Xlib:  extension "GLX" missing on display ":0.0".     Xlib:  extension "GLX" missing on display ":0.0".     Xlib:  extension "GLX" missing on display ":0.0".      This is the content of `/etc/bumblebee/bumblebee.conf`:               # Configuration file for Bumblebee. Values should **not** be put between quotes          ## Server options. Any change made in this section will need a server restart     # to take effect.     [bumblebeed]     # The secondary Xorg server DISPLAY number     VirtualDisplay=:8     # Should the unused Xorg server be kept running? Set this to true if waiting     # for X to be ready is too long and don't need power management at all.     KeepUnusedXServer=false     # The name of the Bumbleblee server group name (GID name)     ServerGroup=bumblebee     # Card power state at exit. Set to false if the card shoud be ON when Bumblebee     # server exits.     TurnCardOffAtExit=false     # The default behavior of '-f' option on optirun. If set to "true", '-f' will     # be ignored.     NoEcoModeOverride=false     # The Driver used by Bumblebee server. If this value is not set (or empty),     # auto-detection is performed. The available drivers are nvidia and nouveau     # (See also the driver-specific sections below)     Driver=          ## Client options. Will take effect on the next optirun executed.     [optirun]     # The method used for VirtualGL to transport frames between X servers.     # Possible values are proxy, jpeg, rgb, xv and yuv.     VGLTransport=proxy     # Should the program run under optirun even if Bumblebee server or nvidia card     # is not available?     AllowFallbackToIGC=false               # Driver-specific settings are grouped under [driver-NAME]. The sections are     # parsed if the Driver setting in [bumblebeed] is set to NAME (or if auto-     # detection resolves to NAME).     # PMMethod: method to use for saving power by disabling the nvidia card, valid     # values are: auto - automatically detect which PM method to use     #         bbswitch - new in BB 3, recommended if available     #       switcheroo - vga_switcheroo method, use at your own risk     #             none - disable PM completely     # https://github.com/Bumblebee-Project/Bumblebee/wiki/Comparison-of-PM-methods          ## Section with nvidia driver specific options, only parsed if Driver=nvidia     [driver-nvidia]     # Module name to load, defaults to Driver if empty or unset     KernelDriver=nvidia     Module=nvidia     PMMethod=auto     # colon-separated path to the nvidia libraries     LibraryPath=/usr/lib/nvidia-current:/usr/lib32/nvidia-current     # comma-separated path of the directory containing nvidia_drv.so and the     # default Xorg modules path     XorgModulePath=/usr/lib/nvidia-current/xorg,/usr/lib/xorg/modules     XorgConfFile=/etc/bumblebee/xorg.conf.nvidia          ## Section with nouveau driver specific options, only parsed if Driver=nouveau     [driver-nouveau]     KernelDriver=nouveau     PMMethod=auto     XorgConfFile=/etc/bumblebee/xorg.conf.nouveau      The problem started when Steam suggested I should install `nvidia-331`. I did and now nothing works. I found that a number of people had issues with `bumblebee`. I tried implementing some solutions I saw but nothing has worked so far. If anyone can tell me how to fix this problem I would be most thankful. P.S. I posted the same question here http://askubuntu.com/questions/441284/optirun-problem; I am not sure if the two forums are connected. That would make this a duplicate of http://askubuntu.com/questions/441284/optirun-problem


title: When was `relatime` made the default?

text: What is the first Linux kernel release to set `relatime` as the default mount option?


title: What do I need to do in order to create a quickly-installable Debian distribution?

text: I need to build a custom Debian-based distribution to be easily and quickly installable on multiple machines. How can I build a distribution like this and package it so I can either   1. Install it via a bootable USB drive   2. Flash it onto the hard disk of the machines so no install will be necessary. I'd like to start with the smallest distro necessary, so I'm using the business-card edition (which sits at about 40MB). I have a few packages I'd like to install on it, a few configuration file changes, and a few scripts. How can I package the complete picture into an installable distribution?


title: Can't burn DVD -- incompatible format

text: I have been trying to burn a few ISOs lately with no success and have certainly used this hardware in the past, so I am not sure what's going on. I am using DVD-R media (tried multiple discs) which appears to be supported by my drive. Here is the error I received in GnomeBaker on Fedora 14 (64):               Executing 'builtin_dd if=/home/tja/Downloads/Torrents/bodhi_0.1.6.iso of=/dev/sr0 obs=32k seek=0'     :-[ PERFORM OPC failed with SK=2h/CANNOT WRITE MEDIUM - INCOMPATIBLE FORMAT]: Wrong medium type     /dev/sr0: "Current Write Speed" is 1.0x1352KBps.     :-[ WRITE@LBA=0h failed with SK=2h/CANNOT WRITE MEDIUM - INCOMPATIBLE FORMAT]: Wrong medium type     :-( media is not formatted or unsupported.     :-( write failed: Wrong medium type      ...and this:               $ cdrecord -prcap     wodim: Operation not permitted. Warning: Cannot raise RLIMIT_MEMLOCK limits.     Device was not specified. Trying to find an appropriate drive...     Detected CD-R drive: /dev/cdrw     Using /dev/cdrom of unknown capabilities     Device type    : Removable CD-ROM     Version        : 5     Response Format: 2     Capabilities   :      Vendor_info    : 'Memorex '     Identification : 'DVD+/-DLRWL1 F16'     Revision       : 'BWSB'     Device seems to be: Generic mmc2 DVD-R/DVD-RW.          Drive capabilities, per MMC-3 page 2A:            Does read CD-R media       Does write CD-R media       Does read CD-RW media       Does write CD-RW media       Does read DVD-ROM media       Does read DVD-R media       Does write DVD-R media       Does not read DVD-RAM media       Does not write DVD-RAM media       Does support test writing            Does read Mode 2 Form 1 blocks       Does read Mode 2 Form 2 blocks       Does read digital audio blocks       Does restart non-streamed digital audio reads accurately       Does support Buffer-Underrun-Free recording       Does read multi-session CDs       Does read fixed-packet CD media using Method 2       Does not read CD bar code       Does read R-W subcode information       Does not return R-W subcode de-interleaved and error-corrected       Does read raw P-W subcode data from lead in       Does return CD media catalog number       Does return CD ISRC information       Does support C2 error pointers       Does not deliver composite A/V data          ...      more info:                    $ dvd+rw-mediainfo /dev/sr0     INQUIRY:                [Memorex ][DVD+/-DLRWL1 F16][BWSB]     GET [CURRENT] CONFIGURATION:      Mounted Media:         11h, DVD-R Sequential      Media ID:              RITEKF1           Current Write Speed:   4.0x1385=5540KB/s      Write Speed #0:        4.0x1385=5540KB/s      Write Speed #1:        2.0x1385=2770KB/s      Write Speed #2:        1.0x1385=1385KB/s     GET [CURRENT] PERFORMANCE:      Write Performance:     4.0x1385=5540KB/s@[0 -> 0]      Speed Descriptor#0:    00/0 R@3.2x1385=4432KB/s W@4.0x1385=5540KB/s      Speed Descriptor#1:    00/0 R@3.2x1385=4432KB/s W@2.0x1385=2770KB/s      Speed Descriptor#2:    00/0 R@3.2x1385=4432KB/s W@1.0x1385=1385KB/s     READ DVD STRUCTURE[#10h]:      Media Book Type:       00h, DVD-ROM book [revision 0]      Legacy lead-out at:    2298496*2KB=4707319808     READ DVD STRUCTURE[#0h]:      Media Book Type:       25h, DVD-R book [revision 5]      Last border-out at:    2045*2KB=4188160     READ DISC INFORMATION:      Disc status:           blank      Number of Sessions:    1      State of Last Session: empty      "Next" Track:          1      Number of Tracks:      1     READ TRACK INFORMATION[#1]:      Track State:           invisible incremental      Track Start Address:   0*2KB      Next Writable Address: 0*2KB      Free Blocks:           2297888*2KB      Track Size:            2297888*2KB     READ CAPACITY:          0*2048=0      Does anyone have any ideas as to what caused this? I just reinstalled Fedora today (for other reasons) and I am still unable to burn a DVD. I am using Memorex DVD-R discs, and have tried different ones. The drive appears to read media just fine. Thanks!


title: Bash Array does not store correctly

text: I have a problem with my bash array I was trying to read the file however the array allocated it in array[1] instead of 0               #!/bin/bash     index=0     INPUT=BookDB.txt     OLDIFS=$IFS     IFS=:     i=0     book=()     [ ! -f $INPUT ] && { echo "$INPUT file not found"; exit 99; }     while read bookname author price quantity sold     do     #echo "BookName : $bookname"     #echo "Author : $author"     #echo "Price : $price"     #echo "Quantity : $quantity"     #echo "Sold : $sold"              book+=("$bookname")         author+=("$author")         price+=("$price")         quant+=("$quantity")         sold+=("$sold")            done < $INPUT      IFS=$OLDIFS                     # Use c style for loop      # get total subscripts in an array      total=${#book[*]}      #       for (( i=0; i<=$(( $total -1 )); i++ ))       do        echo $i "${book[$i]} "      done           total=${#author[*]}      #       for (( i=0; i<=$(( $total -1 )); i++ ))      do       echo  $i "${author[$i]} "      done      Here is the output of the file Book               0 Harry Potter - The Half Blood Prince      1 The little Red Riding Hood      2 Harry Potter - The Phoniex      3 Harry Potter - The Deathly Hollow      4 Little Prince      5 Lord of The Ring      6 Three Little Pig      7 All About Ubuntu      8 Catch Me If You Can      9 Happy Day      Author               0       1 J.K Rowling      2 Dan Lin      3 J.K Rowling      4 Dan Lin      5 The Prince      6 Johnny Dept      7 Andrew Lim      8 Ubuntu Team      9 Mary Ann      10 Mary Ann       Somehow the array for author[0] is empty


title: What does the -e do in a bash shebang?

text: I have a bash script with the following:               #!/bin/bash -e          egrep "^username" /etc/passwd >/dev/null      if[ $? -eq 0 ]      then        echo "doesn't exist"      fi      This script will not run without the -e. What does the `-e` do for this script? Also, what does the `$?` do in this context?


title: Mount entry in fstab when connect to a network

text: I have an entry in fstab (Opensuse) which mounts a samba filesystem:               //10.39.52.2/Company /media/share cifs credentials=/home/user/file,rw,nounix,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0      but this mount always fails on startup since connection to network happens at a later moment. How can I **write a rule** that, each time I connect to a network — the ESSID could be the trigger for wifi, what about cable? — tries to `mount` `/media/share`?


title: Question about openSuse server

text: Just wondering. Does openSUSE allow to perform a minimal (server-like) installation? (No GUI for end-users, Just like Debian and CentOS with their minimal ISOs)


title: insert a blank page into a PDF using ghostscript or pdftk

text: I have a PDF file that needs a blank page inserted into it every so often. The pattern is unpredictable, so I need a command that will allow me to fit one in wherever necessary.


title: How to find undeletable files that were removed?

text: I just created a file:               touch myFile      Made it "undeletable":               chattr +u myFile      and removed it:               rm myfile      How can I get it back? What is the purpose of "u"? Is it used?


title: How to get the JSON STRING from the given string

text: I have a string given below. I just need to get the first **accountHeader** (bolded) JSON string, I tried everything.. It didn't work. Can you help me to get the data?               <START AdditionalInfo#:>[FormsGenerationServiceImpl::,  accountNumber:ABC07667 ,  [Source System Request  : {"Info":{"Holder": {"nameData": {"shortName": "McIntosh"}},**"accountHeader": {"a": "Y","b": "1","c": "4","draft": "P","e": "Y0000DU9","f": "T","g": "1"}**,"forms": {"maskSSN": "N","deliverForms": "G","selectedForms": {"T5": ["F10"],"T1": ["F1403"],"T2": ["F100001401"]}},"accountHeader": {"a": "Y","b": "1","c": "4","d": "HWA","draftRequestType": "P","e": "Y0000DU9","f": "T","g": "1"}}} ], null]<AdditionalInfo#: END>      My output should be               "accountHeader": {"a": "Y","b": "1","c": "4","draft": "P","e": "Y0000DU9","f": "T","g": "1"}


title: Using !n in script or interactive mode

text: I add to `~/.bashrc` the following code:               test_exclamation () {       printf %s "$READLINE_LINE" | xargs echo     }     bind -x '"\eX": test_exclamation'      I write to bash prompt buffer               $ !1700      If I press `Enter`, then command with number 1700 from history performs. If I press `Shift`+`Alt`+`X`, I got an output:               !1700      How to change `test_exclamation` function to print command under number 1700?


title: RaspberryPi GPIO FreeBSD assignment

text: First my Assignment: I'm a beginner with BSD and low level peripherals like GPIO etc., and I need to toggle Raspberry GPIO Pins from a C programme on BSD. I am Using this BSD Image i took from here: FreeBSD - easiest way to install on my RPi? and try toggling the GPIO Pins, respectively trying to set a Pin to high by calling MMAP to access the Registers directly form C code. I took the addresses from the BCM2835 Datasheet, Chapter 1.2.3, page 6 "physical Addresses". Is my assumption right that it does not matter if I use Raspbian or any other OS - these physical addresses will stay the same, as they are given by the Chip? I tested my Code as root with Raspbian and it worked fine, I also compiled the code with gcc in BSD, no errors. The programme is running as root, the system does not crash or freeze but there is nothing happening in the pins. I also discovered there is a gpioc0 device under /dev, but i cant find how to use it. anyone any links or hints? :/ (This is part of an assignment, vital to my grade. I might have overestimated myself by choosing this.)


title: Tar compress folder without specifying the filename

text: Is it possible to use tar to compress a folder without giving the filename of the archive to store in? Normally you use:               tar -zcvf prog-1-jan-2005.tar.gz /home/jerry/prog      I want to do something like               tar -zcvf /home/jerry/prog      and have it create prog.tar.gz


title: Static files give ever changing checksum value on Linux

text: When I cksum large files (150MB) they will often report different checksums on each call.               $ cksum test3     1233504235 170213376 test3     $ cksum test3     825031809 170213376 test3     $ cksum test3     189847968 170213376 test3     $ cksum test3     1089532177 170213376 test3      This happens consistently in **/dev/shm** but I've seen it in disk based ext3 filesystems as well. I am confident the files are **not** being written to at the time of the checks. It's been an issue since I upgraded from Debian 6 32bit to 7 32bit but I had similar issues on 64bit Debian 6 (reinstalled 32bit to cure the problem). The memory has passed multiple Memtest86+ runs. The are no indications of filesystem corruption. Could there be a BIOS setting; kernel parameter or filesystem flag that I need to set. filesystem flags are:               tmpfs on /run/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=2040740k)     /dev/disk/by-uuid/b236be25-6fe1-49f6-83a3-d295643666a4 on / type ext3 (rw,relatime,errors=remount-ro,barrier=1,data=ordered)      This is driving me nuts as my data files keep getting corrupted and I can't use the system. **UPDATE** Booting off the previous kernel (2.6.32) stops the file corruptions. It also reduces the memory from 4GB to 3GB even tho both kernels report 'getconf LONG_BIT' as 32


title: IPtables : Limit number of new ssh connections per minute

text: I need to ensure on my server that maximum new ssh connections per minute are not more then 5.               sudo /sbin/iptables -A INPUT -p tcp --syn --dport 22 -m connlimit --connlimit-above 5 -j REJECT      Above IPtables rule work for me, but it will not allow new connections after one minute. Any pointers how to achieve this?


title: Why does bash add single quotes to unquoted failed pathname expansions in a command before executing it?

text: I was exploring the tracing of commands using `set -x` (`set +x` to unset) in `bash`: > Print a trace of simple commands, for commands, case commands, select > commands, and arithmetic for commands and their arguments or associated word > lists after they are expanded and before they are executed. The value of the > PS4 variable is expanded and the resultant value is printed before the > command and its expanded arguments. Now consider the following, tracing the use of the the bash builtin `echo \\[-neE\\] \\[arg …\\]` command with and _without_ quotes:               # set -x        # what I typed     # echo 'love'   # ...     + echo love     <--(1) the trace     love            # the output          # echo love?    # note the input contains no quote whatsoever     + echo 'love?'  <--(2) note the trace contains quotes after returning word     love?           # i.e. failed to find any file           # echo 'love?'  # note the input contains single quotes     + echo 'love?'  <--(3) traces like (2)     love?          # touch loveu   # we create a file that matches the love? pattern     + touch loveu          # echo love?    # of course now, the pattern matches the created file now     + echo loveu    <--(4) indeed it finds it and expands to name     loveu           # the name is echoed      So `?` is indeed interpreted in this case as a special character used for _pattern matching_ one single character in _pathname expansion_. Sure enough, once a file matching the pattern was created in the current directory, the match occurred and the name of the file was printed. Of course this behavior is documented: > If no matching file names are found, and the shell option nullglob is > disabled, the word is left unchanged. But the thing is that the word in (2) is unquoted `love?` not `'love?'`. The trace shows the state before command execution but _after_ expansion, and as we're seeing there is pathname expansion because of `?` and there were no matches in the first case(2) we used the special character. So the single quotes appear in that case, just as when we use single quotes(3) ourselves with the same string? Whereas in the other cases there was either a literal or the match was found and accordingly "replaced" the pattern in the command. This seems to be what is meant in the manual section on quote removal right after expansion: > After the preceding expansions, all unquoted occurrences of the characters > ‘\’, ‘'’, and ‘"’ that _did not result_ from one of the above expansions are > removed. (my italics) So here(2) we have unquoted occurrences of `'` which result from the prior expansion. I did not put them there; bash did, and now they're _not removed_ - and we're just before the execution of the command. * * * _Similar illustration with`for`_ Consider this list used in a `for name [ [in [words …] ] ; ] do commands; done` loop1 , with no matching file:               # for i in love love? 'love?'; do echo $i; done     + for i in love 'love?' ''\''love?'\'''     + echo love     love     + for i in love 'love?' ''\''love?'\'''     + echo 'love?'     love?     + for i in love 'love?' ''\''love?'\'''     + echo 'love?'     love?      So the `echo` command behavior is quite the same but in the case of the items in the `for` construct, it seems like it's trying to... escape itself quoting my quotes?? I'm uncertain... * * * **Questions**   * Why is an unquoted failed pathname expansion pattern denoted with `single quotes` in the context(2); expansion is completed anyway and we're going to execute? Again, we've completed expansion already and the pattern failed - nothing should have to expand anymore. I guess what I'm asking is why do we care at this point - the point we're at is just before 3.7.2-4 in the bash manual. Why isn't this left "as is" and expansion is simply turned off for command execution i.e. something like `set -f`?   * (What is the `for` loop doing with my single quoted item in the list?) * * * 1. When using such a word list construct with for, it's really a list of items and the values are for convenience really as I find `t="0"; for i in 0 0 0 0; do let t++; echo "yes, this is really $t times"; done` quite convincing.


title: What is the difference in CPU utilization between 'ps aux' and 'ps -ef'?

text: I use Ubuntu 12.04.1 Linux. I see a difference between `%CPU` and `C` output format of `ps` command for a process. It is not clearly noted in the `ps` man page. Man pages says:                 CODE       HEADER  DESCRIPTION       %cpu       %CPU    cpu utilization of the process in "##.#" format. Currently,                           it is the CPU time used divided by the time the                           process has been running (cputime/realtime ratio),                          expressed as a percentage. It will not add up to 100%                          unless you are lucky. (alias pcpu).       c          C       processor utilization. Currently, this is the integer                                            value of the percent usage over the lifetime of the                          process. (see %cpu).      So basically it should be the same, but it is not:               $ ps aux | head -1     USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND     $ ps aux | grep 32473     user     32473  151 38.4 18338028 6305416 ?    Sl   Feb21 28289:48 ZServer -server -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=./log                $ ps -ef | head -1     UID        PID  PPID  C STIME TTY          TIME CMD     $ ps -ef | grep 32473     user     32473 32472 99 Feb21 ?        19-15:29:50 ZServer -server -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=./log       The top shows 2% CPU utilization in the same time. I know the 'top' shows the current CPU utilization while `ps` shows CPU utilization over the lifetime of the process. I guess the lifetime definition is somewhat different for these two format options.


title: Loop over a file and read values from two columns into variables

text: I have a file (`data.dat`) which contains 3 columns. I want to read in two of them with the shell script and fill the contents into a template file. The file looks like this:               12 180 2390     14 177 2210     16 173 2130     ...      So far I can do that with one variable (which is column 2 in the data-file) as follows:               for a in `cat data.dat | gawk '{print $2}'`; do      sed s/A/$a/ daily.template daily.template > daily.inp     done      Now I want to read in column 3 as well and give the according value (b) of the same line as column 2 to the same template. The template contains variables called "A" and "B". I cannot do a nested for loop as I don't want to iterate each value of a over each value of b. How can I achieve this? **Addition:** First of all thanks for all your help! Yes, it might be more easy to understand if I give more information about the daily.template file. It is looking similiar to:               dens_column O3 300.00     dens_column h20 B     sza A     day_of_year 172     output sum     ...      A and B should be replaced in every loop over the lines. The first column in data.dat does not mean anything, it just displays the time of a measurement and this parameter is not needed in "daily.inp". I just want one "daily.inp" for each line where A and B are replaced with the according value of column 2 and 3 in the according line. So a daily.inp file like:               dens_column O3 300.00     dens_column h20 2390     sza 180     day_of_year 172     output sum     ...      Then the next file separate:               dens_column O3 300.00     dens_column h20 2210     sza 177     day_of_year 172     output sum     ...      And so on...


title: X11 protocol recorder

text: I'm wondering if there is a tool (or a tool-set) to record every single X11 message received from the server, to post-render them in a movie. I think this could be very useful to create screen-cast: theoretically, it should reproduces perfectly the capture and, once serialized to a stream, it should be less memory-expensive w.r.t. a classic video (I just suppose it). Does anybody know anything about it?


title: NetworkManager controls my wireless card, but it can't find any networks?

text: I have a Broadcom wireless chip which I've managed to wrestle into working with Debian GNU/Linux (I'm on Sid, if it matters). The interface is definitely there:               612 ± ip link         1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT          link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00     2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT qlen 1000         link/ether 3c:07:54:06:e0:86 brd ff:ff:ff:ff:ff:ff     3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DORMANT qlen 1000         link/ether e4:ce:8f:40:ec:c4 brd ff:ff:ff:ff:ff:ff     alex-debian ओम् ~:(14h55m|git@master)     613 ±        I have GNOME, and hence NetworkManager, up and running. When I look at GNOME Control Center in the Network pane, the Wireless tab gives information but doesn't list any wireless networks. I've tried connecting to a hidden network, just in case, but this didn't work. I know my network isn't hidden. Edit: per this wiki page, I've added myself to the `netdev` group, and relogged into my session, with no result. How can I start diagnosing the source of this problem?


title: What does a niceness value of (-) mean?

text: According to the man page, and wikipedia; `nice` ranges from -20 to 20. Yet when I run the following command, I find some processes have a non numerical value such as (-). See the sixth column from the left with title 'NI'. What does a niceness of (-) indicate?                ps axl       F   UID   PID  PPID PRI  NI    VSZ   RSS WCHAN  STAT TTY        TIME COMMAND     4     0     1     0  20   0  19356  1548 poll_s Ss   ?          0:00 /sbin/init     1     0     2     0  20   0      0     0 kthrea S    ?          0:00 [kthreadd]     1     0     3     2 -100  -      0     0 migrat S    ?          0:03 [migration/0]     1     0     4     2  20   0      0     0 ksofti S    ?          0:51 [ksoftirqd/0]     1     0     5     2 -100  -      0     0 cpu_st S    ?          0:00 [migration/0]     5     0     6     2 -100  -      0     0 watchd S    ?          0:09 [watchdog/0]     1     0     7     2 -100  -      0     0 migrat S    ?          0:08 [migration/1]     1     0     8     2 -100  -      0     0 cpu_st S    ?          0:00 [migration/1]     1     0     9     2  20   0      0     0 ksofti S    ?          1:03 [ksoftirqd/1]     5     0    10     2 -100  -      0     0 watchd S    ?          0:09 [watchdog/1]     1     0    11     2 -100  -      0     0 migrat S    ?          0:05 [migration/2]      I've checked 3 servers running: Ubuntu 12.04 and CentOs 6.5 and Mac OsX 10.9. Only the Ubuntu and CentOs machines have non digit niceness values.


title: Where is trace_regmap_async_write_start() defined?

text: I am trying to port some codec code/files back to linux 3.2 and there's a function trace_regmap_async_write_start() there that doesn't seem to be defined anywhere. See here: https://gitorious.org/ti-codecs/ti- codecs/source/2a6df0d6bb1c270aba57018fad5d3cde221e4d4f:drivers/base/regmap/regmap.c I've tried to search for it but can only see references to where it's called, not defined or declared. I'm wondering whether it might be some kind of macro? Any ideas?


title: Some non-ascii characters display as dots in an application in wine

text: It looks like this: ![dots displayed](http://i.stack.imgur.com/0ARMo.png). What is wrong with this?


title: How to grab the oldest unread message from `mail` in a script?

text: In a script I am trying to finish writing now, I need to get the oldest unread message from the current user's mailbox (specifically, I need the subject line for this project). After extracting the oldest message, I also need to forward it to a different user for archive purposes. How can I extract _just_ that information in bash or Python? Would it be better to use procmail to extract the subject line into a file and then forward the message, requiring only file processing by the script? If so, how could I do that instead?


title: Remote backup of local server applying Rsnapshot

text: I have a server which uses Rsnapshot to take snapshots of folders in miscellaneous computers within a Lan. I would like to have another server located remotely that is to serve as a backup to this local server. But Rsnapshot stores its snapshots in a very special kind of folder structure, and rsync/mirroring this folder structure is not a straight forward procedure for Rsync for instance would most likely get confused and try to Rsync daily.0 remotely with daily.0 locally, but they would actually be different days in many cases. Or how does that work, is it safe/efficient to just Rsync the whole backup/snapshot folder created by Rsnapshot onto a remote server? My question is:   What is the best way to make a remote backup of an Rsnapshooting server?


title: Start up (boot) menu doesn't show other linux distro

text: I've installed arch using https://wiki.archlinux.org/index.php/Beginners_Guide I have x64 system with Ubuntu installed already and UEFI. There were no errors during the installation. However, after reboot the start up menu showed me only Ubuntu. I wonder, what might be the cause? Here is what I have: ![enter image description here](http://i.stack.imgur.com/EbLnz.png)                  Device Boot      Start         End      Blocks   Id  System     /dev/sda1         1050624   382824447   190886912   83  Linux     /dev/sda2   *        2048     1050623      524288    b  W95 FAT32     /dev/sda3       382826494  1953523711   785348609    5  Extended     Partition 3 does not start on physical sector boundary.     /dev/sda5      1946028032  1953523711     3747840   82  Linux swap / Solaris     /dev/sda6       382834688  1946025983   781595648   83  Linux


title: Installled openSuse and now can't boot from USB or DVD

text: I've just installed openSuse 13.1 and, while it's great, now I want to try Mageia 4. Problem is that after installing openSuse my machine (Lenovo G560) won't boot from a USB stick or from the DVD drive. I copied an ISO of Mageia to a USB stick. I then set the boot order in the bios to boot from the USB stick first but rebooting just skips the USB and and boots from the HD. Same thing happens with a DVD image of the Mageia.


title: Percent in $PATH environment variable

text: My $PATH looks like this:               /home/torbjorr/deployed/vector/x86_64-GNU%2fLinux:/home/torbjorr/deployed/typewriter/x86_64-GNU%2fLinux:/home/torbjorr/deployed/mustudio/x86_64-GNU%2fLinux:/home/torbjorr/deployed/mathext/x86_64-GNU%2fLinux:/home/torbjorr/deployed/doxymax/x86_64-GNU%2fLinux:/home/torbjorr/deployed/c2tex/x86_64-GNU%2fLinux:/home/torbjorr/deployed/x86_64-GNU%2fLinux/wand:/home/torbjorr/deployed/x86_64-GNU%2fLinux/spellesc:/home/torbjorr/deployed/x86_64-GNU%2fLinux/projinit:/home/torbjorr/deployed/x86_64-GNU%2fLinux/herbs:/home/torbjorr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games      In bash, I can without problem invoke wand located in               /home/torbjorr/deployed/x86_64-GNU%2fLinux/wand      like               $ wand     (i) Mål från "main.cpp" har registrerats     (i) Skapar katalog "__wand_targets_dbg"     (i) Kör g++ "main.cpp" -fpic -L"/home/torbjorr/deployed"  -g -Wall -std=c++11 -I"/home/torbjorr/deployed" -o "__wand_targets_dbg/cb-template      However, in bourne shell compatibility mode, wand cannot be found:               $ wand     sh: 2: wand: not found      It seems like the problem is the % sign in these paths. This sign has been added by URL encoding so the name "GNU/Linux" can be used in the directory name even though it is not a valid filename. Is it possible to get the name working in sh, or make the sh command work as bash. That is, make bash behave the same even though it was invoked with the /bin/sh command, which symlinks to bash anyway.


title: Is it possible to make Linux to autocompile my LaTeX-document

text: Is it possible to do the following in Linux? I'm writing a particular LaTeX- file using Nano. I would like to have my document compiled every time I save my document, i.e. I press F3.