title: Linux Mint won't run virtualbox

text: I installed Linux Mint 11 Katya with Virtualbox 4.1 once and all was running fine. Then I reinstalled system, and I have a lot of software installed too (including Wine). But when I went through the same steps to install Virtualbox, it failed on launch with these two error dialogs:               Failed to open a session for the virtual machine w7.     The virtual machine 'w7' has terminated unexpectedly during startup with exit code 1. Details:     Result Code:      NS_ERROR_FAILURE (0x80004005)     Component:      Machine     Interface:      IMachine {5eaa9319-62fc-4b0a-843c-0cb1940f8a91} And another error window:               VirtualBox - Error In suplibOsInit     Kernel driver not installed (rc=-1908)          The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or there is a permission problem with /dev/vboxdrv. Please reinstall the kernel module by executing          '/etc/init.d/vboxdrv setup'          as root. Users of Ubuntu, Fedora or Mandriva should install the DKMS package first. This package keeps track of Linux kernel changes and recompiles the vboxdrv kernel module if necessary. All steps to resolve the error didn't work. running `/etc/init.d/vboxdrv setup` as root gives me:                * Stopping VirtualBox kernel modules                                    [ OK ]       * Uninstalling old VirtualBox DKMS kernel modules                       [ OK ]       * Trying to register the VirtualBox kernel modules using DKMS           [ OK ]       * Starting VirtualBox kernel modules                                                 * modprobe vboxdrv failed. Please use 'dmesg' to find out why Also, I see on my update manager after adding the Virtualbox repo that all downloads from Virtualbox failed. Any ideas? I really really don't want to reinstall system... I also purged and manual deleted Virtualbox installation (except the group `vboxusers`) before trying again. Messages from reinstalling:               addgroup: The group `vboxusers' already exists as a system group. Exiting.      * Stopping VirtualBox kernel modules                                                                            [ OK ]       * Uninstalling old VirtualBox DKMS kernel modules                                                               [ OK ]       * Trying to register the VirtualBox kernel modules using DKMS                                                   [ OK ]       * Starting VirtualBox kernel modules                                                                                * modprobe vboxdrv failed. Please use 'dmesg' to find out why     Setting up libhal1 (0.5.14-5+svn1) ...     Setting up libsdl-ttf2.0-0 (2.0.9-1build2) ...     Processing triggers for python-central ...     Processing triggers for libc-bin ...     ldconfig deferred processing now taking place `dmesg` output (last lines only, repeated very many times on log):               [21630.591769] ata3.01: status: { DRDY ERR }     [21630.591770] ata3.01: error: { UNC }     [21630.642637] ata3: nv_mode_filter: 0x3f39f&0x3f39f->0x3f39f, BIOS=0x3f000 (0xc6c500) ACPI=0x3f01f (600:20:0x1c)     [21630.742626] ata3.01: configured for UDMA/100     [21630.742641] ata3: EH complete     [21632.333286] ata3.01: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0     [21632.333290] ata3.01: BMDMA stat 0x65     [21632.333293] ata3.01: failed command: READ DMA     [21632.333300] ata3.01: cmd c8/00:08:52:ae:06/00:00:00:00:00/f1 tag 0 dma 4096 in     [21632.333301]          res 51/40:00:55:ae:06/40:00:01:00:00/f1 Emask 0x9 (media error)     [21632.333303] ata3.01: status: { DRDY ERR }     [21632.333305] ata3.01: error: { UNC }     [21632.384184] ata3: nv_mode_filter: 0x3f39f&0x3f39f->0x3f39f, BIOS=0x3f000 (0xc6c500) ACPI=0x3f01f (600:20:0x1c)     [21632.484163] ata3.01: configured for UDMA/100     [21632.484178] ata3: EH complete     [21634.074790] ata3.01: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0     [21634.074794] ata3.01: BMDMA stat 0x65     [21634.074798] ata3.01: failed command: READ DMA     [21634.074804] ata3.01: cmd c8/00:08:52:ae:06/00:00:00:00:00/f1 tag 0 dma 4096 in     [21634.074805]          res 51/40:00:55:ae:06/40:00:01:00:00/f1 Emask 0x9 (media error)     [21634.074808] ata3.01: status: { DRDY ERR }     [21634.074810] ata3.01: error: { UNC }     [21634.125716] ata3: nv_mode_filter: 0x3f39f&0x3f39f->0x3f39f, BIOS=0x3f000 (0xc6c500) ACPI=0x3f01f (600:20:0x1c)     [21634.225706] ata3.01: configured for UDMA/100     [21634.225720] ata3: EH complete     [21635.808000] ata3.01: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0     [21635.808005] ata3.01: BMDMA stat 0x65     [21635.808008] ata3.01: failed command: READ DMA     [21635.808014] ata3.01: cmd c8/00:08:52:ae:06/00:00:00:00:00/f1 tag 0 dma 4096 in     [21635.808015]          res 51/40:00:55:ae:06/40:00:01:00:00/f1 Emask 0x9 (media error)     [21635.808018] ata3.01: status: { DRDY ERR }     [21635.808020] ata3.01: error: { UNC }     [21635.850599] ata3: nv_mode_filter: 0x3f39f&0x3f39f->0x3f39f, BIOS=0x3f000 (0xc6c500) ACPI=0x3f01f (600:20:0x1c)     [21635.950574] ata3.01: configured for UDMA/100     [21635.950592] sd 2:0:1:0: [sdb] Unhandled sense code     [21635.950594] sd 2:0:1:0: [sdb]  Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE     [21635.950597] sd 2:0:1:0: [sdb]  Sense Key : Medium Error [current] [descriptor]     [21635.950601] Descriptor sense data with sense descriptors (in hex):     [21635.950603]         72 03 11 04 00 00 00 0c 00 0a 80 00 00 00 00 00      [21635.950610]         01 06 ae 55      [21635.950614] sd 2:0:1:0: [sdb]  Add. Sense: Unrecovered read error - auto reallocate failed     [21635.950618] sd 2:0:1:0: [sdb] CDB: Read(10): 28 00 01 06 ae 52 00 00 08 00     [21635.950625] end_request: I/O error, dev sdb, sector 17215061     [21635.950648] ata3: EH complete


title: How to get the timezone of a FTP server?

text: With `lftp`, when I do `ls` I get the listing of the files on the FTP server, with their date. However, the timezone is not displayed. On my local machine, I can do `ls -l --time-style=full-iso` to see the timezone, but this command doesn't work with `lftp`. Generally speaking, does the FTP protocol allow for server timezone discovery? When I do a file listing (`ls`), how can I see which timezone the date is supposed to be?


title: How to download files with wget where the page makes you wait for download?

text: I am trying to download a file from sourceforge using wget, but as we all know we have to click on the download button and then wait for it to auto download. how do you download this type of file using wget? I am trying to download this: http://sourceforge.net/projects/bitcoin/files/Bitcoin/bitcoin-0.8.1/bitcoin-0.8.1-linux.tar.gz/download But doing a wget on that url link would not get me the file as the file is auto loaded via the browser.


title: Apache serve a web page in different languages

text: I want to serve a web page in different languages depending on where the user comes from. Eg. www.mysite.com/fr if the user is from France and www.mysite/es if the user is from Spain. Also it would be accepeted www.fr.mysite.com and www.es.mysite.com. I'm not refering to this: http://httpd.apache.org/docs/2.2/es/content- negotiation.html I don't want it to be shown like this: www.mysite.com/home.es.html


title: don't log cron events in auth.log

text: In my `/etc/rsyslog.conf`, I have following line to log `auth` facility into `/var/log/auth.log`:               auth,authpriv.*           /var/log/auth.log      but the file is flooded with cron logs, sucgh as these:               CRON[18620]:  pam_unix(cron:session): session opened for user root by (uid=0)     CRON[18620]:  pam_unix(cron:session): session closed for user root      I would like to get rid of the cron logs, and only have real "auth" events being logged into that file. By that I mean, I want to see which users have logged into the system, or made `su -`. How can I achieve that?


title: Remove other linux installation on same hard disk

text: I have the following setup:               [phil@thinkpad ~]$ lsblk      NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT     sda      8:0    0 238,5G  0 disk      ├─sda1   8:1    0  52,3G  0 part      ├─sda2   8:2    0 111,8G  0 part /home     ├─sda3   8:3    0   954M  0 part [SWAP]     └─sda4   8:4    0    50G  0 part /     sr0     11:0    1  1024M  0 rom       where :               sda1 : root partition of ubuntu     sda2 : home partition of ubuntu & arch     sda3 : swap partition of ubuntu & arch     sda4 : root partition of arch      what i want to achieve : delete the ubuntu root partition (sda1) what is my problem / fear : when i boot up, GRUB is displayed to choose from either arch or ubuntu. This is the grub installation from ubuntu, so if i delete the ubuntu root partition (sda1), the grub installation is also gone, right? -> How can I overwrite the (ubuntu) grub installation with the other (arch) grub installation? Thanks in advance!


title: Automatically run kpartx during boot

text: I'm running Debian Wheezy on an SSD, and in addition I have two 500GB hard disks in Intel software RAID 0 (fakeraid). Both the SSD and the RAID array have GPT partition layouts. **I have set up my fstab to automatically mount one of the partitions on the RAID array** , but the root filesystem is on the SSD. During boot, dmraid finds the array but does not automatically discover the partitions on it. This causes the boot fsck to fail and dumps me at a recovery shell. Running `kpartx -a /dev/mapper/isw_xxx_Volume0` at the recovery shell automatically discovers the partitions and everything works great, but it's a bit irritating having to type it in every time I boot. Am I doing something wrong? Is there some way to make the partition probing automatic? ## Partition layout of /dev/sda (the SSD)               Number  Start (sector)    End (sector)  Size       Code          1            2048          411647   200.0 MiB   EF00  EFI System Partition        2          411648       117598207   55.9 GiB    0700  Debian root filesystem        3       117598208       250068991   63.2 GiB    0700  Not used yet      ## Partition layout of /dev/mapper/isw_cddhbifacg_Volume0 (the RAID array)               Number  Start (sector)    End (sector)  Size       Code          1            2048       937502719   447.0 GiB   0700  Debian extra stuff        2       937502720       976564223   18.6 GiB    8200  Swap        3       976564224      1953535999   465.9 GiB   0700  Not used yet      ## Contents of /etc/fstab               # <file system> <mount point>   <type>  <options>       <dump>  <pass>     UUID=7f894df3-49f4-4119-bda9-f4734780eaab /               ext4    errors=remount-ro 0       1     UUID=0B6C-A37C  /boot/efi       vfat    defaults        0       1     /dev/mapper/isw_cddhbifacg_Volume0p1 /mnt/data       ext4    defaults        0       2     /dev/mapper/isw_cddhbifacg_Volume0p2 none            swap    sw              0       0     /dev/sr0        /media/cdrom0   udf,iso9660 user,noauto     0       0     /dev/sdd1       /media/usb0     auto    rw,user,noauto  0       0     /dev/sde1       /media/usb1     auto    rw,user,noauto  0       0     /dev/sde2       /media/usb2     auto    rw,user,noauto  0       0


title: FreeBSD setup RTL8187SE wireless NIC

text: I am running FreeBSD 10. My wireless card is:               none1@pci0:9:0:0:   class=0x028000 card=0x818210ec chip=0x819910ec rev=0x22 hdr=0x00         vendor     = 'Realtek Semiconductor Co., Ltd.'         device     = 'RTL8187SE Wireless LAN Controller'         class      = network      I followed the instructions at https://www.dan.me.uk/blog/2010/01/25/ndis- wifi-drivers-in-freebsd-project-evil/ I was able to successfully create and load a ko file from the WindXP driver for my NIC. I did not get the output:               ndis0: <Realtek RTL8191SE Wireless LAN 802.11n PCI-E NIC> port 0×3000-0x30ff mem 0xfa000000-0xfa003fff irq 17 at device 0.0 on pci3     ndis0: [ITHREAD]     ndis0: NDIS API version: 5.1      Or anything similar to that. When I do `ifconfig` I do not see the ndis device. Can someone please help me with setting up this WNIC? Am I missing a step? I do not see the device at all. Steps I took:   1. Downloaded WinXP driver   2. `ndisgen /drv/net8187Se.inf /drv/rtl8187Se.sys`   3. Moved the `rtl***_sys.ko` file to `/boot/modules`   4. Edited `/etc/rc.conf`              hostname="carbonpc"     ifconfig_alc0="DHCP"     ifconfig_alc0_ipv6="inet6 accept_rtadv"     sshd_enable="YES"     moused_enable="YES"     powerd_enable="YES"     # Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable     dumpdev="AUTO"     wlans_ndis0="wlan0"     ifconfig_wlan0="WPA DHCP"      * * *               # kldstat     Id Refs Address            Size     Name      1   18 0xffffffff80200000 15f0430  kernel      2    1 0xffffffff817f1000 5dcf8    rtl8187Se_sys.ko      3    2 0xffffffff8184f000 19b48    if_ndis.ko      4    3 0xffffffff81869000 398c0    ndis.ko      ifconfig does not show any kind of wlan0.


title: zsh and COLUMNS

text: I cannot understand the behavior of the `$COLUMNS` variable under `zsh`. Here's an example of the sort of behavior I'm referring to. The script `$HOME/cols.sh` is the following:               echo "COLUMNS=$COLUMNS"     set | grep -a COLUMNS     COLUMNS=     echo "COLUMNS=$COLUMNS"     set | grep -a COLUMNS      I get different results depending on whether I run this script with `env -i zsh` or `env -i =zsh`:               % env -i zsh -flc '. ~/cols.sh'     COLUMNS=80     COLUMNS=80     COLUMNS=0     COLUMNS=0          % env -i =zsh -flc '. ~/cols.sh'     COLUMNS=80     COLUMNS=80     COLUMNS=80     COLUMNS=80      I'm puzzled by   1. The fact that using `zsh` and `=zsh` lead to different results;   2. The fact that, in the first case, setting `COLUMNS=` seems to be equivalent to setting `COLUMNS=0`;   3. The fact that, in the second case, setting `COLUMNS=` seems to have no effect whatsoever; The docs do not shed much light on these questions:               COLUMNS <S>            The number of columns for this terminal session.  Used for printing select lists and            for the line editor.      FWIW,               % which zsh     /usr/local/bin/zsh     % echo =zsh     /usr/local/bin/zsh     % =zsh --version     zsh 5.0.2 (x86_64-apple-darwin11.4.2)


title: Is there a GRUB 2 Source Code Map?

text: I have been studying the GRUB 2 Bootloader source code but I haven’t been able to find in the documentation a map describing the general purpose of each source code files and how they relate to each other. Also the few articles I have found googling about the subject are for legacy versions of GRUB. Obviously if I keep reading the code I will eventually do my own map. However I would like to know if there is any official or unofficial map. PD: If my question is unclear or inappropriate please let me know and I will improve it ASAP!


title: How to run startx as non-root?

text: Recently, I switched from Ubuntu to Arch Linux. I've installed X11 as my Window System and KDE as my Desktop Environment. I've separate partition for `/home`, `/var`, `/` and `/boot` and they all mount at boot time. When I run `startx`, the following message gets displayed. `xauth:timeout in locking authority file /home/hello/.Xauthority` Accidently, I've deleted that file. So, I copied it from `/root`. I've changed it's authority using code below: `# chown hello:users ~/.Xauthority` Even after this, I'm unable to run `startx` unless I use root account.


