title: Emacs how do I interpret this Lisp debugger report

text: I am trying to make up a `.emacs` file on my new Fedora 20 computer, and get this line when I use `emacs -debug-init &`. I expect it to be a trivial mistake, but I find the help on this too detailed and confusing, so can anyone please interpret it for me and say what the error is likely to be?                  Debugger entered--Lisp error: (file-error "Cannot open load file" "browse-kill-ring")           require(browse-kill-ring)           eval-buffer(#<buffer  *load*> nil "/home/Harry/.emacs" nil t)  ; Reading at buffer position 2772           load-with-code-conversion("/home/Harry/.emacs" "/home/Harry/.emacs" t t)           load("~/.emacs" t t)           command-line()           normal-top-level()      And here is my .init file:               ;; Uncomment next line to give response to check .emacs loaded     (warn "Loading .emacs")     ;; -----------------------------------------------------------------------     ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;     ;     ; Set up colors      ;          (defun good-colors ()       (progn          (set-background-color "DimGray")          (set-foreground-color "LightGray")          (set-cursor-color "DarkSlateBlue")          (set-border-color "DimGray")          (set-mouse-color "DarkSlateBlue")               (set-face-background 'default "DimGray")          (set-face-background 'region "DarkSlateGray")          (set-face-background 'highlight "DarkSlateBlue")          (set-face-background 'modeline "DarkSlateBlue") ;;; CornflowerBlue")               (set-face-foreground 'default "LightGray")          (set-face-foreground 'region "Ivory")          (set-face-foreground 'highlight "LightGray")  ;;; DimGray")          (set-face-foreground 'modeline "LightGray")          ))          ;; (good-colors)  ;; calls the previously-defined function          ;; ====================     ;; insert date and time          (defvar current-date-time-format "%a %b %d %H:%M:%S %Z %Y"       "Format of date to insert with `insert-current-date-time' func     See help of `format-time-string' for possible replacements")          (defvar current-time-format "%a %H:%M:%S"       "Format of date to insert with `insert-current-time' func.     Note the weekly scope of the command's precision.")          (defun insert-current-date-time ()       "insert the current date and time into current buffer.     Uses `current-date-time-format' for the formatting the date/time."            (interactive)            (insert "==========\n")     ;       (insert (let () (comment-start)))            (insert (format-time-string current-date-time-format (current-time)))            (insert "\n")            )          (defun insert-current-time ()       "insert the current time (1-week scope) into the current buffer."            (interactive)            (insert (format-time-string current-time-format (current-time)))            (insert "\n")            )          (global-set-key "\C-c\C-d" 'insert-current-date-time)     (global-set-key "\C-c\C-t" 'insert-current-time)          ;; Set current line as title in my Hints file, e.g. "TITLE" becomes ..     ;;             -------- TITLE --------          (fset 'title        (lambda (&optional arg) "Keyboard macro." (interactive "p") (kmacro-exec-ring-item (quote ([1 45 45 45 45 45 45 45 45 32 5 32 45 45 45 45 45 45 45 45 1 escape 120 99 101 110 116 tab 108 105 tab return] 0 "%d")) arg)))          (global-set-key "\C-c\C-T" 'title)          ;; * Customization defaults in this file     ;; From: http://mwolson.org/notes/PlugEmacsConfPresentation.html     ;;     ;; Uncomment this to cause the Tab key to insert spaces instead of     ;; tabs.  The default is to insert tabs.     ;;      (setq-default indent-tabs-mode nil)     ;;     ;; Enable browsing of kill ring (that is, recently-killed/cut text)     ;; when you hit M-y     (require 'browse-kill-ring)     (defadvice yank-pop (around kill-ring-browse-maybe (arg))       "If last action was not a yank, run `browse-kill-ring' instead."       (if (not (eq last-command 'yank))           (browse-kill-ring)         ad-do-it))     (ad-activate 'yank-pop)     ;;     ;;  - Put backup data into the ~/.emacs.d/backup directory, instead of     ;;    putting backup files in the current directory.  I find this to     ;;    be much cleaner.     ;;          (custom-set-variables       '(backup-directory-alist (quote (("." . "~/.emacs.d/backup"))))     )          (custom-set-variables      ;; custom-set-variables was added by Custom.      ;; If you edit it by hand, you could mess it up, so be careful.      ;; Your init file should contain only one such instance.      ;; If there is more than one, they won't work right.      '(inhibit-startup-buffer-menu t)      '(inhibit-startup-screen t))     (custom-set-faces      ;; custom-set-faces was added by Custom.      ;; If you edit it by hand, you could mess it up, so be careful.      ;; Your init file should contain only one such instance.      ;; If there is more than one, they won't work right.      )      * * * Solved: I followed the answers from @sds and @Drew, installed the `browse-kill- ring.el` package in my `.emacs.d` directory, and used the information in: http://ergoemacs.org/emacs/emacs_installing_packages.html to put the following in my `.init` file               ;; Tell emacs where is your personal elisp lib dir     ;; this is default dir for extra packages     (add-to-list 'load-path "~/.emacs.d/")          ;; load the packaged named xyz.     (load "browse-kill-ring") ;; best not to include the ending “.el” or “.elc”      That put everything right, thanks @sds and @Drew, pity I can't accept both answers.


title: Init gix-annex additional repo with existing files

text: I configured git-annex to keep track of a directory containing several GB of data. Its content is replicated on an S3 remote, so I can drop some files to free some space and get them back when I need them. I also have another computer where I would like to do the same thing. This other computer already contains most of the files that are stored on the S3 remote. How can I tell git-annex to init a new repository on this other computer without downloading from S3 the files that it can find in the local directory?


title: Automatic shutdown after startup

text: I'm a new newbie Linux Mint user but I have a lot of desire to learn. I played a little with the shutdown command typing:               sudo shutdown +20      and then:               sudo shutdown -c      I then manually hibernate my pc because I had to go out. Now I'm back and I found that I could no longer turn on the pc because once Linux is started, I can see the desktop for 1 second, and then my pc shutdown. How can I solve this?


title: USB to Serial in Chrubuntu - /dev/ttyUSB0 missing

text: The usbserial stuff has been working so well for me in Ubuntu for a number of years that I have almost forgotten how to troubleshoot it. I just installed Chrubuntu, however, and now my usbserial is not just magically working. Here's the info I think you will need: uname -a               Linux ChrUbuntu 3.4.0 #1 SMP Sun Aug 26 19:17:55 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux      I would normally expect to see the cp210x driver. (As I will show below, modprobe doesn't seem to load it.)               root@ChrUbuntu:/lib/modules/3.4.0/kernel/drivers/usb/serial# ls     option.ko  pl2303.ko  qcserial.ko  sierra.ko  usb_wwan.ko      lsusb               Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub     Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub     Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub     Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub     Bus 001 Device 003: ID 04ca:3006 Lite-On Technology Corp.      Bus 001 Device 004: ID 064e:d251 Suyin Corp.      Bus 002 Device 003: ID 10c4:ea60 Cygnal Integrated Products, Inc. CP210x Composite Device      dmesg               [  649.111665] usb 2-1.3: new full-speed USB device number 3 using ehci_hcd     [  649.199149] usb 2-1.3: New USB device found, idVendor=10c4, idProduct=ea60     [  649.199161] usb 2-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3     [  649.199169] usb 2-1.3: Product: CP2103 USB to UART Bridge Controller     [  649.199175] usb 2-1.3: Manufacturer: Silicon Labs     [  649.199179] usb 2-1.3: SerialNumber: 0001      after disconnecting the device, one new line is logged in dmesg:               [ 2858.730137] usb 2-1.3: USB disconnect, device number 3      lsmod               Module                  Size  Used by     fuse                   59885  2      rfcomm                 25259  0      snd_hda_codec_hdmi     29062  1      snd_hda_codec_realtek    49177  1      memconsole             12352  0      snd_hda_intel          24601  3      snd_hda_codec          71435  3 snd_hda_codec_hdmi,snd_hda_codec_realtek,snd_hda_intel     snd_hwdep              12351  1 snd_hda_codec     ath9k                 118119  0      uvcvideo               59368  0      videodev               81368  1 uvcvideo     snd_pcm                61468  3 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec     videobuf2_core         25280  1 uvcvideo     videobuf2_vmalloc      12313  1 uvcvideo     videobuf2_memops       12475  1 videobuf2_vmalloc     mac80211              318094  1 ath9k     ath9k_common           12689  1 ath9k     ath9k_hw              351731  2 ath9k,ath9k_common     sdhci_pci              16409  0      sdhci                  25037  1 sdhci_pci     ath                    21105  3 ath9k,ath9k_common,ath9k_hw     mmc_core               71579  2 sdhci_pci,sdhci     btusb                  16409  0      joydev                 16409  0      nm10_gpio              12313  0      tg3                   118809  0      snd_timer              21055  1 snd_pcm     snd_page_alloc         12757  2 snd_hda_intel,snd_pcm     bluetooth             143138  13 rfcomm,btusb     cfg80211              141223  3 ath9k,mac80211,ath     rtc_cmos               16409  0       Assuming the module I need for the CP210x driver is usbserial, I tried this:               root@ChrUbuntu:/# modprobe usbserial     root@ChrUbuntu:/#           root@ChrUbuntu:/# lsmod | grep usbserial     root@ChrUbuntu:/#       The expected /dev/ttyUSB0 is missing (both before and after trying modprobe usbserial): root@ChrUbuntu:/dev# ls               agpgart           ecryptfs  loop4               port    sda2    tpm0   tty19  tty30  tty42  tty54  tty9     vcs6     block             fb0       loop5               ppp     sda3    tty    tty2   tty31  tty43  tty55  uinput   vcs7     bsg               fd        loop6               ptmx    sda4    tty0   tty20  tty32  tty44  tty56  urandom  vcsa     bus               full      loop7               pts     sda5    tty1   tty21  tty33  tty45  tty57  usbmon0  vcsa1     char              fuse      loop-control        random  sda6    tty10  tty22  tty34  tty46  tty58  usbmon1  vcsa2     chromeos-low-mem  hpet      mapper              rfkill  sda7    tty11  tty23  tty35  tty47  tty59  usbmon2  vcsa3     console           input     mcelog              rtc     sda8    tty12  tty24  tty36  tty48  tty6   v4l      vcsa4     core              kmsg      mem                 rtc0    sda9    tty13  tty25  tty37  tty49  tty60  vcs      vcsa5     cpu               log       net                 sda     shm     tty14  tty26  tty38  tty5   tty61  vcs1     vcsa6     cpu_dma_latency   loop0     network_latency     sda1    snd     tty15  tty27  tty39  tty50  tty62  vcs2     vcsa7     disk              loop1     network_throughput  sda10   stderr  tty16  tty28  tty4   tty51  tty63  vcs3     video0     dm-0              loop2     null                sda11   stdin   tty17  tty29  tty40  tty52  tty7   vcs4     zero     dri               loop3     nvram               sda12   stdout  tty18  tty3   tty41  tty53  tty8   vcs5      I would normally use udev rules like this and I would use ttyUSB0 as my port for the device of interest now. Obviously, these won't work if ttyUSB* is missing, as it is now.               KERNEL=="ttyUSB[0-9]*", DRIVERS=="cp210x", ATTRS{interface}=="CP2103 USB to UART Bridge Controller", MODE="0666", NAME:="ttyUSB0"     KERNEL=="ttyUSB[0-9]*", DRIVERS=="pl2303", SUBSYSTEMS=="usb-serial", MODE="0666", NAME:="ttyUSB1"      The solution apparently is to build kernel modules usbserial.ko and cp210x.ko. However, ChrUbuntu is based on Ubuntu 12.04 but with kernel 3.4. I can't seem to figure out all the variables required to build the modules in ChrUbuntu.


