When compiling I get an error, `@LIBICONV@: No such file or directory`?

When I run `make` for flac, I get this               gcc: error: @LIBICONV@: No such file or directory     make[3]: *** [flac] Error 1     make[3]: Leaving directory `/home/ubuntu/flac/src/flac'     make[2]: *** [all-recursive] Error 1     make[2]: Leaving directory `/home/ubuntu/flac/src'     make[1]: *** [all-recursive] Error 1     make[1]: Leaving directory `/home/ubuntu/flac'     make: *** [all] Error 2      While `aclocal.sh` ran successfully (exit code 0), I got this when I ran it,               configure.ac:308: warning: macro `AM_ICONV' not found in library     configure.ac:309: warning: macro `AM_LANGINFO_CODESET' not found in library     configure.ac:308: warning: macro `AM_ICONV' not found in library     configure.ac:309: warning: macro `AM_LANGINFO_CODESET' not found in library      I tried looking for an `inconv.h`, or for an `iconv-dev` package with my distro and I couldn't find one. How do I resolve this problem?


Replace common values in two files according to first column

How do I replace common values in two files according to first column? I have file 1 (1.txt):               CH063_01084     CH063_01083     CH063_13925     CH063_14473      and file 2 (2.txt):               CH063_01083         FGSG_16349  4     CH063_14473         FGSG_16350  5      output file should be :               CH063_01084     CH063_01083          FGSG_16349 4     CH063_13925     CH063_14473          FGSG_16350 5


Mouse drifts when dragging in Linux Mint KDE on VMWare Fusion

I'm using VMware Fusion with Linux Mint KDE (I think v13). The mouse works fine except for when I'm dragging something (e.g. resize or move a window). When I do that the mouse moves. Sort of like I click in one place and then it slowly drifts away a few pixels - like it is slowly snapping to a grid. I don't think it's VMware - the mouse works fine in Windows VMs and in ubuntu gnome VMs. I think it might be some setting in KDE but I don't know what. What can it be? **EDIT** VMware Tools is already installed for this virtual machine.


Administratively spread several Thunderbird per-recipient rules for some users?

I administer several computers that have Thunderbird/Icedove installed and I want to spread Thunderbird per-recipient rules for some users. The rules are stored in a file - `pgprules.xml` in the user home folder `~/.icedove/_profile_folder_/pgprules.xml`. Is there a way to put these settings/rules in a way that they will be imported by default when the user installs or updates the mail client? I can do that with the OpenPGP settings - under `/etc/xul-ext/enigmail.js`.


How can I know the process name which is opening a tcp port?

I have two linux servers. Let's say they are `C` and `S`.   `C` is client of `S` On my `S` machine, I type. > $ netstat -an | grep ESTABLISHED   >  tcp 0 0 192.168.1.220:3306 **C:57010** ESTABLISHED Then I can know `C` is connecting now.   In the `C` machine, I'd also like to know the _process name_ which is opening the port **57010** and connecting the `S` server. How can I do that? Of course I have root permission of `C`.


Giving input to background processes

Is there any way to give input to background processes or which run as daemon processes? I was coding some Puppet configuration files and I had to push them to some remote machine. For that purpose I used git. So I created a bare repository on that remote machine and used a git hook which would update the file after each push. So to update in `/etc/puppet` of the server machine I need to authenticate as root of that machine... But git essentially does this transfer through SSH (in the background ). I tried to use `/bin/expect` to provide username and password for root of the remote machine but it didn't work.


how to use dd to fill drive with 1's

Filling a drive with /dev/urandom seems to be very slow, so I created a file filled with FF:               dd if=/dev/zero ibs=1k count=1000 | tr "\000" "\377" >ff.bin      I'd like to fill the drive with copies of this file but the following command only writes once:               dd if=ff.bin of=/dev/sdb count=10000      How do I fill the drive with copies of the file, or is there a faster way to fill the drive with 1's?


Is interrupting badblocks risky?

I'm running badblocks to check for bad segments on an external drive, and it's been about an hour and it has not yet finished. Now, I need to go and consider cancelling. Is this somehow risky? Should I avoid this? Clearly, I will need to start again from scratch; I just want to know if this is somehow risky to abort midway.


Cannot switch to console anymore after using Alt_R as mod4

I'd like to use the right ALT key as 'mod4' (most notably because, by default, the 'awesome' window manager is using mod4 as a modifier for most WM commands and I like that idea a lot). However I've got an issue: as soon as I add:               xmodmap -e 'add mod4 = Alt_R'      then I cannot use, say, CTRL+ALT+F2 to switch from X to a text console. (note that I always used left ALT to do that, not right ALT: actually before assigning right ALT to mod4 I was never ever using that key) It's really a problem with the shortcut / modifiers since that I can still switch from X to a text console by using, say, the _chvt_ command. For example the following always works fine:               chvt 1      As soon as I clear mod4:               xmodmap -e 'clear mod4'      I can use `CTRL+ALT+F2` (left ALT once again) to switch to my text console. But of course then I don't get the nice default mod4+... 'awesome' shortcuts. So basically I can either use right ALT as mod4 and have awesome work fine _or_ I can clear mod4 (not assigning right ALT to any modifier) and be able to use CTRL+ALT+F2 to swith to a text console. But I cannot do both. Do any of you know why configuring right ALT as mod4 prevents CTRL+left ALT+F2 from switching to a text console? Here's the full _xmodmap_ (when CTRL+left ALT+F2 is _not_ working):               shift   Shift_L (0x32), Shift_R (0x3e)     lock     control Control_L (0x25), Control_L (0x42), Control_R (0x69)     mod1    Alt_L (0x40), Alt_L (0xcc), Metal_L (0xcd)     mod2    Num_Lock (0x4d)     mod3         mod4    Alt_R (0x6c)     mod5    ISO_Level3_Shift (0x5c), Mode_switch (0xcb)      Once again clearing that mod4 and I can switch to a text console fine... I'm not interested in using another setup than:   * right ALT as mod4    * mod4+... as shortcuts for awesome   * CTRL+ALT+F{1,9} to switch to a different VT Now of course I can use "chvt" to switch to a text console, but that wouldn't work that great should my X be stuck. I always like to have the possibility to switch to a text console to, say, kill X if it's stuck (been doing that since the early days of slackware).


Where does package make-doc end up after installation?

I am on Mint 12 KDE. I used Software Manager to install make-doc - "Documentation for the gnu version of the "make" utility". How do I access what was downloaded?


Which filesystem to use for a partition shared with a parallel windows instalation?

On my new PC I want to install both Linux and Windows, each on their own rather small partition, and put the big rest of the 1 TB HDD in a further partition (plus swap). Which filesystem should I use? My thoughts:   * NTFS. Linux has write support, but I noticed on my external HDD a huge perfomance drop when only a few GB (of 500 GB) were left free - suddenly a few hundred MB took half an hour to copy... Any ideas why? Also no file permissions with Linux, although that is not 100% necessary but would be a bonus   * fat32. Too old, won't support that partition size anyway   * ext3. Windows can read for example via ext2ifs, but what about good write support? I'd even consider a small virtual machine with a tiny Linux installation to only provide a NFS share to its host windows (probably qemu, distro recommendation are appreciated)   * ext4. I lack the experience with it... It looks lke NTFS is the way to go for now (just as it was two years ago), but I'd prefer a less proprietary solution...


How to give HTTP traffic higher priority?

When I surf the web, I find that I have to pause my BitTorrent client, to help improve the painfully slow speed (I'm sadly on a 384kbps line). It's not too nice to have to do this manually _every_ time. Please show me the magic button, the one which I only need to press once in order to be blessed with speedier, higher-priority surfing, where the torrents speed take a backseat, only to resume to full speed once my web-surfing is over. [ **FYI** ] NetworkManager manages my network, and Transmission is my BitTorrent client.


Is it possible to boot an x86 Linux kernel using both 80x25 text mode consoles and VESA framebuffer consoles?

The Linux kernel documents that you can choose to boot Linux with VESA framebuffer consoles instead of the default 80x25 text mode consoles. For text application testing purposes, one may need both modes simultaneously. For instance, `ALT`+`1` to `ALT`+`3` in 80x25 text mode and `ALT`+`4` to `ALT`+`6` in framebuffer mode. Is there a way to achieve dual mode text displays in a single boot?


How to efficiently use 3D via a remote connection?

I have one weak PC (client) but with acceptable 3D performance, and one strong PC (server) which should be capable of running an application using OpenGL twice, i.e. once locally and once remotely for the client. Currently, I `ssh -X` into it, but the client's console output states software rendering is used and I only get 3 frames per second (fps). Actually, ssh's encryption is not necessary since this is on a LAN, but it's what I already know for remote applications... So, how can the client performance be increased? My ideas are   * use hardware acceleration, but the server's or the client's one and how?   * use something different than ssh I know, in full resolution and without sophisticated compression a 100 Mbit/s LAN won't make more fps, but it's a windowed application of ca. 800x450, so theoretically up to 12 fps (at 24 bits/pixel) should be possible using uncompressed graphical data. And maybe something better is possible using the client's own GPU or some smart compression. \-- **edit** Turns out what I want is basically a local version of what e.g. onlive and gaikai offers. Is there something like this for Linux (and possibly free)? \-- **edit2** VirtualGL looks like the best solution (though currently not working for me), but I wonder if it is possible to do hardware rendering on the client, too


What does sudo su work but su does not?

I have tried this on `Fedora` and on `Ubuntu`.               kshitiz@kshitiz:~$su     su: Authentication failure          kshitiz@kshitiz:~$sudo su          root@kshitiz:/home/kshitiz#      I am entering the same password in both the cases.


Why do you need sudo for "sudo su root"?

> **Possible Duplicate:**   >  When do su and sudo use different passwords? Why do you need to use `sudo su root` ? Why won't it work to just use `su root`?


Linux Mint: how to update repository references

I have a Linux Mint 10 Julia installed on my machine. I'd like to upgrade, but as Linux Mint upgrade page says: why upgrade? I would like to upgrade in order to have more recent software and fixes. According to that my intent is to update repository references so that I can benefit of newest updates and fixes for my installed packages. Which is the most appropriate way to do something like that?


change url of web browser thru command line?

Is there some way to change the current url (of current tab or an specific tab) of a running web browser (any) thru command line? It can be any browser that run on linux, preferably if it is light weight. I dont mean to close and re-open the browser. I was only able to open new tabs on browsers but not change the current url of them... I could not fast and easily find ways thru qdbus either (not that there arent). If some plugin alows this also, it may be ok too..


chown all files based on file name pattern in current directory

I'm trying to chown all files whose filenames begin with `ChownFileNames`. I've used this command, but it doesnt seem to work:               find . -maxdepth 1 |grep 'ChownFileNames*' -exec chown hadoop:hadoop -- {} . \;      What am I doing wrong?


Patch without changing owner and group

I've got a file owned by a non-root user:               # ls -l example.php     -rw------- 1 foo bar ... example.php      I just applied a patch with a command like               patch -p0 <<-EOF     --- .../example.php.orig 2012-06-20 15:07:13.000000000 +0200     +++ .../example.php  2012-06-20 15:43:05.000000000 +0200     ...     EOF      as root and the target file user and group were both changed to `root`. I couldn't find any reference to this in the `man` pages. Is there a way to **leave the file ownership as before** without using `su`, `sudo`, or `chown`?   * `su` seems unable to specify a group.   * `sudo -u foo patch ...` runs fine, but sets the wrong group.   * `sudo -u foo -g bar patch ...` returns `Sorry, user root is not allowed to execute '/usr/bin/patch' as foo:bar on hostname`. This might be because user `foo` is not a member of group `bar`.   * `chown` would mean having to store the permissions before running `patch`, adding another two lines of code.


Unable to mount XFS volume after reboot - unknown filesystem type 'xfs'

I have an aws ec2 instance that's been running Ubuntu 12.04 for a good long while. It has attached to it an EBS volume formatted with xfs. Today after a reboot, I'm unable to mount this volume. After the reboot, it did not get automatically mounted as per /etc/fstab. Trying to manually mount it as below, I get the following:               mount -t auto /dev/xvdf /usr/local/mnt/media     mount: unknown filesystem type 'xfs'      So it appears Ubuntu has forgotten about xfs... Any hints or ideas as to what I can do to get this volume mounted would be really appreciated.


Mutt hangs on close

After configuring mutt to monitor all of my Gmail, it hangs when I close it. I don't quite understand how it's using the spoolfile or mailboxes parameters, so perhaps I am using them incorrectly here. My other guess is that it is trying to index too many messages, because it was fine with just my Inbox. Is there a way to limit the amount of messages that mutt tries to index? I just started using Mutt with my Gmail account. I want to monitor all my incoming messages, including a large number of automated messages that are filtered out of my inbox. Here is my muttrc imap configuration:               set folder      = imaps://imap.gmail.com/     set spoolfile   = +[Gmail]/All\ Mail     mailboxes       = +[Gmail]/All\ Mail     set mail_check = 120     set imap_keepalive = 300     unset imap_passive      Here is what the status bar shows about how much mail it is indexing:               ---Mutt: =[Gmail]/All Mail [Msgs:70532 New:51357 Old:528 Flag:129 Post:1 Inc:1 2428M


Change string occurrences in file while respecting DOS new line sequences

I use Visual Studio for my C# development while using Cygwin for some of the tasks that require scripting. Recently I wanted to change all occurrences of string `AAA` to `BBB` in my project's files. I started with old trusty `sed` but, to my dismay, it changed DOS new line sequences to Unix ones. Here's what I used:               sed -i 's/AAA/BBB/g' $(grep -rl AAA /cygdrive/c/project_path)      It seems there is no `sed` switch that would do what I want. Is there some other Unix tool that could help me? EDIT: In between C# files there are some other scripts that have Unix new line characters. It would be best if this tool didn't change them to DOS ones. :)


“Error getting identity: Forbidden” when trying to add Google account to fedora online-accounts

I am using fedora 18 32 bit and wanted to add my google account through its gnome online account. I click on "Online Accounts" and then enter my Google username and password. I have enabled 2 step verification to my google. I get the verification code, everything goes well, After that I get > The GNOME application on your computer is requesting access to your Google > Account for the product(s) listed below I click on grant access. It gives an error and says: "Error getting identity: Forbidden" What shall I do?


Establishing I/O Patterns for an Application

Are there any system tools that allow you to profile an application's usage of storage? Basically, I'm looking for information on determining whether there are more large sequential reads, tiny sequential read, random writes with backtracks, etc.


Can I port a Linux DMA driver to Windows?

I want to run it on Windows without a significant change. I hope, I can change only headers and corresponding functions. http://www.alterawiki.com/wiki/File:G2x4_avmm_dma_Linux.tar.gz


Problem in connecting server to Internet

I just have setup a Linux server. But currently I am having problem in connecting to the outside world. I am not able to do wget,apt-get or ping. Here ar some relevant details:               $ping google.com     ping: unknown host google.com      * * *               cat /etc/resolv.conf          search dmust.local     nameserver 198.154.126.1      * * *               vim /etc/network/interfaces          # This file describes the network interfaces available on your system     # and how to activate them. For more information, see interfaces(5).          # The loopback network interface     auto lo     iface lo inet loopback          # The primary network interface     auto eth0     iface eth0 inet static             address 198.154.126.179             netmask 255.255.255.0             network 198.154.126.0             broadcast 198.154.126.255             gateway 198.154.126.1             # dns-* options are implemented by the resolvconf package, if installed             dns-nameservers 198.154.126.1             dns-search dmust.local      * * * **Update**               route -n          Kernel IP routing table     Destination     Gateway         Genmask         Flags Metric Ref    Use Iface     198.154.126.0   0.0.0.0         255.255.255.0   U     0      0        0 eth0     0.0.0.0         198.154.126.1   0.0.0.0         UG    100    0        0 eth0      * * *               grep '^hosts' /etc/nsswitch.conf     hosts:          files dns


Is there a way to pipe the output of one program into two other programs?

Sorry if this is a silly question but I'm trying to accomplish something like this but on one line:               $ prog1 | prog2     $ prog1 | prog3      So, I basically want to execute prog1 and pipe the output to prog2 and prog3 separately (not a chained pipe). At first, I was trying to use tee but that didn't seem right because it was dumping output to a file (which is not what I want).               $ prog1 | tee prog2 | prog3 # doesn't work - creates file "prog2"      At some point, I'd probably want to extend this to piping the output to more than two programs but I'm just starting simple for now.               $ prog1 | prog2     $ prog1 | prog3     $ prog1 | prog4     ...


Is it possible to find times of past user sessions?

Using the `who` command, I can find which users are currently logged into a machine. I would like to determine which users have logged into my machine in the past, and the length of those sessions. Is this information retained, and can I access it? The particular machine I'm thinking of is running Ubuntu 10.10.


Configuring Caps Lock as modifier and layout switcher

I want to set the caps lock key working as a modifier (modkey) and layout switcher at the same time.   * I want Caps Lock to act as a modkey in awesome in different hotkey combinations, for example, Caps Lock + Enter opens terminal and so on.   * When Caps Lock is pressed as a single key, it should act as a layout switcher on its release (by calling function that executes setxkbmap in rc.lua config). How can I accomplish that? I tried to turn Caps Lock into a modkey, but `modkey = "Lock"` in rc.lua does not seem to work right now, and after I finally made it work somehow (with xmodmap or changing the latter line in config), modkey was acting exactly the way Caps Lock acts: one press turnes it on, and another turns it off. Even if I make Caps Lock the modkey instead of Super_L, I still have no idea of how to handle its single-key release.


Using xrandr freezes computer completely

I have the following problem: I have a laptop (open) with an external monitor connected. After boot, everything is perfect - the laptop screen is on the left of the external one and both resolutions are max and so on. However, If I use xrandr to, for example, turn off the laptop screen               xrandr --output LVDS1 --off      The system freezes completely - both screens turn black, I can only see a mouse pointer on the external screen. (It doesn't move) All keyboard shortcuts to kill X and so on don't work, and I have to hardreset the laptop. I can't find anything in the logfiles neither of Xorg nor in the system messages. Here is some output that might be helpful:               $ xrandr -q     Screen 0: minimum 320 x 200, current 3286 x 1080, maximum 8192 x 8192     LVDS1 connected 1366x768+0+0 (normal left inverted right x axis y axis) 309mm x 174mm        1366x768       60.0*+   40.0          1024x768       60.0          800x600        60.3     56.2          640x480        59.9       VGA1 disconnected (normal left inverted right x axis y axis)     HDMI1 disconnected (normal left inverted right x axis y axis)     DP1 disconnected (normal left inverted right x axis y axis)     HDMI2 disconnected (normal left inverted right x axis y axis)     HDMI3 connected 1920x1080+1366+0 (normal left inverted right x axis y axis) 509mm x 286mm        1920x1080      60.0*+        1280x1024      75.0     60.0          1152x864       75.0          1024x768       75.1     60.0          800x600        75.0     60.3          640x480        75.0     60.0          720x400        70.1       DP2 disconnected (normal left inverted right x axis y axis)     DP3 disconnected (normal left inverted right x axis y axis)      I have an intel arrandale chip, the i915 kernel module is loaded as well as KMS. Turning off modesetting at boot totally screws up my resolution and so on. I googled a little bit and found, that freezes using xrandr are known, but I didn't find any solution yet.


How to create a "jailed" environment for an application under Linux?

Using Ubuntu 11.04 as a Desktop OS, I want to reach "bigger security" with a "jailing" processes: VirtualBox, Google Chrome, Firefox, VLC, PDF/djvu reader, MP3 player, wine, pidgin, transmission, LibreOffice. Normally I would create separate users, and put .desktop icons on the "main users" Desktop, with using gksu+/sudoers setting/ in the .desktop files to "passwordlessly" launch the application as different user. If I understand correctly Qubes OS uses XEN to really separate the applications from each other. The Question: How could I sandbox/chroot/jail (or however you say it) the above applications so that the main user just has to click on an icon on his Desktop to launch them without the system asking for password?


Reading character by character with bash read

I've been trying to use bash to read a file character by character. After much trial and error, I have discovered that this works:               exec 4<file.txt      declare -i n     while read -r ch <&4;           n=0          while [ ! $n -eq ${#ch} ]                do  echo -n "${ch:$n:1}"                    (( n++ ))               done          echo ""           done      I.e., I can read it line by line and then loop through each line char by char. Before doing this, I had tried: `exec 4<file.txt && while read -r -n1 ch <&4; do; echo -n "$ch"; done` but it would _skip all whitespaces in the file_. Could you please explain why? Is there a way to make the second strategy (i.e. reading char by char with bash's read) work?


How to restrict an SSH user to only allow SSH-tunneling?

How can I restrict a user on the ssh server to allow them **only** the priviledges for SSH TUNNELING? i.e. So they cannot run commands even if they log in via ssh. My Linux servers are Ubuntu 11.04 and OpenWrt.


WordPress installation with Docker

I have to migrate my WordPress installation to my own server in order to get SSL working properly. (It was originally on GoDaddy shared hosting, which doesn't allow for external SSL cert installation.) Being slightly paranoid and informed about security, I'd like to run the services inside of Docker containers to limit damage in a worst-case scenario. What I'm not sure of is how to _share_ Docker containers with other Docker containers. If, for example, I have a Docker container responsible for running MySQL/MariaDB, I don't know how I could share that service with another Docker container running FastCGI which is hosting and executing my WordPress PHP code. My web server (nginx) which is currently running outside of a Docker container won't have any problems proxying things along to an exposed port on a Docker container, but how will the FastCGI server (ie: PHP) be able to reach the MySQL container? Is there a guide which details how to pair up multiple independent services like this in Docker?


How change prompt of subshell

I'm trying to create a simple script that, among other things, will create a subshell:               #!/bin/sh          # setup          "${@:-$SHELL}"          # teardown      The question is: I need to change the default prompt, so for example: > $ # default shell   >  $ ./myscript   >  (myscript) $ # subshell   >  (myscript) $ exit   >  $ I tried to change `PROMPT` and `PS1`, but none of these works. How can I do that? PS.: I need a solution that works both on Bash and ZSH, if possible.


Dovecot POP3S & IMAPS SSL Certificate that works for all user domains

This may be a really stupid question, but I can't seem to put my head around it. I have a mail server I'm trying to setup to service 6 domains. I will have multiple mail users accessing the server via POP3S or IMAPS. Currently in MS Outlook, they are receiving an unverified SSL cert warning because I'm using a self-signed SSL certificate. I would like to purchase a SSL cert which would stop this warning from appearing. Here is my question. I want each domain group to use something like mail.theirdomain.com as the incoming mail server name. Is there a way to do this without having to purchase a cert for each of the 6 domains? In other words, can I buy one for the mail.maindomain.com and have it authenticate the other DNS names? Currently in DNS, the mail.theirdomain.com has a CNAME setup to mail.maindomain.com. I'm running Dovecot for incoming and Sendmail for outgoing. Latest version on Debian 6.


rename randomly files on a USB device

I would like to rename all of my files of my USB device randomly. Indeed, in my car, my tuner has not the random function. I think I can do it with PHP ... but I'm pretty sure it is possible to do something shorter in shell script, right? An idea?


Logging into an RDS session from the command-line

Is it possible to start an xfreerdp session into Microsoft windows from a command-line only install of Linux? The command I use from a full blown Linux install is this:               $ sudo xfreerdp /v:farm.company.com /d:company.com \         /u:oshiro /p:oshiro_password /g:rds.company.com      This command works fine. However, when I run the same command from a command- line install of Linux, I get the following error message:               Warning xf_GetWindowProperty (client /X11/xf_window.c:178): Property 340 does not exist


Is it possible to set a whole hard disk(partition) as iscsi target?

till now I defined just image files. But I have a logical partition and I'd like to share it by iscsi. Is it possible or I am limited to single files?


Facing problem with Regex Inside Sed Command

Suppose I run the following commands:               export STR="abcdef.ghijkl.mnopqr.stuvwy.log"     echo $STR | sed 's/\.[^.]*$//'      I am getting the following result:               abcdef.ghijkl.mnopqr.stuvwy      Please help me understand the above result.


Where is the GUID Partition Table stored on a device?

A friend of mine used my USB stick to install a new version of OS X on his mac. Now that I got it back, I wanted to wipe it (I use Linux myself). However, I'm having a bit of trouble doing so. The first thing I did was write a Fedora LiveCD to it, using `dd`:               # dd if=Fedora.iso of=/dev/sdb      This, I thought, would overwrite the partition table which lies at the beginning of the device and consequently delete the partitions the OS X installer had created. However, I was wrong, the partitions were still there. So I looked up GUID partition tables and realized they add headers not only at the beginning of the device, but at the end, too. So I did:               $ sudo dd if=/dev/zero of=/dev/sdb     dd: writing to `/dev/sdb': No space left on device     15687681+0 records in     15687680+0 records out     8032092160 bytes (8.0 GB) copied, 1354.82 s, 5.9 MB/s      After this I removed the USB stick from the computer and plugged it back in. Running `blkid` now would yield no partitions on the device. However, after writing the Fedora image again, the OS X partitions are back:               $ sudo blkid     /dev/sdb1: LABEL="Fedora-17-x86_64-Live-Desktop.is" TYPE="iso9660"      /dev/sdb2: SEC_TYPE="msdos" LABEL="EFI" UUID="B368-CE08" TYPE="vfat"      /dev/sdb3: UUID="f92ff3eb-0250-303f-8030-7d063e302ccf" LABEL="Fedora 17" TYPE="hfsplus"      I suspect this has something to do with that _Protective MBR_ bit in the wikipedia page above. How can I get rid of it? ## Update I ultimately ran `parted` and deleted the GPT from there. I did get spewed with warnings about a corrupted GPT (probably from zeroing it) but that "signatures" were there. So I ultimately restored my USB stick, but it would still be nice if someone could shed some light on what exactly happened, where were those signatures stored?


