title: How can I get my Mountain Lion Mac to have Apache serve up content on port 80?

text: There might be more than one problem here, but I got my Mac back from the shop after the hard drive was failing, and the new hard drive reproduced my home directory but not httpd.conf. Since I have gotten it back, Apache appears to start without reported error, but I can't connect, even from the same machine, to port 80. I am guessing that the httpd processes are dying rather than this behavior happening due to an overactive firewall, as ps is not turning up any Apache daemon processes as far as I can tell. My present httpd.conf has been modified to serve up `/Users/jonathan/mirror` instead of `/Library/WebServer/Documents`; both the `ServerRoot` and `DocumentRoot` are intended to serve up the modified location. My `httpd.conf`, without other files, reads:               #     # This is the main Apache HTTP server configuration file.  It contains the     # configuration directives that give the server its instructions.     # See <URL:http://httpd.apache.org/docs/2.2> for detailed information.     # In particular, see      # <URL:http://httpd.apache.org/docs/2.2/mod/directives.html>     # for a discussion of each configuration directive.     #     # 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.       #     # 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 "log/foo_log"     # with ServerRoot set to "/usr" will be interpreted by the     # server as "/usr/log/foo_log".          #     # ServerRoot: The top of the directory tree under which the server's     # configuration, error, and log files are kept.     #     # Do not add a slash at the end of the directory path.  If you point     # ServerRoot at a non-local disk, be sure to point the LockFile directive     # at a local disk.  If you wish to share the same ServerRoot for multiple     # httpd daemons, you will need to change at least LockFile and PidFile.     #     ServerRoot "/Users"          #     # Listen: Allows you to bind Apache to specific IP addresses and/or     # ports, instead of the default. See also the <VirtualHost>     # directive.     #     # Change this to Listen on specific IP addresses as shown below to      # prevent Apache from glomming onto all bound IP addresses.     #     #Listen 12.34.56.78:80     Listen 80          #     # Dynamic Shared Object (DSO) Support     #     # To be able to use the functionality of a module which was built as a DSO you     # have to place corresponding `LoadModule' lines at this location so the     # directives contained in it are actually available _before_ they are used.     # Statically compiled modules (those listed by `httpd -l') do not need     # to be loaded here.     #     # Example:     # LoadModule foo_module modules/mod_foo.so     #     LoadModule authn_file_module libexec/apache2/mod_authn_file.so     LoadModule authn_dbm_module libexec/apache2/mod_authn_dbm.so     LoadModule authn_anon_module libexec/apache2/mod_authn_anon.so     LoadModule authn_dbd_module libexec/apache2/mod_authn_dbd.so     LoadModule authn_default_module libexec/apache2/mod_authn_default.so     LoadModule authz_host_module libexec/apache2/mod_authz_host.so     LoadModule authz_groupfile_module libexec/apache2/mod_authz_groupfile.so     LoadModule authz_user_module libexec/apache2/mod_authz_user.so     LoadModule authz_dbm_module libexec/apache2/mod_authz_dbm.so     LoadModule authz_owner_module libexec/apache2/mod_authz_owner.so     LoadModule authz_default_module libexec/apache2/mod_authz_default.so     LoadModule auth_basic_module libexec/apache2/mod_auth_basic.so     LoadModule auth_digest_module libexec/apache2/mod_auth_digest.so     LoadModule cache_module libexec/apache2/mod_cache.so     LoadModule disk_cache_module libexec/apache2/mod_disk_cache.so     LoadModule mem_cache_module libexec/apache2/mod_mem_cache.so     LoadModule dbd_module libexec/apache2/mod_dbd.so     LoadModule dumpio_module libexec/apache2/mod_dumpio.so     LoadModule reqtimeout_module libexec/apache2/mod_reqtimeout.so     LoadModule ext_filter_module libexec/apache2/mod_ext_filter.so     LoadModule include_module libexec/apache2/mod_include.so     LoadModule filter_module libexec/apache2/mod_filter.so     LoadModule substitute_module libexec/apache2/mod_substitute.so     LoadModule deflate_module libexec/apache2/mod_deflate.so     LoadModule log_config_module libexec/apache2/mod_log_config.so     LoadModule log_forensic_module libexec/apache2/mod_log_forensic.so     LoadModule logio_module libexec/apache2/mod_logio.so     LoadModule env_module libexec/apache2/mod_env.so     LoadModule mime_magic_module libexec/apache2/mod_mime_magic.so     LoadModule cern_meta_module libexec/apache2/mod_cern_meta.so     LoadModule expires_module libexec/apache2/mod_expires.so     LoadModule headers_module libexec/apache2/mod_headers.so     LoadModule ident_module libexec/apache2/mod_ident.so     LoadModule usertrack_module libexec/apache2/mod_usertrack.so     #LoadModule unique_id_module libexec/apache2/mod_unique_id.so     LoadModule setenvif_module libexec/apache2/mod_setenvif.so     LoadModule version_module libexec/apache2/mod_version.so     LoadModule proxy_module libexec/apache2/mod_proxy.so     LoadModule proxy_connect_module libexec/apache2/mod_proxy_connect.so     LoadModule proxy_ftp_module libexec/apache2/mod_proxy_ftp.so     LoadModule proxy_http_module libexec/apache2/mod_proxy_http.so     LoadModule proxy_scgi_module libexec/apache2/mod_proxy_scgi.so     LoadModule proxy_ajp_module libexec/apache2/mod_proxy_ajp.so     LoadModule proxy_balancer_module libexec/apache2/mod_proxy_balancer.so     LoadModule ssl_module libexec/apache2/mod_ssl.so     LoadModule mime_module libexec/apache2/mod_mime.so     LoadModule dav_module libexec/apache2/mod_dav.so     LoadModule status_module libexec/apache2/mod_status.so     LoadModule autoindex_module libexec/apache2/mod_autoindex.so     LoadModule asis_module libexec/apache2/mod_asis.so     LoadModule info_module libexec/apache2/mod_info.so     LoadModule cgi_module libexec/apache2/mod_cgi.so     LoadModule dav_fs_module libexec/apache2/mod_dav_fs.so     LoadModule vhost_alias_module libexec/apache2/mod_vhost_alias.so     LoadModule negotiation_module libexec/apache2/mod_negotiation.so     LoadModule dir_module libexec/apache2/mod_dir.so     LoadModule imagemap_module libexec/apache2/mod_imagemap.so     LoadModule actions_module libexec/apache2/mod_actions.so     LoadModule speling_module libexec/apache2/mod_speling.so     LoadModule userdir_module libexec/apache2/mod_userdir.so     LoadModule alias_module libexec/apache2/mod_alias.so     LoadModule rewrite_module libexec/apache2/mod_rewrite.so     #LoadModule perl_module libexec/apache2/mod_perl.so     #LoadModule php5_module libexec/apache2/libphp5.so     #LoadModule hfs_apple_module libexec/apache2/mod_hfs_apple.so          <IfModule !mpm_netware_module>     <IfModule !mpm_winnt_module>     #     # If you wish httpd to run as a different user or group, you must run     # httpd as root initially and it will switch.       #     # User/Group: The name (or #number) of the user/group to run httpd as.     # It is usually good practice to create a dedicated user and group for     # running httpd, as with most system services.     #     User _www     Group _www          </IfModule>     </IfModule>          # 'Main' server configuration     #     # The directives in this section set up the values used by the 'main'     # server, which responds to any requests that aren't handled by a     # <VirtualHost> definition.  These values also provide defaults for     # any <VirtualHost> containers you may define later in the file.     #     # All of these directives may appear inside <VirtualHost> containers,     # in which case these default settings will be overridden for the     # virtual host being defined.     #          #     # ServerAdmin: Your address, where problems with the server should be     # e-mailed.  This address appears on some server-generated pages, such     # as error documents.  e.g. admin@your-domain.com     #     ServerAdmin you@example.com          #     # ServerName gives the name and port that the server uses to identify itself.     # This can often be determined automatically, but we recommend you specify     # it explicitly to prevent problems during startup.     #     # If your host doesn't have a registered DNS name, enter its IP address here.     #     #ServerName www.example.com:80          #     # DocumentRoot: The directory out of which you will serve your     # documents. By default, all requests are taken from this directory, but     # symbolic links and aliases may be used to point to other locations.     #     DocumentRoot "/Users/jonathan/mirror"          #     # Each directory to which Apache has access can be configured with respect     # to which services and features are allowed and/or disabled in that     # directory (and its subdirectories).      #     # First, we configure the "default" to be a very restrictive set of      # features.       #     <Directory />         Options FollowSymLinks         AllowOverride None         Order deny,allow         Deny from all     </Directory>          #     # Note that from this point forward you must specifically allow     # particular features to be enabled - so if something's not working as     # you might expect, make sure that you have specifically enabled it     # below.     #          #     # This should be changed to whatever you set DocumentRoot to.     #     <Directory "/Users/jonathan">         #         # Possible values for the Options directive are "None", "All",         # or any combination of:         #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews         #         # Note that "MultiViews" must be named *explicitly* --- "Options All"         # doesn't give it to you.         #         # The Options directive is both complicated and important.  Please see         # http://httpd.apache.org/docs/2.2/mod/core.html#options         # for more information.         #         Options Indexes FollowSymLinks MultiViews              #         # AllowOverride controls what directives may be placed in .htaccess files.         # It can be "All", "None", or any combination of the keywords:         #   Options FileInfo AuthConfig Limit         #         AllowOverride None              #         # Controls who can get stuff from this server.         #         Order allow,deny         Allow from all          </Directory>          #     # DirectoryIndex: sets the file that Apache will serve if a directory     # is requested.     #     <IfModule dir_module>         DirectoryIndex index.html     </IfModule>          #     # The following lines prevent .htaccess and .htpasswd files from being      # viewed by Web clients.      #     <FilesMatch "^\.([Hh][Tt]|[Dd][Ss]_[Ss])">         Order allow,deny         Deny from all         Satisfy All     </FilesMatch>          #     # Apple specific filesystem protection.     #     <Files "rsrc">         Order allow,deny         Deny from all         Satisfy All     </Files>     <DirectoryMatch ".*\.\.namedfork">         Order allow,deny         Deny from all         Satisfy All     </DirectoryMatch>          #     # 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 "/private/var/log/apache2/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          <IfModule log_config_module>         #         # The following directives define some format nicknames for use with         # a CustomLog directive (see below).         #         LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined         LogFormat "%h %l %u %t \"%r\" %>s %b" common              <IfModule logio_module>           # You need to enable mod_logio.c to use %I and %O           LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio         </IfModule>              #         # The location and format of the access logfile (Common Logfile Format).         # If you do not define any access logfiles within a <VirtualHost>         # container, they will be logged here.  Contrariwise, if you *do*         # define per-<VirtualHost> access logfiles, transactions will be         # logged therein and *not* in this file.         #         CustomLog "/private/var/log/apache2/access_log" common              #         # If you prefer a logfile with access, agent, and referer information         # (Combined Logfile Format) you can use the following directive.         #         #CustomLog "/private/var/log/apache2/access_log" combined     </IfModule>          <IfModule alias_module>         #         # Redirect: Allows you to tell clients about documents that used to          # exist in your server's namespace, but do not anymore. The client          # will make a new request for the document at its new location.         # Example:         # Redirect permanent /foo http://www.example.com/bar              #         # Alias: Maps web paths into filesystem paths and is used to         # access content that does not live under the DocumentRoot.         # Example:         # Alias /webpath /full/filesystem/path         #         # If you include a trailing / on /webpath then the server will         # require it to be present in the URL.  You will also likely         # need to provide a <Directory> section to allow access to         # the filesystem path.              #         # ScriptAlias: This controls which directories contain server scripts.          # ScriptAliases are essentially the same as Aliases, except that         # documents in the target directory are treated as applications and         # run by the server when requested rather than as documents sent to the         # client.  The same rules about trailing "/" apply to ScriptAlias         # directives as to Alias.         #         ScriptAliasMatch ^/cgi-bin/((?!(?i:webobjects)).*$) "/Library/WebServer/CGI-Executables/$1"          </IfModule>          <IfModule cgid_module>         #         # ScriptSock: On threaded servers, designate the path to the UNIX         # socket used to communicate with the CGI daemon of mod_cgid.         #         #Scriptsock /private/var/run/cgisock     </IfModule>          #     # "/Library/WebServer/CGI-Executables" should be changed to whatever your ScriptAliased     # CGI directory exists, if you have that configured.     #     <Directory "/Library/WebServer/CGI-Executables">         AllowOverride None         Options None         Order allow,deny         Allow from all     </Directory>          #     # DefaultType: 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          <IfModule mime_module>         #         # TypesConfig points to the file containing the list of mappings from         # filename extension to MIME-type.         #         TypesConfig /private/etc/apache2/mime.types              #         # AddType allows you to add to or override the MIME configuration         # file specified in TypesConfig for specific file types.         #         #AddType application/x-gzip .tgz         #         # AddEncoding allows you to have certain browsers uncompress         # information on the fly. Note: Not all browsers support this.         #         #AddEncoding x-compress .Z         #AddEncoding x-gzip .gz .tgz         #         # If the AddEncoding directives above are commented-out, then you         # probably should define those extensions to indicate media types:         #         AddType application/x-compress .Z         AddType application/x-gzip .gz .tgz              #         # AddHandler allows you to map certain file extensions to "handlers":         # actions unrelated to filetype. These can be either built into the server         # or added with the Action directive (see below)         #         # To use CGI scripts outside of ScriptAliased directories:         # (You will also need to add "ExecCGI" to the "Options" directive.)         #         #AddHandler cgi-script .cgi              # For type maps (negotiated resources):         #AddHandler type-map var              #         # Filters allow you to process content before it is sent to the client.         #         # To parse .shtml files for server-side includes (SSI):         # (You will also need to add "Includes" to the "Options" directive.)         #         #AddType text/html .shtml         #AddOutputFilter INCLUDES .shtml     </IfModule>          #     # The mod_mime_magic module allows the server to use various hints from the     # contents of the file itself to determine its type.  The MIMEMagicFile     # directive tells the module where the hint definitions are located.     #     #MIMEMagicFile /private/etc/apache2/magic          #     # Customizable error responses come in three flavors:     # 1) plain text 2) local redirects 3) external redirects     #     # Some examples:     #ErrorDocument 500 "The server made a boo boo."     #ErrorDocument 404 /missing.html     #ErrorDocument 404 "/cgi-bin/missing_handler.pl"     #ErrorDocument 402 http://www.example.com/subscription_info.html     #          #     # MaxRanges: Maximum number of Ranges in a request before     # returning the entire resource, or one of the special     # values 'default', 'none' or 'unlimited'.     # Default setting is to accept 200 Ranges.     #MaxRanges unlimited          #     # EnableMMAP and EnableSendfile: On systems that support it,      # memory-mapping or the sendfile syscall is used to deliver     # files.  This usually improves server performance, but must     # be turned off when serving from networked-mounted      # filesystems or if support for these functions is otherwise     # broken on your system.     #     #EnableMMAP off     #EnableSendfile off          # 6894961     TraceEnable off          # Supplemental configuration     #     # The configuration files in the /private/etc/apache2/extra/ directory can be      # included to add extra features or to modify the default configuration of      # the server, or you may simply copy their contents here and change as      # necessary.          # Server-pool management (MPM specific)     Include /private/etc/apache2/extra/httpd-mpm.conf          # Multi-language error messages     #Include /private/etc/apache2/extra/httpd-multilang-errordoc.conf          # Fancy directory listings     Include /private/etc/apache2/extra/httpd-autoindex.conf          # Language settings     Include /private/etc/apache2/extra/httpd-languages.conf          # User home directories     Include /private/etc/apache2/extra/httpd-userdir.conf          # Real-time info on requests and configuration     #Include /private/etc/apache2/extra/httpd-info.conf          # Virtual hosts     #Include /private/etc/apache2/extra/httpd-vhosts.conf          # Local access to the Apache HTTP Server Manual     Include /private/etc/apache2/extra/httpd-manual.conf          # Distributed authoring and versioning (WebDAV)     #Include /private/etc/apache2/extra/httpd-dav.conf          # Various default settings     #Include /private/etc/apache2/extra/httpd-default.conf          # Secure (SSL/TLS) connections     #Include /private/etc/apache2/extra/httpd-ssl.conf     #     # Note: The following must must be present to support     #       starting without SSL on platforms with no /dev/random equivalent     #       but a statically compiled-in mod_ssl.     #     <IfModule ssl_module>     SSLRandomSeed startup builtin     SSLRandomSeed connect builtin     </IfModule>          Include /private/etc/apache2/other/*.conf      What can I do to get Apache working and serving up content?