title: Where to find default bindings for special keys

text: My keyboard has special keys, like for sound muting or launching the web browser. With my stock Xfce 4.10 installation on Debian testing (Jessie) these keys are automatically mapped, so I didn't needed to configure them manually. However, I would like to change some of these bindings to custom commands. I might do so via the keyboard settings in Xfce, but I would rather change it the "official" way. Any ideas how to achieve this?


title: Can't create partition table on SSD with Slackware 14

text: I'm trying to install Slackware 14 from a DVD. It boots fine from the DVD. When I try to use `fdisk` or `cfdisk` to create the Linux and swap partitions on the SSD, it complains about a missing or unknown partition table. In either program, if I create the Linux and swap partitions and write them to the disk and then quit, it says disk contents changed and complains about the partition table. Using either program again still complains and shows _no_ partitions. I have used Slackware DVDs in the past on hard (spinning) drives with no problem.


title: What is the `[` program that resides in my system's /bin?

text: I was recently browsing my Fedora's `/bin` folder and noticed a binary named `[`. I did try to search the internet for more information on that, but I couldn't find anything useful. Running it through `strace` doesn't seem to produce anything useful for closer inspection too. What is that? Should I be alarmed? Could it be the result of a system compromise? Should I run it? Does it belong to any package?


title: Basic script in Angstrom Linux running on a Beaglebone Black

text: On my embedded system, I can toggle a user led with: `echo > 1 sys/class/leds/beaglebone:green:usr2/value`. Similarly, I can find the value of a GPIO (gpio60) (set to input), with `more sys/class/gpio/gpio60/value` I've been trying to write a script to set the state of the user led based on that of the input. The following produces no errors, but doesn't actually work.               #!/bin/bash     cd ../../../     if [ sys/class/gpio/gpio60/value = 0 ]; then     echo 1 > sys/class/leds/beaglebone:green:usr2/brightness;     [else echo 0 > sys/class/leds/beaglebone:green:usr2/brightness;]     fi


title: Make Linux forbid colons in file names on NTFS partitions

text: Does Linux really allow colons in file names, even on NTFS partitions? Why is that? And is there any option to set it straight, and **do not** allow colons (and other characters restricted by Windows) in file names when working with a NTFS partition? And **do** allow it for Ext2, Ext3 and Ext4 partitions? Linux wrote some files with colons in their names to my main NTFS partition where I have Windows installed. I have since uninstalled Linux, but now I can't open these files in Windows.


title: Which process is occupying a certain pseudo terminal pts/X?

text: On Linux: Normally pseudo terminals are allocated one after the other. Today I realized that even after a reboot of my laptop the first opened terminal window (which was always `pts/0` earlier) suddenly became `pts/5`. This was weird and made me curious. I wanted to find out which process is occupying the device `/dev/pts/0` and had no luck using common tools like `who` and `lsof` or even `ps` as suggested in the comment:               pf@pfmaster-P170EM:pts/6 /var/log 1115> ps auxww | grep pts/0      pf        7042  0.0  0.0  17208   964 pts/6    S+   12:32   0:00 grep --color=auto pts/0      What I'm missing here? Possibly infected by a rookit?


title: Trouble Running Emacs Daemon on Ubuntu Boot

text: I want to run emacs as a daemon, on Ubuntu bootup. The daemon call works, and the init script works, when called in a logged in session. However, when I boot my system, the emacs init script doesn't seem to have been run.   * _**i)_** I can't call `emacsc`, and    * _**ii)_** there's no evidence in `/var/logs/boot*`.   * _**iii)_** in my shell, if I run `emacs --daemon`, I can then use the emacs client Is there any special wand-waving to be done? Or any better way to trouble- shoot this issue?


title: Cross-Distro Compatibility- What's stopping it?

text: For example, why can't I run Ubuntu programs on Fedora or Arch, and vice versa? And on the same note, why can't I use `apt-get` in Fedora or `pacman` in LFS? And what about `.deb` and `.rpm` files? Could someone please explain for a complete Linux novice?


title: How do I make Wheezy see my sound card?

text: I'm working on a relatively clean install of Wheezy - relatively as I installed it today and have been installing packages for quite some time. I previously had Ubuntu which played sounds, so it's not a hardware problem. I have little information initially as I've tried all sorts of things found online, but can't remember what I did. So please, do ask me to include info in the comments. The problem: Wheezy (or alsa or gstreamer or whatever handles the sound) doesn't see my sound card. It _does_ see it as a piece of hardware, but it doesn't see it as a sound card. For example, I can see it when I run `lspci -v` (together with the Nvidia HDMI output). Here goes: > Audio device: Advanced Micro Devices [AMD] nee ATI SBx00 Azalia (Intel HDA) > > Subsystem: Giga-byte Technology Device a002   >  Flags: bus master, slow devsel, latency 32, IRQ 16   >  Memory at fe024000 (64-bit, non-prefetchable) [size=16K]   >  Capabilities: < access denied >   >  Kernel driver in use: snd_hda_intel `alsamixer` displays a nice bar, but when I try to select the sound card (`HDA ATI SB`) it fails with `cannot load mixer controls: Invalid argument`. During boot, alsa fails to start and displays a bunch of `hw error invalid argument` messages (or something similar, the text goes too fast to read). Basic checks: I am in the `audio` group, nothing is muted, the speakers are plugged in & set to a reasonable volume. Before I did anything else I fiddled with the Sound settings (as I had previously done on Ubuntu) and the PulseAudio volume control, PulseAudio manager (which only sees `Built-in Audio Analog Stereo` and HDMI), and of course the gnome sound settings. How do I make Alsa work with my sound card?


title: HTML client for X11 ssh forwarding?

text: Not totally sure if this is the right place but here goes. I understand that you are able to use X11 to ssh to GUI's and view them, without the server having a full on GUI system running/installed like gnome or something. My end goal is to be able to "broadcast" my coding sessions online, so people can view them online. Right now I have set it up so that a restricted tmux session will basically always be mirroring my own personal tmux coding session window. So if you ssh onto the server on a restricted account, you can hop onto the restricted session and follow my coding. However, I want to be able to let people watch this from their browser. I suspect that the best way is to have some terminal emulator on x11 running on my server attached to the tmux session..and then somehow have the browser view that terminal emulator? I'm not really too familiar with this domain, so does anyone know if this is possible? Or is there a better approach I should be taking? Note that I code entirely on a remote headless server that I ssh onto.


title: linux distro with generic hard drive naming

text: I manily use SUSE Linux, however it stores all device configuration and paths by ID (example: WD55844-Gh384) - which is a problem if I want to clone a disk then, replace it with a different disk. For example, say a Western Digital (WD) 250GB to Seagate 2TB disk. Do all Linux distro's do this or is there one that only uses `/dev/sda` or `/dev/hd0` type naming that would be more flexible?


title: I would like to grep all files except some file types?

text: How do I recursively `grep` files within a given folders except a couple file types? For example, I'm looking for a string within my workspace folder but it ends up searching inside sql files and generates serialized strings. So in this case, I'd like to `grep` the workspace folder except sql files. I'm preferably looking for a one-liner if possible.


title: Utility to buffer an unbounded amount of data in a pipeline?

text: Is there a utility that I can stick in a pipeline to decouple read and write speeds?               $ producer | buf | consumer      Basically, I want a utility `buf` that reads its input as fast as possible, storing it in memory so `consumer` can take its sweet time while `producer` runs as fast as possible.


title: apt-get - How to complain on failed upgrade?

text: I'm trying to write a script to upgrade a bunch of remote machines and would like to verify that one package in particular is upgraded. With `yum`, I could say `yum upgrade specific-package`, and it would complain if it fails to upgrade the package. With `apt`, as far as I know, I can only say `apt-get upgrade`, and if `apt` fails to find the new version or fails to resolve the dependencies for the new version, it will silently decide not to install it. Is there any way to get `apt-get` to complain if it decides to not upgrade a package (short of scripting a call to `dpkg --compare-versions`)?


title: Install a GUI (KDE) on a centos 5.3

text: I'm trying to install KDE on a vps of centos 5.3. These are the steps:               yum install kdepim     yum install vnc vnc-server x11-xorg          vncserver     vncserver -kill :1     vim ~/.vnc/xstartup     #(replaced the last line with: "startkde &")          rm -rf /tmp/.X1*     vncserver      When I try to connect using a remote client of UltraVNC, I'm being prompted to supply a password - but after that it's stuck. While executing 'ps' I can see:               artsmessage -i Sound server informational message:??Error while initializing the sound driver:?SNDCTL_DSP_SETFMT f      Any idea what/how?


title: Return value of a process and comparison of the number

text: I have a `val.py` python script that returns a negative number.               import sys     sys.exit(-1234)      When I run this bash script, I get the value `$?` as return value of 46 (not -1234). Even when I tried to compare the value with `$? == 46` or `$? == "46"`, it doesn't work at all.               python val.py     echo $?          if [ $? == 46 ]; then         echo "Match"     else         echo "NO"     fi        * Q1 : Why the return value is not correctly stored in `$?`?   * Q2 : Why the $? == NUMBER comparison doesn't work?


title: mapping a split file to /dev/loop0

text: I have a `iscsi` disk 2TB large. I make backup of that disk every week. The backup script copies the image of the whole iscsi disk into a file on my NFS. Unfortunately, it does not copy the image in one piece, but splits it into chunks 1TB in size. So in my case, I have two 1TB files (plus one config file):               -r--r----- 1 root root 1099511627776 May 10 02:12 Backup-LUN-itmp-lun-0.000     -r--r----- 1 root root 1099500093440 May 10 03:50 Backup-LUN-itmp-lun-0.001     -rw-r--r-- 1 root root           251 May 10 03:50 Backup-LUN-itmp-lun-0.conf      Now I need to access my backup. Normally, if it was one file, I would map it to `/dev/loop0` and then mount it as normal disk. But in my case, I cannot map two files to `/dev/loop0`. One option would be to cat those two files to create one large file, but I don't have extra 2TB space, and besides this is not a good solution anyway. Can somebody please suggest a solution? # UPDATE I have tried using dmsetup with linear target, as suggested by Andreas Wiese, but I get following error.               dmsetup create my-backup << EOF     > 0 2147483648 linear Backup-LUN-itmp-lun-0.000 0     > 2147483648 2147461120 linear Backup-LUN-itmp-lun-0.001 0     > EOF     device-mapper: reload ioctl on my-backup failed: Invalid argument     Command failed      dmesg contains following error:               device-mapper: table: 254:0: linear: dm-linear: Device lookup failed     device-mapper: ioctl: error adding target to table


