title: Access Share Files on Ubuntu with Win7: error "Path cannot be found"

text: Yesterday I added a share folder via system-config-samba. I created a new samba user for my Windows 7 64 bit machine. At first it worked fine, the next day, I cannot access from Windows 7. I click on Network in Explorer, and click on my Linux machine which appears, operation just times out. "Path cannot be be found". Edit: if you think there is a better way to share folders with Win7, please suggest.                   #     # Sample configuration file for the Samba suite for Debian GNU/Linux.     #     #     # This is the main Samba configuration file. You should read the     # smb.conf(5) manual page in order to understand the options listed     # here. Samba has a huge number of configurable options most of which      # are not shown in this example     #     # Some options that are often worth tuning have been included as     # commented-out examples in this file.     #  - When such options are commented with ";", the proposed setting     #    differs from the default Samba behaviour     #  - When commented with "#", the proposed setting is the default     #    behaviour of Samba but the option is considered important     #    enough to be mentioned here     #     # NOTE: Whenever you modify this file you should run the command     # "testparm" to check that you have not made any basic syntactic      # errors.      # A well-established practice is to name the original file     # "smb.conf.master" and create the "real" config file with     # testparm -s smb.conf.master >smb.conf     # This minimizes the size of the really used smb.conf file     # which, according to the Samba Team, impacts performance     # However, use this with caution if your smb.conf file contains nested     # "include" statements. See Debian bug #483187 for a case     # where using a master file is not a good idea.     #          #======================= Global Settings =======================          [global]          ## Browsing/Identification ###          # Change this to the workgroup/NT-domain name your Samba server will part of         workgroup = WORKGROUP          # server string is the equivalent of the NT Description field         server string = %h server (Samba, Ubuntu)          # Windows Internet Name Serving Support Section:     # WINS Support - Tells the NMBD component of Samba to enable its WINS Server     #   wins support = no          # WINS Server - Tells the NMBD components of Samba to be a WINS Client     # Note: Samba can be either a WINS Server, or a WINS Client, but NOT both     ;   wins server = w.x.y.z          # This will prevent nmbd to search for NetBIOS names through DNS.         dns proxy = no          # What naming service and in what order should we use to resolve host names     # to IP addresses     ;   name resolve order = lmhosts host wins bcast          #### Networking ####          # The specific set of interfaces / networks to bind to     # This can be either the interface name or an IP address/netmask;     # interface names are normally preferred     ;   interfaces = 127.0.0.0/8 eth0          # Only bind to the named interfaces and/or networks; you must use the     # 'interfaces' option above to use this.     # It is recommended that you enable this feature if your Samba machine is     # not protected by a firewall or is a firewall itself.  However, this     # option cannot handle dynamic or non-broadcast interfaces correctly.     ;   bind interfaces only = yes                    #### Debugging/Accounting ####          # This tells Samba to use a separate log file for each machine     # that connects         log file = /var/log/samba/log.%m          # Cap the size of the individual log files (in KiB).         max log size = 1000          # If you want Samba to only log through syslog then set the following     # parameter to 'yes'.     #   syslog only = no          # We want Samba to log a minimum amount of information to syslog. Everything     # should go to /var/log/samba/log.{smbd,nmbd} instead. If you want to log     # through syslog you should set the following parameter to something higher.         syslog = 0          # Do something sensible when Samba crashes: mail the admin a backtrace         panic action = /usr/share/samba/panic-action %d               ####### Authentication #######          # "security = user" is always a good idea. This will require a Unix account     # in this server for every user accessing the server. See     # /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/ServerType.html     # in the samba-doc package for details.     #   security = user          # You may wish to use password encryption.  See the section on     # 'encrypt passwords' in the smb.conf(5) manpage before enabling.         encrypt passwords = true          # If you are using encrypted passwords, Samba will need to know what     # password database type you are using.       ;   passdb backend = tdbsam              obey pam restrictions = yes          # This boolean parameter controls whether Samba attempts to sync the Unix     # password with the SMB password when the encrypted SMB password in the     # passdb is changed.         unix password sync = yes          # For Unix password sync to work on a Debian GNU/Linux system, the following     # parameters must be set (thanks to Ian Kahan <<kahan@informatik.tu-muenchen.de> for     # sending the correct chat script for the passwd program in Debian Sarge).         passwd program = /usr/bin/passwd %u         passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .          # This boolean controls whether PAM will be used for password changes     # when requested by an SMB client instead of the program listed in     # 'passwd program'. The default is 'no'.         pam password change = yes          # This option controls how unsuccessful authentication attempts are mapped      # to anonymous connections         map to guest = bad user          ########## Domains ###########          # Is this machine able to authenticate users. Both PDC and BDC     # must have this setting enabled. If you are the BDC you must     # change the 'domain master' setting to no     #     ;   domain logons = yes     #     # The following setting only takes effect if 'domain logons' is set     # It specifies the location of the user's profile directory     # from the client point of view)     # The following required a [profiles] share to be setup on the     # samba server (see below)     ;   logon path = \\%N\profiles\%U     # Another common choice is storing the profile in the user's home directory     # (this is Samba's default)     #   logon path = \\%N\%U\profile          # The following setting only takes effect if 'domain logons' is set     # It specifies the location of a user's home directory (from the client     # point of view)     ;   logon drive = H:     #   logon home = \\%N\%U          # The following setting only takes effect if 'domain logons' is set     # It specifies the script to run during logon. The script must be stored     # in the [netlogon] share     # NOTE: Must be store in 'DOS' file format convention     ;   logon script = logon.cmd          # This allows Unix users to be created on the domain controller via the SAMR     # RPC pipe.  The example command creates a user account with a disabled Unix     # password; please adapt to your needs     ; add user script = /usr/sbin/adduser --quiet --disabled-password --gecos "" %u          # This allows machine accounts to be created on the domain controller via the      # SAMR RPC pipe.       # The following assumes a "machines" group exists on the system     ; add machine script  = /usr/sbin/useradd -g machines -c "%u machine account" -d /var/lib/samba -s /bin/false %u          # This allows Unix groups to be created on the domain controller via the SAMR     # RPC pipe.       ; add group script = /usr/sbin/addgroup --force-badname %g          ########## Printing ##########          # If you want to automatically load your printer list rather     # than setting them up individually then you'll need this     #   load printers = yes          # lpr(ng) printing. You may wish to override the location of the     # printcap file     ;   printing = bsd     ;   printcap name = /etc/printcap          # CUPS printing.  See also the cupsaddsmb(8) manpage in the     # cupsys-client package.     ;   printing = cups     ;   printcap name = cups          ############ Misc ############          # Using the following line enables you to customise your configuration     # on a per machine basis. The %m gets replaced with the netbios name     # of the machine that is connecting     ;   include = /home/samba/etc/smb.conf.%m          # Most people will find that this option gives better performance.     # See smb.conf(5) and /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/speed.html     # for details     # You may want to add the following on a Linux system:     #         SO_RCVBUF=8192 SO_SNDBUF=8192     #   socket options = TCP_NODELAY          # The following parameter is useful only if you have the linpopup package     # installed. The samba maintainer and the linpopup maintainer are     # working to ease installation and configuration of linpopup and samba.     ;   message command = /bin/sh -c '/usr/bin/linpopup "%f" "%m" %s; rm %s' &          # Domain Master specifies Samba to be the Domain Master Browser. If this     # machine will be configured as a BDC (a secondary logon server), you     # must set this to 'no'; otherwise, the default behavior is recommended.     #   domain master = auto          # Some defaults for winbind (make sure you're not using the ranges     # for something else.)     ;   idmap uid = 10000-20000     ;   idmap gid = 10000-20000     ;   template shell = /bin/bash          # The following was the default behaviour in sarge,     # but samba upstream reverted the default because it might induce     # performance issues in large organizations.     # See Debian bug #368251 for some of the consequences of *not*     # having this setting and smb.conf(5) for details.     ;   winbind enum groups = yes     ;   winbind enum users = yes          # Setup usershare options to enable non-root users to share folders     # with the net usershare command.          # Maximum number of usershare. 0 (default) means that usershare is disabled.     ;   usershare max shares = 100          # Allow users who've been granted usershare privileges to create     # public shares, not just authenticated ones         usershare allow guests = yes         username map = /etc/samba/smbusers          #======================= Share Definitions =======================          # Un-comment the following (and tweak the other settings below to suit)     # to enable the default home directory shares.  This will share each     # user's home directory as \\server\username     ;[homes]     ;   comment = Home Directories     ;   browseable = no          # By default, the home directories are exported read-only. Change the     # next parameter to 'no' if you want to be able to write to them.     ;   read only = yes          # File creation mask is set to 0700 for security reasons. If you want to     # create files with group=rw permissions, set next parameter to 0775.     ;   create mask = 0700          # Directory creation mask is set to 0700 for security reasons. If you want to     # create dirs. with group=rw permissions, set next parameter to 0775.     ;   directory mask = 0700          # By default, \\server\username shares can be connected to by anyone     # with access to the samba server.  Un-comment the following parameter     # to make sure that only "username" can connect to \\server\username     # This might need tweaking when using external authentication schemes     ;   valid users = %S          # Un-comment the following and create the netlogon directory for Domain Logons     # (you need to configure Samba to act as a domain controller too.)     ;[netlogon]     ;   comment = Network Logon Service     ;   path = /home/samba/netlogon     ;   guest ok = yes     ;   read only = yes     ;   share modes = no          # Un-comment the following and create the profiles directory to store     # users profiles (see the "logon path" option above)     # (you need to configure Samba to act as a domain controller too.)     # The path below should be writable by all users so that their     # profile directory may be created the first time they log on     ;[profiles]     ;   comment = Users profiles     ;   path = /home/samba/profiles     ;   guest ok = no     ;   browseable = no     ;   create mask = 0600     ;   directory mask = 0700          [printers]         comment = All Printers         browseable = no         path = /var/spool/samba         printable = yes     ;   guest ok = no     ;   read only = yes         create mask = 0700          # Windows clients look for this share name as a source of downloadable     # printer drivers     [print$]         comment = Printer Drivers         path = /var/lib/samba/printers     ;   browseable = yes         writeable = yes         guest ok = yes     # Uncomment to allow remote administration of Windows print drivers.     # You may need to replace 'lpadmin' with the name of the group your     # admin users are members of.     # Please note that you also need to set appropriate Unix permissions     # to the drivers directory for these users to have write rights in it     ;   write list = root, @lpadmin          # A sample share for sharing your CD-ROM with others.     ;[cdrom]     ;   comment = Samba server's CD-ROM     ;   read only = yes     ;   locking = no     ;   path = /cdrom     ;   guest ok = yes          # The next two parameters show how to auto-mount a CD-ROM when the     #   cdrom share is accesed. For this to work /etc/fstab must contain     #   an entry like this:     #     #       /dev/scd0   /cdrom  iso9660 defaults,noauto,ro,user   0 0     #     # The CD-ROM gets unmounted automatically after the connection to the     #     # If you don't want to use auto-mounting/unmounting make sure the CD     #   is mounted on /cdrom     #     ;   preexec = /bin/mount /cdrom     ;   postexec = /bin/umount /cdrom          [Public]         path = /home/peter/Public         writeable = yes     ;   browseable = yes         guest ok = yes      Edit: Samba not recognised, unable to start | stop | restart? Ideas? @Giles ![enter image description here](http://i.stack.imgur.com/8cLdI.png)


