Swedish unicode characters in xdm / xlogin

I decided to localize my XDM login screen but I'm stuck with corrupted Swedish characters. ![enter image description here](http://i.stack.imgur.com/1EWIW.jpg) I'm using Debian Wheezy with the following `/etc/X11/xdm/Xresources`               Xcursor.theme: whiteglass          xlogin*login.translations: #override \             CtrlR: abort-display()\n\             F1: set-session-argument(failsafe) finish-field()\n\             Delete: delete-character()\n\             Left: move-backward-character()\n\             Right: move-forward-character()\n\             Home: move-to-begining()\n\             End: move-to-end()\n\             CtrlKP_Enter: set-session-argument(failsafe) finish-field()\n\             KP_Enter: set-session-argument() finish-field()\n\             CtrlReturn: set-session-argument(failsafe) finish-field()\n\             Return: set-session-argument() finish-field()          !xlogin*greeting: V\303\244lkommen till CLIENTHOST     xlogin*greeting: Välkommen till CLIENTHOST     xlogin*namePrompt: Användare:     !xlogin*fail: Fel l\303\266senord!     xlogin*fail: Fel lösenord!          !xlogin*greetFace:       Inconsolata:size=16     !xlogin*face:            Inconsolata:size=14     !xlogin*promptFace:      Inconsolata:size=14     !xlogin*failFace:        Inconsolata:size=20     xlogin*greetFace -*-fixed-medium-r-*--*-200-*-*-*-*-iso8859-15     xlogin*failFace -*-fixed-medium-r-*--*-200-*-*-*-*-iso8859-15     xlogin*promptFace -*-fixed-medium-r-*--*-200-*-*-*-*-iso8859-15     xlogin*face -*-fixed-medium-r-*--*-200-*-*-*-*-iso8859-15          xlogin*borderWidth: 0     xlogin*frameWidth: 0     xlogin*innerFramesWidth: 0     xlogin*shdColor: grey30     xlogin*hiColor: grey90     xlogin*background: grey     !xlogin*foreground: darkgreen     xlogin*greetColor: black     xlogin*failColor: red     *Foreground: black     *Background: #fffff0          xlogin*logoFileName: /home/stemid/heart.xpm     xlogin*useShape: true     xlogin*logoPadding: 10          XConsole.text.geometry: 480x130     XConsole.verbose:       true     XConsole*iconic:        true     XConsole*font:          fixed          Chooser*geometry:               700x500+300+200     Chooser*allowShellResize:       false     Chooser*viewport.forceBars:     true     Chooser*label.font:             *-new century schoolbook-bold-i-normal-*-240-*     Chooser*label.label:            XDMCP Host Menu from CLIENTHOST     Chooser*list.font:              -*-*-medium-r-normal-*-*-230-*-*-c-*-iso8859-1     Chooser*Command.font:           *-new century schoolbook-bold-r-normal-*-180-* `/etc/X11/xdm/Xsetup`               #!/bin/sh     #     # This script is run as root before showing login widget.     export LANGUAGE=sv_SE     export LANG=sv_SE     export LC_ALL=sv_SE          xsetroot -solid "#002b36"          sleep 10 && import -w root /home/stemid/.login_screen.jpg &     chown stemid:stemid /home/stemid.login_screen.jpg & Originally I was trying with sv_SE.UTF-8 in environment but both of those locales are activated in the Debian locale-gen. `~/.xsession`               export LANGUAGE=sv_SE     export LANG=sv_SE     export LC_ALL=sv_SE          test -f ~/.Xresources && xrdb ~/.Xresources          xsetroot -solid "#002b36"          xscreensaver -no-splash &     exec ratpoison I've also tried setting the locale in .profile. Debian generally requires no xorg.conf but I've created two files in `/etc/X11/xorg.conf.d`, one for the synaptics touchpad and one for font paths.               Section "Files"     ModulePath "/usr/lib/xorg/modules/"     FontPath "/usr/share/fonts/X11/misc/"     FontPath "/usr/share/fonts/X11/TTF/"     FontPath "/usr/share/fonts/X11/OTF"     FontPath "/usr/share/fonts/X11/Type1/"     FontPath "/usr/share/fonts/X11/100dpi/"     FontPath "/usr/share/fonts/X11/75dpi/"     FontPath "/usr/share/fonts/X11/misc/artwiz-aleczapka-se-1.3/"     EndSection I've also tried installing a font that specifically supported Swedish but I can't use it in Xresources using the line from xfontsel. xlsfonts lists all the fonts I expect to be there, including the new artwiz ones. It doesn't seem like a font issue to me, more like encoding. Additionally I have tried `dpkg-reconfigure locales` and restarted X with all three settings. That is the only three locales I have enabled, and tested each as the default.   * sv_SE   * sv_SE.ISO-8859-1   * sv_SE.ISO-8859-15   * sv_SE.UTF-8


Show only part of the line found by grep (but not the part that matches the pattern)

In `ifcfg-eth0`, I managed to grep "DEVICE=eth0" by using               grep "DEVICE=" ifcfg-eth0      But how can I grep pattern to show only "eth0"?


Making a bootable pendrive for custom kernel

I read the tutorials to make a mimalistic custom kernel from here and am able to boot it up as explained in the tutorial over a virtual machine using GRUB as the boot loader. I think it would be more fun if I could do the same over bare hardware using a bootable pendrive. That is use GRUB, pendrive and my Kernel executable to form a bootable pendrive and then boot into the kernel from this pendrive. **Q1.** I thought of using the normal procedure of how I make a bootable linux pendrive, but my kernel isn't really an iso image, its an elf format executable. Will the normal method work if I somehow convert my executable to iso format ? **Q2.** Any other ideas / link to some resource how I should proceed ? **P.S. :** Its NOT Linux kernel per-se, Its absolutely minimal kernel, no file system nothing. Just boots up, prints something on console and can handle keyboard events, thats it.


How do I recursively set the date created attribute to the date modified attribute on NTFS-3G?

In my first question, I asked how to get the "Date created" field in NTFS-3G. Now, that I know I can get the "Date created", I have started adding files onto my NTFS-3G partition and would like to set the "Date created" of each file to its "Date modified" value. Since this needs to be done on a whole repository of files, I would like to recursively apply it to a single directory on down. If I know how to do this for a single file, I could probably do the recursion myself, but if you want to add that in I would be more than happy.


Hidden ext4 partition?

Is there a way to hide an `ext4` partition from e.g `Thunar`? And the `open file/save` dialog , I think they come from the same source.


How can you trim mp3 files using `ffmpeg`?

