title: How do I setup an IP address on my virtualbox VM?

text: I have a VM which I run on VirtualBox like so ...                   $ VBoxManage startvm --type headless dev-006      ... and I can see that NIC1 is "Bridged" and setup like so ...                   $ VBoxManage showvminfo dev-006 --details         ...         NIC 1:           MAC: 080027A7F746, Attachment: Bridged Interface 'eth1', Cable connected: on, Trace: off (file: none), Type: 82540EM, Reported speed: 0 Mbps, Boot priority: 0, Promisc Policy: deny, Bandwidth group: none            NIC 2:           disabled         NIC 3:           disabled         NIC 4:           disabled         NIC 5:           disabled         NIC 6:           disabled         NIC 7:           disabled         NIC 8:           disabled         ...      ... what I cannot figure out is what is dev-006's IP address. I have looked at other questions and answers on unix.stackexchange.com and I saw this one (Can VirtualBox return IP address for launched VM?) and it says I should be able to execute ...                   $ VBoxManage guestproperty get yourvmname "/VirtualBox/GuestInfo/Net/0/V4/IP"      ... but when I run ...                   $ VBoxManage guestproperty enumerate dev-006      ... I get this output ...                   Name: /VirtualBox/HostInfo/VBoxVerExt, value: 4.3.10, timestamp: 1396471710759617000, flags: TRANSIENT, RDONLYGUEST         Name: /VirtualBox/HostGuest/SysprepExec, value: , timestamp: 1396471710758813000, flags: TRANSIENT, RDONLYGUEST         Name: /VirtualBox/HostGuest/SysprepArgs, value: , timestamp: 1396471710758950000, flags: TRANSIENT, RDONLYGUEST         Name: /VirtualBox/HostInfo/VBoxRev, value: 93012, timestamp: 1396471710759735000, flags: TRANSIENT, RDONLYGUEST         Name: /VirtualBox/HostInfo/VBoxVer, value: 4.3.10, timestamp: 1396471710759497000, flags: TRANSIENT, RDONLYGUEST      ... so my question is why don't I see something like "/VirtualBox/GuestInfo/Net/0/V4/IP"? UPDATE: Well I figured out why my VM doesn't have a IP address. I ran `VBoxManage controlvm dev-006 screenshotpng screen-shot-dev-006.png`. See attached screen shot.![enter image description here](http://i.stack.imgur.com/V4sUZ.png) If anyone can help me that I'd be very grateful. I guess I'll have to ask a new question about "this kernel requires an x86-64 cpu but only detected an i686 cpu virtualbox" Thanks


title: Any ideas to simplify the awkward rsync expression below?

text: Here is expression:               rsync -avz --progress -e "ssh -i /where/is/my/id_dsa" vivek@some.host:`ssh -i /where/is/my/id_dsa  vivek@some.host "find /remote/source/dir -type f -name '*.sql' | sort -nr | head -1"` .      It looks for one fresh SQL file on remote host **some.host** in **/remote/source/dir** with user **vivek** and copies to current dir on localhost, it uses `/where/is/my/id_dsa` key for `ssh` and `rsync` authorization. So this backquoted `ssh -i ...` frightens me a lot. But I don't see other way to find necessary file. How can I simplify it?


title: OpenSUSE - Ethernet adapter up but can't ping the router

text: OpenSUSE 12 LAN driver is up and running:               me@here:~> /sbin/ifconfig     eth0      Link encap:Ethernet  HWaddr 00:1A:4D:F9:93:F2                 inet fe80::21a:4dff:fef9:93f2/64 Scope:Link               UP BROADCAST RUNNING MULTICAST  MTU:1500  Metracic:1                                                                                RX packets:406 errors:0 dropped:72 overruns:0 frame:0                                                                                TX packets:64 errors:0 dropped:0 overruns:0 carrier:0                                                                                collisions:0 txqueuelen:1000                                                                                RX bytes:33701 (32.9 Kb)  TX bytes:9039 (8.8 Kb)                                                                                Interrupt:44 Base address:0x8000                                                                                lo        Link encap:Local Loopback                                                                                inet addr:127.0.0.1  Mask:255.0.0.0                                                                                inet6 addr: ::1/128 Scope:Host                                                                                UP LOOPBACK RUNNING  MTU:16436  Metric:1                                                                                RX packets:240 errors:0 dropped:0 overruns:0 frame:0                                                                                TX packets:240 errors:0 dropped:0 overruns:0 carrier:0                                                                                collisions:0 txqueuelen:0                                                                                RX bytes:17863 (17.4 Kb)  TX bytes:17863 (17.4 Kb)          me@here:~> /sbin/arp     Address                  HWtype  HWaddress           Flags Mask            Iface       78.90.162.1              ether   00:1b:fc:66:4e:86   C                     eth0        However, I can't seem to ping the router:               me@here:~> ping -b 78.90.162.255       WARNING: pinging broadcast address     PING 78.90.162.255 (78.90.162.255) 56(84) bytes of data.     ^C     --- 78.90.162.255 ping statistics ---     10 packets transmitted, 0 received, 100% packet loss, time 8999m      Through the same cable, a WindowsXP machine connects just fine, outputting the following parameters: > IP address 95.111.106.82   >  subnet mask: 255.255.255.0   >  Gateway: 95.111.106.65   >  DNS Server: 95.111.106.65 **What should I do from here on?**


title: Portage on Gentoo how to view available software versions?

text: I would like to install program foo using `emerge` on a Gentoo system; so I simply use `emerge foo` to install and portage selects the most current version of that software that's in its repository. If I know the version number and the naming covnention, I can do `emerge =foo.1.2` and use `eselect` to chose what the currently inforce package is out of the installed ones, if the package supports it. But what if I don't know the version number or naming convention and just want a list of what's versions of foo are available to me? I don't see an emerge option that does this and snooping around under `/usr/portage` doesn't yield me anything. Bonus: Is there anyway to find what locations `emerge` polls to determine what packages are available? For example, many of the ebuilds on my systems are in nonstandard locations, but `emerge` finds them anyway, so I'm attempting to determine how `emerge` builds it's list of available software versions.


title: vsftpd: virtual user not able to upload file or create directory

text: I created 2 virtual users for ftp (vsftpd): bholu1 and bholu2 I wanted bholu1 to have write access, access to make directory and upload permission. For that I have set up the user bholu1 as below but still he isn't able to upload file or create a directory. ( I have followed this link to achieve this) See below: I have set per-user configurability for both user :bholu1 and bholu3               ravbholua@ravi:/etc/vsftpd_user_conf$ pwd     /etc/vsftpd_user_conf     ravbholua@ravi:/etc/vsftpd_user_conf$ cat bholu1     anon_world_readable_only=NO     write_enable=YES     anon_upload_enable=YES     ravbholua@ravi:/etc/vsftpd_user_conf$ cat bholu3     anon_world_readable_only=NO     ravbholua@ravi:/etc/vsftpd_user_conf$      Both are able to read the login directory. But as per the configuration for bholu1, he should be able to upload as well as create a new directory but he isn't able to do so. Please see below the conf. file:               ravbholua@ravi:/etc$ cat vsftpd.conf     pam_service_name=/etc/pam.d/vsftpd.virtual     user_config_dir=/etc/vsftpd_user_conf     anonymous_enable=NO     local_enable=YES          #write_enable=NO     #anon_upload_enable=NO     #anon_mkdir_write_enable=NO     #anon_other_write_enable=NO     anon_world_readable_only=YES          chroot_local_user=YES          guest_enable=YES     guest_username=virtual          listen=YES     listen_port=10021          pasv_min_port=30000     pasv_max_port=30999          ravbholua@ravi:/etc$      It doesn't make any difference even if I uncomments all lines which are commented as shown above in the config. file. Also have a look below to see what happens when bholu1 logs in ftp server:               ravbholua@ravbholua-Aspire-5315:~$ ftp -p rs 10021     Connected to ravi.com.     220 (vsFTPd 3.0.2)     Name (rs:ravbholua): bholu1     331 Please specify the password.     Password:     230 Login successful.     Remote system type is UNIX.     Using binary mode to transfer files.     ftp> put soul.txt     local: soul.txt remote: soul.txt     227 Entering Passive Mode (109,202,101,166,117,249).     553 Could not create file.     ftp> mkdir a     550 Permission denied.     ftp>       May I request you to say what am I missing in my configuration.


title: How to write to SD card with dd command?

text: Having some trouble with writing to my SD card, burning NOOBS (New Out Of Box Software) software to my SD card for Raspberry Pi. Attempted to use the following command as root:               # dd bs=1M if=/home/harrydevries/Downloads/NOOBS_v1_2_1 of=/dev/sdb     dd: reading `/home/harrydevries/Downloads/NOOBS_v1_2_1': Is een map     0+0 records in      0+0 records out      0 bytes (0 B) copied, 0,00117138 s, 0,0 kB/s


title: mod_authnz_ldap bind as authenticating user instead of anonymously

text: I'm attempting to move as close to single credential as possible. We have a web application that has a fairly limited set of available authentication mechanisms but will (luckily) allow admins to tell it to trust the `REMOTE_USER` environmental variable set by `httpd`. Is there a way to configure mod_authnz_ldap to authenticate using the requesting user's credentials instead of just choosing between anonymous binds or shared credentials? This is what I currently have:                   <Location />                 AuthzLDAPLogLevel debug            AuthType Basic            AuthBasicProvider ldap            AuthName "Active Directory"            AuthzLDAPAuthoritative off            AuthLDAPBindDN CN=jad,DC=xxx,DC=com            AuthLDAPBindPassword xxx            AuthLDAPURL ldap://xxx.xxx.64.71/DC=xxx,DC=com?samaccountname?sub            require valid-user              </Location>      `xxx`'s mark redaction. Basically the above works to authenticate users but it uses my account to bind to AD. If I try to comment out the `AuthLDAPBindDN` and `AuthLDAPBindPassword` it seems to attempt to perform an anonymous bind, which the AD administrators have configured to be denied. My question is whether apache can be configured to use the authenticating user's credentials instead of making me choose between anonymous bind or using a shared account (which isn't possible either, given the policy the AD guys have set). Using a person's account is also obviously not ideal for situations where they're terminated or leave.


title: How to display the complete address with curl in searching?