title: Change Zombie window X properties from Iconic state to Normal state

text: Mathematica sets its _Documentation Center_ as an iconic window according to `xprop`. I think this state might be the culprit for making this window a zombie window, not focusable by the mouse on my window manager. Can I change the window state to normal using some X tools? Here is the output from `xprop`:               _NET_WM_DESKTOP(CARDINAL) = 3     _NET_WM_SYNC_REQUEST_COUNTER(CARDINAL) = 25191353     _NET_WM_USER_TIME(CARDINAL) = 46824074     _NET_WM_NAME(UTF8_STRING) = "Mathematica - Wolfram Mathematica"     _NET_WM_ICON(CARDINAL) =    Icon (31 x 32):                              ░                                       ▒                                      ░▒                              ░       ▒▒░      ░                      ░▒░    ░▒▓▒     ▒░                       ▒▒▒░ ░▒▓▓▓░  ░▒▒                        ▒▒▒▒▒▒▒▓▓▓▓▒▓▓▒░                        ▒▒▒▒▒▒▒▓▓▓▓▓▓▒▒░                        ▒▒▒▒▒▒▓▓▓▓▓▓▒▒▒                    ▒░░░▒▒▒▒▒▒▒▓▓▓▒▒▒▒▒▒░                    ▒▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒▒▒▒░                    ▒▒▒▒▒░░░░▒▒▒▒▒▒▒▓▓▓▒▒▒▒▒░               ░▓▓▓▒░░░░░░▒▒▒▒▓▓▓▓▒▒▒░                  ▒▓▓▒░░░░░░▒▒▒▒▓▓▓▒▒▒░                   ▒▓▒░░░░░░░▒▒▒▒▓▓▓▒▒░                   ░▓▓░░░░░░░░░░▒▒▓▓▓▒▒                   ░▓▒░░░░░░░░░░░░▒▒▓▓▓▒                  ▒▓▒░░░░░░░░░░░░░░▒▒▒▒▒░               ░▒▒▒░░░░░░░░░░░░░░░▒▒▒▒▒▒░                   ░▒▒░░░░░░░░░░▒▒▒▒▒▒▒▒░                    ▒▓▒░░░░░░▒▒▒▒▒▒▒░░▒▒░                   ▒▒▓▒░░░░▒▓▓▓▓▓▒                         ▒▒▒▓░░░▒▓▓▓▓▒▒▒                        ░▒▒▒░▒░░▒▒▒▒▒▒▒▒                        ░░    ░▒▒▒░  ░▒▒                              ▒▒▒░     ▒░                             ▒▒▒       ░                              ▒░                                      ▒                                       ░                                    XdndAware(ATOM) = BITMAP     _MOTIF_DRAG_RECEIVER_INFO(_MOTIF_DRAG_RECEIVER_INFO) = 0x6c, 0x0, 0x5, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0 WM_CLIENT_LEADER(WINDOW): window id # 0x1800003     _NET_WM_PID(CARDINAL) = 2882     _NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_NORMAL     _MOTIF_WM_HINTS(_MOTIF_WM_HINTS) = 0x3, 0x3e, 0x7e, 0x0, 0x0 WM_PROTOCOLS(ATOM): protocols  WM_DELETE_WINDOW, WM_TAKE_FOCUS,     _NET_WM_PING, _NET_WM_SYNC_REQUEST WM_NAME(STRING) = "Mathematica - Wolfram Mathematica" WM_LOCALE_NAME(STRING) = "en_US.UTF-8" WM_CLASS(STRING) = "XMathematica" WM_HINTS(WM_HINTS):       Client accepts input or input focus: True       Initial state is Iconic State.      bitmap id # to use for icon: 0x180637b      window id # of group leader: 0x1800003 WM_NORMAL_HINTS(WM_SIZE_HINTS):      user specified location: 277, 12        program specified location: 277, 12         user specified size: 725 by 775         program specified size: 725 by 775      program specified minimum size: 56 by 177       window gravity: NorthWest WM_CLIENT_MACHINE(STRING) = "wdkrnls" WM_COMMAND(STRING) = { "/usr/local/Wolfram/Mathematica/9.0/SystemFiles/FrontEnd/Binaries/Linux-x86-64/Mathematica", "-topDirectory", "/usr/local/Wolfram/Mathematica/9.0" }      And here is a screenshot showing the border of this window: ![enter image description here](http://i.stack.imgur.com/OlKaP.png)


title: iw: what's the default channel bandwidth?

text: I'm using the `iw` tool to configure a WiFi interface to sniff the air (monitor mode) on specific channel:               ifconfig wlan0 down     iw dev wlan0 set channel 1     iwconfig wlan0 mode monitor     ifconfig wlan0 up      The manpage for `iw` says that the channel bandwidth is optional:               dev <devname> set channel <channel> [HT20|HT40+|HT40-]      But it's not clear what value of the three is the default and according to what it's chosen? Using Ubuntu Ubuntu 12.04.4, kernel 3.5.0-45-generic.


title: Sending a file as the body of an email

