title: Newly installed Debian install is not recognized

text: I recently formatted an entire drive so I could install Linux on it. The partitions:               15 GB, Primary, sda1, mount point: /     232.9 GB Logical, sda5, mount point: /home     3 GB Logical, sda6, swap However, upon install completion (with the GRUB bootloader) and reboot, the BIOS reports that it cannot find a bootable device. ~~I am thinking that I did not set sda1's`bootable` flag. If this is the case - is there some way I can do this from the Debian CD's "rescue mode"?~~ The exact error message from the BIOS is `No bootable device -- insert boot disk and press any key`. _Attempted_ :   * Removed all other boot options (CD, USB) from the boot list   * Swapped cabled   * Tried other SATA ports   * Swapped hard drives (with new SSD)


title: Debian Testing or Debian Sid?

text: I'm currently downloading Debian 6 DVD. I don't want to use Stable, I want to use Testing or Sid, but I don't know wich one is better for me. Is Sid really unstable ? Is Testing up-to-date like Arch does ? Or it's like a non-rolling release distro ? Thanks


title: Is there a way to combine a file with crontab?

text: I'm trying to create an interface that will show a message on the screen every set time. Cron is an ideal tool for this case only it doesn't read data from a file during it's run (as far as I could tell). I could create a bunch of file to read but this is redundant. Is there a way to add a line into the user crontab file or remove a line from it after I have read it from a file?


title: How to verify the RPM database?

text: I need to verify that the RPM database (not an RPM, the database in `/var/lib/rpm`) is not corrupt or inconsistent, in a manner suitable for scripting (i.e. will return exit code 0 if good and something else if corrupt). I can use `db_verify` to verify the individual Berkeley databases, but suppose the individual Berkeley databases are totally valid and the inconsistency is across databases. I experimented by deleting (renaming) a database, and `rpm -qa --dump` was oblivious and `rpm -Va` just regenerated it with a warning. I suppose I could look for the string "warning:" in the output, but that seems unreliable. Besides I don't really want to verify the files, I want to verify the database. I've searched for OpenSuSE RPM-related packages and found nothing apropos. Any suggestions? I'd prefer something designed to do a thorough verification as opposed to just a dump.


title: Giving cron permission to execute command

text: I'm trying to get a ruby script to run via cron. The cron job looks like this:               * * * * * /usr/local/rvm/rubies/ruby-2.0.0-p353/bin/ruby /usr/share/adafruit/webide/repositories/shed_watcher/lib/shed_watcher.rb >> /tmp/cron_shed_watcher.log 2>&1      I've encountered a couple of problems. The first was that the environment cron runs in could find one of the required gems:               require "rest_client"      This was solved by setting the `GEM_PATH` in the crontab:               GEM_PATH=/usr/local/rvm/gems/ruby-2.0.0-p353:/usr/local/rvm/gems/ruby-2.0.0-p353@global      The second problem is that the script, running on Occidentals on a Raspberry Pi, makes use of a temperature probe and needs to call:               `modprobe w1-gpio`     `modprobe w1-therm`      i.e. `modprobe` commands in backticks. Cron cannot execute this, instead I get an "operation not permitted" message. `modprobe` is found in `/sbin` so I added a path entry to my crontab:               PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin/usr/local/rvm/gems/ruby-2.0.0-p353/bin:/usr/local/rvm/gems/ruby-2.0.0-p353@global/bin:....      But I get the same error (not surprising as it was a "not permitted" message, not a "not found" message). What do I need to do to get this working?


title: Add maximise and minimise buttons to Gnome 3.8

text: I'm currently in the process of trialling Gnomebuntu 13.10 in a virtual machine for web development work with a view to potentially ditching Windows 8.1 for development work in the near future. One of the issues I currently have with Gnome 3.8 is that there are no minimise or maximise buttons by default which screws with my productivity. Is there a way of adding these in? I've already tried the gnome-tweak-tool and there is no clear option to enable this functionality. Any help would be greatly appreciated.


title: How to scroll large datafile while keeping header

text: Suppose I have some large datafile, which overflow the screen in both vertical and horizontal direction. How can I browse this file, while the header-lines stay on the screen? For the moment, I am using `less -S`, so that I can nicely scroll my file horizontally and vertically. However, when scrolling down, the header lines obviously disappear. Is there a way to keep these using less? An alternative is using `vim` in split-screen mode with `:set nowrap`. However, now if I scroll horizontally, the top window doesn't scroll in the same way (`:windo set scrollbind` only works for vertical scrolling as far as I know).


title: systemd timer needs to run ExecStop at shutdown/reboot

text: The scenario is that I have a CentOS v7.0 system that can have up to four instances of JIRA running, the instances are Production, Staging, Development and BETA. When I start the system I want all four of the service instances to start in a staggered fashion 100 seconds apart (each JIRA instance takes about 80 seconds to start). I was able to solve the staggered start by using systemd timers (which are certainly a lot more elegant than the shell code I was using in SysV inits). Each service runs in its own slice and has an appropriate QOS level set via the slice controls. It all runs very nicely. The problem I'm having is that when I issue a halt/shutdown/reboot only the jira_*.timer instances are being called by the systemd shutdown script and the JIRA instances are not being shutdown correctly. How can I get the ExecStop action in the jira_*.service units to fire during a shutdown/reboot?               PRD = 5sec delay     STG = 100sec delay     DEV = 200sec delay     EAP = 300sec delay      **/usr/lib/systemd/system/jira_stg.service**               [Unit]     Description=Atlassian JIRA Staging instance     Documentation=https://confluence.atlassian.com/display/JIRA/JIRA+Documentation     After=mysql.service nginx.service     Requires=mysql.service nginx.service     Before=shutdown.target reboot.target halt.target     [Service]      Type=forking     ExecStart=/jira/stg/catalina.home/bin/startup.sh     ExecStop=/jira/stg/catalina.home/bin/shutdown.sh 60     TimeoutSec=300     User=ujirastg     Group=gjirastg     Slice=jira_stg.slice     CPUAccounting=true     CPUShares=600     MemoryAccounting=true     MemoryLimit=1200M     BlockIOAccounting=true     BlockIOWeight=200     [Install]     WantedBy=multi-user.target      **/usr/lib/systemd/system/jira_stg.timer**               [Unit]     Description=Atlassian JIRA Staging instance service startup after delay     [Timer]     # Time to wait after systemd starts before we start the service     OnStartupSec=100s     AccuracySec=5s     Unit=jira_stg.service     [Install]     WantedBy=multi-user.target      I'm only enabling the jira_* .timer units as I found that if I enabled the jira_* .service units that the timers were ignored and everything tried to start at once.               systemctl enable jira_eap.timer     systemctl enable jira_dev.timer     systemctl enable jira_stg.timer     systemctl enable jira_prd.timer      From journalctl, showing the timers being fired during a reboot.               jira systemd[1]: Stopping Flexible branding.     jira systemd[1]: Stopped Flexible branding.     jira systemd[1]: Stopping Timers.     jira systemd[1]: Stopped target Timers.     jira systemd[1]: Stopping Atlassian JIRA Early Access Program instance service startup after delay.     jira systemd[1]: Stopped Atlassian JIRA Early Access Program instance service startup after delay.     jira systemd[1]: Stopping Atlassian JIRA Development instance service startup after delay.     jira systemd[1]: Stopped Atlassian JIRA Development instance service startup after delay.     jira systemd[1]: Stopping Atlassian JIRA Staging instance service startup after delay.     jira systemd[1]: Stopped Atlassian JIRA Staging instance service startup after delay.     jira systemd[1]: Stopping Daily Cleanup of Temporary Directories.     jira systemd[1]: Stopped Daily Cleanup of Temporary Directories.     jira systemd[1]: Stopping Atlassian JIRA Production instance service startup after delay.     jira systemd[1]: Stopped Atlassian JIRA Production instance service startup after delay.     jira systemd[1]: Stopping Sockets.     jira systemd[1]: Stopped target Sockets.


title: I require some help with traceping

text: Does anyone have an idea what Traceping is and where I can find good info about it? Googled for it but could not find some. Is there anywhere I could find out how to use traceping on Ubuntu? I tried to look for the package but could not find it anywhere.


title: What does --noparent mean for wget?

text: The manpage of `wget` says                  -np        --no-parent            Do not ever ascend to the parent directory when retrieving recursively.  This is a useful option, since it guarantees            that only the files below a certain hierarchy will be downloaded.      Suppose the input link is `example.com/books/english/list.html`. Does `-np` make difference only when the webpage `example.com/books/english/list.html` contains some link(s) to files under `example.com/books/english/`, `example.com/books/` or `example.com/`? Otherwise `-np` will not make difference?


title: Manipulating a picture pdf

text: Is there a practical tool to modify (with eraser and pen) a pdf file whose content is a scanned document or a picture taken by a digital camera? If so, which one is good?


title: Determining if a file system object is a procfs/sysfs/etc. "virtual file" which doesn't report its length correctly

text: Some kinds of pseudo-files, like many in the procfs and sysfs virtual file systems, have no file size (`stat` returns `st_size` == 0) and do not support `SEEK_END` in `fseek`. These file system objects, such as `/proc/cpuinfo`, behave more like FIFOs than regular random-access files. Unfortunately, they lie about their file type too: their `st_mode` field includes the `S_IFREG` bit, which implies a regular file, not the `S_IFIFO` bit. This causes problems with input code that tries to be "smarter" about managing data, and there any many reports of tools which hang when they look at `/proc/*` files. I'm working on one of those tools, which has a general-purpose stream input system that can get a stream from various sources, indicated by the user. I can also handle non-random-access streams like pipes and sockets which are purely "sequential," and the same techniques used for them would work on procfs/sysfs/other virtual file system objects -- but I must be able to tell unambiguously when I'm looking at one. Given a FILE pointer, file descriptor, or file pathname, how can I determine in C whether I'm looking at one of these troublesome pseudo-file objects? (Note: just checking for a path beginning with /proc is not sufficient, since a file system can be mounted arbitrarily. I need the OS to tell me if I can trust a file's `st_size` and `SEEK_END`.) Is there a reasonably portable-ish solution for modern *nixes? (This is a programming question; feel free to migrate it to SO if required.)


title: Associating variable with specific for loop file

text: I want to use `for` for a set of files.               for file in fileA fileB fileC; do         COMMAND $file $variable     done      For every `$file` I want to use specific `$variable`.   (for example: fileA variableA; fileB variableB) How can do such association?


title: Looking to build a low powered linux based firewall

text: I am looking to build a low powered linux based firewall. I need a reliable piece of hardware that has two (2) LAN inputs and a built in wifi. Fanless and low power system. any recommendations? Any recomendations on software? I was looking at IPcop.


title: using bash script to output new script: need mixture of variables to be replaced and not replaced

text: I'm having a problem with bash variable substitution. Here's a silly example of what I am trying to do. I need to output a new script from a bash script. A line (see `echo` in my example) has a mixture of variables that should not be replaced and variables that should be replaced.               #!/bin/bash     REPLACE=`whoami`     cat << EOF > mynewscript.sh         read DONTREPLACE < /home/$REPLACE/localinput.txt         echo $DONTREPLACE > /home/$REPLACE/somefile.log     EOF     exit 0      This isn't a real example, but it does illustrate the problem. Let's say that I need to know the absolute path in advance and that I want $REPLACE evaluated in my original script. But I do NOT want $DONTREPLACE evaluated/replaced in my script. `$DONTREPLACE` should be output exactly like that to the new script. Therefore, quoting 'EOF' in making the here document doesn't work. I hope I'm explaining this well enough. I don't know of another solution. I appreciate any ideas, but I prefer really simple ideas/solutions. It doesn't have to be elegant.