text: I need to display the complete address with curl, when it find results with '301' status code. This is my variable.               search=$(curl -s --head -w %{http_code} https://launchpad.net/~[a-z]/+archive/pipelight -o /dev/null | sed 's#404##g')           echo $search     301      The above works, but only display if the site exists with '301' status code. **I want**               echo $search     https://launchpad.net/~mqchael/+archive/pipelight      * * * **UPDATE** This is my new variable, maybe can explain what I need. This variable will help me to search and install a ppa in Ubuntu o similar.               ppa=$(curl https://launchpad.net/ubuntu/+ppas?name_filter=$packagename | grep '$packagename<" )          echo $ppa      **Example:** `ppa=$(curl https://launchpad.net/ubuntu/+ppas?name_filter=Pipelight | grep '<td><a href="/~' | grep ">Pipelight<" )`               echo $ppa           Pipelight	      The problem here is I can't extract `mqchael` (this name is variable), also pipelight is only a example. **This is the format final when I will apply my variable.**               ppa:mqchael/pipelight


title: Executable symbolic link file not working

text: On Mac OSX, I am having trouble with a pretty simple thing. My symbolic link doesn't want to execute. Can you help me spot the trouble? Thanks!               $ echo $PATH     /Users/pitosalas/.rbenv/shims:/usr/local/bin:/usr/local/git/bin:/usr/bin:/bin:/usr/sbin:/sbin          $ ls -l /Applications/Sublime\ Text.app/Contents/SharedSupport/bin     total 320     -rwxr-xr-x@ 1 pitosalas  admin  160688 Jun 27 00:27 subl          $ ln -s "/Applications/Sublime\ Text.app/Contents/SharedSupport//bin/subl" /usr/local/bin/subl          $ chmod 755 /usr/local/bin/subl          $ ls -l /usr/local/bin/subl     lrwxr-xr-x  1 pitosalas  admin  63 Jul  1 16:36 /usr/local/bin/subl -> /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl          $ subl     -bash: subl: command not found      ### Response to comment: What rehash? You don't mean rbenv rehash do you? Also here's the command in a new shell:               /usr/local/bin/subl      -bash: /usr/local/bin/subl: No such file or directory


title: Change the color of tcsh output for any command

text: I want a different color for terminal returns: Example:               $ pwd                //when return key is hit      $ /home/user/tools   //return value printed in different color, say: grey color      This requirement is not specific to `pwd`, command but for any command thrown to the terminal, my log will:   * $black //input   * $grey //output hope it is clear.


title: Automated incremental backups to an external drive

text: # Background A client needs an automated backup solution to an external drive (to be taken offsite weekly). I'd typically suggest rsnapshot (or perhaps rolling out a custom `rsync` script), but this question is slightly more involved. The Arch Linux based system is **headless** and therefore the solution must be _fully_ automated, requiring no user intervention. An ideal scenario would be as follows:   1. The user plugs in a USB hard drive   2. A complete incremental backup is made   3. The hard drive is unmounted   4. The user is notified that the hard drive can be unplugged # Proposal My proposed solution consists of:   1. A `udev` rule automatically mounts the drive   2. The backup is started with:     1. The same `udev` rule also triggers a `rsnapshot` script     2. An inotify _create_ event detects the new mount point and triggers `rsnapshot`   3. After `rsnapshot` exits, `umount` is ran on the drive   4. Possible ways to notify the hard drive can be removed:     1. The CD drive opens     2. A sound is played through the PC speaker If an error occurred at any point, email the user and unmount the drive. # Questions   1. My proposal seems feasible but are there obvious flaws? How can I make it robust?   2. For security purposes, how can I make sure the hard drive plugged in is the user's? `ssh` keys? Drive label?   3. Are there existing (Linux) solutions that encompass this?


title: Detect bad USB cable

text: Is it possible to detect with confidence via command line that the USB cable is damaged? I tried to connect my printer and it's not printing with this cable, I guess that the culprit is the USB cable. The only command I know is `lsusb` but I don't know how to use it to detect this type of information. I have only one cable now (and USB mouse and keyboard, it they could help) and I'd like to test if the cable is damaged. Is there a procedure I can do and say after it: "The USB cable should go to garbage" ![USB cable](http://i.stack.imgur.com/cNNhU.jpg)


title: Upgrading OpenGL Drivers

text: I'm trying to learn OpenGL and most tutorials on the internet only offer guidelines for OpenGL 3.0 and higher. So I looked for my OpenGL version and               glxinfo | grep OpenGL      yields this:               OpenGL vendor string: Intel Open Source Technology Center     OpenGL renderer string: Mesa DRI Intel(R) Ironlake Mobile      OpenGL version string: 2.1 Mesa 10.0.4     OpenGL shading language version string: 1.20      So I went to the offical site for these drivers: https://01.org/linuxgraphics/ I installed the latest version but it still says the same. I know my hardware is capable of doing some DirectX11 rendering so why wouldn't it support OpenGL3.0? Oh, I forgot: I'm using Fedora 20 64bit


title: Cannot connect to network in fedora 19

text: I am new to linux. I just installed fedora 19 and it shows that i am not connected to network (not recognizing network) though my connections are correct.   I don't know what to do. Can any one please help me (please..)? The network is wired. The result of ifconfig > lo : flags = 73 < UP,LOOPBACK,RUNNING > mtu 65536   >  inet 127.0.0.1 netmask 255.0.0.0   >  inet6 ::1 prefixlen 128 scopeid 0x10   >  loop txqueuelen 0 (local loopback)   >  RX packets 640 bytes 55680   >  RX errors 0 dropped 0 overruns 0 frame 0   >  TX packets 640 bytes 55680   >  TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 > > wlp3so : flags = 4099< UP,LOOPBACK,RUNNING > mtu 1500   >  ether 9c:4e:36:96:ae:30 txqueuelen 1000 (ETHERNET)   >  RX packets 0 bytes 0   >  RX errors 0 dropped 0 overruns 0 frame 0 Result of any ping ip address gives the following results > connect : network is unreachable


title: need give read write access to a folder and its subfolders and directories for a particular user

text: Could you help me to provide read/write access to a folder, its sub-folders and all the files below for a particular user? I tried to use the `getfacl` command, but didn't find a solution. I'm using solaris 10.


title: Managed code programming languages in Linux

text: Is there a .NET-like managed code programming environment in Linux? I've heard of Mono, but I don't see it extensively used -- even now Python can be seen used in most open source projects. * * * Edit: By managed code I meant for a pure object-oriented language (Java isn't). What I did find is QT framework, which supports almost everything that I know, even web applications using widgets named WT. I guess I found what I needed; it has everything.


title: What are .in files?

text: Sometimes in the sources of projects I see "*.in" files. For example, a bunch of "Makefile.in"s. What are they for and/or what does the ".in" part mean? I assume that this has something to do with `autoconf` or `make` or something like those, but I'm not sure. I've tried searching for ".in file extension", "autoconf .in file extension", "autoconf .in", "autoconf dot in", and other variants, with no luck.


title: g++: error: /usr/lib/libGL.so: No such file or directory after uninstalling AMD drivers

text: This is a question asked several times all over the internet. Duplicates:   1. http://askubuntu.com/questions/395544/g-error-or-nosuch-file-or-directory   2. http://askubuntu.com/questions/470532/typelib-usr-lib-libgl-so-1-file-too-short-after-installing-amd-drivers   3. and many more... The error message is as follows:               g++: error: /usr/lib/libGL.so: No such file or directory      Now, the issue is that while most people find this error after _installing_ the drivers, I have these errors once I _uninstalled_ the drivers. I have tried every solution on the web that I can find for this issue, but to no avail. Also, I have posted this question in AskUbuntu and I am using Linux Mint 14. From the AskUbuntu forum I followed the steps given by Charles to install the open source drivers. But when I do that, I get the following error:               /sbin/ldconfig.real: /usr/lib/libgraph.so.1 is not a symbolic link


title: What information do I need to solve an APT dependency issue?

text: I've seen several times people with unmet dependencies, which apt-get doesn't tells straightforward what's the problem, like this one:               The following packages have unmet dependencies:      libgl1-mesa-dri:i386 : Depends: libdrm-intel1:i386 (>= 2.4.38) but it is not going to be installed                             Depends: libdrm-nouveau2:i386 (>= 2.4.38) but it is not going to be installed                             Depends: libdrm-radeon1:i386 (>= 2.4.31) but it is not going to be installed                             Depends: libdrm2:i386 (>= 2.4.38) but it is not going to be installed                             Depends: libglapi-mesa:i386 but it is not going to be installed      libgl1-mesa-glx:i386 : Depends: libdrm2:i386 (>= 2.3.1) but it is not going to be installed                             Depends: libglapi-mesa:i386 (= 9.2.1-1ubuntu3) but it is not going to be installed                             Depends: libx11-6:i386 (>= 2:1.4.99.1) but it is not going to be installed                             Depends: libxcb-dri2-0:i386 (>= 1.8) but it is not going to be installed                             Depends: libxcb-glx0:i386 (>= 1.8) but it is not going to be installed                             Depends: libxcb1:i386 but it is not going to be installed                             Depends: libxdamage1:i386 (>= 1:1.1) but it is not going to be installed                             Depends: libxext6:i386 but it is not going to be installed                             Depends: libxfixes3:i386 but it is not going to be installed                             Depends: libxxf86vm1:i386 but it is not going to be installed      I know that walking through all dependencies `apt-get install libgl1-mesa- dri:i386 libdrm-intel1:i386` until I hit something is available, but in this case it will be a painful job due the amount of packages. Is there an easier way to do this?


title: For loop not getting executed correctly over ssh

text: I have a script in which I am reading from a csv file where it contains `SourceIp, DestinationIP,Source Ports, Destination Ports`. First I am reading the sourceIp and trying to do ssh over it (I am able to do it successfully), here I am trying to get a pseudo terminal and want to execute a for loop that will iterate over the sourcePorts(hyphen separated) and destinationPorts. **Input File Content :**               10.X.X.9,10.X.X.23,8140-61613,1521-1524-1525-1526-1530-1531-8140-61613      **Script :**               export lastSourceIP=""     export lastDestinationIP=""     export fqdn=""     export sourceFqdn=""     x=0     export username="sjain";     export location="/home/sjain/poc";     export baseLocation="10.X.X.9"     while IFS="," read f1 f2 f3 f4     do             x=$(($x+1))             TMP=$(mktemp)             TMP2=$(mktemp)             echo "Source IP        : $f1"                    echo "Destination IP   : $f2"             echo "Source Ports             : $f3"             echo "Destination Ports             : $f4"     export sourceIP=$f1     export destIP=$(echo "$f2" | tr -d '\n')     export port=$(echo "$f3" | tr -d '\n')     export destinationPorts=$(echo "$f4" | tr -d '\n')     ssh -t -t $username@$sourceIP 'bash -s' <<ENDSSH     (IFS='-'; for sourceP in $port; do       (for destinationP in $destinationPorts; do         echo "$sourceP" - "$destinationP"      done;)      done;)     exit      ENDSSH          done < ipaddress.csv      But when I am executing this script , it is not printing sourceIP - DestinationIp values. Here , is the output that I am getting on console. **Output:**                   Source IP        : 10.X.X.9         Destination IP   : 10.X.X.23         Source Ports             : 8140-61613         Destination Ports             : 1521-1524-1525-1526-1530-1531-8140-61613         tcgetattr: Inappropriate ioctl for device         (IFS='-'; for sourceP in 8140-61613; do          (for destinationP in 1521-1524-1525-1526-1530-1531-8140-61613; do             echo "" - ""          done;)         done;)         exit         [sjain@XXX.SERVER ~]$ (IFS='-'; for sourceP in 8140-61613; do         >  (for destinationP in 1521-1524-1525-1526-1530-1531-8140-61613; do         >     echo "" - ""         >  done;)         > done;)          -         [sjain@XXX.SERVER ~]$ exit         exit         Connection to 10.X.X.9 closed          .      **Expected Output :**               8140-1521     8140-1524     .... and so on      Please help where I am doing wrong.


title: How to compare two dates in a shell

text: How to compare two dates in a shell script? For example something like               todate=2013-07-18     cond=2013-07-15          if [ $todate -ge $cond ];     then         break     fi                                 It doesn't work. How can I achieve the desired result?


title: What is the format of the data that must be fed to the freetds tool bsqldb?

text: I need help figuring out how to input my data to bsqldb. I have been looking for a manual or some examples or tutorial but I cant find anything online beside its command line help. I am planning to pass my data to bsqldb from within a bash script using a variable using this command:               /usr/bin/bsqldb -S servername -U username -P password <<< ${VARIABLE}      $VARIABLE will contain data organized in this manner:               USE databasename     customsqlfunction ('param1','param2','param3','param4','param5')     customsqlfunction ('param1','param2','param3','param4','param5')     customsqlfunction ('param1','param2','param3','param4','param5')     customsqlfunction ('param1','param2','param3','param4','param5')      The sql server im connecting to is a MSSQL 2008 and it seems to be running TDS v 7.1 (which seems weird... read everywere 2008 is suposed to be on 7.2 but the tds tools keep saying its downgrading the protocol to 7.1 when i connect... but that is another issue) Thanks for your help.


title: Avoid "Authentication token manipulation error" on password change

text: I'm implementing a security policy that will force the users to introduce stricter passwords when they change their own: The `/etc/pam.d/passwd` configuration file is:               #%PAM-1.0     auth     include    common-auth     account  include    common-account     password include    common-password     session  include    common-session      So, I made changes in this file `/etc/pam.d/common-password`. The default `common-password` file comes with this two lines:               password    requisite   pam_pwcheck.so  nullok cracklib     password    required    pam_unix2.so    use_authtok nullok      I need to add several options to the pam_pwcheck (no problem with that) and another PAM module (pam_cracklib) to make the passwords stronger. Next, it is my final `/etc/pam.d/common-password` file, included from `passwd`:               password  requisite  pam_cracklib.so minclass=3 retry=3     password  requisite  pam_pwcheck.so  nullok cracklib minlen=10 remember=5     password  required   pam_unix2.so    use_authtok nullok      My problem occurs when I have both PAM modules configured: if I introduce a correct password, it works fine. If I introduce a bad password that must be rejected by `pam_cracklib` (for example, a password with only lower case letters), it works fine (rejects the password without problem). But when I introduce a password that is valid for `cracklib` but not for `pwcheck` (a password with upper case, lower case and numbers of 7 characters length), it rejects the password, but this error is shown:               Bad password: too short         passwd: Authentication token manipulation error      So, `pam_pwcheck` print its error message (`Bad password: too short`), but something bad happens with the PAM chain. Do you know what is wrong in my configuration? P.S. The "security" requirements are not mine at all, so please, avoid comments on it ;-).


title: Using Netis WF2123 Wifi Adapter on an AMD64 Ubuntu System

text: I'm having trouble getting the drivers for a Netis WF2123 wifi adapter to work under Linux Mint 17 (effectively Ubuntu 14.04 LTS) 64-bit. As it turns out the drivers are not available in any binary version from Netis nor do there appear to be any packages in this distro. Netis provides the full driver source, a script for compiling and installing the driver, and a guide for manual compilation and installation. However, running either the script, which basically just extracts the source tarball and runs `make`, or running `make` manually in the source directory triggers an error:               make[1]: Entering directory `/usr/src/linux-headers-3.13.0-24-generic'     /usr/src/linux-headers-3.13.0-24-generic/arch/x86/Makefile:113: CONFIG_X86_X32 enabled but no binutils support     make[1]: *** No rule to make target `Wf2123'. Stop.     make[1]: Leaving directory `/usr/src/linux-headers-3.13.0-24-generic'     make: *** [modules] Error 2      It also appears that it was only set up to compile for 32-bit, which I thought might be a problem, if the running kernels were 64-bit native. I am running these commands as root, as the provided script requests root permissions for `make`. I have downloaded drivers for the chip (RTL8192CU) from Realtek, but they also trigger errors (different ones, though, I'll look more into them). Kernels.org apparently has support for this chip in their backports, but I'm not quite sure how to go about installing one of these backports. Any suggestions would be appreciated.


title: Bind one process to multiple ports?

text: I have a socket server running and listening for incoming connections on a non-admin port (i.e. > 1024). I would also like for this process to be able to handle another type of connection on a different port for monitoring purposes. I have found questions on SE for the opposite situation, many-to-one but this would be a one-to-many situation. My questions: Is it possible to bind one process to multiple ports? If so can I reliably handle connections on the different ports uniquely (i.e. port 2000 execute one piece of code and port 3000 execute another). I am open to other suggestions as to how to handle a connection to monitor the other clients that are that are connecting to the primary port.


Does IPTraf includes its own activity in the report? If it does how do I exclude it?


title: Multiple Screens cause flickering (only when laptop is charging)

text: I'm using i3 window manager (shouldn't be relevant) on `3.6.2-1-ARCH` with `XServer` (ver 1.13.0), `xrandr` (ver 1.3.5) and `RandR` (ver 1.3). Graphics card is `Intel HD 4000`. I have set up my screen using               xrandr --output VGA1 --auto --left-of LVDS1      The issue is that my right screen (`VGA1`) has horizontal lines flickering up and down (refresh frequency problem perhaps?). My monitor reports that the input is:               1440x900     H: 56KHz V:60Hz     Analog Input      xrandr reports VGA1 as:               VGA1 connected 1440x900+0+0 (normal left inverted right x axis y axis) 410mm x 256mm        1440x900       59.9*+   75.0          1280x1024      75.0     60.0          1280x960       60.0          1366x768       60.0          1360x768       60.0          1280x800       74.9     59.8          1152x864       75.0          1280x768       74.9     59.9          1024x768       75.1     70.1     60.0          1024x576       60.0          832x624        74.6          800x600        72.2     75.0     60.3     56.2          848x480        60.0          640x480        72.8     75.0     66.7     60.0          720x400        70.1          1440x900_75.00   75.0         I have tried changing the options around (including adding new modes, e.g. `144x900_75.00`) with no luck. How can I get rid of this annoying flickering? **UPDATE** : I have just realized that the flickering of secondary screen only happens when laptop is plugged into power supply - while on battery problem does not exist. Any way to fix it?