title: Installing MySQL 5.5 on Mac OS 10.6

text: I am trying to install MySQL from source on my Mac OS. I've expanded the source code, and am now trying to configure it. However, I can't get past that step:               My-MacBook-Pro-2:mysql-5.5.13-osx10.6-x86 my$ CC=gcc \     CFLAGS="-O3 -fno-omit-frame-pointer" CXX=gcc \     CXXFLAGS="-O3 -fno-omit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti" \     ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex \                 --enable-thread-safe-client --enable-local-infile \                 --enable-shared --with-plugins=innobase       -bash: ./configure: No such file or directory      I've run this command successfully on earlier MySQL versions, so not sure what the issue is.


title: Why does my system show only 3.2 GiB of RAM when I definitely have 4.0 GiB

text: I have 2x2 GiB sticks of RAM installed.   Running `memtest86` from the grub boot menu confirms this.. memtest86 reports no errors. However every which way I check my available memory in a running Ubuntu 10.04 system, it reports only approximately 3.2 GiB.   * `cat /proc/meminfo` == 3320132 kB   * `System Monitor` == 3.2 GiB    * `htop` == 3242 MB   * `free -m` == 3242 MB Who's got my _missing_ RAM ? Updated info: I just now _dual_ -booted into another version of Ubuntu 10.04 on the same hardware (I forgot I had installed it many months ago, for emergencies) :).... It reports 3.9 GiB, via `System Monitor`... I've posted my most recent `/var/log/messages` information at http://pastebin.ubuntu.com/629246/


title: Is '-9' a flag to kill command?

text: **What does`-9` do?** It does not show up in the syntax:               $ kill     kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]     $


title: How can I fix a partition conflict?

text: I am running Ubuntu 10.10 on a 250 gb hdd. I chose at installation to install all on one partition (it was recommended for beginners). Unfortunately, I need to use Windows 7 too. I didn't want to format the drive to install Windows first and Ubuntu after, so I used `gparted` to resize the 250 gb partition, and made a 65 gb NTFS primary. I installed Windows 7, but upon restart it boots automatically to Windows 7; I can't see Ubuntu. I did try to press shift many times to bring up GRUB, but it did nothing. What can I do in this situation?


title: How to use a password as an external variable in shell?

text: I have this MySQL backup script that I use to back up MySQL databases. Very useful, and it runs on fixed intervals using a cron. However, I need somehow provide this script with the MySQL password. This password is not the same on every server, but as I manage several servers, this particular script is part of a git-controlled repository that is synced together with some other scripts occasionally. Now, my question is: how can I use this same script as part of a git repo, if the password is different? The solution I can come up with is defining the password as an external/global variable in shell, rather than in the script itself, and that way my script can remain the same on every server. However, I am not sure what the proper way is to do so, nor am I sure if this is a good idea (security/best practices-wise). Any thoughts?


title: Embedded device: How to do raw reads and write to flash (emmc/movinand) bypassing file system cache

text: I have an embedded device with a flash memory running linux. I want to do raw read writes on the flash part but I also want to avoid any file system cache. How can I do this? Any pointers?


title: XFS vs Ext4 vs Others - which file system is stable, reliable, for long run such as 24/7 case

text: XFS and Ext4 file system which one is really stable and reliable for long run with heavy disk write and read?   * the system will be used in a place where 24/7 is in service, and every second there is read and write in the disk   * system need to be 99.95 % uptime for about 1 year run   * system need to be maximum downtime in year for about 20 hours maximum Which file-system is the best choice for such challenge? ( i wanted to use Solaris or FreeBSD but for my project i must have to use Ubuntu or ArchLinux or Fedora or CentOS). But confused with which file system to choose.


title: How to switch "/" back to writable mode without reboot?

text: [root@SERVER .ssh]# mount|grep -i " / "     /dev/mapper/rootvg-root_lv on / type ext3 (rw)     [root@SERVER .ssh]# mount -o remount /     mount: block device /dev/rootvg/root_lv is write-protected, mounting read-only     [root@SERVER .ssh]#       How can I make the "/" writable again without a reboot?               [root@SERVER ~]# lsb_release -a     LSB Version:    :core-3.1-amd64:core-3.1-ia32:core-3.1-noarch:graphics-3.1-amd64:graphics-3.1-ia32:graphics-3.1-noarch     Distributor ID: RedHatEnterpriseServer     Description:    Red Hat Enterprise Linux Server release 5.4 (Tikanga)     Release:    5.4     Codename:   Tikanga     [root@SERVER ~]#       UPDATE:               [root@SERVER ~]# lvdisplay rootvg/root_lv       Locking type -1 initialisation failed.     [root@SERVER ~]# lvdisplay rootvg/root_lv --ignorelockingfailure       --- Logical volume ---       LV Name                /dev/rootvg/root_lv       VG Name                rootvg       LV UUID                2Cccd4-oGrx-ssQW-xzK5-MZuA-g4NS-tFDFpd       LV Write Access        read/write       LV Status              available       # open                 1       LV Size                2.00 GB       Current LE             64       Segments               1       Allocation             inherit       Read ahead sectors     auto       - currently set to     256       Block device           253:0          [root@SERVER ~]# lvchange -p rw rootvg/root_lv       Locking type -1 initialisation failed.     [root@SERVER ~]#      [root@SERVER ~]# lvchange --ignorelockingfailure -p rw rootvg/root_lv       Only -a permitted with --ignorelockingfailure       Run `lvchange --help' for more information.     [root@SERVER ~]#       should I use the "-a" function?


title: $PATH duplication issues

text: If I do `echo $PATH` I get the following: > > /usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/usr/local/share/npm/bin:/usr/local/share/python:/opt/X11/bin:/Users/kh/.rvm/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin This is in my ~/.zshrc file: > export > PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/usr/local/share/npm/bin:/usr/local/share/python:/opt/X11/bin:$HOME/.rvm/bin:$PATH I've had to manually add /usr/local/etc... at the front of this file because homebrew was complaining. I've searched for all possibles files (I know of) to find where $PATH is being built from. But to no avail. These are               ~/.bash_profile     ~/.bashrc     ~/.profile      Any suggestions.


title: $2 (field reference) in awk BEGIN is not working

text: In the following snippet, `$2` in awk is returning empty. What am I doing wrong? I am trying to find the difference between MAX and MIN.               #!/bin/ksh     if [ $# -ne 1 ]; then             echo "Usage: sh `basename ${0}` filename";             exit 1;     fi     if [ ! -s ${1} ]; then             echo "file doesn't exist or is empty";             exit 1;     fi     sed -e '/^$/d' -e '/^#/d' ${1} |     awk  -F'=' '             BEGIN {                     MIN=$2; MAX=$2; print MIN;             }             {                     if ( $2 > MAX )                     {                             MAX = $2;                     }                     else if ( $2 < MIN )                     {                             MIN = $2;                     }             }             END {                     DIFF=MAX-MIN; print "DIFF:" DIFF;             }     '      However, this is working fine. Why doesn't `$2` work in the `BEGIN` section?               #!/bin/ksh     if [ $# -ne 1 ]; then             echo "Usage: sh `basename ${0}` filename";             exit 1;     fi     if [ ! -s ${1} ]; then             echo "file doesn't exist or is empty";             exit 1;     fi     sed -e '/^$/d' -e '/^#/d' ${1} |     awk -F'=' '             {                     if ( MAX == "" || MIN == "" )                     {                             MAX = MIN = $2;                     }                     else                     {                             if ( $2 > MAX )                             {                                     MAX = $2;                             }                             else if ( $2 < MIN )                             {                                     MIN = $2;                             }                     }             }             END {                     DIFF=MAX-MIN; print "DIFF:" DIFF;             }     '


title: ACL mask does not work as expected

text: If I copy a file with a base ACL of:               u::rw-,g::r--,o::r--      into a directory with a default ACL of:               u::rwx,g::r-x,g:users:rwx,m::rwx,o::r-x      I obtain a file with mask of `m::r--`. I would have expected the union of the permissions of the two group entries (i.e. `m::rwx`). Why it is so? Does it depend on the `mode` parameter used by `cp` in the creation of the file?


title: How to install a database dump via Shell Script?

text: I have a Mysql database dump. I want to install it with Hudson via a Shell Script to an external Linux machine. How can you take a Mysql script and run it inside a database on other machine? I know I can transfer files with sftp and use ssh when accessing another machines manually, but how to automate this all to a simple Shell Script?


title: Mutt: Automatically subscribe to IMAP mailboxes

text: I'm using a bunch of mailboxes in `mutt` which are populated by `imapfilter`. To avoid manual reconfiguration (by going to the folder list and pressing `s` at every new entry), I'd like to configure `mutt` to simply **subscribe to all IMAP folders except sent, trash and postponed on startup.** Is this possible without having to generate the configuration file?


title: Pluggin a bunch of USB hard drives into a Linux system?

text: I've got a Linux system with two USB 2.0 ports and one USB 3.0 port, and I would like to know how many USB hard drives I could plug into it. On the performance side, what would the I/O access be like as I add more and more drives? I expect I will have to have multiple levels of fan-out by plugging hubs into hubs to maximize the number of devices on each USB port. Would a tool like iostat tell me if all the disks share roughly the same bandwidth?


title: How to resume multiple instances of Screen from command line with minimal steps?

text: I have about 15 instances of screen running on my linux server. They are each running processes I need to monitor. I had to close terminal (hence the reason I launched screen). Is there a way to reopen all 15 instances of Screen in different tabs without having to open a new tab, login to the server, print all the available screens to resume, and then type in the id for each screen session?


title: How to refuse routes that are PUSHed by OpenVPN server?

text: When I establish an OpenVPN client connection over the Internet to our corporate OpenVPN server, it pushes several static routes. Unfortunately, these routes break some connectivity within my local network environment, as they collide with my own routes. How can I refuse those routes?


title: How to install mysql-server 5.6 on RHEL 5.8 (when MySQL-server 5.0 is already installed)

text: I want to install mysql-server 5.6 on RHEL 5.8, but when trying `rpm -i` or `rpm -Uvh` it complains that I already have version 5.0 on there. I am happy to replace, upgrade or install another instance. Please advise with steps.


title: Good distribution for Gnome shell

text: With Ubuntu pushing Unity, what distribution would you recommend if I just want to run Gnome 3 with the new Gnome shell? Personally, I'm interested in distributions which have the polish and support of Ubuntu, but feel free to recommend anything that makes it easy to run Gnome shell.


title: Clipboard for images