text: I want a utility that does something like this:               email --subject="xxx" --body=body.txt --to=to_address@hostname.com      (using pre-configured sender information for e.g. gmail). Note that `body.txt` is plain text and should be the body of the message, not an attachment. If the body is omitted it should pop up an editor and let me type in my message that way. I could hack together a quick script that does this, but I was wondering if there's an easy way to do this with common unix tools?


title: What is the long ID that Linux assigns to a disk in /media/?

text: For example, when I plug in an external hard drive disk enclosure via USB, sometimes the disk is automatically mounted in `/media/`. For example, the disk might be mounted to `/media/13f35f59-f023-4d98-b06f-9dfaebefd6c1` or `/media/4668484A68483B47` What are those long IDs?


title: kernel build: why does 'make install' complain about missing modules?

text: I'm building a 3.2.x kernel on a RedHat Enterpise system. During 'make install' it takes a very long time and is complaining : > ERROR: modinfo: could not find module xxx I assume its probing existing modules but why? I created a small test module that I loaded by hand with insmod and sure enough it shows up as > ERROR: modinfo: could not find module testmodule. Could someone explain to me whats going on here? Why does 'make install' care about existing modules that may (or may not) be loaded? Thanks


title: Inexplicable high memory usage (apparently not caused by programs, buffers, cache, or slab cache)