title: How can I prevent some users from deleting files in samba?

text: I have a sample directory shared out with Samba which all users should have read/write access to. I would like to prevent some of these users from deleting any files (even the ones they create). This is mostly to prevent accidental deletions. **How can I ensure that some users have the ability to delete files while others do not?** Things I've Tried: Sticky bit +t --- This still allows users to delete their own files. Not desired. (Samba) create mode=555 --- This prevents all deletions. I want some users to still be able to delete files.


title: Customize wingpanel under Elemantry OS

text: Recently I have installed Elemantry OS luna, which is based on Ubuntu. I want to customize the wingpanel to display the menu toolbar of the selected application. This is my wingpanel: ![what I got](http://i.stack.imgur.com/qkfdw.jpg) But I want it to look like this: ![what I Want](http://i.stack.imgur.com/NZGEd.png) The File, Edit, Selection and other menus, and the Close, maximize and minimize icons are on the wingpanel.


title: Run program with additional supplementary group

text: I am looking for something like sudo (or something that can be run from sudo) that allows me to run a program with my uid and primary gid, but with an additional supplementary group.


title: Create a command for a Linux executable file

text: I'm using a program called node-webkit, but I can't start the program without specifying the full path to the executable file. Is there any way to associate a command (such as `node-webkit`) with an executable file on Linux, so that the full path to the file won't need to be specified?


title: I want to kill all processes that result from the following command

text: The following command will display all the PID's running for `vmstat1`:               ps -ef | grep "vmstat 1" | awk '{ print $2 }'      My question is, how do I kill them all, if there's like 20 of them at once?


title: cron to delete after executing

text: I have a `cron` job which unzips a file and executes it. The `cron` is set to unzip, execute and delete the .zip file after. It's executing fine but it's not deleting the file. Here's the `cron`:               /usr/bin/wget -q -nd --delete-after 'url of plugin to execute the file' I tried to add a second `cron` which would delete the files that are older than 15 days from the folder but this seems to "bother" the first `cron` to execute properly. The second `cron` I used was:               /usr/bin/find /directory/ -mtime +15 -exec /bin/rm {} \; > /dev/null 2>&1


title: emacs - paste text from clipboard without formatting

text: I am using Emacs 24 for MacOSX and having some problem with pasting code from clipboard to Emacs. The code that I selected usually already nicely formatted (with tab, ident, ...). However, when I paste it to Emacs, Emacs re-do the formatting so it is extremely slow for thousands lines of code. Is there any suggestion for pasting from clipboard? Thank you.


title: Update Sublime Text 2 in Mint 10 Linux

text: Sublime Text 2 won't let me use it unless I upgrade. Is there an easy way to do this? I'm new to Linux and all they have is the `tar.bz2` file. But I know you can update programs with `apt-get` sometimes. Does anyone know the easiest way to upgrade?


title: How can I view and play shared audio files through a network?

text: I've come up with a quick pet project (which might, maybe, even end up being useful at my home someday); the idea is to allow users of a Linux device (I'll call it A, and it'll probably be a small embedded one) to play music that is stored in other computers (I'll designate those by B), located in the same local network. The difference between this and straight-out streaming would be that, in this case, B would be as passive as possible, merely making the files available, and A users would be able to view shared files and select a target for playback. I haven't found ready-made solutions for this case, though I'm sure many of them are bound to exist. So my question is what would be the easiest way to do it: through a ready-made solution or, if one is not available, through combining various applications and standards (NFS?) or coding it out.


title: bombono dvd renders menus indefinitely

text: I'm trying to use bombono dvd authoring tool to create some DVDs. Unfortunately when I try to generate an image bombono gets to a point where it says 'rendering menu #3' and hangs there indefinitely. The whole app is responsive - so I can cancel the process, etc. What I would like is for it to finish, and write my ISO image to disk :) Is this some known issue with bombono? Should I change something in my DVD project?


title: Should I investigate Rocks or Ubuntu/Mosix for building a cluster?

text: I work at a college doing system administration. Someone in their lab is looking to build a cluster for running complex Octave and C++ projects. They have brand new modern machines. My question is which setup is better to use Rocks, or Ubuntu/Mosix, or is there something better to use?


title: Can't access ssh in my VM Centos

text: My Cento's IP is diferent of the normal. And I cant access it in a ssh command ![see here](http://i.stack.imgur.com/ooo6z.png) And when I tried access using ssh noting ![see here](http://i.stack.imgur.com/3qx0R.png) I want to use ssh and samba client, but my IP is diferent. And I have install Centos in my other VM in a diferent Ubuntu, but the IP appear the same 10.0.2.15 How can I fix this problem?


title: Meaning of asterisk (*) in grep

text: [USERNAME@host ~] echo -e 'prdxxx\ndadxxx' | grep "da*xxx"     prdxxx     dadxxx     [USERNAME@host ~] echo $SHELL     /bin/bash     [USERNAME@host ~] dpkg -l | grep -iw bash     ii  bash                                    4.1-2ubuntu3                                    The GNU Bourne Again SHell     ii  bash-completion                         1:1.1-3ubuntu2                                  programmable completion for the bash shell     [USERNAME@host ~]       Why does `da*xxx` find `prdxxx` too? It doesn't contains `da`... did I found a grep bug? or is this a feature?


title: Replace selected caracters

text: How can one replace only the first `[:space:]` character in each row of a file with a `\t` using sed ?               Input:      AC 12 45     DC 56 89          Expected output:     AC    12 45     DC    56 89      (Something like `sed "s/[:space]/'\t'/g"` but without affecting the other spaces in the row)


title: btrfs performance

text: I decided to mess around with `btrfs` and found some weird performance anomalies. The tests I've done are with with two external hard drives one formatted with `ext4` the other `btrfs`. `ext4` performance result is as follows:               $ sudo dd if=/dev/zero of=/media/Backup/out.img count=1024 bs=1024k     1024+0 records in     1024+0 records out     1073741824 bytes (1.1 GB) copied, 24.1959 s, 44.4 MB/s     $ sudo dd if=/dev/zero of=/media/Backup/out.img count=1024 bs=1024k     1024+0 records in     1024+0 records out     1073741824 bytes (1.1 GB) copied, 24.1619 s, 44.4 MB/s      The 44.4MB/s is typical for me, but now `btrfs` (note: I always seem to get that high 3.1GB/s IO right after deleting the file):               $ sudo dd if=/dev/zero of=/tmp/test/out.img count=1024 bs=1024k     1024+0 records in     1024+0 records out     1073741824 bytes (1.1 GB) copied, 0.347933 s, 3.1 GB/s     $ sudo dd if=/dev/zero of=/tmp/test/out.img count=1024 bs=1024k     1024+0 records in     1024+0 records out     1073741824 bytes (1.1 GB) copied, 1.1732 s, 915 MB/s     $ sudo dd if=/dev/zero of=/tmp/test/out.img count=1024 bs=1024k     1024+0 records in     1024+0 records out     1073741824 bytes (1.1 GB) copied, 1.21539 s, 883 MB/s     $ sudo dd if=/dev/zero of=/tmp/test/out.img count=1024 bs=1024k     1024+0 records in     1024+0 records out     1073741824 bytes (1.1 GB) copied, 1.25093 s, 858 MB/s      My question is what's going on here with `btrfs`? Why is the performance IO much higher? I've even ran a `sync` right after and it completes instantly. I am running the latest stable Kernel.


title: how to remove quarantine from file permissions in os x

text: I downloaded a .pem file and my Mac OS X (10.8.2) added an `@` sign at the end of the file permissions. This is causing file permission issues. I can't seem to remove the quarantine flag. I even tried the command               xattr -d <filename>.pem       but that didn't work


title: SSH Agent Forwarding on server

text: I'm struggling with the concept of **SSH Agent Forwarding**.   This is what I've done so far:   1. Create default identity local (ssh-keygen)   2. Install the public key on bitbucket Now I want to connect to a server like ssh `myserver@myserver.be` .   Then I would normally create a key on the server with **ssh-keygen** and again, copy the public key and add it to my bitbucket SSH keys. after that I can clone my SSH repository and pull/push to the bitbucket repository. But that is not the way to do it. How can I make sure I don't have to create a key on my server? I've read many tutorials like this but I'm still struggling with the ssh agent forwarding. **UPDATE:** I've tried to do this tutorial but I'm already stuck at step 1. They say you need to add the following text to your config file (located at ~/.ssh/config):               Host example.com      ForwardAgent yes      My config file looks like this before the first step:               Host bitbucket.org      IdentityFile ~/.ssh/id_rsa      After the step it looks like this:               Host bitbucket.org      IdentityFile ~/.ssh/id_rsa          Host mysite.be      ForwardAgent yes      To try if it works you need to execute the following command on your server:               ssh -T git@bitbucket.org      Tried this but I'm getting the error `Permission denied (publickey).` on my server.


title: Bodhi installation hangs

text: I am currently trying to install Bodhi linux (version as of 2014_07_09) to my Laptop. I booted from USB-drive into the live environment and hit install. After some attempts I even found on the Distro's website that they do **NOT** recommend using the "download updates during installation"-checkbox, so I didn't do that anymore. Regardless though:   I get to choose the language and to the quickchecks (Disk-space, AC-plugged, internet) and ,as I chose not to bother connecting to the internet at all, to the "are you sure you don't want to connect to one of these WiFis"-screens.   After that I hit "continue", the cursor turns to the wristwatch and then I wait and nothing happens.   The system is very responsive: I can do other things or easily cancel the installation, just the installation does not do anything at all. I gave it around 30 minutes and nothing.   Furthermore, since the installer looks a lot like Ubuntu's and also because I haven't decided anything in that direction, I expected to first see at least the "choose and edit partitions"-interface. Any advice on what I might do to fix this or at least find the reasons for the stoppage?


title: Make message box of zenity scalable?

text: When output contains lots of lines, `zenity --info --text` doesn't make it scale-able, and `zenity --text-info` only accept output from a file. What can I do now? Maybe other zenity like utility can help?


title: DNS Master vs Slave and Primary vs Secondary

text: I'm a little confused about the difference between a "secondary name server" and a "slave name server" and a "primary name server" and a "master name server" I understand that a slave name server queries the master and updates itself based on changes to the master. What I'm not sure of is, say I'm setting up 2 name servers:               ns1.example.com     ns2.example.com      Should both of these be setup as "primary and master" and then any secondary name servers be setup as slaves? Or should there only be ONE primary master at any given time, and all other name servers should be slaves? I've read a few guides and lots of man pages, but I haven't come across this issue yet in my reading. Anyone have a pointer to a reference for this type of thing? Or know what the best practice is for setting up multiple DNS servers?


title: vim auto complete custom list