text: I often read some text with images and often happens that the text talks about an image that is on the next page and next page and previous page and I have to go back and forward and usually forget where I paused reading.   I got an idea to save the images to image clipboard which is able to contain about 5 images (e.g. with making small screenshot of the screen area). While reading when the text talks "see picture 10.4 (on page 42)" and in a few seconds "compare it to picture 10.2 (on page 40)" I could press only keyboard shortcut and select the desired picture without browsing through the text.   Is this possible in X Window System? Or with some script?


title: What's the reason that "rm -rf a/b" says "a/b is not empty"?

text: The following script _sometimes_ gives me things like `can't remove a/b as it's not empty`               ssh -T user@host <<EOF       cd somewhere       rm -rf a/b         EOF      But I log in to the server and execute `rm -rf a/b` then I never had the problem. There are other processes that are generating files to `a/b`, is that related? Anyway, how to make a script that will ensure "a/b" will be deleted?


title: Getting logged out of user account upon execution of a program

text: On my friend's computer when Skype is launched either via terminal or GUI the current user is forced to log out of the system. Purging and reinstalling Skype did not work and we are using the same version of Ubuntu, that is 12.04.4 LTS 32-bit, and both our installed Skype programs are of the same version, namely 4.2.0.11. What may be the cause behind this and how can this behaviour of Skype avoided? Is it a bug or something related with installed programs etc. ? Any help is appreciated. EDIT: The log files are as follows and my friend also stated that when he tried to have a look at these files in Emacs he got kicked out of the system again: **skype-err.log**               skype: Fatal IO error 11 (Resource temporarily unavailable) on X server :0.      **.xsession-errors**               Warning: Only changing the first 12 of 24 buttons.          (gnome-settings-daemon:6738): power-plugin-WARNING **: gnome-session is not available     Backend     : gconf     Integration : true     Profile     : unity     Adding plugins     Initializing core options...done     Initializing composite options...done     Initializing opengl options...done     Initializing decor options...done     Initializing mousepoll options...done     Initializing gnomecompat options...done     Initializing grid options...done     Initializing snap options...done     Initializing resize options...done     Initializing move options...done     Initializing unitymtgrabhandles options...done     Initializing place options...done     Initializing vpswitch options...done     ** Message: applet now removed from the notification area     Initializing wall options...done     I/O warning : failed to load external entity "/home/jack/.compiz/session/102004b2d250ec54c7139932580828939400000066890035"     Initializing session options...done     Initializing animation options...done     Initializing workarounds options...done     compiz (expo) - Warn: failed to bind image to texture     Initializing expo options...done     Initializing ezoom options...done     Initializing staticswitcher options...done     ** Message: using fallback from indicator to GtkStatusIcon     Initializing fade options...done     Initializing scale options...done          (compiz:6756): GConf-CRITICAL **: gconf_client_add_dir: assertion `gconf_valid_key (dirname, NULL)' failed     Nautilus-Share-Message: Called "net usershare info" but it failed: 'net usershare' returned error 255: net usershare: cannot open usershare directory /var/lib/sa$     Please ask your system administrator to enable user sharing.               Initializing unityshell options...done     Setting Update "main_menu_key"     Setting Update "run_key"     Setting Update "run_command_terminal_key"     Setting Update "icon_size"     ** Message: moving back from GtkStatusIcon to indicator          ** (zeitgeist-datahub:7185): WARNING **: zeitgeist-datahub.vala:227: Unable to get name "org.gnome.zeitgeist.datahub" on the bus!     [7193:7193:0506/003710:ERROR:nss_util.cc(853)] After loading Root Certs, loaded==false: NSS error code: -8018          ** (nautilus:6770): WARNING **: Error calling current_status: Method "current_status" with signature "" on interface "com.ubuntuone.SyncDaemon.Status" doesn't ex$               ** (nautilus:6770): CRITICAL **: syncdaemon_status_info_get_online: assertion `SYNCDAEMON_IS_STATUS_INFO (sinfo)' failed     No bp log location saved, using default.     [000:000] Cpu: 6.37.2, x4, 2267Mhz, 3887MB     [000:000] Computer model: Not available     [000:003] Warning(clientchannel.cc:472): 0xb8304550: Unreadable or no port file.  Could not initiate GoogleTalkPlugin connection     [000:003] 0xb8304550: SendConnectStatus: Connect Status:     [             "f-connect",                  {                     "error" : -1,                     "step" : "0"             }     ]          [000:004] Warning(clientchannel.cc:445): 0xb8304550: Could not initiate GoogleTalkPlugin connection     [000:004] 0xb8304550: GoogleTalkPlugin not running. Starting new process...     [000:004] Starting Flute     [000:004] Warning(pluginutils.cc:268): Failed to get GoogleTalkPlugin path. Trying default.     [000:006] Started GoogleTalkPlugin, path=/opt/google/talkplugin/GoogleTalkPlugin     [000:006] 0xb8304550: SendConnectStatus: Connect Status:          [             "f-connect",                  {                     "error" : -1,                     "step" : "0"             }     ]          [000:004] Warning(clientchannel.cc:445): 0xb8304550: Could not initiate GoogleTalkPlugin connection     [000:004] 0xb8304550: GoogleTalkPlugin not running. Starting new process...     [000:004] Starting Flute     [000:004] Warning(pluginutils.cc:268): Failed to get GoogleTalkPlugin path. Trying default.     [000:006] Started GoogleTalkPlugin, path=/opt/google/talkplugin/GoogleTalkPlugin     [000:006] 0xb8304550: SendConnectStatus: Connect Status:     [             "f-connect",                  {                     "step" : "2"             }     ]          [000:006] 0xb8304550: Waiting for GoogleTalkPlugin to start...     [001:108] 0xb8304550: Attempting to connect to GoogleTalkPlugin...     [001:108] Read port file, port=55429     [001:108] 0xb8304550: SendConnectStatus: Connect Status:     [             "f-connect",                  {                     "step" : "0"             }     ]          [001:109] 0xb8302d20:  sending cookie Z2CZ//Bddv3VJWxk     [001:109] 0xb8304550: SendConnectStatus: Connect Status:     [             "f-connect",                  {                     "step" : "1"             }     ]          [001:110] 0xb8304550: Initiated connection to GoogleTalkPlugin     [001:209] 0xb8304550: SendConnectStatus: Connect Status:     [             "f-connect",                  {                     "step" : "3"             }     ]          [001:232] 0xb8304550: Socket connection established     [001:232] 0xb8304550: ScheduleOnlineCheck: Online check in 5000ms     [001:236] 0xb8304550: C->F: ["comment","BC state change: 2 to 3. Error? 0"]     [001:254] 0xb8304550: C->F: ["comment","BC state change: 3 to 4. Error? 0"]     [001:309] 0xb8302d20: Got cookie response, socket is authorized     [001:309] 0xb8304550: AUTHORIZED; socket handshake complete     [001:349] 0xb8304550: C->F: ["mf",2,{"appName":"googlemail","buildLabel":"gmail_fe_140429.00_p4","buildCl":"65973900","compileMode":"OPTIMIZED,LOCALE=tr","estima$     [001:353] 0xb8304550: F->C: ["fs",{"pr":"a"}]     [001:417] 0xb8304550: F->C: ["mf","mf5.3","5.3.1.0",2,{"audioCodecs":[[103,"ISAC",1,0,16000],[111,"opus",2,64000,48000],[104,"ISAC",1,0,32000],[109,"CELT",1,6400$     [001:435] 0xb8304550: C->F: ["getdevicestate"]     [001:441] 0xb8304550: F->C: ["getdevicestate","15","0",["__default_device","Built-in Audio Analog Stereo"],"0",["__default_device","High Definition Audio Control$     [001:589] 0xb8304550: C->F: ["jec",[[96,"H264-SVC",320,200,30]],{"num_threads":-1,"cpu_profile":1}]     [001:631] 0xb8304550: C->F: ["jf",[["stun.l.google.com","19302"]     ,["alt3.stun.l.google.com","19302"]     ,["alt2.stun.l.google.com","19302"]     ,["alt4.stun.l.google.com","19302"]     ,["alt1.stun.l.google.com","19302"]     ]     ,["CAESGwoSamFja2FyYXpAZ21haWwuY29tEN+V0YDdKBoQzrz8rti0zAEr12uU4bzj5g\u003d\u003d",["relay.google.com","19305","19305","443"]     ]     [001:634] 0xb8304550: C->F: ["jec",[[96,"H264-SVC",640,400,30]],{"num_threads":-1,"cpu_profile":31}]     [006:260] 0xb8304550: HandleOnlineCheck: Starting check     [006:260] 0xb8304550: HandleOnlineCheck: OK; current state: 3      As far as I am concerned X is the culprit. I would like to hear you feedback and suggestions for possible remedies. Thanks


title: Is there a way to find all X resources an application uses?

text: I'm looking for a way to automatically list all X resources that are used in an application. To give you an example, for `xterm` I'd expect a list similar to the following but with _all_ the resources that are used by `xterm`.                background      foreground      cursorColor      vt100.geometry      scrollBar      scrollTtyOutput      ...      The method can work on the source code of the application but if it is possible to do it with only the application binary that would also be interesting.


title: Slow down the CPU

text: I tried to slow down my CPU with `powernowd` and `cpufreq-selector`. I hoped that with lower frequency it will be less hot and I won't hear my fan every time I will run internet radio. I used the following commands               sudo cpufreq-selector -f 800000      and               sudo powernowd -m 0 -l 40 -u 60      but this wasn't sufficient for more quiet laptop. My CPU is > Intel(R) Pentium(R) M processor 1.60GHz Could you advise me on how to make it run cooler / quieter? I solved it yesterday with `sudo cpufreq-selector -g powersave`


title: Can one directory be owned by two groups?

text: Can one directory be owned by two groups (RHEL 6.2)? I have created one directory: `mkdir /opt/shared`, then I created two groups: `groupadd sales` `groupadd marketing` I added manually to each of these groups 21 users, then I changed the ownership `chown root:sales /opt/shared` and `chown root:marketing /opt/shared`. Then I changed the unmask `chmod 2775 /opt/shared` The problem is, only group `marketing` have permission to `rwx`.


title: make wget refer to a local copy without redundantly downloading files

text: I want to archive a message board,I do that by using wget with the parameters: `\--page-requisites`, `\--span-hosts`, `\--convert-links` and `\--no-clobber`. The problem is that using `\--convert-links` disables `\--no-clobber`. for every thread page, wget re-downloads site skins, scripts and icons(For the purpose of keeping them updated). Is there a way to prevent wget from downloading files that already exist locally, referring links to files to their local copies and only downloading files that aren't already in the filesystem?


title: Why does [a-z] asterisk match numbers?

text: I have 3 directories at current path.               $ls     a_0db_data  a_clean_0db_data  a_clean_data     $ls a_*_data     a_0db_data:          a_clean_0db_data:          a_clean_data:          $ls a_[a-z]*_data     a_clean_0db_data:          a_clean_data:      I expected last ls command to match only `a_clean_data`. Why did it also match the one containing `0`?               bash --version     GNU bash, version 4.2.24(1)-release (i686-pc-linux-gnu)