text: I've got a server that claims 1.7 of its 2 GB of RAM are used, but the combined memory usage of the running processes doesn't come anywhere near that figure:               $ free -m                  total       used       free     shared    buffers     cached     Mem:          1993       1898         94          0          0        199     -/+ buffers/cache:       1699        294     Swap:         2046         40       2006          $ grep VmRSS /proc/*/status | awk '{s+=$2} END {print s}'       29080      So far, the explanations I've found blame high RAM usage on caches and buffers or the kernel's slab cache, but neither of those seems to be the reason in this case (see also `/proc/meminfo` below). What else could be causing this excessive RAM usage (which often causes the system to start swapping, even with vm.swappiness=1)?   What can I do to find and perhaps mitigate the reason? * * * Potentially relevant information:   The system is a rented dedicated server with an Intel Atom N2800 CPU and 2 GB of RAM, as seen above. It is running Debian Wheezy (7.6) with the 3.13 kernel from wheezy-backports.   Its current `/proc/meminfo`:               MemTotal:        2041464 kB     MemFree:           95224 kB     Buffers:              20 kB     Cached:           204240 kB     SwapCached:        13000 kB     Active:           100280 kB     Inactive:         132036 kB     Active(anon):      15496 kB     Inactive(anon):    12580 kB     Active(file):      84784 kB     Inactive(file):   119456 kB     Unevictable:           0 kB     Mlocked:               0 kB     SwapTotal:       2096124 kB     SwapFree:        2054960 kB     Dirty:                64 kB     Writeback:             0 kB     AnonPages:         17208 kB     Mapped:             6888 kB     Shmem:                20 kB     Slab:              31180 kB     SReclaimable:      14628 kB     SUnreclaim:        16552 kB     KernelStack:        1848 kB     PageTables:         4556 kB     NFS_Unstable:          0 kB     Bounce:                0 kB     WritebackTmp:          0 kB     CommitLimit:     3116856 kB     Committed_AS:     122748 kB     VmallocTotal:   34359738367 kB     VmallocUsed:       81792 kB     VmallocChunk:   34359611556 kB     HardwareCorrupted:     0 kB     AnonHugePages:         0 kB     HugePages_Total:       0     HugePages_Free:        0     HugePages_Rsvd:        0     HugePages_Surp:        0     Hugepagesize:       2048 kB     DirectMap4k:      136108 kB     DirectMap2M:     1943552 kB      `ps -eo pid,user,args,pmem --sort pmem`, as Braiam requested:                 PID USER     COMMAND                     %MEM         2 root     [kthreadd]                   0.0         3 root     [ksoftirqd/0]                0.0         5 root     [kworker/0:0H]               0.0         7 root     [rcu_sched]                  0.0         8 root     [rcu_bh]                     0.0         9 root     [migration/0]                0.0        10 root     [watchdog/0]                 0.0        11 root     [watchdog/1]                 0.0        12 root     [migration/1]                0.0        13 root     [ksoftirqd/1]                0.0        15 root     [kworker/1:0H]               0.0        16 root     [watchdog/2]                 0.0        17 root     [migration/2]                0.0        18 root     [ksoftirqd/2]                0.0        20 root     [kworker/2:0H]               0.0        21 root     [watchdog/3]                 0.0        22 root     [migration/3]                0.0        23 root     [ksoftirqd/3]                0.0        25 root     [kworker/3:0H]               0.0        26 root     [khelper]                    0.0        27 root     [kdevtmpfs]                  0.0        28 root     [netns]                      0.0        29 root     [writeback]                  0.0        30 root     [kintegrityd]                0.0        31 root     [bioset]                     0.0        32 root     [kblockd]                    0.0        35 root     [khungtaskd]                 0.0        36 root     [kswapd0]                    0.0        37 root     [ksmd]                       0.0        38 root     [khugepaged]                 0.0        39 root     [fsnotify_mark]              0.0        40 root     [crypto]                     0.0        45 root     [kthrotld]                   0.0        46 root     [deferwq]                    0.0       151 root     [khubd]                      0.0       156 root     [ata_sff]                    0.0       168 root     [scsi_eh_0]                  0.0       170 root     [scsi_eh_1]                  0.0       171 root     [scsi_eh_2]                  0.0       172 root     [scsi_eh_3]                  0.0       191 root     [kworker/3:1H]               0.0       192 root     [kworker/1:1H]               0.0       193 root     [kworker/0:1H]               0.0       197 root     [kworker/2:1H]               0.0       212 root     [bioset]                     0.0       218 root     [btrfs-genwork-1]            0.0       219 root     [btrfs-submit-1]             0.0       220 root     [btrfs-delalloc-]            0.0       221 root     [btrfs-fixup-1]              0.0       224 root     [btrfs-rmw-1]                0.0       225 root     [btrfs-endio-rai]            0.0       226 root     [btrfs-endio-met]            0.0       228 root     [btrfs-freespace]            0.0       230 root     [btrfs-cache-1]              0.0       231 root     [btrfs-readahead]            0.0       233 root     [btrfs-qgroup-re]            0.0       234 root     [btrfs-cleaner]              0.0       235 root     [btrfs-transacti]            0.0       415 root     [kworker/2:2]                0.0       533 root     [kpsmoused]                  0.0       619 root     [kworker/3:0]                0.0      1383 root     [btrfs-genwork-1]            0.0      1384 root     [btrfs-submit-1]             0.0      1385 root     [btrfs-delalloc-]            0.0      1386 root     [btrfs-fixup-1]              0.0      1389 root     [btrfs-rmw-1]                0.0      1390 root     [btrfs-endio-rai]            0.0      1391 root     [btrfs-endio-met]            0.0      1393 root     [btrfs-freespace]            0.0      1395 root     [btrfs-cache-1]              0.0      1396 root     [btrfs-readahead]            0.0      1398 root     [btrfs-qgroup-re]            0.0      1399 root     [btrfs-cleaner]              0.0      1400 root     [btrfs-transacti]            0.0      1687 root     /usr/sbin/sshd               0.0      2087 root     [kworker/1:0]                0.0      2218 root     [kworker/u8:0]               0.0      2470 root     tmux                         0.0      2473 root     -bash                        0.0      4643 root     tmux a                       0.0      6072 root     [kworker/u8:1]               0.0      7126 root     [btrfs-worker-2]             0.0     14524 root     [btrfs-delayed-m]            0.0     16555 root     [kworker/0:2]                0.0     20514 root     [btrfs-flush_del]            0.0     22924 root     [btrfs-endio-2]              0.0     23031 root     [btrfs-worker-3]             0.0     26010 root     [btrfs-endio-3]              0.0     26227 root     [btrfs-endio-met]            0.0     26383 root     [btrfs-delayed-m]            0.0     26823 root     [btrfs-endio-wri]            0.0     27063 root     [btrfs-endio-met]            0.0     28637 root     [kworker/0:0]                0.0     30011 root     [kworker/2:0]                0.0     30832 root     [btrfs-flush_del]            0.0     31387 root     [kworker/1:2]                0.0     31475 root     [kworker/3:2]                0.0     31803 root     [btrfs-endio-wri]            0.0     32361 root     [kworker/1:1]                0.0       499 root     lxc-start -d -n io           0.0      1682 sshd     /usr/bin/dbus-daemon --syst  0.0      2181 mail     /usr/sbin/nullmailer-send -  0.0     13533 root     -bash                        0.0     19059 root     lxc-start -n callisto -d     0.0     20446 root     /usr/sbin/sshd               0.0     20693 root     /usr/sbin/acpid              0.0      1708 root     /sbin/getty 38400 console    0.0      1709 root     /sbin/getty 38400 tty1 linu  0.0      1710 root     /sbin/getty 38400 tty2 linu  0.0      1711 root     /sbin/getty 38400 tty3 linu  0.0      1712 root     /sbin/getty 38400 tty4 linu  0.0      1832 root     -bash                        0.0      2276 root     /sbin/getty 38400 tty1       0.0      2277 root     /sbin/getty 38400 tty2       0.0      2278 root     /sbin/getty 38400 tty3       0.0      2279 root     /sbin/getty 38400 tty4       0.0      2280 root     /sbin/getty 38400 tty5       0.0      2281 root     /sbin/getty 38400 tty6       0.0     13990 root     -bash                        0.0     20478 root     /sbin/getty 38400 console    0.0     20479 root     /sbin/getty 38400 tty1 linu  0.0     20480 root     /sbin/getty 38400 tty2 linu  0.0     20481 root     /sbin/getty 38400 tty3 linu  0.0     20482 root     /sbin/getty 38400 tty4 linu  0.0     24167 root     -bash                        0.0     31031 root     -bash                        0.0     19067 root     init [3]                     0.0      2132 root     -bash                        0.0      4549 root     -bash                        0.0         1 root     init [2]                     0.0      2508 root     tmux a                       0.0       503 root     init [3]                     0.0      4652 root     -bash                        0.0      7923 root     -bash                        0.0      2130 root     sshd: root@pts/5             0.0      1824 root     ssh io                       0.0      2140 root     /usr/sbin/cron               0.0       504 root     udevd --daemon               0.0       505 root     udevd --daemon               0.0      1826 root     sshd: root@pts/0             0.0      4544 root     sshd: root@pts/0             0.0       381 root     udevd --daemon               0.0     16820 root     /usr/sbin/vnstatd -d         0.0     14381 root     /usr/sbin/sshd               0.0      2224 101      /usr/bin/dbus-daemon --syst  0.0      8182 ntp      /usr/sbin/ntpd -p /var/run/  0.0      2497 nst      bash                         0.0      6459 root     -bash                        0.0      2382 root     /usr/sbin/console-kit-daemo  0.0      2472 root     tmux                         0.0      3074 root     ps -eo pid,user,args,pmem -  0.0     17115 root     /usr/sbin/rsyslogd -c5       0.0      6149 root     htop                         0.0      3075 root     view -                       0.1       911 root     munin-node                   0.1      2231 snmp     /usr/sbin/snmpd -Lsd -Lf /d  0.1     13988 root     tmux                         0.1     26168 root     -bash                        0.1     27332 root     -bash                        0.1       628 root     -bash                        0.1


title: How to deal with a problematic 3G dongle

text: I have an old 3G USB modem and I wonder if it's dying because it's very unreliable. Connecting it gives the following (`/var/log/syslog`):               Feb 18 22:39:56 thome kernel: [ 5310.999854] usb 1-2: new full-speed USB device number 38 using xhci_hcd     Feb 18 22:39:56 thome mtp-probe: checking bus 1, device 38: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-2"     Feb 18 22:39:56 thome kernel: [ 5311.017000] usb 1-2: New USB device found, idVendor=12d1, idProduct=1003     Feb 18 22:39:56 thome kernel: [ 5311.017004] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0     Feb 18 22:39:56 thome kernel: [ 5311.017005] usb 1-2: Product: HUAWEI Mobile     Feb 18 22:39:56 thome kernel: [ 5311.017007] usb 1-2: Manufacturer: HUAWEI Technologies     Feb 18 22:39:56 thome mtp-probe: bus: 1, device: 38 was not an MTP device     Feb 18 22:39:56 thome kernel: [ 5311.017625] usb-storage 1-2:1.0: USB Mass Storage device detected     Feb 18 22:39:56 thome kernel: [ 5311.017976] scsi68 : usb-storage 1-2:1.0     Feb 18 22:39:56 thome kernel: [ 5311.019304] usb 1-2: USB disconnect, device number 38     Feb 18 22:39:56 thome systemd[1]: Starting USB_ModeSwitch...     Feb 18 22:39:56 thome systemd[1]: Started USB_ModeSwitch.     Feb 18 22:39:56 thome udisks-daemon[1319]: **** scsi_host ADDING /sys/devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2:1.0/host68/scsi_host/host68     Feb 18 22:39:56 thome udisks-daemon[1319]: **** scsi_host IGNORING ADD /sys/devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2:1.0/host68/scsi_host/host68     Feb 18 22:39:56 thome udisks-daemon[1319]: **** scsi_host IGNORING REMOVE /sys/devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2:1.0/host68/scsi_host/host68     Feb 18 22:39:56 thome kernel: [ 5311.459645] usb 1-2: new full-speed USB device number 39 using xhci_hcd     Feb 18 22:39:56 thome kernel: [ 5311.476931] usb 1-2: New USB device found, idVendor=12d1, idProduct=1003     Feb 18 22:39:56 thome kernel: [ 5311.476934] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0     Feb 18 22:39:56 thome kernel: [ 5311.476936] usb 1-2: Product: HUAWEI Mobile     Feb 18 22:39:56 thome kernel: [ 5311.476937] usb 1-2: Manufacturer: HUAWEI Technologies     Feb 18 22:39:56 thome kernel: [ 5311.477745] usb-storage 1-2:1.0: USB Mass Storage device detected     Feb 18 22:39:56 thome kernel: [ 5311.477918] option 1-2:1.0: GSM modem (1-port) converter detected     Feb 18 22:39:56 thome kernel: [ 5311.477988] usb 1-2: GSM modem (1-port) converter now attached to ttyUSB0     Feb 18 22:39:56 thome kernel: [ 5311.478274] usb-storage 1-2:1.1: USB Mass Storage device detected     Feb 18 22:39:56 thome kernel: [ 5311.478323] option 1-2:1.1: GSM modem (1-port) converter detected     Feb 18 22:39:56 thome kernel: [ 5311.478372] usb 1-2: GSM modem (1-port) converter now attached to ttyUSB1     Feb 18 22:39:56 thome kernel: [ 5311.478414] usb-storage 1-2:1.2: USB Mass Storage device detected     Feb 18 22:39:56 thome kernel: [ 5311.478554] scsi71 : usb-storage 1-2:1.2     Feb 18 22:39:56 thome mtp-probe: checking bus 1, device 39: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-2"     Feb 18 22:39:56 thome mtp-probe: bus: 1, device: 39 was not an MTP device     Feb 18 22:39:56 thome systemd[1]: Starting USB_ModeSwitch...     Feb 18 22:39:56 thome udisks-daemon[1319]: **** scsi_host ADDING /sys/devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2:1.2/host71/scsi_host/host71     Feb 18 22:39:56 thome udisks-daemon[1319]: **** scsi_host IGNORING ADD /sys/devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2:1.2/host71/scsi_host/host71     Feb 18 22:39:56 thome systemd[1]: Started USB_ModeSwitch.     Feb 18 22:39:57 thome kernel: [ 5312.476715] scsi 71:0:0:0: CD-ROM            HUAWEI   Mass Storage     2.31 PQ: 0 ANSI: 2     Feb 18 22:39:57 thome kernel: [ 5312.482692] sr0: scsi-1 drive     Feb 18 22:39:57 thome kernel: [ 5312.482844] sr 71:0:0:0: Attached scsi CD-ROM sr0     Feb 18 22:39:57 thome kernel: [ 5312.482916] sr 71:0:0:0: Attached scsi generic sg2 type 5     Feb 18 22:39:57 thome kernel: [ 5312.505690] xhci_hcd 0000:00:14.0: WARN Event TRB for slot 28 ep 6 with no TDs queued?     Feb 18 22:39:58 thome udisks-daemon[1319]: **** ADDING /sys/devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2:1.2/host71/target71:0:0/71:0:0:0/block/sr0     Feb 18 22:39:58 thome udisks-daemon[1319]: **** UPDATING /sys/devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2:1.2/host71/target71:0:0/71:0:0:0/block/sr0     Feb 18 22:39:58 thome udisks-daemon[1319]: **** ADDED /sys/devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2:1.2/host71/target71:0:0/71:0:0:0/block/sr0     Feb 18 22:39:58 thome udisks-daemon[1319]: **** EMITTING ADDED for /sys/devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2:1.2/host71/target71:0:0/71:0:0:0/block/sr0     Feb 18 22:39:58 thome kernel: [ 5312.534063] xhci_hcd 0000:00:14.0: WARN Event TRB for slot 28 ep 6 with no TDs queued?     Feb 18 22:39:58 thome udisks-daemon[1319]: **** CHANGING /sys/devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2:1.2/host71/target71:0:0/71:0:0:0/block/sr0     Feb 18 22:39:58 thome udisks-daemon[1319]: **** UPDATING /sys/devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2:1.2/host71/target71:0:0/71:0:0:0/block/sr0     Feb 18 22:39:58 thome udisks-daemon[1319]: **** EMITTING CHANGED for /sys/devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2:1.2/host71/target71:0:0/71:0:0:0/block/sr0     Feb 18 22:39:58 thome udisks-daemon[1319]: **** CHANGED /sys/devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2:1.2/host71/target71:0:0/71:0:0:0/block/sr0     Feb 18 22:39:58 thome org.gtk.Private.UDisks2VolumeMonitor[1200]: ### debug: emit_signal: 0x1cf01b0     Feb 18 22:40:02 thome kernel: [ 5316.956198] xhci_hcd 0000:00:14.0: WARN Event TRB for slot 28 ep 6 with no TDs queued?     Feb 18 22:40:02 thome udisks-daemon[1319]: **** CHANGING /sys/devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2:1.2/host71/target71:0:0/71:0:0:0/block/sr0     Feb 18 22:40:02 thome udisks-daemon[1319]: **** UPDATING /sys/devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2:1.2/host71/target71:0:0/71:0:0:0/block/sr0     Feb 18 22:40:02 thome udisks-daemon[1319]: **** EMITTING CHANGED for /sys/devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2:1.2/host71/target71:0:0/71:0:0:0/block/sr0     Feb 18 22:40:02 thome udisks-daemon[1319]: **** CHANGED /sys/devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2:1.2/host71/target71:0:0/71:0:0:0/block/sr0     Feb 18 22:40:02 thome org.gtk.Private.UDisks2VolumeMonitor[1200]: ### debug: emit_signal: 0x1cf01b0      It does not work (i.e. it is not available via **nm-applet** so that I can connect to the internet). I have seen this issue on two separate Debian machines. The one reliable workaround for this problem is rebooting the machine :(


title: Exec in ".desktop" with arguments don't work?

text: I need help, I made a script, this script run a getopts; the script have some options example: `./people -n 0ad` I need make a desktop entry, running the above example, but wasn't run the 'Exec' in the option... This is my actual desktop entry (doesn't work):               [Desktop Entry]     Version=1.0     Name=0 A.D.     Comment=A real-time strategy game of ancient warfare     Exec=/home/makerpm/people -n 0ad      Icon=0ad     Terminal=false     Type=Application     Categories=Game;StrategyGame;


title: Root Cron Won't Run Script (permission denied)

text: I've edited my root cron tab to periodically execute a script located in a particular user's folder using this command:               sudo crontab -e      When cron runs the script, this is the output:               sh: 1: /home/user/Location/Of/Script: Permission denied      I thought that the root cron had permission to do anything. I have no issue when I manually run this script as root. I've read in the documentation that further error info can be found here:               sudo cat /var/log/syslog      Here's what I found:               Jan 30 12:30:01 backup CRON[17702]: (CRON) info (No MTA installed, discarding output)      However, I think this is probably unrelated to the permission denied issue. So what do I really need to do?


title: RPM specfile for C/C++ project: how do I know how to fill in Requires and BuildRequires fields?

text: I have several C/C++ projects with sources and makefiles and I'm trying to pack them into rpms. Defining the dependencies for the created packages has become a problem for me. Concretely I need to find out what to put into the **Requires** and **BuildRequires** fields of the specfile.   1. Assuming that **Requires** field requests the list of libraries used by the executable during the runtime, I am trying to parse `ldd`'s output and pass it to the `rpm -q --whatrequires` (here is my simple script). Moreover, I need to do that recursively (get dependencies for the packages that contain first-level dependencies) someway.   2. I can guess that **BuildRequires** field should contain all the *-devel.rpm packages with a С/С++ headers ( ** _only?_** ). I can check several source files manually, but I don't understand how to analyze the thousands lines of code...  Parsing sources by #include keyword can lead to collision (because of headers with the same name but lying in different directories). Is it possible to force Make script or gcc to be more verbose in order to define which headers had been used by default? This would solve the second problem. Lack of such a useful tool for the developers in RHEL-based distros seems strange for me.


title: How to setup a static IP on Red Hat 6.5 using VMware?

text: I have VMware 5.5 with a vmguest RHEL 6.5. I get connectivity with DHCP from **RHEL -> switch1 group -> physical-> to internet**. Once I set up the vmguest with RHEL 6.5 with a static IP, it nolonger has connectivity. Is there a cook book out there on setting up a RHEL 6.x guest to a working static IP? Am I missing the obvious ?


title: Why does Linux heat up my computer?

text: I have been using Linux on my Acer 5740 for a couple of years now. Lately, I noticed that my computer starts heating up and steadies at around 70 degrees. If I fire up Eclipse or ffmpeg or something, the computer shoots to 85-90 degrees. Maybe this has happened before but I might have ignored it. I have a dual-boot with Windows 7 and 70 degrees is the maximum even when I play games. I expect Linux to heat up a little because of drivers but 70 degrees @ idling is a little too much. * * * My prior research on this shows:   1. A friend of mine with exact same Laptop but with an ATI card instead of the Intel (present on mine) was struggling with heat problems of much greater intensity. He installed fgrlx and his Laptop is as cool as Siberia.   2. I have attempted to install Intel drivers for my card. I have the latest version of Xorg and xorg for Intel. It doesn't help.   3. The problem is independent of Distribution. I have tried Ubuntu, Debian, Fedora and FreeBSD.   4. The graph for temperature versus time after boot-up is fairly steady. There are no sudden jumps.   5. All temperatures are in Celcius and correspond to `max(acpi -t)` * * * Any solutions? _Edit_ : My CPU if scaled at 933MHz still doesn't help. I can't find Fan Control for my Laptop. There are few scripts for Acer Aspire One but I can't find one for 5740. My `/proc/acpi/fan` folder is empty!                blah@blah-Laptop:/proc/acpi/fan$ ls -l      total 0


title: Install wicd on Slackware 14.1

text: I am trying to install wicd-1.7.2.4 on Slackware 14.1. I couldn't find `configure` or `makefile` in `wicd-1.7.2.4.tar.gz`. Running `python setup.py configure` (following the INSTALL guide) causes:               sh: pybabel: command not found      Then I tried to install `pybabel` but couldn't find sources and libraries. How can I install `wicd`?


title: Command history in Zsh

text: How does Zsh keep track of command history? I see two files in my home directory: `.zhistory` and `.zsh_history`. What is the difference between them? Does Zsh keep appending lines to one of them _forever_? Wouldn't that make history search too slow? Can I safely make these files symbolic links to another location? (e.g. a git repository to keep track of changes to the history)


title: Why does `xdg-mime query filetype ...` fail to find a new added file type?

text: I installed a new file type to share MIME database. But `xdg-mime query filetype` cannot tell the new type. This problem only happens on my own Linux OS which does not use GNOME or KDE as its desktop. On Ubuntu, the same process works well. I found that `xdg-mime query filetype` uses "file -i filename" under the hood on my OS but uses gnomevfs on Ubuntu. Here are my steps:   1. wrote a xml file for my new file type `my_file.xml`   2. `xdg-mime install my_file.xml`   3. `xdg-mime query filetype` <name of file to query> .... no output :-( I checked `/usr/share/mime/applications` and found the xml entry generated by update-mime-database there. And the C API `g_file_info_get_content_type()` can get the proper mime type. So it seems the shared-mime-info has been updated successfully. But the "file" command still fails, why? Here is my xml file:               <?xml version="1.0" encoding="UTF-8"?>     <mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>         <mime-type type="application/vnd.xxx.xxx.xxx">             <comment>xxxx</comment>             <glob pattern="*.dcf"/>         </mime-type>     </mime-info>


title: How can I get the error code (exit code) of "xdg-mime query filetype" command?

text: I ran `xdg-mime query filetype` <file name> to check the MIME type of a file, and it failed. How can I print the error code (exit code) of the `xdg-mime` command? I want to know what error happened:   1. Error in command line syntax.    2. One of the files passed on the command line did not exist.    3. A required tool could not be found.    4. The action failed.    5. No permission to read one of the files passed on the command line.


title: Unmet dependencies

text: I am trying to compile vim and install with "--enable-pythoninterp" flag, which needs the python-dev package. INFO   I obtained the vim source from ftp://ftp.vim.org/pub/vim/unix/vim-7.3.tar.bz2   Vim7.3 is not available yet using apt.   Using Ubuntu 10.10 But, `sudo apt-get python-dev` results in broken packages error message -> The following packages have unmet dependencies:   python-dev : Depends: python (= 2.6.6-2ubuntu1) but 2.6.6-2ubuntu2 is to be installed   E: Broken packages How can I best resolve this issue? * * *               $ apt-cache policy vim python python-dev                      python:       Installed: 2.6.6-2ubuntu2       Candidate: 2.6.6-2ubuntu2       Version table:      *** 2.6.6-2ubuntu2 0             100 /var/lib/dpkg/status          2.6.6-2ubuntu1 0             500 http://archive.ubuntu.com/ubuntu/ maverick/main i386 Packages     vim:       Installed: (none)       Candidate: 2:7.2.330-1ubuntu4       Version table:          2:7.2.330-1ubuntu4 0             500 http://archive.ubuntu.com/ubuntu/ maverick/main i386 Packages     python-dev:       Installed: (none)       Candidate: 2.6.6-2ubuntu1       Version table:          2.6.6-2ubuntu1 0             500 http://archive.ubuntu.com/ubuntu/ maverick/main i386 Packages


title: Alternatives to Symphony OS Orchestra Application Environment

text: I just read that Symphony OS has an wonderful concept, called Orchestra, where applications (can be even written HTML + JAVAscript) can be ran via a reduced localhost server and a leaned down mozilla bases UI renderer. The concept of a unified UI renderer triggered my curiosity, and I am wondering, if such other unified UI solutions for Linux.


title: Automatically include N latest kernel versions in GRUB / GRUB2 menu on kernel upgrade

text: What I like about Ubuntu is that the GRUB menu always allows me to pick the latest (default) or second-latest (etc.) kernel version at boot time. In Arch Linux, I can't do that by default. The only options are normal and fallback images, and both boot the latest kernel. How can I achieve the Ubuntu-like behavior in Arch? I use Grub and Grub2, but I guess that I wouldn't have to configure the bootloader much. It will probably include the images it finds in `/boot` in the menu automatically. I can be wrong, though. So, what I need, from most to least important, is:   1. That the new kernel image created by `mkinitcpio` during the upgrade doesn't overwrite the previous one;   2. That the latest kernel is present in the bootloader menu as default option;   3. That very old versions are excluded from the menu or hidden into "older version" menu item _(not that important)_. How would one go about this? Should I look into `mkinitcpio` config or maybe `pacman` config? I've actually tried looking at configuration files for both, no ideas so far.


title: How do I get a .desktop in KDE to open a new browser window?

text: I setup a link to web app that my company uses on my desktop, which resulted in a `.desktop` file like this:               [Desktop Entry]     Icon=/home/kris/Pictures/gplus.png     Name[en_US]=Google Plus     Name=Google Plus     Type=Link     URL[$e]=https://plus.google.com/      This works pretty well, but I can't figure out how to add an option to force it to open in a new window, or possibly even as an "app" window. I have tested in a console that what I want will work:               $ firefox -new-window plus.google.com      Does anyone know of a way to modify the `.desktop` to do this? Is the only way to re-do it as a `Exec` style launcher? Is there an editor in KDE for this?


title: How could i flip content of a binary file with bash commands

text: I was wondering if it's possible to do bitwise conversion on a binary file, with bash commands, (in my case bitwise negation).


title: Live USB stuck in software rendering mode

text: I recently aquired an Aspire E15 Touch from the store to find i had a bit of an issue with using Linux Mint or any Linux distro for that matter. At first, Mint booted, i heard the splash noise, but my screen was black. Now after adding `nomodeset` to the GRUB boot command, it loaded the desktop properly, but now it's stuck in software rendering mode. Is there any way to fix this? I don't have Mint currently installed. I'm just running it from the Live USB. Here's a few extra details: I'm running in legacy boot mode, and i have USB devices prioritized over everything else in the boot order. The native OS that came packed with my computer is Windows 8.1.


title: Problem with Disk or Cable or Controler or?

text: i plug in a new disk and found this in systemlog on my debian:                [639.840138] ata9.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen     [  639.840379] ata9.00: failed command: IDENTIFY DEVICE     [  639.840532] ata9.00: cmd ec/00:01:00:00:00/00:00:00:00:00/00 tag 23 pio 512 in     [  639.840536]          res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)     [  639.840888] ata9.00: status: { DRDY }     [  639.841055] ata9: hard resetting link     [  640.168183] ata9: SATA link up 6.0 Gbps (SStatus 133 SControl 300)     [  641.120031] ata9.00: configured for UDMA/133     [  641.120064] ata9: EH complete     [ 1840.864140] ata9.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen     [ 1840.864293] ata9.00: failed command: IDENTIFY DEVICE     [ 1840.864399] ata9.00: cmd ec/00:01:00:00:00/00:00:00:00:00/00 tag 6 pio 512 in     [ 1840.864403]          res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)     [ 1840.864675] ata9.00: status: { DRDY }     [ 1840.864755] ata9: hard resetting link     [ 1841.192185] ata9: SATA link up 6.0 Gbps (SStatus 133 SControl 300)     [ 1841.456378] ata9.00: configured for UDMA/133     [ 1841.456427] ata9: EH complete      It seems to have no problems except the speed from 6.0 to udma 133. i ask myself if the disk will die or the cable is damage or anything else perhaps the powerunit cant work with 9 disks. Any idea to analyse this? I will change the sata cable next.


title: When is it useful to use "grep -- SOMEPATTERN"?

text: So under Linux/AIX where ever.., when is it useful to use:               grep -- SOMEPATTERN      the Question is the "--" part. When is it usefull to use?


title: How to convince tar (etc.) to archive block device contents?

text: I have six Linux logical volumes that together back a virtual machine. The VM is currently shutdown, so its easy to take consistent images of them. I'd like to pack all six images together in an archive. Trivially, I could do something like this:               cp /dev/Zia/vm_lvraid_* /tmp/somedir     tar c /tmp/somedir | whatever      But that of course creates an extra copy. I'd like to avoid the extra copy. The obvious approach:               tar c /dev/Zia/vm_lvraid_* | whatever      does not work, as tar recognizes the files a special (symlinks in this case) and basically stores the `ln -s` in the archive. Or, with `--dereference` or directly pointed at `/dev/dm-X`, it recognizes them as special (device files) and basically stores the `mknod` in the archive. I've searched for command-line options to tar to override this behavior, and couldn't find any. I also tried `cpio`, same problem, and couldn't find any options to override it there, either. I also tried `7z` (ditto). Same with `pax`. I even tried `zip`, which just got itself confused. edit: Looking at the source code of GNU tar and GNU cpio, it appears neither of them can do this. At least, not without serious trickery (the special handling of device files can't be disabled). So, suggestions of serious trickery would be appreciated or alternate utilities. _TLDR:_ Is there some archiver that will pack multiple disk images together (taken from raw devices) and stream that output, without making extra on-disk copies? My preference would be output in a common format, like POSIX or GNU tar.


title: Linux file command classifying files

text: I need to recognize type of data contained in random files. I am new to Linux. I am planning to use the `file` command to understand what type of data a file has. I tried that command and got the output below. Someone suggested to me that the `file` command looks at the initial bytes of a file to determine data type. The `file` command doesn't look at a file extension at all. Is that correct? I looked at the man page but felt that it was too technical. I would appreciate if anyone can provide a link which has much simpler explanation regarding how the `file` command works. What are different possible answers that I could get after running the `file` command? For example, in the transcript below I get JPEG, ISO media, ASCII, etc: The screen output is as follows                m7% file date-file.csv     date-file.csv: ASCII text, with CRLF line terminators     m7% file image-file.JPG     image-file.JPG: JPEG image data, EXIF standard     m7% file music-file.m4a     music-file.m4a: ISO Media, MPEG v4 system, iTunes AAC-LC     m7% file numbers-file.txt     numbers-file.txt: ASCII text     m7% file pdf-file.pdf     pdf-file.pdf: PDF document, version 1.4     m7% file text-file.txt     text-file.txt: ASCII text     m7% file video-file.MOV     video-file.MOV: data      * * * **Update 1** Thanks for answers and they clarified a couple of things for me. So if I understand correctly folder /usr/share/mime/magic has a database that will give me what are the current possible file formats (outputs that I can get when I type file command and follow it by a file). is that correct? Is it true that whenever 'File' command output contains the word "text" it refers to something that you can read with a text viewer, and anything without "text" is some kind of binary?


title: Why doesn't `restore` display my UTF-8 encoded filenames correctly in interactive mode?

text: When using the interactive mode of the `restore` utility to restore backups made with `dump` UTF-8-encoded filenames doesn't display correctly, see example below. The `??`s should be `ö`s ...               $ sudo restore -if dumpfile     Dump tape is compressed.     restore > ls     ./somedir:     lagerl??fSelma_k??rkarlen.txt          restore >      How come? What are the solutions do this problem? The dump and the restore are performed on the same machine, that has the locale set as follows:               $ locale     LANG=sv_SE.UTF-8     LANGUAGE=sv:en_US:en


title: modify date of symlink on bindfs

text: I have the feeling that I cannot modify the date of symlinks on bindfs. See the following transcript of what I tried. On EXT4:               nailor@needle:~$ mkdir /tmp/ex     nailor@needle:~$ cd /tmp/ex     nailor@needle:/tmp/ex$ touch realfile       nailor@needle:/tmp/ex$ ln -s realfile linkfile     nailor@needle:/tmp/ex$ stat realfile linkfile       File: `realfile'       Size: 0           Blocks: 0          IO Block: 4096   regular empty file     Device: 801h/2049d  Inode: 22678377    Links: 1     Access: (0644/-rw-r--r--)  Uid: ( 1000/  nailor)   Gid: ( 1000/  nailor)     Access: 2013-09-09 00:46:15.356004837 +0200     Modify: 2013-09-09 00:46:15.356004837 +0200     Change: 2013-09-09 00:46:15.356004837 +0200      Birth: -       File: `linkfile' -> `realfile'       Size: 8           Blocks: 0          IO Block: 4096   symbolic link     Device: 801h/2049d  Inode: 22678380    Links: 1     Access: (0777/lrwxrwxrwx)  Uid: ( 1000/  nailor)   Gid: ( 1000/  nailor)     Access: 2013-09-09 00:46:34.299766676 +0200     Modify: 2013-09-09 00:46:27.227855586 +0200     Change: 2013-09-09 00:46:27.227855586 +0200      Birth: -     nailor@needle:/tmp/ex$ touch -h realfile linkfile     nailor@needle:/tmp/ex$ stat realfile linkfile           File: `realfile'       Size: 0           Blocks: 0          IO Block: 4096   regular empty file     Device: 801h/2049d  Inode: 22678377    Links: 1     Access: (0644/-rw-r--r--)  Uid: ( 1000/  nailor)   Gid: ( 1000/  nailor)     Access: 2013-09-09 00:46:46.931607877 +0200     Modify: 2013-09-09 00:46:46.931607877 +0200     Change: 2013-09-09 00:46:46.931607877 +0200      Birth: -       File: `linkfile' -> `realfile'       Size: 8           Blocks: 0          IO Block: 4096   symbolic link     Device: 801h/2049d  Inode: 22678380    Links: 1     Access: (0777/lrwxrwxrwx)  Uid: ( 1000/  nailor)   Gid: ( 1000/  nailor)     Access: 2013-09-09 00:46:49.899570563 +0200     Modify: 2013-09-09 00:46:46.931607877 +0200     Change: 2013-09-09 00:46:46.931607877 +0200      Birth: -      On bindfs:               nailor@needle:/tmp/ex$ mkdir sub           nailor@needle:/tmp/ex$ bindfs -n . sub     nailor@needle:/tmp/ex$ cd sub     nailor@needle:/tmp/ex/sub$ touch -h realfile linkfile      nailor@needle:/tmp/ex/sub$ stat realfile linkfile        File: `realfile'       Size: 0           Blocks: 0          IO Block: 4096   regular empty file     Device: 17h/23d Inode: 2           Links: 1     Access: (0644/-rw-r--r--)  Uid: ( 1000/  nailor)   Gid: ( 1000/  nailor)     Access: 2013-09-09 00:47:34.000000000 +0200     Modify: 2013-09-09 00:47:34.000000000 +0200     Change: 2013-09-09 00:47:34.755006803 +0200      Birth: -       File: `linkfile' -> `realfile'       Size: 8           Blocks: 0          IO Block: 4096   symbolic link     Device: 17h/23d Inode: 3           Links: 1     Access: (0777/lrwxrwxrwx)  Uid: ( 1000/  nailor)   Gid: ( 1000/  nailor)     Access: 2013-09-09 00:46:49.899570563 +0200     Modify: 2013-09-09 00:46:46.931607877 +0200     Change: 2013-09-09 00:46:46.931607877 +0200      Birth: -      As you can see, the times for the symlink did not change on bindfs. This is a problem with e.g. rsync, because this way I get:               rsync: failed to set times on "link1": No such file or directory (2)     rsync: failed to set times on "link2": No such file or directory (2)     ...      I found this to be a known problem with sshfs ( http://bugs.debian.org/cgi- bin/bugreport.cgi?bug=640038 ) but found nothing mentioning bindfs. Now I am wondering if there is any such mentioning and/or and explanation for the missing functionality and/or an answer if this affect fuse in general...


title: Low-level disk access in FreeBSD

text: I'm developing a utility that needs to do low-level random access of disks (read individual sectors). In Linux I accomplish this by accessing the corresponding block device (e.g. `/dev/sda`). However, I've just installed FreeBSD, and I noticed that it doesn't have block devices. Instead, disks appear as character devices, which don't allow random "seeking". Is there a way to accomplish this in FreeBSD? (i.e. low-level random access)


title: Directory diff in bash script

text: I have a bash script that expands two archives (jar files) into two directories and then does a diff of the two folders. I want the diff to be piped into a file so I do this in the bash file.               diff -r $originalJarExtracted $assembledJarExtracted >target/$diffList      While this works it also stops the script and anything afterwards is not executed. How can I get diff to pipe its output into the file and for the script to keep going. I looked at the info and man pages for diff but could not get this to work. I am running the script on the mac btw. Just for reference the scripts are on github


title: Emacs auto encryption and gpg

text: Emacs encrypts/decrypts `.gpg` files automatically. But recently I have lost the ability to decrypt files encrypted by the Linux `gpg` tool and vice versa. I use:   * passphrase symmetric encryption   * gnupg 1.4.11   * emacs 24.0.92.1   * Debian sid Decrypting using `gpg` (encrypted by emacs) gives:               gpg: decryption failed: bad key      Decrypting using emacs (encrypted by gpg) gives:               epa-file--find-file-not-found-function: Opening input file: Decryption failed,      Any idea how to avoid this?


title: Using real time kernel headers to compile userspace code vs default headers

text: Per customer requirements, I installed CentOS 5.6 with the default kernel. With this kernel installed, the time.h file includes the `#define CLOCK_MONOTONIC`. Now, a real-time kernel was installed along with the kernel-devel and our code would like to use `CLOCK_MONOTONIC_RAW`. It does exist as a part of the kernel's header files, but when I compile our code, it does not find it in the standard userspace includes. My question is, what is the proper procedure to including/replacing the `time.h` found by default with the real-time kernel? From my research, it looks like symlinks are bad, so how should it be handled? What is the procedure or process? Upgrading to CentOS 6.0 or 5.7 is not an option per customer requirements.


title: Remotely work on Red Hat Box

text: So we're working on a project and currently,have the need to edit/save files remotely on a Red Hat box.   We are accessing this files mainly with sublime-text.   So we are trying to figure out what is the best option to do this, for example:   To have a folder on the ~user/remoteShare   and to be able to edit/save/delete any file under this remote folder from my local sublime-text editor I'm using local Ubuntu 14.04 and Red Hat Enterprise Linux 6 on the remote.


title: XEmacs: load all files in /home/barry/.emacs_barry

text: XEmacs creates an .emacs_barry file in my home directory that contain my active buffers + point positions in those buffers(?). It looks like this:               "Norma Jean"          "/home/barry/plan1.txt" 4504398     nil     "/home/barry/plan1.txt" 4504398     "/home/barry/file7.txt" 48480     "/home/barry/file9.txt" 32086     [...]      Previously, xemacs would restore my session on restart, but it no longer does that. I've tried "apropos session" and tried several commands to no avail. How do I tell xemacs to load all the files in .emacs_barry? Or, can I just get emacs to load a list of files in a given file/buffer? I realize my xinit.el or something is broken, but this is the only thing I really miss.


title: Desktop indexing with KDE

text: I have just upgraded to KDE 4.13 on Arch Linux and it has brought my system to a screeching halt. I am pretty sure it has something to do with Baloo the new desktop search indexing system. I am not sure I ever use desktop search although I use `kontact` and the associated programs (e.g., `kmail`, `korganizer`, and `kaddressbook`). What exactly does Baloo do and how does it interact with Nepomuk and Akonadi and KDE PIM/`kontact` and what would happen if I disable it by blacklisting my home directory?


title: Start linux in text mode

text: I know that it ask so many time, how to boot Linux in text mode; but all solution that i got is on installed Linux system, not on fresh system. Is there any way to load any Linux in live mode in text mode or console mode, not any service related to X must be started. Are there is any kernel option or parameter that don't touch X system and start the system in text mode, in Debian based system like Kali ? I want to start Kali in live mode on window machine, but in text mode, how it can be ?


title: How to let `named` (bind9) forward certain domains to a different nameserver?

text: In `dnsmasq`, it's possible to forward domains to different nameservers. How can I do that in `named`?               server=/foo.com/10.0.10.1     server=/vpn.foo.com/8.8.8.8


title: How to make dnsmasq avoid DNS cache poisoning?

text: Some domain gets DNS cache poisoning if dnsmasq is the nameserver. But the problem is gone if switch to BIND (named). Is there a easy configuration of dnsmasq so that DNS cache poisoning can be avoid?


title: Display numbers in meters of htop

text: My server is running on debian Wheezy and htop 1.0.1 but it does not display any values on the meters bar except the 100.0% value of CPUs. Is it possible to show always the values of a meter? This is the current display of htop on my server: ![current](https://lh4.googleusercontent.com/-VhkAyOpemk4/U1e0DT_zA5I/AAAAAAABplk/-qBLFkjBgv8/w621-h112-no/Capture.JPG) But I want to have the numbers always on my meters like on this screenshot from http://hisham.hm/htop/index.php?page=screenshots: ![expected](http://hisham.hm/htop/htop-0.4.png) My htoprc is located in ~/.config/htop/htoprc and contains the following data:               # The parser is also very primitive, and not human-friendly.     fields=0 48 17 18 38 39 40 2 46 47 49 1     sort_key=46     sort_direction=1     hide_threads=0     hide_kernel_threads=1     hide_userland_threads=0     shadow_other_users=0     show_thread_names=0     highlight_base_name=1     highlight_megabytes=1     highlight_threads=0     tree_view=0     header_margin=1     detailed_cpu_time=0     cpu_count_from_zero=0     color_scheme=0     delay=15     left_meters=LeftCPUs2 CPU Memory Swap     left_meter_modes=1 1 1 1     right_meters=RightCPUs2 Tasks LoadAverage Uptime     right_meter_modes=1 2 2 2


title: Stuck between these two books?

text: I'm new to Unix/Linux platforms so I was hunting for good books on *nix... I soon realized there is not one book or resource. But to gain confidence on the command line and scripting (the real *nix user) I finally found two books: 1.The Linux Command Line 2.Linux Command Line and Shell Scripting Bible Both seem to be great. The second one is almost double the size of the first one (I don't mind, I like reading books). But which one is more informative and also has better coverage of topics? It's for you people to tell. I looked at the reviews of the second one on Amazon. But I couldn't find the reviews of the first one. So please tell me which one should I get? Thanks.


title: How do I get the http status of a site in bash?

text: I figure curl would do the job. I wrote in a bash script:               #!/bin/sh          function test {         res=`curl -I $1 | grep HTTP/1.1 | awk {'print $2'}`         if [ $res -ne 200 ]         then             echo "Error $res on $1"         fi     }            test mysite.com     test google.com      The problem here is no matter what I do I can't get it to stop printing the below to stdout:                 % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current      I want a cronjob to run this script and if it writes such a message then everytime I run it I'll get an email because something has been printed to stdout in cron, even though the site may be fine. How do I get the status code without getting junk into stdout? This code works except the bonus junk to the stdout preventing me from using it.


title: colorizing ls output based on filename

text: i'm on freeBSD and trying to colorize `ls` output, so i've added               alias ls        ls -lhG     setenv LSCOLORS gxfxcxdxbxegedabagacad      to my `.cshrc` and it works. but what i really want to - is to be able to colorize (for example) `*.pl` and `*.php` files different ways to quicly distiguish it. Can i modify `LSCOLORS` some way to colorize files dependong on their name?


title: How to setup DHCPD on two interfaces (Angstrom)

text: I have an embedded system running Angstrom just fine. This platform has multiple uses, one of which is to act as a home router, so it has wireless and wired network interfaces, which work correctly. I'm trying to configure DHCPD so that each interfaces hands out IP addresses from the same range, for instance 192.168.1.2 - 192.168.1.100, and I can't figure this out. Everything works fine if the interfaces handle different subnets, but when both interfaces are on the same subnet, things don't work. I've seen conflicting answers out there about whether this is even possible - but all home routers do this exact scenario, so there must be a way. I don't have my config files right now - will post them later. So I'm looking for advice if this is even possible. Tnanks! Update: here's the script that worked - thanks Bill               # route all packets between all interfaces     iptables -t nat -A POSTROUTING -s 172.16.0.0/16 -d 172.16.0.0/16 -j ACCEPT     iptables -t nat -A POSTROUTING -s 172.16.0.0/16 -j MASQUERADE          # set the MAC address           ifconfig eth0 0 0.0.0.0     ifconfig eth0 down     ip link set eth0 address 00:80:44:0F:06:C7          # setup the bridge          brctl addbr br0     brctl stp br0 off     brctl addif br0 eth0          # hostapd sets up the wireless before it is added to bridge       hostapd -B /etc/hostapd/hostapd.conf       brctl addif br0 wlan0       ifconfig wlan0 up       ifconfig wlan0 0 0.0.0.0            ifconfig eth0 up       ifconfig br0 172.16.10.247 netmask 255.255.0.0 up       route add default gw 172.16.1.1 br0


title: How can I tell what device or file name I am redirecting to

text: From within a shell script (sh/bash), how can I tell what device or file name I am redirecting to? For example, I have a shell script named `script.sh`. I run the shell script and redirect STDOUT to a file named `out.txt`, and redirect STDERR to a file named `err.txt`. So, that would look like this:               $ ./script.sh > out.txt 2> err.txt      Now, from within the shell script, I can tell **_if_** STDOUT (or STDERR) is being redirected, or not:               if [ -t 1 ]; then...     if [ ! -t 1 ]; then...      but, once I know STDOUT (or STDERR) is being redirected, how can I tell **_where_** it is being rdirected to?


title: How do I change which partition's grub.cfg is used? Can I merely reinstall grub?

text: I realize the title might be a bit ambiguous, so let me expand some more. This computer is ~3 years old at this point. For the first two, I used Ubuntu 11.04 installed on one partition; about a year ago, I switched to LMDE using a different partition on the same drive (Ubuntu and swap inside an extended, LMDE in a primary outside of and next to the extended). When I installed LMDE, somehow I "chose" to continue using the grub installation stored on and maintained by the Ubuntu partition; in retrospect this was probably a mistake. The end result is that despite going through a number of kernel updates in LMDE, I'm still using 3.2 even though I have 3.11 installed (and perhaps more shockingly, LMDE apparently runs flawlessly with the old kernel). Since the old partition's grub menu isn't being updated, I can't boot with the new kernel; meanwhile, LMDE has kept its own version of grub up to date (with the new kernels), and `sudo update-grub` updates that file fine, but of course none of it matters since the MBR still boots using the old partition's grub. How can I change/fix this? I tried to chroot to my old Ubuntu install but `update-grub` fails with `/usr/sbin/grub-probe: error: cannot find a device for / (is /dev mounted?).`, which I interpret to mean that the old grub is smarter than the chroot. So, would it be safe for me to merely run `grub-install /dev/sdb` (from inside LMDE), or will that somehow break something? If the latter, then what can I do to fix this? Normally I would just try a couple of things, but of course this could potentially make my system unusable, which is something I want to avoid.


title: Is this redirecting to /dev/null?

text: I found this script on the arch wiki which prefixes an `ffmpeg` command like this               < /dev/null ffmpeg -i "$a" -qscale:a 0 "${a[@]/%flac/mp3}"      I understand the ffmpeg command, it is the `< /dev/null` part. Is it supposed to redirect the verbose output to `/dev/null/`?


title: Enabling carl9170 in xconfig

text: I am building the sunxi-linux kernel for a cubieboard and I need the carl9170 driver to make a usb wifi adapter work. I am using the 3.4 sunxi kernel, and no matter what I do in xconfig, I cannot enable the option CONFIG_CARL9170 because it is greyed out. I tried satifying all of its dependcies, but it is still greyed out. How can I enable the carl9170 driver?


title: the different type network adapter in virtual machines

text: There are different types of network adapter in VMware workstation:               bridged     nat     host-only     custom      what the difference between this types ,and when can I use each one?


title: Try to disable console output, console=null doesn't work

text: as mentioned above, I want to to completely turn off the console output, but putting `console=` or `console=null` in the kernel command line doesn't change a thing. When I enque `quiet` to the kernel command line it approximates this job, but I want to completely turn off the output. So why is `console=null` not working, there isn't even an error message?


title: Jboss application startup and shutdown asks for password. How to automate with init script?

text: Jboss application startup and shutdown of BMC-IDM asks for password (called keystore password, some Java stuff). How to automate with init script? Stop application               > stop_idm_suite.sh     Suite system password:      start application               > start_idm_suite.sh     -Didm.suite.home=/opt/jboss-app/bmc/idm/idm-suite7.5       -Djava.protocol.handler.pkgs=com.sun.net.ssl.internal.www.protocol -Djavax.net.ssl.trustStore=/opt/jboss-app/bmc/idm/idm-suite7.5/security/keystore/idm.keystore -Dlog4j.configuration=-there-aint-no-such-file- -Djava.awt.headless=true -Didoox.debug.logger=log4j -Xms1024m -Xmx1024m -XX:MaxPermSize=258m -XX:PermSize=128m -Doracle.home=/opt/jboss-app/oracle/product/10.2.0/client_1 -Dess.root=/opt/jboss-app/bmc/idm/idm-suite7.5/ess_api          Suite system password:      Tried with start_idm_suite.sh < password-file but no luck


title: Recovering files from partitions at a corrupted SD card?

text: I got a problem with my SD card which had got Raspbian. Everything seemed to be ok while working with the raspberry. I inserted it to my laptop running Ubuntu 12.04.4 to fetch some files. It first couldn't load the files from Home partition (boot partition was shown too)so I tried to unmount it from nautilus and ejected the card manually. Then, when I inserted the card again, it showed one only partition named "+00, and all it shows are files with out any format or extension known and with weird names. Tried to boot the raspberry with the card but naturally it didn't boot at all. Partitions actually seem to have disappeared. Is there any way to recover my files? `fdisk -l` output:               Disk /dev/sdb: 8068 MB, 8068792320 bytes     249 heads, 62 sectors/track, 1020 cylinders, total 15759360 sectors     Units = sectors of 1 * 512 = 512 bytes     Sector size (logical/physical): 512 bytes / 512 bytes     I/O size (minimum/optimal): 512 bytes / 512 bytes     Disk identifier: 0x000981cb             Device Boot      Start         End      Blocks   Id  System     /dev/sdb1            8192      122879       57344    c  W95 FAT32 (LBA)     /dev/sdb2          122880    15759359     7818240   83  Linux


title: How to debug system freeze?

text: I'm experiencing strange bug when I close lid of my laptop - system freezes (no reaction on keys, no response form ssh) hard and displays some strange colour effects. The kernel log (after reboot) shows nothing. My question is - how to debug it? Maybe there's a way to track last called kernel function or something similar?


title: Setting mobile broadband connection in Fedora 17

text: I am using a Dell Precision M4500. I've realized that there is a SIM slot underneath the battery slot, I suppose it is for using mobile broadband access. I am usually connecting to the internet through the tethered signal from my Android mobile and I was thinking that it maybe easier to configure the PC to use the SIM from my phone and get internet access directly. The first thing I need to confirm is that there is actually a broadband modem or some device that can connect to 3G and not just the slot in the computer bones. I've tried `lspci` and `lsusb` but I cannot recognize any device that could be a 3G modem. Here the output               $ lspci     00:00.0 Host bridge: Intel Corporation Core Processor DRAM Controller (rev    02)     00:01.0 PCI bridge: Intel Corporation Core Processor PCI Express x16 Root Port (rev 02)     00:19.0 Ethernet controller: Intel Corporation 82577LM Gigabit Network Connection (rev 05)     00:1a.0 USB Controller: Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller (rev 05)     00:1b.0 Audio device: Intel Corporation 5 Series/3400 Series Chipset High Definition Audio (rev 05)     00:1c.0 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 1 (rev 05)     00:1c.1 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 2 (rev 05)     00:1c.2 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 3 (rev 05)     00:1c.3 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 4 (rev 05)     00:1d.0 USB Controller: Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller (rev 05)     00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev a5)     00:1f.0 ISA bridge: Intel Corporation Mobile 5 Series Chipset LPC Interface Controller (rev 05)     00:1f.2 RAID bus controller: Intel Corporation Mobile 82801 SATA RAID Controller (rev 05)     00:1f.3 SMBus: Intel Corporation 5 Series/3400 Series Chipset SMBus Controller (rev 05)     00:1f.6 Signal processing controller: Intel Corporation 5 Series/3400 Series Chipset Thermal Subsystem (rev 05)     01:00.0 VGA compatible controller: nVidia Corporation GT216 [Quadro FX 880M] (rev a2)     01:00.1 Audio device: nVidia Corporation High Definition Audio Controller (rev a1)     03:00.0 Network controller: Intel Corporation Centrino Ultimate-N 6300 (rev 35)     04:00.0 CardBus bridge: Ricoh Co Ltd Device e476 (rev 02)     04:00.1 SD Host controller: Ricoh Co Ltd MMC/SD Host Controller (rev 03)     04:00.4 FireWire (IEEE 1394): Ricoh Co Ltd FireWire Host Controller (rev 03)     3f:00.0 Host bridge: Intel Corporation Core Processor QuickPath Architecture Generic Non-core Registers (rev 02)     3f:00.1 Host bridge: Intel Corporation Core Processor QuickPath Architecture System Address Decoder (rev 02)     3f:02.0 Host bridge: Intel Corporation Core Processor QPI Link 0 (rev 02)     3f:02.1 Host bridge: Intel Corporation Core Processor QPI Physical 0 (rev 02)     3f:02.2 Host bridge: Intel Corporation Core Processor Reserved (rev 02)     3f:02.3 Host bridge: Intel Corporation Core Processor Reserved (rev 02)     $ lsusb     Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub     Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub     Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub     Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub     Bus 001 Device 003: ID 05ca:1814 Ricoh Co., Ltd HD Webcam     Bus 002 Device 003: ID 046d:c52b Logitech, Inc. Unifying Receiver     Bus 002 Device 004: ID 413c:8187 Dell Computer Corp. DW375 Bluetooth Module     Bus 002 Device 005: ID 0a5c:5800 Broadcom Corp. BCM5880 Secure Applications Processor`      Can someone help me understand if what I want to do is possible?


title: Awk: check for length of field

text: In `awk`. I am working on Solaris 10, so it's probably an old(er) version of `awk`. I came up with this rudimentary one-liner that works, at least for my particular input.               awk -F\; '$3 ~ /[ ]*...............................*/' file.csv       There may or may not be spaces around the separators hence the `[ ]*` part of the regex. Wanting to avoid printing 30 times the dot `.` character, I tried the following:               awk -F\; '$3 ~ /[ ]*.\{30\}.*/{print $3}' file.csv      This did not return any result. If it helps in any way, I'm using `ksh88`. What would be the best way to avoid entering those 30 consecutive dots?