title: Combing head and tail in a single call via pipe

text: On a regular basis, I am piping the output of some program to either `head` or `tail`. Now, suppose that I want to see the first AND last 10 lines of piped output, such that I could do something like                ./lotsofoutput | headtail      I am specifically looking for an easy to remember, simple and elegant solution. Closest I got was                ./lotsofoutput | sed -n -e '1,10p' -e 'N,$p'      Or, by means of Command to display first few and last few lines of a file               headtail is a function     headtail ()      {          head -n 3 -- "$1";         tail -n 3 -- "$1"     }     $ echo {1..10} | tr " " "\n" | headtail -     1     2     3     $


title: Fail2ban - alternative robust for enterprise protection against DoS attack in SIP and similar to fail2ban features

text: Is there any fail2ban like software for CentOS 2.6.32-358.6.2.el6.x86_64 ? (fail2ban is 0.8.10 installed) but its slowing down the system completely, i was looking for something which can be similar like fail2ban but more robust. any idea? i have this iptables but fail2ban 0.8.10 version is unable to stop random attacks of SIP DoS, as a result the system shutdown while running fail2ban)               *filter     :INPUT ACCEPT [0:0]     :FORWARD ACCEPT [0:0]     :OUTPUT ACCEPT [32:6752]     :fail2ban-SSH - [0:0]     :fail2ban-freeswitch - [0:0]     :fail2ban-freeswitch-dos - [0:0]     -A INPUT -j fail2ban-freeswitch-dos     -A INPUT -j fail2ban-freeswitch     -A INPUT -p tcp -m tcp --dport 22 -j fail2ban-SSH     -A INPUT -p tcp -m tcp --dport 10000 -j ACCEPT     -A INPUT -p tcp -m tcp --dport 443 -j ACCEPT     -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT     -A INPUT -p tcp -m tcp --dport 5222 -j ACCEPT     -A INPUT -p tcp -m tcp --dport 5269 -j ACCEPT     -A INPUT -p udp -m udp --dport 5080 -m string --string "friendly-scanner" --algo bm --to 65535 -j DROP     -A INPUT -p udp -m udp --dport 5060 -m string --string "friendly-scanner" --algo bm --to 65535 -j DROP     -A INPUT -p tcp -m tcp --dport 5081 -j ACCEPT     -A INPUT -p udp -m udp --dport 5081 -j ACCEPT     -A INPUT -p tcp -m tcp --dport 5080 -j ACCEPT     -A INPUT -p udp -m udp --dport 5080 -j ACCEPT     -A INPUT -p tcp -m tcp --dport 5061 -j ACCEPT     -A INPUT -p udp -m udp --dport 5061 -j ACCEPT     -A INPUT -p tcp -m tcp --dport 5060 -j ACCEPT     -A INPUT -p udp -m udp --dport 5060 -j ACCEPT     -A INPUT -p udp -m udp --dport 16000:42000 -j ACCEPT     -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT     -A INPUT -p icmp -j ACCEPT     -A INPUT -i lo -j ACCEPT     -A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT     -A INPUT -j REJECT --reject-with icmp-host-prohibited     -A INPUT -s 178.162.205.224/32 -j DROP     -A INPUT -s 65.55.44.100/32 -j DROP     -A INPUT -s 178.162.205.224/32 -j DROP     -A INPUT -s 91.218.247.162/32 -j DROP     -A INPUT -s 109.135.14.56/32 -j DROP     -A INPUT -s 85.25.78.58/32 -j DROP     -A INPUT -s 91.218.247.162/32 -j DROP          -A FORWARD -j REJECT --reject-with icmp-host-prohibited     -A fail2ban-SSH -j RETURN     -A fail2ban-freeswitch -j RETURN     -A fail2ban-freeswitch-dos -j RETURN     COMMIT      EDIT: no Fail2Ban why. http://serverfault.com/questions/17870/hundreds-of-failed-ssh- logins/17879#17879 http://serverfault.com/a/128964


title: SSL handshake failure with Shibboleth

text: I am using Shibboleth for single user authentication and it needs a ssl configuration which facilitates the user authentication process. Before it was working fine but now I am facing a **SSL handshake failure** error and the secure connection is being ignored. Here is the detailed error message on browser(firefox) screen:               Secure Connection Failed          An error occurred during a connection to www.mydomain.com.          SSL peer was unable to negotiate an acceptable set of security parameters.          (Error code: ssl_error_handshake_failure_alert)                 The page you are trying to view cannot be shown because the authenticity of the received data could not be verified.       Please contact the website owners to inform them of this problem. Alternatively, use the command found in the help menu to report this broken site.      * * * **Error Log:** Here is the Shibbolet error log:               2012-09-20 15:14:59 DEBUG Shibboleth.Listener [17]: dispatching message (default/SAML/POST)     2012-09-20 15:14:59 DEBUG OpenSAML.MessageDecoder.SAML1POST [17]: validating input     2012-09-20 15:14:59 DEBUG OpenSAML.MessageDecoder.SAML1POST [17]: decoded SAML response:     <Response xmlns="urn:oasis:names:tc:SAML:1.0:protocol" xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion" xmlns:samlp="urn:oasis:names:tc:SAML:1.0:protocol" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" IssueInstant="2012-09-20T13:10:43.494Z" MajorVersion="1" MinorVersion="1" Recipient="https://inami-riziv.dokeosnet.com/Shibboleth.sso/SAML/POST" ResponseID="_faf482981786daacf938e158e87d75f8"><ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#">     <ds:SignedInfo>     <ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></ds:CanonicalizationMethod>     <ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"></ds:SignatureMethod>     <ds:Reference URI="#_faf482981786daacf938e158e87d75f8">     <ds:Transforms>     <ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"></ds:Transform>     <ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"><ec:InclusiveNamespaces xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#" PrefixList="code ds kind rw saml samlp typens #default xsd xsi"></ec:InclusiveNamespaces></ds:Transform>     </ds:Transforms>     <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></ds:DigestMethod>     <ds:DigestValue>qgvrV2yDB88HKXStzqT3sFrpLlo=</ds:DigestValue>     </ds:Reference>     </ds:SignedInfo>     <ds:SignatureValue>     ifKK73UUbsOxqpsnfGcloErG5Vsrklckv/xpbsMAWDzrTm8ZvWjaLru0d7smEYmKFXdkJ/JayAXW     cM5aAKAwazWM7tj5YYvY3bTFlq4k/qI3GR46Kr5apGKkTEtDR9DkZDJ6N2+/vqOvdIxwefdFvaPs     FzsrZeGkt+IAcKmgCFZ78/2tbfckYd4sFGko0Lw3nIl9/dac03OJUsUVuScsiEVd6f/DjzedHgkk     3DD0xR2HFIY5MQzDdztz1f4PyuGFdXiyauUtm2bF+7XULQ8XwfGd+K0qIMOKBykTQuq0ijL+PpgZ     jRr3G2ylqSsJ1/NIwT6pRG79gJlcw55RB25XzA==     </ds:SignatureValue>     <ds:KeyInfo>     <ds:X509Data>     <ds:X509Certificate>     MIIE0DCCA7igAwIBAgILAQAAAAABMu4tWh8wDQYJKoZIhvcNAQEFBQAwNDELMAkGA1UEBhMCQkUx     FjAUBgNVBAMTDUdvdmVybm1lbnQgQ0ExDTALBgNVBAUTBDIwMTAwHhcNMTExMDEwMTUwMTMyWhcN     MTMwMTEwMTUwMTMyWjCBrTEcMBoGA1UEAxMTQ0JFPTA4MDkzOTQ0MjcsIElBTTELMAkGA1UEBhMC     QkUxDDAKBgNVBAsTA0lBTTEXMBUGA1UECxMOQ0JFPTA4MDkzOTQ0MjcxGTAXBgNVBAsTEEVIRUFM     VEgtUExBVEZPUk0xITAfBgNVBAsTGGVIZWFsdGgtcGxhdGZvcm0gQmVsZ2l1bTEbMBkGA1UEChMS     RmVkZXJhbCBHb3Zlcm5tZW50MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwgdTZNoR     CU7urB0+tdDDlVfrplxwcEwp+QoMJpiznNjMHZLxzwzl6PSMc8V7Gd2OGSGSHZJqrDz0643Djo6o     t59Tai2itHy9ZIQle3wmREi9ek86ousZuP6sZDw019xzztFLCaqO1Jfs28sBAeZovZZou7dDuD7w     86lkxvPssdJWZ0MO9FTwsseRoUowfWUfxp8E+3PpYdEy6BxGo5hh13lm2RphbcW0v0ouvR9yqVRh     cYhonol4Yj7nEm6tTc6NmCf2zEaX+F3e2hbj7bzgWJ1wKuhiMuQItLgN/XKhb6/jy44wjLj6IWIS     DH8LVPYITm+ImidDKI7WcGzJhu0IowIDAQABo4IBZzCCAWMwHwYDVR0jBBgwFoAUQZbOhaflXugW     WT0K8YTd8/K7TokwbgYIKwYBBQUHAQEEYjBgMDYGCCsGAQUFBzAChipodHRwOi8vY2VydHMucGtp     LmJlbGdpdW0uYmUvYmVsZ2l1bXJzMi5jcnQwJgYIKwYBBQUHMAGGGmh0dHA6Ly9vY3NwLnBraS5i     ZWxnaXVtLmJlMAkGA1UdEwQCMAAwRAYDVR0gBD0wOzA5BgdgOAkBAQMDMC4wLAYIKwYBBQUHAgEW     IGh0dHA6Ly9yZXBvc2l0b3J5LnBraS5iZWxnaXVtLmJlMD0GA1UdHwQ2MDQwMqAwoC6GLGh0dHA6     Ly9jcmwucGtpLmJlbGdpdW0uYmUvZ292ZXJubWVudDIwMTAuY3JsMA4GA1UdDwEB/wQEAwIE8DAR     BglghkgBhvhCAQEEBAMCBLAwHQYDVR0OBBYEFGtvDxQis8EQNHkujqvXW0CGhSbnMA0GCSqGSIb3     DQEBBQUAA4IBAQCDfqrhNJeB+tiesyXiAfuIwz2rJiVANb71VptyPGh96qMHBfU/w9fKdN87cF2J     IHg23ll0MEUo7I8oA2F5Dv0Jw/sB7GovOsosC6QcYzEo/D24vSYKI7Clw3SkKPUcqv3u68IPs8wF     L/Nowmxy6HGAvDlt1fQBpwePVKifGOygUcz0KWHMqNV7IJzyXrF2nbvg3TUJKaDR0zV4CjzLpaCI     IY1wY6e2/08mxf/Q5D7YO3sTxmjixkjRqCKXBCJa0CjXxT3/8Pfg5lHGNr7onIL84SMCZREur5I0     3u64HiqHBtSZaDWrw7d4CcjY/NoPfHO8hmAXEBMTm4zEhG4Nw0+2     </ds:X509Certificate>     </ds:X509Data>     </ds:KeyInfo></ds:Signature><Status><StatusCode Value="samlp:Success"></StatusCode></Status><Assertion xmlns="urn:oasis:names:tc:SAML:1.0:assertion" AssertionID="_56927407beba7fd1762d43bb15f71303" IssueInstant="2012-09-20T13:10:43.494Z" Issuer="http://idp.smals-mvm.be/shibboleth" MajorVersion="1" MinorVersion="1"><Conditions NotBefore="2012-09-20T13:10:43.494Z" NotOnOrAfter="2012-09-20T13:15:43.494Z"><AudienceRestrictionCondition><Audience>https://inami-riziv.dokeosnet.com/shibboleth</Audience><Audience>urn:be:fgov:ehealth:trust:partners</Audience></AudienceRestrictionCondition></Conditions><AuthenticationStatement AuthenticationInstant="2012-09-20T13:10:43.494Z" AuthenticationMethod="urn:oasis:names:tc:SAML:1.0:am:unspecified"><Subject><NameIdentifier Format="urn:mace:shibboleth:1.0:nameIdentifier" NameQualifier="http://idp.smals-mvm.be/shibboleth">_99e6f544a77e9b878ff54a1091c2c603</NameIdentifier><SubjectConfirmation><ConfirmationMethod>urn:oasis:names:tc:SAML:1.0:cm:bearer</ConfirmationMethod></SubjectConfirmation></Subject><SubjectLocality IPAddress="193.191.246.82"></SubjectLocality></AuthenticationStatement></Assertion></Response>          2012-09-20 15:14:59 DEBUG OpenSAML.MessageDecoder.SAML1 [17]: extracting issuer from SAML 1.x Response     2012-09-20 15:14:59 DEBUG OpenSAML.MessageDecoder.SAML1 [17]: response from (http://idp.smals-mvm.be/shibboleth)     2012-09-20 15:14:59 DEBUG OpenSAML.MessageDecoder.SAML1 [17]: searching metadata for response issuer...     2012-09-20 15:14:59 DEBUG OpenSAML.SecurityPolicyRule.MessageFlow [17]: evaluating message flow policy (replay checking on, expiration 60)     2012-09-20 15:14:59 ERROR OpenSAML.SecurityPolicyRule.MessageFlow [17]: rejected expired message, timestamp (1348146643), oldest allowed (1348146659)     2012-09-20 15:19:53 INFO XMLTooling.StorageService : purged 1 expired record(s) from storage     2012-09-20 15:34:53 INFO XMLTooling.StorageService : purged 1 expired record(s) from storage     2012-09-20 15:42:06 DEBUG Shibboleth.Listener [18]: dispatching message (default::getHeaders::Application)     2012-09-20 15:42:06 DEBUG Shibboleth.Listener [18]: dispatching message (default/Login::run::Shib1SI)     2012-09-20 15:42:06 DEBUG XMLTooling.StorageService [18]: inserted record (9699add17fc90926f21c8fa06efec1e1) in context (RelayState) with expiration (1348149126)     2012-09-20 16:04:53 INFO XMLTooling.StorageService : purged 1 expired record(s) from storage     2012-09-20 16:19:53 INFO XMLTooling.StorageService : purged 2 expired record(s) from storage     2012-09-20 16:20:21 DEBUG Shibboleth.Listener [21]: dispatching message (default::getHeaders::Application)     2012-09-20 16:20:21 DEBUG Shibboleth.Listener [21]: dispatching message (default/Login::run::Shib1SI)     2012-09-20 16:20:21 DEBUG XMLTooling.StorageService [21]: inserted record (5bfae2fab27dfd8026a14e253696bc3a) in context (RelayState) with expiration (1348151421)     2012-09-20 16:34:53 INFO XMLTooling.StorageService : purged 1 expired record(s) from storage     2012-09-20 16:39:19 DEBUG Shibboleth.Listener [22]: dispatching message (default::getHeaders::Application)     2012-09-20 16:39:19 DEBUG Shibboleth.Listener [22]: dispatching message (default/Login::run::Shib1SI)     2012-09-20 16:39:19 DEBUG XMLTooling.StorageService [22]: inserted record (fbf6b65fc660ed134500345faef56f0a) in context (RelayState) with expiration (1348152559)     2012-09-20 16:43:29 INFO Shibboleth.Listener [15]: detected socket closure, shutting down worker thread     2012-09-20 16:49:53 INFO XMLTooling.StorageService : purged 1 expired record(s) from storage     2012-09-20 17:20:55 INFO Shibboleth.Listener [19]: detected socket closure, shutting down worker thread     2012-09-20 17:31:10 INFO Shibboleth.Listener [21]: detected socket closure, shutting down worker thread     2012-09-20 18:21:09 INFO Shibboleth.Listener [18]: detected socket closure, shutting down worker thread     2012-09-20 18:28:29 INFO Shibboleth.Listener [17]: detected socket closure, shutting down worker thread     2012-09-20 18:28:31 INFO Shibboleth.Listener [20]: detected socket closure, shutting down worker thread     2012-09-20 18:48:23 DEBUG Shibboleth.Listener [23]: dispatching message (default::getHeaders::Application)     2012-09-20 18:48:23 DEBUG Shibboleth.Listener [23]: dispatching message (default/Login::run::Shib1SI)     2012-09-20 18:48:23 DEBUG XMLTooling.StorageService [23]: inserted record (0b316ef6e5acf1da562899feb0b84ec1) in context (RelayState) with expiration (1348160303)     2012-09-20 18:52:26 DEBUG Shibboleth.Listener [24]: dispatching message (default::getHeaders::Application)     2012-09-20 18:52:26 DEBUG Shibboleth.Listener [24]: dispatching message (default/Login::run::Shib1SI)     2012-09-20 18:52:26 DEBUG XMLTooling.StorageService [24]: inserted record (b89fbe4deecae876148bd470e7aa6f85) in context (RelayState) with expiration (1348160546)     2012-09-20 18:52:38 DEBUG Shibboleth.Listener [25]: dispatching message (default::getHeaders::Application)     2012-09-20 18:52:38 DEBUG Shibboleth.Listener [25]: dispatching message (default/Login::run::Shib1SI)     2012-09-20 18:52:38 DEBUG XMLTooling.StorageService [25]: inserted record (b76b99286d06dd0ce84da39c9947e344) in context (RelayState) with expiration (1348160558)     2012-09-20 18:53:03 INFO Shibboleth.Listener [16]: detected socket closure, shutting down worker thread     2012-09-20 18:53:27 DEBUG Shibboleth.Listener [26]: dispatching message (default::getHeaders::Application)     2012-09-20 18:53:27 DEBUG Shibboleth.Listener [26]: dispatching message (default/Login::run::Shib1SI)     2012-09-20 18:53:27 DEBUG XMLTooling.StorageService [26]: inserted record (59fc5fa8d1589ffc94077f4e0e079f38) in context (RelayState) with expiration (1348160607)     2012-09-20 19:00:41 DEBUG Shibboleth.Listener [27]: dispatching message (default::getHeaders::Application)     2012-09-20 19:00:41 DEBUG Shibboleth.Listener [27]: dispatching message (default/Login::run::Shib1SI)                                                                                3865,1        99%      **Steps to see the error live:** : Goto this page > click on **Login** > then click on "Identification par carte d'identité électronique." > **error message** (the login is secured by shibbolet) _Note: I have done all the browser setting , even installed latest browser.There is problem with ssl config I believe and I have synced the clock but its not helpful._