title: Mounting cifs: "Operation not supported"

text: Unlike the similar question, I cannot even connect with smbclient. The samba share works fine in windows and automagically works, but in Linux I can't mount it at all and the error message is cryptic at best. Here is my samba.conf:               [global]         dos charset = CP437         netbios name = REDACTED         server string = Lab         server role = standalone server         map to guest = Bad User         obey pam restrictions = Yes         smb passwd file = /var/etc/private/smbpasswd         private dir = /var/etc/private         max log size = 51200         server min protocol = SMB2         time server = Yes         deadtime = 15         max open files = 11070         hostname lookups = Yes         load printers = No         printcap name = /dev/null         disable spoolss = Yes         dns proxy = No         pid directory = /var/run/samba         panic action = /usr/local/libexec/samba/samba-backtrace         idmap config * : backend = tdb         acl allow execute always = Yes         create mask = 0666         directory mask = 0777         directory name cache size = 0         kernel change notify = No         map archive = No         map readonly = no         store dos attributes = Yes         strict locking = No          [common]         comment = Lab Common share         path = /mnt/pool/common         read only = No         inherit acls = Yes         hosts allow = XXX.XXX.XX.X/24, XXX.XX.XX.X/24 <-- redacted         hide dot files = No         veto files = /.snap/.windows/.zfs/         vfs objects = zfsacl, streams_xattr, aio_pthread         zfsacl:acesort = dontcare         nfs4:chown = yes         nfs4:acedup = merge         nfs4:mode = special         recycle:subdir_mode = 0700         recycle:directory_mode = 0777         recycle:touch = yes         recycle:versions = yes         recycle:keeptree = yes         recycle:repository = .recycle/%U      The error message is:               [as@localhost ~]$ sudo mount -t cifs -o username=removed,password=removed  //server.ip.address/common /media/windowsshare/     mount error(95): Operation not supported      A perfectly useless message. The debug-enabled dmesg:               [237179.795551] fs/cifs/cifsfs.c: Devname: //132.239.27.172/common flags: 0     [237179.795563] fs/cifs/connect.c: Username: lauria     [237179.795565] fs/cifs/connect.c: file mode: 0x1ed  dir mode: 0x1ed     [237179.795600] fs/cifs/connect.c: CIFS VFS: in cifs_mount as Xid: 44 with uid: 0     [237179.795600] fs/cifs/connect.c: UNC: \\132.239.27.172\common     [237179.795605] fs/cifs/connect.c: Socket created     [237179.795606] fs/cifs/connect.c: sndbuf 16384 rcvbuf 87380 rcvtimeo 0x1b58     [237179.795897] fs/cifs/fscache.c: cifs_fscache_get_client_cookie: (0xffff8803e0aa4800/0xffff880035d25580)     [237179.795898] fs/cifs/connect.c: Demultiplex PID: 25817     [237179.795902] fs/cifs/connect.c: CIFS VFS: in cifs_get_smb_ses as Xid: 45 with uid: 0     [237179.795903] fs/cifs/connect.c: Existing smb sess not found     [237179.795907] fs/cifs/cifssmb.c: Requesting extended security.     [237179.795910] fs/cifs/transport.c: For smb_command 114     [237179.795912] fs/cifs/transport.c: Sending smb: smb_len=78     [237179.801062] fs/cifs/connect.c: RFC1002 header 0x25     [237179.801067] fs/cifs/misc.c: checkSMB Length: 0x29, smb_buf_length: 0x25     [237179.801090] fs/cifs/transport.c: cifs_sync_mid_result: cmd=114 mid=1 state=4     [237179.801093] fs/cifs/cifssmb.c: Dialect: 65535     [237179.801094] fs/cifs/cifssmb.c: negprot rc -95     [237179.801097] fs/cifs/connect.c: CIFS VFS: leaving cifs_get_smb_ses (xid = 45) rc = -95     [237179.801100] fs/cifs/fscache.c: cifs_fscache_release_client_cookie: (0xffff8803e0aa4800/0xffff880035d25580)     [237179.801262] fs/cifs/connect.c: CIFS VFS: leaving cifs_mount (xid = 44) rc = -95     [237179.801263] CIFS VFS: cifs_mount failed w/return code = -95      I have tried many different `-sec` options---they all fail, everything has the same error message. smbclient is not helpful either:               smbclient //132.239.27.172/common -U username%password     protocol negotiation failed: NT_STATUS_INVALID_NETWORK_RESPONSE      How does this work on windows but not at all on linux? What am I doing wrong? Any ideas would be appreciated!


title: grep curly-bracketed entries from text file

text: I have a file with many curly bracketed words, ex. {test1}, {test2} - how would I `grep` for these words and output a distinct list of them? output example:               {test1}     {test2}      I've tried this which didn't work:               grep -o {.*} file.xml  | sort | uniq      ### UPDATE Actually - this seems to have worked:               grep -oP '{.*?}' file.xml | sort | uniq


title: Getting messages: INFO: Unknown message 0

text: In my tomcat catalina logs i am getting INFO: Unknown message errors. Please have a look at below logs. How to debug this issue, why this is happening. Can anyone please help me on this? Apr 28, 2014 4:45:38 PM org.apache.jk.common.HandlerRequest invoke INFO: Unknown message 5 Apr 28, 2014 4:45:38 PM org.apache.jk.common.HandlerRequest invoke INFO: Unknown message 1 Apr 28, 2014 4:46:36 PM org.apache.jk.common.HandlerRequest invoke INFO: Unknown message 0 Apr 28, 2014 4:46:36 PM org.apache.jk.common.HandlerRequest invoke INFO: Unknown message 0 Apr 28, 2014 5:24:34 PM org.apache.jk.common.HandlerRequest invoke INFO: Unknown message 0 Apr 28, 2014 5:29:27 PM org.apache.jk.common.HandlerRequest invoke INFO: Unknown message 0 Apr 28, 2014 5:29:27 PM org.apache.jk.common.HandlerRequest invoke INFO: Unknown message 0 Apr 28, 2014 6:19:22 PM org.apache.jk.common.HandlerRequest invoke INFO: Unknown message 5 Apr 28, 2014 6:19:22 PM org.apache.jk.common.HandlerRequest invoke INFO: Unknown message 4


title: Delete file at specified time non-interactively

text: I have a script that when executed generates a temp file that i want deleted 10 minutes after the script completes. I have looked at the "at" command which does what I need, but it requires interactive input. Is there any way to do this non-interactively?


title: Can someone execute a malware by just inserting a flash disk?

text: I know that Linux is virus proof, but just to be sure...Suppose someone writes a script, trojan, etc... and put it on a flash disk or CD. then I insert that flash in my system without clicking on any file in the flash disk. Is it possible that the malware execute or copy itself to my system without clicking on any file(like windows)? If this is possible, how to prevent from it? I ask this because someone was trying to make me insert a flash disk some while ago! Also, is there a way to search for such scripts(for example a script that captures screen and emails them) in system?