title: How do I extract all .htaccess files from a tarball?

text: I want to extract all .htaccess files from a tarball, how can I do so? I see only one mention of "include" in the manual page of `tar` which is not related with an option for including only certain filenames at all. Is there an alternative other than mentioning all paths as argument?


title: Remove user space quota in Ubuntu 12.04?

text: I'm trying to install Unity3D but I only have 1.5GB (EDIT: I forgot to mention this is what the Unity3D installer says, but I have also had problems with downloading things of large sizes) free space left in my home directory. How can I remove/extend my user quota? output of `df -h` as requested:               amohr@ubuntu:~$ df -h     Filesystem      Size  Used Avail Use% Mounted on     /dev/loop0       29G   27G  1.6G  95% /     udev            2.5G  4.0K  2.5G   1% /dev     tmpfs           993M  936K  992M   1% /run     none            5.0M     0  5.0M   0% /run/lock     none            2.5G  4.4M  2.5G   1% /run/shm     /dev/sda3       293G   30G  264G  11% /host      I used a 300GB partition for Ubuntu and haven't installed much.. there is no way I can be running out of space.


title: Why does mount have the SUID bit set?

text: I'm not sure why `mount` is installed with SUID bit on many distributions. In graphical environment, it doesn't require user to type the `mount` command to mount a partition. Normally udisks will communicate with another daemon to mount the drive. And on a server, I don't see the necessity as well. So, is there any reason to have SUID bit set?