title: Desktop switching in KDE when I start an application in another acitivity

text: I have an application which is forced upon start to Desktop 2 and acitivity B. If I am currently in desktop 1 of activity A and start this program, it opens in the right place, but my active desktop is changed to desktop 2 of activity A. Is there some way to disable this?


title: How to match case insensitive patterns with ls?

text: I would like to list all files matching a certain pattern while ignoring the case. For example, I run the following commands:               ls *abc*      I need to see all the file that have "abc" as a part of the file name ignoring the case like               -rw-r--r-- 1 mtk mtk 0 Sep 21 08:12 file1abc.txt     -rw-r--r-- 1 mtk mtk 0 Sep 21 08:12 file2ABC.txt      ### Note I have searched the man page for case, but counldn't find anything.


title: echo $? returning 0 instead of 1

text: [root@server ~]# bash << eof     > cat adsfasdf     > echo $?     > eof     cat: adsfasdf: No such file or directory     0      Could anyone please explain why it is returning exit status 0 instead of 1?


title: Is it possible to automatically wake from suspend?

text: ## Here's my problem: I have a laptop running Arch that I just keep on at home. It's got a good 4 hour battery life, but sometimes my daughter is playing near where it's kept and ends out pulling the plug. Well, when I get home 5 hours later, my laptop had a hard shutdown. Additionally, sometimes I'll leave it suspended and forget about it for a day or so - same problem. ## Here's my proposition: So my thought was that I could make a cron job that runs every 15 or 30 minutes or something, checking the battery life. If the battery life is < N minutes left, I could just hibernate the laptop. This would work fine if my laptop is in normal 'on'. But if I'm suspended, not so much. So my question is two fold - is there a better way to do this, and if not, is it possible to do some sort of monitoring in suspend mode - basically just run that cron job? ## Here's what worked: Following the uswsusp instructions on the Arch wiki, I installed uswsusp from the AUR. Using the following command:               wayne@jughead:~$ swapon -s     Filename                Type        Size    Used    Priority     /dev/sda2                               partition   530140  56744   -1      I discovered `/dev/sda2` was the name of my swap partition. So I set this in my `/etc/suspend.conf`               snapshot device = /dev/snapshot     resume device = /dev/sda2      I added uresume in my mkinitcpio.conf here:               HOOKS="base udev autodetect pata scsi sata resume uresume filesystems usbinput fsck"      I created `/etc/pm/config.d/module` and put               SLEEP_MODULE=uswsusp      in it. Since my laptop was not recognized (`# s2ram --test` displayed `Machine unknown`) I had to use the `\--force` option. In `/usr/lib/pm-utils/module.d/uswsusp` I also changed all of the `s2ram` options to `s2both`.


title: How do I update grub in Arch Linux