title: Linux distrib with apache and mysql pre installed

text: Is there a Linux distro with apache and mysql pre installed? I just want a light and fast installation of apache + mysql + ftp server + phpmyadmin


title: How to open konsole in fullscreen mode?

text: Is there a command or better yet a setting in the config file to allow me to open konsole (the KDE terminal emulator) in fullscreen mode?


title: ssh from an unix server to a windows server (running Sysax) fails

text: We are doing a sFTP from an Unix server to a Windows server and also a ssh, from the Unix server to the Windows server, to execute a file present on the Windows server. These 2 steps worked well. Now, the sFTP tool has been changed and we have issues with the ssh part: below is a resume of the old/new setup and of what works/no longer works: i hope you will be able to help me. 1) Old setup (that worked):   * sFTP tool: cgywin   * Passwordless connection through sFTP: => OK   * Transfer of files through sFTP => OK   * ssh connection from the Unix server to the Windows server to execute a file on the Windows server => OK The command used for this ssh is the following => `ssh windows_server_name file_name_of_remote_server_to_execute param1 param2 param3` 2) New setup (that doesn't work):   * sFTP tool: Sysax   * Passwordless connection through sFTP: => OK   * Transfer of files through sFTP => OK   * ssh connexion from the Unix server to the Windows server to execute a file on the Windows server => KO, here it is the issue. For this last point, if I execute exactly the command above, the ssh seems to wait for a response for several minutes and then the connection is ended by the remote server without doing anything I have tried to execute the same command with the -v option to have debug info but I have not a lot of helpful info:               debug1: Sending command: CGO_PAYFLEX_MOVE_FILES.sh OTL/EBSCNV 140704_123044 ONT_031188_031188_OTL_XTRNL.DAT ONT_031189_031189_OT    L_XTRNL.DAT     debug1: channel request 0: exec     debug1: channel 0: open confirm rwindow 0 rmax 32768     debug1: channel_free: channel 0: client-session, nchannels 1     Connection to budmflex2 closed by remote host.      So here are all the other tests I did:   1. connect 1st to the Windows server through the ssh command and then, in a 2nd time, execute the command file on the Payflex server => OK   2. Execute the ssh command above with the "bash" option => always fails   3. modify my script shell that is executed on the Unix server to replace the ssh command that includes the file command argument by this:              ssh -t Windows_server_name << EOF     echo 'Hello'     EOF       Doing this, if I execute my shell on the Unix server, I get the following error =>              Pseudo-terminal will not be allocated because stdin is not a terminal      After some research on internet, I try to do pass the `-t` option twice like it is sometime suggested but in this case, I have the following error =>               tcgetattr: Inappropriate ioctl for device     Connection to budmflex2 closed.


title: Creating exact non-scaled booklets with pdfbook automatically

text: I've been trying to print a booklet for some non-standard page sizes, and cannot figure out how to get pdfbook to not scale to standard page size. All I want to do is just double the width of the pdf file instead of scaling to a paper size. What I've done this time is   1. Opened pdf file and opened properties   2. [I found 100x100mm in the pdf properties, so] I then executed `pdfbook --papersize '{100mm,200mm}' input.pdf` Is there an automatic way of achieving this?


title: recursive mkdir

text: Is there a linux command that I'm overlooking that makes it possible to do something along the lines of: (pseudo)               $ mkdir -R foo/bar/zoo/andsoforth      Or is there no alternative but to make the directories one at a time?


title: Is it possible to make multi-level directory?

text: Using `mkdir()` (the C function) I can create a 1-level directory, if I want to create multi_level directory like:               folder/subfolder/subsubfolder      is it possible? if so, how?


title: aufs with lower writable branch

text: I'm trying to hide some directories on a mounted file system (it's not about security, just aesthetics). I've mounted the file system regularly on `/mnt/data` and wanted to use aufs to overlay a directory with the appropriate whiteouts, like so:               # ls -lA /mnt/data     total 12     drwx------ 2 root root 4096 Jul 28 18:26 dir1     drwx------ 2 root root 4096 Jul 28 18:26 dir2     drwx------ 2 root root 4096 Jul 28 18:26 dir3     # ls -lA /mnt/overlay     total 8     -r--r--r-- 2 root   root      0 Jul 28 18:27 .wh..wh.aufs     -r--r--r-- 2 root   root      0 Jul 28 18:27 .wh.dir2     drwx------ 2 root   root   4096 Jul 28 18:27 .wh..wh.orph     drwx------ 2 root   root   4096 Jul 28 18:27 .wh..wh.plnk     # mount -t aufs -o br:/mnt/overlay:/mnt/data none /mnt/test     # ls -lA /mnt/test     total 8     drwx------ 2 root root 4096 Jul 28 18:26 dir1     drwx------ 2 root root 4096 Jul 28 18:26 dir3      So far, so good. Now, any newly created files in `/mnt/test` should be written to the `/mnt/data` branch, so I tried to make the `/mnt/overlay` branch read- only:               # umount /mnt/test     # mount -t aufs -o br:/mnt/overlay=ro+wh:/mnt/data=rw none /mnt/test     mount: warning: /mnt/test seems to be mounted read-only.      This is where I am stuck: why is the union mounted read-only though there is a writable branch? I could only imagine that a branch cannot be `rw` if there is a readonly branch above it – I cannot find any clear statement on that in the aufs docs, however, the "Policies to Select One among Multiple Writable Branches" section reads: > If there is a readonly branch with ’wh’ attribute above the policy-selected > branch, … I'd interpret this so that it should be possible. So am I missing something else?


title: Bash scripting and large files (bug): input with the read builtin from a redirection gives unexpected result