title: How can I write a non-breaking space?

text: When I write a question, I'd like the space between the final word and the question mark to be non-breaking, and this very sentence is an example of it (this is why it is awkward), how can I do that ?


title: Can two hosts have the same IP address in /etc/hosts?

text: can two hosts share the same IP Address without a conflict. This is how my /etc/hosts looks like :-               $ cat /etc/hosts     127.0.0.1   localhost     127.0.1.1   debian     127.0.1.1       mini      Now as can be seen both mini and debian share the same IP Address. Now debian is my hostname.               $ hostname     debian      while mini is a virtual host for an apache site.               /etc/apache2/sites-available$ head minidebconfindia.conf      <VirtualHost mini:80>     ServerAdmin webmaster@localhost      This is in Apache 2.4. I am just not sure whether this is good or not. A friend of mine has the same setup (with a different hostname) on Apache 2.2 and that works without issue. Looking forward to know if this is valid or should I be doing any changes ?


title: AIX open() : file descriptor is zero (!?)

text: A daemon process, on detecting the presence of a text file in a particular directory then launches an executable file which opens the aforementioned text file in order to read and then transmit its data over a TCP socket. The number of the file descriptor of the opened text file is logged along with other information about the processing of the file. It has been noticed that from time to time, the file descriptor returned by the open() call is zero (normally this is reserved for stdin). No error is detected and all works well. The source code in C does nothing more that open() and later close() - there is no redirection, duplication or any other wizardry performed on the returned file handle. Under what circumstances could a process's file descriptor 0 be available for general use (and not attributed to stdin) ? Platform is AIX 5.2.


title: Make GNU indent break long comments

text: Is there a way to convince GNU indent to break long comment and change it to multiline comment? Something like this:               // Very long comment, longer than 80 characters. Just imagine that.      To this:               /*      * Very long comment, longer than 80 characters. Just      * imagine that.      */      I know that formatting second one can be done simply by '-cdb -sc', but I don't know how to ensure line break and comment type change. Is it even possible?


title: Keep a PHP script running indefinitely on a Web Server

text: I'm having a pretty big issue that I need to get resolved. Basically I have little experience using `Linux` and I've been working on a project recentley that involves me having to use quite a lot of `Linux` commands to run `php scripts` on my web server. Basically I've two scripts   1. get_tweets.php   2. parse_tweets.php I need these to be running constantly for the next 3 - 4 weeks on my web server. I use the following command to get them to run and they seem to last for the day but when I check in the morning they seem to have stopped working! `nohup php get_tweets.php > /dev/null &` and then `nohup php parse_tweets.php > /dev/null &` I know that by using `&` I can keep the scripts running in the `background` and they run when I log out of `ssh` but like I said they seem to run fine all day then when I check in the morning they've stopped. The issue I am having is how I can keep them running non stop. Is there a simple `script` I could write to check if they are running and if not then restart them or perhaps restart them every 5 hours or something? I'd appreciate any help guys as this is quite a big issue and I've got no idea how to resolve it.


title: Why can't new versions of kernel solve the backlight problem?

text: Currently I am using Linux 3.8.0-27-generic kernel on my Samsung laptop. I replaced grub configuration file with the following text to make backlight control work:               GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_osi=Linux acpi_backlight=vendor"      I do not know if doing this causes a regression. If not, why is this not being included in the never version of kernels? There are not millions of computer manufacturers and at least this could be hardcoded, right?


title: how to add line in a /etc/sudoers file with the help of shell script (50servers)?

text: Anyone can help me with shell script, I want to know script which can edit `/etc/sudoers` file and let me add `{{{{{userid ALL=(root) ALL}}}}` to 50 server I have on same network?


title: Periodically get new lines from file, possibly logrotated

text: I'm looking for a fairly simple way (no development involved -- I could write this in Python but I'm hoping there's something already out there). I have a log file (in my case written by rsyslogd). For analytics purposes I want to read it every 1 minute and calculate metrics for the last minute e.g. how many page hits my http server had. My 2 requirements: 1) I only want to look at the lines that were added since I last read the file. (I only need the last minute or so, and the file is too large to re-read and filter every minute). 2) Once a day the file gets logrorate'd. The first time after log rotation I want all of the lines from the previous file I haven't yet read, plus all of the lines from the new file. I assume I'm now the only one with such requirements -- what do others do?


title: Diff similar lines

text: I'd like to print a list of lines where the first word in two files is identical, and the rest of the words are not. Some complicated mess with `comm`, `grep` and `cut` would be possible, but hopefully there's a simpler way. **Edit** : I've managed to slap together some working code. Example tests:               $ cat file1     a 1 E     b 2 F     c 3 G          $ cat file2     a M X     b 2 Y     c 3 G          $ difff 1 file1 file2 # Differences in fields 2+3     1,2c1,2     < a 1 E     < b 2 F     ---     > a M X     > b 2 Y          $ difff 1-2 file1 file2 # Differences in field 3 only     1c1     < b 2 F     ---     > b 2 Y      **Edit 2** : The speed is now bearable (compares two files of 1800 and 8700 lines in half a second).


title: How to remove/change the message displayed when opening a terminal?

text: Using Ubuntu 10.10 .In GUI mode when I open up a terminal, a message is displayed at top left above the prompt: `Ghost@work-Ubuntu:~$` , I would like to change it, so I would like to know in which file the message is saved in order to access it or maybe commands to remove the message. **Edit:** When I open a terminal in gui.need to remove the message on top               You seem confused     Ghost@work-Ubuntu:~$


title: Why does the "du" command count in 4KB steps?

text: > **Possible Duplicate:**   >  Directory size calculation difference I don't understand how the `du` command under Linux works. I wanted to count the overall size of a few hundred, small files and `du -sh` returned something along the lines of 150MB. I didn't question it until I realized my file manager displayed only around 50MB for the same set of data and I got confused. Here's what I then tried:               fkochem@WK-6:~/temp$ cat test      a     fkochem@WK-6:~/temp$ du -sh test      4.0K    test      So, now this must be a mistake? I looked at `du -sh *` of my original data and found the following:               4.0K    NCO-0.9.9.9.json     4.0K    NCO-0.99.9.json     4.0K    NCO-0.9.9.json     8.0K    NCO-0.99.json     8.0K    NCO-0.9.json      Why does `du` seem to count in 4KB steps? What am I missing here?


title: Deploying code on a bunch of machines

text: I have some binaries and code to be deployed to various environments. I currently use pexpect library in python to connect and rsync over sash to sync the code. Currently the method uses push mechanism to deploy. Is there a better way to do this? Is pull mechanism better. Any suggestions?


title: Unable to type some special characters in vi on a debian

text: on a machine I have access to, when I type "€" in vi, "~B� " is displayed instead, and when I type "£", "£ " What can cause this strange behavior, how can I fix it? Typing it in the console gives even less results. `locale` output :               locale: Cannot set LC_CTYPE to default locale: No such file or directory     locale: Cannot set LC_ALL to default locale: No such file or directory     LANG=en_US.UTF-8     LC_CTYPE=fr_FR.UTF-8     LC_NUMERIC="en_US.UTF-8"     LC_TIME="en_US.UTF-8"     LC_COLLATE="en_US.UTF-8"     LC_MONETARY="en_US.UTF-8"     LC_MESSAGES="en_US.UTF-8"     LC_PAPER="en_US.UTF-8"     LC_NAME="en_US.UTF-8"     LC_ADDRESS="en_US.UTF-8"     LC_TELEPHONE="en_US.UTF-8"     LC_MEASUREMENT="en_US.UTF-8"     LC_IDENTIFICATION="en_US.UTF-8"     LC_ALL=      Inside vim (I explicitely tried using vim with an 'm'):               :set enc     encoding=latin1      This looks very wrong... Typing `:set encoding=utf-8` solves the problem, but how can I make my system use utf-8 everywhere? The problem I'm trying to solve is the fact that a fixture file for my database seems to be interpreted as `latin1` by php...


title: How to fail prerm script and preinst script with error message in Debian package