Console utility to know how disk space is distributed?

Console utility to know how disk space is distributed. Something like this: ![Scanner screenshot](http://i.stack.imgur.com/iiWOe.png) But with console interface in Linux?


Find driver (which is not automatically installed) for a specific hardware

Is there some **general** way to find out the name of the driver which I have to install on my linux system given only the hardware name? Maybe some centralized webpage or application which gatters all the hardware information and it's related dirver? Or all which I can do is search it on a web browser? What do you do in this cases? For example, I want to know the driver name for the hardware "Intel Corporation 82801HM/HEM (ICH8M/ICH8M-E) SATA Controller"


Tell SSH to use a graphical prompt for key passphrase

How can I force SSH to request passphrases using a graphical prompt (GTK, for example) instead of the standard one that uses the terminal? I tried setting `SSH_ASKPASS=/usr/bin/ssh-askpass` but it seems to have no effects. The problem is the fact the openssh documentation says > If ssh **does not have a terminal associated with it** but DISPLAY and > SSH_ASKPASS are set, it will execute the program specified by SSH_ASKPASS > and open an X11 window to read the passphrase. An ssh launched from the command line, in my case as the result of a `git push`, _will_ have a terminal associated with it, so the `SSH_ASKPASS` logic seems to be ignored. Please note that I am not referring to `ssh-add`, but to generic ssh invocations towards an hosts for which a key pair is present but protected by a passphrase.


How can I enable fail2ban and mod_secure logs to appear in logwatch on centos 6.4?

I have `logwatch` working fine but I don't see the `fail2ban` and `mod_secure` logs appearing in my `logwatch` logs. How do I enable this? What do I need to do to logwatch's configuration file? Below is the logwatch.conf file.               ########################################################     # This was written and is maintained by:     #    Kirk Bauer <kirk@kaybee.org>     #     # Please send all comments, suggestions, bug reports,     #    etc, to kirk@kaybee.org.     #     ########################################################          # NOTE:     #   All these options are the defaults if you run logwatch with no     #   command-line arguments.  You can override all of these on the     #   command-line.           # You can put comments anywhere you want to.  They are effective for the     # rest of the line.          # this is in the format of <name> = <value>.  Whitespace at the beginning     # and end of the lines is removed.  Whitespace before and after the = sign     # is removed.  Everything is case *insensitive*.          # Yes = True  = On  = 1     # No  = False = Off = 0          # Default Log Directory     # All log-files are assumed to be given relative to this directory.     LogDir = /var/log          # You can override the default temp directory (/tmp) here     TmpDir = /var/cache/logwatch          # Default person to mail reports to.  Can be a local account or a     # complete email address.  Variable Print should be set to No to     # enable mail feature.     MailTo = root     # WHen using option --multiemail, it is possible to specify a different     # email recipient per host processed.  For example, to send the report     # for hostname host1 to user@example.com, use:     #Mailto_host1 = user@example.com     # Multiple recipients can be specified by separating them with a space.          # Default person to mail reports from.  Can be a local account or a     # complete email address.     MailFrom = Logwatch          # If set to 'Yes', the report will be sent to stdout instead of being     # mailed to above person.     Print = Yes          # if set, the results will be saved in <filename> instead of mailed     # or displayed.     #Save = /tmp/logwatch          # Use archives?  If set to 'Yes', the archives of logfiles     # (i.e. /var/log/messages.1 or /var/log/messages.1.gz) will     # be searched in addition to the /var/log/messages file.     # This usually will not do much if your range is set to just     # 'Yesterday' or 'Today'... it is probably best used with     # By default this is now set to Yes. To turn off Archives uncomment this.     #Archives = No     # Range = All          # The default time range for the report...     # The current choices are All, Today, Yesterday     Range = yesterday          # The default detail level for the report.     # This can either be Low, Med, High or a number.     # Low = 0     # Med = 5     # High = 10     Detail = Low                # The 'Service' option expects either the name of a filter     # (in /usr/share/logwatch/scripts/services/*) or 'All'.     # The default service(s) to report on.  This should be left as All for     # most people.       Service = All     # You can also disable certain services (when specifying all)     Service = "-zz-network"     # Prevents execution of zz-network service, which                                 # prints useful network configuration info.     Service = "-zz-sys"         # Prevents execution of zz-sys service, which                                 # prints useful system configuration info.     Service = "-eximstats"      # Prevents execution of eximstats service, which                                 # is a wrapper for the eximstats program.     # If you only cared about FTP messages, you could use these 2 lines     # instead of the above:     #Service = ftpd-messages   # Processes ftpd messages in /var/log/messages     #Service = ftpd-xferlog    # Processes ftpd messages in /var/log/xferlog     # Maybe you only wanted reports on PAM messages, then you would use:     #Service = pam_pwdb        # PAM_pwdb messages - usually quite a bit     #Service = pam             # General PAM messages... usually not many          # You can also choose to use the 'LogFile' option.  This will cause     # logwatch to only analyze that one logfile.. for example:     #LogFile = messages     # will process /var/log/messages.  This will run all the filters that      # process that logfile.  This option is probably not too useful to     # most people.  Setting 'Service' to 'All' above analyizes all LogFiles     # anyways...          #     # By default we assume that all Unix systems have sendmail or a sendmail-like system.     # The mailer code Prints a header with To: From: and Subject:.     # At this point you can change the mailer to any thing else that can handle that output     # stream. TODO test variables in the mailer string to see if the To/From/Subject can be set     # From here with out breaking anything. This would allow mail/mailx/nail etc..... -mgt      mailer = "sendmail -t"          #     # With this option set to 'Yes', only log entries for this particular host     # (as returned by 'hostname' command) will be processed.  The hostname     # can also be overridden on the commandline (with --hostname option).  This     # can allow a log host to process only its own logs, or Logwatch can be     # run once per host included in the logfiles.      #     # The default is to report on all log entries, regardless of its source host.     # Note that some logfiles do not include host information and will not be     # influenced by this setting.     #     #HostLimit = Yes          # By default the cron daemon generates daily logwatch report     # if you want to switch it off uncomment DailyReport tag.      # The implicit value is Yes     #     # DailyReport = No          # vi: shiftwidth=3 tabstop=3 et      Output from the command sudo logwatch --debug High | grep -T100 'LogFiles that will be processed:'               000-*expandrepeats =         001-*onlyhost =         002-*applystddate =         Logfile = /var/log/maillog        Archive = /var/log/maillog.9.gz        Archive = /var/log/maillog.8.gz        Archive = /var/log/maillog.7.gz        Archive = /var/log/maillog.6.gz        Archive = /var/log/maillog.5.gz        Archive = /var/log/maillog.4.gz        Archive = /var/log/maillog.3.gz        Archive = /var/log/maillog.29.gz        Archive = /var/log/maillog.28.gz        Archive = /var/log/maillog.27.gz        Archive = /var/log/maillog.26.gz        Archive = /var/log/maillog.25.gz        Archive = /var/log/maillog.24.gz        Archive = /var/log/maillog.23.gz        Archive = /var/log/maillog.22.gz        Archive = /var/log/maillog.21.gz        Archive = /var/log/maillog.20.gz        Archive = /var/log/maillog.2.gz        Archive = /var/log/maillog.19.gz        Archive = /var/log/maillog.18.gz        Archive = /var/log/maillog.17.gz        Archive = /var/log/maillog.16.gz        Archive = /var/log/maillog.15.gz        Archive = /var/log/maillog.14.gz        Archive = /var/log/maillog.13.gz        Archive = /var/log/maillog.12.gz        Archive = /var/log/maillog.11.gz        Archive = /var/log/maillog.10.gz        Archive = /var/log/maillog.1.gz        Archive = /var/log/maillog-20121230          Logfile Name: up2date          Logfile Name: cisco          Logfile Name: cron        001-*removeservice = anacron        000-*onlyhost =         Logfile = /var/log/cron        Archive = /var/log/cron.9.gz        Archive = /var/log/cron.8.gz        Archive = /var/log/cron.7.gz        Archive = /var/log/cron.6.gz        Archive = /var/log/cron.5.gz        Archive = /var/log/cron.4.gz        Archive = /var/log/cron.3.gz        Archive = /var/log/cron.29.gz        Archive = /var/log/cron.28.gz        Archive = /var/log/cron.27.gz        Archive = /var/log/cron.26.gz        Archive = /var/log/cron.25.gz        Archive = /var/log/cron.24.gz        Archive = /var/log/cron.23.gz        Archive = /var/log/cron.22.gz        Archive = /var/log/cron.21.gz        Archive = /var/log/cron.20.gz        Archive = /var/log/cron.2.gz        Archive = /var/log/cron.19.gz        Archive = /var/log/cron.18.gz        Archive = /var/log/cron.17.gz        Archive = /var/log/cron.16.gz        Archive = /var/log/cron.15.gz        Archive = /var/log/cron.14.gz        Archive = /var/log/cron.13.gz        Archive = /var/log/cron.12.gz        Archive = /var/log/cron.11.gz        Archive = /var/log/cron.10.gz        Archive = /var/log/cron.1.gz        Archive = /var/log/cron-20121230          Logfile Name: yum        Logfile = /var/log/yum.log          Logfile Name: tac_acc        000-*applystddate =           Logfile Name: exim          Logfile Name: syslog        001-*removeservice = talkd,telnetd,inetd,nfsd,/sbin/mingetty        000-*expandrepeats =         003-*applystddate =         002-*onlyhost =           Logfile Name: dnssec        000-*expandrepeats =         001-*applybinddate =           Logfile Name: netscreen        000-*applystddate =           Logfile Name: autorpm          Logfile Name: dpkg        000-*applyeurodate =           LogFiles that will be processed:     [0] = maillog     [1] = qmail-pop3d-current     [2] = denyhosts     [3] = secure     [4] = messages     [5] = eventlog     [6] = qmail-send-current     [7] = none     [8] = samba     [9] = clam-update     [10] = extreme-networks     [11] = resolver     [12] = qmail-pop3ds-current     [13] = netopia     [14] = fail2ban     [15] = pix     [16] = xferlog     [17] = cisco     [18] = cron     [19] = netscreen     [20] = dnssec     [21] = qmail-smtpd-current     [22] = windows     [23] = vsftpd     [24] = php     [25] = emerge     [26] = http     [27] = bfd     [28] = sonicwall     [29] = iptables     [30] = pureftp     [31] = rt314     [32] = up2date     [33] = yum     [34] = tac_acc     [35] = exim     [36] = autorpm     [37] = dpkg                    Made Temp Dir: /var/cache/logwatch/logwatch.tOKLrjds with tempdir     export LOGWATCH_DATE_RANGE='yesterday'     export LOGWATCH_OUTPUT_TYPE='unformatted'     export LOGWATCH_TEMP_DIR='/var/cache/logwatch/logwatch.tOKLrjds/'     export LOGWATCH_DEBUG='10'          Preprocessing LogFile: maillog     '/var/cache/logwatch/logwatch.tOKLrjds/maillog-archive' '/var/log/maillog'  | /usr/bin/perl /usr/share/logwatch/scripts/shared/expandrepeats ''| /usr/bin/perl /usr/share/logwatch/scripts/shared/onlyhost ''| /usr/bin/perl /usr/share/logwatch/scripts/shared/applystddate ''>/var/cache/logwatch/logwatch.tOKLrjds/maillog          Preprocessing LogFile: secure     '/var/cache/logwatch/logwatch.tOKLrjds/secure-archive' '/var/log/secure'  | /usr/bin/perl /usr/share/logwatch/scripts/shared/expandrepeats ''| /usr/bin/perl /usr/share/logwatch/scripts/shared/onlyhost ''| /usr/bin/perl /usr/share/logwatch/scripts/shared/applystddate ''>/var/cache/logwatch/logwatch.tOKLrjds/secure          Preprocessing LogFile: messages     '/var/cache/logwatch/logwatch.tOKLrjds/messages-archive' '/var/log/messages'  | /usr/bin/perl /usr/share/logwatch/scripts/shared/expandrepeats ''| /usr/bin/perl /usr/share/logwatch/scripts/shared/removeservice 'talkd,telnetd,inetd,nfsd,/sbin/mingetty,netscreen,netscreen'| /usr/bin/perl /usr/share/logwatch/scripts/shared/onlyhost ''| /usr/bin/perl /usr/share/logwatch/scripts/shared/applystddate ''>/var/cache/logwatch/logwatch.tOKLrjds/messages          Preprocessing LogFile: cron     '/var/cache/logwatch/logwatch.tOKLrjds/cron-archive' '/var/log/cron'  | /usr/bin/perl /usr/share/logwatch/scripts/shared/onlyhost ''| /usr/bin/perl /usr/share/logwatch/scripts/shared/removeservice 'anacron'| /usr/bin/perl /usr/share/logwatch/scripts/logfiles/cron/applydate>/var/cache/logwatch/logwatch.tOKLrjds/cron          Preprocessing LogFile: http     '/var/cache/logwatch/logwatch.tOKLrjds/http-archive' '/var/log/httpd/access_log'  | /usr/bin/perl /usr/share/logwatch/scripts/shared/expandrepeats ''| /usr/bin/perl /usr/share/logwatch/scripts/shared/applyhttpdate ''>/var/cache/logwatch/logwatch.tOKLrjds/http          Preprocessing LogFile: yum     '/var/log/yum.log'  | /usr/bin/perl /usr/share/logwatch/scripts/logfiles/yum/applydate>/var/cache/logwatch/logwatch.tOKLrjds/yum          Processing Service: amavis      ( cat /var/cache/logwatch/logwatch.tOKLrjds/maillog  |  /usr/bin/perl /usr/share/logwatch/scripts/shared/onlyservice '(amavis|dccproc)' |/usr/bin/perl /usr/share/logwatch/scripts/shared/removeheaders '' |/usr/bin/perl /usr/share/logwatch/scripts/services/amavis) 2>&1      export clamav_ignoreunmatched='0'     export clamav_ignoreunmatched='0'          Processing Service: clamav-milter      ( cat /var/cache/logwatch/logwatch.tOKLrjds/maillog  |  /usr/bin/perl /usr/share/logwatch/scripts/shared/onlyservice 'clamav-milter' |/usr/bin/perl /usr/share/logwatch/scripts/shared/removeheaders '' |/usr/bin/perl /usr/share/logwatch/scripts/services/clamav-milter) 2>&1      export courier_enable='1'     export courier_ip_lookup='0'     export courier_printmailqueue='0'     export courier_tables='0'          Processing Service: courier      ( cat /var/cache/logwatch/logwatch.tOKLrjds/maillog  |  /usr/bin/perl /usr/share/logwatch/scripts/services/courier) 2>&1           Processing Service: cron      ( cat /var/cache/logwatch/logwatch.tOKLrjds/cron  |  /usr/bin/perl /usr/share/logwatch/scripts/services/cron) 2>&1           Processing Service: dovecot      ( cat /var/cache/logwatch/logwatch.tOKLrjds/maillog  |  /usr/bin/perl /usr/share/logwatch/scripts/shared/onlyservice '(imap-login|pop3-login|dovecot)' |/usr/bin/perl /usr/share/logwatch/scripts/services/dovecot) 2>&1      export ftpd_ignore_unmatched='0'     export detail_transfer='1'     export http_ignore_error_hacks='0'     export http_user_display='0'          Processing Service: http      ( cat /var/cache/logwatch/logwatch.tOKLrjds/http  |  /usr/bin/perl /usr/share/logwatch/scripts/services/http) 2>&1           Processing Service: imapd      ( cat /var/cache/logwatch/logwatch.tOKLrjds/maillog  |  /usr/bin/perl /usr/share/logwatch/scripts/shared/onlyservice '(imapd|imapd-ssl|imapsd)' |/usr/bin/perl /usr/share/logwatch/scripts/shared/removeheaders '' |/usr/bin/perl /usr/share/logwatch/scripts/services/imapd) 2>&1           Processing Service: in.qpopper      ( cat /var/cache/logwatch/logwatch.tOKLrjds/maillog  |  /usr/bin/perl /usr/share/logwatch/scripts/shared/multiservice 'in.qpopper,qpopper' |/usr/bin/perl /usr/share/logwatch/scripts/shared/removeheaders '' |/usr/bin/perl /usr/share/logwatch/scripts/services/in.qpopper) 2>&1           Processing Service: ipop3d


How to reduce the volume of a background music stream when a different audio source is playing?

With PulseAudio it is possible to manage volume on an application basis, but I find it hardly useful to do it manually. What I'd rather have is the following: I'm usually listening to music but sometimes I want to watch a YouTube video - then I have to manually pause or reduce the volume of the music, often I forget to turn it back on when the video is over. What would I need to do to automatically reduce the volume of a audio stream (the background music) when another application plays sound?


Couldn't perform atomic initialization SQLite error with Subversion on Eclipse

I'm trying to check out some code from my company's svn repository and I get this message on the console:               checkout https://svn.[company]/[repo]/Trunk/[project] -r HEAD \        --depth=infinity --force     Couldn't perform atomic initialization     svn: Couldn't perform atomic initialization SQLite error     svn: SQLite compiled for 3.7.14.1, but running with 3.7.4      But, on the terminal, I can checkout the project without problems. Has anyone been able to solve this problem as well? I'm running Slackware64-current. Subversion is 1.7.8. SQLite is 3.7.14.1. On Eclipse I installed Subclipse from Eclipse Market, which (I believe) is currently at version 1.8.18, here's its about page: ![about eclipse - subversion client](http://i.stack.imgur.com/Fubo0.png)


Can conky monitor other Linux computers on the network?

I know conky can monitor my personal computer, but can it monitor the other Linux servers I have on the network? I'd like to see data on CPU and memory usage and some critical processes each server uses. For instance, one server is our MySQL server, so I'd like to display the CPU and memory usage for this server, how much resources the mysqld processes consumes and the network consumption. For another server, some other information should be display according to its use.


How to cause memory fragmentation on a Linux based embedded device?

**Hardware** ARM **What am I trying to do:** Answer: I am trying to create memory fragmentation on a Linux 2.6.31 based swapless embedded device. **Why:** Answer:I am trying to port some patches to Linux 2.6.31 that will defragment the fragmented memory. In order to test if those patches are working correctly I'd like to try to fragment the memory first. I learnt that continuous allocation and deallocation of memory by apps can lead to fragmentation. Therefore I wrote these simple C programs.               #include <stdio.h>     #include <stdlib.h>          int main(void) {              srand(time(NULL));         int i = 0, j = 0, randnum=0;         while(1) {                  randnum = rand()%10000000;             double *ptr = (double*) malloc(sizeof(*ptr) * randnum);                  for(j = 0 ; j < randnum; j++) {                 *(ptr+j) = (double)j+1;             }                  free(ptr);         }     }      ==========               #include <stdio.h>     #include <stdlib.h>          int main(void) {              srand(time(NULL));         int i = 0, j = 0, randnum=0;         int arr[6] = { 3072, 7168, 15360 , 31744, 64512, 130048};          while(1) {                  for (i = 0; i < 6 ; i++) {                      int *ptr = (int*) malloc(arr[i] * 93);                        for(j = 0 ; j < arr[i] * 93 / sizeof(int); j++) {                     *(ptr+j) = j+1;                 }                      free(ptr);             }         }            }      **How do I measure if memory is fragmented?:** Answer:I look at the o/p of `/proc/buddyinfo` **What do I need:?** Can you suggest a better way to fragment the memory? Because those C programs work but very very slowly.


xinitrc: starting xterm with tmux causes all windows to share same geometry

I have xterm with tmux open upon startup of X11 with the following line in my xinitrc file: `xterm -e tmux &` However the `-e tmux` causes all windows to assume the geometry of the first -geometry attribute in the file, even if I separately define the geometry of the xterm window. Enclosing in quotes or grave accents does not remedy the situation. If I use tmux before starting X11 (i.e. execute then exit tmux), then the xterm window opens at the default geometry as it should. Restarting X11 causes the problem to return. Suggestions will be greatly appreciated. My entire xinitrc file:   `xsetroot -solid black`   `xstatbar &`   `xconsole -geometry -20-40 &`   `xterm -e tmux &`   `exec cwm`   At the moment all windows are at -20-40. I'm running OpenBSD 5.4 on amd64 hardware.


With two interfaces, how can I make one the default route and the other an alternate?

I have wired connection to intranet / lan of my work (with proxy) and one wireless without proxy that doesn't have access to the office lan. (Like Guest Wifi) My idea is to route all traffic to eth0 and ONLY some traffic (like ssh) to wlan0. I have an idea on how to do this but not so sure. Well, my problem now is that when both are connected, eth0 and wlan0, traffic seems to be intermitent between the 2, Firefox sometimes tries to go out through wlan0 and can not find the proxy server (because its on the ETH0 lan).               ~$ route -n     Kernel IP routing table     Destination     Gateway         Genmask         Flags Metric Ref    Use Iface     0.0.0.0         192.168.100.254 0.0.0.0         UG    0      0        0 eth0     169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 wlan0     192.168.25.0    0.0.0.0         255.255.255.0   U     2      0        0 wlan0     192.168.100.0   0.0.0.0         255.255.255.0   U     1      0        0 eth0     192.168.200.0   192.168.100.253 255.255.255.0   UG    0      0        0 eth0      How can I fix it, so Firefox doesn't try to go through wlan0 unleast I specify it?               ~$ route     Kernel IP routing table     Destination     Gateway         Genmask         Flags Metric Ref    Use Iface     default         192.168.100.254 0.0.0.0         UG    0      0        0 eth0     link-local      *               255.255.0.0     U     1000   0        0 wlan0     192.168.25.0    *               255.255.255.0   U     2      0        0 wlan0     192.168.100.0   *               255.255.255.0   U     1      0        0 eth0     192.168.200.0   192.168.100.253 255.255.255.0   UG    0      0        0 eth0


Batch mv cronjob leaving some (not all) copies in source

I have a cronjob that runs every 5 minutes, looking for wavs and mp3s of the same name in a source directory and if it finds a corresponding pair, it moves both to a destination directory. The script is working very smoothly as far as I can tell, however some MP3s are being left in the source directory as well as appearing in the destination. Both copies are full. The source directory is also the output of another process that churns out wavs and mp3s, and I tested it while writing the script to make sure that it wouldn't take files before they had been fully written. It appears that it holds the progressively written wav in a temp location until it is complete, at which point it moves it to the directory. So the output appears complete at a single instant. The wavs however, are written progressively. I was under the impression that the mp3s are written _before_ the wav, in which case the script would work fine, since it wouldn't proceed until both wav and mp3 were present. [edit: The process is as follows.   1. Audio machine processes audio files and spits out a wav and a corresponding mp3 (with same name).    2. These land in $INPUT although I can't be sure of the relative order in which they appear.   3. My script (below) finds both wav and mp3, generates a hashsum for the wav, and moves both to the $OUTPUT. ] Is it possible – _if_ some mp3s are being written after the wav (entirely possible and unpredictable with our audio software) – that the `mv` command is taking not yet fully written mp3s, dropping them in the destination, but then continuing to update them? I'm just confused as to why both source and destination copies are complete. Here's the relevant bit of my script:               cd "$INPUT"     for x in *.wav     do if [ ! -e $x ]                        then exit 0     else if [ -e ${x%.wav}.mp3 ]                         then    md5sum $x > "$MD5DIR"/$x.md5 &&                      mv $x "$OUTPUT" &&                           mv ${x%.wav}.mp3 "$OUTPUT"               fi     fi      Result (for example):               $ ls $INPUT/     1.mp3     4.mp3          $ ls $OUTPUT/     1.wav    1.mp3     2.wav    2.mp3     3.wav    3.mp3     4.wav    4.mp3      [Edit 2014-03-12: I think I know what is happening. The earlier process that produced the wavs and mp3 files appears to write the id3 metadata tags last, after it has written the entire audio content of the MP3 file. My script then presumably took the MP3 after the audio content had been written but before the ID3 tags had been written. Comparing the files in an audio editor shows no difference, but comparing their id3 tags shows that only the copies left in the input directory had complete tags. I see no way around this, but I discovered that the audio processing machine also produces a result log file for each audio file produced. So as a workaround, the presence of this results file is now the trigger for my script to run. ]


Sysctl parameter change after every reboot

I have found that the value of `net.netfilter.nf_conntrack_count` variable change every time i reboot the system. Did any one have an explanation for that?


Why does this keep wanting to install Java 7? I don't want Java 7, can I somehow stop it from attempting?

Why does it keep wanting to install oracle-java7-installer? Is there some way I can prevent it from attempting to do this?               home@home-Vostro-220s-Series:~$ sudo apt-get upgrade     Reading package lists... Done     Building dependency tree            Reading state information... Done     The following packages have been kept back:       printer-driver-postscript-hp     0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.     1 not fully installed or removed.     After this operation, 0 B of additional disk space will be used.     Do you want to continue [Y/n]? Y     Setting up oracle-java7-installer (7u51-0~webupd8~1) ...     Downloading Oracle Java 7...     --2014-07-26 18:26:07--  http://download.oracle.com/otn-pub/java/jdk/7u51-b13/jdk-7u51-linux-x64.tar.gz     Resolving download.oracle.com (download.oracle.com)... 219.76.14.26, 219.76.14.9     Connecting to download.oracle.com (download.oracle.com)|219.76.14.26|:80... connected.     HTTP request sent, awaiting response... 302 Moved Temporarily     Location: https://edelivery.oracle.com/otn-pub/java/jdk/7u51-b13/jdk-7u51-linux-x64.tar.gz [following]     --2014-07-26 18:26:07--  https://edelivery.oracle.com/otn-pub/java/jdk/7u51-b13/jdk-7u51-linux-x64.tar.gz     Resolving edelivery.oracle.com (edelivery.oracle.com)... 23.41.102.140     Connecting to edelivery.oracle.com (edelivery.oracle.com)|23.41.102.140|:443... connected.     HTTP request sent, awaiting response... 302 Moved Temporarily     Location: http://download.oracle.com/errors/download-fail-1505220.html [following]     --2014-07-26 18:26:08--  http://download.oracle.com/errors/download-fail-1505220.html     Connecting to download.oracle.com (download.oracle.com)|219.76.14.26|:80... connected.     HTTP request sent, awaiting response... 200 OK     Length: 5307 (5.2K) [text/html]     Saving to: `jdk-7u51-linux-x64.tar.gz'               0K                                                      100% 38.3M=0s          2014-07-26 18:26:08 (38.3 MB/s) - `jdk-7u51-linux-x64.tar.gz' saved [5307/5307]          Download done.     Removing outdated cached downloads...     sha256sum mismatch jdk-7u51-linux-x64.tar.gz     Oracle JDK 7 is NOT installed.     dpkg: error processing oracle-java7-installer (--configure):      subprocess installed post-installation script returned error exit status 1     No apport report written because MaxReports is reached already                                                                   Errors were encountered while processing:      oracle-java7-installer     E: Sub-process /usr/bin/dpkg returned an error code (1)     home@home-Vostro-220s-Series:~$


Monitor setup commands do not work in script

I'm running Arch Linux 64-bit on a Samsung RV511. I often connect external monitors using `xrandr`. As I run LXDE with Awesome as a window manager, I need to prepare the xrandr-command by killing certain GUI elements and restarting them afterwards to have them correctly positioned. Here is my script:               #!/bin/sh     # kill conky and lxpanel     killall lxpanel     killall conky          # set monitor     xrandr --output LVDS1 --mode 1366x768 --pos 1680x282 --output VGA1 --mode  1680x1050 --pos 0x0           # restart awesome     killall -HUP awesome          # restart lxpanel and conky     lxpanel -p LXDE &     conky &      Now I'm running into a strange problem. When I run all of the above commands in the same sequence from the command line, I get a neat monitor configuration. However, when I run the script, the GUI crashes, leaving a strange pattern of wallpaper and panel elements. I get the same problem if I launch the `xrandr` command without having killed the `lxpanel` first, which is why i assume the `xrandr` command somehow does not "wait" for the kill commands? Or is there a different reason? Edit: adding `sleep 3` between the code blocks solved the problem, although I still have no idea what the basic problem is. Anyway, here is my current script for future reference:               #!/bin/bash          # kill conky and lxpanel     killall lxpanel     killall conky     sleep 4          # set monitor     xrandr --output LVDS1 --mode 1366x768 --pos 1680x282 --output VGA1 --mode  1680x1050 --pos 0x0      sleep 4          # restart awesome     killall -HUP awesome          # restart lxpanel and conky     sleep 4     lxpanel -p LXDE &     conky &      Post-Edit: The problem cannot be considered completely solved after all. Sometimes I have to `kill xinit` after startup and `startx` again for it to work. There seems to be some uptime-related problem. Needless to say I have no idea what.


Resolve nested aliases to their source commands

I've made several aliases for my convenience.But now I need to be helpful by sending a useful command and it is full of aliases.I've tried doing `type u` but all it returns is `up && ap upgrade -y --show-progress && r && ap check && ap autoclean` These are all aliases in `u`:               alias a='alias'     a ap='apt-get'     a r='ap autoremove -y'     a up='ap update'


To which Debian package does /etc/nsswitch.conf belong?

I tried to find out to which package `/etc/nsswitch.conf` belongs on my Debian machine, but `dpkg --search /etc/nsswitch.conf` won't tell me. Does anyone know?


Can’t figure out Samba file share permissions as needed.

I’m in the final project class for my degree and my group has to have a Linux server that supports a Windows environment. With the files in the file share need to be read only, can be edited and then saved as a new file. I'm also the server guy in my group and the other members are Cisco networking. I'm a new to coding things for Samba. I have an Ubuntu Linux file share running with Samba. Users should be able to see and make files. The files need to be read only. A user should be able open a read only file, edit it as needed and then save it as a new file like a read only file in Windows. With the file share users can see the contents and drag files into it. But they can’t open “Template.doc” from the share to edit and then save as a new file with the changed contents. The error I’m getting is “You don’t have permissions to modify files in this network location. Contact your administrator.” This is the code in the smb.conf file for the share itself in the file system is 777.                   [Share]         path = /share/Share         writeable = yes         ;browseable = yes         guest ok = yes         create mask = 0444         directory mask = 0777      What do I need to add to the smb.conf file to get the share working as needed? For testing at the moment it's just in a generic workgroup with my laptop from not having enough RAM to virtualize the Windows servers and test client. No authentication or crazy domain things will me implemented with this. Thank you for your time! :D


Crop SVG drawing to canvas size in command line

I have SVG images produced by PlantUML, which has some parts of drawing outside of canvas. It makes it difficult to use such images and I need to crop drawing to canvas size. As I produce UML diagrams with script anyways, it would be really efficient to perform a cropping there as well. So far I've tried two things: a) resize canvas to drawing with Inkscape               inkscape --verb=FitCanvasToDrawing --verb=FileSave --verb=FileClose *.svg      This works fine, but I need to crop drawing to canvas size and this operation seems to be unavailable. b) resize with rsvg-convert               rsvg-convert image.svg -w 1870 -h 1195 -f svg -o image.svg      This does exactly croping to the desired size, but image size increases ~10 times as now there are some binary images embedded into SVG. This is not acceptable for me.


How to undo kernel settings?

While trying to read some kernel parameters, I think I have mistakenly set some instead:               # sysctl --system -r ^net.*tcp     * Applying /usr/lib/sysctl.d/00-system.conf ...     * Applying /usr/lib/sysctl.d/50-default.conf ...     kernel.sysrq = 16     kernel.core_uses_pid = 1     net.ipv4.conf.default.rp_filter = 1     net.ipv4.conf.default.accept_source_route = 0     fs.protected_hardlinks = 1     fs.protected_symlinks = 1     * Applying /etc/sysctl.d/99-sysctl.conf ...     * Applying /etc/sysctl.conf ...      Now, is there a way to undo those changes?


linux command to list details (like PID, VID) of connected devices to the serial port(s) (like RS232) of a computer

with USB port we can search Product ID (PID) and Vender ID (VID) of connected devices by using **`lsusb`** command. Is there a similar way to get PID and VID if the same device is connected to **RS232 serial port**


Building OpenFOAM 2.2.2 for Xeon Phi

I'm trying to build OpenFOAM for Xeon Phi on CentOS 6.5 (Linux 2.6.32-431.11.2.el6.x86_64) Using these steps Install Intel Parallel Studio               tar xvfz parallel_studio_xe_2013_sp1_update2.tgz     cd parallel_studio_xe_2013_sp1_update2     ./install.sh      Compile flex and zlib               echo '     /opt/intel/bin/iccvars.sh intel64     export PATH=/opt/intel/bin:$PATH     ' >> ~/.bashrc     bash     # zlib     wget -c 'http://zlib.net/zlib-1.2.8.tar.gz'     tar xvfz zlib-1.2.8.tar.gz     cd zlib-1.2.8     CC=icc CFLAGS="-mmic" CHOST=x86_64 ./configure --shared     make && make install prefix=/opt/crtdc/micgnu     cd ..     # flex     wget -c 'http://downloads.sourceforge.net/project/flex/flex-2.5.39.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fflex%2Ffiles%2F&ts=1397722559&use_mirror=jaist'     mv flex-2.5.39.tar.gz* flex-2.5.39.tar.gz     tar xvfz flex-2.5.39.tar.gz     cd flex-2.5.39     CC=icc ./configure --prefix=/opt/crtdc/micgnu/ --build=x86_64-k1om-linux     make && make install prefix=/opt/crtdc/micgnu     cd ..      download OpenFOAM and ThirdParty, extract, edit `etc/bashrc` file               export WM_COMPILER=Icc     export WM_MPLIB=INTEL_MPI     source etc/bashrc       clean old compilation if any               wcleanAll ; wcleanLnIncludeAll ; wcleanMachine      add `-mmic` flag               vim wmake/rules/linux64ICC/c     cFLAGS      = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC -mmic     vim  wmake/rules/linux64ICC/c++     c++FLAGS    = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC -mmic      and remove `-xHost` flag (conflict with `-mmic`)               vim wmake/rules/linux64Icc/c++Opt     c++OPT      = -O2 -no-prec-div      build for XeonPhi               source etc/bashrc      ./Allwmake      On the last step, it shows some error:               icpc -std=c++0x -Dlinux64 -DWM_DP -wd327,654,819,1125,1476,1505,1572 -O2 -no-prec-div  -DNoRepository -I/root/OpenFOAM/OpenFOAM-2.2.2/src/finiteVolume/lnInclude -ItractionDisplacementCorrectionStress -I../solidDisplacementFoam -IlnInclude -I. -I/root/OpenFOAM/OpenFOAM-2.2.2/src/OpenFOAM/lnInclude -I/root/OpenFOAM/OpenFOAM-2.2.2/src/OSspecific/POSIX/lnInclude   -fPIC -mmic -Xlinker --add-needed -Xlinker --no-as-needed Make/linux64IccDPOpt/tractionDisplacementCorrectionFvPatchVectorField.o Make/linux64IccDPOpt/solidEquilibriumDisplacementFoam.o -L/root/OpenFOAM/OpenFOAM-2.2.2/platforms/linux64IccDPOpt/lib \                  -lfiniteVolume -lOpenFOAM -ldl   -L/lib -lm -o /root/OpenFOAM/OpenFOAM-2.2.2/platforms/linux64IccDPOpt/bin/solidEquilibriumDisplacementFoam     x86_64-k1om-linux-ld: cannot find -lfiniteVolume     x86_64-k1om-linux-ld: cannot find -lOpenFOAM     make[2]: *** [/root/OpenFOAM/OpenFOAM-2.2.2/platforms/linux64IccDPOpt/bin/solidEquilibriumDisplacementFoam] Error 1     make[2]: Leaving directory `/root/OpenFOAM/OpenFOAM-2.2.2/applications/solvers/stressAnalysis/solidEquilibriumDisplacementFoam'     make[1]: *** [solidEquilibriumDisplacementFoam] Error 2     make[1]: Target `application' not remade because of errors.     make[1]: Leaving directory `/root/OpenFOAM/OpenFOAM-2.2.2/applications/solvers/stressAnalysis'     make: *** [stressAnalysis] Error 2     make: Target `application' not remade because of errors.      on the first step it also shows:               Note: ignore spurious warnings about missing mpicxx.h headers     wmake libso mpi     SOURCE=UOPwrite.C ;  icpc -std=c++0x -Dlinux64 -DWM_DP -wd327,654,819,1125,1476,1505,1572 -O2 -no-prec-div  -DNoRepository   -IlnInclude -I. -I/root/OpenFOAM/OpenFOAM-2.2.2/src/OpenFOAM/lnInclude -I/root/OpenFOAM/OpenFOAM-2.2.2/src/OSspecific/POSIX/lnInclude   -fPIC -mmic -c $SOURCE -o Make/linux64IccDPOptINTEL_MPI/UOPwrite.o     UOPwrite.C(29): catastrophic error: cannot open source file "mpi.h"       #include "mpi.h"      And I tried to locate the mpi.h file:               $ locate /mpi.h     /home/ccfd/OpenFOAM/ThirdParty-2.2.2/ParaView-3.12.0/Utilities/mpi4py/Library/compat/anympi.h     /home/ccfd/OpenFOAM/ThirdParty-2.2.2/ParaView-3.12.0/Utilities/mpi4py/Library/compat/deinompi.h     /home/ccfd/OpenFOAM/ThirdParty-2.2.2/ParaView-3.12.0/Utilities/mpi4py/Library/compat/lammpi.h     /home/ccfd/OpenFOAM/ThirdParty-2.2.2/ParaView-3.12.0/Utilities/mpi4py/Library/compat/openmpi.h     /home/ccfd/OpenFOAM/ThirdParty-2.2.2/ParaView-3.12.0/Utilities/mpi4py/Library/compat/sgimpi.h     /home/ccfd/OpenFOAM/ThirdParty-2.2.2/ParaView-3.12.0/Utilities/mpi4py/Library/config/deinompi.h     /home/ccfd/OpenFOAM/ThirdParty-2.2.2/ParaView-3.12.0/Utilities/mpi4py/Library/config/lammpi.h     /home/ccfd/OpenFOAM/ThirdParty-2.2.2/ParaView-3.12.0/Utilities/mpi4py/Library/config/openmpi.h     /home/ccfd/OpenFOAM/ThirdParty-2.2.2/ParaView-3.12.0/Utilities/mpi4py/Library/config/sgimpi.h     /home/ccfd/OpenFOAM/ThirdParty-2.2.2/ParaView-3.12.0/VTK/Utilities/mrmpi/mpistubs/mpi.h     /home/ccfd/OpenFOAM/ThirdParty-2.2.2/ParaView-3.12.0/VTK/Utilities/vtkhdf5/src/H5FDmpi.h     /home/ccfd/OpenFOAM/ThirdParty-2.2.2/gcc-4.5.2/libjava/include/jvmpi.h     /home/ccfd/OpenFOAM/ThirdParty-2.2.2/openmpi-1.6.3/ompi/contrib/vt/vt/tools/vtunify/mpi/vt_unify_mpi.h     /home/ccfd/OpenFOAM/ThirdParty-2.2.2/openmpi-1.6.3/ompi/include/mpi.h.in     /home/ccfd/OpenFOAM/ThirdParty-2.2.2/openmpi-1.6.3/ompi/mpi/f77/prototypes_mpi.h     /home/ccfd/OpenFOAM/ThirdParty-2.2.2/platforms/linux64Gcc45/paraview-3.12.0/include/paraview-3.12/mrmpi/mpi.h     /home/ccfd/OpenFOAM/ThirdParty-2.2.2/platforms/linux64Gcc45/paraview-3.12.0/include/paraview-3.12/vtkhdf5/H5FDmpi.h     /opt/intel/composer_xe_2013_sp1.1.106/mkl/benchmarks/mp_linpack/include/hpl_mpi.h     /opt/intel/composer_xe_2013_sp1.1.106/mkl/include/fftw/fftw3-mpi.h     /opt/intel/composer_xe_2013_sp1.1.106/mkl/include/fftw/fftw_mpi.h     /opt/intel/composer_xe_2013_sp1.1.106/mkl/include/fftw/rfftw_mpi.h     /opt/intel/composer_xe_2013_sp1.2.144/mkl/benchmarks/mp_linpack/include/hpl_mpi.h     /opt/intel/composer_xe_2013_sp1.2.144/mkl/include/fftw/fftw3-mpi.h     /opt/intel/composer_xe_2013_sp1.2.144/mkl/include/fftw/fftw_mpi.h     /opt/intel/composer_xe_2013_sp1.2.144/mkl/include/fftw/rfftw_mpi.h     /root/OpenFOAM/ThirdParty-2.2.2/ParaView-3.12.0/Utilities/mpi4py/Library/compat/anympi.h     /root/OpenFOAM/ThirdParty-2.2.2/ParaView-3.12.0/Utilities/mpi4py/Library/compat/deinompi.h     /root/OpenFOAM/ThirdParty-2.2.2/ParaView-3.12.0/Utilities/mpi4py/Library/compat/lammpi.h     /root/OpenFOAM/ThirdParty-2.2.2/ParaView-3.12.0/Utilities/mpi4py/Library/compat/openmpi.h     /root/OpenFOAM/ThirdParty-2.2.2/ParaView-3.12.0/Utilities/mpi4py/Library/compat/sgimpi.h     /root/OpenFOAM/ThirdParty-2.2.2/ParaView-3.12.0/Utilities/mpi4py/Library/config/deinompi.h     /root/OpenFOAM/ThirdParty-2.2.2/ParaView-3.12.0/Utilities/mpi4py/Library/config/lammpi.h     /root/OpenFOAM/ThirdParty-2.2.2/ParaView-3.12.0/Utilities/mpi4py/Library/config/openmpi.h     /root/OpenFOAM/ThirdParty-2.2.2/ParaView-3.12.0/Utilities/mpi4py/Library/config/sgimpi.h     /root/OpenFOAM/ThirdParty-2.2.2/ParaView-3.12.0/VTK/Utilities/mrmpi/mpistubs/mpi.h     /root/OpenFOAM/ThirdParty-2.2.2/ParaView-3.12.0/VTK/Utilities/vtkhdf5/src/H5FDmpi.h     /root/OpenFOAM/ThirdParty-2.2.2/gcc-4.5.2/libjava/include/jvmpi.h     /root/OpenFOAM/ThirdParty-2.2.2/openmpi-1.6.3/ompi/contrib/vt/vt/tools/vtunify/mpi/vt_unify_mpi.h     /root/OpenFOAM/ThirdParty-2.2.2/openmpi-1.6.3/ompi/include/mpi.h.in     /root/OpenFOAM/ThirdParty-2.2.2/openmpi-1.6.3/ompi/mpi/f77/prototypes_mpi.h     /root/OpenFOAM/ThirdParty-2.2.2/platforms/linux64Gcc45/paraview-3.12.0/include/paraview-3.12/mrmpi/mpi.h     /root/OpenFOAM/ThirdParty-2.2.2/platforms/linux64Gcc45/paraview-3.12.0/include/paraview-3.12/vtkhdf5/H5FDmpi.h     /usr/include/openmpi-x86_64/mpi.h     /usr/src/kernels/2.6.32-431.11.2.el6.x86_64/include/config/usb/serial/siemens/mpi.h     /usr/src/kernels/2.6.32-431.11.2.el6.x86_64/include/linux/crypto/mpi.h     /usr/src/kernels/2.6.32-431.3.1.el6.x86_64/include/config/usb/serial/siemens/mpi.h     /usr/src/kernels/2.6.32-431.3.1.el6.x86_64/include/linux/crypto/mpi.h      What's wrong with this? Is it because I don't have Intel MPI? Any way to solve this without Intel MPI?


How to modify write permission on current buffer in emacs?

Is it possible to change the write permissions on a file from inside emacs, without killing/re-opening the buffer? Sometimes I forget to modify the permissions on a file before opening it. I can modify the permissions from inside emacs (`M-! chmod u+w filename`) but this doesn't update the buffer which remains write protected and refuses to modify the file. Is there a way to update permissions inside the buffer? Bonus point if I can assign this to a shortcut!


Implementing a String -> PDF Stamp tool

I wrote a little shell function which creates a fixed-size PDF file (A4) from a character string using `gs`:               make_stamp() {     file=$1     string=$2     tmp=${file}-small.pdf     gs -o "$tmp" -sDEVICE=pdfwrite -g500x200 \       -c "/Helvetica findfont 12 scalefont setfont" \       -c "0 1 0 0 setcmykcolor" \       -c "0 5 moveto" \       -c "(${string}) show" \       -c "showpage"     gs -o "$file" -sDEVICE=pdfwrite -g5950x8420 \       -c "<</PageOffset [510 20]>> setpagedevice" \       -f "$tmp"     }      However, there are a few things that I would like to improve:   1. when creating `$tmp`, how do I set a solid background colour?   2. when creating `$tmp`, is it possible to have the size auto-calculated to be tightly around the text, maybe with a few `pt` as padding?   3. is it possible to rewrite this function to only call `gs` once? or   * is there another way to do this which doesn't use `gs` directly? The stamp file must be textual, a rendered image is no good. For anyone who is interested, I use the output of this function `$stamp` in a call to `pdftk` like this:               pdftk original.pdf stamp $stamp output stamped.pdf


Stop user being able to access live CD environment or recovery mode?

I'm haved created an account on ubuntu that is just a standard user but with no internet access. I have also removed 'recovery mode' from the grub menu so that one cannot just choose this option access root and reverse all my changes (maybe a safer option could have been passwording this rather than removing...), but this still leaves the option of simply booting into the liveCD/USB and being able to access the internet etc... Is there a way to prevent a user being able to boot into liveCD environment?


How to setup password-less ssh with RSA keys

I am trying to setup a password-less SSH configuration between two machines and am having trouble. There are a ton of howtos out there that I have followed and have had no success. Here are the steps that I've taken   1. Generate the authentication keys on the client. ( _Pressed enter when prompted for a passphrase_ ) `[root@box1:.ssh/$] ssh-keygen -t rsa`   2. Copy the public key to the server. `[root@box1:.ssh/$] scp id_rsa.pub root@box2:.ssh/authorized_keys`   3. Verified the authorized key was created successfully on the server   4. Executed the following command: `[root@box1:.ssh/$] ssh root@box2 ls` And I was still prompted for a password. I read a note on one howto that "depending on the version of SSH that is running..." (although it did not specify which versions needed this), it might require:   * The public key in .ssh/authorized_keys2   * Permissions of .ssh to 700   * Permissions of .ssh/authorized_keys2 to 640 I also followed those steps and had no success. I have verified that the home, root, and .ssh directories are not writable by group (according to http://unix.stackexchange.com/tags/ssh/info). Anyone have any ideas what I'm missing? Thanks EDIT: I also copied the public key to the second box using the ssh-copy-id command and that generated the `.ssh/authorized_keys` file. `[root@box1:.ssh/$] ssh-copy-id -i id_rsa.pub root@box2` EDIT2: Including version information // box1 (system keys were generated on)   * Linux 2.6.34   * OpenSSH_5.5p1 Debian-6, OpenSSL 0.9.8o 01 June 2010 // box2   * Linux 2.6.33   * Dropbear client v0.52 EDIT3: Debug output               [root@box1:.ssh/$] ssh -vvv root@box2 ls     OpenSSH_5.5p1 Debian-6, OpenSSL 0.9.8o 01 Jun 2010     debug1: Reading configuration data /etc/ssh/ssh_config     debug1: Applying options for *     debug2: ssh_connect: needpriv 0     debug1: Connecting to box2 [box2] port 22.     debug1: Connection established.     debug1: permanently_set_uid: 0/0     debug3: Not a RSA1 key file /root/.ssh/id_rsa.     debug2: key_type_from_name: unknown key type '-----BEGIN'     debug3: key_read: missing keytype     debug3: key_read: missing whitespace     debug2: key_type_from_name: unknown key type '-----END'     debug3: key_read: missing keytype     debug1: identity file /root/.ssh/id_rsa type 1     debug1: Checking blacklist file /usr/share/ssh/blacklist.RSA-2048     debug1: Checking blacklist file /etc/ssh/blacklist.RSA-2048     debug1: identity file /root/.ssh/id_rsa-cert type -1     debug1: identity file /root/.ssh/id_dsa type -1     debug1: identity file /root/.ssh/id_dsa-cert type -1     debug1: Remote protocol version 2.0, remote software version dropbear_0.52     debug1: no match: dropbear_0.52     debug1: Enabling compatibility mode for protocol 2.0     debug1: Local version string SSH-2.0-OpenSSH_5.5p1 Debian-6     debug2: fd 3 setting O_NONBLOCK     debug1: SSH2_MSG_KEXINIT sent     debug1: SSH2_MSG_KEXINIT received     debug2: kex_parse_kexinit:     diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-         group14-sha1,diffie-hellman-group1-sha1     debug2: kex_parse_kexinit:     ssh-rsa-cert-v00@openssh.com,ssh-dss-cert-v00@openssh.com,ssh-rsa,ssh-dss     debug2: kex_parse_kexinit:     aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-         cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysatoe     debug2: kex_parse_kexinit:     aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-         cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysatoe     debug2: kex_parse_kexinit:     hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-         sha1-96,hmac-md5-96     debug2: kex_parse_kexinit:     hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-     sha1-96,hmac-md5-96     debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib     debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib     debug2: kex_parse_kexinit:     debug2: kex_parse_kexinit:     debug2: kex_parse_kexinit: first_kex_follows 0     debug2: kex_parse_kexinit: reserved 0     debug2: kex_parse_kexinit: diffie-hellman-group1-sha1     debug2: kex_parse_kexinit: ssh-rsa,ssh-dss     debug2: kex_parse_kexinit:     aes128-ctr,3des-ctr,aes256-ctr,aes128-cbc,3des-cbc,aes256-cbc,twofish256-cbc,twofish-     cbc,twofish128-cbc,blowfish-cbc     debug2: kex_parse_kexinit:     aes128-ctr,3des-ctr,aes256-ctr,aes128-cbc,3des-cbc,aes256-cbc,twofish256-cbc,twofish-     cbc,twofish128-cbc,blowfish-cbc     debug2: kex_parse_kexinit: hmac-sha1-96,hmac-sha1,hmac-md5     debug2: kex_parse_kexinit: hmac-sha1-96,hmac-sha1,hmac-md5     debug2: kex_parse_kexinit: zlib,zlib@openssh.com,none     debug2: kex_parse_kexinit: zlib,zlib@openssh.com,none     debug2: kex_parse_kexinit:     debug2: kex_parse_kexinit:     debug2: kex_parse_kexinit: first_kex_follows 0     debug2: kex_parse_kexinit: reserved 0     debug2: mac_setup: found hmac-md5     debug1: kex: server->client aes128-ctr hmac-md5 none     debug2: mac_setup: found hmac-md5     debug1: kex: client->server aes128-ctr hmac-md5 none     debug2: dh_gen_key: priv key bits set: 132/256     debug2: bits set: 515/1024     debug1: sending SSH2_MSG_KEXDH_INIT     debug1: expecting SSH2_MSG_KEXDH_REPLY     debug3: check_host_in_hostfile: host 192.168.20.10 filename     /root/.ssh/known_hosts     debug3: check_host_in_hostfile: host 192.168.20.10 filename     /root/.ssh/known_hosts     debug3: check_host_in_hostfile: match line 3     debug1: Host 'box2' is known and matches the RSA host key.     debug1: Found key in /root/.ssh/known_hosts:3     debug2: bits set: 522/1024     debug1: ssh_rsa_verify: signature correct     debug2: kex_derive_keys     debug2: set_newkeys: mode 1     debug1: SSH2_MSG_NEWKEYS sent     debug1: expecting SSH2_MSG_NEWKEYS     debug2: set_newkeys: mode 0     debug1: SSH2_MSG_NEWKEYS received     debug1: Roaming not allowed by server     debug1: SSH2_MSG_SERVICE_REQUEST sent     debug2: service_accept: ssh-userauth     debug1: SSH2_MSG_SERVICE_ACCEPT received     debug2: key: /root/.ssh/id_rsa (0x54b1c340)     debug2: key: /root/.ssh/id_dsa ((nil))     debug1: Authentications that can continue: publickey,password     debug3: start over, passed a different list publickey,password     debug3: preferred     gssapi-keyex,gssapi-with-mic,publickey,keyboard-interactive,password     debug3: authmethod_lookup publickey     debug3: remaining preferred: keyboard-interactive,password     debug3: authmethod_is_enabled publickey     debug1: Next authentication method: publickey     debug1: Offering public key: /root/.ssh/id_rsa     debug3: send_pubkey_test     debug2: we sent a publickey packet, wait for reply     debug1: Authentications that can continue: publickey,password     debug1: Trying private key: /root/.ssh/id_dsa     debug3: no such identity: /root/.ssh/id_dsa     debug2: we did not send a packet, disable method     debug3: authmethod_lookup password     debug3: remaining preferred: ,password     debug3: authmethod_is_enabled password     debug1: Next authentication method: password      EDIT4: Another interesting development. Instead of generating the keys on box1 (running OpenSSH) and copying them to box2 (running dropbear) I did it in reverse: `[root@box2:.ssh/$] dropbearkey -t rsa -f id_rsa` `[root@box2:.ssh/$] dropbearkey -y -f id_rsa | grep "^ssh-rsa" >> authorized_keys` `[root@box2:.ssh/$] scp authorized_keys root@box1:.ssh/` And with that I am successfully able to issue commands password-less from box2 to box1 ONLY if I specify the ID file: `[root@box2:.ssh/$] ssh -i id_rsa root@box1 ls` Still unable to issue commands from box1 (OpenSSH) to box2 (dropbear).


How to list files in a zip without extra information

en I use `unzip -l test.zip` I get the output like this:               Archive:  test.zip       Length      Date    Time    Name     ---------  ---------- -----   ----        810000  05-07-2014 15:09   file1.txt        810000  05-07-2014 15:09   file2.txt        810000  05-07-2014 15:09   file3.txt     ---------                     -------       2430000                     3 files      But I am insterested only by the lines containnig the file details. I tried to make filtering using grep like this: `unzip -l test.zip | grep -v Length | grep -v "\-\-\-\-" | g -v Archive | grep -v " files"` But it is long and prone to error (e.g a file name Archive in this list will be dropped) Is there any other options with unzip -l (I checked the unzip man page and did not find any) or another tool to do so? It is important to me not to really unzip the archive but just to look into it.


Realtek RTS5209 PCI-E Card Reader only work if card is inserted before boot

# Hardware Info   * Laptop Model: Sony Vaio Pro 13   * Problematic Hardware: Bulti-in Realtek Semiconductor Co., Ltd. RTS5209 PCI Express Card Reader # Problem description Here is the problem, if I boot with my SD card inserted into the card reader, my Gentoo correctly load kernel module and detected SD card, assigned it to /dev/mmcblk0 according to dmesg output, XFCE also show an SD icon on desktop so I could mount it without any problem. But if I boot without any SD card in card reader instead, and insert SD card after boot nothing happened. No SD card been detected, dmesg shows nothing. Since SystemRescueCD (which is also based on Gentoo) correctly work as expected (boot without SD card inserted, insert SD card after boot, SystemResuceCD could detected it correctly and assign it to /dev/mmcblock0. So I guess I must miss some configuration on my Gentoo. # What have I tried I tried to compare lsmod output from both configuration, and found if I boot with SD card inserted, the following additional kernel module will be loaded.               rtsx_pci_sdmmc         13679  0     rtsx_pci_ms             7218  0     mmc_core               91689  2 mmc_block,rtsx_pci_sdmmc     memstick                6896  1 rtsx_pci_ms     rtsx_pci               31487  2 rtsx_pci_ms,rtsx_pci_sdmmc       I also confirmed these module been loaded after I insert my SD card into card reader when I using SystemRescueCD. I also tried load these module manually on my Gentoo system, but nothing happens after I load them, no new print out in dmesg, still no SD card been detected. # lspci output               00:00.0 Host bridge: Intel Corporation Haswell-ULT DRAM Controller (rev 09)     00:02.0 VGA compatible controller: Intel Corporation Haswell-ULT Integrated Graphics Controller (rev 09)     00:03.0 Audio device: Intel Corporation Haswell-ULT HD Audio Controller (rev 09)     00:14.0 USB controller: Intel Corporation 8 Series USB xHCI HC (rev 04)     00:16.0 Communication controller: Intel Corporation 8 Series HECI #0 (rev 04)     00:1b.0 Audio device: Intel Corporation 8 Series HD Audio Controller (rev 04)     00:1c.0 PCI bridge: Intel Corporation 8 Series PCI Express Root Port 3 (rev e4)     00:1c.3 PCI bridge: Intel Corporation 8 Series PCI Express Root Port 4 (rev e4)     00:1c.4 PCI bridge: Intel Corporation 8 Series PCI Express Root Port 6 (rev e4)     00:1d.0 USB controller: Intel Corporation 8 Series USB EHCI #1 (rev 04)     00:1f.0 ISA bridge: Intel Corporation 8 Series LPC Controller (rev 04)     00:1f.3 SMBus: Intel Corporation 8 Series SMBus Controller (rev 04)     01:00.0 Network controller: Intel Corporation Wireless 7260 (rev 6b)     02:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5209 PCI Express Card Reader (rev 01)     03:00.0 SATA controller: Samsung Electronics Co Ltd XP941 PCIe SSD (rev 01)       # Kernel configuration   1. Everything inside MMC/SD/SDIO card support (except MMC debugging / MMC host clock gating / MMC host test driver) is compiled as kernel module.   2. CONFIG_MEMSTICK=m   3. CONFIG_MEMSTICK_REALTEK_PCI=m I'm totally stuck and have no idea what next step should I take to fix this problem, where should I check now?


How to validate an SSH public key?

I've had issues copying public keys to `authorized_keys` and winding up with an extra linefeed or space or something. Is there a way to simply validate that a key looks like a valid key? I don't have the private key.


Semicolon in conditional structures

Why put semicolons in one and not in another? The result is the same **Code one**               if [ "a" == "a" ]     then     echo "true"     fi      **Code two**               if [ "a" == "a" ];     then     echo "true";     fi      Semicolons in the second code are unnecessary? When it is necessary to place semicolons?


How do I know what decompression algorithms are compiled-in into the linux kernel?

If `/proc/config.gz` is unavailable, how do I know what decompression algorithms the running kernel is capable of using on a compressed `cpio` `initramfs`? Is the `gzip` algorithm always available, even when `CONFIG_DECOMPRESS_GZIP` is not `y` when building the kernel?


Are remote LUKS volumes mounted locally with sshfs made visible to remote users?

I created an encrypted volume with `LUKS` and uploaded it to a remote directory on an untrusted host. I can mount it locally though. I first mount the remote directory locally with `sshfs` and then open my volume with `cryptsetup` as if it were a local file.               $ sshfs user@host: remote/     # cryptsetup luksOpen remote/disk.img disk     $ mount /dev/mapper/disk mount_point/      My question is: do I thereby make whatever is in `mount_point/` visible to users on the remote host? Also, are commands I execute in a directory mounted through `sshfs` transparent to administrators on the remote host?


Autokey won't start

I installed `autokey-gtk` application but it won't start. When I run it from terminal it will write a message:               Xlib.protocol.request.QueryExtension      but that's all. The application won't start. Do you know what is wrong?


Problem installing Debian wheezy from USB stick

I try to install Debian wheezy on my IBM ThinkPad X40 2372-CTO via USB stick. First i do `zcat boot.img.gz > /dev/sdb` with this image. After that i do `cp debian-*-netinst.iso /mnt/sdb` with this image. When I try to install debian from the USB stick the following happens. First I get `SYSLINUX .... aborted. boot:`. When I press enter I see the Installer menu. When I choose `Install` the machine reboots. What am I doing wrong here? Are these the wrong images? How can I debug this?


Disconnecting drives for dual-boot installation

Related to my post about my Arch installation, I'm wondering whether the following procedure would work:   1. Disconnect sda   2. Install Arch normally on sdb as if on a single-drive system   3. Disconnect sdb, reconnect sda   4. Install Win7 on sda as if on a single-drive system   5. Reconnect sdb   6. Tell BIOS to boot sdb   7. In Arch, edit GRUB settings for dual-boot I guess this depends on whether step 7 will work, i.e., boot Arch even though there's another hard drive present that wasn't there during installation. And a related issue: Does anyone know whether Windows 7 needs to be (a) installed first, whether or not there's another hard drive present, and (b) on the first hard drive, i.e., hd0 (if the Linux drive is going to have the bootloader on it, it might as well be first if possible)? I know that installing two systems on the _same_ hard drive requires Windows to be installed first because otherwise it will overwrite the MBR, but what about separate drives?


Starting automatically uppercase after dot

Is it possible to configure the following automation? Everytime I will type a sentence in which the last character is dot, colon or quotation mark it will change the next letter automatically to uppercase, so that I don't have to press the shift key? The settings should apply to all desktop environement (XFCE, KDE, Gnome) and terminals. Sometimes you need to write lowercase after dot, so there could be some key that will suppress uppercase. I noticed that mobile applications have this possibility.


What's the purpose of the first argument to select system call?

From `man select`               int select(int nfds, fd_set *readfds, fd_set *writefds,                fd_set *exceptfds, struct timeval *timeout);      > nfds is the highest-numbered file descriptor in any of the three sets, plus > 1. What is the purpose of `nfds`, when we already have `readfds`, `writefds` and `exceptfds`, from which the file descriptors can be determined?


Default File Permissions - Ubuntu & VSFTPD

I have a server setup with Ubuntu, Apache2 and VSFTPD. We virtual host several sites on this machine. Typically, I use the same process to set up the new sites, but the default permissions for some are different than the others. For some sites, I can upload new files and directories through FTP and they receive 644 and 755 permissions respectively. Just how I want them by default. For other sites, they receive 0 or 600 as the default new file permission. I have to manually change each file to 644. This is slow and a pain to do. I'm by no means an expert, but I've checked the permissions and the ownership and it all seems to be the same. What am I missing? PS - I'm sure I left out some relevant information. Please let me know what else I need to provide. Thank you!


Is it possible to su without being prompted for a password?

I suspect `su` doesn't have any way to allow passing the password from the shell instead of being prompted for one, for security reasons (couldn't find anything in the MAN). Is this true?


automatic capturing top output by cronjob CENTOS 6.5 x86_64

I have this command:               top -n 14400 -a -b -d 1 > /toplogfile.txt      I want to make a script which is run by `cron` every day to capture top output, and if it is possible `gzip` the output file after the script finished. How can I implement this?


Cannot build sox with FLAC support

I'm trying to configure and build `sox` v14.4.1 with FLAC support enabled, on Ubuntu. I have downloaded and installed `flac` and done an `sudo ldconfig` (just in case the libs were wrongly linked), but somehow it's not showing on `sox`: **Output of`./configure`**:                 lame......................no      How should this be fixed?`


diff files within dirs listing by date modified

I was using MELD but it can't seem to sort by modification time, so I've been looking for a way to achieve something similar in terminal. I found a line of code               find /path/to/dir1  /path/to/dir2 -printf "%TY-%Tm-%Td %TH:%TM %p\n" | sort -r      which seems to output the differences (including new files) between directories. I'm looking for a way to list _only_ the modified files (not new or deleted) across two dirs and list them by most recently modified. I also need to limit output to N lines because my project is massive. I hate asking outright, but I am new to bash scripting and googling about `diff` has revealed surprisingly little...


FVWM HowTo Swallow?

1. How could I **swallow** things like `xclock`, `tray` and other stuff to `FvwmButtons`?   2. Is `FvwmButtons` the only option to swallow this type of things?    3. How to swallow `FvwmWinList` to `FvwmButtons`?


remove new lines

My input is a csv file like this:               10,"Special Projects,bangaram",0,,0     10,"Statutory/ Internal Audit , MO reporting (incl Excel Spreadsheet uploadation)     ",     bangaram,0,,0     10,"Complience with SVCCL",     bangaram,       0,,     0     10,     "Release of incentives / commission to all channel partners.     ",      bangaram,       0,,     0     10,"Timely processing of sales orders to channel partners",     bangaram,       0,,     0     10,"    Balance sheet Reviwe", bangaram,        0,,     0     10,"    Ensuring Critical Reconciliation on monthly basis. (IN-GL)",    bangaram,       0,,     0     10,     "Timely & accurate closure of Accounts.     ",      bangaram,       0,,     0     11,"    Opex Spend on communication activites", bangaram,       0,,     0     11,"    Opex Spend on communication activites", bangaram        ,0,,    0      I need to get output like this:               10,"Special Projects,bangaram",0,,0     10,"Statutory/ Internal Audit , MO reporting (incl Excel Spreadsheet uploadation)",     bangaram,0,,0     10,"Complience with SVCCL",     bangaram,       0,,     0     10,     "Release of incentives / commission to all channel partners.",      bangaram,       0,,     0     10,"Timely processing of sales orders to channel partners",     bangaram,       0,,     0     10,"    Balance sheet Reviwe", bangaram,        0,,     0     10,"    Ensuring Critical Reconciliation on monthly basis. (IN-GL)",    bangaram,       0,,     0     10,     "Timely & accurate closure of Accounts.",      bangaram,       0,,     0     11,"    Opex Spend on communication activites", bangaram,       0,,     0     11,"    Opex Spend on communication activites", bangaram        ,0,,    0      Where ever new line is der that will be delete and then add to previous line. Please write shell script regarding this.


How to get ondemand governor on fedora

In Ubuntu 13.10 on my _(Dual Core i5 Lenovo G570)_ laptop, I recently discovered the wonders of `indicator-cpufreq`, so I can extend my battery life dramatically by setting it to 'ondemand' or 'powersave' governor \- here is the menu it shows:                                                       ![indicator-cpufreq menu](http://i.stack.imgur.com/sUjwg.png) I was wondering whether I could implement this in the other half other my dual boot on my laptop, Fedora 20. However, after looking at this documentation, and installing the `kernel-tools` package, when I run the command to list the available modes. On Fedora I get:               wilf@whm1:~$ cpupower frequency-info --governors     analyzing CPU 0:     powersave performance      On Ubuntu I get:               wilf@whm2:~$ cpupower frequency-info --governors     analyzing CPU 0:     conservative ondemand userspace powersave performance      So can I get the `conservative`, `ondemand`, & `userspace` modes in Fedora?   Mainly the `ondemand` one * * * ### Fedora System Info _Kernel_ > Linux whm1 3.12.10-300.fc20.i686+PAE #1 SMP Thu Feb 6 22:31:13 UTC 2014 i686 > i686 i386 GNU/Linux _Version_               Fedora release 20 (Heisenbug)     Kernel 3.12.10-300.fc20.i686+PAE on an i686      **`/proc/cpuinfo`, relevant `/etc/default/grub` _(Fedora manages Grub, not Ubuntu)_ :**               #GRUB_CMDLINE_LINUX="acpi_osi=Linux acpi_backlight=vendor pcie_aspm=force"     GRUB_CMDLINE_LINUX="vconsole.font=latarcyrheb-sun16 $([ -x /usr/sbin/rhcrashkernel-param ] && /usr/sbin/rhcrashkernel-param || :) rhgb quiet acpi_osi=Linux acpi_backlight=vendor pcie_aspm=force"      ### Ubuntu System Info _Kernel_ > Linux whm2 3.11.0-15-generic #25-Ubuntu SMP Thu Jan 30 17:25:07 UTC 2014 > i686 i686 i686 GNU/Linux **`/proc/cpuinfo`, relevant `/etc/default/grub` _(I think is loaded by Fedora Grub)_ :**               GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`     GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"     GRUB_CMDLINE_LINUX=""


How to append date to backup file

I need to make a backup of a file, and I would like to have a timestamp as part of the name to make it easier to differentiate. How would you inject the current date into a copy command?               [root@mongo-test3 ~]# cp foo.txt {,.backup.`date`}     cp: target `2013}' is not a directory          [root@mongo-test3 ~]# cp foo.txt {,.backup. $((date)) }     cp: target `}' is not a directory            [root@mongo-test3 ~]# cp foo.txt foo.backup.`date`     cp: target `2013' is not a directory