text: I have a strange issue with large files and `bash`. This is the context:   * I have a large file: 75G and 400,000,000+ lines (it is a log file, my bad, I let it grow).   * The first 10 chars of each line is a time stamps in the format YYYY-MM-DD.   * I want to split that file: one file per day. I tried with the following script that did not work. **My question is about this script not working, not alternative solutions**.               while read line; do       new_file=${line:0:10}_file.log       echo "$line" >> $new_file     done < file.log      After debugging, I found the problem in the `new_file` variable. This script:               while read line; do       new_file=${line:0:10}_file.log       echo $new_file     done < file.log | uniq -c      gives the result bellow (I put the `x`es to keep the data confidential, other chars are the real ones). Notice the `dh` and the shorter strings:               ...       27402 2011-xx-x4       27262 2011-xx-x5       22514 2011-xx-x6       17908 2011-xx-x7     ...     3227382 2011-xx-x9     4474604 2011-xx-x0     1557680 2011-xx-x1           1 2011-xx-x2           3 2011-xx-x1     ...          12 2011-xx-x1           1 2011-xx-dh           1 2011-xx-x1           1 208--           1 2011-xx-x1           1 2011-xx-dh           1 2011-xx-x1         ...      **It is not a problem in the format of my file**. The script `cut -c 1-10 file.log | uniq -c` gives only valid time stamps. Interestingly, a part of the the above output becomes with `cut ... | uniq -c`:               3227382 2011-xx-x9     4474604 2011-xx-x0     5722027 2011-xx-x1      We can see that after the uniq count `4474604`, my initial script failed. Did I hit a limit in bash that I do not know, did I find a bug in bash (it seams unlikely), or have I done something wrong ? **Update** : The problem happens after reading 2G of the file. It seams `read` and redirection do not like larger files than 2G. But still searching for a more precise explanation. **Update2** : It definitively looks like a bug. It can be reproduced with:               yes "0123456789abcdefghijklmnopqrs" | head -n 100000000 > file     while read line; do file=${line:0:10}; echo $file; done < file | uniq -c      but this works fine as a workaround (it seams that I found a useful use of `cat`):               cat file | while read line; do file=${line:0:10}; echo $file; done | uniq -c       A bug has been filed to GNU and Debian. Affected versions are `bash` 4.1.5 on Debian Squeeze 6.0.2 and 6.0.4.               echo ${BASH_VERSINFO[@]}     4 1 5 1 release x86_64-pc-linux-gnu      **Update3:** Thanks to Andreas Schwab who reacted quickly to my bug report, this is the patch that is the solution to this misbehavior. The impacted file is `lib/sh/zread.c` as Gilles pointed out sooner:               diff --git a/lib/sh/zread.c b/lib/sh/zread.c index 0fd1199..3731a41 100644     --- a/lib/sh/zread.c     +++ b/lib/sh/zread.c @@ -161,7 +161,7 @@ zsyncfd (fd)           int fd; {   off_t off;     -  int r;     +  off_t r;            off = lused - lind;   r = 0;      The `r` variable is used to hold the return value of `lseek`. As `lseek` returns the offset from the beginning of the file, when it is over 2GB, the `int` value is negative, which causes the test `if (r >= 0)` to fail where it should have succeed.


title: How can I unset non standard vim options?

text: On a hosted system I logged in via SSH and edited a file with vim. Usually once I'm in insert mode I can just paste from my local clipboard into the ssh window and VIM accepts it fine, but for some reason things go wonky on this system and the text is all over the place. I typed `:set` to get the list of options and this is what came back:               --- Options ---                                    filetype=php        history=50  ruler         ttyfast      viminfo='20,"50     t_Sf=^[[3%dm     helplang=en         hlsearch    syntax=php    ttymouse=xterm2     t_Sb=^[[4%dm     backspace=indent,eol,start     comments=s1:/*,mb:*,ex:*/,://,:#     fileencoding=utf-8     fileencodings=utf-8,latin1     formatoptions=qrowcb     include=\(require\|include\)\(_once\)\?     indentexpr=GetPhpIndent()     indentkeys=0{,0},0),:,!^F,o,O,e,*<Return>,=?>,=<?,=*/     iskeyword=@,48-57,_,192-255,$     omnifunc=phpcomplete#CompletePHP      On other systems I usually just see this:               --- Options ---                                     background=dark     history=50    ruler        ttyfast      viminfo='20,"50     t_Sf=^[[3%dm     filetype=php        hlsearch      syntax=php   ttymouse=xterm2     t_Sb=^[[4%dm     backspace=indent,eol,start                           I tried adding these lines to `~/.vimrc`:               :set comments=     :set formatoptions=     :set include=     :set indentexpr=     :set indentkeys=     :set iskeyword=     :set omnifunc=      The file is being read (if there is a syntax error `vim` complains) but this is not helping unset any of these options. These options are also only present when editing a `.php` file. How can I get rid of these extra options in vim without manually typing in the commands listed above every time?


title: Mount drive from redhat to a windows share with CIFS

text: I have been trying to mount a drive, but anything i do i get 'Access Denied', I tried: `mount -t cifs //192.168.x.x/m -o username=user,password=mypass /mnt/mymount` `mount -t cifs //192.168.x.x/m -o credentials=cred /mnt/mymount` `mount -t cifs //192.168.x.x/m -o username=user,password=mypass,domain=xxxxx /mnt/mymount` I want to user a local user account on the windows machine and not a domain user account. Is this possible? I tried to put in the computer name as the domain, the fully qualified domain name, also under username i tried `computer\user`, none of those seem to work. Any other ideas? Thanks.


title: erased md0, md1 and can't recreate them

text: I previously had a working RAID 1 array. I think as a result of running `grub- install /dev/sdb` and `grub-install /dev/sdc` I somehow wiped my computer of `md0` and `md1`. I need to set them up again. When I try to create the `md0` array, I am getting the following error.               /dev# mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sda1 missing -f     mdadm: device /dev/sda1 not suitable for any style of array      It seems like Debian thinks the drive is already in an array but it's not.               # fdisk -l          Disk /dev/sda: 250.0 GB, 250000000000 bytes     255 heads, 63 sectors/track, 30394 cylinders     Units = cylinders of 16065 * 512 = 8225280 bytes     Sector size (logical/physical): 512 bytes / 512 bytes     I/O size (minimum/optimal): 512 bytes / 512 bytes     Disk identifier: 0x00000080             Device Boot      Start         End      Blocks   Id  System     /dev/sda1   *           1       30064   241489048+  fd  Linux raid autodetect     /dev/sda2           30065       30394     2650725    5  Extended     /dev/sda5           30065       30394     2650693+  fd  Linux raid autodetect          # cat /proc/mdstat      Personalities : [raid1]      unused devices: <none>      EDIT: Please not the output of mount. It appears to show `md0` is mounted in `/`, but why isn't it showing up in `proc/mdstat`?               /dev/md0 on / type ext3 (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)          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=4143896k,nr_inodes=204530,mode=755 0 0     none /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0     /dev/sda1 / ext3 rw,relatime,errors=remount-ro,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          file -s /dev/sda*     /dev/sda:  x86 boot sector; GRand Unified Bootloader, stage1 version 0x3, stage2 address 0x2000, stage2 segment 0x200; partition 1: ID=0xfd, active, starthead 1, startsector 63, 482978097 sectors; partition 2: ID=0x5, starthead 254, startsector 482978160, 5301450 sectors, code offset 0x48, OEM-ID "      м", Bytes/sector 190, sectors/cluster 124, reserved sectors 191, FATs 6, root entries 185, sectors 64514 (volumes <=32 MB) , Media descriptor 0xf3, sectors/FAT 20644, heads 6, hidden sectors 309755, sectors 2147991229 (volumes > 32 MB) , physical drive 0x7e, dos < 4.0 BootSector (0x0)     /dev/sda1: Linux rev 1.0 ext3 filesystem data, UUID=38daaa54-a108-4224-9104-016d5b4ee12c (needs journal recovery) (large files)     /dev/sda2: x86 boot sector; partition 1: ID=0xfd, starthead 254, startsector 63, 5301387 sectors, extended partition table (last)\011, code offset 0x0     /dev/sda5: Linux/i386 swap file (new style), version 1 (4K pages), size 662655 pages, no label, UUID=f635267e-37f8-43d0-ad01-d25969570a8f      MORE INFORMATION: My working RAID array had md0 and md1 with drives sdb and sdc. I ran those `grub-install` commands. A few days later, I tried to reboot it and I was getting the following error (which I think corresponds to `md0`)               Gave up waiting for boot device     ALERT /dev/disk/by-uuid/38[...] does not exist      so I unplugged my 2nd and 3rd HD and GRUB couldn't boot when set to md0 so I set it to `dev/sda1` and that's the state my machine is currently in.               mdadm --assemble --scan -v -v     mdadm: looking for devices for /dev/md0     mdadm: /dev/sda5 has wrong uuid.     mdadm: no recogniseable superblock on /dev/sda2     mdadm: /dev/sda2 has wrong uuid.     mdadm: cannot open device /dev/sda1: Device or resource busy     mdadm: /dev/sda1 has wrong uuid.     mdadm: cannot open device /dev/sda: Device or resource busy     mdadm: /dev/sda has wrong uuid.     mdadm: looking for devices for /dev/md1     mdadm: /dev/sda5 requires wrong number of drives.     mdadm: no recogniseable superblock on /dev/sda2     mdadm: /dev/sda2 has wrong uuid.     mdadm: cannot open device /dev/sda1: Device or resource busy     mdadm: /dev/sda1 has wrong uuid.     mdadm: cannot open device /dev/sda: Device or resource busy     mdadm: /dev/sda has wrong uuid.                sfdisk -d /dev/sda     # partition table of /dev/sda     unit: sectors          /dev/sda1 : start=       63, size=482978097, Id=fd, bootable     /dev/sda2 : start=482978160, size=  5301450, Id= 5     /dev/sda3 : start=        0, size=        0, Id= 0     /dev/sda4 : start=        0, size=        0, Id= 0     /dev/sda5 : start=482978223, size=  5301387, Id=fd


title: Start remote X session on local tty

text: I have access to two Linux boxes, both running X servers. Let's call them A and B. I do not always have physical access to machine A, though I can always access it remotely and I have admin access to it. On machine B, I do not have admin access (and even if I did I wouldn't want to screw around with the X server on it or other things, since it's a shared machine), though I do always have physical access. Furthermore, I greatly prefer the desktop and window managers I have installed on machine A. I would like to start an X session using the window manager and desktop manager from machine A on a free tty (say, tty8) on machine B. I know how to start a second local X session on a free tty using `startx -- :1`, so I tried `startx ssh B "gdm" -- :1` from machine B, but this failed with the error: `xterm: bad command line option "xterm"`. In fact, I got the same error regardless of the desktop manager that I tried to start on the remote machine. I do not care whether I use a local X server or remote - I just want my desktop manager and window manager from the remote machine. How can I do this?


title: Disable Hardware acceleration on Gnome 3 or fix VNC

text: I've just upgraded my openSUSE to 12.1, which ships with gnome3. Previously, I had gnome2 running with `vino-server` as a vnc server that starts upon login. With gnome3 this works too, but the vnc session itself is broken. Images / windows / fonts flicker or are only partially visible. I highly blame this on the 3D effects or 2D drawing animations, which are not very healthy for vnc. What can be done to disable all these effects? Or is there a way to fix VNC?


title: What is the difference between /tmp and /var/tmp?

text: On most FHS systems, there is a `/tmp` folder as well as a `/var/tmp` folder. What is the functional difference between the two?


title: "no such user" but user is in passwd file

text: Looking at the files in /etc/:               /etc/group:lbutler:*:1005:     /etc/master.passwd:lbutler:$6$s..../:1005:1005::0:0:L Butler:/home/lbutler:/bin/bash     /etc/passwd:lbutler:*:1005:1005:L Butler:/home/lbutler:/bin/bash      But:               $ passwd lbutler     passwd: lbutler: no such user      Also, files in `/home/lbutler/` show up as uid 1005 and gid `lbutler` The other users in `/etc/passwd` do not appear to have a problem


title: Maintain 100 instances of a program running

text: I'm currently using supervisord to maintain 100 instances of a script running at once. If any die then it starts up a new one. However it seems to be struggling maintaining larger numbers (>300 processes) and I'm looking for a replacement. Monit doesn't seem to do what I want as it monitors individual scripts and does not seem to be able to easily watch 100 instances of the same script. Any suggestions on a different tool I could use?


title: Driver Nvidia 96.43.23 for Quadro 4 wont stay installed

text: No matter how many times I re-install my driver it will be uninstalled after restart.   1. I select and install the correct driver using Device Driver Manager by Mint   2. I restart as prompted   3. It comes back up without my driver and switches to some "versa" driver I've never heard of 3a. Also, I got this error > Unknown driver error. Please remove before installing drivers with DDM I am unsure what that means. How do I comply with what it is asking?


title: Debian package naming convention?

text: It's all very confusing. There are different examples out there, for e.g.:               <package-name>_<epoch>:<upstream-version>-<debian.version>-<architecture>.deb      _source:debian package file names_ Is section 5.6.12 Version or the Debian Policy Manual also related to the actual package filename too? Or only to the fields in the control file? In this wiki topic about repository formats it doesn't really say anything about conventions, same in the developers best practices guide. Maybe I'm just looking for the wrong thing, please help me and tell me where to find the Debian package name conventions. I'm especially curious where to put the Debian codename. I want to do something like this:               <package-name>_<version>.<revision>-<debiancodename>_<architecture>.deb      where `<debiancodename>` is just `squeeze` or `wheezy`.


title: IPC: Shared memory killed process notification

text: In shared memory system, when two processes share a shared memory segment, after one process is killed, how will the other running process be notified of the killed process by the shared memory system ?


title: Mails from my server goes directly to spam

text: I am running an ubuntu server with plesk panel, Mails sent from this server goes directly to spam folder. All records seems perfect like spf, DKIM, Domain key, PTR etc.. I'm really stuck with this. I don't know what else to check. Mail headers are below:               Delivered-To: james007@gmail.com     Received: by 10.182.121.202 with SMTP id lm10csp159698obb; Mon, 14 Jul 2014 10:53:20 -0700 (PDT)     X-Received: by 10.194.85.78 with SMTP id f14mr21342550wjz.36.1405360399627; Mon, 14 Jul 2014 10:53:19 -0700 (PDT)     Return-Path: <ji@3wchat.com> Received: from xxxxxxxxxx (xxxxxxxxxx [62.210.141.47]) by mx.google.com with ESMTPS id lk19si11864584wic.103.2014.07.14.10.53.19 for <james007@gmail.com> (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 14 Jul 2014 10:53:19 -0700 (PDT)     Received-SPF: pass (google.com: domain of ji@3wchat.com designates 62.210.141.47 as permitted sender) client-ip=62.210.141.47; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ji@3wchat.com designates 62.210.141.47 as permitted sender) smtp.mail=ji@3wchat.com; dkim=pass header.i=@3wchat.com     Received: by xxxxxxxxx (Postfix, from userid 33)    id C41CA642D61; Mon, 14 Jul 2014 19:53:19 +0200 (CEST)     DomainKey-Signature: a=rsa-sha1;  q=dns; c=nofws;   s=default; d=3wchat.com;  b=lmAMOd4zaYaezuTDPVQr3eLzKh0AtsPSLhhtqtCyP95UUPwkKjXtZKxeh1u+cSAHzD04Ui7lfDpF9+H/1iTUVk5jXscie/Z9r+TUmR6+0KayPw4ub5bCmC95rt7kmC58; h=DKIM-Signature:Received:Message-ID:Date:From:To:Subject:MIME-Version:Content-Type:Content-Disposition:Content-Transfer-Encoding:User-Agent;     DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=3wchat.com; s=mail;   t=1405360399; bh=c5kfmTELyaEOcYaDYPCHkLR3hrNQGoL0cmONx4TqrRo=; h=Date:From:To:Subject:From; b=Vac8uwB4b3YLvzCUyCjVNi9DVVCQlMFKOT1y2HTAUKugTlOZu25GnZVjY4pZAS+5E3XNfzAmLT9YLfxXMuA3Cx8MNFQwbp9mevIlmwe14BBxDrwOSLId1pGwQdKH0benpcooTGElJ0x7lgjwSvoHXqSKMy94q1mf54KeR7wUrt0=     Received: from 12.12.32.32([12.12.32.32]) by webmail.3wchat.com (Horde  Framework) with HTTP; Mon, 14 Jul 2014 19:53:19 +0200     Message-ID: <20140714195319.196660qgqkbu97nz@webmail.3wchat.com>     Date: Mon, 14 Jul 2014 19:53:19 +0200     From: ji@3wchat.com     To: james007@gmail.com     Subject: t     MIME-Version: 1.0     Content-Type: text/plain; charset=ISO-8859-1;  DelSp="Yes";  format="flowed"     Content-Disposition: inline     Content-Transfer-Encoding: 7bit     User-Agent: Internet Messaging Program (IMP) H3 (4.3.11) jj


title: Uploading directories with sftp?

text: I'm having some trouble uploading directories(which contain other directories a few levels deep) by sftp. I realize I could work around this by gzipping, but I don't see why that's necessary. Anyway, I try               sftp> put bin/     Uploading bin/ to /home/earlz/blah/bin     bin/ is not a regular file     sftp> put -r bin/     Uploading bin/ to /home/earlz/blah/bin     Couldn't canonicalise: No such file or directory     Unable to canonicalise path "/home/earlz/blah/bin"      I think the last error message is completely stupid. So the directory doesn't exist? Why not create the directory? Is there anyway around this issue with sftp, or should I just use scp?


title: What are the cons of posting dmidecode output publicly?

text: I remember somewhere mentioned that posting **`dmidecode`** output publicly is risky (security/privacy).


title: How to encode huge FLAC files into MP3 and other files like AAC?

text: My problem is very long recordings, longer than supported by WAV. I'm talking about continuous recordings of around eight hours in length. Now, I do most of my recording using sox into FLAC, which makes the most sense, since those are live recordings from an external sound card. Now, I'd like to encode that into MP3 or into AAC (in an MP4 container). The only way I managed to do that, is using FFmpeg, but I'd actually rather use an encoder application like `lame`, or `neroaacenc`. Now, I was doing that where possible, but I was using WAV as a detour. I was decoding the FLAC into WAV and then encoding the WAV into the end product. But as I said, it doesn't work for recordings over a certain length. Now, my idea was to use pipes and force decoding into RAW and then encode that into the target format. I need some help with this. Could someone please supply me with some examples how to decode a FLAC file, and encode that into MP3 using `lame` by piping RAW data?


title: Can't see files on my cell phone

text: I have Samsung Galaxy S2 as my cell phone and Debian Squeeze as my desktop. When I connect them using USB, Debian recognize it and allows to open it with file manager. Problem: it displays only directories, all files are like somehow, magically, hidden. I know that they exists, because I can easily see them on Windows 7. I tried to disable file-hiding and related stuff in Nautilus options, but nothing. Why is that so and how can I see those files? P.S. I wasn't sure where to post it - in here or in http://android.stackexchange.com/.


title: How can one force a re-scan of an SDIO bus from Linux user space?

text: On an embedded Linux platform, I have a network adapter attached to an SDIO interface. There is no Card Detect signal on this particular bus. If for instance, I turn the network adapter power on or off, is there any way I can force a re-scan of the SDIO bus from user space?


title: Postfix cannot find a MySQL shared library

text: I am trying to install Postfix with MySQL support. When I start or run the postfix daemon, it complains that it "cannot find libmysqlclient.so.18", which is in the directory `/usr/local/mysql/lib`, which I linked when I built the package. I added a symlink to `/usr/local/mysql/lib/libmysqlclient.so.18` in `/usr/lib`, which fixed the problem, but that's a really kludgy solution and I'd rather do it the right way. I followed this documentation, and it works except for that small error. I am running Arch Linux, kernel version 2.6.33


title: How can I monitor if anybody (any process) access is certain file

text: > **Possible Duplicate:**   >  Access history of a file I know if a file is "being accessed" I can use `lsof` to see who (which process) is accessing it, but `lsof` is slow and heavy and I don't think I would be able to run it fast enough to see if a file is accessed or not. So it there a way to watch a file, and see if it ever get accessed and if yes by who?


title: Can I make Tmux tell Vim when its pane loses focus?

text: I use Vim and Bash side-by-side in Tmux. I have Vim configured to autosave files as I switch between them, but I'd really like it to autosave when I switch to the Bash pane. Is there a way to get Tmux to send some kind of code to Vim when its pane loses focus?


title: Remove duplicated Java packages

text: I'm on linux mint 12 I have installed Java, following the NetBeans instructions. It wasn't working on chrome, so I installed it like that:               sudo echo 'deb http://www.duinsoft.nl/pkg debs all' >> /etc/apt/sources.list     sudo apt-key adv --keyserver keys.gnupg.net --recv-keys 5CB26B26     sudo apt-get update     sudo apt-get install update-sun-jre      without uninstalling the other one, now I have 2 or 3 java on my PC, NetBeans is not running anymore and whenever I do `sudo apt-get update` I get warnings about dupes.   I just want to keep one Java which I have installed without following netbeans instructions, I'm going to uninstall NetBeans and use Eclipse. **Fslint** is not finding the dupes, I don't why. I don't trust tools, I only trust terminal, so how to do it from there?


title: Script needs to read echoed line

text: So, I need to write a Bourne-shell script, where my script has to work with the line, that was just echoed to stdout - e.g.:               echo *something* | myscript.sh [parametres...]       This may be a basic thing, what I might have missed during my studies. I would include my attempts, but they are nowhere near the solution. Anyway, any hint appreciated.


$ ls -og /proc/self /proc/self/fd     lrwxrwxrwx 1 64 Jun 18 11:12 /proc/self -> 32157          /proc/self/fd:     total 0     lrwx------ 1 64 Jun 22  2012 0 -> /dev/tty1     lrwx------ 1 64 Jun 22  2012 1 -> /dev/tty1     lrwx------ 1 64 Jun 22  2012 2 -> /dev/tty1     lr-x------ 1 64 Jun 22  2012 3 -> /proc/32157/fd      What is the file descriptor 3 assigned by default?


title: What distributions have rolling releases?

text: I was browsing DistroWatch and was looking for a list of distributions that offer rolling releases and a little bit more about them. However, it doesn't seem to be possible to select only the rolling releases on DistroWatch. Perhaps the Linux community can offer some insight into what distributions are available that offer rolling releases. I've made this question a community wiki with the hopes that I'll get one distribution per answer with a brief description of the distro and what it offers and a link to the distribution's home page and/or DistroWatch entry. Then, people can vote up/down the distributions to rate them in terms of something (best/worst, pure popularity). (Also, if someone can clean up the tags on this, that would be great. I wanted to create the "rolling-release" tag, but can't.)


title: What is/are the standard CLI program(s) to manage users and groups?

text: As the title says, I'm basically asking about user management from the command line (e.g. on a system where there are no graphical tools available). In the past I've used several different programs to add or delete users and groups or to modify their attributes: `adduser`, `useradd`, `usermod`, `gpasswd`, and perhaps others I've forgotten. I've also heard a couple times that some of these programs are low-level and should be avoided for general use, but I can never remember which. So I'd like to get a definitive answer for which programs are the recommended ones for at least the following tasks:   * Create a new user   * Add a user to a group   * Remove a user from a group   * Change a user's primary group   * Change a user's login shell or home directory   * Delete a user I'm looking for standard tools which I can expect to be available on pretty much any Linux system (of any distribution).


title: What does 2>&1 in this command mean?

text: I understand that this command attempts to write to nowhere or a null device but what does `2>&1` mean here?               wget -q -O - http://yourwebsite.com/wp-cron.php?doing_wp_cron > /dev/null 2>&1


title: What does it mean when code is executed in [kernel|user] mode?

text: The title says everything.


title: How does one change the delay that occurs after entering an incorrect password?

text: After entering an incorrect password at a login prompt, there s an approximately 3-second delay. How can I change that on a Linux system with PAM?


title: Linux accessing a Windows server proxy.pac script

text: I'm using a Slackware 14 VirtualBox guest on Windows 7 behind a work proxy. Having battled a bit with network settings I've gotten to the point where I can browse the web in Firefox by using the proxy.pac script URL in LAN settings. My question is how can I set up commandline packages (slackpkg and R in particular) which require the physical proxy address rather than using URL to download content. I can't figure out what the proxy address is that I should update /etc/profile with. What am I missing here?


title: Unable to move or delete file with \r in the name

text: Somehow i have tar file called 'secret\r-.tar.gz'.   Note that it has `\r` in the name. I tried following SSH command for moving but none of them are working:               mv secret\r-.tar.gz ../     mv secret\\r-.tar.gz ../     mv secret\\r-.tar.gz ../     mv "secret\r-.tar.gz" ../      All resulted with error:   > mv: cannot stat `secret\r-.tar.gz': No such file or directory Can you guys point me to the right direction.


title: How to extend second CentOS 5 partition in VMware

text: I know this question has already been answered for a primary partition, but what about a secondary? I have extended the space to 30G in VMware. When I perform an fdisk -l, here's the output:               Disk /dev/sda: 32.2 GB, 32212254720 bytes     255 heads, 63 sectors/track, 3916 cylinders     Units = cylinders of 16065 * 512 = 8225280 bytes             Device Boot      Start         End      Blocks   Id  System     /dev/sda1   *           1          13      104391   83  Linux     /dev/sda2              14        1174     9325732+  8e  Linux LVM     /dev/sda3            1175        1958     6297480   83  Linux      I want to be able to extend /dev/sda3. I follow instructions using fdisk /dev/sda - but since the partition I want to extend is not LVM, I'm not sure how to finish it.


title: Timelineview of all agenda files

text: Is it possible to get a timeline view that combines the entries from all agenda files?


title: Will select() return before next jiffy if waiting on a high resolution timerfd?

text: If I have   * A kernel with CONFIG_HIGH_RES_TIMERS=y,    * A coarse CONFIG_HZ (say, 100)   * and a file descriptor from timerfd_create with a sub-jiffy expiration Should a call to select() on this timer return before the next jiffy, as say, clock_nanosleep would?


title: Udev usb mouse rule

text: I am pretty new to udev and wanted to write a rule that upon connecting an usb mouse disables my touchpad. This is what I have come up with(mostly by ear):               ACTION=="add", SUBSYSTEM=="input", ENV{ID_MODEL}=="USB_Mouse", ENV{DISPLAY}=":0", ENV{XAUTHORITY}="/home/nikitautiu/.Xauthority", ENV{REMOVE_CMD}="/usr/bin/synclient TouchpadOff=0", RUN+="/usr/bin/synclient TouchpadOff=1"      Nonetheless it doesn't trigger the desired effect. The command seems to be fine though the rule does not trigger when connecting my usb mouse.


title: How much storage overhead comes along with cryptsetup and ext4?

text: I want to encrypt the content of a directory in a container with an ext4 filesystem using cryptsetup. The size of the container should be as small as possible and as big as necessary, because I only want to write once and then backup. First try: setting the size of the container to the size of the content.               dirsize=$(du -s -B512 "$dir" | cut -f 1)     dd if=/dev/zero of=$container count=$dirsize     losetup /dev/loop0 $container     fdisk /dev/loop0 # 1 Partition with max possible size     cryptsetup luksFormat --key-file $keyFile /dev/loop0     cryptsetup luksOpen --key-file $keyFile /dev/loop0 container     mkfs.ext4 -j /dev/mapper/container     mkdir /mnt/container     mount /dev/mapper/container /mnt/container     rsync -r "$dir" /mnt/container      Rsync returns that there is not enough space for the data. Seems reasonable as there has to be some overhead for the encryption and the file system. I tried it with a relative offset:               dirsize=$(($dirsize + ($dirsize + 8)/9))      This fixes the problem for dirs with > 100 MB, but not for dirs with < 50 MB. How can I determine the respective amount of bytes the container has to be bigger than the directory?


title: Identifying MaxSpeed of a Bonded Interface

text: I have configured Ethernet Bonding for our RHEL 6.2 Servers. Bonding is working fine but few confusion for me when I configured MRTG to monitor the bonded interface. MRTG is showing MaxSpeed of the Bonded Interface to be 1250.0 KBytes/s which comes to be 10 Mbits/s. The MaxSpeed for the Slave interface speed (eth0,eth1) looks fine with 125.0 MBytes/s. My confusion here is since MRTG is showing MaxSpeed of the bonded interface to be 1250.0 KBytes/s, will it be able to handle traffic beyond 10MBits/s or it is MRTG configuration issue only? Also, would like to know when monitoring a bonded interface, is it OK to monitor the bonded interface only or need to monitor Slave interface also. Any best practices? Please find the bonding config pasted below. $ vi /etc/sysconfig/network-scripts/ifcfg-bond0               DEVICE=bond0     ONBOOT=yes     TYPE=Ethernet     BOOTPROTO=static     IPADDR=192.168.11.149     NETMASK=255.255.255.192     GATEWAY=192.168.11.130     USERCTL=no     BONDING_OPTS="mode=1 miimon=100"      $ cat /etc/sysconfig/network-scripts/ifcfg-eth0               DEVICE=eth0     ONBOOT=yes     BOOTPROTO=none     SLAVE=yes     MASTER=bond0     TYPE=Ethernet     IPV6INIT=no     USERCTL=no     NM_CONTROLLED=no      If any other information is required, please let me know.


title: How can I set that only root + a given user can shut down my pc?

text: If I'm using Ubuntu 11.04, how can I configure it such that that only two users can shut down/suspend/hibernate my PC: the root user and one regular user?


title: Postfix: 554 5.7.1 Relay Access Denied

text: My Problem is this: I can send E-Mails from my E-Mail (evolutio@lars-dev.de) to my other Emails like @gmail @web @gmx ... But when I try to send a E-Mail from GMail to evolutio@lars-dev.de I have the Error:               Delivery to the following recipient failed permanently:          evolutio@lars-dev.de          Technical details of permanent failure:     Google tried to deliver your message, but it was rejected by the server for the recipient domain lars-dev.de by mx1.cw4.me. [195.138.240.200].          The error that the other server returned was:     554 5.7.1 <evolutio@lars-dev.de>: Relay access denied      My main.cf               # See /usr/share/postfix/main.cf.dist for a commented, more complete version               # Debian specific:  Specifying a file name will cause the first     # line of that file to be used as the name.  The Debian default     # is /etc/mailname.     #myorigin = /etc/mailname          smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)     biff = no          # appending .domain is the MUA's job.     append_dot_mydomain = no          # Uncomment the next line to generate "delayed mail" warnings     #delay_warning_time = 4h          readme_directory = no          # TLS parameters     smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem     smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key     smtpd_use_tls=yes     smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache     smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache     smtpd_tls_auth_only = yes     smtpd_tls_loglevel = 1     smtpd_tls_received_header = yes     smtpd_tls_session_cache_timeout = 3600s     .tls_random_source = dev:/dev/urandom          # See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for     # information on enabling SSL in the smtp client.          myhostname = lars-dev.de     alias_maps = hash:/etc/aliases     alias_database = hash:/etc/aliases     mydomain = lars-dev.de     myorigin = $mydomain     mydestination = $mydomain, localhost.$mydomain,  localhost.localdomain, localhost     #mydestination = $myhostname, localhost.$mydomain, $mydomain     relayhost = smtp.lars-dev.de     mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128     mailbox_command = procmail -a "$EXTENSION"     mailbox_size_limit = 0     recipient_delimiter = +     inet_interfaces = all          # Virtual mailbox settings     virtual_mailbox_domains = proxy:mysql:$config_directory/mysql_virtual_domains_maps.cf     virtual_mailbox_base = /var/vmail     #virtual_mailbox_base = /var/spool/mail     virtual_mailbox_maps =         proxy:mysql:$config_directory/mysql_virtual_mailbox_maps.cf,         proxy:mysql:$config_directory/mysql_virtual_alias_domain_mailbox_maps.cf,         proxy:mysql:$config_directory/mysql_virtual_alias_domain_catchall_maps.cf     virtual_alias_maps =         proxy:mysql:$config_directory/mysql_virtual_alias_maps.cf,         proxy:mysql:$config_directory/mysql_virtual_alias_domain_maps.cf     virtual_mailbox_limit = proxy:mysql:$config_directory/mysql_virtual_mailbox_limit_maps.cf     virtual_mailbox_limit_override = yes     virtual_maildir_limit_message = Sorry, the user's maildir has overdrawn his diskspace quota, please try again later.     virtual_overquota_bounce = yes     virtual_minimum_uid = 150     virtual_uid_maps = static:150     virtual_gid_maps = static:8     virtual_transport = dovecot     dovecot_destination_recipient_limit = 1          # SASL Authentication     smtpd_sasl_auth_enable = yes     smtpd_sasl_exceptions_networks = $mynetworks     #smtpd_sasl_local_domain = $myhostname     smtpd_sasl_local_domain = lars-dev.de     smtpd_sasl_security_options = noanonymous     broken_sasl_auth_clients = yes     smtpd_sasl_type = dovecot     smtpd_sasl_path = private/auth          # No open relay!     smtpd_helo_required = yes     smtpd_helo_restrictions = reject_invalid_hostname     smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination     #    permit      master.cf               #     # Postfix master process configuration file.  For details on the format     # of the file, see the master(5) manual page (command: "man 5 master").     #     # Do not forget to execute "postfix reload" after editing this file.     #     # ==========================================================================     # service type  private unpriv  chroot  wakeup  maxproc command + args     #               (yes)   (yes)   (yes)   (never) (100)     # ==========================================================================     smtp      inet  n       -       -       -       -       smtpd     submission inet n       -       -       -       -       smtpd       -o smtpd_tls_security_level=encrypt       -o smtpd_sasl_auth_enable=yes       -o smtpd_client_restrictions=permit_sasl_authenticated,reject       -o milter_macro_daemon_name=ORIGINATING     smtps     inet  n       -       -       -       -       smtpd       -o smtpd_tls_wrappermode=yes       -o smtpd_sasl_auth_enable=yes     #  -o smtpd_client_restrictions=permit_sasl_authenticated,reject       -o milter_macro_daemon_name=ORIGINATING     #628       inet  n       -       -       -       -       qmqpd     pickup    fifo  n       -       -       60      1       pickup     cleanup   unix  n       -       -       -       0       cleanup     qmgr      fifo  n       -       n       300     1       qmgr     #qmgr     fifo  n       -       -       300     1       oqmgr     tlsmgr    unix  -       -       -       1000?   1       tlsmgr     rewrite   unix  -       -       -       -       -       trivial-rewrite     bounce    unix  -       -       -       -       0       bounce     defer     unix  -       -       -       -       0       bounce     trace     unix  -       -       -       -       0       bounce     verify    unix  -       -       -       -       1       verify     flush     unix  n       -       -       1000?   0       flush     proxymap  unix  -       -       n       -       -       proxymap     proxywrite unix -       -       n       -       1       proxymap     smtp      unix  -       -       -       -       -       smtp     # When relaying mail as backup MX, disable fallback_relay to avoid MX loops     relay     unix  -       -       -       -       -       smtp             -o smtp_fallback_relay=     #       -o smtp_helo_timeout=5 -o smtp_connect_timeout=5     showq     unix  n       -       -       -       -       showq     error     unix  -       -       -       -       -       error     retry     unix  -       -       -       -       -       error     discard   unix  -       -       -       -       -       discard     local     unix  -       n       n       -       -       local     virtual   unix  -       n       n       -       -       virtual     lmtp      unix  -       -       -       -       -       lmtp     anvil     unix  -       -       -       -       1       anvil     scache    unix  -       -       -       -       1       scache     #     # ====================================================================     # Interfaces to non-Postfix software. Be sure to examine the manual     # pages of the non-Postfix software to find out what options it wants.     #     # Many of the following services use the Postfix pipe(8) delivery     # agent.  See the pipe(8) man page for information about ${recipient}     # and other message envelope options.     # ====================================================================     #     # maildrop. See the Postfix MAILDROP_README file for details.     # Also specify in main.cf: maildrop_destination_recipient_limit=1     #     maildrop  unix  -       n       n       -       -       pipe       flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}     #     # ====================================================================     #     # Recent Cyrus versions can use the existing "lmtp" master.cf entry.     #     # Specify in cyrus.conf:     #   lmtp    cmd="lmtpd -a" listen="localhost:lmtp" proto=tcp4     #     # Specify in main.cf one or more of the following:     #  mailbox_transport = lmtp:inet:localhost     #  virtual_transport = lmtp:inet:localhost     #     # ====================================================================     #     # Cyrus 2.1.5 (Amos Gouaux)     # Also specify in main.cf: cyrus_destination_recipient_limit=1     #     #cyrus     unix  -       n       n       -       -       pipe     #  user=cyrus argv=/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user}     #     # ====================================================================     # Old example of delivery via Cyrus.     #     #old-cyrus unix  -       n       n       -       -       pipe     #  flags=R user=cyrus argv=/cyrus/bin/deliver -e -m ${extension} ${user}     #     # ====================================================================     #     # See the Postfix UUCP_README file for configuration details.     #     uucp      unix  -       n       n       -       -       pipe       flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)     #     # Other external delivery methods.     #     ifmail    unix  -       n       n       -       -       pipe       flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)     bsmtp     unix  -       n       n       -       -       pipe       flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient     scalemail-backend unix  -       n       n       -       2       pipe       flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension}     mailman   unix  -       n       n       -       -       pipe       flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py       ${nexthop} ${user}          dovecot   unix  -       n       n       -       -       pipe flags=DRhu       user=vmail:mail argv=/usr/lib/dovecot/deliver -f ${sender} -d ${recipient}          #dovecot   unix  -       n       n       -       -       pipe flags=DRhu     #  user=vmail:mail argv=/usr/lib/dovecot/deliver -f ${sender} -d ${recipient}


title: Why should I use $[ EXPR ] instead of $(( EXPR ))?

text: On the paragraph explaining arithmetic expansion, Bash's user guide uncovers 2 different ways of evaluating an expression, the first one uses `$(( EXPRESSION ))` and the second one uses `$[ EXPRESSION ]`. The two ways seem pretty similar as the only difference I have found is: > `$[ EXPRESSION ]` will only calculate the result of EXPRESSION, and do no > tests: Yet, I am intrigued because the same document recommends using `$[ EXPRESSION ]` rather than `$(( EXPRESSION ))`. > Wherever possible, Bash users should try to use the syntax with square > brackets: Why would you want that if less tests are being done?


title: Mail Server not working?

text: I am trying to setup mail server since a long time but as I am new to Linux I have unsuccessfully configured it to the best as I could but now I need assistance.   1. I have installed it using the links below :     * http://www.serverubuntu.it/postfix-dovecot-guide     * https://help.ubuntu.com/community/MailServer   2. I this to have web console also   3. It should use the domain name as mail.risheetech.com for web console & email address should be something like rishee@risheetech.com   4. as every one knows it is a big process to setup an mail server, I am not including everything but very small amount of information, but please feel free to ask for any information that you may need to analyze and help me to resolve it.   5. below is the result of nmap:              root@risheetech:~# nmap -sS -O 127.0.0.1     Starting Nmap 5.21 ( //nmap.org ) at 2012-06-09 17:33 IST     Nmap scan report for localhost (127.0.0.1)     Host is up (0.000026s latency).     Not shown: 990 closed ports     PORT     STATE SERVICE     23/tcp   open  telnet     53/tcp   open  domain     80/tcp   open  http     110/tcp  open  pop3     143/tcp  open  imap     631/tcp  open  ipp     993/tcp  open  imaps     995/tcp  open  pop3s     2000/tcp open  cisco-sccp     3306/tcp open  mysql     Device type: general purpose     Running: Linux 2.6.X     OS details: Linux 2.6.19 - 2.6.31     Network Distance: 0 hops          OS detection performed. Please report any incorrect results at //nmap.org/submit/ .     Nmap done: 1 IP address (1 host up) scanned in 1.67 seconds        6. below is the mail.log file entries.              tail -f /var/log/mail.log     May 13 13:30:53 risheetech postfix/master[9018]: warning: /etc/postfix/main.cf: logical line must not start with whitespace: " smtpd_banner = $myhostname ES..."     May 13 13:30:53 risheetech postfix/master[9018]: fatal: /etc/postfix/master.cf: line 120: bad transport type: -e     May 13 13:32:05 risheetech postfix/master[9151]: fatal: /etc/postfix/master.cf: line 120: bad transport type: -e     May 14 09:54:09 risheetech postfix/master[11284]: fatal: /etc/postfix/master.cf: line 120: bad transport type: -e     Jun  9 17:08:50 risheetech postfix/postfix-script[13856]: starting the Postfix mail system     Jun  9 17:08:51 risheetech postfix/master[13857]: fatal: /etc/postfix/master.cf: line 120: bad transport type: -e     Jun  9 17:09:01 risheetech postfix/postfix-script[13863]: error: unknown command: 'restart'     Jun  9 17:09:01 risheetech postfix/postfix-script[13864]: fatal: usage: postfix start (or stop, reload, abort, flush, check, status, set-permissions, upgrade-configuration)     Jun  9 17:09:08 risheetech postfix/postfix-script[13977]: starting the Postfix mail system     Jun  9 17:09:08 risheetech postfix/master[13978]: fatal: /etc/postfix/master.cf: line 120: bad transport type: -e      Let me know what else is required to figure out what is the problem. I know it is very complicated and includes lot of other sub questions in it. Please help me.


title: How to join vCards lines

text: vCard uses a special way to split long lines: At 75 characters, insert a DOS newline _and_ a space. Joining therefore means to **replace all occurrences of the sequence "CR, LF, space" with an empty string** and otherwise leave the file alone. The simplest way I've found so far (using `sed` multi-line search and replace) is this:               sed -n '1h;1!H;${;g;s/\r\n //g;p;}' contacts.vcf      That's rather unreadable. Is there an easier way? Edit: Resulting implementation based on Peter.O's answer.


title: How to add folder to existing user [proftpd]

text: As we know we can add folder to user using `useradd user -p user_passwd -d /home/ftp/user_dir/ -s /bin/false` but how to add folder to existing user, for example /home/ftp/root for root ?


title: How to unzip a multipart (spanned) ZIP on Linux?

text: I need to upload a 400mb file to my web server, but I'm limited to 200mb uploads. My host suggested I use a spanned archive, which I've never done on Linux. I created a test in its own folder, zipping up a PDF into `test.zip.001`, `.002`, and `.003`. How do I go about unzipping it? Do I need to join them first? Please note that I'd be just as happy using 7z as I am using ZIP formats. If this makes any difference to the outcome.


title: Sync local files to remote git repository

text: I have my git repository on a linux located on the company server. I `ssh` into my linux machine and edit files there. ### Problem This method is great until I have a good connection to the server. in case of slow connection or even not having a connection I can't access my work and I am not able to do the job. ### Potential Solution Maybe I can copy my files from linux server to my local machine disk and then run an script that listen to changes made in my local files and mirror it to my remote server.   * I am using Git, any solution should cover git files too.   * In case I'm losing my connection I should be able to continue my work on local files and as soon as connection established script should mirror my changes to remote server.   * My machine runs Mac OSX Lion.


title: startx error when setting up X server on archlinux

text: I am trying to install X on my archlinux home desktop. I get this error when trying to start it (startx/xinit):               [root@computer ~]# startx     xauth: file /root/.Xauthority does not exist     xauth: file /root/.Xauthority does not exist          /usr/bin/X: /usr/lib/libz.so.1: version 'ZLIB_1.2.5.2' not found (required by /usr/lib/libfontenc.so.1)     xinit: giving up     xinit: unable to connect to X server: Connection refused     xinit: server error      I googled around and asked in #archlinux irc, but couldn't resolve the issue.


title: When does UNIX "defrag"? (specifically Solaris)

text: On Windows, there is Disk Defragmentor that runs every so often to make files contiguous again. I explain this to users in lay-men terms, but at the same time, I would like to mention yet another +1 about our company, but really have no understanding of the Solaris process to even know if that would work, so how is it done in Solaris? If it is different depending on filesystem, I it would be nice to know about ZFS, UFS, and whatever the most popular Linux filesystem is.


title: Finding out with which parameters a program was started

text: Is there a way to find out for any given process with which parameters it was started?


title: Why doesn't vim ask for password when reopenning an encrypted file?

text: If I run Vim and then open an encrypted file it asks for the encryption password. If I close the window where the file was opened (without closing vim) and then reopen the file, the password prompt is not shown anymore. Is there any setting to modify this behavior? I'd like vim to ask the password every time the file is opened regardless if it's the same Vim "session".


title: Fedora repository release cycle?

text: I have recently switched from Ubuntu to Fedora but can't seem to understand how the repository release cycle is. In ubuntu it seemed very OS centered where a new version of a package/program was released with the new version of Ubuntu. I guess most famously was Firefox 4 which wasn't released until natty came out, leaving everyone with an older version of Ubuntu with an older version of Firefox. Only security updates are released immediately. How does Fedora handle software updates? Is it OS centric like ubuntu? Does an update make it into the main repos as soon as its approved? Or is it some other system?


title: Linux Mint installer does not see fakeraid drive

text: I have a computer with a fakeraid 0 array (the computer came with it, and I don't want to remove my other OS to get rid of it), and I am trying to install Linux Mint. When I first boot up from the live usb, the partitions on the raid array do not show up in `/dev/mapper/` and gparted does not see them. After following various instructions on the internet (involving dmraid and kpartx) I got the drive and all of the partitions to show up in `/dev/mapper/` and gparted sees them, but when I run the installer it does not see any of the partitions. How can I make the installer see the partitions in fakeraid array once they are in `/dev/mapper/`?


title: Interpreting output of dmesg and /var/log/boot.log

text: I found two ways for printing boot messages one using dmesg and another the content of file /var/log/boot.log: The content of the /var/log/boot.log file are:                fsck from util-linux 2.20.1     /dev/loop0: clean, 263563/2271232 files, 7843644/18169856 blocks      * Starting configure network device security^[[74G[ OK ]      * Starting configure network device security^[[74G[ OK ]      * Starting configure network device^[[74G[ OK ]      * Starting Mount network filesystems^[[74G[ OK ]      * Starting Failsafe Boot Delay^[[74G[ OK ]      * Stopping Mount network filesystems^[[74G[ OK ]      * Starting Bridge socket events into upstart^[[74G[ OK ]      * Starting mDNS/DNS-SD daemon^[[74G[ OK ]      * Starting Userspace bootsplash^[[74G[ OK ]      * Starting Send an event to indicate plymouth is up^[[74G[ OK ]      * Starting bluetooth daemon^[[74G[ OK ]      * Starting configure network device^[[74G[ OK ]      * Stopping Failsafe Boot Delay^[[74G[ OK ]      * Starting System V initialisation compatibility^[[74G[ OK ]      * Starting set sysctls from /etc/sysctl.conf^[[74G[ OK ]      * Starting configure network device security^[[74G[ OK ]      * Starting modem connection manager^[[74G[ OK ]      * Stopping set sysctls from /etc/sysctl.conf^[[74G[ OK ]      * Starting CUPS printing spooler/server^[[74G[ OK ]      * Starting network connection manager^[[74G[ OK ]      * Stopping cold plug devices^[[74G[ OK ]      * Stopping log initial device creation^[[74G[ OK ]      * Starting configure network device security^[[74G[ OK ]      * Starting save udev log and update rules^[[74G[ OK ]      * Stopping save udev log and update rules^[[74G[ OK ]      * Stopping Userspace bootsplash^[[74G[ OK ]     Skipping profile in /etc/apparmor.d/disable: usr.bin.firefox     Skipping profile in /etc/apparmor.d/disable: usr.sbin.rsyslogd      * Starting AppArmor profiles       ^[[170G     ^[[164G[ OK ]     speech-dispatcher disabled; edit /etc/default/speech-dispatcher     saned disabled; edit /etc/default/saned      * Stopping System V initialisation compatibility^[[74G[ OK ]      * Starting System V runlevel compatibility^[[74G[ OK ]      while dmesg gives some thing like this:               [    0.008660] Initializing cgroup subsys blkio     [    0.008663] Initializing cgroup subsys perf_event     [    0.008667] Initializing cgroup subsys hugetlb     [    0.008713] CPU: Physical Processor ID: 0     [    0.008716] CPU: Processor Core ID: 0     [    0.008720] mce: CPU supports 4 MCE banks     [    0.008739] CPU0: Thermal monitoring enabled (TM1)     [    0.008746] process: using mwait in idle threads     [    0.008753] Last level iTLB entries: 4KB 64, 2MB 64, 4MB 64     [    0.008753] Last level dTLB entries: 4KB 64, 2MB 0, 4MB 64     [    0.008753] tlb_flushall_shift: 6     [    0.008895] Freeing SMP alternatives: 24k freed     [    0.011699] ACPI: Core revision 20121018     [    0.016015] ftrace: allocating 29358 entries in 115 pages     [    0.028544] ..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1     [    0.068468] smpboot: CPU0: Intel(R) Pentium(R) 4 CPU 3.00GHz (fam: 0f, model: 04, stepping: 09)     [    0.072000] Performance Events: Netburst events, Netburst P4/Xeon PMU driver.     [    0.072000] ... version:                0      and so on So my question how are the two related? When should we use demsg and when boot.log?


title: Cryptic Bash Crash

text: I've tried to run the following bash script:               #!/bin/bash                                                                          x=1     while [ $x -le 10 ]     do         echo "Welcome $x times"         x = $(( $x + 1))     done      And when I run it, I get a stream of messages that seem to repeat until I Ctrl-Z it.               im4t:test math4tots$ ./mdtest.sh     Welcome 1 times     launch_msg("CheckIn") IPC failure: Operation not permitted     Xquartz: Unable to locate waiting server: org.x.X11     Xquartz: X11.app = /Applications/Utilities/X11.app/Contents/MacOS/X11     Xquartz: Starting X server: /Applications/Utilities/X11.app/Contents/MacOS/X11 --listenonly     X11.app: main(): argc=2         argv[0] = /Applications/Utilities/X11.app/Contents/MacOS/X11.bin         argv[1] = --listenonly     Waiting for startup parameters via Mach IPC.     X11.app: No launchd socket handed off, unsetting DISPLAY     X11.app: do_start_x11_server(): argc=3         argv[0] = x         argv[1] = =         argv[2] = 2     Unrecognized option: =     use: X [:<display>] [option]     -a #                   default pointer acceleration (factor)     -ac                    disable access control restrictions     -audit int             set audit trail level     -auth file             select authorization file     -br                    create root window with black background     +bs                    enable any backing store support     -bs                    disable any backing store support     -c                     turns off key-click     c #                    key-click volume (0-100)      ... Lengthy error message that exceeds 30000 characters ...               ttyxx                  server started from init on /dev/ttyxx     v                      video blanking for screen-saver     -v                     screen-saver without video blanking     -wm                    WhenMapped default backing-store     -wr                    create root window with white background     -maxbigreqsize         set maximal bigrequest size      +xinerama              Enable XINERAMA extension     -xinerama              Disable XINERAMA extension     -dumbSched             Disable smart scheduling, enable old behavior     -schedInterval int     Set scheduler interval in msec     -sigstop               Enable SIGSTOP based startup     +extension name        Enable extension     -extension name        Disable extension     -query host-name       contact named host for XDMCP     -broadcast             broadcast for XDMCP     -multicast [addr [hops]] IPv6 multicast for XDMCP     -indirect host-name    contact named host for indirect XDMCP     -port port-num         UDP port number to send messages to     -from local-address    specify the local address to connect from     -once                  Terminate server after one session     -class display-class   specify display class to send in manage     -cookie xdm-auth-bits  specify the magic cookie for XDMCP     -displayID display-id  manufacturer display ID for request     [+-]accessx [ timeout [ timeout_mask [ feedback [ options_mask] ] ] ]                            enable/disable accessx key sequences     -ardelay               set XKB autorepeat delay     -arinterval            set XKB autorepeat interval               Device Dependent Usage:          -depth <8,15,24> : use this bit depth.     -fakebuttons : fake a three button mouse with Command and Option keys.     -nofakebuttons : don't fake a three button mouse.     -fakemouse2 <modifiers> : fake middle mouse button with modifier keys.     -fakemouse3 <modifiers> : fake right mouse button with modifier keys.       ex: -fakemouse2 "option,shift" = option-shift-click is middle button.     -version : show the server version.               Fatal server error:     Unrecognized option: (null)             OsVendorFatalError        AbortDDX     ^Z     [1]+  Stopped                 ./mdtest.sh      I also get a window that flickers (closes and opens repeatedly): ![enter image description here](http://i.stack.imgur.com/QEXWS.png) Also, in case it is relevant, I'm using Mac OS X Lion, but it doesn't seem like it it should matter... It looked like a harmless enough bash script...


title: Terminal resizes itself

text: I've recently installed Linux Mint 12 ("Lisa", i.e. not the KDE or Debian version) on a Zotac Mini-PC (Which has an AMD Video card. I'm not using the proprietary drivers as they don't work very well). Almost immediately after this, I decided to use Xfce 4.8 instead of GNOME so I found a build/install script to grab everything it needs and install it. Everything seems to work fine except I have just noticed that Terminal will re-size itself when it launches. First it will shrink horizontally until you can just see the caret position in the Terminal window. The height of the window does not change from what it is when it initially opens up. After you try to change the size of the Terminal window, it will again re-size itself horizontally but shrink vertically as well. Subsequent attempts at changing the window size produce "random" results - sometimes it will start shrinking in both directions, sometimes it won't shrink. I also occasionally see a video stutter, as if the Terminal is trying to stay at the height and width it was at is but is being forced to shrink. What gives? I suspect it might be an issue with GTK 2.x (which I believe Xfce 4.8 uses) and GNOME 3 which uses GTK 3, but why would these processes be running at the same time if I'm not currently in a GNOME session? I'm no Linux expert by any stretch of imagination... XTerm doesn't seem to have this issue. The terminal I'm referring to is "Terminal Emulator" run by: "exo-open --launch TerminalEmulator" Any ideas?


title: Are there any Linux distributions specifically designed for netbooks?

text: I have been using Ubuntu Netbook edition for the past two years now (it merged with regular ubuntu at some point, and I'm using the default environment: Unity). I need something faster, more lightweight, with longer battery life. I can sacrifice packages since the things that I do on my netbook are pretty much standard:   1. Browsing   2. A video or movie   3. Document editing   4. Music Is there any Linux distribution that will give me noticeable, superior results in the above categories and be more lightweight than Ubuntu?


title: Can unformatted partitions have UUIDs?

text: Can a partition have a UUID without a filesystem?


title: Sendmail relay without authentication

text: I have an issue:when the email is sent from an address other than 127.0.0.1 the authorization is required even if ip is on the same machine. How can I avoid to make request authorization for a given ip ?


title: What's missing with my SELinux installation?

text: According to Introduction to SELinux, section 14.4.2, > SELinux support is built into the standard kernels provided by Debian. The > core Unix tools support SELinux without any modifications. I have installed the `selinux-basics` and `selinux-policy-default` packages on my **Debian Wheezy** ( _stable_ ) system, and I saw it loading some policies during the installation, so I'm pretty sure the installation itself went well. I edited /etc/default/grub to say:               GRUB_CMDLINE_LINUX="selinux=1 audit=1 enforcing=0"      (that variable used to be empty) and ran update-grub. /boot/grub/grub.cfg does include the SELinux-related kernel parameters. I created a file `/.autorelabel` based on the /usr/sbin/selinux-activate script's "enable" branch. I have rebooted the system after making the above changes. Nothing out of the ordinary happened during that reboot. `dmesg | head` outputs, among else:               Command line: BOOT_IMAGE=/boot/vmlinuz-3.2.0-4-amd64 root=UUID=c050d662-f94a-447a-9342-0fc69f65a513 ro selinux=1 audit=1 enforcing=0 quiet pci=nomsi      As far as I can tell, everything is in place. Yet, **it does not seem to be working.** `id -Z` returns:               $ id -Z     id: --context (-Z) works only on an SELinux-enabled kernel     $      sestatus gives:               # sestatus     SELinux status:                 disabled     #      check-selinux-installation gives:               # check-selinux-installation     getfilecon:  getfilecon(/proc/1) failed     SELinux is not enabled.     Could not read the domain of PID 1.     /etc/pam.d/login is not SELinux enabled     Postfix init script is syncing the chroots.     Postfix has chrooted service in master.cf     FSCKFIX is not enabled - not serious, but could prevent system from booting...     #      **What's missing for SELinux to be enabled on my system?**


title: Does bash have a built in caching command available (sort of like mktemp or sponge)?

text: I'm using the amazon ec2 command line tools, and the `ec2-describe-instances` tool is a little painful because of the 2-5 seconds it requires to make the request and display the output. I'm looking into using the fec2din tool described in this question to format the output of `ec2-describe-instances` and was wondering what the best way would be to cache the output from the call. `fec2din` uses `mktemp` to create a temporary file and then uses `awk` to format the output. Does is there some tool I could use with a TTL paramater that would only run `ec2-describe-instances` if the timestamp on the cache file was older than a certain time? It would be neat if there was a little utility to do this (like `sponge` does for helping with `stdout`).


title: top/ps/mpstat showing different output

text: When my top shows a load of 19/20 and my ps shows               root@server:/home/nohup# ps -eo pcpu,pid,user,args | sort -k 1 -r | head -5     %CPU   PID USER     COMMAND     122131 18695 mysql  /usr/sbin/mysqld  xxxxx     0.1   961 root     [kdmflush]     0.1   937 root     [kdmflush]     0.1  1025 root     [jbd2/dm-2-8]      But mpstat shows               root@server:/home/nohup# mpstat     Linux 2.6.32-5-amd64 (sms-db3)  06/13/2014  _x86_64_    (16 CPU)          09:35:42 PM  CPU    %usr   %nice    %sys %iowait    %irq   %soft  %steal  %guest   %idle     09:35:42 PM  all    2.38    0.00    0.15    0.15    0.00    0.02    0.00    0.00   97.29      strace shows that mpstat is reading from /proc/stat to fetch the processor load. Which one should I believe? What is causing this difference, or am I using it wrong? I am using Debian squeeze 2.6.32-5-amd64


title: If chown can change groups, why was chgrp created?

text: So there's `chown` which lets you change the owner and group of files and/or directories. But there's also `chgrp` which only changes the group. Why was `chgrp` created? Isn't it redundant?


title: Error when unzipping a file

text: I am getting the following error when unzipping a file               unzip user_file_batch1.csv.zip          Archive:  user_file_batch1.csv       End-of-central-directory signature not found.  Either this file is not       a zipfile, or it constitutes one disk of a multi-part archive.  In the       latter case the central directory and zipfile comment will be found on       the last disk(s) of this archive.          unzip:  cannot find zipfile directory in one of user_file_batch1.csv or             user_file_batch1.csv.zip, and cannot find user_file_batch1.csv.ZIP, period.      I believe this file is not corrupted or a part of multi archive file as using Archive Utility I was able to unzip it. I have tried to rename it to `.zip` but did not work.


title: What is gvfs and why should I want it on my system?

text: What does gvfs do for me on my Kubuntu machine and why is /usr/lib/gvfs/gvfs- gdu-volume-monitor eating so much CPU time? BTW: I read https://en.wikipedia.org/wiki/GVFS and still don't know what's in it for me, especially on KDE / Kubuntu. `lsof` shows me that `thunderbird`, `firefox` and `pidgin` have gvfs libraries open, but for what functionality?


title: Why does tar --exclude=".*" create an empty archive?

text: Everything I read says that to exclude .svn and .htaccess and other hidden files when creating a tar archive, use the --exclude=".*" pattern. When I try, I get an empty archive. When I leave out the --exclude long option everything gets archived. Here's the full command I'm using: `tar -czvf ../_migrate/archive_2012-05-07.tgz --exclude=".*" ./*` I've also tried this variant, with no difference in results: `tar -czvf ../_migrate/archive_2012-05-07.tgz --exclude=".?*" ./*`


title: Need good ideas about improving any Linux service

text: I have a project assigned to me by OS teacher to choose any Linux service and improve it. Currently I am totally blank in this. I am not sure which service should I use which can easily be implemented and my project just get finished. Can you guys help me out to choose a service which can easily be improved and implemented? One idea which is in my mind right now is that currently we can stop any process (just consider client processes to keep things easy) but I think there is no option to pause the process? So i am thinking to implement this so that user can pause their running process.