title: rxvt-unicode + mc - strange characters in root shell only

text: Using rxvt-unicode-9.11 and mc-4.7.5.2, and using zsh-4.3.11 as my login shell, I find that I get strange characters, eg â instead of lines being drawn. Interestingly however, launching urxvt from any root shell, and then running mc inside of that renders the lines correctly. In Xdefaults I am not setting a font. I thought that any child shells should inherit the same as the parent shell, but clearly here it is not. Exports in parent:               COLON_SEPARATED=MOZ_PLUGIN_PATH     COLORFGBG='7;default'     COLORTERM=rxvt     CONFIG_PROTECT_MASK='/lib64/udev/rules.d /etc/dconf/db /etc/ca-certificates.conf'     CVS_RSH=ssh     DESKTOP_STARTUP_ID=awesome/urxvtc/2194-57-alipc-desktop-ex_TIME28147172     DISPLAY=:0.0     GDK_USE_XFT=1     GPG_AGENT_INFO=/tmp/gpg-CeLaPY/S.gpg-agent:2191:1     HOME=/home/ali     INFOPATH=/usr/share/info     JAVAC=/usr/bin/javac     JAVACMD=/usr/bin/java     JAVA_HOME=/usr/lib64/jdk     LANG=en_GB.utf8     LDPATH=/usr/local/lib:/usr/lib64/nss:/usr/lib64/vdpau:/usr/lib64/qt4     LESS='-R -M --shift 5'     LOGNAME=ali     MAIL=/var/mail/ali     MANPATH=/usr/local/share/man:/usr/share/man     MOZ_PLUGIN_PATH=/usr/lib64/mozilla/plugins:/opt/netscape/plugins     PAGER=/usr/bin/less     PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/lib64/jdk/bin:/usr/lib64/jre/bin:/opt/bin:/usr/lib64/jdk/bin:/usr/lib64/jre/bin     PWD=/home/ali     SHELL=/bin/zsh     SHLVL=2     SSH_AGENT_PID=2193     SSH_AUTH_SOCK=/tmp/ssh-RhQcEipf2192/agent.2192     TERM=rxvt-256color     TERMINFO=/usr/share/terminfo     USER=ali     WINDOWID=20972128     XAUTHORITY=/home/ali/.Xauthority     _=export      Exports in child:               COLON_SEPARATED=MOZ_PLUGIN_PATH     COLORFGBG='7;default'     COLORTERM=rxvt     CONFIG_PROTECT_MASK='/lib64/udev/rules.d /etc/dconf/db /etc/ca-certificates.conf'     CVS_RSH=ssh     DESKTOP_STARTUP_ID=awesome/urxvtc/2194-57-alipc-desktop-ex_TIME28147172     DISPLAY=:0.0     GDK_USE_XFT=1     GPG_AGENT_INFO=/tmp/gpg-CeLaPY/S.gpg-agent:2191:1     HOME=/home/ali     INFOPATH=/usr/share/info     JAVAC=/usr/bin/javac     JAVACMD=/usr/bin/java     JAVA_HOME=/usr/lib64/jdk     LANG=en_GB.utf8     LDPATH=/usr/local/lib:/usr/lib64/nss:/usr/lib64/vdpau:/usr/lib64/qt4     LESS='-R -M --shift 5'     LOGNAME=ali     MAIL=/var/mail/ali     MANPATH=/usr/local/share/man:/usr/share/man     MOZ_PLUGIN_PATH=/usr/lib64/mozilla/plugins:/opt/netscape/plugins     OLDPWD=/home/ali     PAGER=/usr/bin/less     PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/lib64/jdk/bin:/usr/lib64/jre/bin:/opt/bin:/usr/lib64/jdk/bin:/usr/lib64/jre/bin     PWD=/home/ali     SHELL=/bin/zsh     SHLVL=4     SSH_AGENT_PID=2193     SSH_AUTH_SOCK=/tmp/ssh-RhQcEipf2192/agent.2192     STY=27048.pts-2.alipc-desktop-ex     TERM=rxvt-256color     TERMINFO=/usr/share/terminfo     USER=ali     WINDOW=0     WINDOWID=27262984     XAUTHORITY=/home/ali/.Xauthority     _=export      Thanks. Edit: more information + combinations: .zshrc:               # The following lines were added by compinstall          zstyle ':completion:*' completer _expand _complete _ignored     zstyle ':completion:*' group-name ''     zstyle ':completion:*' list-colors ''     zstyle ':completion:*' menu select=long     zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s     zstyle ':completion:*' use-compctl false     zstyle :compinstall filename '/home/ali/.zshrc'          autoload -U zutil     autoload -Uz compinit     autoload -U complist     compinit     autoload -U colors     colors     # End of lines added by compinstall     # Lines configured by zsh-newuser-install     HISTFILE=~/.histfile     HISTSIZE=1000     SAVEHIST=1000     setopt appendhistory autocd extendedglob notify     unsetopt beep     bindkey -v     # End of lines configured by zsh-newuser-install          #export PS1="%n#%d>"          PROMPT="%{$fg[red]%}%n%{$reset_color%}@%{$fg[blue]%}%m %{$fg[yellow]%}%d %{$reset_color%}%#"     RPROMPT="[%{$fg[yellow]%}%T%{$reset_color%}]"      locale -a: C en_GB.utf8 en_US.utf8 POSIX exports from 'urxvt -e zsh -f': - A working set!               COLORFGBG='7;default'     COLORTERM=rxvt     DESKTOP_STARTUP_ID=awesome/urxvt/2199-28-alipc-desktop-ex_TIME11280170     DISPLAY=:0.0     GPG_AGENT_INFO=/tmp/gpg-d5ZFvz/S.gpg-agent:2196:1     HOME=/home/ali     LOGNAME=ali     MAIL=/var/mail/ali     PATH=/bin:/usr/bin:/usr/local/bin     PWD=/home/ali     SHELL=/bin/zsh     SHLVL=2     SSH_AGENT_PID=2198     SSH_AUTH_SOCK=/tmp/ssh-sPZhKOhV2197/agent.2197     TERM=rxvt-unicode-256color     TERMINFO=/usr/share/terminfo     USER=ali     WINDOWID=23068680     XAUTHORITY=/home/ali/.Xauthority     _=export      Note: I did try setting my TERM via .Xdefaults, to the one that worked in the 'clean' window:               urxvt*termName:  rxvt-unicode-256color      Though this had no effect, so it is not TERM that affects this.


title: Can't start mysqld

text: I've installed mysql through               $ sudo apt-get install mysql-server-core-5.1     $ sudo apt-get install mysql-client-core-5.1      This is my current conf file And the service won't start, at first the socket and var folders did not exist, I created the mysql user and mysql group as system accounts and gave ownership and full control to the directories specified in the conf file. the I tried running the `mysqld` as the mysql user:               $ sudo -u mysql mysqld       And I get I get the following error               120201 13:52:58 [Note] Plugin 'FEDERATED' is disabled.     mysqld: Table 'mysql.plugin' doesn't exist     120201 13:52:58 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade     to create it.     120201 13:52:58  InnoDB: Initializing buffer pool, size = 8.0M     120201 13:52:58  InnoDB: Completed initialization of buffer pool     120201 13:52:58  InnoDB: Started; log sequence number 0 44233     120201 13:52:58 [ERROR] Fatal error: Can't open and lock privilege tables: Table   'mysql.host' doesn't exist      Also I'tried running it like this:               $ sudo service mysql start      Yields `mysql: unrecognized service` Any suggestions are GREATLY appreciated.


title: Ubuntu Drivers on Chromium OS?

text: I recently managed to install Chromium OS to a flash drive. However, when I booted into Chromium OS, I found that neither wifi or ethernet worked, yet both wifi and ethernet work on my Ubuntu partition. I was wondering if it was possible to copy the wifi and ethernet drivers from Ubuntu to Chromium OS. Have any of you tried this? I'm running Ubuntu


title: Is there line numbering for nano?

text: Is there a way to turn on line numbering for nano?


title: VSFTPD link to a folder in root folder

text: I have just setup the basic stuff for `vsftpd`. I got that working fine with root use thats all. I have also stupidly installed something to the root user home directory which I would like another user to access can this be done and how? So for example I have the root folder "/root/installedapp/plugins" and I want to create a user called pluginmod to only have access to that folder. Can someone please and explain how this is possible?


title: What causes localhost 404 requests to go to http://origin.domain.com

text: I've been running Apache on my local computer for years. Suddenly, any request to a local page that is not found, is redirected to http://origin.domain.com/. What could cause this? Just to be clear, I open: http://localhost/this_page_does_not_exists.html And I am being forwarded to: http://origin.domain.com I tested this in Firefox, Chrome, and even in Lynx, and it happens all the same. Using Apache 2.2.22, on Arch Linux.


title: Overclocking software for Linux?

text: Is most overclocking done strictly at the BIOS level, or is there a way to do it from a running operating system? And if so, is there a way to do it from Linux? I'm running Ubuntu presently and am interested in overclocking to squeeze more speed out of my processor.


title: Do the parent directory's permissions matter when accessing a subdirectory?

text: If I have a root folder with some restrictive permission, let's say 600, and if the child folders/files have 777 permission will everybody be able to read/write/execute the child file even though the root folder has 600?


title: Is the `ed` editor useful for any purpose besides emergencies and batch editing?

text: I'm wondering if the `ed` editor is useful any longer for interactive editing. I know that the diff command can produce patches as ed scripts and that ed is a last resort when the baud rate is super slow. But are there any other reasons to learn and use `ed`?


title: retrieving names of all open pdf files (in evince or otherwise)

text: I constantly have many PDF files open. These are usually downloaded using chrome and immediately opened using evince. I sometimes want to persist the state of all my open PDF files, so I could re- open the same group of documents at a later time. This mostly happens when I need to reboot and what to have the same set of documents re-opened, but sometimes I just want to keep a list of open documents for later. Is there a way to get the names of all open pdf files, from evince or any other program? or at least, is there a way of asking evince to re-open the same set of documents after a reboot?


title: How to make VLC play an iso file directly?