title: wget download using list of urls

text: I'm trying to download several files with `wget`. The relevant URLs are stored in the file `url.txt`. When using the command `wget --content-disposition -i url.txt` it doesn't find the .txt file. Where do I have to store the url.txt file?


title: How do I install a system-wide SSL certificate on openSUSE?

text: I have a PEM certificate that I just downloaded from a webserver. I want to install it system-wide so I can curl the server without it complaining about a missing certificate. I tried putting the file in /etc/ssl/certs, but nothing happened.


title: Debian GUI hangs when resuming after screen is locked for long time

text: Debian GUI hangs when resuming after screen is locked for 4-5 hours. (no username, password entry screen is shown) I press ctrl+alt+f2 to switch to terminal console & the status of gdm3 is running. So, I restart gdm3 but the previous screen doesn't return back & I log in to another screen. Is there a way to return to my original screen?


title: bad inodes reappear after fsck() for vps guests

text: I have several vps guests that were created by virt-resize. I do daily backups on the guests by creating a snapshot and rsync file contents. But some of them don't have a clean disk image. As soon as I do a snapshot and mount the snapshot logical volume:               lvcreate -L5G -s -n guest15_snapshot /dev/vgroup/guest15     mount -o loop,offset=262144 /dev/group/guest15_snapshot /mnt/snapshot_dir      Bad inocdes are found through `/var/log/messages`:               Jul  2 11:21:41 server lvm[10346]: Monitoring snapshot group-guest17_snapshot     Jul  2 11:21:41 server kernel: EXT4-fs warning (device loop0): ext4_orphan_get: bad orphan inode 198!  e2fsck was run?     Jul  2 11:21:41 server kernel: ext4_test_bit(bit=197, block=145) = 0     Jul  2 11:21:41 server kernel: inode=(null)     Jul  2 11:21:41 server kernel: EXT4-fs (loop0): recovery complete     Jul  2 11:21:41 server kernel: EXT4-fs (loop0): mounted filesystem with ordered data mode. Opts:      Jul  2 11:21:42 server lvm[10346]: No longer monitoring snapshot group-guest17_snapshot     Jul  2 11:21:46 server lvm[10346]: Monitoring snapshot group-guest19_snapshot     Jul  2 11:21:46 server kernel: EXT4-fs warning (device loop0): ext4_orphan_get: bad orphan inode 25964!  e2fsck was run?     Jul  2 11:21:46 server kernel: ext4_test_bit(bit=1387, block=148) = 0     Jul  2 11:21:46 server kernel: inode=(null)     Jul  2 11:21:46 server kernel: EXT4-fs (loop0): recovery complete     Jul  2 11:21:46 server kernel: EXT4-fs (loop0): mounted filesystem with ordered data mode. Opts:      Jul  2 11:22:22 server lvm[10346]: No longer monitoring snapshot guest-vm19_snapshot      I tried `guestfish`:               guestfish -a /dev/vgroup/guest17     ><fs> run     ><fs> fsck ext4 /dev/sda1      Most of the time it returned `0x1`, which meant that the error is fixed. But once I mount the images again, the bad inodes reappear. How to permanently fix the bad inodes?


title: Install debian without gnome

text: I would like to install debian with another desktop than Gnome. In this case I can't use tasksel but have to install every package with apt-get. What do I need to run debian with Windowmaker?


title: How to make sure only one instance of a bash script runs?

text: A solution that does not require additional tools would be prefered.


title: isc-dhcp-server fails to start at boot