text: In Ubuntu we use below command to update grub **0.98** :               sudo update-grub      But how do I update grub version **2.00** in Arch Linux ? `


title: Problems with unixODBC and SQLite

text: I installed unixodbc, sqlite3 and libsqliteodbc. odbcinst.ini looks like this:               [SQLite]     Description=SQLite ODBC Driver     Driver=libsqliteodbc.so     Setup=libsqliteodbc.so     UsageCount=2          [SQLite3]     Description=SQLite3 ODBC Driver     Driver=libsqlite3odbc.so     Setup=libsqlite3odbc.so     UsageCount=1      odbc.ini looks like this:               [mysqlitedb]     Description=My SQLite database     Driver=SQLite3     Database=/my_database.db      When I test connection like this:               isql -v mysqlitedb      it says Connected! But when I try a SELECT statement it says:               SQL> select * from user     [S1000][SQLite]no such table: user (1)     [ISQL]ERROR: Could not SQLPrepare      What is wrong? I known the table: user is present, because I get results when I do this:               sqlite3 /my_database.db     SQLite version 3.8.2 2013-12-06 14:53:30     Enter ".help" for instructions     Enter SQL statements terminated with a ";"     sqlite> select * from user;     1|admin|password


title: Specify Monitor For Linux Console

text: Does the kernel, framebuffer, or a framebuffer driver (uvesafb) have an option to specify the video-card output to use? The kernel only outputs to one monitor:   * Kernel message buffer (before and after framebuffer initialization)   * Framebuffer (if specified in kernel command-line)   * Virtual console (tty's etc) Note: I have no issues with X-windows configuration (only the console) Kernel options (with fb):   `kernel /stable root=/dev/sda3 video=uvesafb:mtrr:3,ywrap,1920x1200-32@60`   Kernel options (no-fb):   `kernel /stable root=/dev/sda3`   System Information:     * Gentoo Linux (x86_64)   * Kernel: linux-3.3.8-gentoo   * Video Card: NVIDIA GeForce GTX 560 (2x DVI outputs)   * Driver: NVIDIA Driver Version 302.17


title: ODBC driver for Informix

text: Does anyone known how I can get a ODBC driver for Informix to my Debian (arm) machine? I want to use it with unixODBC. Also is there a ODBC driver for SQL Server available for the same architecture?


title: How to install Kile on Debian KDE 7.3 32 bit?

text: For the past week or so, I'm trying to install **Kile** in Debian 7.3 kde desktop _after_ installing TexLive 2013 from a CTAN mirror (downloading the installer in a home directory, decompressing it in `install-tl-20140123` and launching the `/.install-tl`). I had installed `perl-tk` but apparently it doesn't work when called by `/.install-tl` so I had to make-do with the text interface. I installed a small version of TeXLive (13 or so packages for a tot of ~730MB). Now, when I go to install Kile from Synaptick Package Manager I get many packages automatically ticked for installation including `texlive- common`,`texlive-base`, `luatex`. From what I've read on the Internet, I need to fool the system into believing it already has those packages by creating so-called dummy packages so the system only installs Kile. Is there someone who has a **correct** and easy guide on how to do so?


title: cat file to udp, pt 2: send 1 udp packet per ^C-delimited line

text: Yesterday I asked a question about catting a file over a UDP socket in bash. The solution we came up was `netcat -c -w 1 -v -u -s 127.0.0.1 239.255.0.1 30001 < test.txt`. This worked in the sense that it sent the packets, but there's a problem. The source file isn't strictly a text file. It's actually a binary file -- the content is mostly text, with embedded non-printable characters and no `\n` lineendings. Instead, the control character `^C` (0x03) is used as a line delimiter. When `netcat` was sending packets, it would send as much as possible in a single UDP frame. But I want it to send one UDP frame per `^C`-delimited mesasge in the source file. For example, if my file consists of:               foo^Cbar^Cbaz^C      using `netcat` would result in one UDP frame being sent. What I want is to send 3 messages:   1. `foo^C`   2. `bar^C`   3. `baz^C` Is there a way to accomplish this? * * * I have tried a number of possible solutions, but nothing's worked. For one I've tried `sed`ding the source file to replace the `^C` with `^C\n`, but that had no effect:               sed 's/^C/^C\n\0/g' test.txt  | netcat -n -vv -c -w 1 -v -u -s 127.0.0.1 239.255.0.2 30002      I also tried catting the files to `/dev/udp/` instead of using `netcat`, but the results were similar.               cat test.txt > /dev/udp/239.255.0.2/30002      Finally I tried using `awk` to print one line at a time and redirecting that to `/dev/udp`, but the results were really the same. It appears that both `netcat` and `cat > /dev/udp` both buffer the input until it has a full frame, then sending the frame. That's not what I want. Can I flush the udp buffer, or some other way send one UDP message per ^C-delimited message in the source file?


title: delete directory with special character in filename

text: I have these tricky directories that I can't figure out how to delete. If I run               ls -ld *      I get… > drwxrwxr-x 7 user1 taskfmri 2048 Jan 22 15:26 857263   >  drwxrwx--- 4 user2 taskfmri 2048 Jan 23 16:32 857263? There are ~50 of these directories with '?' in the ls. Unfortunately, the '?' isn't literally a ?, but is instead some special character that the terminal can't display What is the best way to remove all of these directories with unknown special characters, without deleting the almost-identically named good directories?


title: running a command as a less privileged user: `sudo -u` vs `su` being run as root

text: in an startup-script that is typically being run as user `root`, i would like to start a program (actually, a server) as a less-privileged user. the script originally used                     su -s /bin/sh -c "umask 026; unset HOME; /usr/bin/fooserver" foouser      then a user reported problems with the `su` approach (in a complicated PAM setup using automounts and whatnot), and suggested to use `sudo` instead:                     sudo -s /bin/sh -c "umask 026; unset HOME; /usr/bin/fooserver" -u foouser      now i wonder:   * are these two approaches functionally equivalent?    * are there any pitfalls i ought to be aware when using `sudo -u` instead of `su`? (think: environment preservation) i'm aware that there are zillions of questions (and answers) regarding the differences between `su` and `sudo`, but it seems that all of them are asked from a _user_ perspective (whereas i am using these programs as _root_ )


title: prores 444 output using ffmpeg

text: Instead of prores_ks ( as in image ), I need to get prores444. How is it possible? I tried the following and felt that I am limited to this. Is prores_ks an alternative to prores444? Can you explain how to find an alternative to this, in case it is not present?               EXRFILE="/tmp/v002/fb_sq021_sc003_v002.%04d.dpx" \     QSCALE=4 \     ffmpeg -start_number 0101 -y -probesize 5000000 -f image2 \     -r 24 -i ${EXRFILE} -vcodec prores_ks -qscale:v ${QSCALE} -vendor ap10 \     -pix_fmt yuv444p10 -s 960x540 /tmp/v002/fb_sq021_sc003_v002.mov


title: Low display resolution Ubuntu Gnome remix 12.10

text: I'm running Ubuntu Gnome remix 12.10 and it can't recognize my display. My HW is: Intel i3 3225 with HD 4000 onboard / is on a OCZ Vertex 4 SSD display is an old IBM Thinkvision with vga connector connected through an adapter to dvi slot. When I start it up I get to gdm which is in low resolution, then I log in the desktop is in low resolution as well. The display can't be recognized. I succeeded in changing the resolution with `xrandr` in `/etc/gdm/Init/Default` but am not really comfortable with this workaround. I've red something about a race condition but that was more a LightDM thing and switching to GDM should help. Thank you for your thoughts.


title: Why are there two different OpenWRT firmwares for the LinkSys WRT54G3GV2-VF?

text: The stable version of OpenWRT (10.03.1) does not work on the LinkSys WRT54G3GV2-VF. The WiFi doesn't work, there are various bugs on trac that say it's fixed in trunk. However if you browse the download locations, there are two different files for this router with no explanation as to why: For the unreleased stable version 12.09: (http://downloads.openwrt.org/attitude_adjustment/12.09-rc1/brcm47xx/generic/)               openwrt-wrt54g3gv2-vf-squashfs.bin     openwrt-wrt54g3gv2-vf-squashfs.noheader.bin          And in the bleeding edge folder: (http://downloads.openwrt.org/snapshots/trunk/brcm47xx/)               openwrt-wrt54g3gv2-vf-squashfs.bin     openwrt-wrt54g3gv2-vf-squashfs.noheader.bin          I want to upgrade to the latest version to see if the wifi is indeed fixed but can't risk bricking the device. I suppose noheader could be the old equivalent to sysupgrade. But there is no documentation! Does anybody know what there are two files and what they are for?


title: Can I exclude /run from my backup scheme?

text: I have written a rsync-based system backup for my Linux system. The aim is to be able to redeploy the system entirely from the saves, so I don't only backup homedirs. I have excluded a few top-level directories from the backup: `/proc`, `/sys`, `/mnt`, `/tmp`. I wonder whether I can exclude `/run` and still be able to get a viable save? I observe that it takes a lot of disk space on my backup disk (mostly with `/run/shm`).


title: What is the correct way to write a udev rule to stop a service under systemd

text: I'm running Arch Linux, and I have a udev rule which starts a service when a device is inserted. In this case, it dials a connection when a 3G modem is plugged in.               KERNEL=="ttyUSB*", SYMLINK=="gsmmodem", TAG+="systemd", ENV{SYSTEMD_WANTS}="netcfg@wvdial.service"      However, if the device is removed, systemd won't stop the service, and hence when it is plugged in again, it won't start the service, since it's already running. What I need is a matching udev rule which runs when the device is removed to stop the service. # Update Using the answer below, what I now have is the following udev rule               KERNEL=="ttyUSB*", SYMLINK=="gsmmodem", TAG+="systemd", ENV{SYSTEMD_WANTS}="vodafone.service"      with the following service file (which was basically copied and pasted from the netcfg service file:               [Unit]     Description=Netcfg networking service for Vodafone Dongle     Before=network.target     Wants=network.target     BindsTo=dev-gsmmodem.device     After=dev-gsmmodem.device          [Service]     Type=oneshot     RemainAfterExit=yes     ExecStart=/usr/bin/netcfg check-iface wvdial     ExecStop=-/usr/bin/netcfg down wvdial     KillMode=none          [Install]     WantedBy=multi-user.target      I'm using `netcfg-wvdial` from the AUR to do the dialing.


title: POSIX test and -a

text: I checked a script of mine with checkbashisms and I got the following warnings:               possible bashism in check_ssl_cert line 821 (test -a/-o):     if [ -n "${ALTNAMES}" -a -n "${COMMON_NAME}" ] ; then      In section 4.62.4 of the POSIX specs I find > primary -a primary Performs a binary and of the results of primary and > primary. The -a operator has precedence over the -o operator. Why are `-a` and `-o` considered non-portable?


title: Purpose of /dev/zero?

text: I tried to `cat /dev/zero`, and it didn't seem to do anything. I googled `/dev/zero`, and it says it's basically a blank file with infinite size. Is `cat` printing an infinite number of non-existent characters? How does this work? How does it provide infinite data if it's 0 bytes? What are the uses of this file, if one can simply create a blank file?


How to find out which X11 driver system is using? For my chip `openchrome` is the best driver but I suspect that system is not using it. I just need at least 2D acceleration. How can I check? Here is it what I found from `cat /var/log/Xorg.7.log | grep driver`:               [    54.147]    X.Org XInput driver : 12.3     [    55.167] (==) Matched openchrome as autoconfigured driver 0     [    55.167] (==) Matched vesa as autoconfigured driver 1     [    55.167] (==) Matched fbdev as autoconfigured driver 2     [    55.167] (==) Assigned the driver to the xf86ConfigLayout     [    55.175] (II) Loading /usr/lib/xorg/modules/drivers/openchrome_drv.so     [    55.499] (II) Loading /usr/lib/xorg/modules/drivers/vesa_drv.so     [    55.570] (II) Loading /usr/lib/xorg/modules/drivers/fbdev_drv.so     [    55.649] (II) VESA: driver for VESA chipsets: vesa     [    55.649] (II) FBDEV: driver for framebuffer: fbdev     [    55.652] (II) Loading /usr/lib/xorg/modules/drivers/openchrome_drv.so     [    55.652] (!!) VIA Technologies does not support this driver in any way.     [    55.984] (II) CHROME(0): Not using driver mode "1280x1024" (height too large for virtual size)     [    55.986] (II) CHROME(0): Not using driver mode "1280x1024" (height too large for virtual size)     [    58.049] (II) AIGLX: Trying DRI driver /usr/lib/i386-linux-gnu/dri/swrast_dri.so     [    61.982]    ABI class: X.Org XInput driver, version 12.3     [    61.982] (II) Using input driver 'evdev' for 'Power Button'     [    62.014] (II) Using input driver 'evdev' for 'Power Button'     [    62.084] (II) Using input driver 'evdev' for 'Logitech USB Optical Mouse'     [    62.093] (II) No input driver/identifier specified (ignoring)     [    62.103] (II) Using input driver 'evdev' for 'NOVATEK USB Keyboard'     [    62.119] (II) Using input driver 'evdev' for 'NOVATEK USB Keyboard'      From what I have got it's not using `openchrome`. Here's `lspci | grep VGA`:               00:01.0 VGA compatible controller: VIA Technologies, Inc. VX800/VX820 Chrome 9 HC3 Integrated Graphics (rev 11)      (This is a Thin Client.) And this is output of `grep -E '(\\(WW|\\(EE)' /var/log/Xorg.7.log`:                            (WW) warning, (EE) error, (NI) not implemented, (??) unknown.     [    34.285] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.     [    34.286] (WW) The directory "/usr/share/fonts/X11/100dpi/" does not exist.     [    34.286] (WW) The directory "/usr/share/fonts/X11/75dpi/" does not exist.     [    34.286] (WW) The directory "/usr/share/fonts/X11/Type1" does not exist.     [    34.286] (WW) The directory "/usr/share/fonts/X11/100dpi" does not exist.     [    34.286] (WW) The directory "/usr/share/fonts/X11/75dpi" does not exist.     [    34.287] (WW) The directory "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType" does not exist.     [    34.308] (WW) Open ACPI failed (/var/run/acpid.socket) (No such file or directory)     [    34.817] (WW) Falling back to old probe method for vesa     [    34.817] (WW) Falling back to old probe method for fbdev     [    34.854] (EE) open /dev/fb0: No such file or directory     [    34.911] (EE) CHROME(0): Unknown Card-Ids (1122|A0A0| 702), Chipset: VX800/VX820; please report to openchrome-users@openchrome.org     [    37.878] (EE) [drm] drmOpen failed.     [    37.878] (EE) CHROME(0): [dri] DRIScreenInit failed.  Disabling DRI.     [    38.065] (WW) CHROME(0): [XvMC] XvMC is not supported on this chipset.      Form `xvinfo | head -10`               X-Video Extension version 2.2     screen #0       Adaptor #: "XV_SWOV"          number of ports: 1          port base: 62          operations supported: PutImage          supported visuals:            depth 24, visualID 0x21          number of attributes: 6            "XV_COLORKEY" (range 0 to 16777215)


title: Run a script when a package is updated?

text: I'm using runit to manage my services and when a new version of nginx is installed, I'd like to restart nginx using `sv restart nginx`. Is there a way that I can monitor a package or set of packages for upgrades and trigger a script when they're upgraded?


title: Make nslookup use specific interface

text: On my computer I have two network cards. Both are using different Internet Providers service. Both Internet service provider have different DNS server and their IP address are known to me. I want to make sure when `nslookup` sends queries, it passes through exactly by specified interface. Something like:   `ping -I eth1 google.com` `nslookup -I eth1 google.com` is possible by any way, I know there is no `-I` option, I even don't want it to be specific in that way only. How do I do it?


title: Is there a Linux for an MSM7227 tablet with USB keyboard and touchscreen stylus drivers?

text: I have a ZTE V9C 7" tablet with 800MHz MSM7227 processor, Snapdragon family (ARM architecture?), Android 2.3, and I want to have a (very lightweight) Linux running on it (I know Android uses a Linux kernel). I also have a physical keyboard and a stylus for it; my worries are regarding the drivers for these (the keyboard is a must because I love vim). A 3G network card OR a wifi driver is also a must for programming. And not to forget, the SD card storage support. I want to use it for programming in/using Python, C, and Git (and an optional web browser in 'switchable' GUI) (desired: `startx` to start GUI etc). `vim` is a must for me to do development; I would like it to work well. Also, it would be nice to be able to dual-boot with Android, in case I can't get drivers for all the hardware (e.g. the camera, phone antenna, etc.) Is it possible to have such a Linux machine?


title: Fedora won't boot. The startup progress bar goes all the way to the right and then everything just freezes

text: What could the problem be? How do I find out what's going on? EDIT: Hitting f2 when the progress bar is going across the screen shows that booting stops at "Starting atd: [OK]". After it reaches that point, the screen flickers a little bit and it just hangs.


title: How to compile tmux 1.7 on CentOS 5.8?

text: I would like to have tmux 1.7 on my machine with CentOS 5.8 (64 bit). It requires libevent in version at least 1.4.14b or 2.0.20 and the latest version in `yum` packages for CentOS 5.8 is 1.4.13 . I know that I need the `libevent-devel` package as well to build `tmux` but I cannot get it anywhere. Can anyone give me hints how to do this ? How can I get (build) the devel package ?


title: How to edit file from grub prompt in RHEL6?

text: I changed the file which is in `/usr/share/xsessions/gnome.desktop` and now I want to change it back to its original state from a GRUB prompt because now my system is not able to login.


title: How to find a file with specific permission of a specific user?

text: How do I get a list of all the files which permission is "read and write" for a specific user. For example, when I go on the desktop of my mac, then right click on file "A", then "get info", then on the bottom I have "share and permission" where I can add a custom user like "popo" for example, and then specify that he can "read and write" that file. Then I want to use a command line to get all the files that POPO can read and write, and only these (I want to get "A" in the above example). All my researches lead me to for now is something like :               find /Users/Me/Desktop -user popo -perm 777      But I get nothing.. What's wrong with the above `find`and how should I proceed?


title: Changed file access to read only but I can still write to the file. Why?

text: I am running a small embedded system built using buildroot. I have come across this strange behaviour when trying to set up my file permissions on the target device. To illustrate what confuses me I tried the following simpler example               # cd /mydir     # touch tmp.txt     # echo "rubbish" > tmp.txt     # cat tmp.txt     rubbish          # chmod 0444 .     # chmod 0444 tmp.txt     # echo "new-rubbish" > tmp.txt     # cat tmp.txt     new-rubbish      I am really confused by this. How can I have set the file and directory to be read only and yet I am still able to modify the contents of this file? I have an executable within the same directory and when I try and execute it I get this               # chmod 0444 my_binary     # ./my_binary     -sh: ./my_binary: Permission denied      which behaves as I would expect it to. Clearly I have some fundamental misunderstanding of how the file access model works on Linux. Can anyone explain why I am able to write to the file that I have set to be read only?


title: IP Address inaccesible

text: My Linux machine is inaccessible by the IP address, as in only                   http://127.0.0.1:8080/projectname      or localhost works on the browser, but                   http://10.1.5.5:8080/projectname      doess not (here 10.1.5.5 is my IP address as found out by typing `ifconfig` in terminal). I am using Fedora 16. Edit: output of `iptables -L -n`:               Chain INPUT (policy ACCEPT)     target     prot opt source               destination              ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0            ctstate RELATED,ESTABLISHED     ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0                INPUT_direct  all  --  0.0.0.0/0            0.0.0.0/0                INPUT_ZONES  all  --  0.0.0.0/0            0.0.0.0/0                ACCEPT     icmp --  0.0.0.0/0            0.0.0.0/0                REJECT     all  --  0.0.0.0/0            0.0.0.0/0            reject-with icmp-host-prohibited          Chain FORWARD (policy ACCEPT)     target     prot opt source               destination              ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0            ctstate RELATED,ESTABLISHED     ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0                FORWARD_direct  all  --  0.0.0.0/0            0.0.0.0/0                FORWARD_ZONES  all  --  0.0.0.0/0            0.0.0.0/0                ACCEPT     icmp --  0.0.0.0/0            0.0.0.0/0                REJECT     all  --  0.0.0.0/0            0.0.0.0/0            reject-with icmp-host-prohibited          Chain OUTPUT (policy ACCEPT)     target     prot opt source               destination              OUTPUT_direct  all  --  0.0.0.0/0            0.0.0.0/0                     Chain FORWARD_ZONES (1 references)     target     prot opt source               destination              FWDO_ZONE_public  all  --  0.0.0.0/0            0.0.0.0/0                FWDI_ZONE_public  all  --  0.0.0.0/0            0.0.0.0/0                     Chain FORWARD_direct (1 references)     target     prot opt source               destination                   Chain FWDI_ZONE_public (1 references)     target     prot opt source               destination              FWDI_ZONE_public_deny  all  --  0.0.0.0/0            0.0.0.0/0                FWDI_ZONE_public_allow  all  --  0.0.0.0/0            0.0.0.0/0                     Chain FWDI_ZONE_public_allow (1 references)     target     prot opt source               destination                   Chain FWDI_ZONE_public_deny (1 references)     target     prot opt source               destination                   Chain FWDO_ZONE_external (0 references)     target     prot opt source               destination              FWDO_ZONE_external_deny  all  --  0.0.0.0/0            0.0.0.0/0                FWDO_ZONE_external_allow  all  --  0.0.0.0/0            0.0.0.0/0                     Chain FWDO_ZONE_external_allow (1 references)     target     prot opt source               destination              ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0                     Chain FWDO_ZONE_external_deny (1 references)     target     prot opt source               destination                   Chain FWDO_ZONE_public (1 references)     target     prot opt source               destination              FWDO_ZONE_public_deny  all  --  0.0.0.0/0            0.0.0.0/0                FWDO_ZONE_public_allow  all  --  0.0.0.0/0            0.0.0.0/0                     Chain FWDO_ZONE_public_allow (1 references)     target     prot opt source               destination                   Chain FWDO_ZONE_public_deny (1 references)     target     prot opt source               destination                   Chain INPUT_ZONES (1 references)     target     prot opt source               destination              IN_ZONE_public  all  --  0.0.0.0/0            0.0.0.0/0                     Chain INPUT_direct (1 references)     target     prot opt source               destination                   Chain IN_ZONE_dmz (0 references)     target     prot opt source               destination              IN_ZONE_dmz_deny  all  --  0.0.0.0/0            0.0.0.0/0                IN_ZONE_dmz_allow  all  --  0.0.0.0/0            0.0.0.0/0                     Chain IN_ZONE_dmz_allow (1 references)     target     prot opt source               destination              ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:22 ctstate NEW          Chain IN_ZONE_dmz_deny (1 references)     target     prot opt source               destination                   Chain IN_ZONE_external (0 references)     target     prot opt source               destination              IN_ZONE_external_deny  all  --  0.0.0.0/0            0.0.0.0/0                IN_ZONE_external_allow  all  --  0.0.0.0/0            0.0.0.0/0                     Chain IN_ZONE_external_allow (1 references)     target     prot opt source               destination              ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:22 ctstate NEW     ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:80 ctstate NEW     ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:8080 ctstate NEW          Chain IN_ZONE_external_deny (1 references)     target     prot opt source               destination                   Chain IN_ZONE_home (0 references)     target     prot opt source               destination              IN_ZONE_home_deny  all  --  0.0.0.0/0            0.0.0.0/0                IN_ZONE_home_allow  all  --  0.0.0.0/0            0.0.0.0/0                     Chain IN_ZONE_home_allow (1 references)     target     prot opt source               destination              ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:22 ctstate NEW     ACCEPT     udp  --  0.0.0.0/0            0.0.0.0/0            udp dpt:631 ctstate NEW     ACCEPT     udp  --  0.0.0.0/0            224.0.0.251          udp dpt:5353 ctstate NEW     ACCEPT     udp  --  0.0.0.0/0            0.0.0.0/0            udp dpt:137 ctstate NEW     ACCEPT     udp  --  0.0.0.0/0            0.0.0.0/0            udp dpt:138 ctstate NEW     ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:8080 ctstate NEW     ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:80 ctstate NEW          Chain IN_ZONE_home_deny (1 references)     target     prot opt source               destination                   Chain IN_ZONE_internal (0 references)     target     prot opt source               destination              IN_ZONE_internal_deny  all  --  0.0.0.0/0            0.0.0.0/0                IN_ZONE_internal_allow  all  --  0.0.0.0/0            0.0.0.0/0                     Chain IN_ZONE_internal_allow (1 references)     target     prot opt source               destination              ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:22 ctstate NEW     ACCEPT     udp  --  0.0.0.0/0            0.0.0.0/0            udp dpt:631 ctstate NEW     ACCEPT     udp  --  0.0.0.0/0            224.0.0.251          udp dpt:5353 ctstate NEW     ACCEPT     udp  --  0.0.0.0/0            0.0.0.0/0            udp dpt:137 ctstate NEW     ACCEPT     udp  --  0.0.0.0/0            0.0.0.0/0            udp dpt:138 ctstate NEW     ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:8080 ctstate NEW     ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:80 ctstate NEW          Chain IN_ZONE_internal_deny (1 references)     target     prot opt source               destination                   Chain IN_ZONE_public (1 references)     target     prot opt source               destination              IN_ZONE_public_deny  all  --  0.0.0.0/0            0.0.0.0/0                IN_ZONE_public_allow  all  --  0.0.0.0/0            0.0.0.0/0                     Chain IN_ZONE_public_allow (1 references)     target     prot opt source               destination              ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:22 ctstate NEW     ACCEPT     udp  --  0.0.0.0/0            224.0.0.251          udp dpt:5353 ctstate NEW     ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:80 ctstate NEW     ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:8080 ctstate NEW          Chain IN_ZONE_public_deny (1 references)     target     prot opt source               destination                   Chain IN_ZONE_work (0 references)     target     prot opt source               destination              IN_ZONE_work_deny  all  --  0.0.0.0/0            0.0.0.0/0                IN_ZONE_work_allow  all  --  0.0.0.0/0            0.0.0.0/0                     Chain IN_ZONE_work_allow (1 references)     target     prot opt source               destination              ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:22 ctstate NEW     ACCEPT     udp  --  0.0.0.0/0            224.0.0.251          udp dpt:5353 ctstate NEW     ACCEPT     udp  --  0.0.0.0/0            0.0.0.0/0            udp dpt:631 ctstate NEW          Chain IN_ZONE_work_deny (1 references)     target     prot opt source               destination                   Chain OUTPUT_direct (1 references)     target     prot opt source               destination        Edit: Output of `netstat -an | grep '^tcp'`:               [root@localhost etc]# netstat -an | grep '^tcp'     tcp        0      0 127.0.0.1:9999          0.0.0.0:*               LISTEN          tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN          tcp        0      0 127.0.0.1:8080          0.0.0.0:*               LISTEN          tcp        0      0 0.0.0.0:6000            0.0.0.0:*               LISTEN          tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN          tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN          tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN          tcp        0      0 127.0.0.1:4447          0.0.0.0:*               LISTEN          tcp        0      0 127.0.0.1:9990          0.0.0.0:*               LISTEN          tcp        0      0 10.1.5.4:42019          203.190.124.28:80       TIME_WAIT       tcp        0      0 10.1.5.4:59036          198.252.206.25:80       ESTABLISHED     tcp        0      0 10.1.5.4:40731          74.125.236.111:443      ESTABLISHED     tcp        0      0 10.1.5.4:43896          74.125.236.33:80        ESTABLISHED     tcp        0      0 10.1.5.4:57049          74.125.236.160:80       ESTABLISHED     tcp        0      0 10.1.5.4:52908          74.125.236.162:443      ESTABLISHED     tcp        0      0 10.1.5.4:48313          204.154.94.81:443       ESTABLISHED     tcp        0      0 10.1.5.4:59059          198.252.206.25:80       ESTABLISHED     tcp        0      0 10.1.5.4:50342          74.125.236.161:80       ESTABLISHED     tcp        0      0 10.1.5.4:42020          203.190.124.28:80       TIME_WAIT       tcp        0      0 10.1.5.4:48398          74.125.135.95:80        TIME_WAIT       tcp        0      0 10.1.5.4:42036          68.232.44.121:80        TIME_WAIT       tcp        0      0 10.1.5.4:42132          141.101.114.59:80       TIME_WAIT       tcp        0      0 10.1.5.4:40183          96.17.182.57:80         TIME_WAIT       tcp        0      0 10.1.5.4:57117          203.190.124.17:80       TIME_WAIT       tcp        0      0 10.1.5.4:50606          198.252.206.16:80       ESTABLISHED     tcp        0      0 10.1.5.4:45892          74.125.236.40:80        ESTABLISHED     tcp        0      0 10.1.5.4:42133          141.101.114.59:80       TIME_WAIT       tcp        0      0 10.1.5.4:42037          68.232.44.121:80        TIME_WAIT       tcp6       0      0 :::111                  :::*                    LISTEN          tcp6       0      0 :::6000                 :::*                    LISTEN          tcp6       0      0 :::5298                 :::*                    LISTEN          tcp6       0      0 :::22                   :::*                    LISTEN          tcp6       0      0 ::1:631                 :::*                    LISTEN          tcp6       0      0 :::9278                 :::*                    LISTEN


title: Anti-ghosting (NKRO over USB) keyboard

text: I've recently bought a new keyboard and was surprised to find that it didn't work in Linux. This keyboard does strange things to handle multiple key presses (ant- ghosting) over a USB interface. While I can disable this behaviour by pressing ctrl+alt+shift+N, this is bit annoying. I've written up a lot more detail here. I've since procured a USB to PS2 adapter - which doesn't work at all (in BIOS or in Linux). I suspect it may be faulty but don't want to spend time and effort (possibly money) trying to get a hacked solution to work. That it works in the BIOS and in MSWindows without any custom drivers makes me think that Linux is just trying to be too smart about recognizing the device. Does anybody know if support for such devices exists in recent kernels? I believe that recent kernels allow for confiugration of USB quirks at runtome - I suspect there may some mileage in trying that - but from which version? Anybody know where I can find some definitive docs on this? (I suspect that this hack addresses the same underlying issue)


title: how to change a file in user mode and not in root mode in RHEL6?

text: There is a common file which is accessed by both root and user.i want to change that file from user mode and that should not effect root and viceversa. how to do this in RHEL6?


title: Replace unicode chars in VIM?

text: I got some logs from a windows machine, which contains multiple instances of `<200e>`, I know it's a unicode char, but how can I remove it with `s` command? I don't know how to input that in the `command` "line". **EDIT** This is a unicode char, which means I can delete that with single `x` key pressing .. it's not 6 chars `<200e>` ...


title: Filesystems other than UDF and ISO9660 on CDs, DVDs, and Blu-ray

text: I know for a fact, that Live CD versions of distros like Arch Linux, Debian, Fedora, Gentoo Linux, Salix, Ubuntu and on embedded distributions such as the OpenWrt and DD-WRT router firmware use SquashFS. But I was convinced, that optical media is practically bound to ISO9660 or UDF. I was thinking, that it might be a good idea to use SquashFS for recovery partitions, as it works well on hard drives as well. Another idea I had was: how about using it on other optical media? Most CD/DVD/BD-R is WORM anyway, so using SquashFS should be a step forward, given the transparent compression and all. I don't know if that would actually work though. How do those non-UDF/ISO9660 filesystems on optical media work? Does it work anywhere else as well?


title: Software raid + separate partitions?

text: I have setup software RAID1-arrays using two 250GB harddrives. There's two arrays - one named `md0` in which the system is kept and the other, `md1` works as swap:               # cat /proc/mdstat      md0 : active raid1 sda1[1] sdb1[0]           239256512 blocks [2/2] [UU]          md1 : active raid1 sda2[1] sdb2[0]           4940736 blocks [2/2] [UU]      To keep things a bit more organized, I would like to use separate partitions for `/tmp`, `/home`, `/var`, `/opt` & and so on in the future. Do I need to create separate arrays for each partition or can I someway let my current `md0` contain all these partitions without creating a dozen additional arrays? Thanks


title: Using dd to cause an error in memory

text: The command `dd if=/dev/mem of=/dev/null seek=16k bs=4k count=1` is used to test erroect injection for edac. Why? As far as I know, dd is simply copying data from those devices to somewhere else. What bad can happen to cause an error to memory by copying?


title: Calculating total CPU system usage in C

text: I found this answer on StackOverflow for calculating total CPU _usage_ : http://stackoverflow.com/questions/1420426/calculating-cpu-usage-of-a-process- in-linux/4497769#4497769 But how do I calculate that as a proportion of the total available CPU cycles? I'm trying to do it without having to spawn another process - just with syscalls and files. I thought that number would just be the `total` property of the information provided by `glibtop_cpu` (as it seems to be `user + nice + sys + idle`, but it actually changes over time. I thought that might just be because the cycles will naturally vary from second to second, but in that case why does it report different numbers to `top`? If I spawn a new tab in Firefox and load up a page, `top`, shows Firefox using about 35% of one core for a couple of seconds - but the following code just shows a consistent 7.24%:               #include <stdio.h>     #include <time.h>     #include <glibtop/cpu.h>     #include <unistd.h>          float // Get CPU usge as a decimal percentage.     get_cpu(glibtop_cpu *cpustruct) {         glibtop_get_cpu(cpustruct);         return 100 - (float)cpustruct->idle / (float)cpustruct->total * 100;     }          int     main(void) {         glibtop_cpu cpustruct;         unsigned int sleepfor = 5000;         float usage;          for(;;usleep(sleepfor)) {             usage = get_cpu(&cpustruct);             printf("%.2f\n", usage);          }         exit(0);     }


title: Fast X for LXC guest on localhost?

text: How can I run X apps inside an LXC container efficiently?               ssh -Y guest      is too slow - there is no graphics acceleration with `ssh -Y` - everything has to travel over the virtual network with the traditional X11 protocol. Being able to copy-paste between host and guest apps is desirable but not essential. Running two X servers, one for the host and one for the guest, is (for my purposes) essential. I can't run a native Xorg from within the guest because it complains about `/dev/tty0` being missing, and I can't `mknod` that device in the guest because I get a permission denied, even when doing it as root.


title: TCSH bitwise | operator

text: How do I use the bitwise logical-or operator, |, in tcsh? I enter               @ y = 1001; @ z = 0110;     @ x = $y|$z     110: Command not found.


title: Convert command produces a small error

text: First off, I'm on a Mac, but I think this can be solved here. I'm converting a `.gif` animation to a series of `.png`'s using.               $ convert ex.gif my_png_files_%d.png      I get a series of .png-figures but some of the figures seem to be slightly shifted to the side or up/down. Example: if the gif-animation was just a red circle centered in the middle of a square, then the series of the pngs would produce this circle but this circle would be slight shifted off center in some direction in some of the pngs. I'm using `ImageMagick 6.8.3-3 2013-02-21 Q16`.


title: vimrc specify more than 1 file extensions in autocmd

text: I know a little bit of `autocmd` and use it for few things. Currently, I have               au BufNewFile,BufRead *.inc set filetype=sql     au BufNewFile,BufRead *.tbl set filetype=sql      Reading the man page, the general syntax is               :autocmd [group] {events} {file_pattern} [nested] {command}      I would like to know, whether I can combine the above 2 statements in a single lin i.e. how can we specify more that one file extension in the _file_pattern_ section? The man page doesn't say about this, but I believe it can be comma or space separated. Any hints?


title: Slow system after running a KDE GUI application from a Debian Squeeze chroot

text: I have a PC with Ubuntu 11.04 and a Debian Squeeze chroot installed in it. As soon as I start any KDE application from within chroot (and installed there), e.g. Kompare for viewing `git diff` output, certain parts of the whole host system become slow to respond. For example:   * The keyboard layout tray icon stops working, e.g. doesn't change layouts on click.   * The logout/restart/shutdown actions take a long time to actually start, e.g. 5 minutes or more, while doing `sudo reboot` is instantaneous.   * Open/save file dialogs are slow to open and close, and sometimes even unresponsive. I've noticed that other non-KDE native applications like Eclipse, xli, meld don't have the same problems. Does anyone have any ideas as to what might cause it?


title: How to manage fedora services and daemons using the GUI?

text: I am using Fedora 17, I need a GUI program to start/stop and enable/disable services and daemons. I have installed "system-config-services" but it did not have enable/disable feature(run it with sudo). ![enter image description here](http://i.stack.imgur.com/Z5veT.png) Is there any GUI program to do this?


title: How to show names of files being compared?

text: I used `diff --from-file` to compare my Riak dev1 config to the three others.               diff --from-file ~/riak/dev/dev1/etc/app.config \     ~/riak/dev/dev2/etc/app.config \     ~/riak/dev/dev3/etc/app.config \     ~/riak/dev/dev4/etc/app.config      It shows the configs differ only in the port number setting (8091, 8092, 8093, 8094). It's hard to tell where one file ends and the next begins because the output doesn't contain file names.               11c11     <               {http, [ {"127.0.0.1", 8091 } ]},     ---     >               {http, [ {"127.0.0.1", 8092 } ]},     15c15     <               %{https, [{ "127.0.0.1", 8091 }]},     ---     >               %{https, [{ "127.0.0.1", 8092 }]},     26c26     <               {handoff_port, 8101 },     ---     >               {handoff_port, 8102 },     54c54     <             {pb_port, 8081 },     ---     >             {pb_port, 8082 },     11c11     <               {http, [ {"127.0.0.1", 8091 } ]},     ---     >               {http, [ {"127.0.0.1", 8093 } ]},     15c15     <               %{https, [{ "127.0.0.1", 8091 }]},     ---     >               %{https, [{ "127.0.0.1", 8093 }]},     26c26     <               {handoff_port, 8101 },     ---     >               {handoff_port, 8103 },     54c54     <             {pb_port, 8081 },     ---     >             {pb_port, 8083 },     11c11     <               {http, [ {"127.0.0.1", 8091 } ]},     ---     >               {http, [ {"127.0.0.1", 8094 } ]},     15c15     <               %{https, [{ "127.0.0.1", 8091 }]},     ---     >               %{https, [{ "127.0.0.1", 8094 }]},     26c26     <               {handoff_port, 8101 },     ---     >               {handoff_port, 8104 },     54c54     <             {pb_port, 8081 },     ---     >             {pb_port, 8084 },      Before each "11c11" line, I'd like to see the names of the two files being comared. `git diff` can produce output like this:               --- a/home/sandport/riak/dev/dev1/etc/app.config     +++ b/home/sandport/riak/dev/dev2/etc/app.config      How would you do it with standard diff?


title: Alternative command for coloured viewing the size of all files and folders

text: Is there a nice alternative for this? I always use               du -shc *      to check the size of all files and folders in the current directory. But it would be nice to have a colored and nicely formatted view (for example like `dfc` for viewing the sizes of partitions).


title: Install kernel module [V4L2]

text: In order to build and install V4L2 module, do I have to download it, or it is already part of the kernel (and all I have to do is to choose it, in order to build it, via kernel configuration)? I 'm running Angstrom distribution [kernel 2.6.32.61]. Kernel configuration's result:               --- Multimedia support           *** Multimedia core support ***                                                                            [*]   Video For Linux                                                                                [*]     Enable Video For Linux API 1 (DEPRECATED)                                                                     *** Multimedia drivers ***                                                                                [*]   Video capture adapters  --->                                                                               [*]   Radio Adapters  --->                                                                                [ ]   DAB adapters


title: A local, centralized, secure way to store FTP login data, including passwords

text: I want to be able to store the login details all of my remote FTP accounts in one place, securely. Then I'd like clients like autofs/curlftpfs, Filezilla, etc to use this one store of passwords. I'm not interested in GUI-dependent solutions. Is this possible somehow?


title: Using 'find' to create text file, and later deleting files listed

text: I'm trying to use `find` to create a text file with the result. And then later be able to delete files, based on that list. I'm using `find /volume1/video/ -iname "sample"` to give me the results.   How do I get this into a file, and then how to remove folders based on this list (also non empty).


title: Bash script to convert all *flac to *.mp3 with FFmpeg?

text: I want to convert all *.flac to *.mp3 in the specific folder. This is what I've tried, but not works:               # change to the home directory     cd ~/music     # convert all *.flac files     ffmpeg -i *.flac -acodec libmp3lame *.mp3     # (optional: check whether there are any errors printed on the terminal)     sleep 60      How to get my goal?


title: Bash array declared in a function is not available outside the function

text: on bash (v4.3.11) terminal type this:               function FUNCtst() { declare -A astr; astr=([a]="1k" [b]="2k" ); declare -p astr; };FUNCtst;declare -p astr      (same thing below, just to be easier to read here)               function FUNCtst() {        declare -A astr;        astr=([a]="1k" [b]="2k" );        declare -p astr;      };     FUNCtst;     declare -p astr      will output this (outside of the function the array looses its value, why?)               declare -A astr='([a]="1k" [b]="2k" )'     bash: declare: astr: not found      I was expecting it output this:               declare -A astr='([a]="1k" [b]="2k" )'     declare -A astr='([a]="1k" [b]="2k" )'      how to make it work?


title: SSH key authentication works with /usr/sbin/ssh -d, does not with the daemon?

text: CentOS x64 6.5: if I connect as `root` to my server and do the following:               service sshd stop     /usr/sbin/ssh -d      I'll able to connect as user using public key authentication from my development machine:               ssh -v user@myserver.mydomain.com      When however I use the daemon:               service sshd start      I'm not able to connect anymore, and ssh asks for a password. `tail -f /var/log/secure` shows nothing. Have you any idea why this is happening?


title: nc command not found on SuSE

text: I'm trying to use the `nc` command on SuSE Linux Enterprise Desktop 11. I executed this line:               nc -4ul 192.0.2.2 50000      But I got this.-               bash: nc: command not found      This is the first time that I have the problem. I have used the command for other tests without difficulty. I'll appreciate any help to solve this.


title: tar compression without directory structure

text: Under my current directory, I have two sub-directories:               dir_1/        - file1.png        - file2.png        ...        - fileN.png          dir_2/        - fileA.txt        - ...        - fileZ.txt      When I tar compress the two directories by :               tar -cvzf result.tar.gz dir_1/ dir_2/       I got **result.tar.gz** but it maintains the directory structure. I mean when I extract the **result.tar.gz** , I got `dir_1` & `dir_2` again. How can I tar compress so that the directory structure is not remained, which means when I extract the tar.gz file, I only get files               result/        file1.png         ...         fileN.png         fileA.txt        ...        fileZ.txt


title: awk for loop for each line in a file

text: I'm a newbie to bash scripting. I need help trying to figure out how to get loop through a text file and for every line take the fields of name , project #, and email, and replace them in a email template to be sent out. So this is the text file called send.txt:               Project 1,Jack,Chen,06,12,test@cs.fiu.edu     Project 2,Emily,Weiss,06,12,eweiss@cs.fiu.edu     Project 3,Mary,Gonzalas,06,12,Mgonz@cs.fiu.edu      and this is the email template called Reminder.email:               Dear __FULLNAME__:           This is a kindly reminder that our __Project__ meeting will be held on today.           Best Regards,      CIS5027      So for every line in the text file I need to replace in this email template the fields of **FULLNAME** : , and **Project** . With the corresponding values which I can do for the first line, however I cannot do it for every line. This is my script               #          !/bin/sh     #Start your code from here          date= date "+%m/%d/%y"     print $date          #The following line is to scan a file called Event-member.data and return any lines with todays date and save them to a file called sendtoday.txt          grep -n $(date +"%m,%d") Event-member.data > sendtoday.txt          #The following line is to remove the first to characters of the file created above sendtoday.txt and output that to a file called send.txt.          cat sendtoday.txt | sed 's/^..//' > send.txt               #This is where im having trouble. When storing the values for the variables below of name, email, project #. The value of NR==1 thus it never goes through the rest of the lines. I've tried different solutions but none seem to work.          p=$(awk -F ',' 'NR==1{print $1}' send.txt)     n=$(awk -F ',' 'NR==1{print $2}' send.txt)     l=$(awk -F ',' 'NR==1{print $3}' send.txt)     e=$(awk -F ',' 'NR==1{print $6}' send.txt)          echo $p  $n  $l  $e          #This part is to replace the values in the email template using sed and save the modified template as sendnow.txt.            sed -e "s/__FULLNAME__:/\ $n $l :/g;s/__Project__/\ $p /g" Reminder.email > sendnow.txt          cat sendnow.txt               #Yet to be written ... send out modified email templates.     exit 0          ########      This is the output it produces :               06/12/14     Project 1 Jack Chen test@cs.fiu.edu     Dear  Jack Chen :           This is a kindly reminder that our  Project 1  meeting will be held on today.           Best Regards,      CIS5027      As you see it did properly replace the fields but only for Jack Chen. There were 3 lines in the send.txt file so there must be 3 modified versions of the above template.


title: Can I split a disk image and run Photorec on each part individually?

text: I'm running Photorec on an external HD connected via USB and it's taking too long, with the estimated remaining time constantly increasing. Is there a way to create a disk image from that external drive, split it in smaller parts, copy each part to my internal SSD (one at a time) and run Photorec on it? I don't have much free space on the SSD, so I can't have the entire image copied at once.


title: Memory-efficient utility to return N first sorted values

text: I would like to implement a very popular MapReduce example using only existing programs operating in a UNIX way. The problem is to find N most frequent values in an enormous amount of data. The generic solution on any general- purpose programming language is:   1. Map each value from the list to a tuple (value, 1).   2. Group same values summing up their counts.   3. Sort values by counts keeping top N frequent items. For efficiency each step should fit into memory and be parallelized if possible. Thus I can use `split`, `paste`, `xargs` and `sort` from "core utils" and `parallel` from "more utils" for the first two steps still satisfying problem constraints. But in order to implement the last step I need always keep not more than N values simultaneously or else I will quickly run out of memory, so obviously I cannot use `sort` piped to `head`. A common approach is to use "priority queue" data structure, but is there a program for that?


title: How do I sort using the grep and sort command

text: I would like to create a sorted list of all TCP services found in the file `/etc/services`. Pipe the output of the command `grep tcp /etc/services` into the command `sort`. Redirect the output of this pipe into the file `~/pipelab.txt`. I don't know what I am doing wrong. I keep getting a error message that my output is wrong? This is what I tried last: `grep tcp /etc/services > ~/pipelab.txt | sort` Thank you for any help.


title: Not receiving any data from ACM device

text: I am unable to receive any data from a CDC-ACM device on my embedded Linux device. My Linux embedded device is running kernel 2.6.16.11 and has a armv5tejl processor. When plugged in, I see the following:               Jul 30 09:19:24 kern.info kernel: usb 1-1.3: new full speed USB device using s3c-ohci and address 8     Jul 30 09:19:24 kern.info kernel: usb 1-1.3: configuration #1 chosen from 1 choice     Jul 30 09:19:24 kern.err kernel: drivers/usb/class/cdc-acm.c: This device cannot do calls on its own. It is no modem.     Jul 30 09:19:24 kern.info kernel: cdc_acm 1-1.3enter code here:1.0: ttyACM0: USB ACM device      When I create the node using `mknod /dev/ttyACM0 c 166 0` and `cat /dev/ttyACM0`, I am not getting any data! I have tried this device on Ubuntu 12.04 and it streams the data no problem. Here is a print out of `/proc/bus/usb/devices`:               T:  Bus=01 Lev=02 Prnt=02 Port=02 Cnt=01 Dev#=  8 Spd=12  MxCh= 0     D:  Ver= 2.00 Cls=02(comm.) Sub=00 Prot=00 MxPS=64 #Cfgs=  1     P:  Vendor=1c3d ProdID=XXXX Rev= 1.00     S:  Manufacturer=Nonin Medical, Inc.     S:  Product=Product_Name_Removed     S:  SerialNumber=XXX     C:* #Ifs= 2 Cfg#= 1 Atr=80 MxPwr=100mA     I:  If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=02 Prot=01 Driver=cdc_acm     E:  Ad=82(I) Atr=03(Int.) MxPS=   8 Ivl=255ms     I:  If#= 1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_acm     E:  Ad=03(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms     E:  Ad=81(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms


title: How can I let ipset entries "age"?

text: I am trying to establish a whitelist of clients that have successfully logged into the system, using `ipset`. What options do I have to let an entry age so that I can later discard it based on its age? Is there a better method than the idea outlined below? I have not found anything provided by `ipset` directly, so I am trying to establish whether or not such a facility exists within the scope of `ipset`/`iptables`. * * * Right now the only idea I have come up with is to use a cronjob that swaps the list every X minutes or hours. So as an example I'd have a list `whitelist` which is active, plus a list for the next hour (say for 21:00 `whistelist_21`), if I am some time between 20:00 and 20:59. Any client connecting _now_ would be added to the active `whitelist` and to the whitelist for next hour (or a given period). Then at each full hour (or given period) a cronjob - e.g. at 21:00 in the above case - swaps the existing `whitelist` for the `whitelist_21` one and disposes of the (now renamed) `whitelist`. E.g.:               ipset swap whitelist whitelist_21     ipset destroy whitelist_21


title: Install the zorin desktop enviroment on Fedora 20

text: Is there any way to install the Zorin desktop enviroment on Fedora 20? I mean we can install the kde plasma, Gnome or lxde etc. For example this way:               sudo yum install @lxde-desktop      is any way to install it?? thanks http://zorin-os.com/index.html


title: What is a process GID and what purpose does it serve?

text: Reading mod_wsgi's documentation I found you can choose which group to run the worker processes as. I can understand group ownership of files and how only a user who belongs to that group can achieve the group permissions of that file, but I don't understand how this applies to running processes. So, what is a process GID and what purpose does it serve?


title: Unable to boot Windows after installing Fedora

text: I have installed Fedora 20 alongside Windows 8.1, now I am able to get into Fedora but my Windows is unable to boot. On startup it shows list of installed OSes in which the last option is "Windows Boot Loader", but when I choose this option it shows an error.


title: Syslog-ng failover: logserver to local file

text: We want to use a central Logserver for our Webservers so we can manage everyhing on one machhine. I'm a bit scared of what happens if the network breaks or the Logserver is down. Is it possible that if the client can't reach the logserver (TCP), that he will write it into local file? Is it possible to make a failover like that?


title: Start zsh with a custom zshrc

text: I want to be able to start zsh with a custom rc file similar to the command: `bash --rc-file /path/to/file` If this is not possible, then is it possible to start zsh, run `source /path/to/file`, then stay in the same zsh session? Note: The command `zsh --rcs /path/to/file` does not work, at least not for me... EDIT: In its entirety I wish to be able to do the following: `ssh` to a remote server "example.com", run `zsh`, `source` my configuration located at `/path/to/file`, all in 1 command. This is where I've struggled, especially because I'd rather not write over any configuration files on the remote machine.


title: Where to file a bug?

text: There are lots of Linux distributions and every one of them is made according to maintainers point of view using different DE, package managers, kernels etc. When some part of your hardware is failing to work properly reporting a bug on that should be forwarded to distro maintainers or directly to kernel maintainers? How a novice user of linux can know where to go when something is not working correctly and all other resources (google, forums) failed to solve a problem?


title: unexpected bash behaviour after console login (openSUSE)

text: I'm trying to install a Linux OS on the computer I use as a home server, because I liked "Raspbian" so much on my Raspberry Pi. I created a custom linux using openSUSE Studio, that's just text based and very simple, to squeeze all the performance I can out of the machine. I was expecting something like Rasbian, where it boots and you log in, and can use `sudo` and `startx` to get into the desktop, however on Debian and on the openSUSE, it boots to `bash`. How can I get out of `bash` and into the (terminal?), so I can use `apt-get`, `sudo`, and all that. I know I need to look into how linux works first, but my main concern is getting on on the machine and installing software, so I can get the machine closed up and in its rack.


title: Install Cinnamon on openSUSE

text: I would like to install Cinnamon on my openSUSE 13.1 minimal installation. But I've the following Problem. I add te repo install it from Yast/Zypper. sudo zypper ar http://download.opensuse.org/repositories/X11:/Cinnamon:/Factory/openSUSE_13.1 Cinnamon sudo zypper ref Cinnamon yast/zypper in -t pattern Cinnamon My Problem is that X11 isn't in the dependencies so I've to install the pattern manualy. I've done that but how can I start Cinnamon now? When I try to execute startx it says that startx isn't installed...


title: Where to get styles for QT4 applications, not dependent on KDE libraries?

text: I am running some QT4 applications without a GNOME or KDE desktop. KDE- Look.org has many style themes, but they all seem to require KDE libraries. `qtconfig` contains a very limited selection of QT4 themes, but these all appear very old, e.g. resembling CDE or Motif. Is there a repository or collection of QT4 themes that can be installed without installing hundreds of megabytes of KDE libraries?


title: How to connect to a virtualbox guest?

text: I have Ubuntu and I've installed VirtualBox in the desktop and installed CentOS but how would I go about connecting to it remotely via SSH as if I type my IP in? When I do this it just loads the Ubuntu SSH?


title: Recovering free space after zeroing out drive with sfill?

text: I was following a tutorial showing how to zero out the free space by using sfill . It only occurred to me after the fact that I did this that if the free space is zeroed out, then of course I don't have any free space left on the drive. Is there any way to recover the free space that was zeroed out on my drive?


title: Join: Two files - but only append last two columns

text: Given the files: ### 1.txt               1, abc, 123, 456, 789     2, lmn, 123, 456, 789     3, pqr, 123, 456, 789      ### 2.txt               1, abc, 123, 000, 000     3, lmn, 123, 000, 000     9, opq, 123, 000, 000        ### OUTPUT.txt               ID, NAME, X,    1A,    1B,  2A,   2B        1, abc, 123, 456, 789, 000, 000     2, lmn, 123, 456, 789, MISSING, MISSING     3, pqr, 123, 456, 789, 000, 000     9, opq, 123, MISSING, MISSING, 000, 000       I'ved used this for reference. I tried using the following:               join -t , -a1 -a2 -1 1 -2 1 -o 0 -o 1.2 -o 1.3 -o 1.4 -o 1.5 -o 2.4 -o 2.5 -e "MISSING" 1.txt 2.txt      Which produces:               1, abc, 123, 456, 789, 000, 000     2, lmn, 123, 456, 789,MISSING,MISSING     3, pqr, 123, 456, 789, 000, 000     9,MISSING,MISSING,MISSING,MISSING, 000, 000      Any help?


title: grep to find "print" not "#print"

text: In debugging, I use a lot of 'print' and commenting out it with '#print'. How can I use grep to find the line without '#' before 'print'?               # print <- not detect     #print <- not detect     abc # print <-- not detect     print <- detect


title: How to recursively find the amount stored in directory?

text: I know you are able to see the byte size of a file when you do a long listing with `ll` or `ls -l`. But I want to know how much storage is in a directory including the files within that directory and the subdirectories within there, etc. I don't want the number of files, but instead the amount of storage those files take up. So I want to know how much storage is in a certain directory recursively? I'm guessing, if there is a command, that it would be in bytes.


title: Is there a top-like command that shows the network bandwidths and file accesses of running processes

text: For example, we'd like to see:               PROCESS       IF       TX       RX       FILE(regular) R/W     prog1         eth0     200kB/s  12kB/s   --            --                   wlan0    12kB/s   100kB/s  --            --                   --       --       --       file1         R                   --       --       --       file2         R                   --       --       --       file3         W     prog2         eth0     0kB/s    200kB/s  --            --                   --       --       --       file4         W                   --       --       --       file5         W      Is this possible? nethogs only shows the TX/RX, while lsof only shows the file accesses. I'm currently doing a 2-step process like so:               sudo nethogs     sudo lsof -a -d 1-999 -c hogging_program /      Is there a better way?


title: How to remap simultaneous letter keys to modifier?

text: I have really gotten used to the "Simultaneous Vi Mode" functionality of KeyRemap4MacBook which lets you press and hold the `s` and `d` keys simultaneously and then use the `h`, `j`, `k`, and `l` keys as the arrow keys. When `s` and `d` are pressed together, no `s` or `d` event is fired, but when I type normally I don't notice any delay problems with hitting `s` or `d` individually. How could I recreate this functionality in Linux (specifically RHEL 6.4)? A couple ideas I had:   1. If `s`+`d` could be remapped to a modifier, then the keys `h`,`j`,`k`,`l`+modifier could be mapped accordingly. (The keyboard I am using now does not have any spare modifier keys available to use instead of `s`+`d`, plus the point of Simultaneous Vi Mode is to keep all fingers on the home row. `CapsLock` is already remapped to `Control` and `Escape`).   2. Ideally, I would find a way to do this using system settings or something like XKB keyboard which I am using already. If that's not possible, perhaps something similar to the xcape program (which I am using and which lets keys be mapped to different keypress and modifier key symbols) could be written. `xcape` triggers off of key release though, so it would have to be tweaked to keep the `s` and `d` keys from being too slow.


title: Force IPv6 only through Miredo

text: I have an Ubuntu PC with Miredo's implementation of the Teredo protocol. I want to temporarily make it so that I can access IPv6-only addresses with all IPv4 networking available solely for Miredo to use. As such:   * can I configure my PC in a way to do the above?   * If not, how may set up a QEMU/KVM guest to do the same via the host's Teredo access? I realize that there's two questions asked in this post (one for local configuration and another for VMs), but I will edit it to the single question that's satisfactorily answered. And I'm asking on Unix & Linux SE instead of Ask Ubuntu because I believe the more technical questions would be better off in this SE.


title: Why does linux scan my cdrom on boot?

text: My linux system scans my cdrom on boot. Can I disable that feature without removing my cdrom tray?


title: Recovering NTFS drive with safecopy

text: Several days ago, I dropped my USB external hard disk. As a result, I cannot read some of the files. I would like to recover it, and now I am using **safecopy**. I used the following command,               sudo safecopy /dev/sdb1 data.img --stage1      However, at around 93%, then there is a message something like "cannot read from source". Then I tried to mount this partially recovered image, but failed. What are the things I can do more to recover the data? ================================================================== I have tried to use               sudo safecopy /dev/sdb data.img --stage1      Now, it is done. Then, I               fdisk -lu data.img      It produces this result,               Disk data.img: 310.8 GB, 310798626816 bytes     255 heads, 63 sectors/track, 37785 cylinders, total 607028568 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: 0xb1bec32c             Device Boot      Start         End      Blocks   Id  System     data.img1              63   625137344   312568641    7  HPFS/NTFS/exFAT      Then, I tried to mount with               sudo mount -o loop,offset=32256 -t ntfs data.img /mnt/temp      but failed with this output               Failed to read last sector (625137281): Invalid argument     HINTS: Either the volume is a RAID/LDM but it wasn't setup yet,        or it was not setup correctly (e.g. by not using mdadm --build ...),        or a wrong device is tried to be mounted,        or the partition table is corrupt (partition is smaller than NTFS),        or the NTFS boot sector is corrupt (NTFS size is not valid).     Failed to mount '/dev/loop0': Invalid argument     The device '/dev/loop0' doesn't seem to have a valid NTFS.     Maybe the wrong device is used? Or the whole disk instead of a     partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?      How should I do to recover the data from here?


title: How can I change the default action of C-a in screen to just a backtick `?

text: I tried something like               escape ^`      But that did not do it? I just want to change the default ctrl-a behavior. Also, is it possible to bind each numeric key (1, 2, 3, 4, 5) to change those specific windows? So I can just be like:               `1 and go to window 1          `2 goes to 2      Any help would be greatly appreciated! :)