title: Emacs: query-replace, regular expression, reuse of search result

text: How do I combine something like `query-replace` with a regular expression search-and-replace that in part reuses the search result? In my case, how to transform > The programmers are "sort of" confident that the subroutines "load_students" > and "compute_student_grade" are without bugs. into > The programmers are "sort of" confident that the subroutines > \texttt{load_students} and \texttt{compute_student_grade} are without bugs. I could use two `query-replace` and then hammer yes and no, but it seems sluggish for a big document. Also, I thought about including the whitespace in the searches (one ` "` and one `" `, but that would not work in cases such as `... that's not the way to use "load_students", rather ...` Is there built-in stuff for this or do you write Elisp code?


title: Run script after desktop loads

text: I'm running a script that changes files and installs things and what not on a SUSE computer. One of the scripts that gets run with my script, reboots the computer and when the computer loads back up again I want my script to continue where it left off. What I can't figure out is where to launch my script so that it will start **AFTER** the desktop has loaded back up (the SUSE computer is set to automatically log in as a specific user who isn't root). I want my script to run in this fashion because I want the user to be able to see an output log as to what is happening before another script later on reboots the computer again. **Edit:** Following the link given below: https://bbs.archlinux.org/viewtopic.php?id=130344 I found out that the directory that is supposed to be where you put scripts specifically for my question is /home/user/.kde4/Autostart. In my attempt to follow this I found that I do not have a .kde4 directory, but I do have a .kde directory. I decided this was probably the same thing and investigated finding that .kde does have Autostart. So I placed my script in there. This resulted in my script being opened by KWrite (just the basic text editor) when my desktop loads. But the script itself doesn't get run. I created a new directory, .kde4 with Autostart in it to place my script hoping that this would solve the problem. No luck, though, as my script doesn't even get opened in KWrite in this situation. **Edit2:** I changed the permission on my script `chmod 777 script` and now it starts up. It's in my home/user/.kde/Autostart directory.


title: Does a duplicate entries in a PATH variable revoke the precedence given by the first entry?

text: If I have a PATH variable that (when exploded onto multiple lines) contains something like this (with a few notes added by me):               /Users/brandon/.rvm/gems/ruby-2.0.0-p353/bin     /Users/brandon/.rvm/gems/ruby-2.0.0-p353@global/bin     /Users/brandon/.rvm/rubies/ruby-2.0.0-p353/bin     /opt/local/bin     /opt/local/sbin     /usr/local/sbin     /usr/local/bin   # <<--- notice this path appears again later     /usr/bin         # <<--- notice this comes AFTER /usr/local/bin     /bin     /usr/sbin     /sbin     /usr/local/bin   # <<--- here it is again!     /usr/local/git/bin     /Users/brandon/bin     /Users/brandon/.homebrew/bin     /usr/local/mysql/bin     /usr/local/share/npm/bin     /Applications/Postgres93.app/Contents/MacOS/bin     /Users/brandon/.rvm/bin      is it possible for the presence of the second `/usr/local/bin/` to cause the `/usr/bin` to take precedence over `/usr/local/bin`? This seems crazy (to me: I've never heard of such a thing) but that's exactly the behavior I'm seeing. I've just installed PHP with Homebrew, and yet the system PHP (from `/usr/bin`) is taking precedence:               $ which php     /usr/bin/php      _**BUT_** , after manually altering the PATH (rather than digging through all the files sourced by my `.zshrc` to try to figure out why & where the duplication is coming from) to remove the **_second_** instance of `/usr/local/bin`, I find that `/usr/local/bin` is taking precedence over `/usr/bin` as I would have expected it to in the first place:               $ which php     /usr/local/bin/php      What would cause this? Is this normal?


title: Dynamic password authentication

text: I would like to know how can I (and if it's possible) create a dynamic authentication for a user in linux. The server would change the user password periodically and the user would use a program (like a token) to retrieve and enter the correct password.


title: How to use my login password to do two things

text: I have a CIFS drive that I mount regularly, and it requires a password for it. Since it's annoying to type my password every time, I wrote a script that sets the PASSWD environment variable, mounts the drive, and then I clear it (CIFS checks the PASSWD environment variable before asking). It works, and the script with my password is on an encrypted partition, but I don't like it. What I would like to do instead is, since my box and the remote drive have the same plain-text password, the login manager use the password I type to try and mount the drive as well. That way my password isn't written in plain-text on my computer but I avoid having to answer yet-another-password. Other suggestions to improving the CIFS mount login are welcome, keeping in mind I don't have root access to the server hosting the drive. EDIT: I have to clear up somethings:   * I have root access to the client (my box), I just don't have access to the server. So all solutions must be client side.    * My concern is having a plain text copy of my password for anyone who gets physical access to my laptop. Currently my /home partition is encrypted so my script is fairly secure when the laptop is off.  This is why I'd like a solution, if possible, that uses the fact that I'm typing those exact credentials to log into my user account.


title: checking sendmail status as NON root user

text: I am in the process of converting to CentOS 6.5 from 5.5 and need a way to check if sendmail is on or not. For reasons I don't want to go through, I need to be able to check if sendmail is ON as a NON root user. In CentOS 5.5, I could use `/sbin/service sendmail status` running as a non root user. In CentOS 6.5, security is a bit tighter and new code was added to the `/etc/init.d/sendmail` script:               # Check that we're a privileged user     [ `id -u` = 0 ] || exit 4      The sendmail script uses the following code to check it's status:               status)        echo -n sendmail; status -p /var/run/sendmail.pid -l sendmail        RETVAL=$?        echo -n sm-client; status -p /var/run/sm-client.pid -l sm-client        [ $RETVAL -eq 0 ] && RETVAL=$?       ;;      In the beginning of the sendmail script the `functions` library is source so `status()` can be called in the `functions` script                # Source function library.     . /etc/rc.d/init.d/functions      As root, you would typically see this when running `/sbin/service sendmail status`:               sendmail (pid  1107) is running...     sm-client (pid  1115) is running...      When running as a NON root user I receive `return code 4` What I have tried so far is checking `/var/run/sendmail.pid` to get the process ID, then I check to see if there is there is and entry in `/proc` for the pid. For example, As a NON root user:               cat /var/run/sendmail.pid - Get the pid          1107     /usr/sbin/sendmail -bd -q3600s      Then I check `/proc/1107/status`:               Name:   sendmail     State:  S (sleeping)     Tgid:   1107     Pid:    1107     PPid:   1     TracerPid:      0     Uid:    0       0       0       0     Gid:    0       51      51      51     Utrace: 0     FDSize: 32     Groups: 51     VmPeak:    12844 kB     VmSize:    12840 kB     VmLck:         0 kB     VmHWM:      2020 kB     VmRSS:      2020 kB     VmData:     1176 kB     VmStk:       208 kB     VmExe:       824 kB     VmLib:     10156 kB     VmPTE:        44 kB     VmSwap:        0 kB     Threads:        1     SigQ:   0/3865     SigPnd: 0000000000000000     ShdPnd: 0000000000000000     SigBlk: 0000000000000000     SigIgn: 0000000000001006     SigCgt: 0000000180016201     CapInh: 0000000000000000     CapPrm: ffffffffffffffff     CapEff: ffffffffffffffff     CapBnd: ffffffffffffffff     Cpus_allowed:   1     Cpus_allowed_list:      0     Mems_allowed:   1     Mems_allowed_list:      0     voluntary_ctxt_switches:        560     nonvoluntary_ctxt_switches:     2      If `/proc/<pid>` doesn't exist, I know the service is not on.. This method seems to work, but I don't trust it completely and would rather use `/sbin/service sendmail status`. Any ideas on the best way to check if sendmail service is running as a NON root user??


title: How to switch text direction to rtl & ltr in kate and kwrite

text: How can I switch the text direction in kate and kwrite editors? I have English & Persian layouts and want to read the Persian text as right to left but I can't seem to be able to switch the text direction.


title: Save views in multiple screen terminals

text: As I do in default single view screen terminal of ubuntu;                gnome-terminal \       --tab-with-profile=Default --working-directory="some dir" --title="some title" \       --tab-with-profile=Default --working-directory="another dir" --title="title" \      I save above command in an executable file and open multiple terminals in single execution. But it opens default terminal only. Can I save screen with multiple views such that I can open all in a single click(if it can be bookmarked) or by running single command? **Multiview screen application for ubuntu** : terminal multiplexer (tmux), terminator, screen ...


title: Vintage terminal for Ubuntu

text: So I have just been introduced to Cathode for OSX and I am completely fascinated by how classic it looks with it's 1970s retro style. Does anyone know of any programs/packages I can download to get my terminal to sport that very look? If there are no packages available, is there are setting I can change on the Ubuntu 14.04 terminal? For those who are unaware of Cathode, I will post an image in reference to what I would like to have on my terminal: ![Cathode](http://i.stack.imgur.com/2DH6w.jpg) More information as to what Cathode does can be found on this link: Cathode Info


title: Some processes not remaining in jobs list

text: After a recent workspace reorganization, I am left with a question about the way certain processes interact with the output of `jobs`. I am running all of my program in the background on one 'Main' terminal, that way I have control and information from them all neatly in one place. what I have noticed is that when I create instances of some programs in the background, they continue running yet I get notification almost instantly in the console that they have ended. Programs I have noticed this on are:   * Firefox (only on the 2nd, or higher, instance)   * gnome-terminal (may only be on second, since I already have one open when I try this)   * nautilus (on first instance) While I can understand the firefox issue, since combining the processes under one parent could make performance/memory sense, I don't understand why a program like nautilus appears to be unable to exist on the `jobs` list for any amount of time, even though the window remains open and the program remains entirely functional.


title: mount options shown in /proc/mounts

text: IIRC then the mount options shown in `/proc/mounts` have changed. Some time ago `acl` and `user_xattr` were shown, now it seems that only `noacl` and `nouser_xattr` are shown if these features are turned off. Where is this configured? Does that depend on the compiled-in defaults of the filesystem code? How can I check whether a volume supports e.g. ACL? Is there a better solution than testing with `setfacl`, `getfacl`?


title: Certificate extensions in generating and signing certificartes using openssl

text: References:   1. SSL Configurations for Intermediate certificate   2. How to add my own created certificate authority to system trusted repositories Why I can't find a page which tell me what's the kind of openssl extensions?! I was doing Mutual Authentication and then when I wanted to put an intermediate certificate in the process I discovered that the generated and signed intermediate `CA` is self-signed because of the option `-sign-key`. I read the man pages and found this relevant: > **Basic Constraints.** This is a multi valued extension which indicates > whether a certificate is a CA certificate. For example: >   >   >         basicConstraints=CA:TRUE >         basicConstraints=CA:FALSE >   > > **Key Usage :** Key usage is a multi valued extension consisting of a list > of names of the permitted key usages. The supported names are: >   >   >        digitalSignature, nonRepudiation, keyEncipherment, >        dataEncipherment, keyAgreement, keyCertSign, cRLSign, >        encipherOnly and decipherOnly. >   > > **Examples:** >   >   >         keyUsage=digitalSignature, nonRepudiation >         keyUsage=critical, keyCertSign >   I have seen a `critical` and non critical in the browser certificate view. My certificates don't have those fields. I also read that when there's no extension, that means your certificate is considered as root and self-signed certificate. I want to make four different kinds of certificates: > rootca > serverca > server crt signed by server ca && client crt signed by > server ca In documentation I came across these: > v3_ca , v3_user , v3_ca Are those the answer of my question? My commands to generate _intermediate ca_ and sign it with `rootca` key are:               openssl genrsa -out $keyfile $keysize;          openssl req -new -key $keyfile -out $reqfile -passin pass:$pw \     -subj "/C=$country/ST=$state/L=$location/O=$org/CN=$name" 2>&1;          openssl x509 -req -days $days -in $reqfile -out $certfile \     -signkey $cakeyfile 2>&1;      P.s: I don't use a configuration file because I'm running all of this operations from a bash script. I wonder if anyone can give me an explanation of the extension and if could put them as arguments and not getting them from bash (because it will need to open the bash script and edit it for every call to my bash).


title: USB-Serial Driver(Exar Xr21v1414) Run Error

text: I'm currently trying to run the bellow driver in linux-3.8.3 on Exar xr21v1414 http://www.exar.com/connectivity/uart-and-bridging-solutions/usb- uarts/xr21v1410, but when i install the driver vizzini.ko, it arise the follow error:               [  162.650000] usbserial: USB Serial support registered for Vizzini USB serial port     [  162.650000] vizzini 1-1.4:1.0: Vizzini USB serial port converter detected     [  162.660000] usb 1-1.4: Vizzini USB serial port converter now attached to ttyUSB0     [  162.670000] vizzini 1-1.4:1.1: Zero length descriptor references     [  162.670000] vizzini: probe of 1-1.4:1.1 failed with error -22     [  162.680000] vizzini 1-1.4:1.2: Vizzini USB serial port converter detected     [  162.690000] usb 1-1.4: Vizzini USB serial port converter now attached to ttyUSB1     [  162.690000] vizzini 1-1.4:1.3: Zero length descriptor references     [  162.700000] vizzini: probe of 1-1.4:1.3 failed with error -22     [  162.710000] vizzini 1-1.4:1.4: Vizzini USB serial port converter detected     [  162.710000] usb 1-1.4: Vizzini USB serial port converter now attached to ttyUSB2     [  162.720000] vizzini 1-1.4:1.5: Zero length descriptor references     [  162.730000] vizzini: probe of 1-1.4:1.5 failed with error -22     [  162.730000] vizzini 1-1.4:1.6: Vizzini USB serial port converter detected     [  162.740000] usb 1-1.4: Vizzini USB serial port converter now attached to ttyUSB3     [  162.750000] vizzini 1-1.4:1.7: Zero length descriptor references     [  162.750000] vizzini: probe of 1-1.4:1.7 failed with error -22      I would greatly appreciate any help in resolving the errors.


title: text color settings in emacs

text: I just switched to emacs from Vim today so I have no idea what I am doing. How do I change the syntax coloring in Emacs? Everything is green or light green. As you can see, latex tex is dark green and regular text is green. ![enter image description here](http://i.stack.imgur.com/AQm4K.png)


title: Creating a private network for internal VMs

text: I am trying to configure a private network for use with my Xen VMs, in addition to the public network in use by another of the VMs (VM1, which has its own public IP). So far, I have the public side working perfectly with a bridged network... On the host machine:               eth0: 91.x.x.1, gateway: 91.x.x.254     xenbr0: bridged with eth0     VM1 connected to xenbr0, with a new IP address, 91.x.x.2, and gateway 91.x.x.254      On the host machine, I've also created a private dummy ethernet port:               dummy0: 192.168.1.1      and a bridge via XenServer, pdummy0 (using these instructions http://tipstricks.itmatrix.eu/?p=681) Everything's working there, as well - the two VMs connected to the bridge can ping each other, as well as the host machine via the private 192.168.1.1 IP.               VM2: 192.168.1.2     VM3: 192.168.1.3      The last step here, is to have each of those VMs (VM2 & VM3) to be able to see the internet... What routes / IP forwarding do I need to set up to make that happen? Sample route from VM2, /sbin/route:               Kernel IP routing table     Destination     Gateway         Genmask         Flags Metric Ref    Use Iface     192.168.1.0   *               255.255.255.0   U     0      0        0 eth0


title: How much RAM is there?

text: I'm trying to estimate how effective the zram kernel module is in case of my PC. I have a pretty old machine (7y) with the only 1 GiB of RAM. I created two zram swaps (two core processor), 250MiB each, and everything seems to be working:               # swapon -s     Filename                                Type            Size    Used    Priority     /dev/mapper/debian_crypt-swap           partition       2097148 0       10     /dev/zram0                              partition       255996  203404  70     /dev/zram1                              partition       255996  203284  70      I found a script zraminfo which can calculate the compression ratio:               # ./zraminfo.sh     Physical memory:      1,049,821,184 bytes     Buffers and cache:      116,097,024 bytes / 11.1% of total memory     Unallocated:             81,043,456 bytes /  7.7% of total memory     Compressed:             121,118,720 bytes / 11.5% of total memory     Uncompressed size:      346,472,448 bytes / 2.861 compression ratio      So, after decompressing 121M, I will get +200M extra. But one thing, why is there 200M in each zram device? Shouldn't be there 2*200M compressed data, and 1,2G uncompressed?


title: emacs line wrapping and numbering

text: How can I tell emacs to wrap lines at the 80th character? I am looking for a solution I can put in `/.emacs`. I put this in `/.emacs` but it doesn't work.               ;; ========== Enable Line Numbering ==========                                                   (line-number-mode 1)          ;; ========== Set the fill column ==========                                                     (setq-default fill-column 80)


title: wireless interface stops working, netcfg reports no network found

text: I'm having a recurrent issue with my Arch Linux installation: wireless will work for a few minutes and then randomly die. When I try to restart it through wifi-menu I am informed there aren't any networks.                > sudo wifi-menu     :: Scanning for networks                                                [FAILED]       > No networks found      Running netcfg directly, I recive:               sudo netcfg wlan0-2WIRE555     :: wlan0-2WIRE555 up                  [ BUSY ] Successfully initialized wpa_supplicant     Could not set interface wlan0 flags (UP): Connection timed out     nl80211: Could not set interface 'wlan0' UP     Could not set interface wlan0 flags (UP): Connection timed out     WEXT: Could not set interface 'wlan0' UP     wlan0: Failed to initialize driver interface     > wpa_supplicant did not start, possible configuration error      The output of `lspci` is:               ~ > lspci     00:00.0 Host bridge: Intel Corporation Core Processor DRAM Controller (rev 02)     00:02.0 VGA compatible controller: Intel Corporation Core Processor Integrated Graphics Controller (rev 02)     00:16.0 Communication controller: Intel Corporation 5 Series/3400 Series Chipset HECI Controller (rev 06)     00:19.0 Ethernet controller: Intel Corporation 82577LM Gigabit Network Connection (rev 06)     00:1a.0 USB controller: Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller (rev 06)     00:1b.0 Audio device: Intel Corporation 5 Series/3400 Series Chipset High Definition Audio (rev 06)     00:1c.0 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 1 (rev 06)     00:1c.3 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 4 (rev 06)     00:1c.4 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 5 (rev 06)     00:1d.0 USB controller: Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller (rev 06)     00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev a6)     00:1f.0 ISA bridge: Intel Corporation Mobile 5 Series Chipset LPC Interface Controller (rev 06)     00:1f.2 SATA controller: Intel Corporation 5 Series/3400 Series Chipset 6 port SATA AHCI Controller (rev 06)     00:1f.3 SMBus: Intel Corporation 5 Series/3400 Series Chipset SMBus Controller (rev 06)     00:1f.6 Signal processing controller: Intel Corporation 5 Series/3400 Series Chipset Thermal Subsystem (rev 06)     02:00.0 Network controller: Intel Corporation Centrino Advanced-N 6200 (rev ff)     ff:00.0 Host bridge: Intel Corporation Core Processor QuickPath Architecture Generic Non-core Registers (rev 02)     ff:00.1 Host bridge: Intel Corporation Core Processor QuickPath Architecture System Address Decoder (rev 02)     ff:02.0 Host bridge: Intel Corporation Core Processor QPI Link 0 (rev 02)     ff:02.1 Host bridge: Intel Corporation Core Processor QPI Physical 0 (rev 02)     ff:02.2 Host bridge: Intel Corporation Core Processor Reserved (rev 02)     ff:02.3 Host bridge: Intel Corporation Core Processor Reserved (rev 02)      Every time this happens, I have to restart in order to get internet working. Is there some systemd command I can use to restart it manually? Is this an issue I can resolve permanently?


title: Program similar to xcalib to invert desktop colors

text: I'm using `xcalib` to invert colors on my computer at home. I have two monitors at work, and unfortunately the `xcalib -i -a` inverts only one of them (the one I don't want to invert). I haven't found any solutions for this issue so I'm looking for a replacement for `xcalib`. The goal is to be able invert only selected monitor's colors or both at the same time. By the way I'm using Mint 13 Mate. Update: The computer is Dell Optiplex 990 with integrated Intel card.               lspci -k | grep VGA          00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)      Data from `xrandr`:               Screen 0: minimum 320 x 200, current 3840 x 1080, maximum 8192 x 8192     VGA1 connected 1920x1080+1920+0 (normal left inverted right x axis y axis) 477mm x 268mm        1920x1080      60.0*+        1680x1050      60.0          1600x900       60.0          1280x1024      75.0     60.0          1440x900       59.9          1280x800       59.8          1152x864       75.0          1280x720       60.0          1024x768       75.1     70.1     60.0          832x624        74.6          800x600        72.2     75.0     60.3     56.2          640x480        72.8     75.0     66.7     60.0          720x400        70.1       HDMI1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 477mm x 268mm        1920x1080      60.0*+   50.0          1680x1050      60.0          1600x900       60.0          1280x1024      75.0     60.0          1440x900       59.9          1280x800       59.8          1152x864       75.0          1280x720       50.0     60.0          1024x768       75.1     70.1     60.0          832x624        74.6          800x600        72.2     75.0     60.3     56.2          720x576        50.0          720x480        59.9          640x480        72.8     75.0     66.7     60.0          720x400        70.1       DP1 disconnected (normal left inverted right x axis y axis)


title: Missing init.d/apache2 file

text: I am new to linux and just recently messed up my first apache/tomcat configuration. After trying to delete apache and tomcat, and now trying to reinstall apache 2, I am missing the `init.d/apache2` file to start/stop my server. I am not sure if the new install actualy worked, and my `apt-get purge apache2` didn't remove everything in the first place! How can I get the `init.d/apache2` file to test if server starts / is installed properly (I had removed files and directories manually)?


title: Why does this password fail AIX and Solaris rules

text: Had to reset my password on a couple of client servers today, and despite following the rules I get the message "Your password failed to meet: minimum of 2 non-alphabetic characters" back from the AIX server (the Solaris box doesn't give error messages so just keeps prompting for new password) The passwords I have tried include things like arstdyfu12445!! so I'm definitely including non-alphabetic characters.


title: How to show the number of installed packages

text: What is the Debian equivalent of Fedora's `yum list installed | grep wc --lines`?


title: How to remove all the files in a directory?

text: I am trying to remove all files and subdirectories in a directory. I used `rm -r` to remove all files, but I want to remove all files _and_ subdirectories, excluding the top directory itself. For example, I have a top directory like `images`. It contains the files `header.png`, `footer.png` and a subdirectory. Now I want to delete `header.png`, `footer.png` and the subdirectory, but not `images`. How can I do this in linux?


title: How to get vodafone mobile connect (or equivalent) working reliably on debian squeeze

text: I got a Vodafone K3760 at some point in Debian/Lenny's lifetime, for use with a Lenovo S10e. I installed (from the Vodafone BetaVine site) usb-modeswitch 0.97 and vodafone-mobile-connect (VMC) 2.10.01-1 (or maybe it was actually vodafone-mobile-connect_svn20090615) and it all worked pretty well. After the squeeze update I have had less luck. Unlike lenny, squeeze includes usb_modeswitch 1.1.4-2, and I also grabbed vodafone-mobile-connect 2.25.01. It does actually work... for a few minutes, then the system locks up (or sometimes the gnome panel dies, but xterms on-screen continue to work). Anyone know what magic combinations of packages, if any, will work reliably with Squeeze ? (The obvious next thing for me to try is to revert the relevant packages to their older versions; VMC does have quite a lot of dependencies though so I'm not too sure how well this will work). There's another school of thought which says forget about vodafone's app and just use the new Gnome network manager's mobile broadband support. I haven't tried this yet, but I kind of like the vodafone app (for it's usage monitoring, and for it's access to SMS messages on the K3760; these are pretty important if you travel abroad and want to see what outrageous charges you'll be stung for if you dare connect). But if Gnome or other apps provide such functionality, I'd happily drop the Vodafone software. Thanks for any advice Just to be clear: the system is rock solid when using wired or built-in wifi connection. Inserting the dongle seems to be pretty safe; the problems start once connected. **Update 1:** I couldn't revert to the older vodafone mobile connect because of various python dependencies not in squeeze. Reverting to the older usb_modeswitch seems to be possible, but at least this once I got a spew of kernel bug notifications (alas, these don't seem to submit anything useful: example) and got about 30mins uptime before a lockup. I'm not too sure what to make of dmesg (have got some saved); there are clearly some call stacks into serio_interrupt in i8042_interrupt in ...a pile of handle IRQ functions ... but there are other ones too. **Update 2:** I managed to get a dmesg log of some kernel errors from the "all-squeeze" version (not using any modules from the older setup) before lockup. This can be found here; no idea how to interpret it myself.


title: How to install some packages from "unstable" Debian on a computer running "stable" Debian?

text: On a computer running "stable" Debian, when trying to install a package which is in the unstable list on the Debian web site using the `aptitude install <package>/unstable` command, I get output similar to this:               Couldn't find any package whose name or description matched "<package>"     Couldn't find any package whose name or description matched "<package>"     No packages will be installed, upgraded, or removed.     0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.     Need to get 0 B of archives. After unpacking 0 B will be used.      What can I do to be able to install "unstable" packages? (I thought of adding the repository to `sources.list`, but I don't want everything to start being installed from "unstable"). So: how can I install unstable packages (with using `/stable` at the end of the package name)?


title: awk a specific column with unexpected line break

text: I can't seem to find a solution for this and it's driving me crazy. I know I can use `awk` to print a column(s). I'm having trouble printing a specific column though because of the way my file system is arranged. This is what I have when I run `df`:               Filesystem           1K-blocks      Used Available Use% Mounted on     /dev/mapper/vg_root-root                           36623968   4484592  30278976  13% /     tmpfs                   961312         0    961312   0% /dev/shm     /dev/sda1               516040    102896    386932  22% /boot      If I `awk` for the 1K-blocks column it returns values from other columns because of the length of the filesystem location. Basically this happens:               1K-blocks          4484596     961312     516040      **How can I list the right column info?**


title: How do I edit an Audio CDs Artist and Title in Dolphin?

text: I am running a mostly fresh install of Fedora 14 KDE spin. I installed lame from rpmfusion to get mp3 support in Dolphin, but the CD I put in comes up with the wrong information. This isn't surprising since it is an independent release of a band I like, and is probably not in the CDDB. I am sure this is easy, but I dont know how to correct the information. I cannot open the virtual 'CDDB Information.txt' and right-click doesn't get me anywhere. Is there a package that needs to be there that I may have not installed yet?


title: Possible issues with SSD SATA3 drive

text: While investigating the issue with my SATA3 SSD drive being recognized as SATA2 (for some reason had to change SATA ports to fix it) I noticed the following messages when I run:               $ dmesg | grep ata3.00     [    0.980592] ata3.00: ACPI cmd ef/10:06:00:00:00:00 (SET FEATURES) succeeded     [    0.980594] ata3.00: ACPI cmd f5/00:00:00:00:00:00 (SECURITY FREEZE LOCK) filtered out     [    0.980596] ata3.00: ACPI cmd b1/c1:00:00:00:00:00 (DEVICE CONFIGURATION OVERLAY) filtered out     [    0.980712] ata3.00: supports DRM functions and may not be fully accessible     [    0.980795] ata3.00: failed to get NCQ Send/Recv Log Emask 0x1     [    0.980797] ata3.00: ATA-9: SAMSUNG MZ7PD128HAFV-000H7, XXXXXXX, max UDMA/133     [    0.980798] ata3.00: 250069680 sectors, multi 1: LBA48 NCQ (depth 31/32), AA     [    0.981070] ata3.00: ACPI cmd ef/10:06:00:00:00:00 (SET FEATURES) succeeded     [    0.981072] ata3.00: ACPI cmd f5/00:00:00:00:00:00 (SECURITY FREEZE LOCK) filtered out     [    0.981073] ata3.00: ACPI cmd b1/c1:00:00:00:00:00 (DEVICE CONFIGURATION OVERLAY) filtered out     [    0.981174] ata3.00: supports DRM functions and may not be fully accessible     [    0.981225] ata3.00: failed to get NCQ Send/Recv Log Emask 0x1     [    0.981227] ata3.00: configured for UDMA/133      My architecture:               $ uname     3.13.8-1-ARCH      My concern is the line where it says that system **failed to get NCQ Send/Recv Log Emask 0x1** Is this something I need to be concerned with? My system is Asrock Extreme4 mb with SAMSUNG MZ7PD128HAFV-000H7 SSD SATA3 drive on Arch Linux OS. **Update 1** I run SysLinux on my machine and below is the output of the same command (no failure messages):               root@sysresccd /root % dmesg | grep ata3     [    1.166153] ata3: SATA max UDMA/133 abar m2048@0xf0336000 port 0xf0336200 irq 42     [    1.470696] ata3: SATA link up 6.0 Gbps (SStatus 133 SControl 300)     [    1.471504] ata3.00: ACPI cmd ef/10:06:00:00:00:00 (SET FEATURES) succeeded     [    1.471507] ata3.00: ACPI cmd f5/00:00:00:00:00:00 (SECURITY FREEZE LOCK) filtered out     [    1.471710] ata3.00: ACPI cmd b1/c1:00:00:00:00:00 (DEVICE CONFIGURATION OVERLAY) filtered out     [    1.472032] ata3.00: supports DRM functions and may not be fully accessible     [    1.472166] ata3.00: ATA-9: SAMSUNG MZ7PD128HAFV-000H7, SN, max UDMA/133     [    1.472359] ata3.00: 250069680 sectors, multi 1: LBA48 NCQ (depth 31/32), AA     [    1.472760] ata3.00: ACPI cmd ef/10:06:00:00:00:00 (SET FEATURES) succeeded     [    1.472761] ata3.00: ACPI cmd f5/00:00:00:00:00:00 (SECURITY FREEZE LOCK) filtered out     [    1.472762] ata3.00: ACPI cmd b1/c1:00:00:00:00:00 (DEVICE CONFIGURATION OVERLAY) filtered out     [    1.472920] ata3.00: supports DRM functions and may not be fully accessible     [    1.472946] ata3.00: configured for UDMA/133      I compared SATA power profiles on both OSes under `/sys/class/scsi_host/host(0-7)` and they set to **max_performance**. What else can I check on both OSes and configure Arch so that this failure message would go away? **Update 2** Looks like this issue only appears in newer kernels... I tried with Ubuntu Live CD 12.04, 13.10, and 14.04: I was able to see this issue in 14.04 but not in other 2 versions. I then run diff for the kernel config files but I can't figure out the exact change that affects me... Ubuntu 13.10 kernel config file Ubuntu 14.04 kernel config file


title: rsync from Mac ext hd to VPS works but not VPS to Mac

text: There are no errors with either `rsync -a /Volumes/hd/dir_foo foo@foo.com:~/` or `rsync -a foo@foo.com:~/dir_foo /Volumes/hd/dir_foo` in the first instance the synced folder on remote system CentOs successfully transfers. However, going the opposite way terminal just lists the contents but on Mac ext HD there is no folder or contents moved there. Practising rsync before attempting to save VPS to my local ext drive. This Is what it prints in terminal                  MyName-iMac:VPSbackups myname$ rsync -a root@mysite.net:~/testingrsync/test2.flv        root@mysite.net's password:         -rw-r--r--   661072538 2014/04/04 14:09:50 test2.flv      Is it because I have to declare the path of local folder not simply reside in it at command?


title: User permissions inside and outside of LXC containers?

text: I'm running some services inside of Docker LXC containers on my server and I'm beginning to actually do serious things with them. One thing I'm not clear on is how user permissions work inside and outside of the container. If, for example, I'm running MySQL in a container and have its data directory set to `/data`, which is a Docker volume, how do permissions inside and outside of the container affect access policies? Obviously, the idea is to run MySQL as its own user in the container (ie `mysql:mysql`) and give it read and write rights to that directory. I assume that this would be fairly straightforward, just `chmod`ing the directory, etc. But how does this work _outside_ of the container? Now that I have this Docker shared volume called 'data,' how do I manage access control to it? I'm specifically looking to be able to run an unprivileged user _outside_ of the Docker container which will periodically access the MySQL shared volume and backup the data. How can I setup permissions, users, and groups so that a specific user on the host can read/write files and folders in the Docker shared volume?


title: Difference between "eval" and "source /dev/stdin"

text: What is the difference between `eval` and `source /dev/stdin`? For example, we can run a list of commands in various ways like this.   1. with `eval`.              comd="ls"     eval "$comd"        2. with `source /dev/stdin`              printf "ls" | source /dev/stdin        3. with `source /dev/stdin` and `( )` or `{ }`              ( printf "ls" ) | source /dev/stdin     { printf "ls"; } | source /dev/stdin      (When we run `printf` in `{ }`, is there any benefit other than not using subshell?) **EDIT 1.** My question is,   1. What is the difference between the ways?   2. Which is more preferred?   3. If we run some commands in `()` or `{}`, which is more preferred?


title: Centralized logs for tomcat logs

text: We have 20 centos server and on each server we have 5 tomcats running. All time developer comes for logs so we are planning to keep all tomcat logs one URL so that Developer comes to that URL and check tomcat logs from there is there any way to check all server tomcat logs means catalina.out log from server or on URL


title: How can the Debian DVD .iso file be used to install software without a CD Drive or the Internet?

text: **Question Background:**   1. I donot have a CD-Drive   2. I downloaded Debian DVD Wheezy 64 Bit   3. Installed Basic Utilities + Desktop by usb boot   4. NOW I want to install more software **Problem:** `apt-get install vlc` It says insert dvd in DVD drive which i donot have. I mounted the iso file but didnot work. **I donot want use internet to download the software**. **Question:** How the iso file can be used to install software with out CD Drive & Internet???


title: /etc/init.d/ script starts during loads and crash the system

text: I have centos 6.4 machine. I created my own script using /etc/init.d/ . Below is the snippet which I took from the net and tried it. The problem now I notice which loading my os when this is loaded it start to work and it cant move to load all the whole os any more. What can I do as I cant access the system now.               #!/bin/bash     # chkconfig: 2345 95 05     # myapp daemon     # description: myapp daemon     # processname: myapp          DAEMON_PATH="/usr/local/bin/"     DAEMON=myap1.c     #DAEMONOPTS="-my opts"     NAME=myap1.c     DESC="my packet capture"          PIDFILE=/var/run/$NAME.pid     SCRIPTNAME=/etc/init.d/$NAME          case "$1" in     start)         printf "%-50s" "Starting $NAME..."         insmod /usr/local/pfring/kernel/pf_ring.ko         /usr/local/bin/myap1.c         #cd $DAEMON_PATH         #PID=`$DAEMON > /dev/null 2>&1 & echo $!`         #echo "Saving PID" $PID " to " $PIDFILE         #    if [ -z $PID ]; then         #        printf "%s\n" "Fail"         #    else         #        echo $PID > $PIDFILE         #        printf "%s\n" "Ok"         #    fi     ;;     status)             printf "%-50s" "Checking $NAME..."             if [ -f $PIDFILE ]; then                 PID=`cat $PIDFILE`                 if [ -z "`ps axf | grep ${PID} | grep -v grep`" ]; then                     printf "%s\n" "Process dead but pidfile exists"                 else                     echo "Running"                 fi             else                 printf "%s\n" "Service not running"             fi     ;;     stop)             printf "%-50s" "Stopping $NAME"                 PID=`cat $PIDFILE`                 cd $DAEMON_PATH             if [ -f $PIDFILE ]; then                 kill -HUP $PID                 printf "%s\n" "Ok"                 rm -f $PIDFILE             else                 printf "%s\n" "pidfile not found"             fi     ;;     restart)         $0 stop         $0 start      ;;     *)             echo "Usage: $0 {status|start|stop|restart}"             exit 1     esac


title: What are the advantages of the Unix file system structure

text: If I install an application in Linux for example Debian/Gnu Linux, the files of the applications are copied to many different directories in the file system. Some scripts goes into _/usr/share_ .. _/usr/local_ some other files into _/var_ .. _/log_ .. _etc/_ and so on. For me this is o.k because I learned something about the file system and most of the directories are there to hold files for a specific purpose. This fits very nice in the Unix philosophy "do one thing and do it well" But my question is **what are the advantages of such a directory structure?** Or is it simply the heritage of the old unix days. (e.g in comparison with the one windows use, where all files for an application are in one specific "folder")


title: Rm can't delete file

text: chmod 777  -R  /mnt       rm -rf /mnt/*            rm: cannot remove 'omitted': Read-only file system       rm: cannot remove 'omitted': Read-only file system        Please show me how I can do this?


title: Invoke git without loading user gitconfig

text: A git-interfaced tool written in Python breaks because of some settings in my local `~/.gitconfig`, namely `diff.noprefix=True`. I know that I can use something like `git -c diff.noprefix=False diff` in the call but I fear other things will break in other parts of the tool or on other setups. I have been looking for a `\--norc` or `-c /dev/null` parameter but didn't find my way in the documentation.


title: How to find the best monitor resolution and put it to work? Fedora

text: In this question I'm asking how to install a compatible driver to a Fedora machine, but, the main problem is a bad resolution. So, how can I find the best resolution to my monitor and put it to work? Please answer me with a complete solution or a successfully tutorial. Some system info is:               $ lspci | grep VGA     00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)          $ cat /etc/issue     Fedora release 17 (Beefy Miracle)     Kernel \r on an \m (\l)          $xandr      xrandr: Failed to get size of gamma for output default Screen 0: minimum 640 x 480, current 1280 x 1024, maximum 1280 x 1024 default connected 1280x1024+0+0 0mm x 0mm 1280x1024 76.0* 1024x768 76.0 800x600 73.0 640x480 73.0      **Edit** Looks like the main problema now is this output: **xrandr: Failed to get size of gamma for output default** Everything I try stops at this problem with the gamma. How can I solve this?


title: How to start a script file on boot?

text: I am running a stupid little minecraft server. I want Lubuntu to execute the following script when the server boots up. NOT on login, and NOT on restart (unless it's starting up of course). The script is currently located in:               /home/mc/server/craftbukkit.sh      I can manually launch the script by just going into the dir and typing `./craftbukkit.sh`. But I want to fire off the script when the machine boots.


title: Resetting password in Linux Mint when disk is encrypted

text: I have a system (VM, actually) with Linux Mint 15 on it. The disk is encrypted, but I remember that password -- just not the password for my account. I've tried changing the command in GRUB from `ro` to `rw init=/bin/bash`, per guides online, but that doesn't seem to play nicely with the disk encryption. Is there a way to decrypt the disk, then drop straight to a root prompt (in order to use `passwd`)?


Shell: Break both if and for loop at once. My script: ip to name resolve code               IP=192.168.27.191     hostNameChecker()     {         if [ `getent hosts $1 | wc -l` -ne 0 ];then             HOST_NAME=`hostname`             DNS_IP=`getent hosts $1 | cut -d " " -f 1 | sed 's/^[ \t]*//;s/[ \t]*$//'`             DNS_NAMES=`getent hosts $1 | cut -d " " -f 2- | sed 's/^[ \t]*//;s/[ \t]*$//'`             for DNS_NAME in ${DNS_NAMES[@]}              do                 if [[ "$DNS_NAME" == "$HOST_NAME" ]];then                         echo "Host name:$HOST_NAME and DNS_NAME:$DNS_NAME matched"                         break 2;########Not working. only brakes inner for not outer if                      else                         continue;                     fi             done                 echo "ERROR: Mismatch between DNS:$DNS_NAMES and Hostname:$HOST_NAME"                 exit 0           fi     }     hostNameChecker $IP      In the above script **break 2** only breaks inner for not outer if. I can add another if to solve it but is there any other possible way ???


title: apt-get script to update upgrade dist-upgrade clean and autoremove

text: I wrote this script,               #!/bin/bash     # if not root, run as root     if (( $EUID != 0 )); then         sudo /home/jb/bash/update.sh         exit     fi     apt-get update     apt-get -y upgrade     apt-get -y dist-upgrade     apt-get clean     apt-get -y autoremove      the goal being to have a one-stop-shop for updating everything and removing any unnecessary packages. Is the above sufficient? Is there anything redundant or unnecessary about it? Any dangers/cautions that need to be considered? Other (fill in the blank)? Edit: If I only use the built in Ubuntu 12.04 Update Manager, do things get cleaned and autoremoved?


title: Is `UDIF read/write image` bootable on non-Apple hardware?

text: Some guides on the internet suggest that it is possible to convert ISO disc image files (`.iso`) into an non-.iso image format (`.img` or `.dmg`) with `hdiutil` on OS X. However, the manual page for `hdiutil` says that it basically only supports conversion into several `UDIF` formats. Are images in the `UDIF` format bootable on non-Apple hardware? Wikipedia claims that UDIF, Universal Disc Image Format, is an Apple proprietary format, giving you the impression that it's not compatible with third-party hardware.


title: Specify MIME type to CUPS's lpr command

text: It seems when you pass a file to `lpr` (or pipe to it), it attempts to guess the MIME type. Sometimes, however, it guesses wrong—and then attempts to print something "interesting" at best. Is there a way to manually override the MIME type?


title: Can't mount external USB driver - on Ubuntu 12.04

text: When I plug in external usb driver I saw next prompt:               Error mounting: mount exited with exit code 1: helper failed with:     Unprivileged user can not mount NTFS block devices using the external FUSE     library. Either mount the volume as root, or rebuild NTFS-3G with integrated     FUSE support and make it setuid root. Please see more information at     http://tuxera.com/community/ntfs-3g-faq/#unprivileged      This is my current `sudo fdisk -l`:               nazar_art@nazar-desctop:~/Desktop/Big JAVA/bj4_code/ch24/time$ sudo fdisk -l          Disk /dev/sda: 160.0 GB, 160041885696 bytes     255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors     Units = sectors of 1 * 512 = 512 bytes     Sector size (logical/physical): 512 bytes / 512 bytes     I/O size (minimum/optimal): 512 bytes / 512 bytes     Disk identifier: 0x000e28b8             Device Boot      Start         End      Blocks   Id  System     /dev/sda1   *        2048   310484991   155241472   83  Linux     /dev/sda2       310487038   312580095     1046529    5  Extended     /dev/sda5       310487040   312580095     1046528   82  Linux swap / Solaris          Disk /dev/sdb: 1015 MB, 1015808000 bytes     31 heads, 32 sectors/track, 2000 cylinders, total 1984000 sectors     Units = sectors of 1 * 512 = 512 bytes     Sector size (logical/physical): 512 bytes / 512 bytes     I/O size (minimum/optimal): 512 bytes / 512 bytes     Disk identifier: 0x00000000             Device Boot      Start         End      Blocks   Id  System     /dev/sdb1   *          31     1983999      991984+   6  FAT16          Disk /dev/sdd: 7751 MB, 7751073792 bytes     255 heads, 63 sectors/track, 942 cylinders, total 15138816 sectors     Units = sectors of 1 * 512 = 512 bytes     Sector size (logical/physical): 512 bytes / 512 bytes     I/O size (minimum/optimal): 512 bytes / 512 bytes     Disk identifier: 0xc3072e18             Device Boot      Start         End      Blocks   Id  System     /dev/sdd1   *          63    15138815     7569376+   7  HPFS/NTFS/exFAT      And `gksudo gedit /etc/fstab`:               # /etc/fstab: static file system information.     #     # Use 'blkid' to print the universally unique identifier for a     # device; this may be used with UUID= as a more robust way to name devices     # that works even if disks are added and removed. See fstab(5).     #     # <file system> <mount point>   <type>  <options>       <dump>  <pass>     proc                                       /proc           proc  nodev,noexec,nosuid         0  0       # / was on /dev/sda1 during installation     UUID=5f5d330f-d5f2-4157-9496-94f1dce2f181  /               ext4  errors=remount-ro           0  1       # swap was on /dev/sda5 during installation     UUID=84747ef4-6f50-49bc-9df1-fcba364ba299  none            swap  sw                          0  0            /dev/fd0                                   /media/floppy0  auto  rw,user,noauto,exec,utf8    0  0       /dev/sdc1                                  /media/sdc1     auto  uid=1000,noauto,users,exec  0  0       /dev/sdd1                                  /media/sdd1     auto  uid=1000,noauto,users,exec  0  0       /dev/sdb1                                  /media/sdb1     auto  uid=1000,noauto,users,exec  0  0      **Update:** Checked if is installed `ntfs-3g`:               nazar_art@nazar-desctop:~$ dpkg -s ntfs-3g     Package: ntfs-3g     Status: install ok installed     Priority: optional     Section: otherosfs     Installed-Size: 1422     Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>     Architecture: amd64     Version: 1:2012.1.15AR.1-1ubuntu1.2     Replaces: libntfs-3g75, ntfsprogs     Depends: debconf (>= 0.5) | debconf-2.0, libc6 (>= 2.14), libfuse2 (>= 2.8.1), libgcrypt11 (>= 1.4.5), libgnutls26 (>= 2.12.6.1-0), initramfs-tools (>= 0.99), initscripts (>= 2.88dsf-13.3)     Pre-Depends: multiarch-support, fuse     Conflicts: libntfs-3g75, ntfsprogs (<< 1:2011.10.9AR.1-3~)     Description: read/write NTFS driver for FUSE      NTFS-3G uses FUSE (Filesystem in Userspace) to provide support for the NTFS      filesystem used by Microsoft Windows. It can:      .       * create, remove, rename, or move files, directories, hard links, and streams;       * read and write files, including streams, sparse files, and transparently         compressed files;       * handle special files like symbolic links, devices, and FIFOs;       * provide standard management of file ownership and permissions, including         POSIX ACLs.      .      This package also contains the tools previously available in the ntfsprogs      package.     Homepage: http://www.tuxera.com/community/ntfs-3g-advanced/     Original-Maintainer: Daniel Baumann <daniel.baumann@progress-technologies.net>      Figuring out exactly usb drive through **_lsblk_** :               nazar_art@nazar-desctop:~$ lsblk     NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT     sda      8:0    0 149.1G  0 disk      ├─sda1   8:1    0 148.1G  0 part /     ├─sda2   8:2    0     1K  0 part      └─sda5   8:5    0  1022M  0 part [SWAP]     sdb      8:16   1   7.2G  0 disk      └─sdb1   8:17   1   7.2G  0 part      sdc      8:32   1 968.8M  0 disk      └─sdc1   8:33   1 968.8M  0 part /media/sdc1     sr0     11:0    1  1024M  0 rom      It's sdb1 - this external usb drive. Tried again manually mount:               nazar_art@nazar-desctop:~$ sudo mount /media/sdb1     [sudo] password for nazar_art:      The disk contains an unclean file system (0, 0).     The file system wasn't safely closed on Windows. Fixing.      Now all is visible. **_- Why this happen?   - How to solve this issue?_**


title: Gnome Shell shortcut directly to Workspace List overlay?

text: Is there a way in `Gnome Shell` to define a shortcut that will bring up the `Overview` such that the `Workspace List` is already showing and available for clicking -- similar to the viewport selector in `Compiz`? Note: I'm using Gnome's terminology for this question. I have recently (been forcibly) migrated to Gnome 3/Gnome Shell on RHEL7 (from Gnome 2/Compiz on Ubuntu 10). As I can't function without 9 virtual workspaces in a 3x3 layout, the loss of Gnome Panel and Gnome Workspace Switcher has been painful. However, I've found a number of Extensions/tools that have made the experience tolerable. These include   * Workspace Grid, which transforms the Workspace List into a 2-D grid (both conceptually and in the Workspace List overlay)   * `dconf-editor`, which reveals that keyboard shortcuts can be assigned for instantaneous switching to up to 12 workspaces All I'm missing now is a **quick** way to view all of my workspaces at once (a la `Compiz`) and select any of them with my mouse. (Yes, I can switch to any workspace I want with the keyboard, but sometimes I prefer to use the mouse.) My current approach is to either   * bring up the `Overview` in `Windows` mode using the "hot corner" or the shortcut `org.gnome.desktop.wm.keybindings.panel-main-menu` and then move my mouse to the right edge of the screen to un-hide the `Workspace List`, or   * bring up the `Overview` in `Applications` mode using shortcut `org.gnome.shell.keybindings.toggle-application-view` and then hit `Esc` to reveal both the `Windows` and `Workspace List` overlays. Both of these approaches require more key presses and/or mouse movement than was necessary with `Compiz`. I did find two other Extensions that _almost_ do what I need:   * WorkspaceBar, which adds a clickable 1-D workspace selector (but no overview, although the bar does behave like an additional "hot corner")   * Frippery Bottom Panel, which adds a quasi-2-D workspace selector (but the interface is actually clumsier to use than that of `WorkspaceBar`, and again no overview) Any suggestions on how to go straight to the `Workspace List` overlay?


title: Upgrading Debian Squeeze to Wheezy - Should updatedb.conf be kept or replaced?

text: A similar question to Upgrading Debian Squeeze To Wheezy - Should conf' files be kept or replaced?, but in my case it concerns a different conf file and I am not on Linode. I am upgrading a VMWare virtual machine that I intend to use as a server, from Debian 6 to Debian 7. The Squeeze install has been done by the company that provides the machine. Besides the possible customizations they _may_ have done, I haven't done any customization or installs at all. In any case, I updated my `/etc/apt/sources.list` and I did `apt-get update; apt-get dist-upgrade`, during the process of which, I get the following prompt:               Configuration file `/etc/updatedb.conf'     ==> Modified (by you or by a script) since installation.     ==> Package distributor has shipped an updated version.        What would you like to do about it ?  Your options are:         Y or I  : install the package maintainer's version         N or O  : keep your currently-installed version           D     : show the differences between the versions           Z     : start a shell to examine the situation      The default action is to keep your current version.     *** updatedb.conf (Y/I/N/O/D/Z) [default=N] ?      on which I chose `D` and the output is:               --- /etc/updatedb.conf  2011-06-06 16:32:11.000000000 +0200     +++ /etc/updatedb.conf.dpkg-new 2010-09-25 10:12:26.000000000 +0200     @@ -1,4 +1,4 @@      PRUNE_BIND_MOUNTS="yes"      # PRUNENAMES=".git .bzr .hg .svn"      PRUNEPATHS="/tmp /var/spool /media"     -PRUNEFS="NFS nfs nfs4 rpc_pipefs afs binfmt_misc proc smbfs autofs iso9660 ncpfs coda devpts ftpfs devfs mfs shfs sysfs cifs lustre_lite tmpfs usbfs udf fuse.glusterfs fuse.sshfs vmhgfs"     +PRUNEFS="NFS nfs nfs4 rpc_pipefs afs binfmt_misc proc smbfs autofs iso9660 ncpfs coda devpts ftpfs devfs mfs shfs sysfs cifs lustre_lite tmpfs usbfs udf fuse.glusterfs fuse.sshfs curlftpfs"      Any suggestions on what these mean and what I should do?


title: Preventing a specific space from being expanded in a variable

text: In bash how do you avoid a specific space from being expanded in a variable? Lets say I have this               JAVA_OPTS="-Xmx1g"     JAVA_OPTS="$JAVA_OPTS -XX:OnError='/path/to/a/script.sh %p'"          function args() {         printf "%d :" $#         printf " <%s> " $@         echo     }          args $JAVA_OPTS      You get this               3 : <-Xmx1g> <-XX:OnError='/path/to/a/script.sh> <%p'>      I would like this               2 : <-Xmx1g> <-XX:OnError='/path/to/a/script.sh %p'>


title: What command in bash to search for this string?

text: `file.txt` contains:               aa=testing     sss=whoiam     bbb=findme      What command do I use to search for testing and print it? Expected result:               # you search testing


title: Which Ubuntu GUI should I install?

text: I am trying to select a GUI for Ubuntu. If I just asked which one is best, I'd probably get a religious debate until the question was closed. But I'm asking which is the best fit for my needs, so here's a list of background details:   * I just bought a used laptop (Intel Core 2 Duo, 2.1 GHz, 3 GB memory, 150 GB disk to run Unix.   * I'll be using it almost exclusively for programming. I mostly use C/C++ and Java now, but I'll probably learn Python, and maybe Go if it takes off.   * I plan to install Ubuntu on it because it's the distribution that's most widely used among people I know.   * I am comfortable with the Windows 7 and Windows XP user interfaces (but I find Windows 8 annoying enough that I installed Classic Shell and Charm Killer so it looked like 7).   * Aside from system administration and programming on some Sun and Silicon Graphics workstations in the early 1990s, I've done most of my programming (and application use) on Windows. I've done C/C++ with Visual Studio and Borland (all sorts of programming), and Java with Eclipse (mostly Blackberry and plain Java, and a little Android) on Windows.   * I may also use the machine as an extra back-up server for Crash Plan, assuming the laptop doesn't need anything more than a spare external drive to run it.   * I don't need to run any non-programming applications other than a browser on the laptop, because I can do that on other computers. So, given my familiarity with the Windows user interface, the constraints of the five-year-old laptop, and my intended use, ~~which Ubuntu user interface am I most likely to find reasonably easy to use?~~ which Ubuntu user interfaces are most widely used by people switching from software development on Windows? ~~Also, although I found Eclipse perfectly reasonable for Java development, I don't like it much for C++. I could go back to command line, but I wouldn't mind suggestions for an IDE that plays nicely with C++. (I've heard good things about Code Blocks, but I haven't fooled with it yet.)~~ I welcome further comments to help narrow down the scope of the question, if I'm missing anything important.


title: Enable suspend in linux mint in a dell xps-17

text: In my vain attempt to get hibernation working in a dell xps-17 by installing (I'm seriously considering getting a mac cause it just works) a hibernate package I have lost my ability to suspend. How to I get suspend back at least cause it makes moving around a PITA?


title: Where to emit hardware events?

text: What is the most common way to emit events from hardware sensors? Use ACPI events, send signals via DBUS? My goal is compatibility so other apps can easily use those inputs. What is the Cleanest solution?


title: Identify and assign most recent file to shell variable

text: I have a directory of `.jpg` files that continuously grows. I want to copy the most recent one elsewhere. This is what I currently have and it works, just curious if there's a better way to identify the most recent jpg file rather than using `ls` and `tail`.               #!/bin/bash     cd /home/pi/JPGS     fn=$(ls -rt1 | tail -1)     mv -f $fn /home/pi/WWW/webpic.jpg


title: Email Sent via root@domain.com despite modifying /etc/aliases

text: First, here are the entries I added/modified in **/etc/postfix/main.cf** file:               mydomain = domain.com     myorigin = $mydomain     relayhost = email-smtp.us-east-1.amazonaws.com:25     smtp_sasl_auth_enable = yes     smtp_sasl_security_options = noanonymous     smtp_sasl_password_maps = hash:/etc/postfix/sasl/amazon-ses     smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt     smtp_use_tls = yes     smtp_tls_security_level = encrypt     smtp_tls_note_starttls_offer = yes     header_checks = regexp:/etc/postfix/header_checks      Now, if I send a test mail like so...               $ sudo sendmail someone@gmail.com     To: someone@gmail.com     From: noreply@domain.com     Subject: Test email!     This is just a test email.     .      and check the mail log ( **/var/log/mail.log** ), I see this:               Feb 17 04:23:16 hostname postfix/pickup[6226]: B3DD4137ED: uid=0 from=<root>     Feb 17 04:23:16 hostname postfix/cleanup[6230]: B3DD4137ED: replace: header From: noreply@domain.com from local; from=<root@domain.com> to=<someone@gmail.com>: From: "WebsiteName Alerts (no reply)" <noreply@domain.com>     Feb 17 04:23:16 hostname postfix/cleanup[6230]: B3DD4137ED: message-id=<20130217042316.B3DD4137ED@hostname.domain.com>     Feb 17 04:23:16 hostname postfix/qmgr[6144]: B3DD4137ED: from=<root@domain.com>, size=353, nrcpt=1 (queue active)     Feb 17 04:23:18 hostname postfix/smtp[6232]: B3DD4137ED: to=<someone@gmail.com>, relay=email-smtp.us-east-1.amazonaws.com[107.22.250.234]:25, delay=25, delays=24/0.03/0.93/0.58, dsn=2.0.0, status=sent (250 Ok 0000013ce6644ae6-69927d25-c4e1-4f25-8ad4-b85b59318e84-000000)     Feb 17 04:23:18 hostname postfix/qmgr[6144]: B3DD4137ED: removed      As you can see, the log shows both `root@domain.com` and `noreply@domain.com` as `from` even though I specifically stated `noreply@domain.com` in the `sendmail` command. That too, despite modifying my **/etc/aliases** file like so:               # /etc/aliases     mailer-daemon: noreply@domain.com     postmaster: noreply@domain.com     nobody: noreply@domain.com     hostmaster: noreply@domain.com     usenet: noreply@domain.com     news: noreply@domain.com     webmaster: noreply@domain.com     www: noreply@domain.com     ftp: noreply@domain.com     abuse: noreply@domain.com     noc: noreply@domain.com     security: noreply@domain.com     root: noreply@domain.com      So, the question is, how do I make `noreply@domain.com` the default email address-out for the system? Put it the other way, how do I change the email address of root user from `root@domain.com` to `noreply@domain.com`? In case this matters, my system's running Debian 7 (Wheezy) 64-bit.


title: GUI for newsbeuter?

text: Is there a GUI for the feed reader newsbeuter? Or would there be an easy way to create one for it? Or is there any other graphical feed reader that could use the `cache.db` database (SQLite) of newsbeuter?


title: google chrome tray icon broken in gnome 3.6

text: ![enter image description here](http://i.stack.imgur.com/GRmw5.jpg) Google Chrome starts up with the correct tray icon but when restarted it has the broken tray icon. Has anyone filed a bug report about this? And is there any workaround at present?


title: How to sed two same value without affecting the other

text: I have an xml file and I want to change one value on that file:               param name=swam_license_ports_overdraft_thresh          99          param name="strike_license_ports_overdraft_thresh"          99      The outcome I want is to sed the value 99 to 90 under param name=swam_license_ports_overdraft_thresh and the other value 99 under param name="strike_license_ports_overdraft_thresh" should not be changed.


title: IPTables string match redirection

text: **The issue:** I am currently redirecting port 80 requests to another system on port 1000. **This is done like so:**               iptables -t nat -A PREROUTING ! -s 172.20.1.2 -p tcp --dport 80 -j DNAT --to-destination 172.20.1.2:1000      However, when adding `-m string --algo kmp --string 'MSIE'` to filter packets with MSIE in them, they are being ignored due the prerouting only evaluating the first SYN packet(therefore missing the HTTP packets with the headers I am trying to evaluate) **The broken rule:**               iptables -t nat -A PREROUTING ! -s 172.20.1.2 -p tcp --dport 80 -j DNAT --to-destination 172.20.1.2:1000 --algo kmp -m string --string 'MSIE'      **My Question:** How can I evaluate the HTTP Headers and redirect the packet or fire off a system event when a string match occurs?


title: Resuming ddrescue always restarts at first retry?

text: I'm using `ddrescue` to make an image of a faulty harddrive. I followed a tutorial that used the `-r3` and `logfile` option. After a few hours, the tool made one pass and tried to read the bad sectors on the second. I had to `Ctrl`+`C` because I went sleeping and didn't want to leave the computer running. Now whenever I resume, `ddrescue` restarts at the first pass instead of the second. Is that normal? Can I assume that the image is done and the tool just tries to save some of the bad sectors listed in the logfile?


title: Guest VMs unable to ping each other within a custom host-only network in vmware workstation

text: I have created a custom host only network VMNet2 (without dhcp) in VMware workstation and connected my three VMs with this network. But the problem is: I cannot ping any VM from any other VM. However I can ping the host VMNet2 adapter from the guest. I checked the `route` in my guest VMs everything is fine there. I tried to take `tcpdump` for the ping and found that arp request for the destination guest did not get response. Can anyone explain about this? My VMware worksation is installed on Windows 7 and I used Ubuntu 12.04 as guest VMs. Following are my network configurations:               Guest 1 : IP 192.168.91.2 netmask 255.255.255.0     Guest 2 : IP 192.168.91.3 netmask 255.255.255.0        Guest 1 : IP 192.168.91.4 netmask 255.255.255.0      Guest can ping Host machine with VMNet2 adapter id 192.168.91.1, but guest VMs cannot ping each other.


title: Redirect domains to different ports on same machine

text: I used the following command to redirect `80` to `3000`. All the requests that come, from any domain, are redirected to `3000`:               sudo iptables -t nat -I PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 3000      Having to processes: one that listens on `80001` and another one that listens on `8002` how can I link two domains to the two ports? Is it possible to have a JSON configuration like below?               [         {            "port": 8001,            "domains": ["example.com", "example2.com"]          },         {            "port": 8002,            "domains": ["domain.com", "domain2.com"]          }     ]      So, `domain.com`, `domain2.com` will send their requests to the process that listens on `8002` and the other two domains on `8001`?


title: How to see process created by specific user in Unix/linux

text: I want to see list of process created by specific user or group of user in Linux Can I do it using `ps` command or is there any other command to achieve this?


title: Patching and Compiling my Kernel

text: So I have an issue with my USB 2.0 ports and I believe I have found a solution for it, which is in the below link. https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1210858/comments/32 I have downloaded the latest version of the stable Kernel from https://www.kernel.org/. I have extracted the files of the Kernel and am ready to apply changes to the quircks.c file but I'm not exactly sure how to do it based on the solution contained in the link above. Can someone guide me on how to do this?


title: Git pull in a linux environment changes the owner of the files

text: I am not sure if this is the proper forum to ask the question, but here it goes: Why will everytime I execute a `git pull` on my live server, the owner of the files be changed? I keep on manually doing a `chown john:john index.php`. What do I need to change so that, when I do a `git pull`, the owner of the files will be automatically be or stay `john`.


title: port being in use not displayed in netstat output

text: In what scenarios port being used by a process don't show up in `netstat -a` output. I'm running `jenkins` on my machine. It's listening on port 8080. I'm trying to start another process that tries to bind on same port and it fails with error that port is already in use. Now when I do `netstat -a | grep 8080`, it doesn't show up in output. After stopping `jenkins` my process successfully bound to 8080. Any clues what happening? I'm running CentOS.


title: Why can't I chmod these files that I could earlier?

text: I was trying to add execute permissions to sh files in a folder. For that I mistakenly used: `find . -print0 -iname '*.sh' | xargs -0 chmod -v 744` and the output was :               mode of `.' changed from 0755 (rwxr-xr-x) to 0744 (rwxr--r--)     mode of `./codis.sh' changed from 0644 (rw-r--r--) to 0744 (rwxr--r--)     mode of `./ne fil.sw' changed from 0644 (rw-r--r--) to 0744 (rwxr--r--)     mode of `./.whois1.sh.swo' changed from 0644 (rw-r--r--) to 0744 (rwxr--r--)     mode of `./new file' changed from 0644 (rw-r--r--) to 0744 (rwxr--r--)     mode of `./ezik.sh' changed from 0644 (rw-r--r--) to 0744 (rwxr--r--)     mode of `./.whois1.sh.swp' changed from 0600 (rw-------) to 0744 (rwxr--r--)     mode of `./whois1.sh' retained as 0744 (rwxr--r--)      I now know that the correct usage for the find part was `find . -iname '*.sh' -print0` So I created another find like so: `find . \\! -iname '*.sh' -print0 | xargs -0 chmod 600` so that I may set back the permissions for non-sh files (yes, I see that some files have 644 perms, not 600 but it does not matter now). The output for this command is :               chmod: cannot access `./ne fil.sw': Permission denied     chmod: cannot access `./.whois1.sh.swo': Permission denied     chmod: cannot access `./new file': Permission denied     chmod: cannot access `./.whois1.sh.swp': Permission denied      I used `sudo` too but still nothing... I see I do not understand permissons properly... If I understand correctly I need `x` permisions for directory `direc` too in order to execute commands in said directory.


title: Why does the 'bin' user need a login shell?

text: During an audit of `/var/log/auth.log` on one of my public webservers, I found this:               Jan 10 03:38:11 Bucksnort sshd[3571]: pam_unix(sshd:auth): authentication failure;          logname= uid=0 euid=0 tty=ssh ruser= rhost=61.19.255.53  user=bin     Jan 10 03:38:13 Bucksnort sshd[3571]: Failed password for bin from 61.19.255.53          port 50647 ssh2      At first blush, this looks like typical `ssh` login spam from random hackers; however, as I looked closer I noticed something else. Most failed `/var/log/auth.log` entries say `invalid user` in them, like this one:               Jan  9 10:45:23 Bucksnort sshd[3006]: Failed password for invalid user sales          from 123.212.43.5 port 10552 ssh2      The disquieting thing about that failed login message for `bin` is that it is a _valid user_ in `/etc/passwd` that even has a login shell:               [mpenning@Bucksnort ~]$ grep ^bin /etc/passwd     bin:x:2:2:bin:/bin:/bin/sh      I thought I had covered the all the default usernames that could login remotely when I disabled `PermitRootLogin` in `/etc/ssh/sshd_config`; discovering this entry opened new possibilities in my paranoid mind. If somehow services ran under `bin`, then it is remotely possible that someone could somehow insert an ssh key into the `bin` user's directory from a running service on the box, so I would like to completely disable login for the `bin` user, if possible. ## Questions   * This server is remote, and expensive to fix (i.e. I will pay for remote hands to hook up a KVM, plus KVM rental). I am trying to figure out what I might break if I change the `/etc/passwd` entry for `bin` to look like this: `bin:x:2:2:bin:/bin:/bin/false`   * I ran the following commands trying to figure out what `bin` is needed for... However, these commands came up with no files and I could find no processes owned by `bin`. What does the `bin` user do anyway? `$ sudo find / -group bin` `$ sudo find / -user bin`   * Are there any other users that should get their login shells set to `/bin/false`? FYI, I have already have `/bin/false` on `www-data`.   * Am I being too paranoid? I am running Debian, if that matters.


title: How to understand the filesystem concepts used by encfs?

text: I do not hold a deep understanding of computer science concepts but would like to learn more about how the utility **_encfs_** works. I have a few question regarding the concept of filesystem in regards to **encfs**. It is said that encfs is a cryptographic filesystem wiki link. 1)To encrypt the files **encfs** is moving around blocks of the files to be encrypted, so am I correct to see this 'scrambled' version of the files as a new perspective which justifies the term of a new filesystem? 2)In the man pages of **encfs** in the section **CEVEATS** link to man of **encfs** online, it says that **encfs** is not a true file system. How should I understand this? Is that because some necessary features common to all file systems is missing in **encfs** ' file system? Or is because of some other more substantial reason? 3)The man pages say that it creates a _virtual encrypted file system_. There are two questions here; what is it that makes it virtual is it that it is a file system within a file system? and the encrypted is that there is not a straight forward way to map the file blocks into a format to be read by other programs? 4)How does the command **_fusermount_** relate to encfs?


title: SSH HTTP Tunnelling

text: I am trying to set up an SSH account on my server for someone, and I only want to give them access to tunneling internet traffic. I set their user's "shell" to /bin/true, so now when they SSH (and use -N), the tunnel works with no shell (this is what I want). Now, I was wondering if there was a way to only allow web browsing traffic through (and not bittorrent, email, etc). In sshd_config, I tried:               PermitTunnel yes     PermitOpen any:80      But that doesn't allow any traffic through for some reason. Is there a way I can make it so the person can only use, for example, a web browser through my tunnel? Thanks, I can supply any information you need. The server is running Fedora 15, and I know how to use Linux so I don't need baby instructions. PS: Additionally, is it possible to log the activity of an SSH tunnel? Like, to see what information goes through it? I know /var/log/secure has the login logs (although, with /bin/true instead of /bin/bash, logins don't show up), but not activity logs.


title: Script to check a folder, print the files then delete those files

text: I am looking for some guidance on creating a script that will check a specific folder, print all documents (if any) and then delete those documents. I would also like to run this script as a cron job. The reason I am looking to do this is because I currently have a PHP webapp that creates pdf invoices on the fly and saves them in a certain folder, but I have no way of automatically printing these documents from the web (I imagine for security/spam issues). I am no language preference but would ideally like the script to be able to control how many copies are printed, which tray to use in the printer etc.


title: How to migrate from Microsoft Exchange to Postfix, Dovecot, z-push, etc

text: After learning how to setup email on a Linux system, are there guides on how to migrate from Microsoft Exchange to Postfix, Dovecot, z-push, etc... ?


title: What could cause strange behavior in file(1) command?

text: What could cause `file(1)` command to output `application/msword application/msword` (yes, twice in a row) as the mime type for _some_ of the .doc files? Normally it prints just `application/msword`. If run without `\--mime` it prints `Microsoft Office Document` on both 'normal' and 'special' .doc files.


title: Port configuration does not work as exptected

text: I have a Router and four computer connected as the local network. IPs:               Router(192.168.8.1)(internet ip:125.119.203.127)           server1(192.168.8.3)           my computer(192.168.8.8)           ......      The `server1` runs on the RedHat Linux which is set to use the port-redirect, to redirect port 80 to 8081. While the tomcat in this server use the port 8081.               [root@server1 bin]# iptables -t nat -vnL     Chain PREROUTING (policy ACCEPT 3169 packets, 274K bytes)      pkts bytes target     prot opt in     out     source               destination         4   208 REDIRECT   tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           tcp dpt:222 redir ports 22       221 14971 REDIRECT   tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           tcp dpt:80 redir ports 8081          Chain POSTROUTING (policy ACCEPT 2253 packets, 141K bytes)      pkts bytes target     prot opt in     out     source               destination          Chain OUTPUT (policy ACCEPT 2252 packets, 140K bytes)      pkts bytes target     prot opt in     out     source               destination      Now in my computer, I can access the site in the local network use browser:               http://192.168.8.3     http://192.168.8.3:8081      The Router is configurated to redirect the port 80 to port 80 on `192.168.8.3` But I can not access the site using the internet address:               http://125.119.203.127      Normally, this request should be dispatched to `server1` 192.168.8.3:80, then `server1` will redirect to port 8081. Then I change the configuration of the Router, to redirect the port 80 to port 80 on my computer. Then I can access: `http://125.119.203.127` So what is the problem?


title: Do rndc keys expire after a year?

text: Yesterday, I noticed an error in a bind zone file, and after correcting it, I tried to restart bind9, but the service refused to stop, displaying this error:               rndc: connect failed: 127.0.0.1#953: connection refused      I found a lot of references to this error message, with no obvious fixes, but there were a lot of references to rndc.key and rndc-confgen. I noticed that the date on the existing rndc.key was exactly one year from the day before I had this problem. I knew I hadn't restarted bind in the meantime, so I thought that the key had expired. I generated a new key with rndc-confgen -a. I had to force a restart, as I couldn't stop the bind service; since then, bind has been working fine The obvious conclusion is that rndc.key expires after a year. I have not found this mentioned in the man pages or documentation for bind9 that I've checked, and I would think it was an important point if true. Can anyone confirm if this is the standard, or if there's some way to configure the expiration date?


title: How to copy from one vim instance to another using registers

text: How can I select the `+` register? I have problems following the instructions below to copy/paste text from vim to another vim:               In the vim, highlight, select + register, and yank (save) to it:     Shift-v     "+y          In the second vim, select + register, and paste from it:     "+p      I think I'm pressing the wrong keys. When it says `"+y`, do I simply hit the keys `"`, `+`, `y` in sequence? (That is, `Shift`+`'`, `Shift`+`=`, `y`). It does not work for me. I am using Red Hat and vim in an X11 terminal. And vim version is               $vim --version | grep xterm_clipboard     -xterm_clipboard -xterm_save


title: Sendmail authentication

text: when I try to send email from my new system: Distributor ID: Scientific Description: Scientific Linux release 6.4 (Carbon) Release: 6.4 Codename: Carbon with sendmail Version 8.14.4 I have this error message on maillog:               Jul 1 12:17:43 server5 sendmail[5806]: NOQUEUE: connect from localhost.localdomain [127.0.0.1]     Jul 1 12:17:43 server5 sendmail[5806]: AUTH: available mech=DIGEST-MD5 ANONYMOUS GSSAPI PLAIN CRAM-MD5 LOGIN, allowed mech=EXTERNAL GSSAPI KERBEROS_V4 DIGEST-MD5 CRAM-MD5     Jul 1 12:17:43 server5 sendmail[5806]: r61AHhHH005806: Milter: no active filter     Jul 1 12:17:43 server5 sendmail[5806]: r61AHhHH005806: --- 220 server5.eda ESMTP Sendmail 8.14.4/8.14.4; Mon, 1 Jul 2013 12:17:43 +0200     Jul 1 12:17:43 server5 sendmail[5806]: r61AHhHH005806: --- 421 4.4.1 server5.eda Lost input channel from localhost.localdomain [127.0.0.1]     Jul 1 12:17:43 server5 sendmail[5806]: r61AHhHH005806: localhost.localdomain [127.0.0.1] did not issue MAIL/EXPN/VRFY/ETRN during connection to MTA     Jul 1 12:17:43 server5 sendmail[5807]: NOQUEUE: connect from server5 [192.168.1.12]     Jul 1 12:17:43 server5 sendmail[5807]: AUTH: available mech=DIGEST-MD5 ANONYMOUS GSSAPI PLAIN CRAM-MD5 LOGIN, allowed mech=EXTERNAL GSSAPI KERBEROS_V4 DIGEST-MD5 CRAM-MD5     Jul 1 12:17:43 server5 sendmail[5807]: r61AHhhS005807: Milter: no active filter     Jul 1 12:17:43 server5 sendmail[5807]: r61AHhhS005807: --- 220 server5.eda ESMTP Sendmail 8.14.4/8.14.4; Mon, 1 Jul 2013 12:17:43 +0200     Jul 1 12:17:43 server5 sendmail[5807]: r61AHhhS005807: <-- EHLO 192.168.1.12     Jul 1 12:17:43 server5 sendmail[5807]: r61AHhhS005807: --- 250-server5.eda Hello server5 [192.168.1.12], pleased to meet you     Jul 1 12:17:43 server5 sendmail[5807]: r61AHhhS005807: --- 250-ENHANCEDSTATUSCODES     Jul 1 12:17:43 server5 sendmail[5807]: r61AHhhS005807: --- 250-PIPELINING     Jul 1 12:17:43 server5 sendmail[5807]: r61AHhhS005807: --- 250-8BITMIME     Jul 1 12:17:43 server5 sendmail[5807]: r61AHhhS005807: --- 250-SIZE     Jul 1 12:17:43 server5 sendmail[5807]: r61AHhhS005807: --- 250-DSN     Jul 1 12:17:43 server5 sendmail[5807]: r61AHhhS005807: --- 250-ETRN     Jul 1 12:17:43 server5 sendmail[5807]: r61AHhhS005807: --- 250-AUTH GSSAPI DIGEST-MD5 CRAM-MD5     Jul 1 12:17:43 server5 sendmail[5807]: r61AHhhS005807: --- 250-DELIVERBY     Jul 1 12:17:43 server5 sendmail[5807]: r61AHhhS005807: --- 250 HELP     Jul 1 12:17:43 server5 sendmail[5807]: r61AHhhS005807: <-- AUTH DIGEST-MD5     Jul 1 12:17:43 server5 sendmail[5807]: r61AHhhS005807: --- 334 bm9uY2U9ImxFUmRaUEh6NnZQVzVxU3lsNXJwUnZZamRuaksrNUwyZk5jRnN6K2JSQ3M9IixyZWFsbT0ic2VydmVyNS5lZGEiLHFv cD0iYXV0aCxhdXRoLWludCxhdXRoLWNvbmYiLGNpcGhlcj0icmM0LTQwLHJjNC01NixyYzQsZGVzLDNkZXMiLG1heGJ1Zj04MTky LGNoYXJzZXQ9dXRmLTgsYWxnb3JpdGhtPW1kNS1zZXNz     Jul 1 12:17:43 server5 sendmail[5807]: r61AHhhS005807: --- 535 5.7.0 authentication failed     Jul 1 12:17:43 server5 sendmail[5807]: r61AHhhS005807: AUTH failure (DIGEST-MD5): generic failure (-1) SASL(-1): generic failure: unable canonify user and get auxprops, relay=server5 [192.168.1.12]     Jul 1 12:17:43 server5 sendmail[5807]: r61AHhhS005807: --- 421 4.4.1 server5.eda Lost input channel from server5 [192.168.1.12]     Jul 1 12:17:43 server5 sendmail[5807]: r61AHhhS005807: server5 [192.168.1.12] did not issue MAIL/EXPN/VRFY/ETRN during connection to MTA      Note: server5 and localhost are the same machine. This doesn't happen on this machine: Distributor ID: ScientificSL Description: Scientific Linux SL release 5.5 (Boron) Release: 5.5 Codename: Boron whit sendmail Version 8.13.8 what's wrong ? Thanks for any help.


title: Default DNS records with BIND DNS

text: What are the default DNS records with BIND DNS? And of course, where can I change them? Trying a Google search for `default bind dns records` doesn't help me.


title: How to make use of a real PCI modem in a Virtual Machine?

text: Is there a way where I can use my PCI modem in a virtual machine on an ubuntu 12.04 host box? I have installed Ubuntu 12.04 on the host and I want to use my PCI modem on a guest virtual machine. Can this be done using kvm, vmware or virtualbox? Update: I have tried this http://askubuntu.com/questions/16586/how-to-access-serial- ubuntu-host-serial-port-on-virtualbox-guest-os but i had no luck, I suspect it needs the drivers for the modem installed on the host. Update 2: It seems that if i want to use the PCI modem on the guest box without having the drivers on the host box Oracle PCI Passthrough is the eay to go: http://howtoware.blogspot.com/2012/01/oracle-vm-virtualbox-how-to-use-pci.html :-( Hardware details: Ubuntu 12.04 x32 Agere PCI modem (Tested on a Windows 7 box and is working fine)


title: How can dmesg content be logged into a file?

text: I'm running a Linux OS that was built from scratch. I'd like to save the kernel message buffer (dmesg) to a file that will remain persistent between reboots. I've tried running syslogd but it just opened a new log file, /var/log/messages, with neither the existing kernel message buffer, nor any new messages the kernel generated after syslogd was launched. How can the kernel message buffer be saved to a persistent log file?


title: CentOS test page and .htaccess

text: When I use the line below in the `.htaccess` file, I get the apache CentOS test page.               RewriteCond %{REQUEST_FILENAME} !-d      How can I fix this?


title: strange problems on cd-rom writers

text: I have a really strange problems with my last 5 burners. They look all broken. They can read the files on CDs but when I burn a cd it seem that the burning was gone well, but when I try to md5 the media:               md5sum /dev/sr0      Linux sometimes give me the following error:               Input/Output error      Or sometime it simply give me a **wrong** md5. If I make a:               dd if=/dev/sr0 > cicco.iso      the two images (the original one and the burned one) have different size. For example the openbsd install cd is:               -rw-r--r--. 1 root    root    222334976  2 set 17.40 cicco.iso     -rw-rw-r--. 1 argento argento 222330880 27 ago 12.55 install53.iso      the cicco is the burned iso (dd) and the install53 is the original. If I burn the iso with an other pc it works well. I mean the cd and the image gave me the same md5 on my pc with the broken burner. My opinion is that I have a virus that have flashed the firmware with corrupted one. That's really strange that all 5 burnera are all broken. Also I am sure that when I bought the lastone it was working well for the first 1 or 2 weeks. If u look the iso images you see that cicco.iso is much larger than the original. And following are the differences:               @@ -13895678,259 +13895678,3 @@      d407fd0: 0000 0000 0000 0000 0000 0000 0000 0000  ................      d407fe0: 0000 0000 0000 0000 0000 0000 0000 0000  ................      d407ff0: 0000 0000 0000 0000 0000 0000 0000 0000  ................          -d408000: 0000 0000 0000 0000 0000 0000 0000 0000  ................     ...........     -d408820: 0000 0000 0000 0000 0000 0000 0000 0000  ................     -d408830: 0000 0000 0000 2400 0000 0000 0000 0000  ......$.........     -d408840: 0000 0000 0000 0000 0000 0000 0000 0000  ................     ...     -d4089c0: 0000 0000 0000 0000 0000 0000 0000 0000  ................     -d4089d0: 0000 002f 0000 0000 0000 0000 0000 0000  .../............     -d4089e0: 0000 0000 0000 0000 0000 0000 0000 0000  ................     .............     -d408ab0: 0000 0000 0000 0000 0000 0000 0000 0000  ................     -d408ac0: 0000 0000 0000 6100 0000 0000 0000 b915  ......a.........     -d408ad0: 0000 0000 0000 65a8 0000 0000 0000 3900  ......e.......9.     -d408ae0: 0000 0000 0000 527a 0000 0000 0000 e6f7  ......Rz........     -d408af0: 0000 0000 0000 1100 0000 0000 0000 71ff  ..............q.     -d408b00: 0000 0000 0000 34ab 0000 0000 0000 8800  ......4.........     -d408b10: 0000 0000 0000 afab 0000 0000 0000 bd31  ...............1     -d408b20: 0000 0000 0000 3d2f 0000 0000 0000 82b1  ......=/........     -d408b30: 0000 0000 0000 ae8f 0000 0000 0000 9edc  ................     -d408b40: 0000 0000 0000 2a9b 0000 0000 0000 d320  ......*........      -d408b50: 0000 0000 0000 2c62 0000 0000 0000 0366  ......,b.......f     -d408b60: 0000 0000 0000 d2f9 0000 0000 0000 aad8  ................     -d408b70: 0000 0000 0000 7a3b 0000 0000 0000 e9da  ......z;........     -d408b80: 0000 0000 0000 7891 0000 0000 0000 14c9  ......x.........     -d408b90: 0000 0000 4e00 443e 0000 0000 0000 4891  ....N.D>......H.     -d408ba0: 0000 0000 0000 8d74 0000 0000 8000 db7b  .......t.......{     -d408bb0: 0000 0000 0000 9dc5 0000 0000 0000 6093  ..............`.     -d408bc0: 0000 0000 fa00 feaf 0000 0000 0000 443d  ..............D=     -d408bd0: 0000 0000 0000 af26 0000 0000 fd00 b6bb  .......&........     -d408be0: 0000 0000 0000 660e 0000 0000 0000 8dc5  ......f.........     -d408bf0: 0000 0000 81c5 9df9 0000 0000 0000 75c3  ..............u.     -d408c00: 0000 0000 0000 502b 0000 0000 2bc6 9ebe  ......P+....+...     -d408c10: 0000 0000 0000 9f1f 0000 0000 0000 5698  ..............V.     -d408c20: 0000 0000 fa7e 1dd7 0000 0000 0000 44e8  .....~........D.     -d408c30: 0000 0000 0000 9ed7 0000 0000 a947 aea5  .............G..     -d408c40: 0000 0000 0000 ffb3 0000 0000 cf00 19c7  ................     -d408c50: 0000 0000 020f b6e6 0000 0000 0000 8d44  ...............D     -d408c60: 0000 0000 a800 103c 0000 0000 2956 fdcf  .......<....)V..     -d408c70: 0000 0000 0000 306f 0000 0000 c900 ce95  ......0o........     -d408c80: 0000 0000 b960 c9dd 0000 0000 0000 01a7  .....`..........     -d408c90: 0000 0000 0d00 4b4f 0000 0000 7661 bb03  ......KO....va..     -d408ca0: 0000 0000 0000 3803 0000 0000 79e8 3072  ......8.....y.0r     -d408cb0: 0000 0000 9cf6 51d3 0000 0000 0000 e6b1  ......Q.........     -d408cc0: 0000 0000 6fcf af21 0000 0000 fbc7 3b7e  ....o..!......;~     -d408cd0: 0000 0000 0000 9da4 0000 0000 7aae edf3  ............z...     -d408ce0: 0000 0000 ab47 cdd2 0000 0000 0000 fe88  .....G..........     -d408cf0: 0000 0000 701f 07f3 0000 0000 348c c826  ....p.......4..&     -d408d00: 0000 0000 db00 4ab4 0000 0700 bdcf f04c  ......J........L     -d408d10: 0000 0000 056d 8300 0000 0000 8f00 0871  .....m.........q     -d408d20: 0000 0000 91a7 61a1 0000 0000 b461 b762  ......a......a.b     -d408d30: 0000 0000 c100 4990 0000 0000 62dc 945f  ......I.....b.._     -d408d40: 0000 0000 8998 a6da 0000 0000 d500 7057  ..............pW     -d408d50: 0019 0000 5c74 2021 0000 0000 bb09 335a  ....\t !......3Z     -d408d60: 0000 0000 4bb3 f9c0 0000 0000 cb7a cf6e  ....K........z.n     -d408d70: 0000 0000 f839 8292 0000 0000 93f5 baf8  .....9..........     -d408d80: 0000 0000 c971 734c 0000 0000 1b42 8b71  .....qsL.....B.q     -d408d90: 0000 0000 0de7 69d0 7700 0000 5df8 d6c3  ......i.w...]...     -d408da0: 0000 0000 56b9 fef2 0000 0000 188b ddcf  ....V...........     -d408db0: 0000 0000 8631 3285 0000 0000 c812 d68d  .....12.........     -d408dc0: 0000 0000 9451 5076 0000 0000 c483 137b  .....QPv.......{     -d408dd0: 0000 0000 e726 ca9a 0000 0000 c40c 36ae  .....&........6.     -d408de0: 0000 0000 ece5 4dfc 0000 0000 5e98 386a  ......M.....^.8j     -d408df0: 0000 0000 03b3 c9b4 0000 0000 a0f9 f83d  ...............=     -d408e00: 0000 0000 787d e2a1 0000 0000 8e3e bf13  ....x}.......>..     -d408e10: 0000 0000 9f9c 2831 0000 0000 7aac 233d  ......(1....z.#=     -d408e20: 0000 0000 fda1 ef4a 0000 0000 8f1e e408  .......J........     -d408e30: 0000 0000 f6a5 86fb 0000 0000 f58a 430d  ..............C.     -d408e40: 0000 0000 237d d9e1 0000 0000 af4e fc34  ....#}.......N.4     -d408e50: 0000 0000 3b77 7b52 0000 0000 b2c8 7596  ....;w{R......u.     -d408e60: 0000 0000 4329 f1de 0000 0000 f60a 3189  ....C)........1.     -d408e70: 0000 0000 d82f 1a9c 0000 0000 d2b8 5db2  ...../........].     -d408e80: 0000 0000 3565 9722 0000 0000 e5ef 0b0c  ....5e."........     -d408e90: 0000 0000 11b5 cc77 0000 0000 e445 0b42  .......w.....E.B     -d408ea0: 0000 0000 79bb 62f3 0000 0000 0c49 c5f6  ....y.b......I..     -d408eb0: 0000 0000 d90c 9aec 0000 0000 8c33 25d5  .............3%.     -d408ec0: 0000 0000 0b76 8766 0000 0000 165d 0ec4  .....v.f.....]..     -d408ed0: 0000 0000 f1e1 8448 0000 0000 feca c057  .......H.......W     -d408ee0: 0000 0000 65cc 2b15 0000 0000 0a97 472e  ....e.+.......G.     -d408ef0: 0000 0000 e73e ca90 0000 0000 3369 9c2e  .....>......3i..     -d408f00: 0000 0000 f45a c77b 0000 0000 f5b2 c735  .....Z.{.......5     -d408f10: 0000 0000 9dbc 69b1 0000 0000 75f2 a705  ......i.....u...     -d408f20: 0000 3a00 d5d8 5f1a 0000 0000 55a2 bf39  ..:..._.....U..9     -d408f30: 0000 0000 8745 a2b3 0000 f900 1d86 89a2  .....E..........     -d408f40: 0000 0000 e711 8a8c 0000 0000 0f2b 441f  .............+D.     -d408f50: 0000 a400 9b06 eb42 0000 0000 6f5b 6c3b  .......B....o[l;     -d408f60: 0000 0000 eda9 8dbe 0000 b200 3757 56be  ............7WV.     -d408f70: 0000 0000 2433 5b55 0000 0000 01e8 004e  ....$3[U.......N     -d408f80: 0000 0d85 680e ae84 0000 0000 e84e ceb4  ....h........N..     -d408f90: 0000 0000 a02a f81f 0000 02e3 807a e023  .....*.......z.#     -d408fa0: 0000 0000 d2e7 1d8a 0000 0000 9ac3 2b11  ..............+.     -d408fb0: 0000 3265 fa97 032e 0000 0000 e83a ce93  ..2e.........:..     -d408fc0: 0000 0000 942d af5d 0000 7abc f45d 8779  .....-.]..z..].y     -d408fd0: 0000 0000 82f2 e185 0000 6a00 dafe db00  ..........j.....     -d408fe0: 0000 61a8 1364 0deb 0000 0000 25db 5b1b  ..a..d......%.[.     -d408ff0: 0000 1800 69e6 aeca 0000 a133 8040 6030  ....i......3.@`0      What are your opinions ? Could be really a virus ??


title: How to download a file from repo, and install it later w/o internet connection?

text: Assuming that I want to install a program called `leafpad` later. Currently the only way to install it is via:               yum install leafpad -y      but I want to save this and install it later without internet connection. How can I grab it from the yum repo and save it to a folder and then install it later?


title: How can I finding the Modify/Access/Change time of a file or directory?

text: I am using Debian 7.2 and would like to know the shell command for finding the MAC time of a file or directory. I tried               man -k "MAC"      and got a lot of hits about macros. I then tried               man -k "MAC time"      and got nothing.


title: How to redirect traffic from subdomain to main domain

text: I have a `demo.domain.com` and `domain.com` they both show the same information and point to the same folder. How can I redirect all `demo.domain.com` visitors to `domain.com`?


title: Mysql log confusion

text: I have installed a standard installation of mysql on Debian Wheezy and I am confused as to where the logs are supposed to be logged. In my `/var/log/` directory, there are files `mysql.log` which are empty. All logging goes to `daemon.log` and `syslog`. To add to the confusion, `show variables like '%log%';` shows other logs still (My datadir is `/srv/mysql`) :               | general_log                             | OFF                               |     | general_log_file                        | /srv/mysql/mysql-systems.log      |     | slow_query_log                          | OFF                               |     | slow_query_log_file                     | /srv/mysql/mysql-systems-slow.log |      I like to keep my logs clean and organized. What would be the best way to log mysql. Should I change it on the `mysql` level, or in `rsyslog`. BTW, is there any standard for logs similar to FHS ?


title: Backup of a ubi file system with dd?

text: A have a root file system (file system - image containinf folder structure and content) on a flash drive. The flash drive uses UBI as the underlying file system file system - the way the data blocks are mapped into files, like when you say that you're using ext4).               rootfs on / type rootfs (rw)     ubi0:root on / type ubifs (rw,sync)      I know how to do a backup with dd when there is a physical drive as the first parameter (example. instead of `rootfs` there would be a `/dev/sda`), however here I don't know how to address the drive in the current scenario (what is the path for `rootfs`). How do i detect to which file does `footfs` or `ubi0:root` correspond to?


title: Is it possible to add more modifiers?

text: I'm using minimalistic WM controlled by a keyboard..   The main question is, is it possible? How?   For example, `Mod6`. I know how to remap existing modifiers, but not how to add a new ones. I'm using Arch Linux.


title: Is it possible to redirect a logging output of the iptables' LOG chain into a separate log file?

text: I don't want to mix `iptables`'s log output with other system logs. How could I specify a dedicated log file for `iptables` LOG chains output?


title: How do you choose which monitoring application to use?

text: Having a system for collecting performance statistics can be extremely useful. In the past, I've used Munin for this, and it has been invaluable in analyzing bottlenecks and various other issues. I was recently made aware of collectd, which seems very similar to Munin. What monitoring applications are available and should be considered (other than Munin and Collectd), and how do you choose which one to use?


title: Something like YaST for non SUSE distros

text: I am currently using openSUSE 13.1 KDE. The big reason why I like openSUSE is YaST. YaST does so much and makes many parts of life easier. YaST not only graphically allows me to add/remove/manage repositories, and packages. It allows me to manage my firewall, kernel, services, groups, sudo and a lot more from a GUI. My favorite is that YaST allows me to set up Apache Virtual Hosts with a few clicks of the mouse on my local desktop (I am a web developer). Now I can and know how to manage most of these things in terminal, but sometimes I like the GUI. Are there any alternatives to YaST out there? Either distro agnostic or specific to a distro (any linux distro). I just want to see what else is out there.


title: linux + cant run dialog utility + got errors

text: Problem is as follows: Linux kernel: 3.0.13-0.27-default #1 SMP I’ve installed “dialog” utility ( /usr/bin/dialog ) just copied bin file to /usr/bin When I have tried to run it, error message regarding missing libncursesw.so.5 lib appeared. to solve the problem I try to copied the file libncursesw.so.5 to /usr/lib/ but not help • Now, I got another error:                    “error while loading shared libraries: /usr/lib/libncursesw.so.5: file too short”…      Please advise