title: IDE or Editor for Front-end development (JavaScript/HTML/CSS)?

text: These days APTANA seems to be the IDE of choice for Javascript developers although there is no package for Ubuntu or any other distribution. How do I install Aptana on Ubuntu? Is it stable? (if you can suggest alternatives they are welcome)


title: Slow boot, how to program fsck to run like a cron job?

text: Sometimes my web server crashes, and it may take hours to boot. I've been told `fsck` might be the culprit, because it can only be run during boot, only runs after X days and Y mounts, and if the server was up for a lot of time, on the next reboot it will for sure be slow. So what can I do to fix this? I found about `tune2fs`. But I will need to coordinate that with a reboot cronjob? Say I do `tune2fs -i 1w /dev/sda1`. I'm afraid that if I set a cron to run after that date (which I can get with `-l`), on the following dates they will be out of sync, won't they? Another thing that is not clear: after a crash, will fsck run anyway no matter what? Should it? Will it still be slow, even if it was run less than a week ago?


title: Cross-compiling and CMake

text: I am trying to cross-compile CGAL on an amd64 Linux machine to the ARM architecture. CGAL uses CMake for building. CGAL has several dependencies, including GMP and MPFR libraries. When CMake runs, it needs to determine the versions of these dependencies. To find the versions, CMake compiles and runs several small test programs that simply link with these libraries and output their versions. This works fine during a regular, non-cross-compiled build. But when I cross-compile, naturally these test programs will not run on the host machine. Here's an example:               /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec.dir/link.txt --verbose=1     /opt/Company/ArmTools_GCC435_GLIBC_Q3_2011/bin/arm-rc-linux-gnueabi-g++        -fPIC CMakeFiles/cmTryCompileExec.dir/print_GMP_version.cpp.o  -o cmTryCompileExec -rdynamic /home/pmw/Software-Engineering/build/Lib/mpir-2.6.0/arm/lib/libgmp.a     gmake[1]: Leaving directory `/home/pmw/Software-Engineering/SW_Tools/CGAL-4.1/CMakeFiles/CMakeTmp'     /home/pmw/Software-Engineering/SW_Tools/CGAL-4.1/CMakeFiles/CMakeTmp/cmTryCompileExec: /home/pmw/Software-Engineering/SW_Tools/CGAL-4.1/CMakeFiles/CMakeTmp/cmTryCompileExec: cannot execute binary file          -- USING GMP_VERSION = 'unknown'      I found a suggestion (if I understand it correctly) to specify the GMP version explicitly; that should keep CMake from trying and failing to determine it. So I created a file containing this line:               SET(GMP_VERSION 2.6.0)      and invoked CMake with the argument `-C path/to/my/file`. But that didn't change anything. Then I tried invoking CMake with the argument `-DCMAKE_TOOLCHAIN_FILE=/path/to/my/file` instead. Again, no effect. I see that CMake is able to find and parse this file, however. So, how can I convince CMake to not try to build and execute cross-compiled programs on the host machine? I apologize in advance if this Unix & Linux StackExchange site is not the best place for this question. Last week I posted my question on the CGAL mailing list (which is now the top three Google results for "cross-compiling cgal"; I am famous!) but received no replies.