text: I have been running the isc-dhcp-server fine for quite a while. A few days back after an update, it fails to start. I found a few more people reporting similar problems but that was from 2009. I was unable to find the logs of the isc-dhcp-server process either. However, if I manually start the dhcp server as `sudo service isc-dhcp-server start', it runs just fine. The following is the output of `dmesg | grep isc-dhcp-server`               [   15.267804] init: isc-dhcp-server main process (1201) terminated with status 1     [   15.267839] init: isc-dhcp-server main process ended, respawning     [   15.334785] init: isc-dhcp-server main process (1352) terminated with status 1     [   15.334821] init: isc-dhcp-server main process ended, respawning     [   15.492463] init: isc-dhcp-server main process (1359) terminated with status 1     [   15.492496] init: isc-dhcp-server main process ended, respawning     [   15.550789] init: isc-dhcp-server main process (1366) terminated with status 1     [   15.550826] init: isc-dhcp-server main process ended, respawning     [   15.608956] init: isc-dhcp-server main process (1380) terminated with status 1     [   15.608990] init: isc-dhcp-server main process ended, respawning     [   15.660740] init: isc-dhcp-server main process (1387) terminated with status 1     [   15.660774] init: isc-dhcp-server main process ended, respawning     [   15.719178] init: isc-dhcp-server main process (1402) terminated with status 1     [   15.719213] init: isc-dhcp-server main process ended, respawning     [   15.769204] init: isc-dhcp-server main process (1409) terminated with status 1     [   15.769239] init: isc-dhcp-server main process ended, respawning     [   15.819264] init: isc-dhcp-server main process (1416) terminated with status 1     [   15.819301] init: isc-dhcp-server main process ended, respawning     [   15.869196] init: isc-dhcp-server main process (1430) terminated with status 1     [   15.869232] init: isc-dhcp-server main process ended, respawning     [   15.910841] init: isc-dhcp-server main process (1437) terminated with status 1     [   15.910873] init: isc-dhcp-server respawning too fast, stopped      I am using Mint 13. `Linux hostname 3.2.0-34-generic #53-Ubuntu SMP Thu Nov 15 10:48:16 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux` What could be wrong? How do I go about fixing this problem?


title: Is it more dangerous to connect to the net as root?

text: If I make some kind of tcp connection to the net as root, is that less safe then making the same tcp connection as a normal user? I have been suspecting for a while that by making a connection as root, it opens up the possibility for a hacker on the other end to come into my system as root. But if I connect as a normal user, then they might be able to come in as that user, which would be less of a security risk as they don't have root privileges. Am I right?


title: How to discard stderr in restricted Bash shell?

text: In my .bashrc there are a couple commands which redirect standard error to /dev/null, and this is not allowed within `rbash`:               bash: /dev/null: restricted: cannot redirect output      Is there some way to get around this (short of modifying Bash)? That is, to either   * discard standard error some other way or   * only attempt to redirect if it's allowed.


title: How does One Find the PID of a Process Started with startproc?

text: My understanding is that it's generally a good idea to create a PID file for daemon processes and that `startproc` is a good way to start these daemons. I know that `startproc` takes -i and -p arguments that refer to PID files but it doesn't create a PID file or update it with the ID of the daemon process that it starts. Echoing `$!` also doesn't give the right process identifier when `startproc` is used. Does anyone have any advice as to how the PID of a daemon started with `startproc` can be elicited? * * * For what it's worth, I'm writing an rc script and want to start a JVM as a non-privileged user. I don't really want to give this user a login shell (so `su -c "java ..." user` is not an option) and I don't really want a root process hanging around while the daemon is running either (which rules out `sudo -Eu user java ...`). So, while I acknowledge that these are possible workarounds, I don't find either of them to be ideal. Please feel free, though, to correct me if my assumptions about these alternatives are wrong.


title: Configure SCP access for login without a local account

text: Can I set up accounts that can do SCP that are **NOT** local users (i.e. users with an entry in `/etc/passwd`)? I've tried googling for SCP "without PAM authentication" or alternative authenication for `sshd` but I have not yet found anything that I can use. In other words: How can I configure SCP access on my Debian machine without having to create a new local account/local user? Doing this would be useful example in the case of a webhost with several `VirtualHost` entries in `httpd.conf` allowing people to securely upload their website assets without the admin having to create an account and setup SSHd to point to their `htdocs` directory as their home directory.


title: How do I trigger autocomplete without a tab key?

text: I'm ssh-ing to my machine using my iPhone with an app called ServerAuditior. It doesn't have tab key. See screenshot. How do I trigger autocomplete without the tab key? I don't want to type a lot of characters for cd-ing. I have arrow keys in this app. I can swipe down left right to use arrow keys. It would be amazing if I can bind it to forward arrow key when blinker in at end of my command ![enter image description here](http://i.stack.imgur.com/BLJaB.png)


title: Make fetchmail leave mail on server for a specified period of time?

text: I know that fetchmail can be configured to leave mail on the server (usually done with the `keep uidl` keyword combination), but is there a way to configure it to leave mail on the server _for a specified minimum period of time_ and delete them thereafter? For example, suppose I want messages to remain on the server for 48 hours after they have been downloaded, and then be deleted on the next fetchmail invocation against that server. I am mostly interested in solutions that work with POP3.


title: Select/Paste Word-Wrap on X-Based Terminals

text: Is there a sure-fire method to cut & paste word-wrap on X-based terminals? That is, if I select, then paste via button-3, if the text goes to the end of the line and wraps, the paste assumes carriage return and inserts it. I'd rather:               if (endcolumn==non-space character) {       assume wordwrap     }     else {       insert carriage return after last non-space character     }      This drives me crazy. Especially when pasting code that is > 80 columns. Sometimes it works, most of the time it doesn't.


title: from a sparse file to a block device over the network

text: If I have a sparse file representing a block device, then how can I efficiently restore the file over a network? Ideally, I'd use `rsync -S host:file /dev/sdb`, but `rsync` won't write to block devices. I am using `ssh host dd if=file | dd of=/dev/sdb`, but that's not efficient as the zero bytes will come over the network and be written to the device. Can I use `tar -S` or `cp --sparse=always` somehow? Can I do this without storing the file locally (even temporarily)? Can sshfs recognise sparse files?


title: In crontab is it possible to specify a user from a variable?

text: I am trying to have the following cron executed with a certain user.               U=`/usr/bin/w | grep -w :0 | awk '{ print $1 }'`     */1 * * * * $U /opt/script.sh      It seems the deamon doesn't know how to interpret this command; I get : > /usr/sbin/cron[18698]: (CRON) bad username (/etc/cron.d/script) Is there any way to do this ?


title: Build a package for Debian

text: I'm try to build a Debian package, using this commands :               debian/rules clean     dpkg-source -b .     debian/rules build     debian/rules binary      I've got this file :               myprog_1.1.0.orig.tar.gz     myprog_1.1.0-1.dsc     myprog_1.1.0-1.debian.tar.xz     myprog_1.1.0-1_all.deb     myprog-doc_1.1.0-1_all.deb      All the steps have been completed with success. When I open the directory `myprog-1.1.0/debian`, I find something, which looks like to a Debian package. But my libraries are not in there, they are under `myprog-1.1.0/debian/tmp/usr/lib/...`. And the compiled libraires are not in my `.deb`.   * Is this normal?   * Is there something else to do to finish this package ?   * If I'd want it to distribute it, should I recreate a `tar.gz` from `myprog-1.1.0`?


title: Flash using wrong audio output with Pulseaudio

text: I'm using Arch Linux x86_64 with Gnome and PulseAudio. I have USB speakers, which work for the sounds in system menus and most other applications. But whenever I play Flash videos, they output their sound through the onboard sound card (which usually isn't hooked up to anything). This happens in both Firefox and Chromium. I can't find anything that would let me redirect Flash's audio output to my USB speakers. The following relevant packages are installed:               gnome-media-pulse     gnome-settings-daemon-pulse     libcanberra-pulse     pavucontrol     pulseaudio     pulseaudio-alsa     lib32-libcanberra-pulse     lib32-libpulse     flashplugin


title: CrunchBang Linux causes connection lost

text: I have a really weird problem with my newly installed CrunchBang OS. When turning on my laptop and trying to connect wirelessly, all the other computers in the network disconnect from the internet. This happens before logging in, even when WiFi is disabled. This happened with another router (same brand, different network). I have set up a static IP but the problem remains. Also, after disabling WiFi with the hot-keys, the computer cannot turn off or log out. It gets stuck. Last but not least, this doesn't happen when the laptop restarts or it boots again if the router hasn't been turned off and on. I don't know if this helps but `lspci` returns the following:               00:00.0 Host bridge: Silicon Integrated Systems [SiS] 671MX     00:01.0 PCI bridge: Silicon Integrated Systems [SiS] AGP Port (virtual PCI-to-PCI bridge)     00:02.0 ISA bridge: Silicon Integrated Systems [SiS] SiS968 [MuTIOL Media IO] (rev 01)     00:02.5 IDE interface: Silicon Integrated Systems [SiS] 5513 IDE Controller (rev 01)     00:03.0 USB controller: Silicon Integrated Systems [SiS] USB 1.1 Controller (rev 0f)     00:03.1 USB controller: Silicon Integrated Systems [SiS] USB 1.1 Controller (rev 0f)     00:03.3 USB controller: Silicon Integrated Systems [SiS] USB 2.0 Controller     00:04.0 Ethernet controller: Silicon Integrated Systems [SiS] 191 Gigabit Ethernet Adapter (rev 02)     00:05.0 SATA controller: Silicon Integrated Systems [SiS] AHCI IDE Controller (0106) (rev 03)     00:06.0 PCI bridge: Silicon Integrated Systems [SiS] PCI-to-PCI bridge     00:07.0 PCI bridge: Silicon Integrated Systems [SiS] PCI-to-PCI bridge     00:09.0 FLASH memory: ENE Technology Inc ENE PCI Memory Stick Card Reader Controller     00:09.1 SD Host controller: ENE Technology Inc ENE PCI SmartMedia / xD Card Reader Controller     00:09.3 FLASH memory: ENE Technology Inc ENE PCI Secure Digital / MMC Card Reader Controller     00:0f.0 Audio device: Silicon Integrated Systems [SiS] Azalia Audio Controller     01:00.0 VGA compatible controller: Silicon Integrated Systems [SiS] 771/671 PCIE VGA Display Adapter (rev 10)


title: Execute a readline function without keybinding?

text: I was just reading the readline man-page and disovered a bunch of great commands I didn't know about. However, several don't have default key bindings. Is there a way to execute the unbound commands from the shell? I'm not asking how to bind the command in ~/.inputrc, but instead how to execute it as a "one off" from the shell or in a bash script. For example, the "dump-variables" command. Is there some command I can feed "dump-variables" to as an argument to have it executed? NOTE: Originally, posted on Server Fault, but advised to repost here.


title: Why are custom programs always installed in /opt, /srv, /usr/local, etc. and not in ~/ (home) folder?

text: The LTS repo is pretty good, but for some reason I prefer the "build from source" method for some programs. One reason is that I get the preferred version (PHP on LTS is on 5.3, whereas I can compile 5.4 from source). Similar is the case for `nginx`, `node.js`, etc. Now I would like to know, why all tutorials insist on installing the programs to the "root-owned" folders such as `/opt`, `/srv`, or `/usr/local`. I find it much easier to install it in my home folder such as: **/home/prahlad/programs/PHP-5.4** One advantage is that I don't need to use `sudo` to install these programs. Second and a related advantage is **security** concern. What if (suppose) any of these sources happen to contain malware (though less probable on linux)? Isn't denying them root privilege a good thing to do? I would like to know one example where it becomes necessary for a program to get installed in a root-owned folder?


title: Blank screen after logging out of XFCE

text: I have a fresh install of Arch Linux with a few packages, including XFCE. I started XFCE using startxfce4, then used XFCE to Log Out. But now all I have is a blank screen. How can I get my prompt back?


title: How to overwrite a non-Debian package?