text: I structured my debian package in following way   * `preinst script` which displays EULA to user and ask for choice 'y' or 'n'.   * `postinst script` which install the package and updates the initrd image.   * `prerm script` ,before uninstalling package checks for a condition if the condition matches then it exits from prerm with `exit 1`.   * `postrm script` unloads the package if the check in prerm script fails and it update the initrd image. Now I have the following questions   1. Lets say package is already installed on machine and user is trying to reinstall or upgrade it .Now if user says 'yes' to EULA, what debian will do? I observed it simply -uninstall previously installed package and reinstall it which is perfectly fine.But if user says 'n' to EULA how would I exit from uninstallation process? I did it adding `exit 1` in preinst script but its not working.I observed that if you say `dpkg -i package` ,debian first checks if package is already installed, If package is already installed then it unpacks the package even before calling preinst script(`checked it using lsmod) so if you say 'n' to EULA it starts rolling back the changes i.e reinstalling unpacked package by calling postinst script which looks like weird behaviour to end user as user has already said 'n' to EULA.I tried adding a check if module is present the do not re install it but as I said whenever you say dpkg -i package ,debian first removes the module and fails my check.So how can avoid reinstalling package if user says no to EULA?    2. If I say `dpkg -r package` and my `prerm script fails and exits with status 1` .Here the same thing happens as above.If you say `dpkg -r package` ,debian unloads the package before calling prerm script then it checks for the condition in `prerm` if it matches it exits from it and starts rolling back the changes by calling postinst script which is once again weird behaviour. I know it's the default behavior of Debian but what if I want to override default behaviour?


title: Kickstarter-like solution for OpenBSD?

text: Are there any solutions for OpenBSD to just: Insert the custom installer CD, press enter (like: "are you sure?" - message), then the installer automatically partitions the disk/installs OpenBSD, and then customize it a little (ex.: install a few apps from ports)? This can be done using Kickstarter for RHEL. **But can it be done for OpenBSD?** I googled for it and didn't found any good yet (only that needs bigger programming skills..).


title: Can linux use a mix of SHA-1 and CRYPT passwords?

text: We have an automated sync-routine that uses `useradd` to create new users on a Ubuntu 10.04 machine. The application launching the routine provided both username and `CRYPT`-encrypted password. However, since we changed how passwords are handled in order to include LDAP support, passwords now don't have to be `CRYPT` but can also be `MD5` or `SHA-1`. In fact, `SHA-1` is the new default. This however now causes problems. I have read up on how `/etc/shadow` is handled and there doesn't seem to be an id for `SHA-1`, only for `SHA-256`/`SHA-512`(`$5$` and `$6$` respectively). The only thing I found was to change the whole thing from `CRYPT` to `SHA-1`. We could do that, but we wanted the whole transition to be as non-disruptive as possible. **Is there a way to use both`CRYPT` and `SHA-1` passwords together?** NOTES   - The main application is a CMS on an entirely different server. The linux server in question is a local machine(slave) at the client's location in order to provide local services.   - We are aware that we could switch the entire system out to use LDAP-only, but, as outlined earlier, we don't want to change everything at once.


title: apt-get purge <packages> works fine, aptitude still has <packages> marked as installed and reinstalls them

text: I've created a Rubygem to help with removing old kernels that have built up over years and are eating disk space. (My laptop had 19 kernels on it alone, and on a small SSD...) I want to use apt-get or dpkg as the uninstaller since some people will not have aptitude installed and I do not want users of the gem to have to install anything. The problem comes when _some_ users do use `aptitude` for other things. Scenario:   1. User uses my gem which successfully `apt-get purge`'s the kernel packages.   2. User starts `aptitude` in interactive mode for any reason,   3. User presses the 'g' key (Download/Install/Remove Pkgs) immediately without marking any changes, -->   4. `aptitude` re-downloads and re-installs the packages that `apt-get` had purged. Currently, the gem uses `apt-get purge <packages>` to purge the kernel packages. (Seen here.) I also tried with `dpkg --purge <packages>`, but the result is the same, aptitude still wants to reinstall them. I've read through the entire `aptitude` manual and googled many things, no dice. _Maybe_ I could programmatically manage `aptitude`'s marked/unmarked packages list if I could find where it is (although I'd prefer a cleaner solution.) I assume it's not `/var/lib/dpkg/status` or else there would be no disparity? dpkg-query shows the package `status` as `Not` and the `desired` state as `Unknown`.               deKernel$ dpkg-query -l linux-image-3.2.0-39-generic     Desired=Unknown/Install/Remove/Purge/Hold     | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend     |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)     ||/ Name                                       Version                                    Description     +++-==========================================-==========================================-====================================================================================================     un  linux-image-3.2.0-39-generic               <none>                                     (no description available)     deKernel$      It's possible to go into aptitude and manually un-mark those kernel packages and the problem disappears, however this is obviously quite impractical.


title: Trying to open a GUI from a remote server using Mac but not succesfully

text: I'm brand new user in MacOSX. I'm using ssh to connect to some Linux servers. I'm trying to open a GUI locally for a process running in the remote Linux server. So I read that I should install XQuartz which is used for the X11 in the Mac.   I installed it but when I try to start the GUI I get error that DISPLAY is not set. Indeed when I `echo DISPLAY`, nothing has been set. Am I supposed to set something manually? I also noticed that there is some command line as part of the XQuartz installation. Am I supposed to use only this command line? When I start it and `echo DISPLAY` I see just :0.0. How can I configure this? I tried `ssh -X` to connect and additionally I also checked out the X-11 FAQ According to this something overrides my `DISPLAY` on the local machine. I suspect that TextMate which I installed previously does this, but I'm not sure how can I override it. What should I set? What is: `/tmp/launch-Bh0fLm/:0`?


title: Problem connecting to linksys wireless using zenwalk

text: I just recently installed zenwalk linux on my machine, and I am having trouble connecting to my wireless router. I am using the appropriate options such as use encryption, WEP passphrase, the correct passphrase, and so on. It sits there for a minute and gives me an error message of "connection failed: bad password". I have tried everything possible in my power as far as troubleshooting goes. I tried running the wireless configuration through terminal, but I don't believe I am skilled enough to do such a task, as I have not been successful thus far. If anyone is able to help it is much appreciated. Thanks


title: What is the difference between ioctl(), unlocked_ioctl() and compat_ioctl()?

text: Going through the linux 2.6.36 source code at lxr.linux.no, I could not find the `ioctl()` method in `file_operations`. Instead I found two new calls: `unlocked_ioctl()` and `compat_ioctl()`. What is the difference between `ioctl()`, `unlocked_ioctl()`, and `compat_ioctl()`?


title: Rsync two file types in one command?

text: How to write those into one line, also without repeat the same path?               rsync -a root@somewhere:/folder/remote/*.txt .     rsync -a root@somewhere:/folder/remote/*.jpg .


title: I need to check a list of directories if it contains a directory newer than 1 month before now

text: Maybe the title is quite confusing so i'll try to explain what i have done until now. First of all i have build the list of directories i want to investigate with the code below:               $MDIR="/home/user/scripts/fcron"     DIRS=`ls -l $MDIR | egrep '^d' | awk '{print $9}' | grep ^$ts-`      The DIRS list now contain directory **_names_** of the form :               NETGEAR-2013-06-30     NETGEAR-2013-07-01     ........     NETGEAR-2013-05-05      Now i need to check all those directories ( **contained in list DIRS** ) and i need to find one that is newer than 1 month before now (e.g 27 or 29 days). In case i find one match i need to exit the script. In 'pseudocode' i would write:               for dir is DIRS:         if dir is newer than 30 days old:            exit the script         else:            continue      My difficulty is in translating just the above 'pseudocode' in a bash script. /////Latest Update///// OK i have updated the part with the pseudocode with this:                   for DIR is $DIRS;         do         if (( $(stat -c %Y "$dir") < $(date +%s) - 3600*24*30 )); then             echo "exiting!!"                exit         else             continue         fi         done      But now i am getting this :                line 40: syntax error: unexpected word (expecting "do")


title: Simple Templating for Config Files

text: I need to manage a growing set of similar-but-different ASCII files. ( It so happens that they're Apache VirtualHosts, but that's not particularly relevant. ) For each production website, the developers might want as many as four variant configs for a variety of reasons. Would you please recommend your favorite templating system? I know of a few, M4 and Template::Toolkit come to mind. My most important feature isn't power, it's intuitive operation and elegant simplicity.


title: libcanberra is failing to build

text: I got version 0.26 from libcanberra site, and running `make` gives:               make[2]: *** No rule to make target `README', needed by `all-am'.  Stop.     make[2]: Leaving directory `/home/wena/src/gnome/libcanberra-0.26/doc'     make[1]: *** [all-recursive] Error 1     make[1]: Leaving directory `/home/wena/src/gnome/libcanberra-0.26'     make: *** [all] Error 2      Output of `./configure`:               prefix:                 /usr/local     sysconfdir:             ${prefix}/etc     localstatedir:          ${prefix}/var     Compiler:               gcc -std=gnu99     CFLAGS:                 -g -O2 -Wall -W -Wextra -pedantic -pipe -Wno-long-long -Winline -Wvla -Wno-overlength-strings -Wunsafe-loop-optimizations -Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wpacked -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wold-style-definition -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-noreturn -Wshadow -Wendif-labels -Wstrict-aliasing=2 -Wcast-align -Wwrite-strings -Wno-unused-parameter -ffast-math -Wp,-D_FORTIFY_SOURCE=2 -fno-common -fdiagnostics-show-option -fno-strict-aliasing     C++-Compiler:           g++     CXXFLAGS:               -g -O2     Builtin DSO:            yes     Enable PulseAudio:      yes     Builtin PulseAudio:     no     Enable ALSA:            yes     Builtin ALSA:           no     Enable OSS:             yes     Builtin OSS:            no     Enable GStreamer:       yes     Builtin GStreamer:      no     Enable Null Output:     yes     Builtin Null Output:    no     Enable tdb:             no     Enable lookup cache:    no     Enable GTK+:            yes     GTK Modules Directory:  ${exec_prefix}/lib/gtk-2.0/modules     Enable GTK3+:           yes     GTK3 Modules Directory: ${exec_prefix}/lib/gtk-3.0/modules         **UPDATE** : I'm no longer experiencing this problem and have no idea what fixed it.


title: Is it possible to prevent systemd from executing the command specified with ExecStop?

text: I have a service that I only need systemd to run `ExecStart=` command at boot, and don't run the `ExecStop` action at shutdown / reboot. Is that possible? I can't just remove the `ExecStop` line, 'cause sometimes I need to shutdown the service manually. A live example is apparmor service, you need to activate all profiles on start, but no need to disable any of them at system shutdown.


title: git tab-completion does not work on Debian Wheezy but works on Squeeze

text: My question is about git command tab-completion, i.e. when I type `git stat` and hit Tab, it completes the command line to `git status`. (Where applicable, this also works with remote names and branch names.) What confuses me is that without additional configuration on any of the boxes, on the machine with older git and stable Debian it works, while on the laptop it does not. Shouldn't that be the _other way around_? Shouldn't the fancy things tend to rather be in testing than stable? On my VPS, where:               aloism@srv:~$ git --version     git version 1.7.2.5     aloism@srv:~$ lsb_release -a     No LSB modules are available.     Distributor ID:     Debian     Description:        Debian GNU/Linux 6.0.5 (squeeze)     Release:            6.0.5     Codename:           squeeze      and on my laptop:               lennycz@laptop:~$ git --version     git version 1.7.10.4     lennycz@laptop:~$ lsb_release -a     No LSB modules are available.     Distributor ID:     Debian     Description:        Debian GNU/Linux testing (wheezy)     Release:            testing     Codename:           wheezy     lennycz@laptop:~$       There's nothing interesting in ~/.gitconfig on any of the boxes. Can anybody explain it? A bug in git? Any more research ideas?


title: How can I safely remove a SATA disk from a running system?

text: I sometimes need to plug a disk into a disk bay. At other times, I have the very weird setup of connecting a SSD using a SATA-eSATA cable on my laptop while pulling power from a desktop. How can I safely remove the SATA disk from the system? This Phoronix forum thread has some suggestions: > justsumdood wrote: > >> An(noymous)droid wrote:   >  What then do you do on the software side before unplugging? Is it a simple > "umount /dev/sd"[drive letter]? after unmounting the device, to "power off" > (or sleep) the unit: >   >   >     hdparm -Y /dev/sdX >   > > (where X represents the device you wish to power off. for example: /dev/sdb) > > this will power the drive down allowing for it's removal w/o risk of voltage > surge. Does this mean that the disk caches are properly flushed and powered off thereafter? Another suggestion from the same thread: > chithanh wrote:   >  All SATA and eSATA hardware is physically able to be hotplugged (ie. not > damaged if you insert/pull the plug). > > How the chipset and driver handles this is another question. Some > driver/chipset combinations do not properly handle hotplugging and need a > warmplug command such as the following one: >   >   >     echo 0 - 0 > /sys/class/scsi_host/hostX/scan >   > > Replace X with the appropriate number for your SATA/eSATA port. I doubt whether is the correct way to do so, but I cannot find some proof against it either. So, what is the correct way to remove an attached disk from a system? Assume that I have already unmounted every partition on the disk and ran `sync`. Please point to some official documentation if possible, I could not find anything in the Linux documentation tree, nor the Linux ATA wiki.


title: Join two files with matching columns

text: File1.txt                   id                            No         gi|371443199|gb|JH556661.1| 7907290         gi|371443198|gb|JH556662.1| 7573913         gi|371443197|gb|JH556663.1| 7384412         gi|371440577|gb|JH559283.1| 6931777      File2.txt                id                              P       R       S      gi|367088741|gb|AGAJ01056324.1| 5       5       0      gi|371443198|gb|JH556662.1|     2       2       0      gi|367090281|gb|AGAJ01054784.1| 4       4       0      gi|371440577|gb|JH559283.1|     21      19      2      output.txt                id                              P       R       S  NO      gi|371443198|gb|JH556662.1|     2       2       0  7573913      gi|371440577|gb|JH559283.1|     21      19      2  6931777      File1.txt has two columns & File2.txt has four columns. I want to join both files which has unique id (array[1] should match in both files (file1.txt & file2.txt) and give ouput only matched id (see output.txt). I have tried join -v <(sort file1.txt) <(sort file2.txt). Any help with awk or join commands requested.


title: Unlimited history in tmux

text: In your `.tmux.conf` file you can set the window history with something like: `set -g history-limit 4096` Is there a way to set an unlimited history for each window?


title: Help configuring a custom log file for iptables

text: I'm trying to log dropped packages to a custom file instead of `/var/log/messages`. To achieve this, I have added these two lines at the end of my configuration file:                   -A INPUT -m limit --limit 5/min -j LOG --log-prefix "IPTables-INPUT-Dropped: " --log-level 4         -A OUTPUT -m limit --limit 5/min -j LOG --log-prefix "IPTables-OUTPUT-Dropped: " --log-level 4      This works because I have configured the INPUT and OUTPUT chains as DROP by default, so if the package does not meet any previous rule, it will be logged and dropped. However, I cannot log them to a custom file. They log successful to `/var/log/messages`, but I want them to be logged on `/var/log/iptables.log`. I've created the file `/etc/rsyslog.d/iptables.conf` with the following content:                   :msg, contains, "IPTables-INPUT-Dropped: " - /var/log/iptables.log         & ~      then I restarted rsyslog, `/etc/init.d/rsyslog restart` and sent some packages I knew were going to be dropped.However, they are not logged in iptables.log, they are still being logged on `/var/log/messages`. Which configuration is missing? **SOLVED** The problem is that there shouldn't be an space between **-** and **/**


title: Not able to lock /var/lib/dpkg/lock (read only)

text: I was trying to install ruby on my remote server(this is a vm machine(debian) in a esxi server . ) I got this error: The Command: sudo apt-get install ruby1.8 Error :               W: Not using locking for read only lock file /var/lib/dpkg/lock     E: Unable to write to /var/cache/apt/     E: The package lists or status file could not be parsed or opened.      then I tried :               sudo dpkg --configure -a       Output:               dpkg: unable to access dpkg status area: Read-only file system       UPDATE: output of mount               /dev/sda3 on / type ext4 (rw,errors=remount-ro)     tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)     proc on /proc type proc (rw,noexec,nosuid,nodev)     sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)     udev on /dev type tmpfs (rw,mode=0755)     tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)     devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620)     /dev/sda1 on /boot type ext4 (rw)     /dev/sdb1 on /home type ext4 (rw)          mount: warning: /etc/mtab is not writable (e.g. read-only filesystem).            It's possible that information reported by mount(8) is not            up to date. For actual information about system mount points            check the /proc/mounts file.      UPDATE2:               cat /proc/mounts               rootfs / rootfs rw 0 0     none /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0     none /proc proc rw,nosuid,nodev,noexec,relatime 0 0     none /dev devtmpfs rw,relatime,size=1553128k,nr_inodes=216450,mode=755 0 0     none /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0     /dev/disk/by-uuid/cf4fb4ae-6d12-407b-bf43-3b0daaaaaf74 / ext4 ro,relatime,errors=remount-ro,barrier=1,data=ordered 0 0     tmpfs /lib/init/rw tmpfs rw,nosuid,relatime,mode=755 0 0     tmpfs /dev/shm tmpfs rw,nosuid,nodev,relatime 0 0     /dev/sda1 /boot ext4 rw,relatime,barrier=1,data=ordered 0 0     /dev/sdb1 /home ext4 rw,relatime,barrier=1,data=ordered 0 0      **UDPDATE 3** output of `dmesg`(some last part)               [1968636.237601] JBD2: Detected IO errors while flushing file data on sdb1-8     [1968772.229102] JBD2: Detected IO errors while flushing file data on sdb1-8     [1968789.799409] IPv6 addrconf: prefix with wrong length 56     [1968990.325125] IPv6 addrconf: prefix with wrong length 56     [1969190.801848] IPv6 addrconf: prefix with wrong length 56     [1969192.245363] JBD2: Detected IO errors while flushing file data on sdb1-8     [1969197.698223] IPv6 addrconf: prefix with wrong length 56     [1969223.105506] JBD2: Detected IO errors while flushing file data on sdb1-8     [1969349.119764] JBD2: Detected IO errors while flushing file data on sdb1-8     [1969398.205686] IPv6 addrconf: prefix with wrong length 56     [1969598.713179] IPv6 addrconf: prefix with wrong length 56     [1969607.241633] JBD2: Detected IO errors while flushing file data on sdb1-8     [1969799.220758] IPv6 addrconf: prefix with wrong length 56     [1969825.462909] JBD2: Detected IO errors while flushing file data on sdb1-8     [1969831.231049] JBD2: Detected IO errors while flushing file data on sdb1-8     [1969999.728348] IPv6 addrconf: prefix with wrong length 56     [1970200.247944] IPv6 addrconf: prefix with wrong length 56     [1970221.321558] JBD2: Detected IO errors while flushing file data on sdb1-8     [1970253.105491] JBD2: Detected IO errors while flushing file data on sdb1-8      `/var/log/syslog` output: ![enter image description here](http://i.stack.imgur.com/cZASw.png)