text: Running `vlc /path/to/dvd-video.iso`, I'm getting:               [0x8787ccc] main decoder error: no suitable decoder module for fourcc `undf'. VLC probably does not support this sound or video format.      **notes** :   * The version of `vlc` is 1.1.3.   * The DVD plays well when not in iso format (when it's normal files on the filesystem).


title: /proc/sys vs /sys/modules/mod/parameter

text: I've been wondering for last few days how exactly does it work. We can set kernel runtimes parameters using sysctl or `echo boolen 1> /proc/sys/module/exactParameter` but in `/sys/modules/module/parameters/parameter` we can also set values. Are parameters for modules in `/proc/sys/` related only to hard complied into kernel? or there could be parameters for Loadable Kernel Modules also? LKM after being loaded into running Kernel reveal their parameters in `/sys/modules/module/paraeter/params`. Does it mean, that there aren't parameters for modules compiled into Kernel? What is difference between both directories.


title: Notifications and notification daemon not working on window manager

text: Notifications doesn't work on Linux standalone window managers (Openbox, Awesome WM and alike). I tried to install notification-daemon and dunst, but sending with `notify-send "something"` does not make any window to pop-up. I tried to run polkit-gnome-agent and run directly notification daemons, but it does not help (while ago I solved similar problem in this way, but now it does nothing). There is no any indications of errors unless I send trivial notification with python, then I get only vague error message: `File "/usr/lib/python3.3/site- packages/gi/types.py", line 113, in function return info.invoke(*args, **kwargs) gi._glib.GError: Could not connect: Connection refused ` Trivial C program outputs nothing (no error for example). I'm using Archlinux with systemd and d-bus, I suspect it's a problem with polkit or some kind daemon not runing on window manager start, but have no idea, what could I try or how could I get more meaningfull error messages. **EDIT:** I took sample code from there: https://wiki.archlinux.org/index.php/Libnotify#Python Dbus should be runing because systemd has it as dependency. I have `libnotify` installed - it is package which provides `notify-send`. Also notification daemon should start as needed (only when notification arives), by following desktop file `/usr/share/dbus-1/services/org.freedesktop.Notifications.service` :               [D-BUS Service]     Name=org.freedesktop.Notifications     Exec=/usr/bin/dunst      I had even tried to run daemons directly (just execute) and tried sending notifications. If somenone knows how I could get me more info, please do not hesitate to suggest. **EDIT 2:** I tried running notification daemon with sudo: `sudo notification- daemon_name &` (in my case `sudo dunst &`) and `sudo notify-send something`, then notification works. But when I try to do any of the previous actions as unprivileged user (which is important most programs send notification as unprivileged users), nothing shows. `notification-daemon` refuses to work at all without any error or warning. **EDIT 3:** Clearly it is permissions problem: I can't send notifications without root access. After clean reboot: `sudo notify-send "something"` works even without manually launching any daemons, however what I (and my launched programs) should do to be able send notifications without root privilegies as it is possible in Gnome or any other full desktop environments?


title: Convention for primary app deployment dir structure on a Unix-like app server

text: The client I'm working for deploys their application to a directory they created at the root level. While acknowledging it is a matter of local preference, I am unsure if this is in accordance with the generally accepted standard how to distribute an application's components across a Unix-like system. E.g. normally, I would put the binaries for my deployed app to `/opt`, conf files in `/etc`, logs under `/var` etc. But then again, this is the primary application the server is used for so it isn't exactly equivalent to untaring some 3rd party software into `/opt`. Still, personally, I would prefer not to add any dirs at the root level, i.e. would keep that level sort of sacred out of respect for the original Unix file hierarchy. I wanted to ask whether this is common and what are some ramifications of this approach.


title: How can I purge old kernel packages in Elementary OS?

text: On my Elementary OS system, dpkg reports a number of kernel packages that aren't installed. (I did an apt-get purge on them previously.) I'd like to have them forgotten about entirely, but I can't figure out how to get them that way. For example:               elementary:~$ dpkg -l linux-*-3.2.0-51*     Desired=Unknown/Install/Remove/Purge/Hold     | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend     |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)     ||/ Name                                 Version                              Description     +++-====================================-====================================-========================================================================================     un  linux-headers-3.2.0-51               <none>                               (no description available)     un  linux-headers-3.2.0-51-generic       <none>                               (no description available)     un  linux-image-3.2.0-51-generic         <none>                               (no description available)      apt-get purge doesn't work:               elementary:~$ sudo apt-get purge linux-headers-3.2.0-51     Reading package lists... Done     Building dependency tree            Reading state information... Done     Package linux-headers-3.2.0-51 is not installed, so not removed     0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.      dpkg doesn't work:               elementary:~$ sudo dpkg --purge linux-headers-3.2.0-51     dpkg: warning: there's no installed package matching linux-headers-3.2.0-51     elementary:~$ sudo dpkg --forget-old-unavail     dpkg: warning: obsolete '--forget-old-unavail' option, unavailable packages are automatically cleaned up.      apt-cache shows:               elementary:~$ apt-cache policy linux-headers-3.2.0-51     linux-headers-3.2.0-51:       Installed: (none)       Candidate: 3.2.0-51.77       Version table:          3.2.0-51.77 0             500 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main amd64 Packages             500 http://security.ubuntu.com/ubuntu/ precise-security/main amd64 Packages      aptitude isn't installed. Obviously, there's something I'm not understanding. Why does dpkg -l show purged packages? How do I go about making dpkg forget about them?


title: Thunar: no templates in context menu

text: I already configured `XDG_TEMPLATES_DIR` field in `~/.config/user-dirs.dir` , The folder is absolute path, and accessible, with several files inside. But when I right click, the "Create Document" menu is still empty. Is there something I missed? **UPDATE**               %> grep TEMP ~/.config/user-dirs.dir     XDG_TEMPLATES_DIR="/YY/XX/Templates/"      And that path exists and have files inside.


title: What does XST in the date command output mean?

text: When executing the date command (on CentOS), it gives me something like this: > Thu May 10 20:15:07 XST 2012 My local time zone is CEST, which was at that moment 22:15:07, so the printed time seems to be GMT. But even with some time in Google and the man pages I was not able to see what XST means...I guess it's quite simple, so who can help? * * * Edit: When setting the timezone again, the output comes like that: > Fri May 11 10:02:33 XDT 2012 So, the printed time is fine - I am just curious about the meaning of `XST` and `XDT` in the output.


title: Any reason NOT to run Linux in a VM all the time?

text: I've switched to using Arch Linux for most of my day to day work and don't need Windows for anything but gaming and the couple of apps that aren't ported to Linux like OneNote. My Linux distro is hosted in VirtualBox with Windows as host, and I quite like it that way, snapshots are incredibly useful. Let's say I were to pretty much never care about the Windows host and spend 95% of the time in the guest, what would I be missing out on? Are there serious downsides? Is performance severely affected and will installing straight onto the machine make my life much more amazing?


title: Fedora 19 (Schrödinger's cat) gets stuck on boot

text: When I installed Fedora, it did not have the Schrödinger's cat boot option, but then I installed a bunch of updates and now it is there. What is even more annoying is that it is the default boot option. Here is the log I get on the screen during boot: ![Boot log](http://i.stack.imgur.com/OIher.jpg) Is there any way to fix this without reinstalling? If anyone wants boot log text file let me know and I will clear it and reboot and give you the output. * * * Edit: I added the line to the `/etc/yum.conf` file and here is the new stack: ![enter image description here](http://i.stack.imgur.com/icaSF.jpg)


title: Chaining && and || in the shell

text: Why does this not work as expected?               $ false &&   { echo ok;  echo ok; } && { echo notOK; }      and this not:               $ false &&   { echo ok;  echo ok; } || { echo notOK; }      I don't see it!


title: What's the real point of the -f option on rm?

text: By reading the GNU coreutils man page for `rm`, one of the options is `-f`, which according to the manual,               -f, --force               ignore nonexistent files and arguments, never prompt      Now, I made some tests and show that indeed if I use something like               rm -f /nonexisting/directory/      it won't complain. What can someone really gain from such an option? Plus the most common examples of "deleting directories" using `rm` is something like                rm -rf /delete/this/dir      The `-r` option makes sense, but `-f`?


title: Create a executable for a scheme program with arguments

text: I have a `scheme` program which is executed using the command `; (primes<= n)` to give me all the primes less than `n` For example, `; (primes<= 200)` gives me all the primes less than 200 How do I create an executable in Linux for the program below taking `n` as an argument ---------Scheme Program------------------------------------------------                   #lang racket          (define  (interval-list m n)       (if (> m n)           '()           (cons m (interval-list (+ 1 m) n))))     (define (sieve l)       (define (remove-multiples n l)         (if (null? l)              '()              (if  (= (modulo (car l) n) 0)      ; division test                   (remove-multiples n (cdr l))                   (cons (car l)                         (remove-multiples n (cdr l))))))       (if (null? l)           '()           (cons (car l)                  (sieve (remove-multiples (car l) (cdr l))))))     (define (primes<= n)       (sieve (interval-list 2 n)))      * * * The above program is executed as (primes<= 100)prints all the primes less than 100


title: How does a fork bomb work?

text: * _**WARNING DO NOT ATTEMPT TO RUN THIS ON A PRODUCTION MACHINE_** In reading the Wikipedia page on the topic I generally follow what's going on with the following code:               :(){ :|:& };:      _excerpt of description_ > The following fork bomb was presented as art in 2002;56 its exact origin is > unknown, but it existed on Usenet prior to 2002. The bomb is executed by > pasting the following 13 characters into a UNIX shell such as bash or zsh. > It operates by defining a function called ':', which calls itself twice, > once in the foreground and once in the background. However the last bit isn't entirely clear to me. I see the function definition:               :(){ ... }      But what else is going on? Also do other shells such as `ksh`, `csh`, and `tcsh` also suffer the same fate of being able to construct something similar?


title: Is it safe to only have root and swap partitions when dual-booting Linux and Windows?

text: I am trying to install Linux Mint alongside an existing Windows 7. I found a simple tutorial (I haven't tried it yet), but I wonder if it is healthy to partition `/` and `/swap` only. On the other hand, another tutorial simply doesn't work even it have four partitions: `/`, `/boot`, `/swap`, and `/home`. If the first tutorial works, it is healthy to allocate all space to `/`? And will I have a `/home` directory? Also, I tried the first installer option provided by Mint ("install Linux Mint alongside Windows 7"), but it simply didn't work. The boot menu didn't appear automatically.


title: Configuring sendmail as a relay to ISP

text: I need to setup sendmail daemon as a simple store-and-forward mechanism to forward mails to our ISP. I need to connect to the ISP SMTP server on port 465 using SSL/TLS and a username/password for authentication. This particular ISP (GoDaddy) does not - afaiu - support STARTTLS, only plain vanilla SSL/TLS. There's no proxy in order to connect to Internet. What I want to achieve is to have an internal always-on SMTP that can accept e-mail even when our connection to Internet is down, the ISP is malfunctioning or whatever. The internal SMTP server would then hang onto the e-mail until it can be delivered to the external SMTP server. Also the internal SMTP server can be setup old-fashioned way on incoming side so that it will accept unencrypted and unauthenticated connections from internal net. This allows old applications that are only able to send e-mails this way (my company has an old Perl app that does this) through the internal SMTP server. The sendmail I work with has the following abilities out-of-the-box:               Version 8.14.5+Sun      Compiled with: DNSMAP LDAPMAP LOG MAP_REGEX MATCHGECOS MILTER MIME7TO8                     MIME8TO7 NAMED_BIND NDBM NETINET NETINET6 NETUNIX NEWDB NIS                     PIPELINING SCANF STARTTLS TCPWRAPPERS USERDB USE_LDAP_INIT                     XDEBUG      I've been through a lot of blogs/mail lists but surprisingly haven't been able to find what I'm looking for. You would think that my use case is pretty common these days, but no. These are problems that I have with the instructions I can find on the Net:   * They are just plain old. Nothing wrong with that but many of them start out with "this is how you roll your own sendmail" or similar. I believe modern sendmail implementations (like the one I work with) are ok as installed.   * They tell you how to setup a smart host but assume you connect to that host unencrypted and unauthenticated on port 25. I believe it is many years since anyone has operated an externally exposed SMTP server like that. Perhaps such example is not void in modern days but it confuses me what part of it I can use.   * They do not adequately distinguish between the receiving side (incoming SMTP connection) and the sending side (outgoing SMTP connections) of the sendmail daemon. I don't care much about the receiving side. It is by default only open for incoming connections from localhost and that is fine with me. I do not need any form of authentication or encryption on the incoming side. (there are about a dozen methods I can protect the sendmail daemon so it only accepts connections from localhost, from a specific IP range or similar -- all that I know how to do, no worries). It is only the sendmail daemon's _outgoing_ connections where I need to use SSL/TLS and username/password. Anyone can point me in the right direction? I'll be happy to post a full example once finished.


title: encfs with expect access denied

text: If I execute script               #!/usr/bin/expect      set pass [lindex $argv 0]      spawn encfs -v  {CRIPT_DIR}  {MNT_DIR} -o nonempty      expect "*EncFS Password:*"     send "$pass\r"     expect eof      expect script output:               zz@zz-com:/media/truecrypt5/mmm$./e.sh 1     spawn encfs -v /media/truecrypt5/mmm/cr /media/truecrypt5/mmm/mn -o nonempty     10:25:11 (main.cpp:523) Root directory: /media/truecrypt5/mmm/cr/     10:25:11 (main.cpp:524) Fuse arguments: (daemon) (threaded) (keyCheck) encfs /media/truecrypt5/mmm/mn -o nonempty -s -o use_ino -o default_permissions      10:25:11 (FileUtils.cpp:177) version = 20     10:25:11 (FileUtils.cpp:181) found new serialization format     10:25:11 (FileUtils.cpp:199) subVersion = 20100713     10:25:11 (Interface.cpp:165) checking if ssl/aes(3:0:2) implements ssl/aes(3:0:0)     10:25:11 (SSL_Cipher.cpp:370) allocated cipher ssl/aes, keySize 24, ivlength 16     10:25:11 (Interface.cpp:165) checking if ssl/aes(3:0:2) implements ssl/aes(3:0:0)     10:25:11 (SSL_Cipher.cpp:370) allocated cipher ssl/aes, keySize 24, ivlength 16     10:25:11 (FileUtils.cpp:1620) useStdin: 0     EncFS Password:      10:25:11 (Interface.cpp:165) checking if ssl/aes(3:0:2) implements ssl/aes(3:0:0)     10:25:11 (SSL_Cipher.cpp:370) allocated cipher ssl/aes, keySize 24, ivlength 16     10:25:12 (FileUtils.cpp:1628) cipher key size = 44     10:25:12 (Interface.cpp:165) checking if nameio/block(3:0:1) implements nameio/block(3:0:0)      ls command:               zz@zz-com:/media/truecrypt5/mmm$sudo ls -la     [sudo] password for zz:      ls: cannot access mn: Permission denied     total 24     drwx------  4 zz zz 4096 2012-08-31 14:40 .     drwx------ 10 zz zz 4096 1970-01-01 03:00 ..     drwx------  2 zz zz 4096 2012-08-30 18:56 cr     -rwx------  1 zz zz   73 2012-08-30 18:54 e2.sh     -rwx------  1 zz zz  178 2012-08-30 19:10 e.sh     d?????????  ? ?  ?     ?                ? mn     -rwx------  1 zz zz   40 2012-08-30 18:52 u.sh      I don't have access to {MNT_DIR}. Sodo user don't have access to. But command or shell scipt               #!/bin/sh     encfs -v  {CRIPT_DIR}  {MNT_DIR} -o nonempty      work correct. OS: Ubuntu 11.10 What is wrong in my expect script?


title: Problem : how can I copy/paste this in vim?

text: I'm working with the vim editor and I found `y`,`yw` respectively to copy a line and a word but how can I do the following task in vim? www.p`ack.goo`gle.com From this line how can I copy and paste `ack.goo` using vim editor?


title: Which desktop indexer indexes xml file content?

text: My favorite indexer doesn't have this capability, and I'm looking for an alternative that does.


title: Creating a completely offline installer using simple-cdd

text: I'm trying to create a custom CD using my own minimal debian installed setup. I just simply typed `build-simple-cdd`. The process was successful, but when I tested it on my virtualbox and disabling the network, it looks for the kernel. Did I miss anything on my setup?


title: How to stop a daemon from starting up on boot-up in Debian

text: There's a few daemons I disable from starting on boot-up. As an example, I use the following:                sudo update-rc.d -f postgresql remove      I'm not even sure if that command is correct and I don't remember where I got it from. Anyways, whenever I upgrade **`postgresql`** , the setting is lost (i.e. the daemon starts up on reboot).


title: Run java classfile from terminal

text: I have a compiled java file `somefile.class`, and when i cd into the right folder and do: `java somefile` it works but when i call it from another folder: `java folder/somefile` it doesn't work, it gives me java exceptions, could you help me out? Edit: I am working on a Mac if that matters..


title: IM program to support yahoo video calls

text: I have been trying to migrate to Linux from Windows during the past one year. Until I completely deleted my windows and I have been using Linux mint 15 for the last 30 days. I am really satisfied. I have one huge problem. I have relatives in other countries that I must use Yahoo to chat and talk with. I have tried to find a replacement for Yahoo messenger in Linux that supports Yahoo video/voice calls protocol but I have not been successful. Since I must use Yahoo for my calls I would highly appreciate if you could suggest me a program that I could use. I have tried different distributions and Linux mint 15 seems to be the most stable on my laptop. So I would like to use a program that is supported by Linux mint.   * I have tried GYchE but unfortunately it does not support video/voice calls    * I have tried installing Yahoo messenger through Wine. I have installed Yahoo Messenger but when it tries to log me in I get this error. It seems to be a common problem for different programs in Wine. But I could not find a solution to solve the problem. Edit: I installed VirtualBox and used a Windows XP iso file to install Windows Xp on the virtual Machine. Everything was very easy and straightforward. As Anthon suggested, if you want to use the USB device you should be a member of _vboxuser_ group. VirtualBox has a very good Manual here. I followed the manual here, but in linux mint there is no GUI user/group management tool. So I followed this answer to install the tool.   I am so happy that everything (webcam - microphone) is working under the virtual machine Yahoo Messenger. So far it has been really fast and stable.


title: How to to login to my emailbox using shell or java code

text: I want to write a program/script that can send emails on my behalf using Unix Shell or Java. I think Unix Shell would be the best option as I need to do set specific time to send emails from my behalf. I know it can be done with `cron` settings in Unix. But I do not know even how to start with implementation, what parts of Shell/Java to look for. How do I login to my emailbox usuing Java or Shell/Unix?


title: Tacacs over IPv6

text: I have migrated my Redhat Enterprise linux server 5.5 to IPv6 . Now I want to run tacacs+ for IPv6. When testing from my client, it returns "unable to connect to server for IPv6 address", but for IPv4 it’s working fine. Snapshot of Linux listening port:               [root@ADA-Linux-Service-2 ~]# netstat -an | grep :49     tcp        0      0 0.0.0.0:49                  0.0.0.0:*                   LISTEN      Once the tacacs service is started, I tried using the bind option with IPv6 it returns the following error:               Reading config     Version F4.0.4.26 Initialized 1     get_socket: bind 49 Address already in use      I don’t know how to make tacacs+ listen on the IPv6 address. Do I need to create entries in `tac_plus.cfg` to listen for IPv6?


title: How to delete a video after it has been watched completely?

text: I watch most of my TV news on my computer. The videos are downloaded by my RSS reader and stored on disk until I decide to watch them. The files look like this:               130704_hjo_446k_p20v11.mp4     130706_hjo_446k_p20v11.mp4     130708_hjo_446k_p20v11.mp4      The thing is I don't watch them daily, but whenever I feel like it. So sometimes I watch one sometimes three in a row.I watch them normally with `mplayer2` by executing the following:               mplayer *hjo*.mp4      My problem is I always forget to delete the already watched files and then I have to remember when I last watched or I have to rewatch until I find the new files. Now I am looking for a script or program which marks the completely watched files. As far as I know `mplayer2` can't do this, since there is no hook to check if the video was watched to the end.


title: Solaris 10 on x86: local sockets (unix domain sockets) very very slow?

text: I'm writing an application both on Linux and Solaris 10. It uses local sockets for some internal communications. On Linux an open, exchange one short message & close cycle takes about 10us elapsed time. On Solaris 10 x86, it takes about 400us. This is such atrociously bad performance, that I think I might have done something fundamentally wrong. Yet what I'm using is the textbook-case, with the waiting for the other side in the command exchange implemented by `select()`. ### Questions   1. Are local sockets something that are known to have abysmal performance on Solaris 10, either for opening/closing or for data exchange?   2. Are there any known performance issues with `select()` on Solaris 10?   3. Are there any special tricks to speed this up?


title: Mount options with ecryptfs encrypted home

text: I'm using ecryptfs for an encrypted home directory. I would like to try out the mount option "ecryptfs_xattr" on my encrypted home directory, because it will probably improve performance. Can I specify this option somewhere, and still have it decrypt the home when I log in? (I assume I have to re-create the encrypted home directory, that's no problem)


title: Run tmux always when I open terminal

text: I usually open _lxterminal_ with bash shell where I usually type _tmux_ command first. I'd like to have launched tmux command automatically, so I tried to add this command to `~/.bash_profile` or to `~/.profile` files but none of them launched the tmux automatically. Can this be achieved?


title: Changing hostname without errors

text: I tried to change my hostname according to this guide for Debian based system:   1. I edited `/etc/hostname`   2. I ran `/etc/init.d/hostname start` Though there are errors. Always when I write a `sudo` command it tells me it can't recognize the hostname. After I restarted the system, the graphical environment wasn't working, the `startx` command wasn't successful. So, I changed the hostname back to the old name. Can I change the hostname without errors?


title: How to "zoom out" screen windows, everything looks too big?

text: I bought new laptop Dell Inspiron and first thing I installed Linux Mint and Eclipse for Java development. But I didn't like the look of Eclipse, everything just looks too big on the screen. Half of the space is taken by the tabs and menus, no room for editor, also the font is too big. I would like to shrink the whole screen if possible, to have smaller fonts and tabs etc., but the display is on the maximum resolution already (1366x768). How can I do this? I'm quite new to Linux and gnome, but I'm sure there is a simple solution to my problem.


title: getting pid of two last commands executed in background and do stuff

text: I wrote this bash:               #!/bin/bash              eval "(a command) &"         pid1=$!              eval "(while kill -0 $pid1; do .... ; done) &"  #It creates file.txt after few seconds         pid2=$!              if [ -s /tmp/file.txt ]; then                  for line in $(cat /tmp/file.txt)                      do                       sth                      done      With logic of bash scripting: Is the values of pid1 and pid2 correct? Is this script running correctly?


title: How can I run `hackxor` inside VirtualBox?

text: I've found hacking game **hackxor** , but it's made for vmware. I don't have any experience with vmware and I don't want to install it in my machine. So I'd like to run **hackxor** inside VirtualBox if it is possible.


title: How long has my Linux system been running?

text: Is there a command I can type in a terminal that will tell me the last time a machine was rebooted?


title: How to return multiple select count in an array variable in shell

text: I have a 4 SQL count values which I want to return in an array record_count so that I can use that count values in some if statements later in the shell program. But I am not able to return the values in array variable. Below is my program.               record_count=`sqlplus -S $final_string <<END     SET FEEDBACK OFF     SET HEADING OFF     SELECT COUNT(1) FROM USAGE_STAGE WHERE DOMAIN = 'INTERNET Aggregated' and (DOWNLOAD < $LOWER_THRESHOLD or DOWNLOAD > $HIGHER_THRESHOLD);     SELECT COUNT(1) FROM USAGE_STAGE WHERE DOMAIN = 'INTERNET Aggregated' and (UPLOAD < $LOWER_THRESHOLD or UPLOAD > $HIGHER_THRESHOLD);     SELECT COUNT(1) FROM USAGE_STAGE WHERE DOMAIN = 'Youview Aggregated' and (DOWNLOAD < $LOWER_THRESHOLD or DOWNLOAD > $HIGHER_THRESHOLD);     SELECT COUNT(1) FROM USAGE_STAGE WHERE DOMAIN = 'Youview Aggregated' and (UPLOAD < $LOWER_THRESHOLD or UPLOAD > $HIGHER_THRESHOLD);     END`          echo "The output of select query is" $record_count


title: Is it possible for a daemon (i.e. background) process to look for key-presses from a USB keyboard?

text: I'm working on an embedded Linux project where I will be developing a program that will run automatically on bootup and interact with the user via a character display and some sort of button array. If we go with a simple GPIO button array, I can easily write program that will look for keypresses on those GPIO lines. However, one of our thoughts was to use a USB number pad device instead for user input. My understanding is that those devices will present themselves to the OS as a USB keyboard. If go down this path, is there a way for my program to look for input on this USB keyboard from within Linux, keeping in mind that there is no virtual terminal or VGA display. When a USB keyboard is plugged in, is there an entity in '/dev' that appears that I can open a file descriptor for?


title: Using gpg-agent to decrypt password in cron job

text: I have two scripts that both need to decrypt passwords using gpg-agent. Both of them run fine when launched from the terminal. The problem is that when run via cron, they both fail with these messages:               gpg: problem with the agent: End of file     gpg: decryption failed: No secret key      I have this in `/etc/profile.d/gpg-agent.sh`:               if [ $EUID -ne 0 ] ; then         envfile="$HOME/.gnupg/gpg-agent.env"         if [[ -e "$envfile" ]] && kill -0 $(grep GPG_AGENT_INFO "$envfile" | cut -d: -f 2) 2>/dev/null; then             eval "$(cat "$envfile")"         else             eval "$(gpg-agent --daemon --enable-ssh-support --write-env-file "$envfile")"         fi         export GPG_AGENT_INFO  # the env file does not contain the export statement         export SSH_AUTH_SOCK   # enable gpg-agent for ssh     fi      And I can verify the agent is running:               % pgrep gpg-agent     510      The cron tasks are in my own crontab. I've tried executing the scripts like this:               */30 * * * * source /home/user/.gnupg/gpg-agent.env && export GPG_AGENT_INFO && /script      But nothing I've tried works.


title: buildroot compiling driver

text: I'm using Buildroot for compiling embedded linux. It works well because I have target Makefile configurations, but now I need driver for my usb devices. I manage to compile Qt appilactions(c++) on my host linux to target linux by using buildroots `/output/host/usr/bin/arm-none-linux-gnueabi-c++` . Works well. Now I'm trying to compile c-files for this driver http://www.ftdichip.com/Drivers/VCP.htm I'm calling it like                /output/host/usr/bin/arm-none-linux-gnueabi-gcc -Wall -D__KERNEL__ -DMODULE -I/home/buildroot-2012.08/output/build/linux-2.6.35.3/include -DMODVERSIONS -include /home/buildroot-2012.08/output/build/linux-2.6.35.3/include/config/modversions.h -I /home/buildroot-2012.08/output/build/linux-2.6.35.3/drivers/usb/serial/ -O   -c -o ftdi_sio.o ftdi_sio.c      Now I'm getting error: `output/build/linux-2.6.35.3/include/linux/linkage.h:5: fatal error: asm/linkage.h: No such file or directory`   1. How I should configurate the driver compiling?   2. Is there some other way to do it for target linux. Mayby I'm not doing it the right way.


title: How can I get Apache working (complains about logfiles) on Ubuntu after a distribution upgrade?

text: I upgraded from Raring to Saucy, and it says it can't open listening sockets:               root@ip-10-250-42-219:/etc/apache2/sites-enabled# apache2ctl restart     [Tue Oct 22 13:34:05.187996 2013] [core:warn] [pid 1925] AH00117: Ignoring deprecated use of DefaultType in line 174 of /etc/apache2/apache2.conf.     httpd not running, trying to start     no listening sockets available, shutting down     AH00015: Unable to open logs     Action 'restart' failed.     The Apache error log may have more information.      How can I correct this? Nothing is listening on port 80. And I checked the log directory; /var/log/apache2 remains available. --EDIT-- After commenting out DefaultType, I tried to restart and got a somewhat simpler error message:               httpd not running, trying to start     no listening sockets available, shutting down     AH00015: Unable to open logs     Action 'restart' failed.     The Apache error log may have more information. My apache2.conf is below. It doesn't tell the whole story, as it doesn't include e.g. the sites-enabled directory contents, but here it is:               #     # Based upon the NCSA server configuration files originally by Rob McCool.     #     # This is the main Apache server configuration file.  It contains the     # configuration directives that give the server its instructions.     # See http://httpd.apache.org/docs/2.2/ for detailed information about     # the directives.     #     # Do NOT simply read the instructions in here without understanding     # what they do.  They're here only as hints or reminders.  If you are unsure     # consult the online docs. You have been warned.       #     # The configuration directives are grouped into three basic sections:     #  1. Directives that control the operation of the Apache server process as a     #     whole (the 'global environment').     #  2. Directives that define the parameters of the 'main' or 'default' server,     #     which responds to requests that aren't handled by a virtual host.     #     These directives also provide default values for the settings     #     of all virtual hosts.     #  3. Settings for virtual hosts, which allow Web requests to be sent to     #     different IP addresses or hostnames and have them handled by the     #     same Apache server process.     #     # Configuration and logfile names: If the filenames you specify for many     # of the server's control files begin with "/" (or "drive:/" for Win32), the     # server will use that explicit path.  If the filenames do *not* begin     # with "/", the value of ServerRoot is prepended -- so "foo.log"     # with ServerRoot set to "/etc/apache2" will be interpreted by the     # server as "/etc/apache2/foo.log".     #          ### Section 1: Global Environment     #     # The directives in this section affect the overall operation of Apache,     # such as the number of concurrent requests it can handle or where it     # can find its configuration files.     #          #     # ServerRoot: The top of the directory tree under which the server's     # configuration, error, and log files are kept.     #     # NOTE!  If you intend to place this on an NFS (or otherwise network)     # mounted filesystem then please read the LockFile documentation (available     # at <URL:http://httpd.apache.org/docs/2.2/mod/mpm_common.html#lockfile>);     # you will save yourself a lot of trouble.     #     # Do NOT add a slash at the end of the directory path.     #     #ServerRoot "/etc/apache2"          #     # The accept serialization lock file MUST BE STORED ON A LOCAL DISK.     #     # LockFile ${APACHE_LOCK_DIR}/accept.lock          #     # PidFile: The file in which the server should record its process     # identification number when it starts.     # This needs to be set in /etc/apache2/envvars     #     PidFile ${APACHE_PID_FILE}          #     # Timeout: The number of seconds before receives and sends time out.     #     Timeout 300          #     # KeepAlive: Whether or not to allow persistent connections (more than     # one request per connection). Set to "Off" to deactivate.     #     KeepAlive On          #     # MaxKeepAliveRequests: The maximum number of requests to allow     # during a persistent connection. Set to 0 to allow an unlimited amount.     # We recommend you leave this number high, for maximum performance.     #     MaxKeepAliveRequests 100          #     # KeepAliveTimeout: Number of seconds to wait for the next request from the     # same client on the same connection.     #     KeepAliveTimeout 5          ##     ## Server-Pool Size Regulation (MPM specific)     ##           # prefork MPM     # StartServers: number of server processes to start     # MinSpareServers: minimum number of server processes which are kept spare     # MaxSpareServers: maximum number of server processes which are kept spare     # MaxClients: maximum number of server processes allowed to start     # MaxRequestsPerChild: maximum number of requests a server process serves     <IfModule mpm_prefork_module>         StartServers          5         MinSpareServers       5         MaxSpareServers      10         MaxClients          150         MaxRequestsPerChild   0     </IfModule>          # worker MPM     # StartServers: initial number of server processes to start     # MinSpareThreads: minimum number of worker threads which are kept spare     # MaxSpareThreads: maximum number of worker threads which are kept spare     # ThreadLimit: ThreadsPerChild can be changed to this maximum value during a     #              graceful restart. ThreadLimit can only be changed by stopping     #              and starting Apache.     # ThreadsPerChild: constant number of worker threads in each server process     # MaxClients: maximum number of simultaneous client connections     # MaxRequestsPerChild: maximum number of requests a server process serves     <IfModule mpm_worker_module>         StartServers          2         MinSpareThreads      25         MaxSpareThreads      75          ThreadLimit          64         ThreadsPerChild      25         MaxClients          150         MaxRequestsPerChild   0     </IfModule>          # event MPM     # StartServers: initial number of server processes to start     # MinSpareThreads: minimum number of worker threads which are kept spare     # MaxSpareThreads: maximum number of worker threads which are kept spare     # ThreadsPerChild: constant number of worker threads in each server process     # MaxClients: maximum number of simultaneous client connections     # MaxRequestsPerChild: maximum number of requests a server process serves     <IfModule mpm_event_module>         StartServers          2         MinSpareThreads      25         MaxSpareThreads      75          ThreadLimit          64         ThreadsPerChild      25         MaxClients          150         MaxRequestsPerChild   0     </IfModule>          # These need to be set in /etc/apache2/envvars     User ${APACHE_RUN_USER}     Group ${APACHE_RUN_GROUP}          #     # AccessFileName: The name of the file to look for in each directory     # for additional configuration directives.  See also the AllowOverride     # directive.     #          AccessFileName .htaccess          #     # The following lines prevent .htaccess and .htpasswd files from being      # viewed by Web clients.      #     <Files ~ "^\.ht">         Order allow,deny         Deny from all         Satisfy all     </Files>          #     # DefaultType is the default MIME type the server will use for a document     # if it cannot otherwise determine one, such as from filename extensions.     # If your server contains mostly text or HTML documents, "text/plain" is     # a good value.  If most of your content is binary, such as applications     # or images, you may want to use "application/octet-stream" instead to     # keep browsers from trying to display binary files as though they are     # text.     #     #DefaultType text/plain               #     # HostnameLookups: Log the names of clients or just their IP addresses     # e.g., www.apache.org (on) or 204.62.129.132 (off).     # The default is off because it'd be overall better for the net if people     # had to knowingly turn this feature on, since enabling it means that     # each client request will result in AT LEAST one lookup request to the     # nameserver.     #     HostnameLookups Off          # ErrorLog: The location of the error log file.     # If you do not specify an ErrorLog directive within a <VirtualHost>     # container, error messages relating to that virtual host will be     # logged here.  If you *do* define an error logfile for a <VirtualHost>     # container, that host's errors will be logged there and not here.     #     ErrorLog ${APACHE_LOG_DIR}/error.log          #     # LogLevel: Control the number of messages logged to the error_log.     # Possible values include: debug, info, notice, warn, error, crit,     # alert, emerg.     #     LogLevel warn          # Include module configuration:     Include mods-enabled/*.load     Include mods-enabled/*.conf          # Include all the user configurations:     # Include httpd.conf          # Include ports listing     #Include ports.conf          #     # The following directives define some format nicknames for use with     # a CustomLog directive (see below).     # If you are behind a reverse proxy, you might want to change %h into %{X-Forwarded-For}i     #     LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined     LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined     LogFormat "%h %l %u %t \"%r\" %>s %O" common     LogFormat "%{Referer}i -> %U" referer     LogFormat "%{User-agent}i" agent          # Include of directories ignores editors' and dpkg's backup files,     # see README.Debian for details.          # Include generic snippets of statements     #Include conf.d/          # Include the virtual host configurations:     Include sites-enabled/     AddHandler php5-script .php     AddType text/html .php


title: Dovecot to ignore invalid email addresses

text: I have a server [Redmine] which sends notifications to users on the project and it happens that some of the user mails are not correct. The server puts everbody in the "To" or "Bcc" field depending on configuration. Is there any way to configure mail server so that when mail is sent to multiple users those non existent mail addresses are ignored. For instance               from:      to: existing_user1, existing_user2, non_existing_user     subject: ....      the message should be sent to all users apart from the last one. Currently, the server returns 5.1.1 User unknown


title: Can two files in a directory be on different filesystems

text: I'm implementing atomic writes (FWIW in Python on Linux & FreeBSD), and I'm writing to a temporary file in the same directory with the file I'm planning to write to (in order to ensure that they are on the same filesystem, and thus rename(2) succeeds and writes can be atomic). My question is that is there any condition where two files in the same directory be on different filesystems? (I am not following symlinks, so a file symlinked to another file on a different filesystem is not a problem for me).


title: Daily logRotate for apache at specific time

text: How can I execute logRotate daily at a specific time (3h30) each day? Specific details on how to do this would be appreciated. I'm on Debian.


title: Valgrind /usr/lib files are not regular Linux files

text: The problem that I encountered today (on an embedded device with Linux) is that some files (specifically, the Valgrind `/usr/lib` files) are behaving very strange and they are not copy-able with `scp` (error is: `not a regular file`). So:               $ ls -al /usr/lib/*valgrind*     drwxr-xr-x    2 root     root          4096 Sep 30 00:01 .     drwxr-xr-x   24 root     root         12288 Sep 30 00:00 ..     -rwxr-xr-x    1 root     root       1816444 Jun  6  2014 cachegrind-x86-linux     -rwxr-xr-x    1 root     root       1910732 Jun  6  2014 callgrind-x86-linux     -rw-r--r--    1 root     root         28429 Jun  6  2014 default.supp     -rwxr-xr-x    1 root     root       1884080 Jun  6  2014 drd-x86-linux     -rwxr-xr-x    1 root     root       1770688 Jun  6  2014 exp-bbv-x86-linux     -rwxr-xr-x    1 root     root       1852668 Jun  6  2014 exp-ptrcheck-x86-linux     -rwxr-xr-x    1 root     root       1910200 Jun  6  2014 helgrind-x86-linux     -rwxr-xr-x    1 root     root       1778880 Jun  6  2014 lackey-x86-linux     -rwxr-xr-x    1 root     root       1792524 Jun  6  2014 massif-x86-linux     -rwxr-xr-x    1 root     root       1942904 Jun  6  2014 memcheck-x86-linux     -rwxr-xr-x    1 root     root       1766560 Jun  6  2014 none-x86-linux     -rwxr-xr-x    1 root     root          2620 Jun  6  2014 vgpreload_core-x86-linux.so     -rwxr-xr-x    1 root     root         65296 Jun  6  2014 vgpreload_drd-x86-linux.so     -rwxr-xr-x    1 root     root         17904 Jun  6  2014 vgpreload_exp-ptrcheck-x86-linux.so     -rwxr-xr-x    1 root     root         37908 Jun  6  2014 vgpreload_helgrind-x86-linux.so     -rwxr-xr-x    1 root     root         15128 Jun  6  2014 vgpreload_massif-x86-linux.so     -rwxr-xr-x    1 root     root         26652 Jun  6  2014 vgpreload_memcheck-x86-linux.so      First of all, notice that they do not have "valgrind" string in their names. Then, they are shown as regular files (not pipes, not devices). But, very strangely, they are not found by simple `ls`:               $ ls -al /usr/lib/memcheck-x86-linux     ls: /usr/lib/memcheck-x86-linux: No such file or directory      They don't even show in the regular listing:               $ ls -al /usr/bin     (snipped)      What on Linux could cause that behaviour? More, there is no utility like "file" on the device, but I doubt that would help me much. Output of `df`:               $ df     Filesystem           1024-blocks    Used Available Use% Mounted on     /dev/root               980308    175548    754964  19% /     tmpfs                    10240       112     10128   1% /dev     tmpfs                   246728         0    246728   0% /tmp     tmpfs                     2048        12      2036   1% /var/log     tmpfs                   246728       128    246600   0% /dev/shm     tmpfs                   246728         0    246728   0% /run     tmpfs                   246728        20    246708   0% /var/run      So, `/` is a device. And:               $ whoami     root      So, I am root. Just to complete the puzzle:               $ ls -al /dev/root     ls: /dev/root: No such file or directory      So the device that is mapped does not really exist.


title: Why writing to /dev/random does not make parallel reading from /dev/random faster?

text: Typically reading from `/dev/random` produces 100-500 bytes and blocks, waiting for an entropy to be collected. Why doesn't writing information to `/dev/random` by other processes speed up reading? Shouldn't it provide the required entropy? It can be useful for unblocking `gpg` or similar software without restarting it and re-entering everything, for generating non-super-top-secret keys, etc.


title: Bash : command line with optional arguments

text: I'm running this kind of code:               #!/usr/bin/env bash     set -u     exclude1='--exclude=/path/*'     exclude2='--exclude=/path with spaces/*'     exclude3=''        # any 'exclude' can be empty     tar -czf backup.tgz "$exclude1" "$exclude2" "$exclude3" 2>&1 | grep -i 'my_reg_exp' > error.log     RESULT=("${PIPESTATUS[@]}")     ... etc ...      When I run this code, I get this error:               tar: : Cannot stat: No such file or directory      This is because "$exclude3" is translated as an empty argument. Exactly as if I did this:               tar -czf backup.tgz "$exclude1" "$exclude2" ''      One way to avoid this error is to remove the double quotes around $excludeX. But this is a problem if $excludeX contains any space or other strange characters. Another way would be to use `eval` but because I need to keep the double quotes, I don't see how to suppress the quotes AND the empty arguments when needed. The only solution I found is to construct the command-line with string concatenation:               CMD='tar -czf backup.tgz'     if [[ -n "$exclude1" ]]; then CMD+=" \"$exclude1\" "; fi     if [[ -n "$exclude2" ]]; then CMD+=" \"$exclude2\" "; fi     if [[ -n "$exclude3" ]]; then CMD+=" \"$exclude3\" "; fi     eval $CMD 2>&1 | grep -i 'my_reg_exp' > error.log     RESULT=("${PIPESTATUS[@]}")     ... etc ...      Anyone have a smarter idea?


title: How do I mount a CloneCD .img file?

text: CloneCD is proprietary. I have a bunch of images that were created with in. Inside of the `.CCD` file it says.               [CloneCD]     Version=3      How do I mount this?


title: How to configure FOSS ATI drivers on Debian Wheezy and ATI RS880 [Radeon HD 4250]?

text: Installed a fresh Debian Wheezy to enjoy Gnome 3 but it starts in fallback mode. I suppose that's because the loaded drivers do not support 3D acceleration. Installed packages I know are relevant:   * `xserver-xorg-video-ati`   * `libgl1-mesa-dri` The Gnome 3 was working fine with Ubuntu 12.04, and I belive it was using the FOSS drivers. Interestingly there is no `/etc/X11/xorg.conf` and when I try to generate it with `Xorg -configure` I get:               X.Org X Server 1.12.1     Release Date: 2012-04-13     X Protocol Version 11, Revision 0     Build Operating System: Linux 3.2.0-2-amd64 x86_64 Debian     Current Operating System: Linux blackwhisper 3.2.0-2-amd64 #1 SMP Mon Apr 30 05:20:23 UTC 2012 x86_64     Kernel command line: BOOT_IMAGE=/vmlinuz-3.2.0-2-amd64 root=UUID=e6f57a36-19aa-4dfc-9b61-32d5e08abcc6 ro quiet     Build Date: 07 May 2012  12:15:23AM     xorg-server 2:1.12.1-2 (Cyril Brulebois <kibi@debian.org>)      Current version of pixman: 0.24.4         Before reporting problems, check http://wiki.x.org         to make sure that you have the latest version.     Markers: (--) probed, (**) from config file, (==) default setting,         (++) from command line, (!!) notice, (II) informational,         (WW) warning, (EE) error, (NI) not implemented, (??) unknown.     (==) Log file: "/var/log/Xorg.0.log", Time: Sat May 19 20:15:31 2012     List of video drivers:         mga         ...MANYMORE         radeon         ...MANYMORE         ati         ...MANYMORE         vesa     (++) Using config file: "/root/xorg.conf.new"     (==) Using system config directory "/usr/share/X11/xorg.conf.d"     (II) [KMS] No DRICreatePCIBusID symbol, no kernel modesetting.     Number of created screens does not match number of detected devices.       Configuration failed.     Server terminated with error (2). Closing log file.      **ADDITION** I found now at the message boot:               [    8.121829] [drm] Loading RS780 Microcode     [    8.156063] r600_cp: Failed to load firmware "radeon/RS780_pfp.bin"     [    8.156092] [drm:r600_startup] *ERROR* Failed to load firmware!


title: Installing linux source

text: My distro(Crunchbang) was missing the source files and only the header files were present. So I installed the Linux source using:               $ sudo apt-get install linux-source      After the completion of download there were two new tar files under /usr/src/ directory:   * linux-patch-3.2-rt.patch.bz2   * linux-source-3.2.tar.bz2 I don't know how to proceed further. Is it okay to just unpack the source(second tar file) and move it under /usr/src/ ? I would like to have the documentation files present on my distro since it's missing. Apparently it only has the header files. I read somewhere that the documentation files are in the kernel source.


title: How to Reset/Cycle Power to a PCIe Device?

text: I have a PCIe device that only works correctly when the computer is fully powered off then on again. Issuing a simple `reboot` or `reboot -p` command does not appear to cycle the power to the PCIe card, which causes it not to work after the reboot. Is there a way to, from the OS, cycle power to a device in a PCIe slot? I can find it in `/sys/bus/pci/devices/0000*/`, but I can't figure out how to properly reset the board. Toggling power seems to be the only way. Barring that, can I change a setting somewhere that will cause a full power cycle on a `reboot` command? I'm running Ubuntu 12.10 by the way.


title: ffmpeg could not open file.mpg

text: When I want to convert a video with the following command:               ffmpeg -i file.wmv -sameq file.mpg      it ends with this error message:               FFmpeg version SVN-r0.5.1-4:0.5.1-1ubuntu1.1, Copyright (c) 2000-2009 Fabrice Bellard, et al.   configuration:     --extra-version=4:0.5.1-1ubuntu1.1 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --disable-stripping --disable-vhook --enable-runtime-cpudetect --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394 --enable-shared --disable-static   libavutil     49.15. 0 / 49.15. 0   libavcodec    52.20. 1 / 52.20. 1   libavformat   52.31. 0 / 52.31. 0  libavdevice   52. 1. 0 / 52. 1. 0   libavfilter    0. 4. 0 /  0. 4. 0  libswscale     0. 7. 1 /  0. 7. 1   libpostproc   51. 2. 0 / 51. 2. 0  built on Mar 31 2011 18:53:20, gcc: 4.4.3 [wmv3 @ 0x82dbc50]Extra data: 8 bits left, value: 0          Seems stream 1 codec frame rate differs from container frame rate:     1000.00 (1000/1) -> 30.00 (30/1) Input #0, asf, from 'file.wmv':   Duration: 00:16:53.68, start: 3.065000, bitrate: 3827 kb/s         Stream #0.0: Audio: 0x0162, 44100 Hz, stereo, s16, 48 kb/s         Stream #0.1: Video: wmv3, yuv420p, 1920x1080, 3750 kb/s, 30 tbr, 1k tbn, 1k tbc Could not open 'file.mpg'      What is wrong? How can I fix it?


title: How to match group 1 in a regex followed by a 0 rather than matching group 10

text: In regex plugin of gedit, I use a regex to match/search and another for substitution. In the matching regex, I only have one group. In the substitution regex, I use \1 to refer to the group, and I also like to add a zero right behind \1, but \10 will change to mean the 10th group in matching regex. So I was wondering how to solve this problem? For example, in my original text there are cases where `0` is misinput as `o`, such as `12o` should be `120`. My matching regex is `(\d+)o`, and my substitution regex is `\10` which is not right.


title: How to optimize Arch linux boot time?

text: I've had Arch Linux installed on my system for a while now, but the problem is that it takes way too much time to boot. And so, I'm trying to optimize the boot process. A Google search led me to `quick-init` but the its' AUR page says its out-of-date. So, I just want to make sure if I should use this? Or are there any other ways?


title: What is meant by cache aliasing?

text: What is the meant by cache aliasing? I searched around some, but wasn't satisfied with the answers I found. I also saw two associated terms, instruction cache aliasing & data cache aliasing. What's the difference between those?


title: Where does top / gnome-system-monitor get its information about cpu usage?

text: I am curious where gnome-system-monitor and top (the command line tool) get their information about the CPU usage in %. Could you please explain it to me?


title: When a process will go to 'D' state?

text: I'm using "Linux hostname 2.6.28-15-generic #49-Ubuntu SMP Tue Aug 18 18:40:08 UTC 2009 i686 GNU/Linux" All the client machines will use Thin-client ,I will use my laptop for working and I will mount my home directory from server to my laptop. If I open the firefox in my laptop the firefox window will not open because the process is in 'D' state, and all other users machines got hang up and the lockd process is in 'D' state, ps ajx | grep firefox               1  6187  4313  4313 ?   -1 D<    1030   3:16 /usr/lib/firefox-3.5b4pre/firefox-3.5             7610  7622  7621  7610 pts/3      7621 S+    1030   0:00 grep firefox      if I check the syslog > Jul 13 10:35:56 hostname kernel: [222583.872059] lockd: cannot monitor > laptop > > Jul 13 10:35:57 hostname kernel: [222583.872059] lockd: cannot monitor > laptop ps ajx | grep lockd > root 9178 0.0 0.0 0 0 ? D< 13:35 0:00 [lockd] > > root 11039 0.0 0.0 3340 796 pts/3 S<+ 14:18 0:00 grep lockd The same message for all the client machines. When a process will goes to 'D' state? When the lockd process will go to 'D' state? What is the purpose of lockd process.


title: Move to trash confirm box

text: I am using Fedora 14 (Laughlin) with GNOME 2.32.0. I have gconf-editor installed. In gconf-editor apps->nautilus->preference confirm_trash is enabled i.e., checked, also in nautilus file browser, home folder, Edit->Preference->Behaviour "Ask before emptying the Trash or deleting files" is checked. But I am not getting any confirm box while deleting any file or folder. I googled for the solution but came up with nothing. Is this a Bug? Is it solvable? Thank you.


title: How to startup FreeBSD in console mode

text: I have recently installed a VMware image of FreeBSD, although when I boot up I get the message: Welcome to DesktopBSD, select from the following options: http://i.imgur.com/VWahL.gif The trouble is when selecting options 1 - 4 I get the GUI and am unable to login as root, as its disabled in these modes. How can I effectively exit and go into console mode, so I can login as root?


title: Automatic kerberos ticket initialization on login

text: I'm using `ksshaskpass` to add my password protected keys into `ssh-agent` upon logging into KDE, is there something similar for kerberos?


title: "openssl dgst -sha1" producing an extraneous "(stdin)= " prefix and trailing newline

text: If you run this command on your Unix               echo -n "foo" | openssl dgst -sha1      You will get this output:               (stdin)= 0beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a33      (followed by a newline). How can I force openssl to not show the `(stdin)=` prefix, and avoid the trailing newline?


title: How can I set which is the main account for a meta-contact in Empathy?

text: Empathy allows users to combine contacts together and create what is called a " _meta-contact_ ". So if you have a contact that uses different protocols, eg. GTalk and MSN, you can combine them together into one contact. Then, when the user starts a chat with the meta-contact, Empathy automatically selects to use the account (contact) that appears to be online most of the time. It is very easy to set up a meta-contact. One has to simply right click on one of their contacts and click "Link contacts..." and then select from his buddy list the other contact(s) that wants to be linked with that. I was wondering if there is a way to specifically set which account appears "dominant" in the meta-contact. Note that in the buddy list, this affects the visible name of the meta-contact. Thank you for any enlightment! PS: Please someone, add the tag "/empathy" if possible as me, being a newbie can't create tags yet :)


title: pgrep and pkill alternatives on mac os x?

text: Are there alternatives to `pgrep` and `pkill` commands on Mac OS X or should I just create aliases for them using other commands available for me?


title: How do you change the color for all the items in the status bar in the i3 WM?

text: In the _i3_ window manager you have this status bar. The configuration to enable the bar and tell it which file to load for it is in the `~/.i3/config` file. This points to `/etc/i3status.conf` which contains the following to match the font color I use in my terminal emulator:               general {        colors = true        color_good = "#00A5FF" #some neon blue        color_degraded = "#006298"        color_bad = "#FF0000"        output_format = i3bar        interval = 5     }      If I enable a status element which doesn't work in my case - for instance _ipv6_ - it accordingly displays in red. But why are the rest of the statuses all appearing in white and not in blue like I specified? Isn't _color_good_ the default color?


title: Which tasks to learn and which books to read to become more skilled at Unix/Linux internals?

text: I recently interviewed at a major company and did well on programming questions such as:   * "What is the time complexity of quicksort?    * What is the opposite in C of malloc?    * What is the opposite in C++ of new?    * What is the first argument in a Python function?" However, I couldn't answer many of the networking / operating system questions so I wonder how to fill this gap. I plan to read the book "Operating Systems" by Tanenbaum and I wonder even though SO is not a recommendation engine in this case if you can tell me other pointers or concrete recommendation how to practice linux/unix internals besides using a linux system in most ways I can and studying the aformentioned book? I read this thread which is basically a duplicate of my questions Recommended reading to better understand unix/linux internals And I therefore have ordered the book "The Unix Programming Environment" even though it is old. Any other advice / answer / comment? Maybe about 1) which tasks to perform to become more knowledgable about linux / unix internals. Thanks


title: What makes grep consider a file to be binary?

text: I have some database dumps from a Windows system on my box. They are text files. I'm using cygwin to grep through them. These appear to be plain text files; I open them with text editors such as notepad and wordpad and they look legible. However, when I run grep on them, it will say `binary file foo.txt matches`. I have noticed that the files contain some ascii `NUL` characters, which I believe are artifacts from the database dump. So what makes grep consider these files to be binary? The `NUL` character? Is there a flag on the filesystem? What do I need to change to get grep to show me the line matches?


title: Non-interactive configuration of linux kernel

text: Is there any method to configure linux kernel in such way (just an example): `make config CONFIG_OPTION=y && make config CONFIG_OPTION1=no CONFIG_OPTION3=64 CONFIG_OPTION4=/path/` and all the dependencies and alternatives of these configuration options will be set automatically in non-interactive mode.


title: errors from Windows clients accessing printer via Samba despite CUPS working

text: On CentOS 6.4 (newdc), I have CUPS 1.4.2-50.el6_4.5 installed, can access its web interface. There I set up our main shared printer, an OCE Imagistics cm2520, and successfully printed a test page. With SerNet Samba 4.0.9 on the same box configured every which example way I could find, I cannot seem to get it to the point where double-clicking the printer in Windows (W2K3, OLDDC) opens up the print queue (as it does from \olddc). The closest I get, by manually defining the printer in smb.conf, is that it shows up in \newdc in Windows Explorer, but double-clicking the BackOfficeCopier printer gives this error:               ---------------------------     Printers     ---------------------------     Operation could not be completed. Either the printer name was typed incorrectly, or the specified printer has lost its connection to the server.  For more information, click Help.     ---------------------------     OK   Help     ---------------------------      If I double-click the "printers" share, I get:               ---------------------------     \\newdc     ---------------------------     \\newdc\printers is not accessible. You might not have permission to use this network resource. Contact the administrator of this server to find out if you have access permissions.          Incorrect function.          ---------------------------     OK     ---------------------------      Neither of these causes an entry to appear in log.samba. However, double- clicking on Printers and Faxes shows me a folder containing just "Add Printer" and generates this log entry in log.samba:               [2013/08/23 09:18:39.921226,  0] ../source4/smb_server/smb/service.c:127(make_connection)       make_connection: couldn't find service ::{2227A280-3AEA-1069-A2DE-08002B30309D}: NT_STATUS_OBJECT_NAME_NOT_FOUND     [2013/08/23 09:18:39.935896,  0] ../source4/rpc_server/spoolss/dcesrv_spoolss.c:1189(dcesrv_spoolss_RemoteFindFirstPrinterChangeNotifyEx)       unable to call back to \\OLDDC     [2013/08/23 09:18:39.952321,  0] ../source4/rpc_server/spoolss/dcesrv_spoolss.c:1189(dcesrv_spoolss_RemoteFindFirstPrinterChangeNotifyEx)       unable to call back to \\OLDDC      If I then try "Add Printer" and click Next, my only choice is the top one and there are no ports listed. Trying "Next" again at that point just gives:               ---------------------------     Add Printer Wizard     ---------------------------     Operation could not be completed.     ---------------------------     OK     ---------------------------      About the first error, the queue name in CUPS is OCE, and in smb.conf I have this:               [global]             workgroup = MYDOMAIN             realm = mydomain.lan             netbios name = NEWDC             server role = active directory domain controller             server services = rpc, nbt, wrepl, ldap, cldap, kdc, drepl, winbind, ntp_signd, kcc, dnsupdate, smb, dns             allow dns updates = true             dns forwarder = 192.168.1.1     #        dns recursive queries = yes             dcerpc endpoint servers = epmapper, wkssvc, rpcecho, samr, netlogon, lsarpc, spoolss, drsuapi, dssetup, unixinfo, browser, eventlog6, backupkey, dnsserver, winreg, srvsvc     #       dcerpc endpoint servers = winreg srvsvc             load printers = yes             printing = cups     printcap name = cups          [netlogon]             path = /var/lib/samba/sysvol/mydomain.lan/scripts             read only = No          [sysvol]             path = /var/lib/samba/sysvol             read only = No          [printers]          comment = All Printers          path = /var/spool/samba/             guest ok = Yes          browseable = Yes          read only = No          printable = Yes             create mask = 0700          [print$]          comment = Point and Print Printer Drivers          path = /var/lib/samba/printing          read only = No          [BackOfficeCopier]          path = /var/spool/samba/          browseable = yes          printable = yes          printer name = OCE          [mytest]             path = /home/srv/samba-test-share             read only = No      As far as ACL goes for the second error, etc.:               $ sudo ls -l /var/spool/     ...     drwxrwxrwt.  2 root   root   4096 Aug 15 18:10 samba          $ sudo ls -l /var/lib/samba/     ...     drwxr-xr-x.  4 root root    4096 Aug 22 22:19 printing      I copied everything from \olddc\print$ to \newdc\print$ before chmodding printing back to 755. I followed the HOWTO. CUPS set up my printer correctly. Permissions seem to be right. What am I missing?


title: wget command not working in cronjob

text: here is my command :               wget -c -O /home/alireza/Desktop/1.mkv http://mysite.com/myfile      and here is my `/etc/crontab` file :               SHELL=/bin/bash          PATH=/sbin:/bin:/usr/sbin:/usr/bin          MAILTO=root     HOME=/     0 2 * * * root wget -c -O /home/alireza/Desktop/1.mkv http://mysite.com/myfile      I want to run my wget command on 2:00 AM by crontab and it never runs,I dont know whats the problem. the command works fine on command line . is there any problem to run wget command on crontab ? UPDATE :: Im using centos 6.4


title: Make zsh show autocomplete choices even when a possible match is entered

text: On my current system (openSUSE 12.3 with zsh 5.0.2) the autocomplete function does not give me a choice of possible completions if I have already entered a possible completion match. For example, if I am in a directory with two files named _file_ and _file2_ and I type:               cat file<TAB>      Then a space will be appended, and I will have no indication that _file2_ was also a possible match. Is it possible to change this behaviour? Bash behaves better in this case (it will show both _file_ and _file2_ without adding a space), but any solution that does not hide possible matches would also be interesting.


title: dpkg won`t install any package

text: I`m in deep trouble with my Ubuntu 13.04. Ubuntu stopped support of 13.04 so I added wheezy repository to sources.list then upgraded my system. After then I can neither install any package nor upgrade my system. I tried lots of things like apt-get install -f with no luck. I open my comp through live USB and chroot to broken system. I keep getting following long error message when I try to install a package                 The following extra packages will be installed:   util-linux     Suggested packages:   util-linux-locales kbd console-tools The     following NEW packages will be installed:   util-linux 0 upgraded, 1     newly installed, 0 to remove and 0 not upgraded. 10 not fully     installed or removed. Need to get 0 B/618 kB of archives. After this     operation, 1,590 kB of additional disk space will be used. Do you     want to continue [Y/n]?  Preconfiguring packages ... (Reading     database ... 588796 files and directories currently installed.)     Unpacking util-linux (from     .../util-linux_2.20.1-5.1ubuntu8.1_i386.deb) ... initctl: Unknown     job: K02screen-cleanup insserv: warning: script 'K02screen-cleanup'     missing LSB tags and overrides insserv: warning: script     'K02acpi-support' missing LSB tags and overrides initctl: Unknown     job: K02screen-cleanup initctl: Unknown job: S02screen-cleanup     insserv: Script martian is broken: incomplete LSB comment. insserv:     missing `Required-Start:' entry: please add even if empty. insserv:     missing `Required-Stop:'  entry: please add even if empty. insserv:     missing `Default-Stop:'   entry: please add even if empty. initctl:     Unknown job: S02screen-cleanup insserv: Script martian is broken:     incomplete LSB comment. insserv: missing `Required-Start:' entry:     please add even if empty. insserv: missing `Required-Stop:'  entry:     please add even if empty. insserv: missing `Default-Stop:'   entry:     please add even if empty. initctl: Unknown job: S02screen-cleanup     insserv: Script martian is broken: incomplete LSB comment. insserv:     missing `Required-Start:' entry: please add even if empty. insserv:     missing `Required-Stop:'  entry: please add even if empty. insserv:     missing `Default-Stop:'   entry: please add even if empty. initctl:     Unknown job: S02screen-cleanup insserv: Script martian is broken:     incomplete LSB comment. insserv: missing `Required-Start:' entry:     please add even if empty. insserv: missing `Required-Stop:'  entry:     please add even if empty. insserv: missing `Default-Stop:'   entry:     please add even if empty. initctl: Unknown job: K02screen-cleanup     initctl: Unknown job: S02procps insserv: warning: script 'S02procps'     missing LSB tags and overrides initctl: Unknown job: S01udev     insserv: warning: script 'S01udev' missing LSB tags and overrides     insserv: Script martian is broken: incomplete LSB comment. insserv:     missing `Required-Start:' entry: please add even if empty. insserv:     missing `Required-Stop:'  entry: please add even if empty. insserv:     missing `Default-Stop:'   entry: please add even if empty. insserv:     Default-Stop  undefined, assuming empty stop  runlevel(s) for script     `martian' insserv: warning: script 'network-interface-security'     missing LSB tags and overrides insserv: Default-Start undefined,     assuming empty start runlevel(s) for script     `network-interface-security' insserv: Default-Stop  undefined,     assuming empty stop  runlevel(s) for script     `network-interface-security' insserv: warning: script     'plymouth-splash' missing LSB tags and overrides insserv:     Default-Start undefined, assuming empty start runlevel(s) for script     `plymouth-splash' insserv: Default-Stop  undefined, assuming empty     stop  runlevel(s) for script `plymouth-splash' insserv: warning:     script 'plymouth' missing LSB tags and overrides insserv:     Default-Start undefined, assuming empty start runlevel(s) for script     `plymouth' insserv: Default-Stop  undefined, assuming empty stop      runlevel(s) for script `plymouth' insserv: warning: script     'plymouth-ready' missing LSB tags and overrides insserv:     Default-Start undefined, assuming empty start runlevel(s) for script     `plymouth-ready' insserv: Default-Stop  undefined, assuming empty     stop  runlevel(s) for script `plymouth-ready' insserv: warning:     script 'screen-cleanup' missing LSB tags and overrides insserv:     warning: script 'squid3' missing LSB tags and overrides insserv:     Default-Start undefined, assuming empty start runlevel(s) for script     `squid3' insserv: Default-Stop  undefined, assuming empty stop      runlevel(s) for script `squid3' insserv: warning: script     'networking' missing LSB tags and overrides insserv: Default-Start     undefined, assuming empty start runlevel(s) for script `networking'     insserv: Default-Stop  undefined, assuming empty stop  runlevel(s)     for script `networking' insserv: warning: script     'udev-fallback-graphics' missing LSB tags and overrides insserv:     Default-Start undefined, assuming empty start runlevel(s) for script     `udev-fallback-graphics' insserv: Default-Stop  undefined, assuming     empty stop  runlevel(s) for script `udev-fallback-graphics' insserv:     warning: script 'network-interface' missing LSB tags and overrides     insserv: Default-Start undefined, assuming empty start runlevel(s)     for script `network-interface' insserv: Default-Stop  undefined,     assuming empty stop  runlevel(s) for script `network-interface'     insserv: warning: script 'plymouth-log' missing LSB tags and     overrides insserv: Default-Start undefined, assuming empty start     runlevel(s) for script `plymouth-log' insserv: Default-Stop      undefined, assuming empty stop  runlevel(s) for script     `plymouth-log' insserv: warning: script 'udevtrigger' missing LSB     tags and overrides insserv: Default-Start undefined, assuming empty     start runlevel(s) for script `udevtrigger' insserv: Default-Stop      undefined, assuming empty stop  runlevel(s) for script `udevtrigger'     insserv: warning: script 'nagios' missing LSB tags and overrides     insserv: warning: script 'rsyslog' missing LSB tags and overrides     insserv: Default-Start undefined, assuming empty start runlevel(s)     for script `rsyslog' insserv: Default-Stop  undefined, assuming     empty stop  runlevel(s) for script `rsyslog' insserv: warning:     script 'kmod' missing LSB tags and overrides insserv: Default-Start     undefined, assuming empty start runlevel(s) for script `kmod'     insserv: Default-Stop  undefined, assuming empty stop  runlevel(s)     for script `kmod' insserv: warning: script 'procps' missing LSB tags     and overrides insserv: Default-Stop  undefined, assuming empty stop      runlevel(s) for script `procps' insserv: warning: script 'mongodb'     missing LSB tags and overrides insserv: Default-Start undefined,     assuming empty start runlevel(s) for script `mongodb' insserv:     Default-Stop  undefined, assuming empty stop  runlevel(s) for script     `mongodb' insserv: warning: script 'avahi-daemon' missing LSB tags     and overrides insserv: Default-Start undefined, assuming empty start     runlevel(s) for script `avahi-daemon' insserv: Default-Stop      undefined, assuming empty stop  runlevel(s) for script     `avahi-daemon' insserv: warning: script 'plymouth-stop' missing LSB     tags and overrides insserv: Default-Start undefined, assuming empty     start runlevel(s) for script `plymouth-stop' insserv: Default-Stop      undefined, assuming empty stop  runlevel(s) for script     `plymouth-stop' insserv: warning: script 'udev' missing LSB tags and     overrides insserv: Default-Stop  undefined, assuming empty stop      runlevel(s) for script `udev' insserv: warning: script     'acpi-support' missing LSB tags and overrides insserv: warning:     script 'udev-finish' missing LSB tags and overrides insserv:     Default-Start undefined, assuming empty start runlevel(s) for script     `udev-finish' insserv: Default-Stop  undefined, assuming empty stop      runlevel(s) for script `udev-finish' insserv: warning: script     'network-interface-container' missing LSB tags and overrides     insserv: Default-Start undefined, assuming empty start runlevel(s)     for script `network-interface-container' insserv: Default-Stop      undefined, assuming empty stop  runlevel(s) for script     `network-interface-container' insserv: warning: script     'plymouth-upstart-bridge' missing LSB tags and overrides insserv:     Default-Start undefined, assuming empty start runlevel(s) for script     `plymouth-upstart-bridge' insserv: Default-Stop  undefined, assuming     empty stop  runlevel(s) for script `plymouth-upstart-bridge'     insserv: warning: script 'udevmonitor' missing LSB tags and     overrides insserv: Default-Start undefined, assuming empty start     runlevel(s) for script `udevmonitor' insserv: Default-Stop      undefined, assuming empty stop  runlevel(s) for script `udevmonitor'     insserv: There is a loop between service tlp and nagios if stopped     insserv:  loop involving service nagios at depth 2 insserv:  loop     involving service tlp at depth 1 insserv: Stopping nagios depends on     tlp and therefore on system facility `$all' which can not be true!     insserv: exiting now without changing boot order! update-rc.d:     error: insserv rejected the script header dpkg: error processing     /var/cache/apt/archives/util-linux_2.20.1-5.1ubuntu8.1_i386.deb     (--unpack):  subprocess new pre-installation script returned error     exit status 1 Errors were encountered while processing:      /var/cache/apt/archives/util-linux_2.20.1-5.1ubuntu8.1_i386.deb E:     Sub-process /usr/bin/dpkg returned an error code (1)      How can I recover my system? > dpkg --audit The following packages have been unpacked but not yet > configured. They must be configured using dpkg --configure or the configure > menu option in dselect for them to work: initramfs-tools tools for > generating an initramfs module-init-tools transitional dummy package > (module-init-tools to kmod) procps /proc file system utilities ifupdown high > level tools to configure network interfaces mountall filesystem mounting > tool kmod tools for managing Linux kernel modules plymouth graphical boot > animation and logger - main package upstart event-based init daemon > initscripts scripts for initializing and shutting down the system udev rule- > based device node and kernel event manager ========================================================================


title: Problems with sound in Linux Mint 15 on video

text: **Problem:** I think you'll enjoy this fun problem. I set-up a dev/media server. Steps to reproduce:   1. Start up any video file (with Banshee or VLC or xfce player - doesn't matter) -- all is well. Sound plays properly.   2. Pause the file. Unpause. Sound stops and there is no way of bringind it back. That's problem nr 1. Now after playing this file, try to start up another video file:   * Play another file in Banshee/Integrated/XBMC. There is no sound.    * Play another file in VLC, you'll get get a ~0.2s looping white noise instead of the sound. Also, when changing the VLC volume by mouse or keyboard (in steps), it will temporarily change the volume (for like 1s) and the revert back to 87%. When changind the volume by the VLC slider, the volume stays at that level. **And the most interesting thing:** If I play another audio application (tested only with a browser playing Grooveshark) before opening the second file, the sound will be proper (with the aforementioned pause caveat). This has no effect on the pause bug (i.e. pausing the video, then playing other audio with the browser and unpausing does **not** fix the sound). **Config:**   * Mainboard: FM2-A75IA   * CPU: A10 5800K (with Radeon HD 7660D)   * OS: Linux Mint 15 with Xfce or straight up XBMC 13   * Latest ATI catalyst drivers - stable (13.4)   * Display: A 42 inch Panasosic plasma connected via HDMI


title: generate a hyperlinked table of contents and insert into existing PDF

text: I have an existing PDF (without any corresponding source file), and a text file which is a list of items referencing sections within the PDF file, along with a page number for each item. I would like to generate a new PDF which starts with a generated table of contents index, followed by the contents of the original PDF. The generated index needs to be hyperlinked so that clicking on any item will automatically jump to the page containing the referenced section. I'm looking for a suitable set of tools (preferably CLI-oriented) to accomplish this on Linux; all the tools I've looked at so far don't seem to offer a solution. I'm an experienced programmer, and am more than happy to write code if required (preferably in Ruby/Python/Perl/shell) to parse my text file and convert it into a hyperlinked index, but I can't find the right tools to solve it. I think part of the problem is that the hyperlinks need to point to within the same file, but their targets won't exist until later when the ToC is joined with the original PDF. I'm also familiar with various markup languages, e.g. Markdown, reStructuredText, TeX, LaTeX, org-mode, and an ideal solution would use one of these as an intermediate step for generating the hyperlinked ToC.


title: proper configuration of visudo NOPASSWD for bash backup script

text: The abstract question is: If script `x` calls program `y`, do I need a NOPASSWD entry in /etc/sudoers for `x`, `y` or both `x` & `y`? (And can `x` then call `sudo -v` without a password?) **Details:** I'm trying to figure out what should go into the /etc/sudoers file to allow a user on Ubuntu (i.e., user ID 1000 who has sudo privileges) to execute a pre- configured full backup without entering a password. My backup script is: `/usr/local/bin/backup`   (See below for script.) The actual backup program called by my script is `/opt/storeBackup/bin/storeBackup.pl`   (See http://storebackup.org/) I tried several approaches with `visudo` but regardless of what I tried, I was still prompted for the password when running the script. I expected that adding a final line to /etc/sudoers (using visudo) like the following would work:               myuser ALL=(ALL) NOPASSWORD:/usr/local/bin/backup      That didn't work. Neither did this:               myuser ALL=(ALL) NOPASSWORD:/usr/local/bin/backup, /opt/storeBackup/bin/storeBackup.pl      Is the problem due to my script calling `sudo -v` near the beginning? Or is something else the problem? To execute the following script, I expect the user to open a terminal and type `backup`. I want it to be that simple and I don't want them to be prompted for a password at all.               #!/bin/bash          sudo -v     # Keep-alive: update existing sudo time stamp if set, otherwise do nothing.     while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &          #do a bunch of stuff that could take a while...          #finally, do backup without asking for password:     sudo /opt/storeBackup/bin/storeBackup.pl -f backup.conf      Thanks


title: How to get total number of bytes/sectors/blocks written to disk since booting?

text: I'm considering and update from HDD to SSD. But since Flash cells can only sustain limited writes. I want to know how much data my computer write during normal operation. So I can determine how long lifetime I can expect from the SSD. Is it possible to get (rough) numbers somehow?


title: How to turn off color with `ls`?

text: It is normally nice to have color output from `ls`, `grep`, etc. But when you don't want it, is there a switch that can turn it off? `ls -G` turns it on (with BSD-derived versions of `ls`) if it's not the default, but `ls +G` does not turn it off. Is there anything else that will?


title: Explanation for background tasks on bash

text: First, I write a simple PHP script               <?php     while(true)       {         echo 'hey'.PHP_EOL;         sleep(1);       }      Then I run it like:               php test.php &      Obviously goes into background, but keeps running and prints `hey` repeatedly. Now run it like:               php test.php      and hit `Ctrl+Z` while it is running. It goes into background but stops running. Why stop running? How to keep it running while it goes into background? Think of time when you run something and in the middle of it, you realize you should do something real quick.


title: Determine users of nearby machine from CLI

text: Ok, so at my house I have three computers, and I frequently enjoy using `ssh` and `scp` to run commands that allow me to do wonderful things. Primarily transferring downloaded files, and running media remotely (music, video etc.). Usually I use the `arp -a` command to determine which other computers are on my network, but this only shows the local IP's. I often forget the **users** that exist on my other machines, and I would like to be able to: **have a command that shows me the users of a remote computer either by network or IP address**


title: How is it that missing 0s are automatically added in IP addresses? (`ping 10.5` equivalent to `ping 10.0.0.5`)

text: I accidentally typed               ssh 10.0.05      instead of               ssh 10.0.0.5      and was very surprised that it worked. I also tried `10.005` and `10.5` and those also expanded automatically to `10.0.0.5`. I also tried `192.168.1` and that expanded to `192.168.0.1`. All of this also worked with `ping` rather than `ssh`, so I suspect it would work for many other commands that connect to an arbitrary user-supplied host. Why does this work? Is this behavior documented somewhere? Is this behavior part of POSIX or something? Or is it just some weird implementation? (Using Ubuntu 13.10 for what it's worth.)


title: How to extract boot.img?

text: I am trying to see the content in a `boot.img` file from an Android image. I googled and got http://javigon.com/category/development-tools/ to extract `system.img`. But it doesn't work for `boot.img`. When trying to do this for `boot.img`, it is showing the following:               Invalid sparse file format at header magi     Failed to read sparse file      Is `simg2img` used only for extracting `system.img`?   1. If so, Is there any other method to extract `boot.img`?   2. If not, what is the problem for not extracting `boot.img`?


title: whiptail or dialog

text: I am going to create script which will use user input, so I decided to use whiptail, but little bit confuse that which one is portable and will work in ubuntu 10.x and higher and CentOs5.x and higher. I know `read`, but I want dialog like tool, so if anybody know any alternative just let me know.


title: Partitioning EFI machine with two SSD disks in mirror

text: I have two SSD disks, I want to put them in a software mirror RAID. But whatever I do the OpenSuSe installation keeps telling me that due to the partitioning scheme he won't be able to install the bootloader. How should I partition the disks? Also what block sizes should I use for the raid? I tried the following:               ssd1 -> FAT EFI (256MB)          -> Raid 1/2 mirror swap (4GB)          -> Raid 1/2 mirror LVM (~50GB)          ssd2 -> empty (256MB)          -> Raid 2/2 mirror swap (4GB)          -> Raid 2/2 mirror LVM (~50GB)          LVM  -> root (25GB)          -> home (~25GB)


title: Prevent text/screen blinking when doing clear

text: My script doing something like:               while :;        clear             do_a_lot_of_output_here             sleep 1     done      Is it any options to prevent screen of blinking when I'm doing clear and output? I want to do it like in `watch` command (but it's written in `C`). Any advices? `clear | hexdump -C`               00000000  1b 5b 48 1b 5b 32 4a                              |.[H.[2J|     00000007      PS. I'm using `bash` only.


title: Apt-cache search only specified source

text: I use backtrack and I have a Packages.gz file with some packages on my hard drive. I want to use "apt-cache search" to search only the folder which contain Packages.gz. Is this possible?


title: NFS server optimization for maximum performance

text: I'm looking for maximum of performance for a NFS mount. I'm on local network, it could be completly unsecure, the performance is the most important in my case. What I already found : In /etc/export I've defined _async_ mode, and it already helped a lot. In /etc/default/nfs-kernel-server I've found following variables, which could potentially increase the performance :               # Number of servers to start up     RPCNFSDCOUNT=8     # Runtime priority of server (see nice(1))     RPCNFSDPRIORITY=0     # Options for rpc.mountd.     RPCMOUNTDOPTS=--manage-gids      The NFS server is on Linux Mint, and the client, which mount remote partition is Debian 6. If there are any recommendation for maximum performance of NFS server ? Should I change the RPCNFSDPRIORITY ? If there are any other parameters, which could boost NFS server ? Cient actually mounts the NFS partition with following configuration :               server:/remotepath    /localpath    nfs4 rw,intr,hard,noatime,rsize=32768,wsize=32768 0 0      Is that optimal mounting options for NFS v4 share ?


title: Why is there a ! in the password hash?

text: In `/etc/shadow`, I have a line that begins:               ubuntu:!$6$Pi4BKmX8$........................      Why is there a `!` before the `$6$` in the hash?