text: ### Background I am trying to install Google Drive, so I am installing Grive. I previously tried to install SyncDrive, which isn't supported any longer. Now, I am having some conflicts between the two installations. (I am on Ubuntu 13.10 (Saucy Salamander).) ### The problem My installation of Grive was not working, indicating some missing dependencies. So I ran `sudo apt-get -f install`, but it gives me the following error:               Unpacking grive (from .../grive_0.3.0-1+git20131016~thefanclub~saucy1_amd64.deb) ...     dpkg: error processing /var/cache/apt/archives/grive_0.3.0-1+git20131016~thefanclub~saucy1_amd64.deb (--unpack):      trying to overwrite '/usr/bin/grive', which is also in package syncdrive 0.9-1     dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)      I tried to fix this using `sudo dpkg -i --force-overwrite /usr/bin/grive`, but it is not a Debian package. So, how can I resolve this problem? Is there a way to force the overwrite of `/usr/bin/grive`?


title: USB error -110 (power exceeded) but works when reconnecting

text: At the last boot, two USB devices were not powered:   * The Logitech G5 mouse works most of the time, but this time I had to plug it in (in the same motherboard USB port) three or four times before it would power up.   * The Wi-Fi USB dongle connected to the front panel which usually (not sure about always) does _not_ get powered during boot. It seems the issue is power related, which is a bit of a mystery: All the USB devices work fine on Windows every time, my PSU is pretty beefy, and more importantly, I'd been running Arch Linux with the same hardware for months before this problem occurred. People have suggested at least disabling USB autosuspension, some `old_scheme_first` magic setting, disabling `ehci_hcd` and turning it off and on again, but with no explanation I'm reluctant to try "fixing by accident." Does anyone know a well explained solution or some way to debug this in more detail, or some way to debug this in more detail? `apropos -a usb log` returns nothing, and it seems quite difficult to know which one of my 7+ USB devices is to blame. From `dmesg` of the last boot, in which both these devices were unpowered:               usb 4-5: device descriptor read/64, error -110     usb 4-5: new high-speed USB device number 5 using ehci-pci     usb 4-5: device descriptor read/64, error -110     usb 4-5: device descriptor read/64, error -110     usb 4-5: new high-speed USB device number 6 using ehci-pci     usb 4-5: device not accepting address 6, error -110     usb 4-5: new high-speed USB device number 7 using ehci-pci     usb 4-5: device not accepting address 7, error -110     hub 4-0:1.0: unable to enumerate USB device on port 5     usb 10-1: new full-speed USB device number 2 using uhci_hcd     usb 10-1: device descriptor read/64, error -110     usb 10-1: device descriptor read/64, error -110     usb 10-1: new full-speed USB device number 3 using uhci_hcd     usb 4-3: USB disconnect, device number 2     usb 4-3: new high-speed USB device number 8 using ehci-pci     hub 4-3:1.0: USB hub found     hub 4-3:1.0: 4 ports detected     usb 3-4: USB disconnect, device number 3     usb 3-4: new high-speed USB device number 5 using ehci-pci     usb 3-4: device not accepting address 5, error -71     usb 4-5: new high-speed USB device number 10 using ehci-pci     cfg80211: Calling CRDA to update world regulatory domain     rtl8192cu: Chip version 0x11     usb 4-3.1: new full-speed USB device number 11 using ehci-pci     rtl8192cu: MAC address: e8:4e:06:14:7a:77     rtl8192cu: Board Type 0     rtl_usb: rx_max_size 15360, rx_urb_num 8, in_ep 1     rtl8192cu: Loading firmware rtlwifi/rtl8192cufw_TMSC.bin     usbcore: registered new interface driver rtl8192cu     ieee80211 phy0: Selected rate control algorithm 'rtl_rc'     rtlwifi: wireless switch is on     systemd-udevd[695]: renamed network interface wlan0 to wlp0s29f7u5     rtl8192cu: MAC auto ON okay!     input: Microsoft X-Box 360 pad as /devices/pci0000:00/0000:00:1d.7/usb4/4-3/4-3.1/4-3.1:1.0/input/input14     usbcore: registered new interface driver xpad     rtl8192cu: Tx queue select: 0x05     usb 9-2: new full-speed USB device number 2 using uhci_hcd     hidraw: raw HID events driver (C) Jiri Kosina     usbcore: registered new interface driver usbhid     usbhid: USB HID core driver     input: Logitech USB Gaming Mouse as /devices/pci0000:00/0000:00:1d.1/usb9/9-2/9-2:1.0/0003:046D:C041.0001/input/input15     hid-generic 0003:046D:C041.0001: input,hidraw0: USB HID v1.11 Mouse [Logitech USB Gaming Mouse] on usb-0000:00:1d.1-2/input0     hid-generic 0003:046D:C041.0002: hiddev0,hidraw1: USB HID v1.11 Device [Logitech USB Gaming Mouse] on usb-0000:00:1d.1-2/input1     mousedev: PS/2 mouse device common for all mice     IPv6: ADDRCONF(NETDEV_UP): wlp0s29f7u5: link is not ready     usb 6-2: new full-speed USB device number 2 using uhci_hcd     usb 6-2: not running at top speed; connect to a high speed hub     usb-storage 6-2:1.0: USB Mass Storage device detected     scsi16 : usb-storage 6-2:1.0     wlp0s29f7u5: authenticate with cc:33:bb:13:8a:f4     wlp0s29f7u5: send auth to cc:33:bb:13:8a:f4 (try 1/3)     wlp0s29f7u5: authenticated     wlp0s29f7u5: associate with cc:33:bb:13:8a:f4 (try 1/3)     wlp0s29f7u5: RX AssocResp from cc:33:bb:13:8a:f4 (capab=0x431 status=0 aid=56)     wlp0s29f7u5: associated     IPv6: ADDRCONF(NETDEV_CHANGE): wlp0s29f7u5: link becomes ready


title: mkfsdos: define the size of FAT16|32 file system on USB pendrive in Linux

text: **Question** : How does one define the size of a FAT16 / FAT 32 file system with `mkdosfs` in Linux I want to create a, say 2 GB FAT16|32 filesystem on a partition in the size of 8 GB or more? This is how far I got:   * created a partition with `fdisk`   * `mkdosfs -F 16 /dev/sdb1` creates a FAT16 file system over the WHOLE partition - as long as this isn't larger tha 4 GB, I know   * `mkdosfs -F 32 /dev/sdb1` creates a FAT32 filesystem over the WHOLE partition. I know that this is the default and that I wouldn't neet to specify `-F 32` but for the sake of completeness and style…   * according to `man mkdosfs` the size of the file system is to be defined as the last argument   * HOW?! So far all of my attempts to define the size returned error messages. All of them.  Guessing that I just ran into a massice misunderstanding and being frustrated about not being able to solve such a simple question all by myself I really wonder where the heck did I miss something in defining the size?!


title: Remove directory in ftp

text: This is probably very simple, but I really can't get it to work. I have an old directory with a symlink in it. I need to delete the directory, but it says it is not empty when I try:               rm -f dirname        (I have also tried `-r`, and `-rf`) I get: "`usage: rmdir directory-name`" So then I try `rmdir -f dirname`, but I get the same response. I am a newb to the command line and would really appreciate if someone could help.


title: What is meant by stack in connection to a process?

text: From the book Advanced programming in the Unix environment  I read the following line regarding threads in Unix like systems > All the threads within a process share the same address space, ﬁle > descriptors, stacks, and process-related attributes.Because they can access > the same memory,the threads need to synchronize access to shared data among > themselves to avoid inconsistencies. What does the author mean by `stacks` here ? I do Java programming and know each thread gets its own stack . So I am confused by **shared** `stacks` concept here .


title: Fedora 16 Screen Issue

text: I have installed Fedora 16 recently, at first time login it was working fine. But when I restarted and after I gave user name and password, the home screen comes but its shaking rapidly and I am unable to work, again I restarted but the same problem. Unable to resolve, kindly help me on this. Thanks.


title: RTL8139 not being detected on openSUSE 11.3 - can installing openSUSE 11.0 on VirtualBox help?

text: http://en.opensuse.org/HCL:Network_(Wired) This hardware is getting shown in BIOS, but lspci dosn't show it on `openSUSE 11.3`. So, if I plant `openSUSE 11.0` on the VirtualBox on `11.3`, will that get it detected or it is compulsory for me to install the `11.0` separately?


title: Rake - "bundle exec" -  how can I avoid `bundle exec` with my `rake spec`

text: When I try to `bundle exec` I'm getting `You have already activated rake 0.9.3.beta.1, but your Gemfile requires rake 0.9.2.2. Using bundle exec may solve this. ...` I have `rake`, version `0.9.3.beta.1` I would like to have version `0.9.2.2` How do I switch to it? I'm on Ubuntu11


title: How do I configure Xen GPU passthrough for my AMD Radeon GPU?

text: I have an Ubuntu Server 12.10 setup with Xen 4.2.0 installed (compiled from source) and an AMD Radeon 7750 GPU. My Xen installation appears to be working and I can create virtual machines for example. I have set up a virtual machine and it appears to be working fine when connecting to it with VNC. However, after changing the config to enable GPU passthrough, nothing is appearing on my monitor and VNC just displays "serial0" and does not allow me to do anything. In order to enable GPU passthrough I appended the following to my config file:               gfx_passthru=1     pci=['01:00.0']      How can I pass my GPU to my virtual machine properly?


title: How do I hide login information passed to command line programs from appearing in the process list?

text: I have to execute a program that passes in as command line options the username and password. Is there a way to hide the username & password from appearing in the `/proc` entry for this process.


title: ksh :To store the output of a awk command in an array

text: I've the following `awk` command:               awk -F ' ' '{ print $NF }' log filename      And it gives the output as below:               06:00:00     parameters:     SDS     (2)     no     no     no     no          doc=4000000000).               information:     0     5898     5898     06:06:25      The problem is I need to save this in an array. For example when I print or echo `$array[0]` I should get `06:00:00` and similarly               $array[1] = parameters:     .     .     .     $array[n] = 06:06:25      My end goal is to print them using a print statement i.e               printf("start time: %d  and end time: %d", array[0], array[n]")      Output               start time:06:00:00 and end time:06:06:25


title: Sudo permissions by ldap groups via nslcd