title: is it possible to use w32codecs on a 64bit system?

text: Is there any chance I can load binary codecs on 64bit arch linux ? I have few .dat files that works great under 32bit windows xp, with smplayer (after downloading codecs), but on 64bit Linux, I got twisted image. I downloaded all binary codecs for win32 here, And essential elf64 libs here Both archive was extracted to `/usr/lib/codecs` From output of strace, seems `/usr/lib/codecs` wasn't loaded. P.S attached mplayer log               MPlayer SVN-r35014-4.7.1 (C) 2000-2012 MPlayer Team     195 audio & 404 video codecs     mplayer: could not connect to socket     mplayer: No such file or directory     Failed to open LIRC support. You will not be able to use your remote control.          Playing avseq03.dat.     libavformat version 54.15.100 (internal)     MPEG-PS file format detected.     VIDEO:  MPEG1  352x288  (aspect 8)  25.000 fps  1120.0 kbps (140.0 kbyte/s)     Load subtitles in ./     Failed to open VDPAU backend libvdpau_nvidia.so: cannot open shared object file: No such file or directory     [vdpau] Error when calling vdp_device_create_x11: 1     Opening video filter: [screenshot]     ==========================================================================     Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family     libavcodec version 54.33.100 (internal)     Selected video codec: [ffmpeg1] vfm: ffmpeg (FFmpeg MPEG-1)     ==========================================================================     ==========================================================================     Opening audio decoder: [mpg123] MPEG 1.0/2.0/2.5 layers I, II, III     AUDIO: 44100 Hz, 2 ch, s16le, 224.0 kbit/15.87% (ratio: 28000->176400)     Selected audio codec: [mpg123] afm: mpg123 (MPEG 1.0/2.0/2.5 layers I, II, III)     ==========================================================================     AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample)     Starting playback...     [VD_FFMPEG] Trying pixfmt=0.     Could not find matching colorspace - retrying with -vf scale...     Opening video filter: [scale]     The selected video_out device is incompatible with this codec.     Try appending the scale filter to your filter list,     e.g. -vf spp,scale instead of -vf spp.     [VD_FFMPEG] Trying pixfmt=1.     Could not find matching colorspace - retrying with -vf scale...     Opening video filter: [scale]     The selected video_out device is incompatible with this codec.     Try appending the scale filter to your filter list,     e.g. -vf spp,scale instead of -vf spp.     [VD_FFMPEG] Trying pixfmt=2.     Could not find matching colorspace - retrying with -vf scale...     Opening video filter: [scale]     The selected video_out device is incompatible with this codec.     Try appending the scale filter to your filter list,     e.g. -vf spp,scale instead of -vf spp.     Movie-Aspect is 1.33:1 - prescaling to correct movie aspect.     [swscaler @ 0xfbf060]BICUBIC scaler, from yuv420p to rgb24 using MMX2     VO: [xv] 352x288 => 384x288 Planar YV12  [zoom]     [mpeg1video @ 0xef7180]ac-tex damaged at 12 3     [mpeg1video @ 0xef7180]Warning MVs not available     [mpeg1video @ 0xef7180]concealing 330 DC, 330 AC, 330 MV errors     [mpeg1video @ 0xef7180]concealing 330 DC, 330 AC, 330 MV errors     [mpeg1video @ 0xef7180]concealing 330 DC, 330 AC, 330 MV errors     A:   3.7 V:   3.2 A-V:  0.530 ct: -0.038  26/ 26  1%  0%  0.5% 0 0      [mpeg1video @ 0xef7180]slice mismatch     [mpeg1video @ 0xef7180]Warning MVs not available     [mpeg1video @ 0xef7180]concealing 330 DC, 330 AC, 330 MV errors     A:   3.7 V:   3.2 A-V:  0.526 ct: -0.034  27/ 27  1%  0%  0.5% 0 0      [mpeg1video @ 0xef7180]concealing 330 DC, 330 AC, 330 MV errors     A:   3.8 V:   3.3 A-V:  0.482 ct: -0.030  28/ 28  1%  0%  0.5% 0 0      [mpeg1video @ 0xef7180]concealing 330 DC, 330 AC, 330 MV errors     A:   3.8 V:   3.3 A-V:  0.478 ct: -0.026  29/ 29  1%  0%  0.5% 0 0


title: Why does nagios stops sending alerts to the server? (Debian Squeeze)

text: I have a client machine and a server; I configured nagios on client to send alert on server to monitor that everything is working fine but suddenly the client stops sending alerts to the server -- on the server side everything is ok but when I checked on client logs I found this:                   Local time is Thu Jun 28 01:55:21 EDT 2012     [1340862921] LOG VERSION: 2.0     [1340862921] Finished daemonizing... (New PID=11496)     [1340863401] Warning: comment_file variable ignored.  Comments are now stored in the status and retention files.     [1340863401] Warning: downtime_file variable ignored.  Downtime entries are now stored in the status and retention files.     [1340863401] Warning: aggregate_status_updates directive ignored.  All status file updates are now aggregated.     [1340863401] Nagios 3.2.1 starting... (PID=11783)     [1340863401] Local time is Thu Jun 28 02:03:21 EDT 2012     [1340863401] LOG VERSION: 2.0     [1340863401] Finished da^C               Local time is Thu Jun 28 01:55:21 EDT 2012     [1340862921] LOG VERSION: 2.0     [1340862921] Finished daemonizing... (New PID=11496)     [1340863401] Warning: comment_file variable ignored.  Comments are now stored in the status and retention files.     [1340863401] Warning: downtime_file variable ignored.  Downtime entries are now stored in the status and retention files.     [1340863401] Warning: aggregate_status_updates directive ignored.  All status file updates are now aggregated.     [1340863401] Nagios 3.2.1 starting... (PID=11783)     [1340863401] Local time is Thu Jun 28 02:03:21 EDT 2012     [1340863401] LOG VERSION: 2.0     [1340863401] Finished da^C      Can anybody tell me what the problem might be? I also find               STIGTERM shutting down      What does that mean?