title: xe sr-create type=ext results in backend failure

text: I'm trying to create an ext based storage repository:               xe sr-create content-type="local SR" \        host-uuid=c7030a1f-15e3-7e7d-2932-b30200a15917 type=ext \        device-config-device=/dev/sdb1 \        shared=false name-label="Local File SR"      Results in:               There was an SR backend failure.     status: non-zero exit     stdout:     stderr: Traceback (most recent call last):       File "/usr/lib/xcp/sm/EXTSR", line 320, in <module>         SRCommand.run(EXTSR, DRIVER_INFO)       File "/usr/lib/xcp/sm/SRCommand.py", line 263, in run         ret = cmd.run(sr)       File "/usr/lib/xcp/sm/SRCommand.py", line 94, in run         return self._run_locked(sr)       File "/usr/lib/xcp/sm/SRCommand.py", line 131, in _run_locked         return self._run(sr, target)       File "/usr/lib/xcp/sm/SRCommand.py", line 214, in _run         return sr.create(self.params['sr_uuid'], long(self.params['args'][0]))       File "/usr/lib/xcp/sm/EXTSR", line 225, in create         util.pread2(cmd)       File "/usr/lib/xcp/sm/util.py", line 177, in pread2         return pread(cmdlist, quiet = quiet)       File "/usr/lib/xcp/sm/util.py", line 164, in pread         (rc,stdout,stderr) = doexec(cmdlist_for_exec)       File "/usr/lib/xcp/sm/util.py", line 129, in doexec         proc = subprocess.Popen(args,stdin=subprocess.PIPE,stdout=subprocess.PIPE,stderr=subprocess.PIPE,close_fds=Tru       File "/usr/lib/python2.7/subprocess.py", line 679, in __init__         errread, errwrite)       File "/usr/lib/python2.7/subprocess.py", line 1259, in _execute_child         raise child_exception     OSError: [Errno 2] No such file or directory


title: Minimize the current width of a window in Vim

text: To maximize the width of a current window in Vim, we type:               ctrl-w |      Is there a similar alternative for minimizing a current window in Vim?


title: Google chrome has the wrong docky icon

text: I'm using fedora 20 with xfce. The launcher icon on docky is the xfce panel icon instead of the google chrome icon, I've made sure the correct icon is inside /usr/share/applications but it's still the panel icon.


title: Running additional binaries in Wine?

text: I have a Wine app with which I need to launch an additional executable after the main program launches. This is on a Cider installation of an app. It is a simple executable that lives in any folder and simply needs to be executed and run in parallel with the primary application.