text: I had these two questions about this function               " how do I load a file into a list here?     " set some variable            func! CustomComplete()                " and then read the variable here so that b:list = a \n split file ?     let b:list = ["spoogle","spangle","frizzle"]     let b:matches = []      The intent is that I can just hit a hot key and auto complete a list from the file system.                  inoremap <F5> <C-R>=CustomComplete()<CR>          " how do I load a file into a list?     func! CustomComplete()          echom 'select word under cursor'     let b:word = expand('<cword>')     echom '->'.b:word.'<-'     echom 'save position'     let b:position = col('.')     echom '->'.b:position.'<-'     normal e     normal l     echom 'move to end of word'          " and then read the list here?     let b:list = ["spoogle","spangle","frizzle"]     let b:matches = []               echom 'begin checking for completion'     for item in b:list     echom 'checking '     echom '->'.item.'<-'       if(match(item,'^'.b:word)==0)       echom 'adding to matches'       echom '->'.item.'<-'       call add(b:matches,item)       endif     endfor     call complete(b:position, b:matches)     return ''         endfunc


title: Live USB: how to access USB drive that linux booted from

text: Can't find it in `/media` or `/mnt`. What I want:   * live distro so I have guarantee it won't break and will boot/work every single time   * have access to directory on that USB drive for storage purposes, ie. use in typical pen drive fashion What I don't want:   * persistent install   * use casper.rw, as it makes much harder/impossible to access data from other machines   * partition the drive as it makes backups/cloning harder and isn't elegant I tried to be clever, reinserted the drive after boot, but then can't even run the terminal. I'm using Linux Mint 13 XFCE


title: Is a shell script is a programming Language

text: This is the first question in UNIX: I was started shell script from 2 days before. But I have a conflict: is a shell script a special programming language for a specific shell??


title: Show tail of files in a directory?

text: I have a directory that is too huge to browse by any means. Grepping returns argument lists too long, WINSCP crashes when trying to open the directory. Is there a way I can view just the last 200 files in the directory. Like 'tailing' the directory?


title: Identify if files or directories are hidden