title: Freenas e-mail configuration files

text: I have installed a Freenas 8 server to backup my files. I have configured its email alert system using web interface and I'm receiving regular daily email reports correctly. I'm curious: where Freenas stores its mail configuration files and what kind of mailing software does it use?


title: Linux: How to find the device driver used for a device?

text: If my target has one device connected and many drivers for that device loaded, how can I understand what device is using which driver?


title: window minimize

text: In unity, when I click on any application icon on the left vertical application launcher toolbar - ![enter image description here](http://i.stack.imgur.com/MB1zg.png) that particular application bring to front. But If I click on the same icon again, why doesn't that application get minimized ? I am expecting to see the same behavior as that of Gnome's taskbar.


title: laptop running arch abruptly switches off when ripping video files

text: Whenever I try to transcode a movie or a large video file, my laptop always switches off abruptly some time after the transcoding has begun. I initially thought that this had something to do with my DVD drive but even when I tried converting videos from a hard drive, the problem remained. I've switched from Handbrake to VLC and still the problem remains. When I opened System Monitor when the converting was going on, the CPU usage is around 100%. Is this a hardware problem or is it something wrong with the software?


title: How to stop xargs from badly merging output from multiple processes?

text: I'm using `xargs` with the option `\--max-args=0` (alternatively `-P 0`). However, the output of the processes is merged into the `stdout` stream without regard for proper line separation. So I'll often end up with lines such as:               <start-of-line-1><line-2><end-of-line-1>      As I'm using `egrep` with `^` in my pattern on the whole `xargs` output this is messing up my result. Is there some way to force `xargs` to write the process outputs in order (any order, as long as the output of one process is contiguous)? Or some other solution? **Edit:** more details about the use case: I want to download and parse web pages from different hosts. As every page takes about a second to load and there are a few dozen pages I want to parallelize the requests. My command has the following form:               echo -n $IPs | xargs --max-args=1 -I {} --delimiter ' ' --max-procs=0 \     wget -q -O- http://{}/somepage.html | egrep --count '^string'      I use bash and not something like Perl because the host IPs (the $IPs variable) and some other data comes from an included bash file.


title: How can I redirect all traffic except local through external proxy with iptables in dd-wrt?

text: I have a router with dd-wrt. I have a firewall running to direct all traffic through an external proxy. It works great except that it also redirects local Ips and my proxy does not allow Ips, so I can not access my router Web administration. The firewall I have running is:               iptables -t nat -A PREROUTING -i br0 -p tcp --dport 80 -j DNAT --to 218.108.168.73:82      iptables -t nat -A PREROUTING -i br0 -p tcp --dport 443 -j DNAT --to 218.108.168.73:82       What can I add to this to access my router ip?


title: Why do NoMachine NXclient docs instruct to copy over the server's private key?

text: Working to set up the GnuPG keymanager for SSH and now FreeNX server on CentOS 6 and NoMachine NXclient on my new install of ArchLinux I've been reading more about keys than I've ever read before. I'm at the level of "A Postal Analogy" from Wikipedia. So, it makes perfect sense a private key is kept on the originating system and the public key is the one shared. And this message is repeated again and again: "Once you have generated a key pair, you will need to copy the public key to the remote server [...] Note that the private key is not shared and remains on the local machine." "The thing is that your private key must never be compromised." However, instructions to set up NX From CentOS's FreeNX setup page (scroll down): "You will need to ssh into the server [...] Copy all the text (including the BEGIN DSA PRIVATE KEY and END DSA PRIVATE KEY lines." From NoMachine's setup page: "Distribute the private key from the newly generated couple of keys located in the file [...] to all clients that have to be granted acccess to the specific NX server host." The client can certainly generate its own private key. EDIT: And... After trying to take the below comments into consideration, I reconfigured the user for nx. What's going on with the failed authentication asking for (what I expect) the public key?               NX> 203 NXSSH running with pid: 4523     NX> 285 Enabling check on switch command     NX> 285 Enabling skip of SSH config files     NX> 285 Setting the preferred NX options     NX> 200 Connected to address: 192.168.2.8 on port: 22     NX> 202 Authenticating user: nx     **NX> 208 Using auth method: publickey**     NX> 204 Authentication failed.


title: shell script to return the kde desktop name

text: I've defined the names of my KDE desktops to those of my workstation and the local compute servers. I want to find a way such that when I open a shell in the particular named desktop, it will open the shell in the corresponding machine. Example, here is a list of my KDE desktop names:   * MyWs   * Cs1   * Cs2 When I open a shell while I am in the "Cs1" window, I want it to open an SSH session on "Cs1" rather than the current machine I'm working from. I figure I can do this if I can retrieve the name of the KDE desktop that I am opening a terminal from (konsole) and use that to call my remote login SSH script. Through my Google search, I've discovered how to find the window number that I'm using (`xprop -root | egrep '^_NET_CURRENT_DESKTOP'`), but cannot find anything that tells me how to retrieve the **name** of the window. I have tried the "qdbus" and "qdop" (including the graphical kdcop) and still cannot find anything giving me the current desktop name. Now, let me also preface this by saying we are using an ancient version of RH5 (RedHatEnterpriseClient 5.6) and not running the latest and greatest KDE (KDE 3.54.el5_4.1). * * * **Edit** : A comment asked what `xprop -root | egrep '^_NET_DESKTOP_NAMES'` shows. I tried that before I posted my question, but I get the following and I don't know what to do with that result: > _NET_DESKTOP_NAMES(UTF8_STRING) = 0x41, 0x55, 0x4c, 0x57, 0x53, 0x30, 0x38, > 0x34, 0x0, 0x41, 0x55, 0x4c, 0x43, 0x53, 0x32, 0x31, 0x31, 0x0, 0x41, 0x55, > 0x4c, 0x43, 0x53, 0x32, 0x31, 0x32, 0x0, 0x41, 0x55, 0x4c, 0x43, 0x53, 0x32, > 0x31, 0x33, 0x0, 0x41, 0x55, 0x4c, 0x43, 0x53, 0x32, 0x31, 0x34, 0x0` Running `dcop kwin KWinInterface currentDesktop` returns `1` Finally, right after submitting my question, I came across another post on this site and the use of `wmctrl -d`. I decided to give it a try. I found out that we did not have `wmctrl` installed in our system and so I downloaded and compiled `wmctrl`. `wmctrl -d` does return all the information I need, excepting the trouble to extract the information obtained from the `wmctrl -d` command. Isn't there an easier way, using `dcop` or something?


title: Tips for improved font rendering and readability in Ubuntu with KDE

text: I am having difficulty using Kubuntu (or GNOME) for work because text readability is quite poor (read headache inducing) compared to Windows Vista/7 and OS X. Any tips on how to improve font rendering or, more generally, readability would be greatly appreciated! (The NVIDIA provided driver for the FX 770M gpu is installed. Also, unlikely to be a hardware issue as the machine is dual boot with Vista, which looks fine.)


title: How to match exact string using `sed`? But not the part of it.?

text: I have a input file **FILE1.TXT** as below. * * *               11 id1       12       13 AGE = 20       14 NAME = NAME1       15       16 id2       17       18 AGE = 30       19 NAME = NAME2       .       .       .       110 idXYZ       111       112 AGE = AGEXYZ       113 NAME = NAMEXYZ       114       115 idZZZ       116      * * * I want to search all the fields that belong to a particular _Id_ and get the value for _NAME_ I managed to loop through each _Id_ and formed the below command for each _Id_ as required. `sed -n '/11/,/14/p' FILE1.TXT | grep NAME | awk -F "= " '{print $2}'` The problem here is, I get the output _NAME1_ , in addition to that, I also get _NAMEXYZ_. What should be changed so that I only get _NAME1_ but not _NAMEXYZ_? As a workaround, the below commands work. `sed -n '/11/,/14/p' FILE1.TXT | grep NAME | awk -F "= " '{print $2}'|head -1` Is there any 'switch' or am I missing something?


title: Stop ZSH from trying to correct command

text: $ knife cookbook download recipe     zsh: correct 'cookbook' to 'cookbooks' [nyae]?      How can I get zsh to stop trying to correct cookbook to cookbooks?? cookbooks is a directory where I run the command so I understand why it's doing it, but cookbook is a valid part of the command line.


title: How to stop a infinite running process (ztail) started by a ssh session after that session is closed

text: I have a peculiar problem. My server supports multiple ssh session simultaneously, so that multiple admins can manage (via command line interface) it simultaneously. We have a command which calls `ztail` to show the compressed log files. Now when the current ssh session is closed (without pressing `Ctrl`-`C`, to stop the `ztail` command), this command should ideally stop working. But what I observed when I start a new ssh session that, the process (`ztail`) is still running in background and consuming my CPU, even though the previous session was closed. Now how can I know when the session was closed, so that I can use that variable/flag to close/stop any commands initiated by that previously closed session?


title: What are the differences between bsdtar and GNU tar?

text: I've always used GNU `tar`. However, all GNU/Linux distributions that I've seen ship `bsdtar` in their repositories. I've even seen it installed by default in some, IIRC. I know for sure that Arch GNU/Linux requires it as a part of `basedevel` (maybe `base`, but I'm not sure), as I've seen it in PKGBUILDs. Why would you want to use `bsdtar` instead of GNU `tar`? What are the advantages? Note that I am the person who asked What are the main differences between BSD and GNU/Linux userland?.


title: Is the linux directory structure obsolete and obtuse?

text: I genuinely feel that the Linux directory system presents an obstacle for users migrating from other systems as well as being a bottleneck for the evolution of Linux itself. Rest assured I am not here to start trolling. I am a huge fan of Linux as an alternative to increasingly bloated and expensive competitive operating systems, but rarely have I seen such stranded evolution in the core of an operating system. I realize that Linux and Unix professionals are firmly focused on providing stability and reliability, and abandoning working solutions in favor of new ideas isn't always the way to go. However, even as a computer professional with considerable experience using windows, I find that the cryptic and repetitive nature of the Linux directory structure constrains my efforts to use the OS in earnest. Windows finally shed its 8.3 names a few years ago, and few users would argue that things were better before. Instead we have seen a steady evolution towards less ambiguous file and folder names and improved structure (at least in some parts of the overall hierarchy). Of course Windows takes it too far by constantly changing storage location for all kinds of things. A windows user profile is a moving target if ever there was one. Nobody wants to keep up with something like that. My question is this. Would it harm Linux if the folder structure would evolve towards the human side of things by starting to remove some of its ambiguity and cryptical nature so that advanced users from other worlds could start to wrap their brains around the excellence of Linux. Is it really harmful if we would start to see:   * Binaries   * Libraries   * Drivers   * Users      * User1        * Binaries       * Libraries     * User2        * Binaries       * Libraries   * Devices   * Help In my world I prefer even more catagorized top level folders:   * Applications   * System   * User Data Don't take the above directory outlines too literally. They are just meant to illustrate a point.