text: I have a problem with my sudo permissions in an MS ActiveDirectory to Debian LDAP authentication/authorization setup. **What I have so far**   I've configured nslcd with libpam-ldap via ldaps and ssh login is working great.               getent passwd myuser     myuser:*:10001:10015:myuser:/home/myuser:/bin/bash      On my ActiveDirectory Server, the Unix Package is installed which adds the necessary attributes like posixGroup, posixAccount, gid, gidNumber, uid, uidNumber and so on. My example user looks like this:   (I choose 10000+ to be on the safe side)               cn: myuser     uid: myuser     uidNumber: 10015     gidNumber: 10000      I can restrict SSH logins by adding the following to /etc/nslcd.conf               filter passwd (&(objectClass=posixAccount)(|(memberOf=CN=group1,OU=groups,DC=domain,DC=com)(memberOf=CN=group2,OU=groups,DC=domain,DC=com)))      This specifies that only users with objecClass=posixAccount and group either group1 or group2 can login. So far so good. However, I can't tell sudo to use those groups. **Here is what I tried**   in /etc/sudoers               // This one works, but only because the user has gidNumber=10000 set.      // It doesn't matter if a group with this ID actually exist or not.      // So it's not really permission by LDAP group.     %#10000 ALL=(root) ALL               // This is what I want, but it doesn't work.     %group1 ALL=(root) ALL      **The Problem**   Somehow I need to tell sudo to take the requesting username, check what ldap- groups it belongs to and then see if the permissions for that group are sufficient to execute the command or not. Unfortuntely I have no idea where to start. Everything else works so far and I'm only stuck with sudo permissions. I thought about mapping the users gidNumber field to the groups gidNumber field but I don't know if mapping a user field to a group field is even possible. I don't think so, since mapping in nslcd is specified like this               map passwd field1 field2      and passwd tells nslcd that it has to mapp user fields. Instead of passwd I could use groups, but not both of them.


title: pmount not working on Debian wheezy