text: I am trying to write a bash script that prints out all files (including hidden) in a directory recursively and records the number of files, hidden files, hidden directories and directories. This is part of an assignment and I am not allowed to use `-R` or `find` or `du`.               listAllFiles()       {       local dir=$1       local file       directoryCounter=0       fileCounter=0       hiddenFileCounter=0       hiddenDirectoryCounter=0            for file in "$dir"/*; do       if [[ -d $file ]]; then           listAllFiles "$file"           directoryCounter+=1       elif [[ -f $file ]];then           fileCounter+=1]           ls -l $file       elif [[file is a hidden directory]];then           listAllFile "$file"           hiddenDirectoryCounter+=1       elif [[file is a hidden file]];then           hiddenFileCounter+=1           ls -l $file       fi          done      }      Is there a way I can detect if a file/directory is hidden


title: How to interpret the "saddr" field of an audit log?

text: I'm trying to log the parameter of `connect`, so I added one rule with `auditctl`. Now in audit.log I get lines like this: > type=SOCKADDR msg=audit(1385638181.866:89758729): saddr=hex string So how should I interpret the target address from the hex string (I'm not sure what is stored in that hex string)?


title: How can I find a memory leak of a running process?

text: Is there a way, I can find the memory leak of a running process? I can use Valgrind for finding memory leaks before the start of a process. I can use GDB to attach it to a running process. How could I debug a memory leaks of a running process?


title: Lenovo t440s fedora 20 WiFi authentication problem

text: In some WiFi networks, consistently in hotels so far, my computer cannot connect and prompts that authentication failed, when the password is correct. This is a very annoying problem that I don't know how to fix. I think it happened in ubuntu a while back and fedora 20 now. The card is Intel 7260. If anybody could help that would be great. Added paste of journalctl log: http://pastebin.com/tKcJBPWT


title: Exracting fields in file and storing it in different file in vim

text: I have file int the following format:               .          .          .          Name:abc          Occupation:def          .          .          Name:xyz          Occupation:ghi          .          .       I want to extract the name and occupation field and save it in another file out.txt using `vim` in the following format:               Name:abc          Occupation:def          Name:def          Occupation:ghi      Please don't use any any advanced commands. I am just a beginner. EDIT:Occupation field position in input file updated


title: Will Linux start killing my processes without asking me if memory gets short?

text: I was running a shell script with commands to run several memory-intensive programs (2-5 GB) back-to-back. When I went back to check on the progress of my script I was surprised to discover that some of my processes were `Killed`, as my terminal reported to me. Several programs had already successively completed before the programs that were later `Killed` started, but all the programs afterwards failed in a segmentation fault (which may or may not have been due to a bug in my code, keep reading). I looked at the usage history of the particular cluster I was using and saw that someone started running several memory-intensive processes at the same time and in doing so exhausted the real memory (and possibly even the swap space) available to the cluster. As best as I can figure, these memory- intensive processes started running about the same time I started having problems with my programs. Is it possible that Linux killed my programs once it started running out of memory? And is it possible that the segmentation faults I got later on were due to the lack of memory available to run my programs (instead of a bug in my code)?


title: Command to list in real time all the actions of a process

text: I cannot remember this command (and googling was unsuccessful), but there is a way to get the list of actions performed by a process, that outputs something like                 # listprocessactions -p 1234       0.321 Open "A" /var/log/nginx/supersite.log       0.322 Write to /var/log/nginx/supersite.log       0.401 Close /var/log/nginx/supersite.log       0.555 Opens TCP connection with slashdot.org       ...      I'm interested in the files aspect (open / RW files).   The question is what is that command (and if possible in which package on deb / ubuntu)


title: avconv with negative audio quality value

text: Is it possible to set the `-q:a` parameter to a negative value? For example, the value of `-1` is a valid quality level for the Vorbis codec.


title: Why `sed` does not return exit status if regex does not matched ?

text: I'm trying to search and replace some line from files, but when I run `sed` if that regex not match then `sed` does not return any status code, So instead of adding one more condition with `grep`, is there way in `sed` and Why `sed` does not return exit status ? Problem : ![enter image description here](http://i.stack.imgur.com/M1HHk.png)


title: How does word count work for newline (-l)? Number of newlines or lines

text: I wonder how does `wc` work? Most times it seems to return the number of lines, but sometimes it seems to be newlines? In the man page its newlines. But:               [jiewmeng@JM textFiles]$ echo -e "\n\n" | wc -           3       0       3 -      If the above returns the number of newlines, it should just return 2? Also I got this wierd file:               [jiewmeng@JM textFiles]$ cat testA.txt      The quick     brown fox     jumped over     the lazy      dog.[jiewmeng@JM textFiles]$ wc testA.txt       4  9 50 testA.txt      In the above case, it appears to be returning the number of newlines?


title: How to change default "reading" program?

text: right now when I run `man smth` or similar `less` is used to view it. However, on Mac OS X, I really like scrolling with touchpad instead on `up`/`down` or `page-up`/`page-down` buttons. Is there a way to just print text into the terminal instead of using `less` or `more`?


title: Are the boost headers separately packaged under Fedora?

text: The boost C++ library consists of several components. Some components do include shared libraries, other don't. Under a Fedora 14 system I've looked a bit around with `yum search boost` and `rpm -qR` and indeed like with other distributions the boost library is split into several packages. For example there is boost-program-options which only contains the shared libraries of the boost program-options component. It seems that package `boost` depends on all shared-library sub-packages. There is `boost-devel` which seems to provide all headers and depends on all shared-library sub-packages (via boost). Am I right that it is not possible to just install the boost headers via yum (using the default repositories) without all boost shared library packages?


title: Prevent a package from being installed?

text: I installed Python 2.7 from source. A dependency of some packages is python. Is there a way I can prevent the install of a lesser version of Python, or let apt know it's already been fulfilled?


title: restore suse grub

text: I upgraded my ubuntu and that resulted in its grub loader being used. I have a triboot of windows, ubuntu and suse. I prefer the suse bootloader which I was using before the ubuntu updates. I would like to restore the suse boot loader from yast. How do i do it?


title: Get scan codes in octal format

text: Using `showkey -s` I can get the scancode of a key as a hex-number. How can I get it directly as an octal number?


title: Why does AWK not like dots in one of two substitutions?

text: I'm trying to use AWK in a bash script to look for a placeholder string in a template file and replace it with the contents of a variable that (can) contain various special characters. Example:               awk -v SOURCEIP="$SOURCEIP" REVERSEDNS="$REVERSEDNS" '{        gsub(/^_TMPSOURCEIP_/, SOURCEIP);        gsub(/^_TMPREVERSEDNS_/, REVERSEDNS);        print     }' /home/foo/footemplate      When I try this though and debug, I get this error:               + awk -v SOURCEIP=1.1.1.1 REVERSEDNS=nz32-cm1.foo.blah.example.com '{        gsub(/^_TMPSOURCEIP_/, SOURCEIP);        gsub(/^_TMPREVERSEDNS_/, REVERSEDNS);        print     }' /home/foo/footemplate     awk: REVERSEDNS=nz32-cm1.foo.blah.example.com     awk:                    ^ syntax error      I infer from the arrow that awk doesn't like the dot in the REVERSEDNS variable... but if that were the case, why would it be OK with dots in the IP address?


title: A command which returns either a process ID, if running, or some other output if not?

text: I'm looking for a command that will give me the PID, and it's not running it should give me some output other than blank. In my program, sometimes the library I'm using gives blank output even if that process is running and I'm not able to detect whether the blank output is due to the libray or due to the process having stopped! Changing the library call will take time, so I'm looking for suggestions of such a shell command as workaround?


title: File copied from Win7 to Linux ext4 are empty/corrupted

text: Problem: User on Win7 machine. Copy a simple text file from Win7 local drive, through samba, to Linux ext4 dir. The content of copied file on ext4 dir is empty when user open it. Only 1 user has such problem. Other user copying file to same ext4 dir has no issue. Tried so far:               1. Remove smb user, then readd user.     2. Copy to different ext4 dir, same problem.     3. Restart smb service, same problem.     4. Copy file from another Win7 and WinXP machine, same problem.     5. Tried copy file using WinSCP, to ext4 dir, the file doesn't get copied over and I got "Failure: Error code 4".  Ext4 dir is not full.      On Win7 machine, looking at file attribute: Other users' files have an attribute of 'A', but for this one particular user, her files have 'AP' attribute. The files with 'A' attribute open just fine. The files with 'AP' attribute can be opened, but there's no content. I'm not sure how to fix this and where else to check. Can anyone here help? Installed:               samba-3.0.33-0.34.el4     samba-common-3.0.33-0.34.el4     samba-client-3.0.33-0.34.el4


title: Cannot SSH to VM

text: I have a VM installed with some custom disk image (CentOS) from work, and I can't SSH into the VM. Here are some things I've tried:               [VM]$ ssh root@localhost     Password:      Great, ssh is working with the loopback. But when I try from the host machine:               ~/VirtualBox VMs% ssh -v -v -v root@192.168.56.1     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 *     debug2: ssh_connect: needpriv 0     debug1: Connecting to 192.168.56.1 [192.168.56.1] port 22.     debug1: connect to address 192.168.56.1 port 22: Connection refused     ssh: connect to host 192.168.56.1 port 22: Connection refused      Nada. Ping works though. on the VM, /etc/hosts.allow:               ssh:ALL:allow     sshd:ALL:allow      nothing in hosts.deny EDIT:   I've also done:               service iptables save     service iptables stop     chkconfig iptables off      EDIT:   I'm also seeing this message on the VM in /var/log/secure   ![bind to port conflict](http://i.stack.imgur.com/Dsu2a.png)   But I can ssh just fine from the VM to the VM, so this isn't the issue, right? EDIT: `[VM]$ lsof -i :22` ![lsof -i :22 output](http://i.stack.imgur.com/hFLb0.png) And I have, in /etc/ssh/sshd_config               PermitRootLogin yes        And cannot login with a separate username. EDIT:   ` netstat -pant |grep :22` and ` netstat -ntp |grep :22` ![netstat -pant and netstat -ntp](http://i.stack.imgur.com/78ovI.png)   I think maybe this also points towards the IPv6 solution? EDIT:   Existing config for `vi /etc/sysctl.conf` ![/etc/sysctl.conf](http://i.stack.imgur.com/HSK6U.png) New config for `vi /etc/sysctl.conf` ![/etc/sysctl.conf after change](http://i.stack.imgur.com/H15JY.png) I then ran the commands:               sysctl -w net.ipv6.conf.default.disable_ipv6=1     sysctl -w net.ipv6.conf.all.disable_ipv6=1     chkconfig ip6tables off     service sshd restart     init 6      Aaaaaaand, still nothing. But after a restart, it looks like ipv6 isn't disabled. I'm getting the same error message. ![cannot bind port 22](http://i.stack.imgur.com/boU5v.png) And `lsof -i :22` is still saying type IPv6: ![lsof -i :22](http://i.stack.imgur.com/nnJUy.png) EDIT: Going further down the IPv6 rabbit hole.   http://ubuntu-tutorials.com/2008/01/12/disabling-ssh-connections-on-ipv6/   It says to remove the commented line with `#ListenAddress ::`, which seems fishy, cause it's already commented out. So I did, and nothing. However, the next section has a useful tidbit: `AddressFamily inet # IPv4 only` When I add this line to `/etc/ssh/sshd_config` and do a couple consecutive restarts, I now see that my address binding error has stopped appearing in `/var/log/secure` ![/var/log/secure](http://i.stack.imgur.com/55Lng.png)   and the output of `lsof -i :22` now shows a type of IPv4! ![yay, progress! lsof -i :22 shows IPv4](http://i.stack.imgur.com/B95yt.png) Progress!! But unfortunately I still cannot connect. I tried rebooting the VM, opening new shell windows just in case there was some state left hanging around. Still the same answer.               ~% ssh -vvv root@192.168.56.1     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 *     debug2: ssh_connect: needpriv 0     debug1: Connecting to 192.168.56.1 [192.168.56.1] port 22.     debug1: connect to address 192.168.56.1 port 22: Connection refused     ssh: connect to host 192.168.56.1 port 22: Connection refused      EDIT:   ok, so i got arp-scan and am trying to find IP conflicts, but now i'm even more confused. ifconfig shows that vboxnet0, which is the host-only adapter, has an IP of 192.168.56.1. That's where I got that IP to begin with.               [local]~root# ifconfig       lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384         options=3<RXCSUM,TXCSUM>         inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1          inet 127.0.0.1 netmask 0xff000000          inet6 ::1 prefixlen 128      gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280     stf0: flags=0<> mtu 1280     en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500         ether 7c:d1:c3:e8:b0:e9          inet6 fe80::7ed1:c3ff:fee8:b0e9%en0 prefixlen 64 scopeid 0x4          inet 10.6.12.46 netmask 0xfffffe00 broadcast 10.6.13.255         media: autoselect         status: active     p2p0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 2304         ether 0e:d1:c3:e8:b0:e9          media: autoselect         status: inactive     vboxnet0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500         ether 0a:00:27:00:00:00          inet 192.168.56.1 netmask 0xffffff00 broadcast 192.168.56.255     vboxnet1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500         ether 0a:00:27:00:00:01          inet 192.168.57.1 netmask 0xffffff00 broadcast 192.168.57.255      But `arp-scan -l` gives only domains starting with 10.6.*.*   So I guess it's looking at en0? So I tried   `arp-scan -I vboxnet0 -l`               mba-108-on-03:~ root# arp-scan -I vboxnet0 -l     Interface: vboxnet0, datalink type: EN10MB (Ethernet)     Starting arp-scan 1.8 with 256 hosts (http://www.nta-monitor.com/tools/arp-scan/)     192.168.56.100  08:00:27:bc:ed:2f   CADMUS COMPUTER SYSTEMS          512 packets received by filter, 0 packets dropped by kernel     Ending arp-scan 1.8: 256 hosts scanned in 1.301 seconds (196.77 hosts/sec). 1 responded      Why is it now .100? #confused vboxnet1 has nothing               mba-108-on-03:~ root# arp-scan -I vboxnet1 -l     Interface: vboxnet1, datalink type: EN10MB (Ethernet)     Starting arp-scan 1.8 with 256 hosts (http://www.nta-monitor.com/tools/arp-scan/)          512 packets received by filter, 0 packets dropped by kernel     Ending arp-scan 1.8: 256 hosts scanned in 1.302 seconds (196.62 hosts/sec). 0 responded      All of the other interfaces don't work with arp-scan. So let's show duplicates on the en0 interface:               mba-108-on-03:~ root# arp-scan -I en0 -l |grep DUP     10.6.12.68  84:8e:0c:75:5b:f4   (Unknown) (DUP: 2)     10.6.12.64  ac:cf:5c:42:24:47   (Unknown) (DUP: 2)     10.6.12.76  88:53:95:6e:6a:af   (Unknown) (DUP: 2)      These numbers don't correspond to anything meaningful for me. Going to try a reboot, then the IPv6 suggestion. EDIT:   The VM is a VirtualBox.   Adapter 1: NAT   Adapter 2: Host-only Adapter, 'vboxnet0' ![config of adapter1](http://i.stack.imgur.com/lzj4m.png) ![config of adapter2](http://i.stack.imgur.com/dRiHM.png)   Any ideas?


title: Problem with WPA connection on OpenBSD

text: I have an OpenBSD 5.3 amd64 installed and Intel WiFi Link 1000 card which works with WEP but I obtain a strange message with WPA keys:               # sh /etc/netstart iwn0      iwn0: no link ............. sleeping          # dhclient iwn0     iwn0: no link ............. sleeping      configuration :               # cat /etc/hostname.iwn0                                                 dhcp nwid Livebox-5dxx wpakey xxxxxxxxxxxxxxxxxxxxxxxxxx     # cat /etc/mygate     192.168.1.1 // Correct I check      Result with ifconfig :               # ifconfig iwn0     iwn0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500     lladdr 74:e5:0b:c6:xx:xx     priority: 4     groups: wlan     media: IEEE802.11 autoselect (DS1 mode 11g)     status: no network     ieee80211: nwid Livebox-5dxx chan 6 bssid 00:19:70:a5:xx:xx 222dB wpakey 0x620f88c77fc3866ac2165966050980e5cc18f2a606c84b680c62xxxxxxxxxxxx wpaprotos wpa1,wpa2 wpaakms psk wpaciphers tkip,ccmp wpagroupcipher tkip     inet6 fe80::76e5:bff:fec6:d914%iwn0 prefixlen 64 scopeid 0x2      I would like to know how to debug this configuration. Is it normal that my WPA key appear in hex with prefix `0x` in `ifconfig` output? How do I ensure that my WPA key settings are correct?


title: XDMX Setup Help

text: I have been searching for some time now, but apparently I am not using the proper words. I am trying to setup a cluster with xdmx to display all of the information from my head node, but I am only getting 16 monitors working with a few problems. I am running CentOS 6.2, but I am wondering if I need to switch distos, or if anyone has a nice guide to setting this up. I would appreciate any direction whatsoever as I am pretty knew to this proxy X server stuff.


title: Fedora-19 does not hibernate on Toshiba Satellite laptop

text: Fedora 19 no hibernation, black screen with some gibberish which I'll try to post ( a pic?).Also no shutdown by clicking on the menu. ACPI? Other Linux distros have no such problems. Tried the advice given here and others found elsewhere on the net, including the pm-hibernate - none help. One point, i dunno if it matters, the fedora19 is installed on a USB flash drive. The laptop is Toshiba Satellite L750-S5151. Output of `lshw`: http://pastebin.com/16izPA5y The 14GiB USB disk is the one with the fedora install. AFAIK the USB drive should be ID'd by UUID in /etc/fstab, I dunno why hostname is used in root and swap, :               /dev/mapper/HOSTNAME-root / ext4 defaults,x-systemd.device-timeout=0 1 1     UUID=UUID /boot ext4 defaults 1 2     /dev/mapper/HOSTNAME-swap swap swap defaults,x-systemd.device-timeout=0 0 0      HOSTNAME and UUID replace the actual ones. Also I'm not sure if swap should be in `/etc/mtab`, it is not in there.


title: listen to a conversation using port forwarding

text: I have been able to make a phone calls using the SIP client Pjsua from one Linux computer to another one. In case you have not heard of this user agent, explaining it's functionality is quite easy. It uses IP and port number of each linux to create a unique ID and then calling to this specific ID is possible. Now I have not studied port forwarding thoroughly but I suppose what it does is to forward whatever data that comes in, to another "port" or "IP and port". So I thought to myself, if my calling application is using ports and IPs to send and receive voice, I should be able to forward those specific ports to a second or third port (or IP and port) and listen to the conversation on a third computer. So here is what I did. Supposing that machine **Linux A** has the following identification info:               IP:192.168.1.11`  `UDP port# : 1111      The second machine **Linux B** has the following identification:               IP:192.168.1.22`  `UDP port# : 2222      If I do the following using `iptables` I should be able to hear that side of the conversation which is being received on **Linux B** on a 3rd system, **Linux C** . The third machine, **Linux C** has the following identification info:               IP:192.168.1.33`  `UDP port# : 3333      To achieve this, I tried running this command on **Linux B** :               $ iptables -t nat -A PREROUTING -p udp --dport 2222 -j DNAT     --to-destination 192.168.1.33:3333    //forward port 2222 to Linux C on port 3333      And ran this command on **Linux C** :               $ aplay | nc -l -u 3333     //listen on the specified UDP port       However I don't hear anything on **Linux C**. Can anyone tell me why this is not working? Other strategies to do something like this are also welcome.


title: How to disable DNS caching or override TTL for a certain hostname?

text: I've set up my own dynamic DNS service by using a script to automatically update the A record for a subdomain of one of my domains.   The host with the dynamic IP address runs, among other things, a Munin node which I'm reading remotely at five-minute intervals.   Unfortunately, my domain name registrar doesn't allow TTL values less than 3600, so the IP for the remote Munin node is cached for an hour and the connections fail for up to said hour whenever the node's dynamic IP changes. Is there a way to override the TTL reported by my registrar's DNS server, so the server will re-resolve the IP each time it connects to the Munin node?


title: processing command output line by line, without mixing standard input

text: So, I have a problem very similar to Bash: How to read one line at a time from output of a command?, I am doing:               while read path; do mplayer $path; done < <(find-me-random-mp3s)      or               find-me-random-mp3s | while read path; do mplayer $path; done      The command `find-me-random-mp3s` outputs file paths each on a new line. The problem starts when `mplayer` runs, it starts consuming lines from `find-me- random-mp3s` output, i.e. lines that were supposed to be filled inside the `path` variable on each iteration. I went on with this dirty fix:               find-me-random-mp3s | while read path; do cat /dev/null | mplayer $path; done      But I don't really like it, it blocks my terminal interaction with mplayer too. Is there any alternative method that I can use in such case?


title: catch http requests from another process

text: Suppose a process, among other things, is posting https requests, for example with curl. Assuming I have root privileges, is there a way to intercept such requests and respond with an http error or, even better with acknowledgment? I am using an embedded device, so I have limited access to software libraries.


title: Backup Ubuntu as an installer

text: I'm using ubuntu since 2007/8 and still I use the same system with upgrading it. I'm not a person who good in linux but developing under linux. Now I want to format the system and re install a new, but I need the previous (currently using) ubuntu system as a backup and, whenever I need that, I want to install it as a regular OS. how can I do it? Anything appreciate. Thank you!


title: How to increase the timer before drive spins-down?

text: I use Ubuntu 12 beta on a Lenovo Z575. I noticed that the disk spins down a few seconds after the last operation. When I am working, e.g. in the vim and write quite often, it spins-up and -down frequently. This causes vim to freeze for a second. I used `hdparm` but it didn't change anything:               hdparm -S 24 /dev/sda # 2 minutes standby time      and I see (and hear) that the disk is idle or working:               hdparm -C /dev/sda     drive state is: standby     # or...     drive state is: active/idle      I have `laptop-mode-tools` already installed.


title: zlib support for PIL won't work

text: I'm trying to install PIL as per its instruction on debian but can't figure how to fix this bit: I get --- ZLIB (PNG/ZIP) support available on build_ext and _*_ ZLIB (PNG/ZIP) support not installed on selftest what am I missing?               root@portman:~/dist/Imaging-1.1.7# python setup.py build_ext -i     running build_ext     --------------------------------------------------------------------     PIL 1.1.7 SETUP SUMMARY     --------------------------------------------------------------------     version       1.1.7     platform      linux2 2.7.2+ (default, Dec  1 2011, 01:55:02)                   [GCC 4.6.2]     --------------------------------------------------------------------     *** TKINTER support not available     --- JPEG support available     --- ZLIB (PNG/ZIP) support available     --- FREETYPE2 support available     --- LITTLECMS support available     --------------------------------------------------------------------     To add a missing option, make sure you have the required     library, and set the corresponding ROOT variable in the     setup.py script.          To check the build, run the selftest.py script.     root@portman:~/dist/Imaging-1.1.7# python selftest.py     --------------------------------------------------------------------     PIL 1.1.7 TEST SUMMARY     --------------------------------------------------------------------     Python modules loaded from ./PIL     Binary modules loaded from ./PIL     --------------------------------------------------------------------     --- PIL CORE support ok     *** TKINTER support not installed     --- JPEG support ok     *** ZLIB (PNG/ZIP) support not installed     --- FREETYPE2 support ok     --- LITTLECMS support ok     --------------------------------------------------------------------     Running selftest:     --- 57 tests passed.


title: kexec from within initramfs

text: Can `kexec` be used from within `initramfs` to load up a new image and kernel? It seems that `kexec` calls `shutdown` which then looks for `/dev/initctl`, which is missing from a `busybox` `initramfs` image. Any guidance would be appreciated!


title: How to make titlebars in XFCE bigger?

text: No matter how big font I set for titlebar, the height of the titlebar is not changed at all. I don't see any editbox where I could enter the desired height of titlebar. So far, I only found workaround, that you should edit window's button (close, maximize, and so on) from current theme. However this is tiresome, because if you decide, that the new height is not OK, and it should be 1 px bigger, you have to rescale the buttons (whole set) again. I am looking for something theme independent, and straightforward.


title: Strange behaviour of uninitialized arrays and unset arrays

text: I'm writing a script and I discovered some unexpected behaviour of uninitialized and unset array variables that I do not understand. First of all, the length:               giacomo@jack-laptop:~$ echo ${#notset[@]}     0     giacomo@jack-laptop:~$ uninitialized=     giacomo@jack-laptop:~$ echo ${#uninitialized[@]}     1      Why is the `uninitialized` length 1? Shouldn't it be zero? Is it because a null variable is considered an array of one null element? This fact leads to some problems. For example suppose I want to create an array, and insert a certain number of things based on the user command line arguments. I thought I could do something like(+):               myarray=          if [ some-condition ]     then         myarray[${#myarray[@]}]=some-value     fi          if [ some-condition2 ]     then         myarray[${#myarray[@]}]=some-value2     elif [ some-condition3 ]     then         myarray[${myarray[@]}]=some-value3         myarray[${myarray[@]}]=some-value4     fi      But this leaves the first slot to null, which I do not like and also breaks some code that I have written(*), and at this point suppose that I want to see if the array contains any element. How should I do it?               [ -z "${myarray[@]}" ]      Raises an error if the array contains more than an element.               [ -z "$myarray" ]      Fails because the first element is null, even if the array is not empty. So, how should I control that an array is uninitialized? And could someone explain what exactly happens when dealing with _arrays_ and unset - uninitialized variables? * * * (+) I know that I could avoid "declaring" the variable and it would work, but this script will be reviewed by a professor, and he does not like variables being defined at random places. (*) Before trying this thing I was keeping the length of the array in an other variable, and so I did not have problems. But I'd like to avoid defining this auxiliary variables since I know I can obtain the length without them.


title: How to create a new user without his own FS but with access to write to only one folder of user that creates him?

text: What are the command(s) to create a new user (not from `su`), give him the ability to write to only one folder which is some directory owned by an already existing user (the one that created him)? Meaning that the folder is already under some existing user's FS. How can I create another user and only let him write to that folder? I was told here: > Use useradd, adduser, or whatever utility your unix variant has to create a > user. The easiest way to control access to the directory is to make it and > its files (but nothing else) owned by a newly created group, and make the > new user a member of that group (and no other group). but I do not know which commands to use to do such thing. So how to do it?


title: Why does Firestarter say my firewall is active but ufw status shows it as inactive?

text: I am using Linux Mint and am having the following issue. Firestarter tells my that my firewall is active and it does indeed seem to be active. However when I type "sudo ufw status" into the terminal, I get the response "Status: inactive". It is my understanding that Firestarter is merely a way of controlling ufw. So, why the discrepancy?


title: Installing virtualbox on Debian: dependency problems

text: I'm currently running Debian Wheezy (Testing). I want to install `virtualbox` but when I run the following:               # aptitude install virtualbox      ...I get the following result:               The following packages have unmet dependencies:      libqt4-qt3support : Depends: libqtcore4 (= 4:4.8.2+dfsg-2) but 4:4.8.2+dfsg-6 is to be installed.                          Depends: libqtgui4 (= 4:4.8.2+dfsg-2) but 4:4.8.2+dfsg-6 is to be installed.      qdbus : Depends: libqtcore4 (= 4:4.8.2+dfsg-2) but 4:4.8.2+dfsg-6 is to be installed.      libqt4-script : Depends: libqtcore4 (= 4:4.8.2+dfsg-2) but 4:4.8.2+dfsg-6 is to be installed.      libqt4-designer : Depends: libqtcore4 (= 4:4.8.2+dfsg-2) but 4:4.8.2+dfsg-6 is to be installed.                        Depends: libqtgui4 (= 4:4.8.2+dfsg-2) but 4:4.8.2+dfsg-6 is to be installed.      libqt4-network : Depends: libqtcore4 (= 4:4.8.2+dfsg-2) but 4:4.8.2+dfsg-6 is to be installed.      libqt4-dbus : Depends: libqtcore4 (= 4:4.8.2+dfsg-2) but 4:4.8.2+dfsg-6 is to be installed.      qt4-qtconfig : Depends: libqtcore4 (= 4:4.8.2+dfsg-2) but 4:4.8.2+dfsg-6 is to be installed.                     Depends: libqtgui4 (= 4:4.8.2+dfsg-2) but 4:4.8.2+dfsg-6 is to be installed.      libqt4-sql : Depends: libqtcore4 (= 4:4.8.2+dfsg-2) but 4:4.8.2+dfsg-6 is to be installed.      libqt4-xml : Depends: libqtcore4 (= 4:4.8.2+dfsg-2) but 4:4.8.2+dfsg-6 is to be installed.      libqt4-sql-mysql : Depends: libqtcore4 (= 4:4.8.2+dfsg-2) but 4:4.8.2+dfsg-6 is to be installed.      Aptitude then gives me a list of solutions, none of which seem very appealing. It seems to want to install packages from unstable rather than testing, but I don't really want to do this. **Why is this a problem if the packages have the correct version numbers?** This is the contents of my `/etc/apt/source.list`:               deb http://debian.man.ac.uk/debian/ wheezy main non-free contrib     deb-src http://debian.man.ac.uk/debian/ wheezy main non-free contrib          deb http://security.debian.org/ wheezy/updates main contrib non-free     deb-src http://security.debian.org/ wheezy/updates main contrib non-free          deb http://debian.man.ac.uk/debian/ wheezy-updates main contrib non-free     deb-src http://debian.man.ac.uk/debian/ wheezy-updates main contrib non-free          # The following line is required for iceweasel in wheezy     deb http://debian.man.ac.uk/debian experimental main          # The following line is required for icedove in wheezy     deb http://debian.man.ac.uk/debian unstable main


title: How to run chrome from terminal window after deb isntallation?

text: I have remote box accessed by VNC and `jwm` desktop. No menus, not desktop icons, only terminal window. I have downloaded `chrome` deb package and installed it. Now how can I run it from terminal window?


title: What is in the output of "getent ahosts"?

text: What are the fields printed by `getent ahosts DOMAIN`? The output for `getent hosts` is a simple combination of IP and hostname. The `getent ahosts` has an additional third field that is, in all my test, either `STREAM`, `DGRAM` or `RAW`. Output for `getent hosts example.net`               2001:500:88:200::10 example.net      and for `getent ahosts example.net`               2001:500:88:200::10 STREAM example.net     2001:500:88:200::10 DGRAM       2001:500:88:200::10 RAW         192.0.43.10     STREAM      192.0.43.10     DGRAM       192.0.43.10     RAW


title: Piped search queries in vim or less

text: I would like to be able to search a log file for lines that being with ^2014-02-18 15:30:[0-9:,]* and have UserName:someguy much later in the same line. I am sure I could do a regex to include any number of characters, digits and spaces before that point, but I would like to know if I could effectively do something like `/^2014-02-18 15:30:[0-9:,]* | /UserName:someguy` meaning pipe the results of the first search through the second search, while still in vim or less. Obviously I could do this with grep externally.


title: crossplatformui error in Mint 11

text: Whenever I try to install something in my system it generally installs but shows some error related to "crossplatformui". I don't know what it is and how to remove it. I am printing here a sample session:               Reading package lists... Done     Building dependency tree            Reading state information... Done     The following extra packages will be installed:       wordnet wordnet-base wordnet-sense-index     The following NEW packages will be installed:       artha wordnet wordnet-base wordnet-sense-index     0 upgraded, 4 newly installed, 0 to remove and 18 not upgraded.     1 not fully installed or removed.     Need to get 11.1 MB of archives.     After this operation, 38.1 MB of additional disk space will be used.     Do you want to continue [Y/n]? y     Get:1 http://archive.ubuntu.com/ubuntu/ natty/universe wordnet-base all 1:3.0-23ubuntu1 [8,761 kB]     Get:2 http://archive.ubuntu.com/ubuntu/ natty/universe wordnet i386 1:3.0-23ubuntu1 [57.8 kB]     Get:3 http://archive.ubuntu.com/ubuntu/ natty/universe artha i386 1.0.1-1ubuntu1 [65.3 kB]     Get:4 http://archive.ubuntu.com/ubuntu/ natty/universe wordnet-sense-index all 1:3.0-23ubuntu1 [2,243 kB]     Fetched 11.1 MB in 1min 12s (153 kB/s)                                              Selecting previously deselected package wordnet-base.     (Reading database ... 146247 files and directories currently installed.)     Unpacking wordnet-base (from .../wordnet-base_1%3a3.0-23ubuntu1_all.deb) ...     Selecting previously deselected package wordnet.     Unpacking wordnet (from .../wordnet_1%3a3.0-23ubuntu1_i386.deb) ...     Selecting previously deselected package artha.     Unpacking artha (from .../artha_1.0.1-1ubuntu1_i386.deb) ...     Selecting previously deselected package wordnet-sense-index.     Unpacking wordnet-sense-index (from .../wordnet-sense-index_1%3a3.0-23ubuntu1_all.deb) ...     Processing triggers for man-db ...     Processing triggers for menu ...     Processing triggers for bamfdaemon ...     Rebuilding /usr/share/applications/bamf.index...     Processing triggers for desktop-file-utils ...     Processing triggers for python-gmenu ...     Rebuilding /usr/share/applications/desktop.en_IN.utf8.cache...     Processing triggers for python-support ...     Setting up crossplatformui (2.1.1) ...     Rather than invoking init scripts through /etc/init.d, use the service(8)     utility, e.g. service acpid restart          Since the script you are attempting to invoke has been converted to an     Upstart job, you may also use the stop(8) and then start(8) utilities,     e.g. stop acpid ; start acpid. The restart(8) utility is also available.     acpid stop/waiting     acpid start/running, process 2658     package libqtgui4 exist     QT_VERSION = 4     Sorry! The usb-serial driver does not support your Linux version.     Sorry! Make usb-serial driver error.     But, it try to use the default driver module.     mv: cannot stat `/usr/local/bin/ztemtApp/ztemt.ko': No such file or directory     dpkg: error processing crossplatformui (--configure):      subprocess installed post-installation script returned error exit status 1     Setting up wordnet-base (1:3.0-23ubuntu1) ...     Setting up wordnet (1:3.0-23ubuntu1) ...     Setting up artha (1.0.1-1ubuntu1) ...     Setting up wordnet-sense-index (1:3.0-23ubuntu1) ...     Processing triggers for menu ...     Processing triggers for libc-bin ...     ldconfig deferred processing now taking place     Errors were encountered while processing:      crossplatformui     E: Sub-process /usr/bin/dpkg returned an error code (1)


title: Will the Firewall GUI in CentOS overwrite changes implemented by IPTABLES manual edits?

text: I would like to restrict access to the SSH port of a new CentOS 6.2 server to select IP addresses but the Firewall GUI utility seems to be an all-or-nothing scenario. Either the port is firewalled or it is opened. If I make changes using the IPTABLES commands and save them out, and then later someone uses the Firewall GUI to make other modifications such as opening up access to FTP or the like, will that remove the changes I made using the IPTABLES commands or manual edits to the tables?


title: Postfix: Forward/Reroute mails with unknown recipients

text: I'm running a postfix/dovecot mail server and everything works quite well.   What I want to do now is forward all mails with a recipient that does not have an entry in the local recipient table, to another, existing user. I've tried google'ing around, but I haven't found anything...it seems like this is an uncommon thing to do. Does anyone know how to do that, or can maybe point me to a lead? Thanks a lot in advance.


title: port opening in linux server

text: I need to open port 7001 in a linux server ( RHEL 6.3 ). Firewall is not running.               [root@hslsaoid2 ~]# service iptables status     iptables: Firewall is not running.      Please find the `netstat -ntpl` output               [root@hslsaoid2 ~]# netstat -ntpl     Active Internet connections (only servers)     Proto Recv-Q Send-Q Local Address               Foreign Address             State       PID/Program name     tcp        0      0 0.0.0.0:57991               0.0.0.0:*                   LISTEN      15590/rpc.mountd     tcp        0      0 0.0.0.0:875                 0.0.0.0:*                   LISTEN      15586/rpc.rquotad     tcp        0      0 0.0.0.0:111                 0.0.0.0:*                   LISTEN      1299/rpcbind     tcp        0      0 0.0.0.0:55698               0.0.0.0:*                   LISTEN      -     tcp        0      0 0.0.0.0:51828               0.0.0.0:*                   LISTEN      -     tcp        0      0 0.0.0.0:22                  0.0.0.0:*                   LISTEN      1582/sshd     tcp        0      0 127.0.0.1:631               0.0.0.0:*                   LISTEN      1474/cupsd     tcp        0      0 127.0.0.1:25                0.0.0.0:*                   LISTEN      1674/master     tcp        0      0 0.0.0.0:47486               0.0.0.0:*                   LISTEN      1425/rpc.statd     tcp        0      0 0.0.0.0:2049                0.0.0.0:*                   LISTEN      -     tcp        0      0 0.0.0.0:34658               0.0.0.0:*                   LISTEN      15590/rpc.mountd     tcp        0      0 0.0.0.0:42820               0.0.0.0:*                   LISTEN      15590/rpc.mountd     tcp        0      0 :::5989                     :::*                        LISTEN      1767/cimservermain     tcp        0      0 :::34122                    :::*                        LISTEN      15590/rpc.mountd     tcp        0      0 :::111                      :::*                        LISTEN      1299/rpcbind     tcp        0      0 :::22                       :::*                        LISTEN      1582/sshd     tcp        0      0 :::46679                    :::*                        LISTEN      15590/rpc.mountd     tcp        0      0 ::1:631                     :::*                        LISTEN      1474/cupsd     tcp        0      0 ::1:25                      :::*                        LISTEN      1674/master     tcp        0      0 :::46521                    :::*                        LISTEN      1425/rpc.statd     tcp        0      0 :::36283                    :::*                        LISTEN      -     tcp        0      0 :::32896                    :::*                        LISTEN      -     tcp        0      0 :::8704                     :::*                        LISTEN      13631/java     tcp        0      0 :::2049                     :::*                        LISTEN      -     tcp        0      0 :::60929                    :::*                        LISTEN      15590/rpc.mountd      I tried to edit in `/etc/sysconfig/iptables` and restart the firewall but failed.. Kindly help to open port..


title: Monitoring the OpenSSH sFTP process?

text: Is there a way to monitor the current status of my sFTP process from my Debian server? I'm looking from something similar to `top` or `netstat` that will give me the status/progress of activities (uploads, downloads) to my OpenSSH-based sFTP server. Other bits that might be of use: I'll be looking at the results using a SSH session on the server. There is only one sFTP enabled user.


title: Need help processing a text file with awk to conform to CSV flat file format

text: I have the following problem. I collected data on reaction time from over 100 participants for an experiment I am running. Unfortunately, the separators between fields were not consistent, but after a lot of heartache with sed, I have managed to solve this problem. The experiment was divided into blocks (5 for each participant) and what I need is each block to be outputted on its own line, separated by commas. Here is a sample of my datafile:               Participant: 2456, Test: Optimism IAT. Format is stimulus ,  correct(1)/incorrect(0) ,  time(ms).  Writes 10 trials per line.     17/01/2011, 12:46:03 ,     Block 1: , Theirs   , 1        , 1921     , Myself   , 1        , 928      , Them     , 1        , 716      , Theirs   , 1        , 720      , Myself   , 1        , 533      , Me       , 1        , 596      , Themselves , 1        , 527      , Myself   , 1        , 656      , Mine     , 1        , 551      , Myself   , 1        , 624          , Themselves , 1        , 570      , Me       , 1        , 514          ,Block 1 Time,: 8856    ,     Block 2: , Failing  , 1        , 1835     , Happy    , 1        , 1118     , Sad      , 1        , 673      , Succeeding , 1        , 690      , Improving , 1        , 795      , Succeeding , 1        , 602      , Worse    , 1        , 586      , Succeeding , 1        , 553      , Improving , 1        , 619      , Disimproving , 1        , 659          , Succeeding , 1        , 596      , Failing  , 1        , 539          ,Block 2 Time,: 9265    ,     Block 3: , Succeeding , 1        , 2881     , Disimproving , 1        , 1072     , Mine     , 1        , 1120     , Me       , 1        , 627      , Happy    , 1        , 669      , Theirs   , 1        , 1539     , Worse    , 1        , 841      , Me       , 1        , 862      , Sad      , 1        , 1370     , Succeeding , 1        , 1115         , Worse    , 1        , 855      , Theirs   , 1        , 792      , Them     , 1        , 627      , Better   , 1        , 735      , Me       , 1        , 626      , Happy    , 1        , 622      , Succeeding , 1        , 616      , Mine     , 1        , 646      , Them     , 1        , 599      , Disimproving , 1        , 607          , Better   , 1        , 799      , Myself   , 1        , 1408     , Me       , 1        , 463      , Better   , 1        , 839      , Failing  , 1        , 602      , Mine     , 1        , 633      , Better   , 1        , 525      , Sad      , 1        , 573      , Worse    , 1        , 770      , Me       , 1        , 508          , Theirs   , 1        , 613      , Disimproving , 1        , 649      , Improving , 1        , 701      , Theirs   , 1        , 590      , Disimproving , 1        , 716      , Better   , 1        , 714          ,Block 3 Time,: 29924   ,     Block 4: , Them     , 1        , 1659     , Myself   , 1        , 1036     , Themselves , 1        , 595      , Me       , 1        , 509      , Myself   , 1        , 648      , Themselves , 1        , 542      , Myself   , 1        , 536      , Mine     , 1        , 537      , Theirs   , 1        , 615      , Mine     , 1        , 520          , Me       , 1        , 596      , Mine     , 1        , 471          ,Block 4 Time,: 8264    ,     Block 5: , Mine     , 1        , 1527     , Myself   , 1        , 1235     , Disimproving , 0        , 2001     , Theirs   , 1        , 981      , Succeeding , 1        , 1994     , Happy    , 1        , 1454     , Failing  , 1        , 1941     , Theirs   , 1        , 1151     , Failing  , 0        , 1358     , Me       , 1        , 790          , Failing  , 1        , 717      , Mine     , 1        , 585      , Myself   , 1        , 821      , Themselves , 1        , 793      , Disimproving , 1        , 965      , Succeeding , 1        , 727      , Worse    , 1        , 961      , Theirs   , 1        , 1259     , Mine     , 1        , 578      , Better   , 1        , 1112         , Mine     , 1        , 1207     , Happy    , 1        , 843      , Worse    , 1        , 1064     , Failing  , 1        , 699      , Happy    , 1        , 700      , Myself   , 1        , 516      , Them     , 1        , 794      , Me       , 1        , 526      , Sad      , 1        , 1118     , Improving , 1        , 826          , Mine     , 1        , 540      , Succeeding , 1        , 952      , Myself   , 1        , 536      , Themselves , 1        , 851      , Improving , 1        , 865      , Mine     , 1        , 582          ,Block 5 Time,: 35569        As you can see, each of the blocks take up multiple lines. I need them to take up one line in the following format               Participant Date Time   Block  Word1 Correct1 Time1.....Word36 Correct36  Time36     2456                    1      Happy   1      1200       sad    0         1500     .     .     .     1234                     5    sad       0     1100       happy   1       900      The issue is that blocks 3 &5 have 36 stimuli while blocks 1,2 &4 have 12. I need the participant, datetime and block time in each row also. Here is the script that got the data into the form you see here, but it doesn't give me each block on one line only which is what i need. Your help would be greatly appreciated.               BEGIN{         FS="\\";         RS="#";         OFS=",";         ORS="\n";     }{         for(i=1;i<=NF;i++) {printf "%-10s", $i; printf ",";}           }      I'm using gawk version 3.1.6 on Ubuntu 10.04.


title: Custom directory for cron commands

text: I'm using `vixie` cron on Debian/Ubuntu. How to set a custom directory to be read by cron? I want to lead crontab to run commands found in a series of files, e.g.               /home/cron/*.cron      or perfectly               /home/*/cron/*.*      In fact, instead of putting cron commands in `/var/spool/cron/crontab/root`, I want to spread commands in these folder. Is it possible and recommended to use `include` for calling other files within `root` file?


title: Ubuntu Qmake is not an executable

text: after installing new version of QtCreator in Ubuntu and               tux-world@alachiq:~ > sudo apt-get install qt5-qmake build-essential g++ gcc        Reading package lists... Done        Building dependency tree               Reading state information... Done        build-essential is already the newest version.        g++ is already the newest version.        g++ set to manually installed.        gcc is already the newest version.        qt5-qmake is already the newest version.        0 upgraded, 0 newly installed, 0 to remove and 247 not upgraded.      in option of `Build & Run` and choose qmake in `/usr/bin/qmake` i get this error :               The qmake executable /usr/lib/i386-linux-gnu/qt4/bin/qmake could not be added: qmake '/usr/lib/i386-linux-gnu/qt4/bin/qmake' is not an executable.      in Home system i don't have any problem after installing those packages and setting Qmake in option Other information:               tux-world@alachiq:~ > apt-cache search qt5-qmake     qt5-qmake - Qt 5 qmake Makefile generator tool          tux-world@alachiq:~ > ldd /opt/qtForArm/bin/qmake           ldd: /opt/qtForArm/bin/qmake: No such file or directory          tux-world@alachiq:~ > sudo chmod +x /usr/lib/i386-linux-gnu/qt4/bin/qmake     [sudo] password for tux-world:      chmod: cannot access ‘/usr/lib/i386-linux-gnu/qt4/bin/qmake’: No such file or directory      **UPDATE** :               tux-world@alachiq:~ > apt-cache policy qt5-qmake     qt5-qmake:       Installed: 5.2.1+dfsg-1ubuntu14.2       Candidate: 5.2.1+dfsg-1ubuntu14.2       Version table:      *** 5.2.1+dfsg-1ubuntu14.2 0             500 http://archive.ubuntu.com/ubuntu/ trusty-updates/main i386 Packages             100 /var/lib/dpkg/status          5.2.1+dfsg-1ubuntu14 0             500 http://archive.ubuntu.com/ubuntu/ trusty/main i386 Packages                    tux-world@alachiq:~ > ls -a -l /usr/bin/qmake      lrwxrwxrwx 1 root root 9 فوریه 19 15:53 /usr/bin/qmake -> qtchooser                    tux-world@alachiq:~ > qtchooser      Usage:       qtchooser { -l | -list-versions | -print-env }       qtchooser -run-tool=<tool name> [-qt=<Qt version>] [program arguments]       <executable name> [-qt=<Qt version>] [program arguments]          Environment variables accepted:      QTCHOOSER_RUNTOOL  name of the tool to be run (same as the -run-tool argument)      QT_SELECT          version of Qt to be run (same as the -qt argument)          tux-world@alachiq:~ >


title: Can I refresh my shell within a shell script?

text: Very new to Bash scripting... I am trying to setup a script that starts with a minimal CentOS 6 install and provisions it for Ruby development.               #!/bin/bash          # Add PostgreSQL Repo     rpm -i http://yum.postgresql.org/9.1/redhat/rhel-6-x86_64/pgdg-redhat91-9.1-5.noarch.rpm          # Add NginX Repo     echo '[nginx]' > /etc/yum.repos.d/nginx.repo     echo 'name=nginx repo' >> /etc/yum.repos.d/nginx.repo     echo 'baseurl=http://nginx.org/packages/centos/6/$basearch/' >> /etc/yum.repos.d/nginx.repo     echo 'gpgcheck=0' >> /etc/yum.repos.d/nginx.repo     echo 'enabled=1' >> /etc/yum.repos.d/nginx.repo          # Update     yum update -y          # Install NginX, PostgreSQL, and Ruby Dependencies     yum install -y nginx postgresql91-server postgresql91-contrib gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel make bzip2 autoconf automake libtool bison piconv-devel sqlite-devel git-core          # PostgreSQL Post Install     service postgresql-9.1 initdb     chkconfig postgresql-9.1 on          # Install rbenv system wide install     git clone git://github.com/sstephenson/rbenv.git /usr/local/rbenv          # Install ruby-build     git clone git://github.com/sstephenson/ruby-build.git /usr/local/rbenv/plugins/ruby-build          # Add rbenv to the path     echo '# rbenv setup - only add RBENV PATH variables if no single user install found' > /etc/profile.d/rbenv.sh     echo 'if [[ ! -d "${HOME}/.rbenv" ]]; then' >> /etc/profile.d/rbenv.sh     echo '  export RBENV_ROOT=/usr/local/rbenv' >> /etc/profile.d/rbenv.sh     echo '  export PATH="$RBENV_ROOT/bin:$PATH"' >> /etc/profile.d/rbenv.sh     echo '  eval "$(rbenv init -)"' >> /etc/profile.d/rbenv.sh     echo 'fi'  >> /etc/profile.d/rbenv.sh     chmod +x /etc/profile.d/rbenv.sh          # SHELL NEEDS TO BE REFRESHED HERE          # Install latest Ruby     rbenv install 1.9.3-p286          # Set Global Ruby     rbenv global 1.9.3-p286      I am getting a rbenv: command not found error when it gets to the point where it uses rbenv because my shell needs refreshed/restarted for it to recognize the command. How can I accomplish this? Thanks.


title: dhcpd: any way to check dhcp pool status?

text: Once `dhcpd` (IPv4) is started, is there any way to check its internal pool status? e.g how many addresses are available? I checked `man(8) dhcpd`, there's no signals/files available for that info.


title: Why does Linux on sparc64 architecture use 32-bit pointers in user-space and 64-bit pointers in kernel-space?

text: What are the advantages of deviating from the norm; that is 64-bit pointers in both user and kernel space for a 64-bit architecture? Reference: http://lwn.net/images/pdf/LDD3/ch11.pdf (Page 2)


title: Mounting HTFS Disk on Linux

text: I got my hand on a harddrive that contains a SCO Openserver 5 and I need to access the data inside. Is there any way I can just mount and start copy- pasting the files? I've googled around and mostly get some instruction from 2000s that don't work. It looks like the Linux kernel needs to be compiled to support the filesystem. Are there any distros that supports this by default? If not, how could I access the drive without sharing it on the network?


title: ess has disappeared from emacs

text: I frequently use emacs ess functions. Specifically, I use r-mode and run R in emacs. However, quite suddenly, emacs is no longer offering ess options. r-mode is no longer an option in emacs nor is R. I tried purging ess and emacs (`aptitude --purge remove emacs ess`) and even removed my .emacs file and .emacs.d folder - to no avail. I'm using Debian (Jessie). emacs23 was installed. In trying to get this to work, I installed emacs24, and then even xemacs (on the off chance). Still no success. I was having a problem with el-get -- so I purged and reinstalled related packages. Oddly enough, reinstalling `dictionaries-common` was some help there (see http://askubuntu.com/questions/295234/broken-emacs- installation)- but still no luck with emacs and ess. There are no error messages installing, uninstalling, or reinstalling emacs, ess, or r. How can I amend this?


title: Why the code in a for loop is executed only in the first directory in a bash shell?

text: Under a directory called `a` there are many subfolders where I want to do something. The same for all. I do the following but it applies only to the first subdirectory:               for i in "a/*"         do                 #echo $i                 cd $i                 mkdir test                 mv *_no test                 touch aaa                 cd ..         done      The above code I want to be executed in every directory under `a`.


title: How do I get a list of all the available keyboard layouts in X.org?

text: I know these layouts have two-letter codes like 'us'for the US layout. I need a list of all the layouts available and also to pair the two-letter codes to the proper names of the layout to get the not so trivial ones.


title: Delete all but largest file of specific type

text: I am trying to organise the album art in my music collection so that only one image is assigned to each folder. My directory structure currently looks like:               /path/to/music/Album Name/     /path/to/music/Album Name/1 - Track one.flac     ...     /path/to/music/Album Name/cover.jpg (either this)     /path/to/music/Album Name/folder.jpg (or this)     /path/to/music/Album Name/Album Name.jpg (or this is the largest file)     /path/to/music/Album Name/AlbumArtSmall.jpg        (plus other low resolution images generated by Windows media player) I would like to scan through each folder and delete all but the largest jpg and rename it to `cover.jpg`. As the tags indicate, I have cygwin installed, but can also boot into Ubuntu where I have access to bash and zsh, if this makes the problem easier.


title: Use tabs for indentation in Python mode

text: I am using Emacs for Python developement. My team is using `Tab` indentation, so I must do the same. The problem is that I can't figure out how to make python-mode use tabs instead of spaces. I want Emacs to automatically indent my line to the correct level when I press `Ctrl`-`j`.