title: Ubuntu 14.04 Nvidia proprietary drivers installation

text: I require some Help and Guidance in installing NVIDIA drivers on my system with a Dual Intel/Nvidia Graphics Processors. I am currently running Ubuntu 14.04 and i am aware that the OS is in its late Beta stage however i perform daily Updates. The OS is running fine and smooth so i can not say that i have experienced any problems. Following the installation method from below I successfully installed the Nvidia Driver without any errors. However upon restarting the system I was presented with a black screen. Following a solution, I blacklisted the Nouveau Driver and performed another restart where uppon I was presented with the logging screen but in a 4/3 aspect ratio Format. I was unable to continue the log in to the Unity Desktop because the system froze and rendered the Mouse and keyboard inoperable. Following another solution i then restarted the system in console mode where i proceeded to check the nvidia-xorg file. I noticed the settings looked odd as `Section "Device"` and `Screen` were missing. I tried recreating the file as per instructions using `nvidia-xconfig` but i received an error " **Unable to load X Server Display Configuration page:** ". At that point I gave up and re installed Ubuntu. I repeated this Process Once more but with no Success. I am currently running Ubuntu without the Nvidia drivers and i disabled the card using this method " **apt-get install --no-install-recommends bumblebee** ". However i would like to get the Nvidia Card working.               sudo apt-get purge libvdpau-va-gl1     sudo apt-get install nvidia-319 nvidia-settings-319 nvidia-prime      Hardware:   * Dell Inspiron 15R N5110 laptop   * Intel I5   * Card 1: Intel HD Graphics 3000 ("Intel 2nd Generation Core Processor Family Integrated Graphics Controller")   * Nvidia Geforce GT525M ("NVIDIA GF108M [GeForce GT 525M]") Software:   * X.Org: 1.15.0 drivers: intel (unloaded: fbdev,vesa) Resolution: 1366x768@60.0hz   * GLX Renderer: Mesa DRI Intel Sandybridge Mobile GLX Version: 3.0 Mesa 10.1.0


title: Disable touchpad pointer moving, only tap click

text: I installed CentOS 6.4 on my laptop, a Lenovo E431. This laptop has the trackpoint that is so cool to move mouse pointer, so I want to disable pointer moving with touchpad dragging. Can this be? And I have one more question. My touchpad button is under the pad, like apple products. But it's Clicking sound is so loud, and too thick to click. So I want to set tap to click area. Like set half of left is left button down and another side is right click.(right edge and left edge is scrolling) Can this also be?


title: How to use a backup in OpenVZ

text: I have a backup (.tgz file) that is an openvz virtual machine. i followed this article and i setup an openvz container but how i will use my backup file? **EDIT:** i found the tool ovz-web-panel (i am new to openvz :) )


title: Understanding Gnome various Icons

text: The question is about customizing the way icon appears at   1. desktop shell   2. notification area   3. file associations              [Desktop Entry]     Version=1.0     Type=Application     Name=Mathematica 9     Comment=Technical Computing System     Exec=/usr/local/Wolfram/Mathematica/9.0/Executables/Mathematica %F     Icon=wolfram-mathematica     MimeType=application/mathematica;application/vnd.wolfram.cdf     Categories=Education      Now provided I can make a custom desktop file where I can place png file location at icon...but how come the above desktop file is referring to an icon & where is that icon (wolfram-mathematica)? Secondly how to system wide change icon of a special file type say a docx to something else ![enter image description here](http://i.stack.imgur.com/GVQ61.png) Third & last how gnome load tray icons & where are those icons stored e.g I want to customise autokey tray icon to something else how can I do it? Have also looked at /usr/share/pixmaps but to no avail ![enter image description here](http://i.stack.imgur.com/KNTrW.png)


title: Keyboard is not responsive on xorg-server-1.13.1

text: When I've upgraded to xorg-server-1.13.1 keyboard stopped functioning. I then downgrade to xorg-server-1.12.4 and xorg-drivers-1.12 and it works now. My USE flags for both xorg-server and xorg-drivers below:               $ equery u xorg-server     [ Legend : U - final flag setting for installation]     [        : I - package is installed with flag     ]     [ Colors : set, unset                             ]      * Found these USE flags for x11-base/xorg-server-1.12.4:      U I      - - dmx         : Build the Distributed Multiheaded X server      - - doc         : Adds extra documentation (API, Javadoc, etc). It is recommended to enable per package instead of globally      - - ipv6        : Adds support for IP version 6      - - kdrive      : Build the kdrive X servers      - - minimal     : Install a very minimal build (disables, for example, plugins, fonts, most drivers, non-critical features)      + + nptl        : Enable support for Native POSIX Threads Library, the new threading module (requires linux-2.6 or better usually)      - - static-libs : Build static libraries      - - tslib       : Build with tslib support for touchscreen devices      + + udev        : Enable sys-fs/udev integration (device discovery, power and storage device support, etc)      + + xnest       : Build the Xnest server      + + xorg        : Build the Xorg X server (HIGHLY RECOMMENDED)      - - xvfb        : Build the Xvfb server      archer@capitan ~ $ equery u xorg-drivers      [ Legend : U - final flag setting for installation]      [        : I - package is installed with flag     ]      [ Colors : set, unset                             ]      * Found these USE flags for x11-base/xorg-drivers-1.12:      U I      - - input_devices_acecad      : INPUT_DEVICES setting to build driver for acecad input devices      - - input_devices_aiptek      : INPUT_DEVICES setting to build driver for aiptek input devices      - - input_devices_elographics : INPUT_DEVICES setting to build driver for elographics input devices      + + input_devices_evdev       : INPUT_DEVICES setting to build driver for evdev input devices      - - input_devices_fpit        : INPUT_DEVICES setting to build driver for fpit input devices      - - input_devices_hyperpen    : INPUT_DEVICES setting to build driver for hyperpen input devices      - - input_devices_joystick    : INPUT_DEVICES setting to build driver for joystick input devices      + + input_devices_keyboard    : INPUT_DEVICES setting to build driver for keyboard input devices      + + input_devices_mouse       : INPUT_DEVICES setting to build driver for mouse input devices      - - input_devices_mutouch     : INPUT_DEVICES setting to build driver for mutouch input devices      - - input_devices_penmount    : INPUT_DEVICES setting to build driver for penmount input devices      - - input_devices_synaptics   : INPUT_DEVICES setting to build driver for synaptics input devices      - - input_devices_tslib       : INPUT_DEVICES setting to build driver for tslib input devices      - - input_devices_vmmouse     : INPUT_DEVICES setting to build driver for vmmouse input devices      - - input_devices_void        : INPUT_DEVICES setting to build driver for void/dummy input devices      - - input_devices_wacom       : INPUT_DEVICES setting to build driver for wacom input devices      - - video_cards_apm           : VIDEO_CARDS setting to build driver for apm video cards      - - video_cards_ark           : VIDEO_CARDS setting to build driver for ark video cards      - - video_cards_ast           : VIDEO_CARDS setting to build driver for ASpeedTech video cards      - - video_cards_cirrus        : VIDEO_CARDS setting to build driver for cirrus video cards      - - video_cards_dummy         : VIDEO_CARDS setting to build driver for dummy video cards      - - video_cards_epson         : VIDEO_CARDS setting to build driver for epson video cards      - - video_cards_fbdev         : VIDEO_CARDS setting to build driver for fbdev video cards      - - video_cards_fglrx         : VIDEO_CARDS setting to build driver for fglrx video cards      - - video_cards_glint         : VIDEO_CARDS setting to build driver for glint video cards      - - video_cards_i128          : VIDEO_CARDS setting to build driver for Number 9 I128 video cards      - - video_cards_intel         : VIDEO_CARDS setting to build driver for Intel video cards      - - video_cards_mach64        : VIDEO_CARDS setting to build driver for mach64 video cards      - - video_cards_mga           : VIDEO_CARDS setting to build driver for mga video cards      - - video_cards_modesetting   : VIDEO_CARDS setting to build driver for unaccelerated modesetting      - - video_cards_neomagic      : VIDEO_CARDS setting to build driver for neomagic video cards      - - video_cards_nouveau       : VIDEO_CARDS setting to build reverse-engineered driver for nvidia cards      - - video_cards_nv            : VIDEO_CARDS setting to build driver for nv video cards      + + video_cards_nvidia        : VIDEO_CARDS setting to build driver for nvidia video cards      - - video_cards_qxl           : VIDEO_CARDS setting to build driver for qxl (QEMU virtual GPU)      - - video_cards_r128          : VIDEO_CARDS setting to build driver for ATI r128 video cards      - - video_cards_radeon        : VIDEO_CARDS setting to build driver for ATI radeon video cards      - - video_cards_s3            : VIDEO_CARDS setting to build driver for s3 video cards      - - video_cards_s3virge       : VIDEO_CARDS setting to build driver for s3virge video cards      - - video_cards_savage        : VIDEO_CARDS setting to build driver for savage video cards      - - video_cards_siliconmotion : VIDEO_CARDS setting to build driver for siliconmotion video cards      - - video_cards_sis           : VIDEO_CARDS setting to build driver for SiS video cards      - - video_cards_tdfx          : VIDEO_CARDS setting to build driver for tdfx video cards      - - video_cards_tga           : VIDEO_CARDS setting to build driver for tga video cards      - - video_cards_trident       : VIDEO_CARDS setting to build driver for trident video cards      - - video_cards_v4l           : VIDEO_CARDS setting to build driver for v4l video cards      - - video_cards_vesa          : VIDEO_CARDS setting to build driver for vesa video cards      - - video_cards_via           : VIDEO_CARDS setting to build driver for via video cards      - - video_cards_virtualbox    : VIDEO_CARDS setting to build driver for virtualbox emulation      - - video_cards_vmware        : VIDEO_CARDS setting to build driver for vmware video cards      What's the problem?


title: Unsure about the behaviour of my script when writing to log file

text: I have a very simple ksh script and at certain points I want to write to a log file. I use the following commands in two places...               print "Directory listing 1:\n" > ${LogFile}     ll >> ${LogFile}      (Note: The second time this command is used print Directory listing 2) My problem is, when I view the log file afterwards, only the second execution of these commands work! So there's no "Directory listing 1" and accompanying "ll" output. I have tested and tested the script to ensure that there's nothing wrong my logic. I've added print test commands just before each so I know they get executed. Is there something I've done wrong or I'm not realising?