Here is a Linux audio MP3 puzzle that has been bugging me for awhile: How to trim the beginning few seconds off an MP3 audio file? (I can't get `ffmpeg -ss` to work with either 00:01 or 1.000 format) So far, to do what I want, I resort doing it in a GUI manner which is maybe slower for a single file, and definitely slower for a batch of files.


No yum repos on Red Hat Enterprise Linux Server release 5.2 (Tikanga)

I have a Red Hat Enterprise Linux Server release 5.2 (Tikanga) system and there is only one repository named rhel-debuginfo.repo and it doesn't seem to work either. Could you point me out some default yum repositories needed for maintaining a development system (which includes svn, mvn, httpd, tomcat etc.) Thanks in advanced.


Bash script error: integer expression expected

I'm having a rather weird issue, I'm running a script (Bash) on multiple servers and it stopped working on one of the servers (works perfectly fine on all other servers). Here is the problem part of the script: (I did not write it myself, all credits go to "Rich") (http://www.notrainers.org/monitoring-memory-usage-on- linux-with-nagios-and-nrpe/)                   if [ "$result" -lt "$warn_level" ]; then     #Line 56         echo "Memory OK. $result% used."         exit 0;     elif [ "$result" -ge "$warn_level" ] && [ "$result" -le "$critical_level" ]; then  #Line 59         echo "Memory WARNING. $result% used."         exit 1;     elif [ "$result" -gt "$critical_level" ]; then   #Line 62         echo "Memory CRITICAL. $result% used."         exit 2;     fi      Complete error message:               ./check_memory.sh: Line 56: [: 7.: integer expression expected          ./check_memory.sh: Line 59: [: 7.: integer expression expected          ./check_memory.sh: Line 62: [: 7.: integer expression expected      If you need more info, let me know and I will try to supply it as fast as possible. Appreciate all inputs :)


Different UID/GID when using an ext4 formatted USB drive with another computer

The problem of using a filesystem like `ext4` on a USB stick or memory card is that when it's mounted into another system the disk's UID/GID might not be present. Can this be fixed with a mount option?


Configuring a VPN in my CentOS server

My server runs `CentOS 6.2`. It has two network cards (`eth0` and `eth1`). In my server I have installed `CoovaChilli` access controller software, that manages the LAN under it. This management is done through a tunnel that is created by `CoovaChilli`, and all clients from LAN connect to that tunnel. Now the problem is that I would like to create a VPN between that server and another remote client (or server). I need some help on doing this, taking in account that I'm new to the topic. I tried to follow VPN HOWTO tutorial, but it is old and some things I think are deprecated. Searching on Internet, I found that there are many ways to create a VPN - I mention just a few: `IPSec`, `OpenVPN`, `CIPE` - and this confused me a little bit. My VPN will be created between my server that runs `CentOS` and another remote server that runs Linux also. **What I need:** some guidelines on how to achieve that working VPN. N.B. Any links on this topic are welcome!


MySQL server won't install to a new os (Debian, Ubuntu)

Today I wanted to install (on a new VPS with new OS) a MySQL server. I used this command:               apt-get install mysql-server mysql-common mysql-client-5.5      I tried with Debian 7 (x64 and x86) and Ubuntu 13.04 (x64 and x86). Every time I got this error message:               140223  9:37:33 [Warning] Using unique option prefix key_buffer instead of key_b     uffer_size is deprecated and will be removed in a future release. Please use the      full name instead.     140223  9:37:33 [Warning] Using unique option prefix myisam-recover instead of m     yisam-recover-options is deprecated and will be removed in a future release. Ple     ase use the full name instead.     140223  9:37:33 [Note] Plugin 'FEDERATED' is disabled.     140223  9:37:33 InnoDB: The InnoDB memory heap is disabled     140223  9:37:33 InnoDB: Mutexes and rw_locks use GCC atomic builtins     140223  9:37:33 InnoDB: Compressed tables use zlib 1.2.7     140223  9:37:33 InnoDB: Using Linux native AIO     140223  9:37:33  InnoDB: Warning: io_setup() failed with EAGAIN. Will make 5 att     empts before giving up.     InnoDB: Warning: io_setup() attempt 1 failed.     InnoDB: Warning: io_setup() attempt 2 failed.     InnoDB: Warning: io_setup() attempt 3 failed.     InnoDB: Warning: io_setup() attempt 4 failed.      A video in which I'm trying to install Ubuntu: http://youtu.be/nULSfa0xZdU


sendmail error dsn=5.0.0, stat=Service unavailable

i have configured an sendmail configuration in ubuntu 12.04 64 bit machine when i'm send th email through a perl script it gives the below error                dsn=5.0.0, stat=Service unavailable      and mail is not been sent. i check on with other machine wherein its sending email and functioning as designed `dsn=2.0.0, stat=sent`.. can i know how to make it work or change setting for proper functionality.. the logs are :               Sep  2 17:38:12 mail sendmail[5522]: r82C8CpE005522: from=root, size=148, class=0, nrcpts=1, msgid=<201309021208.r82C8CpE005522@mail.server.local>, relay=root@localhost     Sep  2 17:38:13 mail sm-mta[5523]: r82C8CtA005523: from=<root@mail.server.local>, size=373, class=0, nrcpts=1, msgid=<201309021208.r82C8CpE005522@mail.server.local>, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]     Sep  2 17:38:13 mail sendmail[5522]: r82C8CpE005522: to=suhaskekuda@gmail.com, ctladdr=root (0/0), delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=30148, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (r82C8CtA005523 Message accepted for delivery)     Sep  2 17:38:16 mail sm-mta[5525]: STARTTLS=client, relay=gmail-smtp-in.l.google.com., version=TLSv1/SSLv3, verify=FAIL, cipher=DES-CBC3-SHA, bits=168/168     Sep  2 17:38:19 mail sm-mta[5525]: r82C8CtA005523: to=<suhaskekuda@gmail.com>, ctladdr=<root@mail.server.local> (0/0), delay=00:00:06, xdelay=00:00:06, mailer=esmtp, pri=120373, relay=gmail-smtp-in.l.google.com. [173.194.79.27], dsn=5.0.0, stat=Service unavailable     Sep  2 17:38:19 mail sm-mta[5525]: r82C8CtA005523: r82C8JtA005525: DSN: Service unavailable     Sep  2 17:38:19 mail sm-mta[5525]: r82C8JtA005525: to=<root@mail.server.local>, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30000, dsn=2.0.0, stat=Sent      etc/mail/access is               Connect:localhost       RELAY     GreetPause:localhost    0     ClientRate:localhost    0     ClientConn:localhost    0          Connect:127             RELAY     GreetPause:127          0     ClientRate:127          0     ClientConn:127          0     Connect:IPv6:::1        RELAY     GreetPause:IPv6:::1     0     ClientRate:IPv6:::1     0     ClientConn:IPv6:::1     0          # Defaults     GreetPause:             5000     ClientRate:             10     ClientConn:             10          Spam:postmaster@    FRIEND     Spam:abuse@     FRIEND     Spam:spam@      FRIEND          #Connect:0      REJECT whilst invalid, this also blocks sendmail -bs -Am     Connect:169.254 REJECT     Connect:192.0.2 REJECT     Connect:224     REJECT     Connect:255     REJECT


manipulate a Drush "internal" variable

I want to modify a variable (preferably in a Bash Script format) because my PHP environment requires a port number. To show a URL in Drush containing a token that logs you in as user 1 (without a password), you need to execute drush uli               $ drush uli      In a script:               bash-3.2$ VAR='drush uli'; echo ${VAR}; ${VAR}      outputs:               drush uli     http://website-7-26-2-17-res124725.local/user/reset/1/1393147909/zMiquSr_ikA7xdp7kA3g4CvTGd82mWsVdqEiMCs/login      I need to manipulate the variable VAR to add port 8088               http://website-7-26-2-17-res124725.local:8088/user/reset/1/1393147909/zMiquSr_ikA7xdp7kA3g4CvTGd82mWsVdqEiMCs/login      ..and then avoid Drush to open the URL but open the new URL with a browser instead:               VAR='drush uli';     read ${VAR}     # replace ".local" with ".local:8088"     ObjURL=${VAR//.local/.local:8088}     # open URL in browser      open ${ObjURL}      with the proper escaping. Can I modify that URL before Drush opens the browser and manipulate the URL when invoked from a Bash script?


Should tmpfs be unmounted at system shutdown?

Assume I have a linux system with the following partitions mounted (beside root):   * proc on **/proc**   * devtmpfs on **/dev**   * devpts on **/dev/pts**   * tmpfs on **/dev/shm**   * sysfs on **/sys**   * tmpfs on **/var/run**   * tmpfs on **/tmp**  What should I do before halt (very last script executed, just before issuing the halt command)? Should I umount all these filesystems, leaving only /dev and /proc mounted? May leaving these filesystems mounted cause any problem? Is there a best practice about this? UPDATE: I'm currently using sysvinit (latest) with own-written scripts.


How to mark "not fully installed" apt-get package as "successfully installed"

I have installed Debian 7.4 on my Iomega ix2-200 NAS, following this blog. The ix2-200 is running an ARM Marvel CPU and has a 128 MB NAND flash memory. The flash contains an initramfs image (uInitrd) and a kernel image (uImage) to boot the system. Sometimes, a new package (like `cryptsetup`) requieres to update the kernel and fails (`Unsupported platform`). I manually need to flash the new initramfs `initrd.img-3.2.0-4-kirkwood` and kernel `vmlinuz` via `mkimage`, which works fine. The (anoying) issue: everytime I run `apt-get upgrade` the system is showing up those unfinished packages. **How can I tell my system that everything is fine?** I have tried Google and StackExchange, but most of the posts are dealing with how to remove those unfinished/incomplete packages. I want to keep it! Please see attached code snapshot:               #> apt-get install cryptsetup     Reading package lists... Done     Building dependency tree     Reading state information... Done     The following extra packages will be installed:       console-setup console-setup-linux cryptsetup-bin kbd keyboard-configuration libcryptsetup4 xkb-data     Suggested packages:       dosfstools     The following NEW packages will be installed:       console-setup console-setup-linux cryptsetup cryptsetup-bin kbd keyboard-configuration libcryptsetup4 xkb-data     0 upgraded, 8 newly installed, 0 to remove and 0 not upgraded.     Need to get 3,179 kB of archives.     After this operation, 11.8 MB of additional disk space will be used.     Do you want to continue [Y/n]? y          ...          Processing triggers for initramfs-tools ...     update-initramfs: Generating /boot/initrd.img-3.2.0-4-kirkwood     Unsupported platform.     run-parts: /etc/initramfs/post-update.d//flash-kernel exited with return code 1     dpkg: error processing initramfs-tools (--configure):      subprocess installed post-installation script returned error exit status 1     Errors were encountered while processing:      initramfs-tools     E: Sub-process /usr/bin/dpkg returned an error code (1)          #> apt-get upgrade     Reading package lists... Done     Building dependency tree     Reading state information... Done     0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.     1 not fully installed or removed.     After this operation, 0 B of additional disk space will be used.     Do you want to continue [Y/n]?


I Can't login as root with su command, but I can with SSH

How is it possible that I cannot log in as root by `su root` or `su` (I get incorrect password error), _but_ I can log in by `ssh root@localhost` or `ssh root@my_local_IP` with the same password? I'm using CentOS 6.4. * * * ### _Update1_ :               cat /etc/pam.d/su      gives:               #%PAM-1.0     auth        sufficient  pam_rootok.so     # Uncomment the following line to implicitly trust users in the "wheel" group.     #auth       sufficient  pam_wheel.so trust use_uid     # Uncomment the following line to require a user to be in the "wheel" group.     #auth       required    pam_wheel.so use_uid     auth        include     system-auth     account     sufficient  pam_succeed_if.so uid = 0 use_uid quiet     account     include     system-auth     password    include     system-auth     session     include     system-auth     session     optional    pam_xauth.so      ### _Update2_ :               $ sudo grep su /var/log/secure | grep -v sudo      gives :               Feb 23 13:12:17 fallah su: pam_unix(su:auth): authentication failure;     logname=fallah uid=501 euid=501 tty=pts/0 ruser=fallah rhost=  user=root      repeated about 20 times.


Linux re install order of events to include ffmpeg

Before I go ahead and wipe my whole system and start from scratch, is there a way I can avoid what just happened on trying to install ffmpeg? I still don't actually know the correct way to install it so it includes most functions which it DOES NOT on Centos 6.4 with STATIC version. My /etc/lb folder is a mess after the command ldconfig -v which created symlinks and they conflict all over the place. The /etc/yum.repos.d folder is also a mess and the script I followed in a linux blog makes no sense to me and started errors in first place. I'd like to avoid that altogether next time around...is there a way I can do that? In other words not play around with writing repo scripts or touching that folder..that is when all the trouble began! Better yet is there a safe method to employ that can be reversed? Starting to think Centos is a headache in as far as ffmpeg goes. Everyone else doing basic commands with it just downloads static version.


Taking output of /dev/tty into a variable

I created a two backup scripts - one for files (filebackup.sh) and another for database (dbbackup.sh). `filebackup.sh` calls `dbbackup.sh` and stores the output in a variable. The output returned by `dbbackup.sh` is the tar filename in which the script has stored all the backed up databases. The script `dbbackup.sh` contains the following at the end:               echo $TARFILE > /dev/tty      The script `filebackup.sh` calls dbbackup.sh like this:               DBBACKUP="`/scripts/dbbackup.sh &>/dev/null`"      This dumps all extra output from the script to /dev/null and ensures only the filename is returned. Everything works except when I call filebackup.sh, the filename is printed to screen. The variable `$DBBACKUP` remains empty. What am I doing wrong here?


How to configure hard drive

I have a hard drive that is not configured, it shows this in `fdisk -l`:               Disk /dev/dm-2: 107.4 GB, 107369988096 bytes      255 heads, 63 sectors/track, 13053 cylinders      Units = cylinders of 16065 * 512 = 8225280 bytes      Sector size (logical/physical): 512 bytes / 512 bytes      I/O size (minimum/optimal): 512 bytes / 512 bytes      Disk identifier: 0x00000000      How would I configure this, and mount it to `/var/t3`? Also how would I make it stay configured in case of a reboot? `dmsetup info /dev/dm-2` output:               Name:              tier3-tier3     State:             ACTIVE     Read Ahead:        256     Tables present:    LIVE     Open count:        0     Event number:      0     Major, minor:      254, 2     Number of targets: 1     UUID: LVM-9CdeuLeSVEJHBbjAJfFYRxxTfYYA0U5khb86NlUcyBAJC1JxP7FIhERCIoInYHLl


How to remove multiple newlines at EOF?

I have files that end in one or more newlines and should end in only one newline. How can I do that with Bash/Unix/GNU tools? Example bad file:               1\n     \n     2\n     \n     \n     3\n     \n     \n     \n      Example corrected file:               1\n     \n     2\n     \n     \n     3\n      In other words: There should be exactly one newline between the EOF and the last non-newline character of the file. ## Reference Implementation Read file contents, chop off a single newline till there no further two newlines at the end, write it back:               #! /bin/python          import sys          with open(sys.argv[1]) as infile:         lines = infile.read()          while lines.endswith("\n\n"):         lines = lines[:-1]          with open(sys.argv[2], 'w') as outfile:         for line in lines:             outfile.write(line)      Clarification: Of course, piping is allowed, if that is more elegant.


mysql different users access

I have six different sites set up with their respective databases on my server all linking to one localhost ip. Three of those users I set up from root have access only to the one database associated but the other three when show databases command reveal all databases. Not sure how that happened. How do I make it so each user has only access to respective database? Must have set them up differently but cannot remember how. It's a drupal multi-site and ultimately I'd like to have just one user and password to access all databases which I do have with root but for drupal settings each database has a necessary set user and pass and before I created individual ones I was making changes to one database which was effecting all else. So until I learn how to prefix them I am trying to keep all separate. Does it matter, what is the best practice - I don't know.


lz4 Kernel Module in CentOS without recompiling

I just installed CentOS 7 on a vServer to play around with. Usually I use Debian. Since I had good results, I want to use zswap. I enabled it by putting `zswap.enabled=1 zswap.compressor=lz4` in the `GRUB_CMDLINE_LINUX` in /etc/default/grub But it falls back to using lzo, because the CentOS 7 Kernel doesn't have the lz4 module, it seems. Is there any way to add this module without recompiling the whole Kernel? How would this work? Great would be some way to automate it on kernel updates, but that's not that important. (I only install updates manually and without the lz4 and lz4_compress modules nothing breaks, zswap just falls back to lzo) I want to stay as close as possible to using the package manager. A `yum upgrade`should still patch all fixed bugs.


What sudoer spec allows users to mount cifs shares?

I'm trying create a line in /etc/sudoers that allows members of group "users" to mount cifs shares anywhere inside their own home directory. In my first attempt I tried:               %users ALL=/bin/mount -t cifs /home, /bin/umount /home      ...which admittedly doesn't restrict them to their own home directory. As a user when I try the command:               sudo mount -t cifs ~/mount //hostname/sharename -o username=myuserid,domain=mydomain      ...I get prompted for the password then receive error:               Sorry, user myuserid is not allowed to execute '...command...' as root on servername.      Is there any way to coerce sudoers to specify what I want?


DPMS does not work: the monitor is not switched off

I have a monitor which was properly switched off by my Debian PC when unused. I attached it to another machine and, this times, it is never switched off. In `/etc/X11/xorg.conf`, I have:               Section "Monitor"             Identifier      "Generic Monitor"             Option          "DPMS"      It is recognized when X11 starts:               (II) Loading extension DPMS     ...     (II) VESA(0): DPMS capabilities: StandBy Suspend Off; RGB/Color Display     ...     (**) Option "dpms"     (**) VESA(0): DPMS enabled      The operating system is Debian 5 (Lenny). The graphics card is:               00:02.0 VGA compatible controller: Intel Corporation 82G33/G31 Express Integrate     d Graphics Controller (rev 02) (prog-if 00 [VGA controller])             Subsystem: Hewlett-Packard Company Device 2a6f             Flags: bus master, fast devsel, latency 0, IRQ 5             Memory at fe900000 (32-bit, non-prefetchable) [size=512K]             I/O ports at b080 [size=8]             Memory at d0000000 (32-bit, prefetchable) [size=256M]             Memory at fe800000 (32-bit, non-prefetchable) [size=1M]             Capabilities: [90] Message Signalled Interrupts: Mask- 64bit- Queue=0/0  Enable-Capabilities: [d0] Power Management version 2      X11 is:               X.Org X Server 1.4.2     Release Date: 11 June 2008     X Protocol Version 11, Revision 0     Build Operating System: Linux Debian (xorg-server 2:1.4.2-10.lenny2)     Current Operating System: Linux ludwigVII 2.6.26-2-686 #1 SMP Sun Jun 21 04:57:3     8 UTC 2009 i686     Build Date: 08 June 2009  09:12:57AM


Atime value changing only once after file creation

I've mounted disk with explicit given value - atime:               mount -o mount -o atime /dev/disk1 /myDisk      then I've created a file by               touch file_A      after this operation stat output looks like that:               Access: 2013-08-30 11:38:48.141970758 +0200     Modify: 2013-08-30 11:38:48.141970758 +0200     Change: 2013-08-30 11:38:48.141970758 +0200      after `cat /myDisk/file_A` stat output changes but only once:                   Access: 2013-08-30 11:39:11.141970758 +0200         Modify: 2013-08-30 11:38:48.141970758 +0200         Change: 2013-08-30 11:38:48.141970758 +0200      and then doing cat multiple times doesn't change Access time value at all. What's wrong with that? Where this behavior coming from? I would expect that access time will change after every single cat operation on this file. Why it shows only the first access? (Mounting disk with noatime option causes another behavior, any of cat's changes access time in stat. Still remains equal to modify and change)


What are some decent alt-tab replacements for Gnome?

I think these problems bother me with the native alt-tab app:   * It feels a bit sluggish - it takes about 0.3 seconds for the alt-tab window to appear.   * I'd like to configure Alt-Shift-Tab to go one window backwards (not sure who to do this with the native one).   * I don't like how the **only** visible window is the window I'm switching too - I'd like a behavior similar to Windows' alt-tab.


how to run more than one program in a single script?

I have about 6 programs I want to run one after the other. They all are in different directories with their respective data. I would like help with a script that I can use to run each program in a specific order. This is because the output of the previous run is the input of the next run.


Is there any env variable to turn --color (and the like) on for all commands?

I do use aliases to turn on color for some commands by default. But I'm wondering if there's an easier way at telling my system, color is supported, don't make me use `\--color` for `grep`, `ls`, etc.


mod_rewrite returns a 301 OK, not Moved Permanently?

I recently set up monitoring for my mod_rewrite server with help in the question Bash - pattern matching across multiple lines. Every once in a while - I'm not sure what triggers it - I get a `HTTP/1.1 301 OK` instead of a `HTTP/1.1 301 Moved Permanently`. Why? This is currently causing my scripts to create a false positive. The rewrites are of the following form.               RewriteRule ^ http://www.mydomain.org%{REQUEST_URI} [R=301,L]      The rewrite rule is still working and I still eventually get a 200 code back from www.mydomain.org. I can update the regular expressions to match on a 301 OK but I'd really like to know why it would change. I'm running the latest release of CentOS 5 on the server if it matters.


Installing from mounted iso located on USB-HDD

I formatted my ~200GB HDD with RMPrepUSB to FAT32 and with syslinux bootloader. Used XBoot to "Create USB" with debian-6.0.6-amd64-netinst.iso inside. In linux.cfg it shows up as:               ### MENU START     LABEL -     MENU LABEL Debian 6 netinst x64 (debian-6.0.6-amd64-netinst)     LINUX /boot/syslinux/grub.exe     APPEND --config-file="ls /images/debian6x64netinst.iso || find --set-root /images/debian6x64netinst.iso;map --heads=0 --sectors-per-track=0 /images/debian6x64netinst.iso (0xff) || map --heads=0 --sectors-per-track=0 --mem /images/debian6x64netinst.iso (0xff);map --hook;chainloader (0xff)"     TEXT HELP     debian-6.0.6-amd64-netinst     ENDTEXT     ### MENU END      The problem is, when booting from it and trying to install, it refuses to continue install, as it "can't find CDROM". Could you explain me why is it happening and what should be done, to solve? PS: I want to create my universal USB-HDD, with many distros' inside, want to be able to boot from that and choose, which .iso to boot from, and XBoot looks just the piece of software, to achieve my needs.


When wouldn't one want `cp` to be recursive?

Under what conditions might one wish to use the `cp` command on a directory yet have it _not_ be recursive? Consider:               $ tree     .     └── old         └── inner             └── a.txt          2 directories, 1 file          $ cp old/inner/ .     cp: omitting directory `old/inner/'          $ tree     .     └── old         └── inner             └── a.txt          2 directories, 1 file      What did that do at all? So why would one ever not use the `-r` flag, and therefore why isn't it implied without specifying it? Note that the `-r` flag has no ill effect on regular files:               $ cp -r old/inner/a.txt .     $ ls     a.txt  old      I do realize that I could alias `cp` to `cp -r` but my goal is to understand what is the reason, not fix anything.


Samba test setup with only one physical box

I have CentOS 6.4 i386/686 installed on its own. I'd like to test out Samba 4 running as an AD DC. If I don't have another spare box to use in the lab, is it possible / does it make sense to install XP Pro on a VM within CentOS so I can test whether XP Pro clients will be able to make use of Samba's services OK? If so, is there anything special to consider with this setup, or would I just install KVM and follow something like this guide? (Or Xen?)


Boot partiotionless disk with syslinux

A file system can be configured to span a complete disk, omitting any partition table. Notice intentionally the command to do so does not use `/dev/sda1` but the raw, unpartitioned device instead.               mkfs.btrfs /dev/sda      The Idea is mentioned in the Arch Linux Wiki article about btrfs. I tried this in a virtual machine using a btrfs file system as only storage. It can even be booted from using grub, following the instruction in the wiki. ext3, ext4 and jfs also work that way. I only tested these, but most filesystem place the first block with an offset and thus leave enough space for a boot record. Now I would like to use syslinux instead of grub. The aforementioned wiki already indicates that this makes a dedicated placement of the `ldlinux.sys` neccessary, but does not include instructions to solve this. I highly suspect that the usual `mbr.bin` file would also not be appropriate, because it is normally responsible to read the partition table and find an active bootable partition. Now, there is not partition to be found. Does someone have any experience with using syslinux with a partitionless disk? Can a partitionless disk be booted using syslinux?


"Network unreachable" outside of LAN

I have a Linux server which runs several services (namely Minecraft :)). Recently, I've been having trouble getting it to connect to the Internet. For example:               root@fcwtech:~# ping google.com     ping: unknown host google.com      and               root@fcwtech:~# ping 8.8.8.8     connect: Network is unreachable      however,               root@fcwtech:~# ping 192.168.1.1     PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.     64 bytes from 192.168.1.1: icmp_req=1 ttl=64 time=10.8 ms      In case it helps, resolv.conf:               root@fcwtech:~# cat /etc/resolv.conf     # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)     #     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN     nameserver 8.8.8.8     nameserver 8.8.8.4     nameserver 75.75.75.75     nameserver 75.75.76.76     search hsd1.va.comcast.net      and ifconfig:               eth0      Link encap:Ethernet  HWaddr 00:11:11:3e:05:b9                 inet addr:192.168.1.108  Bcast:192.168.1.255  Mask:255.255.255.0               inet6 addr: fe80::211:11ff:fe3e:5b9/64 Scope:Link               UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1               RX packets:2195 errors:0 dropped:0 overruns:0 frame:0               TX packets:657 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:1000                RX bytes:172376 (168.3 KiB)  TX bytes:84343 (82.3 KiB)               Interrupt:16       My setup has been working perfectly previously. I made no configuration changes, and I'm really not sure what I should do at this point.


using grep to show entries that match a pattern and are present at least X times

I have a file that have entries like this among other lines               Feb 16 17:30:18 ns1 dovecot: pop3-login: Disconnected (auth failed, 1 attempts in 17 secs): user=<accountin@myserver.com>, method=PLAIN, rip=200.250.9.210, lip=10.10.10.10, session=<Sed519rVnADI+gnS>      Every time one line like this is found, I want to extract the IPs associated on the rip part but I want to extract IPs that shows at least 3 times. I am trying to use grep to do this. This is the grep I have               more /var/log/maillog-20130217 | grep "auth failed" | grep -o '(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4     ][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)'       this grep shows all IPs that are in the matching lines How do I limit this grep to just show IPs if I have at least 3 matching lines with that IP and just unique IPs? I mean this. Suppose my log has this               Feb 16 17:30:18 ns1 dovecot: pop3-login: Disconnected (auth failed, 1 attempts in 17 secs): user=<accountin@myserver.com>, method=PLAIN, rip=200.250.9.210, lip=10.10.10.10, session=<Sed519rVnADI+gnS>     Feb 16 17:30:18 ns1 dovecot: pop3-login: Disconnected (auth failed, 1 attempts in 17 secs): user=<accountin@myserver.com>, method=PLAIN, rip=200.250.9.210, lip=10.10.10.10, session=<Sed519rVnADI+gnS>     Feb 16 17:30:18 ns1 dovecot: pop3-login: Disconnected (auth failed, 1 attempts in 17 secs): user=<accountin@myserver.com>, method=PLAIN, rip=20.20.20.20, lip=10.10.10.10, session=<Sed519rVnADI+gnS>     Feb 16 17:30:18 ns1 dovecot: pop3-login: Disconnected (auth failed, 1 attempts in 17 secs): user=<accountin@myserver.com>, method=PLAIN, rip=200.250.9.210, lip=10.10.10.10, session=<Sed519rVnADI+gnS>      I would like to use grep and obtain 200.250.9.210 because I have 3 lines there with this IP, but not 20.20.20.20 that appears just one time. What I have when I run my grep I have is this               200.250.9.210     200.250.9.210     20.20.20.20     200.250.9.210      or in other words, it is listing all IPs that are in matching lines. thanks.


Accessing a SMB share without a password

When accessing SMB shared that are password-protected, `smbclient` works just fine. But when I'm trying to access shared that have no password protection (public shares), `smbclient` prints:               tree connect failed: NT_STATUS_ACCESS_DENIED      How can I access those shares? I'm trying to access Windows 7 from my Ubuntu 12.10


pkg: fail to extract pkg-static, New to UNIX

I am very new to UNIX, running FreeBSD 10 on an ASUS M50VM series laptop. I was following along with the handbook to the point at which it gets into using pkg to find software. Every time I run pkg, with or without options or arguments, I get the following output:               $ pkg     The package management tool is not yet installed on your system.     Do you want to fetch and install it now [y/N]: y     Bootstrapping pkg from pkg+http://pkg.FreeBSD.org/freebsd:10:x86:64/latest, please wait...     Verifying signature with trusted certificate pkg.freebsd.org.2013102301... done     pkg: fail to extract pkg-static     $      My FreeBSD laptop is connected with an Ethernet cable to my router, which I know is providing Internet access, as the Windows desktop I am currently using to post this question is also connected with a similar cable to the same router. I tried searching for the error message on Google, but most of what I found appeared to be dealing with different problems from mine. What am I missing? What are possible causes of this issue? What should I check? Thank you!


Chromecast / Cubetek Ezcast with Linux computer?

I was pondering getting a Google Chromecast or Cubetek Ezcast the other day, mostly for its novelty and maybe using it as a media player or device to conduct presentations. The way they set up, with the whole DIAL technology seems a little weird to me, but that may or may not be due to the reason I've never seen it in action. I know however, that there are issues with some routers. This is a concern, as I have OpenWrt routers, only. I know the control app runs on Android, but what about my Linux laptop and/or desktop/workstation? I know Chrome uses a Chrome app, but is it gonna work if the client doesn't have a WLAN radio, but is otherwise connected to a wireless network access point (bridging both networks, mind you)? And what about OpenWrt, is it gonna work out of the box? * * * Now, there are at least two ways how I'd like to use the stick:   * As media player - pretty much in stand-alone mode, either playing streams off the internet   * As presentation dongle - so I can "take control" of any TV or projector featuring an HDMI port and use that for conducting a presentation or show a video, etc. Are my use cases even covered by that? The idea is not to attach it permanently to my home TV, but instead have it with me on the go. The form factor almost implies mobility, even though attaching power to it seems a bit weird. Both use cases should be covered by using my (Android) tablet, and Linux laptop. * * * In case I'm investigating the totally wrong cave, please suggest alternatives.


If a start-up script in `init.d` has standard output, where is that logged if anywhere?

We have a startup script that is symbolicly linked to `/etc/rc0.d/K01ourapp`. Apparently, it is not working as expected during shutdown. The script actually does a few `echo` calls that may help in troubleshooting. Where does that output get logged (if anywhere)? I am using RHEL5.


How to check which SSH keys are currently 'active'?

How might one check which .rsa, .pem, and other files are 'loaded' or 'active' by `ssh-add`? I just had this scare:               $ scp -i /home/dotancohen/.ssh/dotancohen.pem someUser@1.2.3.4:~/files.tgz .     Warning: Identity file /home/dotancohen/.ssh/dotancohen.pem not accessible: No such file or directory.     files.tgz                                                                100%   89MB   1.5MB/s   00:59     $ scp someUser@1.2.3.4:~/all_git.tgz .      files.tgz                                                                100%   89MB   1.7MB/s   00:54      After verifying that the server does in fact require the .pem key, I would now like to know which other keys are loaded without me knowing about it! Thanks.


usb partition creation

When I am doing dmesg after plug in my SD card to do partition               [ 4611.940660] sd 7:0:0:0: [sdb] Assuming drive cache: write through     [ 4611.944440]  sdb: unknown partition table     [ 4611.949411] sd 7:0:0:0: [sdb] No Caching mode page present     [ 4611.949419] sd 7:0:0:0: [sdb] Assuming drive cache: write through     [ 4611.949424] sd 7:0:0:0: [sdb] Attached SCSI removable disk     [ 4966.868425] end_request: I/O error, dev fd0, sector 0      First of all I think this is because of Linux kernel it can't reading (some problem with kernel) but when I just run a command for partition details               sudo /dev/sdb [sdb is my device name ]     Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel     Building a new DOS disklabel with disk identifier 0x9b17bdaf.     Changes will remain in memory only, until you decide to write them.     After that, of course, the previous content won't be recoverable.     Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)      Can anybody give me a solution for this?


Is it possible to tell df to use /proc/mounts instead of /etc/mtab?

Installing gentoo in chroot I found that commands like `mount` and `df` doesn't work: they try to read file `/etc/mtab` (which of course is empty). Can I (for future use) setup or even recompile them so, that they won't read `/etc/mtab`, taking all needed info from `/proc`?


What is the correct way of setting up a Squid Proxy in front of wireless router

We are a small office of 20 users. Our current network is like below. We have a static IP on the Wireless Router's WAN port.               Local network <-> Wireless Router <-> Cable Internet      I want to put in a Linux box that will run Squid and ownCloud, like below. The ISP's static IP will shift to the Linux box, which will connect to the router's WAN port.               Local network <-> Wireless Router <-> Linux box <-> Cable Internet        1. Is it possible to configure Squid such that users who connect to the Router do not have to configure any proxy for themselves but (and?) are forced to go through the proxy?   2. I want to set up whitelists for certain users. Is it possible to enforce whitelists based on ACLs?   3. How will the ACLs work on mobile devices?


How to find out how much of internet bandwidth is used by all processes except one specific process?

As a followup question to this one: I am downloading a file on multiple remote computers using `curl` command and am using the `\--limit-rate` parameter to limit the download speed on the ones whose internet is being used: > curl --limit-rate 10k -r 104857601-209715200 -o distro2.iso > 'http://files.cdn/distro.iso' So I have to periodically monitor the internet usage of each computer (like every 5 seconds), and dynamically decrease the `\--limit-rate` once the internet is being used by the user and increase it as the internet usage becomes idle. So the only thing that I need to know is whether the user of remote computer is using their internet (like browsing the web, or downloading a file). Is there any easy way to find out this? I think I have to obtain the PID of `curl` and exclude it from the list of applications that are using internet to find out whether any other application is using internet. I just don't know which command is better to use. Using commands that do not require sudo privileges are preferred. Any advice would be greatly appreciated!


Debian: Is it possible/safe to install packages from an older version of the repository?

I'm currently running Debian testing (Wheezy) and am trying to get SCIM working. I want to install the scim-pinyin package, but there is no such package available in the testing repository, although there was one in the previous stable (Squeeze) repository. There is a copy of the package in unstable but not for my architecture (amd64). Looking at the package versions, I notice that the version in the stable repositories is the same as that in unstable. This being the case, I have two questions:   1. Is there any reason why I can't install a package from an older repository since I would assume that most Squeeze packages will probably have their dependencies met by the package versions currently in testing?   2. What is the best way to achieve this? (Add the Squeeze repository to `sources.list`? Download the Squeeze package and install it manually?)


call a script if a zenity window is minimized, resized or moved

I would like to add an event-catcher, if my the `zenity` window gets minimized, resized or moved. I already call a script if the window is closed or the button is pressed in my typebreak script But I would also like to catch minimizing, resizing and moving of the zenity window too, so I can then also call the `mouse-speed` script inside my `typebreak` script. I use Unity on Ubuntu but the script already works on different window- managers too.


Problem with patching file with .diff

I having some trouble adding .diff patch to a file. Patch file itself seems to be fine but it keeps giving error:               root@pipiripi:/home/tomek/mad# patch mifare-mad.pl < pastie1.diff     patching file mifare-mad.pl     patch: **** malformed patch at line 434:        And the code of patch is:               --- mifare-mad.pl   2011-02-06 08:41:06.000000000 +0100     +++ mifare-mad.pl   2012-06-28 10:59:36.000000000 +0200     @@ -7,16 +7,20 @@      # MIFARE Application Directory (MAD)      # http://www.nxp.com/acrobat_download2/other/identification/MAD_overview.pdf          -use Data::Dump qw(dump);     +use Data::Dumper;           my $debug = $ENV{DEBUG} || 0;           my $function_clusters;      my $mad_id;     +my $wkm_ttid;     +my $wkm_pos;     +my $wkm_line;           while(<DATA>) {         chomp;         next if m/^#?\s*$/;     +   $_=~s/\s+#.*//;         my ( $code, $function ) = split(/\s+/,$_,2);         my $h = '[0-9A-F]';         if ( $code =~ m/^($h{2})-($h{2})$/ ) {     @@ -25,6 +29,15 @@             }         } elsif ( $code =~ m/^($h{2})$/ ) {             $function_clusters->{ lc $code } = $function;     +   } elsif ( $code =~ m/^WKM_TTID:($h{2})$/i ) {     +       my (undef,$ttid) = split(/:/,$code,2);     +       $wkm_ttid->{lc $ttid}=$function;     +   } elsif ( $code =~ m/^WKM_POS:($h{2})$/i ) {     +       my (undef,$pos) = split(/:/,$code,2);     +       $wkm_pos->{lc $pos}=$function;     +   } elsif ( $code =~ m/^WKM_LINE:(\d+|\d+x\d+)$/i ) {     +       my (undef,$line) = split(/:/,$code,2);     +       $wkm_line->{lc $line}=$function;         } elsif ( $code =~ m/^($h{4})$/ ) {             $mad_id->{ lc $1 } = $function;         } else {     @@ -32,6 +45,10 @@         }      }          +sub bin2dec {     +    return unpack("N", pack("B32", substr("0" x 32 . shift, -32)));     +}     +      my $access_condition_data = {      0b000 => 'R:AB W:AB I:AB DTR:AB transport conf',      0b010 => 'R:AB W:-- I:-- DTR:-- r/w block',     @@ -62,8 +79,10 @@                if ( $debug ) {     -   warn "# function_clusters ",dump($function_clusters);     -   warn "# mad_id ", dump($mad_id);     +   warn "# function_clusters ",Dumper($function_clusters);     +   warn "# mad_id ", Dumper($mad_id);     +   warn "# wkm_ttid ", Dumper($wkm_ttid);     +   warn "# wkm_line ", Dumper($wkm_line);      }           local $/ = undef;     @@ -76,6 +95,9 @@           my $pos = 0;          +my $wkm=0;     +my $zdm=0;     +      foreach my $sector ( 0 .. 39 ) {              my $blocks = $sector < 32 ? 4 : 16;     @@ -151,6 +173,7 @@             ;              my $condition = '';     +         foreach my $j ( 0 .. $blocks - 1 ) {             my $offset = $pos + $j * 0x10;             my $block = substr($card, $offset, 0x10);     @@ -188,6 +211,7 @@                  my $hex = unpack('H*',$block);             $hex =~ s/(....)/$1 /g;     +       $hex =~ s/0000/..../g; #/k./                  if ( $ENV{SWAP} ) {                 my $hex_sw = unpack('h*',$block);     @@ -196,6 +220,100 @@             }                  printf "%x %03x  %s%s\n", $j, $offset, $hex, $condition;     +     +       # -----------------     +     +       if ($sector == 1 and $j == 0 and substr($block,0,1) eq "\x10") {     +           $wkm = 1;     +           my (undef,$ttid,undef,$pos,undef) = unpack('H2 H2 H8 H2 H*',$block);     +           my ($card_b1, $card_b2, $card_b3, $card_b4) = unpack('H2 H2 H2 H2',substr($card,0,4));     +           printf "# WKM: karta nr %03d %08d\n# WKM: [numer kontraktu %d] %s (%s) POS: %s\n", hex($card_b4), hex($card_b3 . $card_b2 . $card_b1), hex($ttid), ($wkm_ttid->{$ttid})?$wkm_ttid->{$ttid}:'kontrakt nieznany', (hex($ttid)%2==1)?'stara taryfa':'nowa taryfa',($wkm_pos->{$pos})?$wkm_pos->{$pos}:$pos;     +       }     +     +       if ($wkm and $sector == 1 and $j == 1) {     +           my $selector = unpack('H*',substr($block,0,1));     +           printf "# WKM: ostatnie skasowanie w sektorze %s\n", $selector+2;     +       }     +     +       if ($wkm and ($sector == 2 or $sector == 3) and $j == 0 and substr($block,0,1) eq "\x10") {     +           my (undef,$ti,$ty,$tm,$td,$th,$tt,$vy,$vm,$vd,$vh,$vt,$vl,$vb,$vs)=unpack('A8 A8 A7 A4 A5 A5 A6 A7 A4 A5 A5 A6 A14 A10 A*',unpack('B*',$block));     +           # print Dumper($tt,$ti,$ty,$tm,$td,$th,$tt,$vy,$vm,$vd,$vh,$vt,$vl,$vb,$vs);     +           printf "# WKM: [skasowanie %d]\n# WKM:   kontrakt wazny do: 20%02d/%02d/%02d %02d:%02d\n# WKM:   bilet skasowany w: 20%02d/%02d/%02d %02d:%02d linia: %s %s: %s%s\n",      +               &bin2dec($ti),     +               &bin2dec($ty),     +               &bin2dec($tm),     +               &bin2dec($td),     +               &bin2dec($th),     +               &bin2dec($tt),     +               &bin2dec($vy),     +               &bin2dec($vm),     +               &bin2dec($vd),     +               &bin2dec($vh),     +               &bin2dec($vt),     +               # &bin2dec($vl),     +               ($wkm_line->{&bin2dec($vl)})?$wkm_line->{&bin2dec($vl)}:&bin2dec($vl),     +               # &bin2dec($vb),     +               ($wkm_line->{(&bin2dec($vl).'x'.&bin2dec($vb))})?'stacja':'brygada',     +               ($wkm_line->{(&bin2dec($vl).'x'.&bin2dec($vb))})?$wkm_line->{(&bin2dec($vl).'x'.&bin2dec($vb))}:&bin2dec($vb),     +               ($vs>0)?(' extra dane: '.&bin2dec($vs)):'';     +       }     +     +       # -----------------     +     +       if ($sector == 7 and $j == 0 and substr($block,0,2) eq "\x01\x01") {     +           $zdm = 1;     +           my (undef, # trailer \x01\x01     +               $loadno,     +               undef, # always \x00     +               $loadday,     +               $loadmonth,     +               $loadyear,     +               $validday,     +               $validmonth,     +               $validyear,     +               $pos_group,     +               $pos_no,     +               $unknown1,     +               $unknown2) # ???     +               = unpack('v c c c c v c c v c c H2 H2', $block);     +           printf "# ZDM: karta zaladowana %d raz, data ladowania: %04d/%02d/%02d, data waznosci %04d/%02d/%02d, punkt sprzedazy: %03d\\%d extra 2 bajty: %s %s\n", $loadno, $loadyear, $loadmonth, $loadday, $validyear, $validmonth, $validday, $pos_no, $pos_group, $unknown1, $unknown2;     +       }     +     +       if ($zdm and $sector == 7 and ($j == 1 or $j == 2)) {     +           my ($credits1,     +               $const_0000,     +               $checksum,     +               $const_ffff,     +               $credits2,     +               $const_000000ff00ff)     +               = unpack ('v H4 v H4 v H12', $block);     +           printf "# ZDM: Unexpected value %s - should be 0000\n", $const_0000 if $const_0000 ne '0000';     +           printf "# ZDM: Unexpected value %s - should be ffff\n", $const_ffff if $const_ffff ne 'ffff';     +           printf "# ZDM: Unexpected value %s - should be 000000ff00ff\n", $const_000000ff00ff if $const_000000ff00ff ne '000000ff00ff';     +           printf "# ZDM: Credits mismatch\n" if $credits1 ne $credits2;     +           printf "# ZDM: Verify mismatch\n" if 65535 - $credits1 ne $checksum; # (0xffff - credits = checksum)     +           printf "# ZDM: [%s] %.2f zl\n", ($j==1)?'srodki na karcie':'wartosc doladowania', $credits1/10;     +       }     +     +       if ($zdm and $sector == 8 and $j == 0) {     +           my ($transday,     +               $transmonth,     +               $unknown1,     +               $transhour,     +               $transminute,     +               $const1,     +               $transno,     +               $transval,     +               $const2,     +               $transid,     +               $unknown2)     +               = unpack ('c c H2 c c H6 c v H4 v H2', $block);     +           printf "# ZDM: Unexpected value %s - should be 000000\n", $const1 if $const1 ne '000000';     +           printf "# ZDM: Unexpected value %s - should be 0000\n", $const2 if $const2 ne '0000';     +           printf "# ZDM: [ostatnia tranzakcja] dzien=%02d miesiac=%02d godzina=%02d:%02d numer=%d identyfikator=%d oplata=%.2f zl, extra 2 bajty: %s %s\n", $transday, $transmonth, $transhour, $transminute, $transno, $transid, $transval/10, $unknown1, $unknown2 if $transval ne 0;     +       }     +     +       # -----------------         }              printf "KEY A:%s | %s GDP: %s | B:%s %s\n"     @@ -292,3 +410,243 @@      887C - electronic purse MIKROELEKTRONIKA spol.s.r. MIKROELEKTRONIKA spol.s.r.o. Europe         4 01.05.2009 electronic purse      887D - electronic purse Mikroelektronika spol.s r.o Mikroelektronika spol.s r.o EUROPE,Czech R 4 01.08.2009 Electronic purse          +WKM_TTID:00 czysty bilet     +WKM_TTID:02 bilet jednorazowy strefa 1, normalny     +WKM_TTID:16 bilet dobowy strefa 1, normalny     +WKM_TTID:18 bilet trzydniowy strefa 1, normalny     +WKM_TTID:21 bilet dobowy strefa 1, normalny (nowa)     +WKM_TTID:22 bilet trzydniowy strefa 1, normalny     +WKM_TTID:23 bilet dobowy strefa 1, normalny     +WKM_TTID:24 bilet trzydniowy strefa 1, normalny     +WKM_TTID:25 bilet siedmiodniowy strefa 1, normalny     +WKM_TTID:27 bilet 14-dniowy strefa 1, normalny     +WKM_TTID:29 bilet 30-dniowy imienny na 1 linie strefa 1, normalny     +WKM_TTID:2a bilet 30-dniowy imienny na wszystkie linie strefa 1, normalny     +WKM_TTID:2b bilet 30-dniowy imienny na wszystkie linie strefa 1, normalny     +WKM_TTID:2e bilet 90-dniowy imienny na wszystkie linie strefa 1, normalny     +WKM_TTID:2f bilet 90-dniowy imienny na wszystkie linie strefa 1, normalny     +WKM_TTID:34 bilet jednorazowy strefa 1, ulgowy 50     +WKM_TTID:48 bilet dobowy strefa 1, ulgowy 50     +WKM_TTID:4a bilet trzydniowy strefa 1, ulgowy 50     +WKM_TTID:53 bilet dobowy strefa 1, ulgowy 50     +WKM_TTID:54 bilet trzydniowy strefa 1, ulgowy 50     +WKM_TTID:55 bilet dobowy strefa 1, ulgowy 50     +WKM_TTID:56 bilet trzydniowy strefa 1, ulgowy 50     +WKM_TTID:57 bilet siedmiodniowy strefa 1, ulgowy 50     +WKM_TTID:59 bilet 14-dniowy strefa 1, ulgowy 50     +WKM_TTID:5b bilet 30-dniowy imienny na 1 linie strefa 1, ulgowy 50     +WKM_TTID:5c bilet 30-dniowy imienny na wszystkie linie strefa 1, ulgowy 50      +WKM_TTID:5d bilet 30-dniowy imienny na wszystkie linie strefa 1, ulgowy 50     +WKM_TTID:60 bilet 90-dniowy imienny na wszystkie linie strefa 1, ulgowy 50     +WKM_TTID:61 bilet 90-dniowy imienny na wszystkie linie strefa 1, ulgowy 50     +WKM_TTID:66 bilet jednorazowy strefa 1+2, normalny     +WKM_TTID:6f bilet 20 minutowy strefa 1+2, normalny     +WKM_TTID:70 bilet 40 minutowy strefa 1+2, normalny     +WKM_TTID:71 bilet 60 minutowy strefa 1+2, normalny     +WKM_TTID:7a bilet dobowy strefa 1+2, normalny     +WKM_TTID:7c bilet trzydniowy strefa 1+2, normalny     +WKM_TTID:85 bilet dobowy strefa 1+2, normalny     +WKM_TTID:86 bilet trzydniowy strefa 1+2, normalny     +WKM_TTID:87 bilet dobowy strefa 1+2, normalny     +WKM_TTID:88 bilet trzydniowy strefa 1+2, normalny     +WKM_TTID:89 bilet siedmiodniowy strefa 1+2, normalny     +WKM_TTID:8b bilet 14-dniowy strefa 1+2, normalny     +WKM_TTID:8d bilet 30-dniowy imienny na 1 linie strefa 1+2, normalny     +WKM_TTID:8e bilet 30-dniowy imienny na wszystkie linie strefa 1+2, normalny     +WKM_TTID:8f bilet 30-dniowy imienny na wszystkie linie strefa 1+2, normalny     +WKM_TTID:90 bilet 30-dniowy na okaziciela na wszystkie linie strefa 1+2, normalny     +WKM_TTID:91 bilet 30-dniowy na okaziciela na wszystkie linie strefa 1+2, normalny     +WKM_TTID:92 bilet 90-dniowy imienny na wszystkie linie strefa 1+2, normalny     +WKM_TTID:93 bilet 90-dniowy imienny na wszystkie linie strefa 1+2, normalny     +WKM_TTID:94 bilet 90-dniowy na okaziciela na wszystkie linie strefa 1+2, normalny     +WKM_TTID:95 bilet 90-dniowy na okaziciela na wszystkie linie strefa 1+2, normalny     +WKM_TTID:96 bilet seniora, waĹźny 365 dni na wszystkie linie strefa 1+2     +WKM_TTID:98 bilet jednorazowy strefa 1+2, ulgowy     +WKM_TTID:a1 bilet 20 minutowy strefa 1+2, ulgowy     +WKM_TTID:a2 bilet 40 minutowy strefa 1+2, ulgowy     +WKM_TTID:a3 bilet 60 minutowy strefa 1+2, ulgowy     +WKM_TTID:ac bilet dobowy strefa 1+2, ulgowy     +WKM_TTID:ae bilet trzydniowy strefa 1+2, ulgowy     +WKM_TTID:b7 bilet dobowy strefa 1+2, ulgowy     +WKM_TTID:b8 bilet trzydniowy strefa 1+2, ulgowy     +WKM_TTID:b9 bilet dobowy strefa 1+2, ulgowy     +WKM_TTID:ba bilet trzydniowy strefa 1+2, ulgowy     +WKM_TTID:bb bilet siedmiodniowy strefa 1+2, ulgowy     +WKM_TTID:bd bilet 14-dniowy strefa 1+2, ulgowy     +WKM_TTID:bf bilet 30-dniowy imienny na 1 linie strefa 1+2, ulgowy     +WKM_TTID:c0 bilet 30-dniowy imienny na wszystkie linie strefa 1+2, ulgowy     +WKM_TTID:c1 bilet 30-dniowy imienny na wszystkie linie strefa 1+2, ulgowy     +WKM_TTID:c2 bilet 30-dniowy na okaziciela na wszystkie linie strefa 1+2, ulgowy     +WKM_TTID:c3 bilet 30-dniowy na okaziciela na wszystkie linie strefa 1+2, ulgowy     +WKM_TTID:c4 bilet 90-dniowy imienny na wszystkie linie strefa 1+2, ulgowy     +WKM_TTID:c5 bilet 90-dniowy imienny na wszystkie linie strefa 1+2, ulgowy     +WKM_TTID:c6 bilet 90-dniowy na okaziciela na wszystkie linie strefa 1+2, ulgowy     +WKM_TTID:c7 bilet 90-dniowy na okaziciela na wszystkie linie strefa 1+2, ulgowy     +WKM_TTID:d2 ??? 210 bilet nieznany - pokazuje wersje kasownika bez blokowania (pracowniczy?) - waĹźny 3 lata od skasowania     +WKM_TTID:d3 "przepustka na stacje metra" (pasazerska/HDK/70+)     +WKM_TTID:d4 "przepustka na stacje metra" (pasazerska/HDK/70+)     +WKM_TTID:d6 "przepustka na stacje metra" (SOM/policja/obsluga techniczna), waĹźny rok od skasowania     +WKM_TTID:dd "ZTM pass - karta testowa", waĹźny rok od skasowania     +WKM_TTID:e7 bilet pracowniczy ZTM, waĹźny rok od skasowania     +WKM_TTID:e8 bilet pracowniczy MZA, waĹźny rok od skasowania     +WKM_TTID:e9 bilet pracowniczy TW, waĹźny rok od skasowania     +WKM_TTID:ea bilet pracowniczy MW, waĹźny rok od skasowania     +WKM_TTID:eb bilet pracowniczy SKM, waĹźny rok od skasowania     +WKM_TTID:ef bilet dzieci z rodzin wielodzietnych, waĹźny rok od skasowania     +WKM_TTID:f0 bilet osoby niepeĹnosprawnej, waĹźny rok od skasowania     +WKM_TTID:f5 ??? 245 bilet nieznany - "poza dozwolonym terminem uzycia"     +WKM_TTID:fa "precode" (nie rozpoznawany przez kasowniki)     +WKM_TTID:fe "navette" (karta kontrolerska)     +WKM_TTID:ff admin     +     +WKM_POS:01 POP ZTM     +WKM_POS:15 Mennica     +WKM_POS:2a ASEC     +     +WKM_LINE:81 WKD # prooved     +     +WKM_LINE:91 METRO LINIA 1 # prooved     +WKM_LINE:91x1 Kabaty # prooved     +WKM_LINE:91x2 Natolin # prooved     +WKM_LINE:91x3 Imielin # prooved     +WKM_LINE:91x4 Stoklosy # prooved     +WKM_LINE:91x5 Ursynow # prooved     +WKM_LINE:91x6 Sluzew # prooved     +WKM_LINE:91x7 Wilanowska # prooved     +WKM_LINE:91x8 Wierzbno # prooved     +WKM_LINE:91x9 Raclawicka # prooved     +WKM_LINE:91x10 Pole Mokotowskie # prooved     +WKM_LINE:91x11 Politechnika # prooved     +WKM_LINE:91x12 Centrum # prooved     +WKM_LINE:91x13 Swietokrzyska # prooved     +WKM_LINE:91x14 Ratusz Arsenal # prooved     +WKM_LINE:91x15 Dw. Gdanski # prooved     +WKM_LINE:91x16 Pl. Wilsona # prooved     +WKM_LINE:91x17 Marymont # prooved     +WKM_LINE:91x18 Slodowiec # prooved     +WKM_LINE:91x19 Stare Bielany # prooved     +WKM_LINE:91x20 Wawrzyszew # prooved     +WKM_LINE:91x21 Mlociny # prooved     +WKM_LINE:92 METRO LINIA 2 # guess     +     +WKM_LINE:1001 Z-1 # guess     +WKM_LINE:2901 Z-1 # prooved     +WKM_LINE:1005 Z-5 # prooved (wk)     +WKM_LINE:2905 Z-5 # prooved (wk)     +WKM_LINE:1009 Z-9 # prooved     +WKM_LINE:2909 Z-9 # guess     +WKM_LINE:1019 Z19 # guess     +WKM_LINE:2919 Z19 # guess     +WKM_LINE:1019 Z19 # guess     +WKM_LINE:2919 Z19 # guess     +     +WKM_LINE:3001 L-1 # guess     +WKM_LINE:3002 L-2 # guess     +WKM_LINE:3003 L-3 # guess     +WKM_LINE:3004 L-4 # guess     +WKM_LINE:3005 L-5 # guess     +WKM_LINE:3006 L-6 # guess     +WKM_LINE:3007 L-7 # prooved (wk)     +WKM_LINE:3008 L-8 # guess     +WKM_LINE:3009 L-9 # guess     +WKM_LINE:3010 L10 # guess     +WKM_LINE:3011 L11 # guess     +WKM_LINE:3013 L13 # guess     +WKM_LINE:3014 L14 # guess     +WKM_LINE:3015 L15 # guess     +WKM_LINE:3016 L16 # guess     +WKM_LINE:3017 L17 # guess     +WKM_LINE:3018 L18 # guess     +     +WKM_LINE:601 N01  # guess     +WKM_LINE:6001 N01 # guess     +WKM_LINE:602 N02  # guess     +WKM_LINE:6002 N02 # guess     +WKM_LINE:603 N03  # guess     +WKM_LINE:6003 N03 # guess     +WKM_LINE:611 N11  # guess     +WKM_LINE:6011 N11 # prooved     +WKM_LINE:612 N12  # guess     +WKM_LINE:6012 N12 # guess     +WKM_LINE:613 N13  # guess     +WKM_LINE:6013 N13 # prooved     +WKM_LINE:614 N14  # guess     +WKM_LINE:6014 N14 # guess     +WKM_LINE:622 N22  # guess     +WKM_LINE:6022 N22 # guess     +WKM_LINE:624 N24  # guess     +WKM_LINE:6024 N24 # prooved     +WKM_LINE:625 N25  # guess     +WKM_LINE:6025 N25 # prooved     +WKM_LINE:631 N31  # guess     +WKM_LINE:6031 N31 # prooved     +WKM_LINE:632 N32  # guess     +WKM_LINE:6032 N32 # prooved     +WKM_LINE:633 N33  # guess     +WKM_LINE:6033 N33 # prooved     +WKM_LINE:634 N34  # guess     +WKM_LINE:6034 N34 # prooved     +WKM_LINE:635 N35  # guess     +WKM_LINE:6035 N35 # prooved     +WKM_LINE:636 N36  # guess     +WKM_LINE:6036 N36 # prooved     +WKM_LINE:637 N37  # prooved     +WKM_LINE:6037 N37 # guess     +WKM_LINE:638 N38  # guess     +WKM_LINE:6038 N38 # guess     +WKM_LINE:641 N41  # guess     +WKM_LINE:6041 N41 # guess     +WKM_LINE:642 N42  # prooved     +WKM_LINE:6042 N42 # guess     +WKM_LINE:643 N43  # guess     +WKM_LINE:6043 N43 # prooved     +WKM_LINE:644 N44  # guess     +WKM_LINE:6044 N44 # prooved     +WKM_LINE:645 N45  # guess     +WKM_LINE:6045 N45 # guess     +WKM_LINE:646 N46  # prooved     +WKM_LINE:6046 N46 # guess     +WKM_LINE:650 N50  # guess     +WKM_LINE:6050 N50 # guess     +WKM_LINE:652 N52  # guess     +WKM_LINE:6052 N52 # guess     +WKM_LINE:653 N53  # guess     +WKM_LINE:6053 N53 # guess     +WKM_LINE:658 N58  # guess     +WKM_LINE:6058 N58 # guess     +WKM_LINE:661 N61  # guess     +WKM_LINE:6061 N61 # guess     +WKM_LINE:662 N62  # prooved     +WKM_LINE:6062 N62 # guess     +WKM_LINE:663 N63  # guess     +WKM_LINE:6063 N63 # guess     +WKM_LINE:664 N64  # guess     +WKM_LINE:6064 N64 # guess     +WKM_LINE:671 N71  # guess     +WKM_LINE:6071 N71 # prooved     +WKM_LINE:672 N72  # guess     +WKM_LINE:6072 N72 # prooved     +WKM_LINE:675 N75  # guess     +WKM_LINE:6075 N75 # guess     +WKM_LINE:681 N81  # guess     +WKM_LINE:6081 N81 # guess     +WKM_LINE:683 N83  # guess     +WKM_LINE:6083 N83 # guess     +WKM_LINE:685 N85  # guess     +WKM_LINE:6085 N85 # guess     +WKM_LINE:688 N88  # guess     +WKM_LINE:6088 N88 # guess     +WKM_LINE:691 N91  # guess     +WKM_LINE:6091 N91 # guess     +WKM_LINE:695 N95  # guess     +WKM_LINE:6095 N95 # guess     +     +WKM_LINE:9002 E-2 # prooved (wk)     +WKM_LINE:9004 E-4 # guess     +WKM_LINE:9006 E-6 # guess     +WKM_LINE:9008 E-8 # guess     +     +WKM_LINE:9101 S1 # prooved     +WKM_LINE:9102 S2 # guessed     +WKM_LINE:9109 S9 # guessed      So I belive patch code is ok as it contains + at line 434, so am I using wrong arguments? What is the reason I get this error code?


mc: edit skin color

I am trying to edit color skins for midnight commander. When using 256 color palette, the colors are called `color1` to `color255`. I am looking for particular tone of blue. Is there a palette of all 256 colors, where I can choose from? So that I can actually see that `color24` is dark blue, etc.


How to use specify version of ruby for shell script with rbenv?

I'm going to write some short script in ruby. And I want to specify ruby version by shebang or in another way. I'll use the script in many environments. I'm using rbenv in the evironments, but it's not sure which version of ruby is installed. The script must fail if the specify version of ruby is not installed. How can I do it? Is there good way that I should follow?


Do we need to enable G++ on RHEL 6.1

I have RHEL6.1 but I can't compile using `g++`, when I execute `g++`, I get the below :               -bash: g++: command not found      so I assume I don't have g++ but I do have gcc installed. When I run `gcc -v`. I get :               gcc -v     Using built-in specs.     Target: x86_64-redhat-linux     Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix       Please suggest. Do I need to install `g++` separately or is it already installed and I have to enable it from somewhere. EDIT : On running : yum install gcc-c++ I get the below output * * *               Loaded plugins: product-id, refresh-packagekit, subscription-manager     Updating Red Hat repositories.     Setting up Install Process     No package gcc-c++ available.     Error: Nothing to do


How to alias a command with '

I wanted to make an alias turn caps lock off:               python -c 'from ctypes import *; X11 = cdll.LoadLibrary("libX11.so.6"); display = X11.XOpenDisplay(None); X11.XkbLockModifiers(display, c_uint(0x0100), c_uint(2), c_uint(0)); X11.XCloseDisplay(display)'      I wrote this into my .zshrc:               alias caps='python -c 'from ctypes import *; X11 = cdll.LoadLibrary("libX11.so.6"); display = X11.XOpenDisplay(None); X11.XkbLockModifiers(display, c_uint(0x0100), c_uint(2), c_uint(0)); X11.XCloseDisplay(display)' '      But it seems that the problem is that I have `'` in the command (so it make an alias to a part of it). I tried to use:               alias caps=" python -c 'from ctypes import *; X11 = cdll.LoadLibrary("libX11.so.6"); display = X11.XOpenDisplay(None); X11.XkbLockModifiers(display, c_uint(0x0100), c_uint(2), c_uint(0)); X11.XCloseDisplay(display)' "      to see if something changed and I get python's sintax error. So how can I make an alias to a one-liner with `'` inside?


USB-ModeSwitch Problem [ Debian Wheezy ]

I'm trying to use a D-Link DWM-156 3G "dongle" on Debian Wheezy.I've tried to "UPGRADE" kernel from(3.2 to 3.12),But that's not effective and problem still exist.Now after reinstalling Debian(3.2 - 32bit) and install both of "USB- ModeSwitch" and "USB-ModeSwitch-Data" i get some error at OS boot up process (/var/log/syslog). Somthing like below :               Feb 22 15:21:23 localhost kernel: [  277.898148] usb 2-3: USB disconnect, device number 3     Feb 22 15:21:23 localhost kernel: [  277.898488] generic ttyUSB0: generic converter now disconnected from ttyUSB0     Feb 22 15:21:23 localhost kernel: [  277.898499] usbserial_generic 2-3:1.2: device disconnected     Feb 22 15:21:23 localhost kernel: [  277.898580] generic ttyUSB1: generic converter now disconnected from ttyUSB1     Feb 22 15:21:23 localhost kernel: [  277.898589] usbserial_generic 2-3:1.3: device disconnected     Feb 22 15:21:23 localhost kernel: [  277.898665] generic ttyUSB2: generic converter now disconnected from ttyUSB2     Feb 22 15:21:23 localhost kernel: [  277.898674] usbserial_generic 2-3:1.4: device disconnected     Feb 22 15:21:23 localhost kernel: [  277.898750] generic ttyUSB3: generic converter now disconnected from ttyUSB3     Feb 22 15:21:23 localhost kernel: [  277.898758] usbserial_generic 2-3:1.5: device disconnected     Feb 22 15:21:29 localhost kernel: [  283.860076] usb 2-3: new high-speed USB device number 5 using ehci_hcd     Feb 22 15:21:29 localhost kernel: [  283.996441] usb 2-3: New USB device found, idVendor=2001, idProduct=a706     Feb 22 15:21:29 localhost kernel: [  283.996451] usb 2-3: New USB device strings: Mfr=2, Product=3, SerialNumber=4     Feb 22 15:21:29 localhost kernel: [  283.996458] usb 2-3: Product: D-Link DWM-156     Feb 22 15:21:29 localhost kernel: [  283.996464] usb 2-3: Manufacturer: D-Link,Inc       Feb 22 15:21:29 localhost kernel: [  283.996469] usb 2-3: SerialNumber: 536591508069280     Feb 22 15:21:29 localhost kernel: [  283.997627] scsi7 : usb-storage 2-3:1.0     Feb 22 15:21:30 localhost kernel: [  284.997562] scsi 7:0:0:0: CD-ROM            HSPA USB SCSI CD-ROM      6225 PQ: 0 ANSI: 0 CCS     Feb 22 15:21:30 localhost kernel: [  285.001982] sr1: scsi3-mmc drive: 0x/0x caddy     Feb 22 15:21:30 localhost kernel: [  285.002952] sr 7:0:0:0: Attached scsi CD-ROM sr1     Feb 22 15:21:30 localhost kernel: [  285.003390] sr 7:0:0:0: Attached scsi generic sg2 type 5     Feb 22 15:21:30 localhost kernel: [  285.100863] usb 2-3: USB disconnect, device number 5     Feb 22 15:21:31 localhost kernel: [  285.888332] usb 2-3: new high-speed USB device number 6 using ehci_hcd     Feb 22 15:21:31 localhost kernel: [  286.024830] usb 2-3: New USB device found, idVendor=2001, idProduct=7d01     Feb 22 15:21:31 localhost kernel: [  286.024840] usb 2-3: New USB device strings: Mfr=9, Product=10, SerialNumber=0     Feb 22 15:21:31 localhost kernel: [  286.024847] usb 2-3: Product: D-Link DWM-156     Feb 22 15:21:31 localhost kernel: [  286.024852] usb 2-3: Manufacturer: D-Link,Inc       Feb 22 15:21:31 localhost kernel: [  286.026571] usbserial_generic 2-3:1.0: Generic device with no bulk out, not allowed.     Feb 22 15:21:31 localhost kernel: [  286.026590] usbserial_generic: probe of 2-3:1.0 failed with error -5     Feb 22 15:21:31 localhost kernel: [  286.027307] usbserial_generic 2-3:1.1: Generic device with no bulk out, not allowed.     Feb 22 15:21:31 localhost kernel: [  286.027324] usbserial_generic: probe of 2-3:1.1 failed with error -5     Feb 22 15:21:31 localhost kernel: [  286.027927] usbserial_generic 2-3:1.2: generic converter detected     Feb 22 15:21:31 localhost kernel: [  286.028350] usb 2-3: generic converter now attached to ttyUSB0     Feb 22 15:21:31 localhost kernel: [  286.029031] usbserial_generic 2-3:1.3: generic converter detected     Feb 22 15:21:31 localhost kernel: [  286.029181] usb 2-3: generic converter now attached to ttyUSB1     Feb 22 15:21:31 localhost kernel: [  286.029909] usbserial_generic 2-3:1.4: generic converter detected     Feb 22 15:21:31 localhost kernel: [  286.030082] usb 2-3: generic converter now attached to ttyUSB2     Feb 22 15:21:31 localhost kernel: [  286.030777] usbserial_generic 2-3:1.5: generic converter detected     Feb 22 15:21:31 localhost kernel: [  286.030989] usb 2-3: generic converter now attached to ttyUSB3     Feb 22 15:21:31 localhost kernel: [  286.031819] scsi8 : usb-storage 2-3:1.6     Feb 22 15:21:31 localhost udevd[4057]: failed to execute '/lib/udev/usb_modeswitch' 'usb_modeswitch --symlink-name /devices/pci0000:00/0000:00:1d.7/usb2/2-3/2-3:1.4/ttyUSB2/tty/ttyUSB2 2001 7d01 ': No such file or directory     Feb 22 15:21:31 localhost udevd[4060]: failed to execute '/lib/udev/usb_modeswitch' 'usb_modeswitch --symlink-name /devices/pci0000:00/0000:00:1d.7/usb2/2-3/2-3:1.3/ttyUSB1/tty/ttyUSB1 2001 7d01 ': No such file or directory     Feb 22 15:21:31 localhost udevd[4062]: failed to execute '/lib/udev/usb_modeswitch' 'usb_modeswitch --symlink-name /devices/pci0000:00/0000:00:1d.7/usb2/2-3/2-3:1.5/ttyUSB3/tty/ttyUSB3 2001 7d01 ': No such file or directory     Feb 22 15:21:32 localhost kernel: [  287.030231] scsi 8:0:0:0: Direct-Access     HSPA USB SCSI CD-ROM      6225 PQ: 0 ANSI: 0 CCS     Feb 22 15:21:32 localhost kernel: [  287.032846] sd 8:0:0:0: Attached scsi generic sg2 type 0     Feb 22 15:21:32 localhost kernel: [  287.036759] sd 8:0:0:0: [sdb] Attached SCSI removable disk     Feb 22 15:21:50 localhost udevd[4196]: failed to execute '/lib/udev/usb_modeswitch' 'usb_modeswitch --symlink-name /devices/pci0000:00/0000:00:1d.7/usb2/2-3/2-3:1.2/ttyUSB0/tty/ttyUSB0 2001 7d01 ': No such file or directory      Vendor and Product ID 's in `lsusb` output :               Bus 002 Device 006: ID 2001:7d01 D-Link Corp.      NOTICE : OS detected modem as `cdrom1` I'm confused :-? Could anybody help Regards,


What does it mean to install a kernel?

What does it mean to install a new version of the kernel. My Linux box gave me this message when I was updating, `NOTE, 3.8.13 was the last maintained maintenance release by Greg Kroah- Hartman. It is recommend to move on to linux310-series.` What I want to know is,   * Is it really that simple to only change the Linux kernel?   * Is the Linux kernel like a simple executable file that can be swapped out for another Linux kernel?   * What happens if I install a new kernel while the box is already running another version of the kernel?   * Right now I'm using Kernel 3.8.13.8-1. Is it really okay to move to the linux310-series as the above update message says?


What utilities do I need to begin android development on Ubuntu?

I already would work by some Cortex-A boards(for instance Cubieboard, Marsboard,...) I've already started working with integrated circuits:   * Cubieboard   * Marsboard I've been directed to learn linux, but this poses a problem. I don't have enough experience with it - like the changes between distributions. In my case, I'd like to use Android and Ubuntu - but I don't want to scope my knowledge to just Cortex-A boards. Recently I've been turned on to rawbrawb in this question that I can use Android for modules. To sum it up:   1. What toolchain(s) will I **need** to work with Android on Ubuntu?   2. Is the following package suitable for android experimentation? Free Download Android OS 4.1.1 Jelly Bean


How could I use Bash to find 2 bytes in a binary file, increase their values, and replace?

I'm trying to find two bytes inside binary file, then increase value of those two bytes and replace them inside file. Those two bytes are on positions 0x82-0x83. For now on I have successfully extracted those two bytes using this:               #!/usr/bin/env bash     BYTES=$(tail -c +131 "$1" | head -c 2)      Those bytes have value: `1B 1F`. I'm stuck with:   1. How to convert bytes to integer? It should be `6943` decimal.   2. How to append / echo binary data to file   3. How to write increased bytes inside file on positions 0x82-0x83. I could use `head -c 130 original.bin >> new_file.bin && magic_command_writing_bytes_to_file >> new_file.bin && tail -c +133 original.bin`, but there must be better way. I could do that in PHP, it should be easier, but I'm interested how to do this in bash.


when awake from hibernate, will the VIRT column of top command show the swap space used by process?

top - 10:43:31 up 8 days,  1:28,  4 users,  load average: 0.72, 0.57, 0.44     Tasks: 180 total,   1 running, 177 sleeping,   0 stopped,   2 zombie     %Cpu(s):  8.9 us,  2.1 sy,  0.0 ni, 88.9 id,  0.0 wa,  0.0 hi,  0.2 si,  0.0 st     KiB Mem:   8078124 total,  3815444 used,  4262680 free,   108300 buffers     KiB Swap:  9437180 total,  2448032 used,  6989148 free,   446248 cached          PID  USER      PR  NI  VIRT SWAP  RES CODE DATA  SHR S  %CPU %MEM    TIME+  COMMAND                           3274 root      20   0  160m 4392 6808 2400  80m 1684 S  13.2  0.1 245:09.29 wicd                              3451 root      20   0 79684 4900 2328 2400 6124  764 S   7.9  0.0 150:21.43 wicd-monitor                      2804 messageb  20   0 30200  232  856  392  756  408 S   6.6  0.0 128:20.46 dbus-daemon                       3856 cifer     20   0  411m 7524  28m 2400 150m 5904 S   1.3  0.4  20:34.23 wicd-client                       4226 cifer     20   0 1499m 197m  52m  86m 1.0g 6504 S   1.3  0.7 227:24.62 chromium        1087 cifer     20   0 1556m 458m 166m  86m 1.2g 9980 D   2.3  2.1   4:27.35 chromium       as you can see, I have 8G physical memory and just used 3.8G, I am sure I have never exceeded the 8G spaces, so, I think the 2.4G swap spaces used is just because of hibernating now, in top command, the VIRT and SWAP column shows that every process has used the swap space, I have add all the processes SWAP column, it seems a little smaller than 2.4G. Am I right? Is the swap using caused by hibernating? I have another question that the two chromium processes 's VIRT DATA columns look so high, is this possible?


why doesn't 0 0 * * 1 root hostname >> /tmp/hostname.txt work as a crontab?

0 0 * * 1 root hostname >> /tmp/hostname.txt      The above cron entry should run midnight on monday and create a file in `/tmp` called `hostname.txt` with the output of the `hostname` command. But it is just a blank file that is created. Why?


Advantage of symlinks over Windows style shortcuts

When I mainly used Windows, to make a shortcut, I could use a regular file detailing where it linked to, with the extension .lnk or .url Now, on Linux, I mainly use symbolic links, which are a filesystem-specific feature. Linux doesn't seem to have much support for file-based shortcuts, and Windows doesn't seem to have much support for symlinks. I can see the advantage to using file based shortcuts (Can be used on any file system). My question is, Why does linux use symlinks over file-based shortcuts, and on linux, how can I create shortcuts on file systems which don't support symlinks (eg FAT32)?


exit code of grep in trap where the script is launched by upstart service

recently I encountered a problem in ubuntu upstart and trap in bash shell. I use ubuntu 12.04 the upstart script(/etc/init/player.conf) is:               start on (local-filesystems and runlevel [2345])     stop on runlevel [06]          script         /tmp/test.sh     end script      the /tmp/test.sh is:               #!/bin/bash          TOKEN="token"     TOKEN_FILE="/tmp/token"     OUTPUT_FILE="/tmp/test_exit"     func()     {         grep "$TOKEN" "$TOKEN_FILE"; echo $? >> "$OUTPUT_FILE"; exit 0     }          trap 'trap "" INT TERM QUIT EXIT; func' INT TERM QUIT EXIT          rm -f "$OUTPUT_FILE"     echo "$TOKEN" > "$TOKEN_FILE"          grep "$TOKEN" "$TOKEN_FILE"; echo $? >> "$OUTPUT_FILE";          sleep 1000          exit 0      the test procedure is:               $sudo service player start     $sudo service player stop     $cat /tmp/test_exit     0     2      my question is, why the second result is 2, since the file(/tmp/token) is not changed, the grep should find the string("token") in that file("/tmp/token").


ISC DHCP Server - A Client's Uplink Is Not Working

Running a DHCP server, client(s) does not have up-link (0Mbps) and has a downlink (50Mbps.) I am setting up a gateway/router on a PC running Debian Wheezy with ISC-DHCP. I have 1 WAN (eth0) and 2 LAN (eth1, eth2) interfaces connected. Do I need an IP table rule to allow upload packets on eth1/eth2 to go out of eth0 to the Internet? The problem is that users cannot submit web forms or uploading data to websites. Below is interfaces and iptables outut:               cat /etc/network/interfaces          # This file describes the network interfaces available on your system# and how to activate them. For more information, see interfaces(5).          # The loopback network interface     auto lo     iface lo inet loopback          # The primary network interface     auto eth0     #iface eth0 inet6 auto     iface eth0 inet static             address 173.xxx.xxx.145             netmask 255.255.255.252             gateway 173.xxx.xxx.146          auto eth1     iface eth1 inet static             address 192.168.2.10             network 192.168.2.0             netmask 255.255.255.0          auto eth2     iface eth2 inet static             address 192.168.22.10             network 192.168.22.0             netmask 255.255.255.0                    iptables-save     # Generated by iptables-save v1.4.14 on Tue Jul 15 08:33:07 2014     *mangle     :PREROUTING ACCEPT [5430:3921752]     :INPUT ACCEPT [362:33625]     :FORWARD ACCEPT [5047:3846737]     :OUTPUT ACCEPT [187:27214]     :POSTROUTING ACCEPT [5234:3873951]     COMMIT     # Completed on Tue Jul 15 08:33:07 2014     # Generated by iptables-save v1.4.14 on Tue Jul 15 08:33:07 2014     *filter     :INPUT ACCEPT [285:25527]     :FORWARD ACCEPT [123:23976]     :OUTPUT ACCEPT [165:24524]     -A FORWARD -i eth0 -o eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT     -A FORWARD -i eth0 -o eth1 -j REJECT --reject-with icmp-port-unreachable     -A FORWARD -i eth1 -o eth0 -j ACCEPT     -A FORWARD -i eth0 -o eth2 -m state --state RELATED,ESTABLISHED -j ACCEPT     -A FORWARD -i eth0 -o eth2 -j REJECT --reject-with icmp-port-unreachable     -A FORWARD -i eth2 -o eth0 -j ACCEPT     COMMIT     # Completed on Tue Jul 15 08:33:07 2014     # Generated by iptables-save v1.4.14 on Tue Jul 15 08:33:07 2014     *nat     :PREROUTING ACCEPT [227:16114]     :INPUT ACCEPT [68:5796]     :OUTPUT ACCEPT [2:668]     :POSTROUTING ACCEPT [2:668]     -A POSTROUTING -s 192.168.2.0/24 ! -d 192.168.2.0/24 -j MASQUERADE     -A POSTROUTING -s 192.168.22.0/24 ! -d 192.168.22.0/24 -j MASQUERADE     -A POSTROUTING -s 192.168.50.0/24 -o eth0 -j MASQUERADE     -A POSTROUTING -o eth0 -j MASQUERADE     COMMIT     # Completed on Tue Jul 15 08:33:07 2014


What network protocols do database servers use?

I have a postgres 9.1 server running on the default port 5432 on an ubuntu 12.04 cloud server. I want to open up the port so I can make remote queries -- but I have to open the port on IP tables, which requires that I specify a protocol. This doc does not mention tcp/udp etc. What protocol should I permit in IP tables?


Disk is almost full on a server with CPanel

I have VHM system and I have a domain and two subdomain on this system. I tried to take a backup than after sometime I cannot access cpanel but I can access VHM. but some of the VHM options gives disk space error. which is: > The filesystem mounted at / on this server is running out of disk space. > cPanel operations have been temporarily suspended to prevent something bad > from happening. Please ask your system admin to remove any files not in use > on that partition. On VHM the disk information as follow: Disk information               Device  Mount point Usage        /dev/mapper/VolGroup00-home   /home   30% (126,759,988 of 458,391,760)     /dev/mapper/VolGroup00-root   /       100% (19,593,632 of 20,642,428)        /usr/tmpDSK                   /tmp    3% (10,601 of 495,844)


How to install dig on CentOS 6?

I can't find the dig command on my new CentOS 6 installation. I've tried `yum install dig` but it say it cannot find the package. How do I install dig on CentOS 6?


Alternative to /etc/init.d/boot.localnet in opensuse

Script /etc/init.d/boot.localnet used to read the hostname value from /etc/hostname file during the boot time and set the hostname variable. Now I see in SUSE linux 12 beta and recent version of opensuse that this file is no longer present. So is there an alternative for this file? My usecase is a script to configure hostname. It used to set hostname value in /etc/hostname and run /etc/init.d/boot.localnet


Linux Kernel Compile-time options for Seagate IDE drive

I am configuring linux kernel 3.12.14 obtained from linux.org for compiling using 'make gconfig'. My question is what options exactly I need to enable to make it work for my Seagate IDE HDD? I am compiling it for my other PC that has this HDD (not on which I am performing compilation).


Get user login name and address on bad login attempt [Dovecot]

**Background**   I am trying to develop a method to ban users who exhibit strange behavior when logging into Dovecot by obtaining their POP-ID/login name and IP address. I want to send that information to a separate program/process that is responsible for banning the users. The caveat is this has to be possible through Dovecot (not looking at system logs or other programs, but a program or process that Dovecot spawns on a bad login attempt). **Question**   How do you get the POP-ID/login name and IP address of a user when their authentication fails?


Disabling graphical login in Debian wheezy

I have installed Debian wheezy on my machine with a netinst image, now I would like to deactivate the desktop and boot straight to the command line, not only that but I would like to not waste any resource on the X11/gnome/gdm at all if not needed. I tried ( as root )               update-rc.d -f gdm remove     update-rc.d -f gdm3 remove     update-rc.d -f wdm remove      but Debian keeps booting into the login manager, I really don't need that, how I can deactivate this kind of boot and start X only when needed ?


Not able to copy multiple files using rsync 3.0.9 version?

I am trying to copy two files using rsync from a `machineB` but somehow it always copies only one file but not the second file - Here is the syntax I am using -               rsync -avz david@machineB:'/data/pe_t1_snapshot/20140317/t1_weekly_1680_0_200003_5.data :/data/pe_t1_snapshot/20140317/t1_weekly_1680_1_200003_5.data' /data01/primary      It only copies this file `t1_weekly_1680_0_200003_5.data` into `/data01/primary` folder and it didn't copied second file which is `t1_weekly_1680_1_200003_5.data`. I am using Ubuntu 12.04 and rsync version is -               rsync  version 3.0.9  protocol version 30      This is the error I am getting -               receiving incremental file list     rsync: change_dir "/home/david/:/data/pe_t1_snapshot/20140317" failed: No such file or directory (2)     t1_weekly_1680_0_200003_5.data          sent 30 bytes  received 504982813 bytes  6196108.50 bytes/sec     total size is 1761988281  speedup is 3.49     rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1536) [generator=3.0.9]      I started reading the rsync manual but somehow I am not able to understand what wrong I am doing? **Update:-** It works fine on a single command if I run it from the console but I need to run that from the shell script so I added your suggestion in my shell script. I just ran your suggestion on my below example and I got an error. Below is the shell script which simply tries to copy file from `machineB`, if the files are not there in `machineB` then it should be there in `machineC` so it will try to copy from `machineC`. `PRIMARY_PARTITION` and `SECONDARY_PARTITION` will have file numbers. And below shell script I am running on `machineA`.               #!/usr/bin/env bash          readonly PRIMARY=/data01/primary     readonly FILERS_LOCATION=(machineB machineC)     readonly MEMORY_MAPPED_LOCATION=/bexbat/data/be_t1_snapshot     PRIMARY_PARTITION=(0 548)     SECONDARY_PARTITION=(1101 1374)          dir1=$(ssh -o "StrictHostKeyChecking no" david@${FILERS_LOCATION[0]} \       ls -dt1 "$MEMORY_MAPPED_LOCATION"/[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9] |        head -n1)     dir2=$(ssh -o "StrictHostKeyChecking no" david@${FILERS_LOCATION[1]} \       ls -dt1 "$MEMORY_MAPPED_LOCATION"/[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9] |       head -n1)          echo $dir1     echo $dir2          ## Build your list of filenames before the loop.      for n in "${PRIMARY_PARTITION[@]}"     do         primary_files="$primary_files :$dir1"/t1_weekly_1680_"$n"_200003_5.data     done          ## Repeat for $SECONDARY_PARTITION     for n in "${SECONDARY_PARTITION[@]}"     do         secondary_files="$secondary_files :$dir2"/t1_weekly_1680_"$n"_200003_5.data     done          echo "Primary: " $primary_files     echo "Secondary: " $secondary_files               if [ "$dir1" = "$dir2" ]     then         find "$PRIMARY" -mindepth 1 -delete              # this line is giving an exception somehow         rsync -avz david@${FILERS_LOCATION[0]}${primary_files} $PRIMARY/         rsync -avz david@${FILERS_LOCATION[1]}${primary_files} $PRIMARY/          fi      Below is the error I got -               Unexpected remote arg: :/data/pe_t1_snapshot/20140320/t1_weekly_1680_0_200003_5.data     rsync error: syntax or usage error (code 1) at main.c(1232) [sender=3.0.9]     Unexpected remote arg: :/data/pe_t1_snapshot/20140320/t1_weekly_1680_0_200003_5.data     rsync error: syntax or usage error (code 1) at main.c(1232) [sender=3.0.9]     Unexpected remote arg: :/data/pe_t1_snapshot/20140320/t1_weekly_1680_1101_200003_5.data     rsync error: syntax or usage error (code 1) at main.c(1232) [sender=3.0.9]     Unexpected remote arg: :/data/pe_t1_snapshot/20140320/t1_weekly_1680_1101_200003_5.data     rsync error: syntax or usage error (code 1) at main.c(1232) [sender=3.0.9]


Failing to apply tc filter

I've run the example at ifb both con Centos and on Fedora               tc filter add dev eth0 parent 1: protocol ip prio 10 u32  match ip src 192.168.200.200/32 flowid 1:2  action police rate 10kbit burst 90k drop  action mirred egress mirror dev ifb0      Illegal "action"     bad action parsing     parse_action: bad value (12:police)!     Illegal "action"      Is it about a known bug? Any ideas?


Unable to run yum update on virtualized centOS 6.3

I am running a virtualized CentOS 6.3 on a Windows 7 computer. The computer (4 GB RAM) is connected to a corporate network. When I run yum update, it shows some progress, then eventually the VM (2 GB RAM) freezes, this has happened nearly 5 times now. I've also tried updating using the graphic package manager, same thing happens, any ideas why this is happening?


glTail and Bind9 logs

My bind9 server logs queries to syslog and it produces lines like this in /var/log/syslog               Aug 23 17:25:41 serverdns named[1690]: client 10.10.10.20#35495: query: 52.122.168.109.blackholes.easynet.nl IN A + (10.10.10.1)      How can I configure the named.rb parser of glTail to parse such lines? Do I have to change my Bind9 logging configuration? Can you give me an example?


One host, two virtual machines that cannot ping each other. How to solve

We have Virtual Machines operating within the `KVM` environment. We setup one as a dev server running `Apache` etc., and the other as a `Windows` development environment. The two environments are setup and running fine. However, they cannot ping each other. I am wondering if there is a clear solution to this. This is what is happening. From Host:                 Cannot ping either of 2 VM's (one `Linux`, one `Windows`)      From Either of the VM's:                 Cannot ping host       Cannot ping each other      From other network machines (for instance my laptop from within my company network)                 Successfully ping host at 192.168.0.64       Successfully ping VM1 (Linux) 192.168.0.43       Successfully ping VM2 (Windows) 192.168.0.84


Why does getfacl remove the leading / from absolute pathnames?

I'm in the midst of learning about ACL's for Centos/Red Hat 6 and when I run `getfacl` using an absolute path I of course get among the output:   `getfacl: Removing leading '/' from absolute path names` Why does it need to do this? In what situations would you need to use the -p or --absolute-names switch? My books by Wale Soyinka and Michael Jang don't even make a passing mention of this, i'm not seeing any clues in the man page, and I can't seem to find any sites that directly address this warning.


Is it possible to add CP-1252 support to CentOS?

We have a CentOS backend running server software that is processing files generated by our clients. Many of our clients are Windows users, and generate these files on their Windows machines in the CP-1252 (aka "Win-1252") character encoding. Occasionally, when processing these files, we get one that has a CP-1252 character in the file name, and this causing our server code to choke (and throw runtime exceptions). We could implement a code solution where we read files (and their names) in as pure binary and then apply the correct character encoding to them, however if there is an easier (systems-level) fix that doesn't involve coding effort and a new release, that would be optimal. So I ask: is it possible to add CP-1252 support for CentOS machines? Thanks in advance!


How to use history commands with readonly PROMPT_COMMAND?

I'm sometimes logged in on a host which I do not control and where `PROMPT_COMMAND` is `readonly`. Is there some way to **work around this to run`history` commands anyway**, for example using `PS1`? I've tried `PS1='$(history -a; history -c; history -r; echo finished)'` - It prints `finished` at each prompt, but it doesn't seem to work:   1. Open two terminals A and B on the same host.   2. In terminal A, run a command `a`.   3. In terminal B, run a command `b`.   4. It terminal B, press `↑` twice. On a host where `PROMPT_COMMAND='history -a; history -c; history -r;'`, this will result in terminal B showing `a`. On a host where `PS1` starts with `$(history -a; history -c; history -r; echo finished)` it will instead show whichever command was run before both terminals were opened. The obvious reason is that **the command in`PS1` is run in a subshell.** Another alternative is to bypass the global RC-file altogether:               bash --rcfile ~/.bashrc      However, circumventing the use of the standard value of `PROMPT_COMMAND` will very likely _not be accepted by the sysadmin_ for policy reasons.


New files getting wrong permissions from setacl

I'm trying to create a file from windows on a mapped samba share, but after creating the file, I'm unable to edit it. For some reason the mask is changing to rw- even though my default is set to rwx. umask is 0022, but I think the ACL overrides the umask. Is something wrong with the permissions of the folder? I want bob and admins to have rwx to files.               [root@server02 folder]# getfacl .     # file: .     # owner: nobody     # group: admins     # flags: -s-     user::rwx     user:bob:rwx     group::---     group:admins:rwx     mask::rwx     other::rwx     default:user::rwx     default:user:bob:rwx     default:group::---     default:group:admins:rwx     default:mask::rwx     default:other::rwx          [root@server02 folder]# getfacl test     # file: test     # owner: bob     # group: admins     user::rwx     user:bob:rwx               #effective:rw-     group::---     group:admins:rwx      #effective:rw-     mask::rw-     other::---


headphone/Microphone is not workingLinux mint 15

I was using windows and my headphone and speaker was working fine there. Recently I moved to linux mint and having problem to get sound on headphone. Speaker still working fine. I have tried several online solution nothing work for me. When I connect on front panel I can hear sound on my header but my microphone is not working that time. I can't use skype. For that also I have tried few solutions. I was unable to use my microphone. So I switched to rear panel again. Because on windows I used rear panel. Here is my output for this command : `lspci -v | grep -A7 -i "audio" ` Output:               00:1b.0 Audio device: Intel Corporation 5 Series/3400 Series Chipset High Definition Audio (rev 06)         Subsystem: Gigabyte Technology Co., Ltd Device a102         Flags: bus master, fast devsel, latency 0, IRQ 50         Memory at fbff4000 (64-bit, non-prefetchable) [size=16K]         Capabilities: <access denied>         Kernel driver in use: snd_hda_intel        00:1c.0 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 1 (rev 06) (prog-if 00 [Normal decode])      and command `aplay -l`: Output:               **** List of PLAYBACK Hardware Devices ****     card 0: MID [HDA Intel MID], device 0: ALC889 Analog [ALC889 Analog]       Subdevices: 1/1       Subdevice #0: subdevice #0     card 0: MID [HDA Intel MID], device 1: ALC889 Digital [ALC889 Digital]       Subdevices: 1/1       Subdevice #0: subdevice #0     card 0: MID [HDA Intel MID], device 3: HDMI 0 [HDMI 0]       Subdevices: 1/1       Subdevice #0: subdevice #0     card 0: MID [HDA Intel MID], device 7: HDMI 1 [HDMI 1]       Subdevices: 1/1       Subdevice #0: subdevice #0      I have also checked `alsamixer`: ![alsamixer capture output](http://i.stack.imgur.com/qUt0n.png) any can give any solutions?


What is SSTP vpn server and how can I run one?

I've read a couple of L2TP and PPTP tutorials on the net and there are just dozens of "running PPTP/L2TP on Linux" guides available out there and I successfully made packages like open-swan or pptpd to work. Now, I've heard that SSTP protocol is also available for creating a VPN. My questions are:   1. What is this protocol? Is it really safer than L2TP?   2. Is it a Windows-specific protocol? (There are no guides available on Google for running such VPN servers on Linux. - as far as I searched)   3. **And the most important question:** how can I run such server on my Cent-OS box? By SSTP I don't mean packages like Open-VPN, I mean the same thing that windows can connect to it without any further clients. just like PPTP and L2TP. Any resource for my reading would be also really appreciated. Thanks in advance.