text: "Not working" might be slightly inaccurate, since it still seems to `mount` and `umount` things properly, but it's inaccessible to users other than the `root` user, which defeats the purpose entirely. It's still installed on the system, and works fine from the `root` account, but my regular user accounts don't have sufficient privileges to use it. I'm not aware of having changed any permissions relating to mounting, and `remove --purge pmount`ing followed by a re-install does nothing (both with `apt-get` and with `aptitude`. Any idea what I kicked over by accident?


title: Deep freeze like software for Fedora

text: For one of my labs, I need to maintain consistent file systems. So, I do not want any changes written to the file system after the system is shutdown. Currently, I am maintaining an operating system image and copying it manually after the lab session is over. I am trying to figure out if there is any open source implementation of **Deep Freeze** software for Fedora based systems. I am trying to maintain a consistent file system so that any changes made will be lost when the system reboots. From this link, I see there are similar software to Deep freeze, however, they are available for Debian based systems. I also came across LVM partitions which I did not understand much. Suggest me some software that can be used in Fedora based systems or some other better solution.


title: libpam load pam modules at every connection

text: I want to reduce ssh connection time, by debugging sshd have found that libpam is loading all pam modules specified in `/etc/pam.d/sshd` file at every connection. How to configure/modifiy libpam such that it loads modules only for first connection and after it uses same modules for every connection? I know libpam was designed for loading pam modules but want to load pam modules once. Let me know if anyone have any idea. I'm using `OpenSSH_5.8p1, OpenSSL 1.0.0l and Linux-PAM-1.1.3`


title: Obtain pop-id or IP address when client logs into Dovecot server

text: **Background**   I have been doing some research on the Dovecot mail server documentation on ways to get client information when a client connects to the server. I am interested in using these to program an application on the server side, but have currently found no methods to get this information. **Question** Is there a way to get detailed information about a client who connects to a Dovecot server upon authentication?


title: How to input a network file using scp to ffmpeg

text: My problem is this. I have access to a server that hosts many video files, most of them are very large and not well compressed. I intend to make a reduced quality smaller size copy of these on my local machine for better access. The problem is that the server does not have ftp access. I can scp the files to my machine and then use ffmpeg to reduce the size, but I'll run out of space if I copy all of the files locally. I am looking for a way to directly input a network file to ffmpeg, that way I'll be able to write a script that will overnight get me all the videos in reduced size.


title: How to correctly set kernel command parameter for sdboot

text: Thease are the kernel command line parameter                Kernel command line (user set)          root=/dev/mmcblk0p2 rw rootwait console=ttyPS0,115200             I am trying to run linux from sd card, and the file system I have chosen is `initramfs` given these facts, am I writing the kernel parameter correctly?


title: what am i missing ... why run a S/390 platform with Fedora desktop?

text: I found this link for a group that is converting fedora RPM's to run on S/390 hardware. Wikipedia tells me that the S/390 was made by IBM as a mainframe computer in the 1990's (and run out of service before 2000). So I have two questions: Why would you run a "standard desktop" OS on a (deprecated) mainframe? and are there any practical applications for a 1990's mainframe nowadays? The site seems to be pretty active, so I feel I must be missing something in its purpose.


title: Why was the word "shell" used to descibe a command-line interface?

text: I'm curious about the term "shell." I think I know what it is (though the distinction between "shell" and "terminal" is still fuzzy) but why was the word "shell" chosen to describe this type of program? This might seem unimportant, but usually when the word choices mystifies me, it is pointing to a gap in my understanding.


title: Excluding . and .. from results in find and ls

text: Is there any way to prevent `find` and `ls -l` from listing `.` and `..` in their results? I never care about seeing this result in the output, and it prevents me from effectively piping their output to `wc -l` to count things accurately. In case it matters, I am working in `zsh`.


title: timidity: No instrument mapped to tone bank 0, no idea which one is missing

text: I am trying to play this midi file downloaded from here, but I get:               $ timidity --verbose marivonnig1\ \(1\).mid      Requested buffer size 32768, fragment size 8192     ALSA pcm 'default' set buffer size 32768, period size 8192 bytes     Playing marivonnig1 (1).mid     MIDI file: marivonnig1 (1).mid     Format: 1  Tracks: 2  Divisions: 192     Sequence: Marivonnig     Text: By Traditionnel     Text: Generated by NoteWorthy Composer     Time signature: 2/4 24 clock 8 q.n.     Time signature: 3/4 24 clock 8 q.n.     Time signature: 2/4 24 clock 8 q.n.     Time signature: 3/4 24 clock 8 q.n.     Time signature: 2/4 24 clock 8 q.n.     Time signature: 3/4 24 clock 8 q.n.     Time signature: 2/4 24 clock 8 q.n.     Time signature: 3/4 24 clock 8 q.n.     Time signature: 2/4 24 clock 8 q.n.     Time signature: 3/4 24 clock 8 q.n.     Time signature: 2/4 24 clock 8 q.n.     Track name: Staff     364 supported events, 3413810 samples, time 1:17     No instrument mapped to tone bank 0, program 41 - this instrument will not be heard     No pre-resampling cache hit      and **_no sound at all_**. One more link, a different melody for the same text. For some midi files from that site, I hear some sound, but I still get the message _No instrument mapped to tone bank 0_ -- _this instrument will not be heard_ and I suspect that what I hear is not what I should hear. Maybe it needs some soundfont, but it does not tell me which one. **How do I hear the melody?**


title: Why do we need "at" command in linux

text: I was studying a code in which the `at` command is used. I looked around it and found that it is used to execute batch jobs. It is used to schedule jobs. Its given a input of command and time relative/absolute. So, my first question is why `at` command is used. Under which circumstances we need to use `at`? I have encountered it when there was bash script code trying to uninstall software and when some background services were to be restarted. My second question : What is the difference between having any command executed as a batch job and having a command executed in calling command directly (or in subshell) ?


title: Bash regex matching not working in 4.1

text: Upgraded to Bash4 and found that it is not matching regexes:               $ echo $BASH_VERSION     4.1.2(1)-release          $ [[ "20110228" =~ "^[0-9]{8}$" ]] && echo matches      But Bash 3.0 is:               $ echo $BASH_VERSION     3.00.16(1)-release          $ [[ "20110228" =~ "^[0-9]{8}$" ]] && echo matches     matches      Why might this be? Have I not installed it correctly?


title: EXT3 file system pre digest material

text: I am looking for understanding EXT3 filesystem source code. I think I need a little pre-digestion to fully understand the code. Can anyone please suggest some material(blog etc.) where I can get some basic understanding of the source code.


title: How to make Mutter default window manager

text: I'm running Debian Squeeze and removed Metacity in favor of Mutter. How do I avoid having to run `mutter --replace` each time I start Xorg (GNOME)?


title: Debian install less than 1 GB.

text: I need to install Debian with an image less than 1GB, with a desktop environment and reasonable functionality. The Wheezy image is around 1.2 GB and my USB stick is 1GB. I can't understand the `net-install` either, and Debian does not auto-detect my wireless card on install. What else can I try?


title: What is the benefit of installing Intel drivers from 01.org?

text: Up to this point I assumed the graphics stack for Intel was open source and included in the standard repositories. However, I just became aware that Intel hosts their own special repositories of graphics drivers and software for each of the popular distribution on 01.org. Many of the packages, like `xorg-x11-drv-intel` and `cairo`, duplicate what's available in my distribution's repository. Are the Intel-hosted packages any different? What is the benefit of the Intel-hosted ones?


title: How do I get bcvi installed and working (with Cygwin and Perl 5.8.8)?

text: I'm trying to install bcvi (under Cygwin), and there are apparently no directions that apply to this setup. The directions at http://sshmenu.sourceforge.net/articles/bcvi/#installation state that bcvi is a standalone script with no non-core dependencies, but when I copied that script from the github repo it gave me this error:               Can't locate Pod/Text.pm in @INC (@INC contains: /usr/lib/perl5/5.8.8/msys       usr/lib/perl5/5.8.8 /usr/lib/perl5/site_perl/5.8.8/msys /usr/lib/perl5/site_perl/5.8.8       /usr/lib/perl5/site_perl.) at /c/Users/bzisad0/bin/bcvi line 1315.     BEGIN failed--compilation aborted at /c/Users/bzisad0/bin/bcvi line 1315.      I'm not a Perl guy, but I understand that to suggest that there are unmet dependencies, and I'd rather not learn Perl and its ecosystem just to try to untangle this. In case it's relevent, I first copied the script to the Linux server I intend to use it on, where I didn't get any such errors, but it seems to require you to run `bcvi --install` from your local machine, so I had to install it on my Windows machine (using the Git Bash shell, which AFAIK is just running Cygwin under the hood). `perl --version` returns               This is perl, v5.8.8 built for msys      Is it possible to get this working on Windows?


title: password problem when feeding a remote file into diff

text: When I want to compare a local file with a remote file, any of these usually works:               $ ssh remote cat file | diff file -     $ diff file <(ssh remote cat file)      However, sometimes (especially when the password is needed) they fail like this:               $ ssh remote cat file | diff file -     1,162d0     < ...     < ...     Password:       Here, `diff` doesn't wait for `ssh` to complete and considers the second file empty. It is only after `diff` is finished that `ssh` asks for the password, but it is too late.               $ diff file <(ssh remote cat file)     Password:      Password:       # asking again after a few seconds     #&%Pasword:     # the typed raw password leaks into the terminal     user@remote's password:     Permission denied, please try again.     user@remote's password:     Permission denied, please try again.     user@remote's password:     Received disconnect from XXX.XX.XX.XX: 2: Too many authentication failures for user     1,162d0     < ...     < ...      This time, `ssh` asks for the password, but the typed password is echoed back to the terminal, and `ssh` doesn't get it. Finally, `ssh` fails and `diff` continues with an empty second file. Can you explain why these are happening, or what's happening in detail _under the hood_?


title: Home partition not recognised after GRUB reinstall

text: I had to reinstall Windows on my machine, which had a dual boot with Crunchbang. My Crunchbang install has two partitions, root and home. So I have installed Windows, booted with a Ubuntu liveCD, reinstalled grub on the Crunchbang root partition, rebooted... and my home cannot be found! I am booting into my root partition, and cannot see the home partition. What to do?


title: How to check what `wondershaper` has done?

text: I used this command:               sudo wondershaper eth1 20 20      to limit network traffic. The command shows no errors. But I need a command or network monitor or gui which confirms this limitation. For example, it says that this connection is limited to 20 kb download. So that I'm sure system considers it as a rule. In particular, I may check the condition after a disconnection/reconnection, reboot, etc,


title: Prevent lots of writes on Ubuntu Server running from flash drive

text: I would like to have a setting, where Ubuntu Server is installed and booting from a flash drive (SanDisk Cruzer Fit 8GB), with two HDDs running in RAID1 and 4 drives running with RAID0 (only 1 drive at the beginning and adding up more over time). All drives, except for the pen drive should be encrypted and decrypted when booting up the system, thus, unplugging the pen drive would render the whole system useless. There should be a backup of the pen drive somewhere, just in case the pen drive burns down. All HDDs should run LVM2. All the writing of files should be on the HDD and only on very rare occasions on the flash drive, since it is really slow. If I install the Ubuntu server onto the flash drive, how do I know and prevent programs from writing a lot onto the drive? Is there a way to seize all writing at all. Furthermore, how would I encrypt both RAID1 and RAID0 with an encryption, where the pen drive acts as the key/passphrase. Any good reading material/tutorial is very welcome.


title: Make a "java -jar file.jar" run at startup

text: Hello I am running a kubuntu 13.10 distro, but I guess my question is pretty general...how to make a .jar execute in background at system start?


title: Bash script to output path to USB flash memory stick

text: How would I return (output) the path to any USB flash memory stick(s) connected to the local computer using bash (Ubuntu and Linux Mint)? ### Background: I'm providing users with an automated backup script. (The actual backup software is already installed on their computer.) The user's job is to plug in a USB flash memory stick and enter one command at the terminal (without any parameters, options or any other variable information). I need a bash script that can find the path to the USB flash memory stick. If more than one such path is found, I will probably just abort and pop up a message to contact me. Rather than make a complicated script, it is easier for me to just tell them to make sure only one memory stick is plugged into the computer at the time they wish to perform a backup.


title: Xterm not loading color schemes

text: I work a lot with vim and decided to switch to cli version, I chose `xterm` because its the only terminal I know of that properly recognizes `Alt` shortcuts (and I have lots of those bound in vim). My problem is that `xterm` doesn't load config file on startup. I have it in `.Xresources` file in my home directory (I also tried moving the contents of it to `.Xdefaults` but to no avail). When I type `xrdb .Xresources` it loads all the settings normally, also typing `xrdb -query -all` shows up proper terminal settings. I tried including that line in `.xinitrc` file and Openbox autorun (I work in Crunchbang distro where it is main window manager) but it doesn't work either. Can anyone point me in the right direction on how to fix that? My `.Xresources` file looks like this:               !XTerm*termName: xterm-256color     !UXTerm*termName: xterm-256color          ! Colors          *background: #181818     *foreground: #c0c0c0     *cursorColor: #93a1a1          !! black dark/light     *color0: #121212     *color8: #2e3436          !! red dark/light     *color1: #a35b66     *color9: #ab6b74          !! green dark/light     *color2: #99ab6f     *color10: #acb972          !! yellow dark/light     *color3: #ca9733     *color11: #ccaa69          !! blue dark/light     *color4: #495d6e     *color12: #687987          !! magenta dark/light     *color5: #825969     *color13: #977381          !! cyan dark/light     *color6: #839191     *color14: #98a4a4          !! white dark/light     *color7: #e0e0e0     color15: #e5e5e5          !-------------------------------------------------------------------------------     *multiClickTime: 500     ! Use a nice truetype font and size by default...           ! Every shell is a login shell by default (for inclusion of all necessary environment variables)     xterm*loginshell: true          ! I like a LOT of scrollback...     xterm*savelines: 16384     UXTerm*faceSize: 8     UXTerm*cursorBlink: true     ! double-click to select whole URLs :D     xterm*charClass: 33:48,36-47:48,58-59:48,61:48,63-64:48,95:48,126:48          ! right hand side scrollbar...     xterm*rightScrollBar: false     xterm*ScrollBar: false          ! stop output to terminal from jumping down to bottom of scroll again     xterm*scrollTtyOutput: false


title: Can VirtualBox run under Xen Dom0?

text: I'd like to turn my Linux Mint desktop into Xen host. Will I be able to use VirtualBox inside Dom0, just like without Xen? What the limitations would be (if any)? I believe, that this might not be possible, since both VirtualBox and Xen utilizes CPU rings, and they might fall into conflict. _Note, that I need to run VirtualBox under Dom0, not DomU._


title: Improve sed command to replace first instance of character and all following characters?

text: Input:               <e1 name="file1" id="id1" anotherId="id2">      Desired output:               file1      I can get what I need with this:               echo '<e1 name="file1" id="id1" anotherId="id2">' | sed 's/\(.*name="\)\(.*\)\(".*\)/\2/' | sed 's/".*//'      Output: `file1` I would like to improve the set of commands and remove the last pipe to sed if possible. If I remove the last pipe to sed, I cannot get what I want:               echo '<e1 name="file1" id="id1" anotherId="id2">' | sed 's/\(.*name="\)\(.*\)\(".*\)/\2/'      Output:               file1" id="id1" anotherId="id2      As you can see sed is picking up the last quotation mark and not the first after file1. Can someone help improve this command?


title: How to align fstab entries easily

text: Editing /etc/fstab with my text editor makes all the spacing go out of alignment. I could go through the file and insert/delete spaces to line everything up, but I'm looking for a more automated solution. Ideally, there would be an online javascript page that I could put my fstab into, and have it "pretty" align everything. Then I could copy/paste the final result back into the file. Is there a similar or better solution to this available? EDIT:   I use Linux on my desktop, and I'm not seeking to join the religion of vi or emacs just to edit my fstab. Emacs might be a better solution for some people, but for some other people it's not a better solution. EDIT2:   Here is an example snippet of my fstab using tabs. The columns are not in alignment.               proc    /proc   proc    nodev,noexec,nosuid 0   0     /dev/disk/by-label/Linux    /   ext4    errors=remount-ro   0   1     /dev/disk/by-label/Home /home   ext4    defaults    0   0      I want it to be automatically formatted with spaces and look more like the following.               proc                        /proc   proc    nodev,noexec,nosuid 0   0     /dev/disk/by-label/Linux    /       ext4    errors=remount-ro   0   1     /dev/disk/by-label/Home     /home   ext4    defaults            0   0


title: Only output printable chars OpenWrt

text: perl is not a very good idea, because it's an OpenWrt router, so not enough space for it.   "cat -v" doesn't works, because it doesn't supports the "-v" option      Any ideas? :\      Here's a bad text:   http://pastebin.com/raw.php?i=zjMGHNq5      Between the "review" and the "kde" word, theres a non-printable char. For example i need to remove these kind of chars for texts :\   Thank you!


title: Oracle: ORA-01089: immediate shutdown in progress - no operations are permitted

text: I have Oracle XE 10.0.2 installed on my development system. Recently I have been unable to restart it:               $ sudo /etc/init.d/oracle-xe stop     Shutting down Oracle Database 10g Express Edition Instance.     Stopping Oracle Net Listener.          $ sudo /etc/init.d/oracle-xe start     Starting Oracle Net Listener.     Starting Oracle Database 10g Express Edition Instance.          $ sqlplus           SQL*Plus: Release 10.2.0.1.0 - Production on Tue Feb 4 19:54:53 2014          Copyright (c) 1982, 2005, Oracle.  All rights reserved.          Enter user-name: hr     Enter password:      ERROR:     ORA-01089: immediate shutdown in progress - no operations are permitted      So I tried killing off all oracle processes by hand:               $ sudo killall oracle tnslsnr      This kills the processes (they are no longer listed in `ps`). I then try starting Oracle again:               $ sudo /etc/init.d/oracle-xe start     Starting Oracle Net Listener.     Starting Oracle Database 10g Express Edition Instance.      SQL*Plus gives the same error. /usr/lib/oracle/xe/app/oracle/admin/XE/bdump/alert_XE.log says:               Starting Oracle Database 10g Express Edition Instance.     Tue Feb  4 19:59:30 2014     Starting ORACLE instance (normal)      I have not reconfigured Oracle recently, but I have shut it down hard (power off), so it may be in a inconsistent state that I need to force it to recover from.


title: how to type “smart quotes” (U+201C, U+201D)

text: It's like this: `“` (U+201C) `”` (U+201D).


title: bash: adduser: command not found on centOS

text: I installed centos 5.5 on my vmware 8 recently and i am trying to add a new user on the system. I am unable to add the user unless i use su - option. I believe it has to do something with path not set properly. I updated the path and here is what it looks like `/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/uone/bin:/sbin ` I believe the command is in /sbin dir which is already a part of path. can any one suggest me what else i might be missing?


title: Different package versions in same suite?

text: I recently got this this surprising result:               evolution-data-server-common:       Installed: 2.30.3-2       Candidate: 2.30.3-2       Version table:          3.0.0-1 0             -10 http://debian.mirror.ac.za/debian/ experimental/main i386 Packages          2.91.92-1 0             -10 http://debian.mirror.ac.za/debian/ experimental/main i386 Packages          2.32.2-4 0             -10 http://debian.mirror.ac.za/debian/ wheezy/main i386 Packages             -10 http://debian.mirror.ac.za/debian/ unstable/main i386 Packages      *** 2.30.3-2 0             900 file:/home/wena/.repo_bin/ stable/main i386 Packages             900 http://debian.mirror.ac.za/debian/ squeeze/main i386 Packages             100 /var/lib/dpkg/status      That implies that I have the different versions of `evolution-data-server- common` in Experimental, which I thought wasn't 'possible'. What's happening? Is this a bug maybe?


title: Looking for a way to improve synaptic/touchpad palm detection

text: I find that my touchpad's palm detection is pretty awful. I have set it to the minimum sensitivity not ruining my touchpad use (PalmMinWidth=5, PalmMinZ=1), and I still get random bumps whenever I type on my keyboard. I'd rather use palm detection than disable keyboard while typing because I find that the keyboard is disabled for too long a period (i.e., I'm done typing and I have to wait 2 seconds before using the keyboard again, which is annoying). A possible strategy would be to reduce this delay, although I'm not sure if the touchpad would stay usable (if you know how to do this, post it, better than nothing :). Whenever I use windows, I find I'm not having so much trouble with the touchpad, so there must be a way to improve palm detection? Lastly, I'm running Debian testing 64 bits on linux kernel 3.2.0-rc7.


title: lighttpd fastcgi with python and php on the same virtual host

text: I have a python application running on the server, which should process any urls except `/wiki`. The `/wiki` url should show a php application. My virtual host looks like this:               $HTTP["host"] == "domain.tld" {             fastcgi.server = (                     "/django.fcgi" => (                             "main" => (                                     "socket" => "/tmp/django.sock",                                     "check-local" => "disable",                             )                     ),                     ".php" =>                     ((                             "bin-path" => "/usr/bin/php-cgi",                             "socket" => "/tmp/php.socket",                             "max-procs" => 1,                             "bin-environment" => (                                     "PHP_FCGI_CHILDREN" => "4",                                     "PHP_FCGI_MAX_REQUESTS" => "10000"                             ),                             "bin-copy-environment" => (                                     "PATH", "SHELL", "USER"                             ),                             "broken-scriptfilename" => "enable"                     ))             )                  url.rewrite-once = (                     "^(/wiki.*)$" => "/.../doku.php$1",                     "^(/.*)$" => "/django.fcgi$1",             )     }      However, I am getting a 404 error for the php app, while the python app (django) is working. All paths are correct and the sockets exist. What is configured wrong here?


title: How to compile a decent kernel from kernel.org?

text: I tried compiling a kernel from sources that I got from kernel.org (mainline) with `make allyesconfig` and `make allmodconfig`, but both builds resulted in a kernel, that won't boot. I was thinking, that by compiling everything, It should work on close to any hardware. What am I doing wrong? And how do I compile a working kernel?


title: Shortcut for fast recursive removal

text: Sometimes I want to delete large swaths of temporary files recursively, and recycle the directory name without waiting for the command to complete. (For example, if I want to nuke and re-checkout a version control working copy.) While this doesn't happen all that often, when it does I usually use a command like:               mv "$oldname" dienow && rm -rf dienow &      I could create a function or alias for this, of course, but without doing that is there a shorter way to express the above?


title: Easiest way to install GStreamer on Debian?

text: I'm trying to get GStreamer 1.2 installed on my version of Debian (armel) that came with the board. It doesn't come with GStreamer. I installed the Debian image on my SOC following these instructions http://compulab.co.il/workspace/mediawiki/index.php5/CM- FX6:_Linux:_Getting_started I'm really not too sure how to install GStreamer, and my workplace doesn't allow internet access. Has anyone done this before and can advise? Running short on time... Thank you very much.


title: How can I pipe data over network or serial to the display of another linux machine?

text: I have a second monitor that I'd like to use for a text-based debugging log and/or console. I don't want to have it as part of my GUI / "desktop" / main system. I have this display connected to an old linux box that doesn't have much processing power. When it boots up it sits ready at the `login:` prompt. It is connected to the LAN so I can SSH to it. I know I can write to the screen by running something like `ssh root@ancient echo test \> /dev/tty0` I enjoy using named pipes for debugging, basically creating one named pipe with `mkfifo` and then using `tail -f` on it while writing data to it from other commands / scripts / etc. ### Based on this explanation of what I'm attempting to do, what is a "good" / "right" way to do what I'm trying to do ("dump data" to a named pipe over the network so that the output would appear on this terminal's screen? ) I know I've got access to `ssh`, `tail`, netcat (`nc`), and redirection via things like `/dev/tty0` - but I can't quite figure out how to put it all together eloquently. I did see this: Can I pipe/redirect a console application through netcat so it can be used remotely? It seems hackish to use something like `ssh root@ancient echo test \> /dev/tty0` and create a new connection for every log item that gets sent. A bonus would be if the data was not sent over the network as plain-text, but I suppose that criterion is not mandatory if it makes things very slow or creates too much overhead or complication. ### Also, would there be any advantage in using a serial connection between the two machines instead? I have done this in the past but it seemed to me that even at the maximum baud rate of `115,200` that when a few hundred lines of code were sent it seemed 'laggy' compared to sending the data over the network. I know `115k` is old "modem technology" so I just wanted to know if this slower-than-expected experience for this type of direct ( albeit serial) connection is normal.


title: sudo no password breaks other sudo -u uses

text: I have a virtual machine running ubuntu server (latest LTS forget the actual version number). I have setup sudo not to ask for a password but when I did that I could no longer run psql as postgres user using sudo -u unless i was root.               sudo -u postgres psql      I now get a password prompt and then this message after i enter my password ...               Sorry, user _____ is not allowed to execute '/usr/bin/psql' as postgres on ...      sudoers file               root ALL=(ALL) ALL     %admin ALL=NOPASSWD: ALL


title: Is it possible to reinstall Debian afresh and retain all the cutomisation and data from existing installation?

text: I have done something stupid and messed up my Debian Squeeze installation. Now, the problem is I have enough data and sowftware installations which I dont want to repeat, is it possible to reinstall the OS and still somehow save and maintain data on my box?   I have still not tinkered with the installation, I am just frustrated with issues and lack of time. I guess this weekend I will spam SO with all my troubles and hope I will not be treated as a spammer :D


title: Multiple terminals at once without an X server

text: There is a way to visualize multiple terminals at the same time without running a Xorg session ? I have a really low profile machine that could be great for some basic stuff but has an horrible support for the GPU in terms of drivers and computing power.


title: MySQL gets killed by OS every 25 days or so

text: About 4 months ago we migrated from **MS SQL Server** to **MySQL 5.5**. Since then we have been experiencing an issue once approximately ever 25 days since where CentOS runs out of memory and as a result it kills MySQL. MySQL safe restarts mysql so the database is only completely down for a minute or two, but we can suffer performance and connectivity losses for hours before CentOS kills the mysqld thread. **We usually see issues from 1 AM to 5 AM** , but never during the day when traffic is highest which is what's really baffling about this situation. Despite normally seeing connectivity and performance issues from 1am to 5am, mysql server typically gets killed around 4 AM or 5 AM, around the same time mysqldump runs. We thought `mysqldump` may have been the culprit. However it starts at 4 AM daily, but we see problems as early as 1 AM on some nights. Also `mysqldump` is running with the `\--opt` switch, so it shouldn't be buffering a lot of data during the dump process. We also considered the backup app that we're using that gets the dump files and backs them up to tape. We changed the time that it runs to 6 AM and the problem was unchanged. We have several jobs that run periodically throughout the night, but none are very resource intensive and don't take very long to run at all. Here's some stats for what we're working with and the current entries in the `my.cnf` file. Any help or suggestions for things that we can try would be very much appreciated. **SERVER STATS** :   * Intel(R) Xeon(R) CPU E5530 @ 2.40GHz   * cpu cores: 4   * Memory: 12293480 (12 gigs) **OS** :   * CentOS 5.5   * Linux 2.6.18-274.12.1.el5 #1 SMP Tue Nov 29 13:37:46 EST 2011 x86_64 x86_64 x86_64 GNU/Linux MY.CNF:               [client]     port = 3306     socket = /var/lib/mysql/mysql.sock          [mysqld]     port = 3306     socket = /var/lib/mysql/mysql.sock          skip-name-resolve          ssl-ca=<file location>     ssl-cert=<file location>     ssl-key=<file location>          back_log = 50     max_connections = 500     table_open_cache = 2048     table_definition_cache = 9000     max_allowed_packet = 16M     binlog_cache_size = 1M     max_heap_table_size = 64M     read_buffer_size = 2M     read_rnd_buffer_size = 16M     sort_buffer_size = 8M     join_buffer_size = 8M     thread_cache_size = 130     thread_concurrency = 16     query_cache_size = 64M     query_cache_limit = 1M     ft_min_word_len = 4     default-storage-engine=INNODB     thread_stack = 192K     transaction_isolation = REPEATABLE-READ     tmp_table_size = 64M     log-bin=/log/mysql/mysql-bin     expire_logs_days=7     binlog_format=mixed     key_buffer_size = 32M     bulk_insert_buffer_size = 64M     myisam_sort_buffer_size = 128M     myisam_max_sort_file_size = 10G     myisam_repair_threads = 1     myisam_recover     innodb_additional_mem_pool_size = 16M     innodb_buffer_pool_size = 7G     innodb_thread_concurrency = 16     innodb_flush_log_at_trx_commit = 2     innodb_log_file_size = 256M     innodb_log_files_in_group = 3     innodb_max_dirty_pages_pct = 70     innodb_lock_wait_timeout = 120          [mysql]     no-auto-rehash          [mysqld_safe]     open-files-limit = 8192


title: Changing the defaut file manager in Gnome 2(SL6)

text: As many CentOS, RHEL and Scientific Linux users may know Nautilus was having some bugs. I recently installed thunar to replace it for a time but now that I have installed Nautilus again I'm having a problem. When I go to the places menu and press something there it opens a window saying `Failed to execute default File Manager` and under that: `Failed to execute child proces "/usr/bin/Thunar" no such file or directory.` Note that I have removed thunar and nautilus is installed and works when I use the "domputer" icon on my desktop My question is how to I change the application that opens the items in the "Places" menu? I'm on Scientific Linux 6.5 with gnome 2.28.2


title: Is there a good benchmark for virtual memory performance?

text: Aside from running memory benchmarks, has anyone used a benchmark that stresses the virtual memory subsystem? I'm curious to see how performance differs in virtual machines with and without EPT enabled. I've found this benchmark: http://www.cs.princeton.edu/~appel/papers/vmpup.c and I was wondering if there were others. **CLARIFICATION:** I realized it may be misleading, I'm looking to benchmark "virtual memory" in the memory management sense of the term (e.g. MMU performance), not in the paging to disk "swap" sense of the term.


title: Replace all newlines to space except the last

text: How can I replace all newlines with space except the last newline. I can replace all newline to space using `tr` but how I can do it with some exceptions?


title: Module dependencies

text: In a system, I need to use `module load gcc/4.4.7` to get access to `gcc` to compile `foobar.c` into `foobar`. When I run `foobar`, does `gcc/4.4.7` need to be loaded, say to ensure certain libraries are available?


title: Is there a simple way to get array of all arguments that do not begin with a hyphen?

text: `zsh` includes a powerful utility for parsing command-line options `zparseopts`, but for quick shell scripts and shell functions, but is there an easy way to extract the _array_ of all command-line arguments that do not begin with a hyphen?


title: Compiling Linux kernel for a router

text: I want to make an installable linux kernel that has routing enabled already. So anyone can install it on their machine, do some configuration as required, and machine will work fine for their routing needs. This is what I did so far.   1. Downloading and decompressing a vanilla linux kernel.   2. placing a ".config" file in that kernel directory.   3. Ready to make kernel.... I want to ask what options do I need to enable or disable in .config to make this a bootable software router (I don't need any other functionality)? Note: I don't want to use any already built router, I want to create my own so I can manipulate and test it further.


title: Can a program next in a pipeline see the exit code of the previous program?

text: I would like to make a pipeline of Bash scripts like this `prog1 | prog2` such that prog2 can see the exit code of prog1 and act differently based on that information. Is this possible?