title: Very poor read performance compared to write performance on md(raid1) / crypt(luks) / lvm

text: I'm experiencing very poor **read** performance over raid1/crypt/lvm. In the same time, write speeds are about 2x+ faster on the same setup. On another raid1 setup on the same machine I get normal read speeds (maybe because I'm not using cryptsetup). OS related disks: sda + sdb. I have raid1 configuration with two disks, both are in place. I'm using LVM over the RAID. No encryption. Both disks are WD Green, 5400 rpm. IO test results on this raid1:               dd if=/dev/zero of=/tmp/output.img3 bs=8k count=256k conv=fsync      - 2147483648 bytes (2.1 GB) copied, 22.3392 s, 96.1 MB/s          sync     echo 3 > /proc/sys/vm/drop_caches     dd if=/tmp/output.img3 of=/dev/null bs=8k      - 2147483648 bytes (2.1 GB) copied, 15.9 s, 135 MB/s      And here is the problematic setup (on the same machine). Currently I have only one sdc (WD Green, 5400rpm) configured in software raid1 + crypt (luks, serpent-xts-plain) + lvm. Tomorrow I will attach another disk (sdd) to complete this two-disk raid1 setup. IO tests results on this raid1:               dd if=/dev/zero of=output.img3 bs=8k count=256k conv=fsync     2147483648 bytes (2.1 GB) copied, 17.7235 s, 121 MB/s          sync     echo 3 > /proc/sys/vm/drop_caches     dd if=output.img3 of=/dev/null bs=8k     2147483648 bytes (2.1 GB) copied, 36.2454 s, 59.2 MB/s      We can see that the read performance is very very bad (59MB/s compared to 135MB/s when using no encryption). Nothing is using the disks during benchmark. I can confirm this because I checked with iostat and dstat. Details on the hardware:   * disks: all are WD green, 5400rpm, 64mb cache.   * cpu: FX-8350 at stock speed   * ram: 4x4GB at 1066Mhz. Details on the software:   * OS: Debian Wheezy 7, amd64   * mdadm: v3.2.5 - 18th May 2012   * LVM version: 2.02.95(2) (2012-03-06)   * LVM Library version: 1.02.74 (2012-03-06)   * LVM Driver version: 4.22.0   * cryptsetup: 1.4.3 Here is how I configured the slow raid1+crypt+lvm setup: parted /dev/sdc   1. mklabel gpt   2. type: ext4   3. start: 2048s   4. end: -1 Now the raid, crypt and the lvm configuration:   1. mdadm --create /dev/md1 --level=1 --raid-disks=2 missing /dev/sdc   2. cryptsetup --cipher serpent-xts-plain luksFormat /dev/md1   3. cryptsetup luksOpen /dev/md1 md1_crypt   4. vgcreate vg_sql /dev/mapper/md1_crypt   5. lvcreate -l 100%VG vg_sql -n lv_sql   6. mkfs.ext4 /dev/mapper/vg_sql-lv-sql   7. mount /dev/mapper/vg_sql-lv_sql /sql So guys, can you help me identify the reason and fix it? It has to be something with the cryptsetup as there is no such read slowdown on the other setup (sda+sdb) where no encryption is present. But I have no idea what to do. Thanks!


title: different passwords depending on plugged-in devices

text: I would like to have different passwords for my account(s): When (e.g.) a certain USB stick is plugged in then an easy password is to be used. The idea is: If I leave my computer then I take the stick with me and the easy passwords shall be disabled then. My general idea is:   1. Detect the stick with udev, maybe detect certain data on it (with a script run by udev) and react accordingly (e.g. create a file which is deleted when the stick is plugged out). This should be easy.   2. Have PAM check for the existence of this file and select the password database accordingly. The main question is probably (i.e. if I understand the structure of the problem correctly): Can `pam_unix2` be configured to use another shadow file? I just had a look at the man page for `pam_unix2` and it seems that this is not possible because this module lets glibc NSS make this decision.


title: Screen fading out on GNOME, without ability to cancel

text: Sometimes, on my Arch Linux laptop, using GNOME for the desktop, my screen will fade out after a while of non-activity (even if I'm watching a video). This fade out is very slow, and can't be cancelled by mouse movements, keyboard presses etc. What is responsible for this, and how do I disable it?


title: doubt regarding use of split in awk

text: arr=($(echo "great#man" | awk  '{split($0,a,"#"); } END {print a[0]; print a[1];}'))          echo " ${arr[0]} "         echo " ${arr[1]}"      My expected output is:               great     man      But I am getting               great      arr[1] is not getting printed


title: How to fully lock the GNOME-panel?

text: I know I can lock elements on GNOME-panel that prevent users to move the element on the GNOME-panel, but how can I fully lock the GNOME-panel? I mean I need a locking mechanism, that will prevent accidentally removing of elements, like ex.: the user deletes the clock from the GNOME-panel. Are there any solutions to lock it? version 2.30.2-0ubuntu0.2


title: Building an offline installer Debian CD

text: I have to build an install CD to help others people to setup a Debian server with Apache/Mysql/PHP and our application. But the CD must install the full system offline (because servers will be installed in Africa, without any internet access). It is for an Non Gouvernemental Organisation. Using simple-cdd, I already have a CD which install all, but it stile need internet access for several packages. How can I correct this? The installer get packages files from the debian mirror, and packages files too.


title: Auto detect new files and upload them

text: I'm starting work on a new project and I need to know the feasibility of the end-result. I need a lot of things to happen automatically.   1. Detect if a new file has been added to a folder   2. Login to a website (like Strava or TrainingPeaks)   3. Upload the file to my account on the website Any advice on this front is appreciated. I really just need to know if this is possible and what I would need to make it happen.


title: Installing Packages Offline On Linux Mint

text: Is it possible to create a linux software package on windows ,store it on a USB stick and then install it on a linux system which is not connected to the internet ? For example I would like to install the latest version of GCC on my linux mint system which is not connected to the internet after going through the prerequisites (http://gcc.gnu.org/install/prerequisites.html) I understand that a much better option as i'm using Linux mint 15 (Olivia) which is ubuntu/debian based is to download and install dpkg dev package and GNU make,but i'm afraid that the dependency error might pop up again. I tried doing that yesterday after unzipping the file but i get dependency related errors. Instead of separately installing the dependencies one after the other without knowing the dependencies is it possible to create a package called GCC with all dependencies "linked",store it on a USB stick,take it home,plug it in and then build it? As i mentioned earlier i'm using Windows 7 in the office. (see Updating Linux Mint Without Internet Access)


title: Min max buttons not displayed

text: What can be the cause for min max buttons not getting displayed for some windows in a jave ui application. I have runned command               gsettings set org.gnome.desktop.wm.preferences button-layout :minimize,maximize,close      but no result.               gsettings get org.gnome.desktop.wm.preferences button-layout      returns               ':minimize,maximize,close'      It means that the preferences were already activated or i have to do a reload or something similar? What check should i execute in order to see that everything is well setup related with OS settings. I'm running on gnome 2.16.


title: NVM cannot find installed Node binary, PATH problem on Linux Mint 17?

text: I've successfully installed NVM and Node using official instructions. My `.bashrc` file contains               [ -s "/home/user/.nvm/nvm.sh" ] && . "/home/user/.nvm/nvm.sh"      After some time, maybe a day, I noticed that Node is not present anymore . So I tried:               $ nvm use 0.10     N/A version is not installed yet      That's weird, I know that I installed it with `nvm install 0.10` , used it to run a script, and found it here:               $ ls .nvm/v0.10.29/     bin  ChangeLog  include  lib  LICENSE  README.md  share      So, everything looks right, but NVM simply doesn't work:               $ nvm install 0.10     mkdir: cannot create directory ‘/etc/mdm/bin’: Permission denied     Binary download failed, trying source.     Additional options while compiling:      mkdir: cannot create directory ‘/etc/mdm/src’: Permission denied     nvm: install v0.10.29 failed!          $ nvm deactivate     Could not find /etc/mdm/*/bin in $PATH     Could not find /etc/mdm/*/share/man in $MANPATH     Could not find /etc/mdm/*/lib/node_modules in $NODE_PATH      Output shows that nvm is trying to use /etc/mdm/* dir, and this doesn't make any sense. MDM is display manager in Linux Mint. Any ideas ? UPDATE: just checked now, seems that $NVM_DIR is set to /etc/mdm. That's probably why everything fails, but don't know when this get set, or why. UPDATE 2(FIX):               export NVM_DIR=/home/user/.nvm      will fix this problem.


title: How to debug a semop failure?

text: Using a `2.6.30-gentoo-r4` Linux a very complex system of `php` code is executed (with 4.4.9-pl0-gentoo and 5.2.10-pl0-gentoo), which occasionally runs into a semaphore blocking problem. The call to the `php` function `sem_acquire` is blocked, bringing the system ultimately to a crash. However, this semaphore in question does not seem to be blocked by another `php` process, which led me to investigate further. I was able to identify the `php` process in question and to `strace` it, leading to the blocking semaphore:               ....     09:03:25 gettimeofday({1415696605, 778078}, NULL) = 0     09:03:25 close(5)                       = 0     09:03:25 gettimeofday({1415696605, 778483}, NULL) = 0     09:03:25 gettimeofday({1415696605, 778708}, NULL) = 0     09:03:25 semop(0, 0xbf8f1692, 1 <unfinished ...>      This particular output `semop(0, 0xbf8f1692, 1)` is not of much help to me, since I cannot see the content of `struct sembuf` (second argument to `semop`). Maybe someone else sees a problem directly with this `semop` call? Anyway, I continued the investigation to check the memory at address `0xbf8f1692` (as root):               > gdb --pid 1236        GNU gdb 6.8     Copyright (C) 2008 Free Software Foundation, Inc.     License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>     This is free software: you are free to change and redistribute it.     There is NO WARRANTY, to the extent permitted by law.  Type "show copying"     and "show warranty" for details.     This GDB was configured as "i586-pc-linux-gnu".     Attaching to process 1236     ptrace: Operation not permitted.     (gdb) dump memory /root/output 0xbf8f1692 0xbf9f1692      (gdb) quit     > hexdump -C output      00000000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|     *     00100000      Does this mean the `semop` is called with a `struct sembuf` pointing to a bunch zeros? Or did I do something wrong to find out the memory to see what the arguments to `semop` are? Are there different ways to see what is going on in that `semop` call? **Additional information:**   * The Linux system neither knows the command `prctl` nor `ptrace`.   * A directory named `/proc/sys/kernel/yama` does not exist (see suggested information).


title: Can't configure NGINX to cache images

text: I have been trying to cache images that are stored in nginx server, I am quite new here and to nginx I have installed it and configure it with php5-fpm, I have been reading many tutorial regarding caching images and php files. I have succeeded in caching the PHP files but I can't cache the images here is part of the nginx config file:               fastcgi_cache_path /etc/nginx/cache levels=1:2 keys_zone=MYAPP:100m inactive=60m;     fastcgi_cache_key "$scheme$request_method$host$request_uri";     fastcgi_cache_use_stale error timeout invalid_header http_500;     add_header X-Cache $upstream_cache_status;          server {             listen 80 default_server;         listen [::]:80 default_server ipv6only=on;          root /usr/share/nginx/html;     index index.html index.htm;          # Make site accessible from http://localhost/     server_name localhost;          set $skip_cache 0;          # POST requests and urls with a query string should always go to PHP     if ($request_method = POST) {         set $skip_cache 1;     }        if ($query_string != "") {         set $skip_cache 1;     }             location / {         try_files $uri $uri/ /index.php?$args;     }            location ~ \.php$ {         fastcgi_split_path_info ^(.+\.php)(/.+)$;              fastcgi_pass unix:/var/run/php5-fpm.sock;         fastcgi_index index.php;         include fastcgi_params;         fastcgi_cache MYAPP;         fastcgi_cache_valid 200 60m;          }          location ~* ^.+\.(jpg|jpeg|gif|png)$ {         access_log off; log_not_found off; expires 1d;     }          location ~ /\. { deny  all; access_log off; log_not_found off; }     }      now when I run `curl -I http://xxx.xxx.xxx.xxx/script.php` I can see the md5 of the script created in `/etc/nginx/cache` folder and I can see the `X-Cache : HIT` However, when I run `curl -I http://xxx.xxx.xxx.xxx/image.jpg` no file created in the `/etc/nginx/cache` and I have the following result in the console:               HTTP/1.1 200 OK     Server: nginx/1.4.6 (Ubuntu)     Date: Tue, 17 Jun 2014 08:14:37 GMT     Content-Type: image/jpeg     Content-Length: 55936     Last-Modified: Tue, 17 Jun 2014 04:30:11 GMT     Connection: keep-alive     ETag: "539fc453-da80"     Expires: Wed, 18 Jun 2014 08:14:37 GMT     Cache-Control: max-age=86400     Accept-Ranges: bytes      now it looks fine however when I run it again the expiry date will keep changing as if it is calling new image not the cache               HTTP/1.1 200 OK     Server: nginx/1.4.6 (Ubuntu)     Date: Tue, 17 Jun 2014 08:16:34 GMT     Content-Type: image/jpeg     Content-Length: 55936     Last-Modified: Tue, 17 Jun 2014 04:30:11 GMT     Connection: keep-alive     ETag: "539fc453-da80"     Expires: Wed, 18 Jun 2014 08:16:34 GMT     Cache-Control: max-age=86400     Accept-Ranges: bytes      my questions are: 1- should the cached images be shown in the cache folder? 2- does `fastcgi` capable of caching the images? 3- what can I do to fix the image caching problem? Sorry for the beginner questions, but I can't find the answer.


title: Battery issues on a Lenovo Ideapad Z460 running Ubuntu 13.10

text: I've been using Ubuntu 13.10 on my Lenovo for more than 5 months without a problem. Yesterday I disconnected the AC adapter to take the laptop with me to the couch and it simply shut down. So I reconnected it to at least be able to check what was going on and, to my surprise, the OS seems to be recognizing the battery as it always did. This is the result of dumping `upower`:               Device: /org/freedesktop/UPower/devices/line_power_ACAD       native-path:          ACAD       power supply:         yes       updated:              Sun 26 Jan 2014 08:48:06 PM EST (757 seconds ago)       has history:          no       has statistics:       no       line-power         online:             yes          Device: /org/freedesktop/UPower/devices/battery_BAT1       native-path:          BAT1       vendor:               COMPAL       model:                PABAS024       serial:               3658Q       power supply:         yes       updated:              Sun 26 Jan 2014 09:00:40 PM EST (3 seconds ago)       has history:          yes       has statistics:       yes     **battery         present:             yes         rechargeable:        yes         state:               charging         energy:              23.99 Wh         energy-empty:        0 Wh         energy-full:         31.16 Wh         energy-full-design:  48.84 Wh         energy-rate:         0 W         voltage:             11.848 V         percentage:          76%         capacity:            63.8002%         technology:          lithium-ion**     Daemon:       daemon-version:  0.9.22       can-suspend:     yes       can-hibernate:   no       on-battery:      no       on-low-battery:  no       lid-is-closed:   no       lid-is-present:  yes       is-docked:       no      Yet, I still can't use the battery... It's as if the OS knew the battery was there but couldn't switch to it whenever the AC adapter is disconnected. The battery icon, by the way, is always full. Specs:   Lenovo Ideapad Z460   Intel Core i5 CPU M 480 @ 2.67GHz × 4   Ubuntu 13.10 (64-bit)


title: How do I install SELinux's sandbox utility on Linux Mint Debian Edition?

text: I'm following the Debian SELinux setup guide with my Linux Mint Debian Edition system. I installed the necessary packages:               sudo aptitude install selinux-basics selinux-policy-default selinux-utils policycoreutils      Activated SELinux and rebooted twice:               sudo selinux-activate      Checked the installation. No critical errors were reported:               sudo check-selinux-installation      When I run a simple sandbox command, e.g.               sandbox -X -H ~/selinux/home -T ~/selinux/tmp -t sandbox_web_t firefox      it tells me that the sandbox command wasn't found. I've seen other questions that seem to indicate with Debian, there are issues with the sandbox command, but its nonexistence isn't one of them. Running `semodule -l` or `locate *.pp | grep sandbox` doesn't list the sandbox module either, so is it simply not installed? Is there another way I can check? The version of `selinux-basics` I'm using is 0.5


title: How to reactivate remote desktop service "No Machine" using command line?

text: I wanted to connect to a Red Hat host with GUI. I have installed "No Machine" on that server. It worked perfectly. I got back to work a week later and the software is still installed but it no longer seems to work. I think I just need to run it again. The problem is that I don't have GUI access and I can't seem to find the instructions I previously used. The question is: How to run a NoMachine service from command line and check that it is running?


title: Downloading distro source

text: I'm using LDME, a Debian based distro. Is there someway, preferably automatic, where one could download the source to everything that might be executed and everything needed by those executables? I'd also like the downloaded "items" to be stored under one common directory, though a hierarchical structure under that directory would be fine. An extra requirement would be to keep track of what was downloaded ( because that source would only be the source of a snapshot) and update that tree to what is presently installed. **NOTE:** To be clear, I want to be able to download _ALL_ the source for the software that's included with my distro.


title: Select a range of files after sorting them

text: One thing I notice slower for me if I switch from using a GUI file manager to CLI is: In a GUI file manager, I can quickly select a subset of files under a dir by,   * first sorting them according to some order that can consecutively capture the subset of files as many as possible,   * then selecting a consecutive range of files, by holding Shift key and clicking the first and then the last file in the range , and    * then maybe clicking a few files that are not in the consecutive range. In CLI, what are some ways for us to select a subset of files as fast as possible? Thanks!


title: Vim FoldColumn color different on Debian / Ubuntu

text: I sync my .vimrc file between two machines, one running Debian testing and the other Ubuntu. On Debian everything works fine. On Ubuntu, the fold column is gray instead of black, even though black is specified: `213: hi FoldColumn ctermbg=Black ctermfg=Black` If I comment out line 213, the fold column turns black, but then foldmarkers default to white (the whole point is to hide them black on black). If i just do: `213: hi FoldColumn ctermfg=Black` The FoldColumn is gray again. I do not find plugin conflicts with `grep -r "FoldColumn" .vim/`. Any ideas?


title: Chrooted SFTP user write permissions

text: I have a setup with sftp only users:               Match Group sftponly         ChrootDirectory %h         ForceCommand internal-sftp         AllowTcpForwarding no      I get the following message in my secure.log:               fatal: bad ownership or modes for chroot directory      With the match keyword there comes some security stuff with it... the directories need to be owned by root, and the directories need to be chmod 755 (drwxr-xr-x). So it makes it impossible for a user to have write permissions to the folders, if it is only writable to the user root and set to ben non- writable for groups due to ssh's security. Someone know about a good work around?


title: Not able to SSH into VM

text: I want to SSH from my host into my guest VM (CentOS). I can Ping. SSH is running. ![SSH running](http://i.stack.imgur.com/sEdPQ.png) Port 22 is open. ![Port 22 open](http://i.stack.imgur.com/2Cxpv.png) Looks like firewall is off / IPtables are all open. (this is not normal?)![enter image description here](http://i.stack.imgur.com/o8Kmf.png) When I SSH into my VM. ![enter image description here](http://i.stack.imgur.com/6bPSI.png) The password IS correct. When I login on VM directly, it works. So I add this to /Users/robbertsegers/.ssh/known_hosts ![enter image description here](http://i.stack.imgur.com/x7WMi.png) But the problem reproduces.. Is that syntax correct?


title: How to check the operating system of a server remotely?

text: Is there a tool that takes an IP address and outputs the operating system of that machine?


title: learning about general logging/logrotation on linux?

text: Assume, that beside the Apache web server logs I never had any contact with any kind of (professional) logs on any operation system. So Logging, although I understand some basics, is all together a pretty new topic. At the moment the investment to fully learn about this topic seems to be quite huge, yet I don't even know yet, if it is even worth knowing more then the most abstract concepts. Which resources would you suggest should someone in that situation consume (tutorials, man pages, books) to learn about Logging? Which logs should a normal Linux user read on a daily/monthly basis? Is the assumption even correct that they are written for human readability or are they generally evaluated and used by other tools? What should the normal *nix user and software developer know about these logs? What do you need to know about log rotation, if you are not expected to manage professional web servers with huge loads of events?


title: Changing root password does not change sudo password

text: I'm trying to change the password that get's asked when doing sudo. I'm in Ubuntu. Doing 'sudo passwd' or 'sudo passwd root' does give me the two new password questions, and it successfully changes passwords. But then I can still use my old password when doing sudo again for something else. I do have a user with the exact same password, don't know if that makes a difference. I enabled root user, and I can see the new password does work with the root user. So root password is changed but not the password for sudo. How to change sudo password?


title: install zziplib on Amazon Linux

text: We are trying to configure php4 on Amazon Linux 64bit using the command below:               ./configure --enable-bcmath --with-bz2 --enable-calendar --with-curl --enable-dba --with-cdb --with-inifile --with-flatfile --enable-dbx --enable-exif --enable-ftp --with-gd --with-gettext --with-iconv --enable-mbstring --with-mime-magic --with-mysql --enable-shmop --enable-sockets --enable-sysvmsg --enable-wddx --with-xmlrpc --enable-xslt --with-xslt-sablot --with-zip --enable-dbase --enable-filepro --enable-sysvsem --enable-sysvshm --with-apxs2 --with-zlib      We are seeing this error               configure: error: zziplib module requires zzlib >= 0.10.6.      We have the following version installed               Version     : 0.13.62      I hope someone can help.


title: How to type several file names with fewer key strokes

text: If I want to convert a `pdf` to a `png` image with imagemagick I do something like:               convert -trim -density 400 this_is_a_very_long_filename_of_my_pdf_file.pdf this_is_a_very_long_filename_of_my_pdf_file.png      The pdf file often has a very long file name for some reasons and I want that the `png` file has the same name except of the extension. Usually I select `this_is_a_very_long_filename_of_my_pdf_file.pdf` twice via tab and `zsh-menu` and change then `pdf` to `png` manually for the second argument. However is there a faster way to do this?


title: Transferring access privileges from root to regular user

text: I log in to Ubuntu with the username `student`. There are some directories only the `root` user is allowed to access, for example `/var/lib/mysql`, (I know I can use `sudo` to access it but it is not what I want). If I want to get the access privilege on those directories with the `student` account, can I use the following command:               chown student: PATH_TO_ROOT_USER_PRIVILEGED_DIR      and after that, can I access that directory by using my own account? Am I right?   * If I am right, then will `root` user lose the access privilege because I changed it to the `student` user?   * If I am wrong, please tell me the right solution.


title: Can today Linux/X/Mesa/whatever versions use OpenGL with nVidia GeForce 4 Go 420?

text: I don't know exactly all the libraries responsible for graphics rendering and acceleration in a common Linux PC of today but I wonder if I can install an up-to-date Linux (like XUbuntu 11.10 or Arch) on an old laptop with nVidia GeForce 4 Go 420 and have everything working (basic video playing, window composition, glxgears, I don't mean to play heavy 3D games or HD video) just fine or will I have problems (and what could be the ways of solving them)?


title: source .bashrc command doesn't work

text: I installed TinyOS on RedHat for academic purposes. Now I can't log in to the system. I logged in in single user mode. Then I tried to log in. I couldn't login as any user. I couldn't start the X server manually. When it boots up, the system doesn't start the X server. Then I executed these commands               sh# hostname     (none)     sh# source .bashrc      bash-: gives a path relevant to TinyOS and says unable to find it Then session stops.   Actually there is no such file. How can I solve this?


title: Are the keyboard layouts in X.org actually called the X.org layouts or what?

text: Just need to know it, semantically. So most Linux/BSD systems using the X windows manager are using these layouts. For example, the "US International with dead keys" is quite different in X from the Windows implementation. So is the official names for these layouts are the "X keyboard layouts"or something? Edit for clarification: I'm interested in the layouts's name for not machine, but for human consumption. For example, in Windows you have the _English, United Stated Dvorak_ , _English, United States International_ , English, _United Kingdom_ , _German_ , etc. layouts. And they are all called the Windows variants(?) of said layouts, though I'm not sure, perhaps there is an international standard for these layouts which Microsoft or X.org may or may not follow, I don't know, that's why I ask, thank you.


title: How to download an entire directory from a webserver?

text: I want to download the contents of this page for study purposes. How can I download only this directory?


title: On what occasion will inode change?

text: I checked manual of `find` , and there's an option `-ctime` which specify the last modification time of inode. But on what occasion would inode change ? When is that option useful ?


title: Permission Denied when downloading Drupal

text: /var/www$ wget http://ftp.drupal.org/files/projects/drupal-7.0.tar.gz      This results in:                   --2012-02-08 21:20:17--  http://ftp.drupal.org/files/projects/drupal-7.0.tar.gz     Resolving ftp.drupal.org... 64.50.233.100, 64.50.236.52     Connecting to ftp.drupal.org|64.50.233.100|:80... connected.     HTTP request sent, awaiting response... 200 OK     Length: 2728271 (2.6M) [application/x-gzip]     drupal-7.0.tar.gz: Permission denied          Cannot write to `drupal-7.0.tar.gz' (Permission denied).     eyedea@eyedea-ER912AA-ABA-SR1810NX-NA620:/var/www$ ^C     eyedea@eyedea-ER912AA-ABA-SR1810NX-NA620:/var/www$ wget http://ftp.drupal.org/files/projects/drupal-7.0.tar.gz     --2012-02-08 21:46:34--  http://ftp.drupal.org/files/projects/drupal-7.0.tar.gz     Resolving ftp.drupal.org... 64.50.236.52, 64.50.233.100     Connecting to ftp.drupal.org|64.50.236.52|:80... connected.     HTTP request sent, awaiting response... 200 OK     Length: 2728271 (2.6M) [application/x-gzip]     drupal-7.0.tar.gz: Permission denied          Cannot write to `drupal-7.0.tar.gz' (Permission denied).      I checked the permissions of /var/www and i can't change them. What's going on here?


title: What do the kernel options in braces mean?

text: I saw a kernel option today in `menuconfig` that used braces for its checkbox.               {*}   Button      This isn't listed in the legend at the top of the screen.               [*] built-in  [ ] excluded  <M> module  < > module capable      What do the braces signify?


title: find exclude directory

text: I am on Linux (Ubuntu) and I am would like to exclude certain directories (like .hg) when I am doing a               find | less        I tried the following to exclude the .hg directory from listing, but does not seem to work.               find -type d \( ! -iname \.hg \)     find -type d \( ! -name \.hg \)     find -type d \( ! -iname .hg \)      How do I exclude `.directory` in a find command


title: Modify bash arguments if only one argument is set

text: I created a script with the standard `getopt` magic, so you can call the script with               batman-connect -c ffki      How can I add an option to call this script with only one option without dash?               batman-connect ffki      so It will interpret this only option as the second argument for `-c`? According to this answer I tried:               if [ $@ = "ffki" ]; then       set -- "-c $@"     fi      But that gives an error, I think because this line in my script will change it back:               # Execute getopt on the arguments passed to this program, identified by the special character $@     PARSED_OPTIONS=$(getopt -n "$0"  -o hsrvVi:c: --long "help,start,restart,stop,verbose,vv,version,interface:,community:"  -- "$@")      I don't like to re-arrange my whole script, so is there a simple one-liner to just set the first argument to "-c" and the second to "ffki" ?


title: Connect two ttySx devices on the same machine

text: I'm just wondering, whether it is possible to connect `/dev/ttyS0` with a virtual device node (e.g. a created with `mknod /dev/ttyTest`) so that the output from `ttyS0` is sent to `ttyTest`. I would like to start two instances of minicom and to "chat" with each other on the same machine. So whatever I type in minicom #1 can be read in minicom #2.


title: How to give an ordinary user privileged access to a particular syscall in FreeBSD?

text: I want to give an ordinary user the ability to fchown() files arbitrarily (as if they were the superuser) on FreeBSD. Generally speaking, is there a right way to change the privilege-checking of a given syscall? I investigated Capsicum, but for all the articles on the topic, there is a real lack of practical examples out there.


title: How to auto-sync with a plugged-in USB mass storage device?

text: I have (at the moment) three mobile USB mass storage devices (flash drive, phone, e-reader). I'd like to always have the latest versions of all my files with me (such as CV, passport, research papers, source code, etc.) My files change often, so manually copying them every day is not feasible. Ideally, I'd like to plug in my flash drive (for example), have my PC automatically recognize it, mount it, sync it and unmount it. And the following features 'would be nice':   * GUI   * Notification through Xorg/KDE/Gnome when syncing starts / stops.   * And, why not: two way syncing. But that's not a priority. I've found some questions that are related to this one:   * Sync files from a mac to a flash drive - automatically?   * How to run custom scripts upon USB device plug-in?   * How to be notified when a USB device was plugged?   * How to execute a shellscript when I plug-in a USB-device But none of them answer my question completely. I suppose I could hack something together myself using `udev`, `rsync`, etc., given enough time. But I'd hate to reinvent the wheel. And time is something I don't have to spare right now. Ideally I'd like to use an existing solution, but I can't find one. _So, what would be the quickest way to set something like this up?_


title: Disable KDE system sounds

text: How to disable KDE system sounds? I mean all sounds on startup, on dialog box popup, on error and so on, without turning off the actual media sound. I use KDE 4.7.4


title: How do you ensure physical network interfaces always get the same interface name across reboots on an embedded Linux system?

text: For an embedded Linux system, if I have two or more network interfaces, how do I ensure that they always get the same interface names every boot In other words, I want, for example, eth0 to always map to one physical Ethernet port, eth1 to the next, etc. My Linux "distribution" is home-grown, and I use devtmpfs for populating /dev. I use busybox for init (and most everything else), along with custom init scripts for system startup and shutdown. I do not need hotplug facilities of mdev or udev -- I'm referring to "fixed" Ethernet ports.


title: chmod wont work - no error message

text: Everytime I try to change the permissions of a file with chmod on my Ubuntu with a command like `chmod 744 /media/DATEN/Dokumente/Coding/Python/DirFileFuncts.py` it doesnt work. I tried octal and =rwx spelling but the output of `ls -l` wont change and i still get errors like: no Permission if I try to execute a file. The curios thing is, that i dont get any error message of chmod itself. Can someone help me ? Thanks


title: tmux: Remapping keys to pane on the left/right/top/down

text: Tmux allows one to move through panes using `Ctrl-b` + `(→, ←, ↑, ↓)`. I would like to remap this to: `Ctrl-b` + `Ctrl-(l, j, i, k)`. For reference, the layout of the keys `l,j,i,k` is similar to that of the arrow keys, but they are easier to type without moving the hand. I have been editing a few things here and there on the `.tmux.conf`, but I could not find information on how to rebind the above commands.


title: Error mounting drives

text: I am not able to mount the disk. It is showing error.               Error mounting system-managed device /dev/sda3: Command-line `mount "/media/tusharmakkar08/Local"' exited with non-zero exit status 1: [mntent]: line 1 in /etc/fstab is bad     mount: can't find /media/tusharmakkar08/Local in /etc/fstab or /etc/mtab      Output of                sudo blkid  is               /dev/sda2: UUID="FA38015738011473" TYPE="ntfs"      /dev/sda3: LABEL="Local Disk" UUID="01CD72098BB21B70" TYPE="ntfs"      /dev/sda4: UUID="2ca94bc3-eb3e-41cf-ad06-293cf89791f2" TYPE="ext4"      /dev/sda5: UUID="CFB1-5DDA" TYPE="vfat"       Output of               cat /etc/fstab is :               UUID=01CD72098BB21B70 /media/tusharmakkar08/Local Disk1 ntfs-3g nosuid,nodev 0 0     UUID=FA38015738011473 /media/sda2 ntfs-3g defaults 0 0     UUID=2ca94bc3-eb3e-41cf-ad06-293cf89791f2 / ext4 defaults 0 1     UUID=CFB1-5DDA /media/tusharmakkar08/CFB1-5DDA vfat defaults 0 0


title: How to count the number of words and print the lines that match exactly a given pattern?

text: I want to count the number of words and print the matched pattern lines which matches exactly with following pattern: `abc-ERROR:` The input File contains:               # abc-ERROR: xyxxkkfgfr     # def-Error: aaaaaa     # abc-ERROR.cpp The output should be:                1   (count)      # abc-ERROR: xyxxkkfgfr   (line)


title: tail program output to file in Linux

text: I know we can use below format to redirect the screen output to a file:               $ your_program > /tmp/output.txt      However when I used below command, it says _"-bash: /home/user/errors.txt: Permission denied"_               sudo tail /var/log/apache2/error.log > ~/errors.txt      May I know how to make this output works? The ~/errors.txt doesn't exist. Do I need to create this txt file first before I use the redirect command?


title: Does "persistence" slow down boot and shutdown on a USB linux?

text: Essentially, my question is: how does casper-rw (IIRC) work? Every time it boots, it copies the entire file? Every time it shuts down, it recreates it? Also does its size affect the speed? RTFM links on casper-rw/persistence appreciated.


title: Create a tar archive of the current directory without preceding period

text: When I do the following:               tar czvf ../myarchive.tar.gz ./      I get a single (annoying) root folder in my tar archive: ![annoying](https://imgur.com/MWud8TY.png) How do I remove this awful period when creating the archive?


title: How can I preserve new lines coming from a command's output during variable assignment?

text: Consider:               $ getfacl somefile.dat     # The output is formatted and contains several new lines..          # file: somefile.dat     # owner: user1     # group: group1     user::rw-     group::r--              #effective:r--     mask:r--     other:r--     $     $ ACL_PERMISSIONS=$(getfacl somefile.dat);     $ echo $ACL_PERMISSIONS;     # file: somefile.dat # owner: user1 # group: group1 user::rw- group::r-- #effective:r-- mask:r-- other:r--      So how do I preserve these new lines during variable assignment, so that when I echo `$ACL_PERMISSIONS` I get the same output as `$ getfacl somefile.dat` ..?


title: Not able to ssh to another computer, but can ping it?

text: Unable to ssh to another computer but can ping it? Not sure what I am missing?   Using a Netgear router               bash-3.2$ ifconfig     lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384             inet6 ::1 prefixlen 128              inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1              inet 127.0.0.1 netmask 0xff000000      gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280     stf0: flags=0<> mtu 1280     en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500             ether xx:xx:xx:xx:xx:xx              media: autoselect (none)             status: inactive     en1: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500             ether xx:xx:xx:xx:xx:xx              inet6 xxxx::xxxx:xxxx:xxxx:xxxxxx prefixlen 64 scopeid 0x5              inet 10.0.0.3 netmask 0xffffff00 broadcast 10.0.0.255             media: autoselect             status: active     fw0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 4078             lladdr xx:xx:xx:xx:xx:xx:xx:xx              media: autoselect <full-duplex>             status: inactive     bash-3.2$ ssh jeremy@10.0.0.4     ssh: connect to host 10.0.0.4 port 22: Connection refused     bash-3.2$ ssh -p 5900 jeremy@10.0.0.4     ssh: connect to host 10.0.0.4 port 5900: Connection refused     bash-3.2$ ping 10.0.0.3     PING 10.0.0.3 (10.0.0.3): 56 data bytes     64 bytes from 10.0.0.3: icmp_seq=0 ttl=64 time=0.046 ms     64 bytes from 10.0.0.3: icmp_seq=1 ttl=64 time=0.079 ms     64 bytes from 10.0.0.3: icmp_seq=2 ttl=64 time=0.078 ms     64 bytes from 10.0.0.3: icmp_seq=3 ttl=64 time=0.077 ms     64 bytes from 10.0.0.3: icmp_seq=4 ttl=64 time=0.079 ms     64 bytes from 10.0.0.3: icmp_seq=5 ttl=64 time=0.081 ms     64 bytes from 10.0.0.3: icmp_seq=6 ttl=64 time=0.078 ms     ^C     --- 10.0.0.3 ping statistics ---     7 packets transmitted, 7 packets received, 0.0% packet loss     round-trip min/avg/max/stddev = 0.046/0.074/0.081/0.011 ms     bash-3.2$ ping 10.0.0.4     PING 10.0.0.4 (10.0.0.4): 56 data bytes     64 bytes from 10.0.0.4: icmp_seq=0 ttl=64 time=2.667 ms     64 bytes from 10.0.0.4: icmp_seq=1 ttl=64 time=2.675 ms     64 bytes from 10.0.0.4: icmp_seq=2 ttl=64 time=2.969 ms     64 bytes from 10.0.0.4: icmp_seq=3 ttl=64 time=2.663 ms     64 bytes from 10.0.0.4: icmp_seq=4 ttl=64 time=2.723 ms     ^C     --- 10.0.0.4 ping statistics ---     5 packets transmitted, 5 packets received, 0.0% packet loss     round-trip min/avg/max/stddev = 2.663/2.739/2.969/0.117 ms     bash-3.2$


title: Get current output

text: This just crossed my mind. Let's say that I'm operating a remote machine via SSH and I executed a `make` command to, e.g. build a new kernel for my machine. While I'm logged in that session, I can see in the current console tab what is happening (i.e. the debugging messages). Then, I close that SSH session (make is still running) and I log in again via SSH (again) and I want to keep seeing those debugging messages in real time (as I had never closed that console tab). Is this possible? **PS:** I could still track if `make` is still running, e.g. using `ps axjf | grep make`. But I'm just curious to know if this is possible. **PS2:** Also, let's say the `make` command, at the end of its execution displays an error message. How can I tell this occurred by the same method described above?


title: How do I make anaconda skip the installing of a package?

text: I'm using preupgrade to upgrade from Fedora 16 to 17, and I keep getting an unpack error when installing the cups package. I really do not need cups and I want anaconda to skip it and continue. How do I achieve this?


title: Re-run multiple history commands

text: Imagine you've just run a dozen commands. Say...               $ cd foo/    # history cmd #10000 (my history is very long)     $ ... more commands ...     $ cd ../     # history cmd #10012       I know I can re-run them concatenated with `!-12 && !-11 && !-10 && (and so on) && !!` if they happen to have _just_ been run (unlikely) or `!10000 && !10001 && !10002 && (and so on)`, but is there a simpler way than hand-typing each history number with a bang and ampersands? Is there perhaps some kind of range thing I'm unaware of in bash? e.g. `!{10000-10012}` # something like this, only working.


title: Crunch bang Linux login fails

text: I cannot login to Crunchbang Linux. When I boot the computer, it goes to the login screen, and if I type the correct username+password combo, it goes to a black screen that reads "failed to execute login command" (if the password is incorrect, it rejects the combo correctly). Booting into recovery mode, it logs me in fine. Once in, though, when I try to startx, it gives me a bunch of errors and fails:               _XSERVTransSocketUNIXCreateListener: ../SocketCreateListener() failed     _XSERVTransMakeAllCOTSServerListeners: server already running          Fatal server error:     Cannot establish any listening sockets - Make sure an X server isn't already running          Please consult the The X.Org Foundation support                     at http://wiki.x.org     for help.     Please also check the log file at "/var/log/Xorg.0.log" for additional information.          Invalid MIT-MAGIC-COOKIE-1 keygiving up.     xinit: Resource temporarily unavailable (errno 11): unable to connect to X server     xinitL No such process (errno 3): Server error.      If I try running openbox-session, I get:               Openbox-Message: Failed to open the display from the DISPLAY environment variable      Some threads I've found have suggested removing /tmp/X0-lock if no X server is running (and none is/was). However, this didn't help when I removed it. Does anyone have any ideas on how to fix this? If it helps, $DISPLAY is empty. **EDIT:** I have no xorg.conf file that I can find anywhere. I read that you don't actually need this after x has been setup, but could this be causing the problem?


title: Sed processed file displays differently in vi vs cat

text: I can't tell if `sed` is mucking my file up. In `vi` or `less` it displays properly, but `cat` and `more` insert other characters. why are they showing up differently I am on a redhat linux system with a standard xterm. the raw tab file before:               scaffold1000    693:14709284:741:333    129011535   1     scaffold1000    693:14709284:27:726 129011535   1     scaffold1000    693:14709284:44:1157    129011535   1     scaffold1000    693:14709284:771:459    129011535   1     scaffold1000    693:14709284:610:615    129011535   1     scaffold1000    693:14709284:1152:1159  129011535   1      applying `sed`:               sed -i 's/scaffold/scaffold\_/' [myfile]      I've also tried this without the backslash to the same result. Using `cat` I see this :               scaffold11000   693:14709284:741:333    129011535   1     scaffold11000   693:14709284:27:726 129011535   1     scaffold11000   693:14709284:44:1157    129011535   1     scaffold11000   693:14709284:771:459    129011535   1     scaffold11000   693:14709284:610:615    129011535   1      Where did that '1' come from? :( editing in `vi` or using `less` I see:               scaffold_1000   693:14709284:741:333    129011535       1^M     1^M     1            scaffold_1000   693:14709284:27:726     129011535       1^M     1^M     1            scaffold_1000   693:14709284:44:1157    129011535       1^M     1^M     1            scaffold_1000   693:14709284:771:459    129011535       1^M     1^M     1            scaffold_1000   693:14709284:610:615    129011535       1^M     1^M     1            scaffold_1000   693:14709284:1152:1159  129011535       1^M     1^M     1          Do the `^M` chars have something to do with this? Its like I can't trust my own eyes here...


title: Sublime command line open it twice

text: I just created a symbolic link to sublime:               $ sudo ln -s /opt/SublimeText2/sublime_text /usr/bin/subl      The problem is that it opens the last project and the open I want:               $ subl my-project      or               $ ~/my-project/subl .      Both commands open Sublime Text 2 but twice, so I have two ST2 running. How to solve this?


title: apt python error prevents me from resolving dependency problems for apt-get install

text: On Debian 6 servers dependency issues are preventing me from installing nis (or any package). When I try to resolve that issue I get a python error. How do I get past this issue and re-gain the ability to install packages? I have googled and found a few people reporting the same error message, but no one had a solution. I also checked SE to no avail. This is affecting 10s of servers at my company.               root 7 # apt-get install nis     Reading package lists... Done     Building dependency tree            Reading state information... Done     You might want to run 'apt-get -f install' to correct these:     The following packages have unmet dependencies:      libglib2.0-dev : Depends: libglib2.0-0 (= 2.24.2-1) but 2.40.0-2 is to be installed      nis : Depends: libdbus-glib-1-2 (>= 0.78) but it is not going to be installed            Depends: libslp1 but it is not going to be installed     E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).      So then I tried to resolve this by following the suggestion:               root 8 # apt-get -f install     Reading package lists... Done     Building dependency tree            Reading state information... Done     Correcting dependencies... Done     The following packages were automatically installed and are no longer required:       xfonts-encodings ttf-dejavu-core xfonts-utils libxfont1 libpango1.0-common libdb5.1 libxcb-render-util0     Use 'apt-get autoremove' to remove them.     The following extra packages will be installed:       libglib2.0-dev     Suggested packages:       libglib2.0-doc     The following packages will be upgraded:       libglib2.0-dev     1 upgraded, 0 newly installed, 0 to remove and 559 not upgraded.     42 not fully installed or removed.     Need to get 0 B/2642 kB of archives.     After this operation, 3982 kB of additional disk space will be used.     Do you want to continue [Y/n]? y     dpkg: error processing /var/cache/apt/archives/libglib2.0-dev_2.40.0-2_amd64.deb (--unpack):      parse error, in file '/var/lib/dpkg/tmp.ci/control' near line 7 package 'libglib2.0-dev':      `Depends' field, invalid package name `python:any': character `:' not allowed (only letters, digits and characters `-+._')     configured to not write apport reports                                           Errors were encountered while processing:      /var/cache/apt/archives/libglib2.0-dev_2.40.0-2_amd64.deb     E: Sub-process /usr/bin/dpkg returned an error code (1)          root 9 #       I also tried               apt-get autoremove      but this just told me to do               apt-get -f install      again. I tried to look at the offending file but I got this:               root 11 # cat /var/lib/dpkg/tmp.ci/control     /var/lib/dpkg/tmp.ci/control: No such file or directory      As requested:               root 14 # apt-cache policy nis libglib2.0-dev libglib2.0-0 libdbus-glib-1-2 libslp1      libglib2.0-0:       Installed: 2.40.0-2       Candidate: 2.40.0-2       Version table:      *** 2.40.0-2 0             500 http://ftp.us.debian.org/debian/ unstable/main amd64 Packages             100 /var/lib/dpkg/status     libdbus-glib-1-2:       Installed: (none)       Candidate: 0.102-1       Version table:          0.102-1 0             500 http://ftp.us.debian.org/debian/ unstable/main amd64 Packages     libglib2.0-dev:       Installed: 2.24.2-1       Candidate: 2.40.0-2       Version table:          2.40.0-2 0             500 http://ftp.us.debian.org/debian/ unstable/main amd64 Packages      *** 2.24.2-1 0             100 /var/lib/dpkg/status     nis:       Installed: (none)       Candidate: 3.17-33       Version table:          3.17-33 0             500 http://ftp.us.debian.org/debian/ unstable/main amd64 Packages     libslp1:       Installed: (none)       Candidate: 1.2.1-9       Version table:          1.2.1-9 0             500 http://ftp.us.debian.org/debian/ unstable/main amd64 Packages      as requested:               apt-cache policy     Package files:      100 /var/lib/dpkg/status          release a=now      500 http://security.debian.org/ stable/updates/main Translation-en      500 http://security.debian.org/ stable/updates/main amd64 Packages          release v=7.0,o=Debian,a=stable,n=wheezy,l=Debian-Security,c=main          origin security.debian.org      500 http://ftp.us.debian.org/debian/ unstable/main Translation-en      500 http://ftp.us.debian.org/debian/ unstable/main amd64 Packages          release o=Debian,a=unstable,n=sid,l=Debian,c=main          origin ftp.us.debian.org     Pinned packages:


title: Where is the core of Unix?

text: I know there are a lot of questions like this, but I certain this one is rare. I am a computer programmer who wants to take on the challenge of building an operating system. I want to base it on Unix because I know that what I make could never compare. Where can I find Unix? I don't mean things like Mint (that's Linux, I know). I mean the thing they are all based on. Where can I get the main files, like the boot loader and the kernel?


title: How do I setup more then 10 loopback device?

text: From this answer the solution is to               modprobe loop max_loop=64      Which makes me allowed to use 64 loopback devices then               mknod -m 660 /dev/loop8 b 7 8      To create the devices. I did this for 8, 9, 10 and 8,9 works but 10 does not. I then tried loopa to loopf and tried to mount a 11th device and i get the error               Error: Failed to set up a loop device:      How do I make >10 loop devices?


title: How do I SSH into my Samba file server?

text: So I made a dedicated Samba file server on my Debian(3.2) machine. I have had great success accessing it from both Windows and Unix. I can SSH into it on the local network. When I try to SSH into it via the public IP address, it says connection refused. I would like to be able to ssh into it remotely, directing into the Samba share. How would I go about doing this? I hear I might have to port forward? Do I need to change anything in the smb.conf file? Here's my sshd_config file:               # Package generated configuration file     # See the sshd_config(5) manpage for details          # What ports, IPs and protocols we listen for     Port 22     # Use these options to restrict which interfaces/protocols sshd will bind to     #ListenAddress ::     #ListenAddress 0.0.0.0     Protocol 2     # HostKeys for protocol version 2     HostKey /etc/ssh/ssh_host_rsa_key     HostKey /etc/ssh/ssh_host_dsa_key     #Privilege Separation is turned on for security     UsePrivilegeSeparation yes          # Lifetime and size of ephemeral version 1 server key     KeyRegenerationInterval 3600     ServerKeyBits 768          # Logging     SyslogFacility AUTH     LogLevel INFO          # Authentication:     LoginGraceTime 120     PermitRootLogin yes     StrictModes yes          RSAAuthentication yes     PubkeyAuthentication yes     #AuthorizedKeysFile %h/.ssh/authorized_keys          # Don't read the user's ~/.rhosts and ~/.shosts files     IgnoreRhosts yes     # For this to work you will also need host keys in /etc/ssh_known_hosts     RhostsRSAAuthentication no     # similar for protocol version 2     HostbasedAuthentication no     # Uncomment if you don't trust ~/.ssh/known_hosts for RhostsRSAAuthentication     #IgnoreUserKnownHosts yes          # To enable empty passwords, change to yes (NOT RECOMMENDED)     PermitEmptyPasswords no          # Change to yes to enable challenge-response passwords (beware issues with     # some PAM modules and threads)     ChallengeResponseAuthentication no          # Change to no to disable tunnelled clear text passwords     #PasswordAuthentication yes          # Kerberos options     #KerberosAuthentication no     #KerberosGetAFSToken no     #KerberosOrLocalPasswd yes     #KerberosTicketCleanup yes          # GSSAPI options     #GSSAPIAuthentication no     #GSSAPICleanupCredentials yes          X11Forwarding yes     X11DisplayOffset 10     PrintMotd no     PrintLastLog yes     TCPKeepAlive yes     #UseLogin no          #MaxStartups 10:30:60     #Banner /etc/issue.net          # Allow client to pass locale environment variables     AcceptEnv LANG LC_*          Subsystem sftp /usr/lib/openssh/sftp-server          # Set this to 'yes' to enable PAM authentication, account processing,     # and session processing. If this is enabled, PAM authentication will     # be allowed through the ChallengeResponseAuthentication and     # PasswordAuthentication.  Depending on your PAM configuration,     # PAM authentication via ChallengeResponseAuthentication may bypass     # the setting of "PermitRootLogin without-password".     # If you just want the PAM account and session checks to run without     # PAM authentication, then enable this but set PasswordAuthentication     # and ChallengeResponseAuthentication to 'no'.     UsePAM yes


title: How to use Emacs to recognize and automatically open GPG encrypted file in ASCII armored format?

text: `gpg -ca passwords.txt` create encrypted ASCII file `passwords.txt.asc`. Emacs open the file as a normal text file:               -----BEGIN PGP MESSAGE-----     Version: GnuPG v2.0.19 (GNU/Linux)          jA0EAwMCkIp3+bQkLWJgyTQYLGVN8EUEG0BE42sEj/8PrnSzgviSiENxtK+/2n73     WXD7EtndVS/MX4lFJ96h8VozChUA     =zSwh     -----END PGP MESSAGE-----      How do I make Emacs auto-decrypt and encrypt the file when I open and save it?


title: lxml with custom install location for libxml2/libxslt doesn't find correct location

text: I am using CentOS 6.5 and want to use newer versions of Python, lxml, libxml2 and libxslt2 than what's available from the repos. So I build libxml2, libxslt2 and python 2.7.8 from scratch, and add all the binary paths to my $PATH. "xml2-config --cflags --libs" includes the correct (custom) locations of libxml libraries and includes. I configure/make/make install python-2.7.8 to my home directory, add its bin to my path. Install setuptools by "python setup.py install", followed by easy_install pip. Finally, pip install lxml ... This finds my correct locations of libxml. However, 'from lxml import etree' fails because it expects my newer version of libxml but it looks at /usr/lib64/libxml and fails. Why is it not detecting my libxml location? It detects it when installing lxml, but not when importing it? ImportError: /usr/lib64/libxml2.so.2: version `LIBXML2_2.9.0' not found (required by /home/hsundara/packages_installed/python-2.7.8/lib/python2.7/site- packages/lxml/etree.so) But when building - Building against libxml2/libxslt in one of the following directories:                 /home/hsundara/packages_installed/libxslt-1.1.28/lib       /home/hsundara/packages_installed/libxml2-2.9.1/lib      Any solutions?


title: Two users with different permissions on same directory

text: Is it possible to give two users different permissions on the same directory? I want to use it for ftp: userFull gets R+W and userLim gets only Read, depending on who logs on. Im getting stuck on the ownership versus group rights... (I use CentOS+Directadmin and Proftpd) So the following is what I want if it's possible at all:               /home/myDir  -  userFull  -  read & write     /home/myDir  -  userLim  -  read only


title: How to install from a Linux live CD that does not support installing?

text: I tried out the linuX-gamers live DVD and like it so much that I want to have it as the main operating system on my desktop. The FAQ says: > Can I install or copy the medium to my hard disk? No, the software is only > designed to boot from a live medium. However, as the live DVD is said to be based on Arch Linux I think it is pretty much possible to put it onto the hard drive. A painful way to do this would be to install Arch and try to make it look like this DVD. The download page says that the ISO is isohybrid, I don't know if it makes any difference. Is there a (reliable) way to turn an ISO like that into a working installation? I wouldn't mind spending a few days to mess with it.


title: Is TWM still a viable window manager?

text: I have been using mainly KDE on my main desktop for a while now and have decided it is too bloated (e.g., my issue with Desktop indexing with KDE) and was thinking of switching to LXDE because it is "lighter". I realized if I want to go light, then why not just go all the way back to before "desktop environments" and switch back to TWM. I know I can run TWM on my Arch Linux system, but what I am not sure about is if it is viable. I know it is lacking so-called "features", but does it support all the core things required to run QT and GTK based programs? Is there a repository of `.twmrc` files? I know about http://xwinman.org/vtwm.php, but my hazy recollection is my set up was much slicker back in the day.


title: WITHOUT using network command lines in linux, how to know list of open ports and the process that owns them?

text: I want to know which ports are used by which processes in embedded-linux. Since it is simple embedded-linux, there are no network command lines such as netstat, lsof. (only basic command lines such as cat, cp, echo, etc exist). A partial solution seems to be to use "cat /proc/net/tcp" and "cat /proc/net/udp" command lines. However, **I am not sure the printed list from those command lines shows all ports in use** , and **the list does not show which process is binded to certain port**. Any comments would be appreciated.


title: Gdm broken for unknown reason

text: My Debian 7.6 (Wheezy) got broken over the night. The login window changed from a grey, static one to a black with dynamic effects. After logging in I found out that none of the gnome extensions I was using are available any more. What's more, the desktop is empty and unresponsive - I can't click on it or anything. The day before I installed qt4 (a snippet from /var/log/apt/history.log below). It all worked great but when I saw the gdm change next morning I uninstalled all the packages. Unfortunately, that didn't bring old gdm back. I also tried to change qtconfig settings but with no effect. I also switched to another terminal, stopped /etc/init.d/gdm3, and reinstalled gdm3 package but again, this didn't fix the situation. Then, I updated all available packages. I've also tried to create a new user but the problem remains. I also tried to analyse ~/.xsessions-errors but I can't figure out what may be wrong. I attach the file content below too. I still get this new login screen, I can't use my desktop because it's unclickable and it doesn't display any of the ~/Desktop content (which is untouched btw), all gnome plugins are deactivated. What else can I do to get my gnome back? I'm getting pretty desperate here. /var/log/apt/history.log               Start-Date: 2014-07-11  20:04:56     End-Date: 2014-07-11  20:04:56          Start-Date: 2014-07-11  20:05:07     End-Date: 2014-07-11  20:05:07          Start-Date: 2014-07-11  20:05:20     Install: qt4-qmake:amd64 (4.8.2+dfsg-11)     End-Date: 2014-07-11  20:06:24          Start-Date: 2014-07-11  20:07:27     Install: libqt4-qt3support:amd64 (4.8.2+dfsg-11, automatic), libqt4-opengl-dev:amd64 (4.8.2+dfsg-11, automatic), libqt4-dev:amd64 (4.8.2+dfsg-11), libqtwebkit-dev:amd64 (2.2.1-5, automatic), libqt4-dev-bin:amd64 (4.8.2+dfsg-11, automatic), qt4-linguist-tools:amd64 (4.8.2+dfsg-11, automatic)     End-Date: 2014-07-11  20:07:40          Start-Date: 2014-07-11  20:11:06     Install: libqt4-core:amd64 (4.8.2+dfsg-11), libqt4-gui:amd64 (4.8.2+dfsg-11), libqt4-private-dev:amd64 (4.8.2+dfsg-11)     End-Date: 2014-07-11  20:11:12          Start-Date: 2014-07-12  10:02:18     Install: qt4-qtconfig:amd64 (4.8.2+dfsg-11), libphonon4:amd64 (4.6.0.0-3, automatic)     End-Date: 2014-07-12  10:02:44          Start-Date: 2014-07-12  15:51:10     Remove: libqt4-opengl-dev:amd64 (4.8.2+dfsg-11), libqt4-dev-bin:amd64 (4.8.2+dfsg-11)     Purge: libqt4-qt3support:amd64 (4.8.2+dfsg-11), libqt4-core:amd64 (4.8.2+dfsg-11), libqt4-dev:amd64 (4.8.2+dfsg-11), libqt4-gui:amd64 (4.8.2+dfsg-11), qt4-qmake:amd64 (4.8.2+dfsg-11), libqtwebkit-dev:amd64 (2.2.1-5), libqt4-private-dev:amd64 (4.8.2+dfsg-11), qt4-linguist-tools:amd64 (4.8.2+dfsg-11)     End-Date: 2014-07-12  15:51:42          Start-Date: 2014-07-12  16:10:53     End-Date: 2014-07-12  16:10:53          Start-Date: 2014-07-12  17:23:52     Upgrade: openssh-server:amd64 (6.0p1-4+deb7u1, 6.0p1-4+deb7u2), libc-bin:amd64 (2.13-38+deb7u1, 2.13-38+deb7u3), base-files:amd64 (7.1wheezy5, 7.1wheezy6), libcupsppdc1:amd64 (1.5.3-5+deb7u1, 1.5.3-5+deb7u2), libcupsimage2:amd64 (1.5.3-5+deb7u1, 1.5.3-5+deb7u2), libcupscgi1:amd64 (1.5.3-5+deb7u1, 1.5.3-5+deb7u2), libcupsdriver1:amd64 (1.5.3-5+deb7u1, 1.5.3-5+deb7u2), libjpeg8:amd64 (8d-1, 8d-1+deb7u1), libjpeg8:i386 (8d-1, 8d-1+deb7u1), wireless-regdb:amd64 (2011.04.28-1, 2013.11.27-0wheezy1), libxml2-utils:amd64 (2.8.0+dfsg1-7+nmu3, 2.8.0+dfsg1-7+wheezy1), libdbus-1-3:amd64 (1.6.8-1+deb7u1, 1.6.8-1+deb7u3), libdbus-1-3:i386 (1.6.8-1+deb7u1, 1.6.8-1+deb7u3), libdbi-perl:amd64 (1.622-1, 1.622-1+deb7u1), cups-client:amd64 (1.5.3-5+deb7u1, 1.5.3-5+deb7u2), mobile-broadband-provider-info:amd64 (20120708-1, 20140317-1~deb7u1), linux-image-3.2.0-4-amd64:amd64 (3.2.57-3+deb7u2, 3.2.60-1+deb7u1), linux-headers-3.2.0-4-amd64:amd64 (3.2.57-3+deb7u2, 3.2.60-1+deb7u1), libdatetime-timezone-perl:amd64 (1.58-1+2014c, 1.58-1+2014e), cups-ppdc:amd64 (1.5.3-5+deb7u1, 1.5.3-5+deb7u2), dbus:amd64 (1.6.8-1+deb7u1, 1.6.8-1+deb7u3), cups-common:amd64 (1.5.3-5+deb7u1, 1.5.3-5+deb7u2), linux-headers-3.2.0-4-common:amd64 (3.2.57-3+deb7u2, 3.2.60-1+deb7u1), libcups2:amd64 (1.5.3-5+deb7u1, 1.5.3-5+deb7u2), libcups2:i386 (1.5.3-5+deb7u1, 1.5.3-5+deb7u2), openssh-client:amd64 (6.0p1-4+deb7u1, 6.0p1-4+deb7u2), multiarch-support:amd64 (2.13-38+deb7u1, 2.13-38+deb7u3), apache2.2-bin:amd64 (2.2.22-13+deb7u1, 2.2.22-13+deb7u2), libopenobex1:amd64 (1.5-2, 1.5-2+deb7u1), libhdf5-7:amd64 (1.8.8-9, 1.8.8-9+b1), libxml2:amd64 (2.8.0+dfsg1-7+nmu3, 2.8.0+dfsg1-7+wheezy1), libxml2:i386 (2.8.0+dfsg1-7+nmu3, 2.8.0+dfsg1-7+wheezy1), cups:amd64 (1.5.3-5+deb7u1, 1.5.3-5+deb7u2), libcups2-dev:amd64 (1.5.3-5+deb7u1, 1.5.3-5+deb7u2), libxml2-dev:amd64 (2.8.0+dfsg1-7+nmu3, 2.8.0+dfsg1-7+wheezy1), libxml2-doc:amd64 (2.8.0+dfsg1-7+nmu3, 2.8.0+dfsg1-7+wheezy1), cups-bsd:amd64 (1.5.3-5+deb7u1, 1.5.3-5+deb7u2), libjpeg62:amd64 (6b1-3, 6b1-3+deb7u1), libjpeg62:i386 (6b1-3, 6b1-3+deb7u1), libjpeg8-dev:amd64 (8d-1, 8d-1+deb7u1), gpgv:amd64 (1.4.12-7+deb7u3, 1.4.12-7+deb7u4), linux-libc-dev:amd64 (3.2.57-3+deb7u2, 3.2.60-1+deb7u1), libdbus-1-dev:amd64 (1.6.8-1+deb7u1, 1.6.8-1+deb7u3), dbus-x11:amd64 (1.6.8-1+deb7u1, 1.6.8-1+deb7u3), libcupsmime1:amd64 (1.5.3-5+deb7u1, 1.5.3-5+deb7u2), libemail-address-perl:amd64 (1.895-1, 1.895-1+deb7u1), python-libxml2:amd64 (2.8.0+dfsg1-7+nmu3, 2.8.0+dfsg1-7+wheezy1), gnupg:amd64 (1.4.12-7+deb7u3, 1.4.12-7+deb7u4)     Remove: libnet-daemon-perl:amd64 (0.48-1), libplrpc-perl:amd64 (0.2020-2)     End-Date: 2014-07-12  17:26:56          Start-Date: 2014-07-12  22:17:57     Reinstall: gdm3:amd64 (3.4.1-8)     End-Date: 2014-07-12  22:18:32          Start-Date: 2014-07-12  22:19:12     End-Date: 2014-07-12  22:19:12          Start-Date: 2014-07-12  22:37:59     Purge: qt4-qtconfig:amd64 (4.8.2+dfsg-11)     End-Date: 2014-07-12  22:38:06      ~/xsession-errors               /etc/gdm3/Xsession: Beginning session setup...     localuser:skramer being added to access control list     openConnection: connect: No such file or directory     cannot connect to brltty at :0     GLib-GIO-Message: Using the 'memory' GSettings backend.  Your settings will not be saved or shared with other applications.     gnome-session[7604]: GLib-CRITICAL: Source ID 25 was not found when attempting to remove it     GNOME_KEYRING_CONTROL=/home/skramer/.cache/keyring-aNXMcO     GNOME_KEYRING_CONTROL=/home/skramer/.cache/keyring-aNXMcO     SSH_AUTH_SOCK=/home/skramer/.cache/keyring-aNXMcO/ssh     GNOME_KEYRING_CONTROL=/home/skramer/.cache/keyring-aNXMcO     SSH_AUTH_SOCK=/home/skramer/.cache/keyring-aNXMcO/ssh     GNOME_KEYRING_CONTROL=/home/skramer/.cache/keyring-aNXMcO     SSH_AUTH_SOCK=/home/skramer/.cache/keyring-aNXMcO/ssh     GPG_AGENT_INFO=/home/skramer/.cache/keyring-aNXMcO/gpg:0:1     GLib-GIO-Message: Using the 'memory' GSettings backend.  Your settings will not be saved or shared with other applications.     GLib-GIO-Message: Using the 'memory' GSettings backend.  Your settings will not be saved or shared with other applications.     RTNETLINK answers: Operation not permitted     RTNETLINK answers: Operation not permitted     GLib-GIO-Message: Using the 'memory' GSettings backend.  Your settings will not be saved or shared with other applications.     RTNETLINK answers: Operation not permitted     RTNETLINK answers: Operation not permitted     RTNETLINK answers: Operation not permitted     RTNETLINK answers: Operation not permitted     RTNETLINK answers: Operation not permitted     RTNETLINK answers: Operation not permitted     GLib-GIO-Message: Using the 'memory' GSettings backend.  Your settings will not be saved or shared with other applications.     Initializing nautilus-gdu extension     GLib-GIO-Message: Using the 'memory' GSettings backend.  Your settings will not be saved or shared with other applications.               (Do:7719): GLib-GObject-WARNING **: Attempt to add property GtkSettings::gtk-button-images after class was initialised     Window manager warning: Log level 8: g_object_unref: assertion 'G_IS_OBJECT (object)' failed     ** Message: applet now removed from the notification area               (Do:7719): Wnck-CRITICAL **: wnck_set_client_type got called multiple times.               GLib-GIO-Message: Using the 'memory' GSettings backend.  Your settings will not be saved or shared with other applications.     Window manager warning: Log level 8: Source ID 27 was not found when attempting to remove it               (Do:7719): GLib-CRITICAL **: Source ID 54 was not found when attempting to remove it     Window manager warning: Log level 8: Source ID 34 was not found when attempting to remove it     ** Message: applet now embedded in the notification area     Window manager warning: Log level 8: Source ID 190 was not found when attempting to remove it     Window manager warning: Log level 8: Source ID 46 was not found when attempting to remove it     Window manager warning: Log level 8: Source ID 191 was not found when attempting to remove it               (dropbox:7695): GLib-GObject-WARNING **: Attempt to add property GtkSettings::gtk-button-images after class was initialised     Window manager warning: Log level 8: Source ID 268 was not found when attempting to remove it     (repeated may times with subsequent IDs)          Firefox.PlacesItemSource "Firefox Places" encountered an error in UpdateItems: System.InvalidCastException: Cannot cast from source type to destination type.       at Mono.Data.Sqlite.SqliteDataReader.VerifyType (Int32 i, DbType typ) [0x00000] in <filename unknown>:0        at Mono.Data.Sqlite.SqliteDataReader.GetString (Int32 i) [0x00000] in <filename unknown>:0        at Firefox.PlacesItemSource+<LoadPlaceItems>c__Iterator3.MoveNext () [0x00000] in <filename unknown>:0        at System.Collections.Generic.List`1[Firefox.PlaceItem].AddEnumerable (IEnumerable`1 enumerable) [0x00000] in <filename unknown>:0        at System.Collections.Generic.List`1[Firefox.PlaceItem]..ctor (IEnumerable`1 collection) [0x00000] in <filename unknown>:0        at System.Linq.Enumerable.ToArray[PlaceItem] (IEnumerable`1 source) [0x00000] in <filename unknown>:0        at Firefox.PlacesItemSource.UpdateItems () [0x00000] in <filename unknown>:0        at Do.Universe.Safe.SafeItemSource.UpdateItems () [0x00000] in <filename unknown>:0 .     Could not locate Tomboy on D-Bus. Perhaps it's not running?               (Do:7719): GLib-CRITICAL **: Source ID 59 was not found when attempting to remove it               (Do:7719): GLib-CRITICAL **: Source ID 60 was not found when attempting to remove it               (Do:7719): GLib-CRITICAL **: Source ID 58 was not found when attempting to remove it     Window manager warning: Log level 8: Source ID 286 was not found when attempting to remove it     (repeated may times with subsequent IDs)               (nautilus:7693): GLib-GObject-WARNING **: gsignal.c:2580: instance '0x226f360' has no handler with id '81'               (nautilus:7693): GLib-CRITICAL **: Source ID 86 was not found when attempting to remove it               (nautilus:7693): GLib-CRITICAL **: Source ID 87 was not found when attempting to remove it               (nautilus:7693): GLib-CRITICAL **: Source ID 88 was not found when attempting to remove it               (Do:7719): GLib-CRITICAL **: Source ID 71 was not found when attempting to remove it               (Do:7719): GLib-CRITICAL **: Source ID 70 was not found when attempting to remove it     Window manager warning: Log level 8: Source ID 341 was not found when attempting to remove it     Window manager warning: Log level 8: Source ID 348 was not found when attempting to remove it               (Do:7719): GLib-CRITICAL **: Source ID 73 was not found when attempting to remove it               (Do:7719): GLib-CRITICAL **: Source ID 74 was not found when attempting to remove it     [7856:7856:0713/094312:ERROR:browser_main_loop.cc(240)] GLib-GObject: Attempt to add property GtkSettings::gtk-button-images after class was initialised     [7856:7856:0713/094312:ERROR:browser_main_loop.cc(240)] GLib-GObject: Attempt to add property GtkSettings::gtk-label-select-on-focus after class was initialised     [7856:7856:0713/094312:ERROR:browser_main_loop.cc(240)] GLib-GObject: Attempt to add property GtkSettings::gtk-entry-select-on-focus after class was initialised     [7856:7856:0713/094312:ERROR:browser_main_loop.cc(240)] GLib-GObject: Attempt to add property GtkSettings::gtk-entry-password-hint-timeout after class was initialised     [7856:7856:0713/094312:ERROR:nss_util.cc(853)] After loading Root Certs, loaded==false: NSS error code: -8018     GLib-GIO-Message: Using the 'memory' GSettings backend.  Your settings will not be saved or shared with other applications.     [7856:7856:0713/094312:ERROR:component_loader.cc(138)] Failed to parse extension manifest.     ATTENTION: default value of option force_s3tc_enable overridden by environment.     Window manager warning: Log level 8: Source ID 349 was not found when attempting to remove it     [7856:7856:0713/094313:ERROR:desktop_window_tree_host_x11.cc(1289)] Not implemented reached in void views::DesktopWindowTreeHostX11::MapWindow(ui::WindowShowState)     Window manager warning: Log level 8: Source ID 360 was not found when attempting to remove it     (repeated may times with subsequent IDs)               (Do:7719): GLib-CRITICAL **: Source ID 93 was not found when attempting to remove it         (repeated may times with subsequent IDs)          GLib-GIO-Message: Using the 'memory' GSettings backend.  Your settings will not be saved or shared with other applications.               (gnome-terminal:8161): GLib-GIO-CRITICAL **: g_settings_get: the format string may not contain '&' (key 'monospace-font-name' from schema 'org.gnome.desktop.interface'). This call will probably stop working with a future version of glib.     (repeated may times with subsequent IDs)          Firefox.PlacesItemSource "Firefox Places" encountered an error in UpdateItems: System.InvalidCastException: Cannot cast from source type to destination type.       at Mono.Data.Sqlite.SqliteDataReader.VerifyType (Int32 i, DbType typ) [0x00000] in <filename unknown>:0        at Mono.Data.Sqlite.SqliteDataReader.GetString (Int32 i) [0x00000] in <filename unknown>:0        at Firefox.PlacesItemSource+<LoadPlaceItems>c__Iterator3.MoveNext () [0x00000] in <filename unknown>:0        at System.Collections.Generic.List`1[Firefox.PlaceItem].AddEnumerable (IEnumerable`1 enumerable) [0x00000] in <filename unknown>:0        at System.Collections.Generic.List`1[Firefox.PlaceItem]..ctor (IEnumerable`1 collection) [0x00000] in <filename unknown>:0        at System.Linq.Enumerable.ToArray[PlaceItem] (IEnumerable`1 source) [0x00000] in <filename unknown>:0        at Firefox.PlacesItemSource.UpdateItems () [0x00000] in <filename unknown>:0        at Do.Universe.Safe.SafeItemSource.UpdateItems () [0x00000] in <filename unknown>:0 .     Could not locate Tomboy on D-Bus. Perhaps it's not running?     (repeated may times with subsequent IDs)          Firefox.PlacesItemSource "Firefox Places" encountered an error in UpdateItems: System.InvalidCastException: Cannot cast from source type to destination type.       at Mono.Data.Sqlite.SqliteDataReader.VerifyType (Int32 i, DbType typ) [0x00000] in <filename unknown>:0        at Mono.Data.Sqlite.SqliteDataReader.GetString (Int32 i) [0x00000] in <filename unknown>:0        at Firefox.PlacesItemSource+<LoadPlaceItems>c__Iterator3.MoveNext () [0x00000] in <filename unknown>:0        at System.Collections.Generic.List`1[Firefox.PlaceItem].AddEnumerable (IEnumerable`1 enumerable) [0x00000] in <filename unknown>:0        at System.Collections.Generic.List`1[Firefox.PlaceItem]..ctor (IEnumerable`1 collection) [0x00000] in <filename unknown>:0        at System.Linq.Enumerable.ToArray[PlaceItem] (IEnumerable`1 source) [0x00000] in <filename unknown>:0        at Firefox.PlacesItemSource.UpdateItems () [0x00000] in <filename unknown>:0        at Do.Universe.Safe.SafeItemSource.UpdateItems () [0x00000] in <filename unknown>:0 .               (Do:7719): GLib-CRITICAL **: Source ID 248 was not found when attempting to remove it     Could not locate Tomboy on D-Bus. Perhaps it's not running?               (Do:7719): GLib-CRITICAL **: Source ID 211 was not found when attempting to remove it     (powtórzone wiele razy)               (Do:7719): GLib-CRITICAL **: Source ID 258 was not found when attempting to remove it     Window manager warning: Log level 8: Source ID 728 was not found when attempting to remove it     (repeated may times with subsequent IDs)               (gnome-settings-daemon:7663): PackageKit-WARNING **: couldn't parse execption 'GDBus.Error:org.gtk.GDBus.UnmappedGError.Quark._pk_5ftransaction_5ferror.Code4: GetDistroUpgrades not supported by backend', please report               (gnome-settings-daemon:7663): updates-plugin-WARNING **: failed to get upgrades: GDBus.Error:org.gtk.GDBus.UnmappedGError.Quark._pk_5ftransaction_5ferror.Code4: GetDistroUpgrades not supported by backend     Window manager warning: Log level 8: Source ID 823 was not found when attempting to remove it     (repeated may times with subsequent IDs)               Firefox.PlacesItemSource "Firefox Places" encountered an error in UpdateItems: System.InvalidCastException: Cannot cast from source type to destination type.       at Mono.Data.Sqlite.SqliteDataReader.VerifyType (Int32 i, DbType typ) [0x00000] in <filename unknown>:0        at Mono.Data.Sqlite.SqliteDataReader.GetString (Int32 i) [0x00000] in <filename unknown>:0        at Firefox.PlacesItemSource+<LoadPlaceItems>c__Iterator3.MoveNext () [0x00000] in <filename unknown>:0        at System.Collections.Generic.List`1[Firefox.PlaceItem].AddEnumerable (IEnumerable`1 enumerable) [0x00000] in <filename unknown>:0        at System.Collections.Generic.List`1[Firefox.PlaceItem]..ctor (IEnumerable`1 collection) [0x00000] in <filename unknown>:0        at System.Linq.Enumerable.ToArray[PlaceItem] (IEnumerable`1 source) [0x00000] in <filename unknown>:0        at Firefox.PlacesItemSource.UpdateItems () [0x00000] in <filename unknown>:0        at Do.Universe.Safe.SafeItemSource.UpdateItems () [0x00000] in <filename unknown>:0 .     Could not locate Tomboy on D-Bus. Perhaps it's not running?     Window manager warning: Log level 8: Source ID 902 was not found when attempting to remove it     (repeated may times with subsequent IDs)               Window manager warning: Log level 8: Source ID 1075 was not found when attempting to remove it     Firefox.PlacesItemSource "Firefox Places" encountered an error in UpdateItems: System.InvalidCastException: Cannot cast from source type to destination type.       at Mono.Data.Sqlite.SqliteDataReader.VerifyType (Int32 i, DbType typ) [0x00000] in <filename unknown>:0        at Mono.Data.Sqlite.SqliteDataReader.GetString (Int32 i) [0x00000] in <filename unknown>:0        at Firefox.PlacesItemSource+<LoadPlaceItems>c__Iterator3.MoveNext () [0x00000] in <filename unknown>:0        at System.Collections.Generic.List`1[Firefox.PlaceItem].AddEnumerable (IEnumerable`1 enumerable) [0x00000] in <filename unknown>:0        at System.Collections.Generic.List`1[Firefox.PlaceItem]..ctor (IEnumerable`1 collection) [0x00000] in <filename unknown>:0        at System.Linq.Enumerable.ToArray[PlaceItem] (IEnumerable`1 source) [0x00000] in <filename unknown>:0        at Firefox.PlacesItemSource.UpdateItems () [0x00000] in <filename unknown>:0        at Do.Universe.Safe.SafeItemSource.UpdateItems () [0x00000] in <filename unknown>:0 .     Could not locate Tomboy on D-Bus. Perhaps it's not running?     Window manager warning: Log level 8: Source ID 1076 was not found when attempting to remove it     (repeated may times with subsequent IDs)               Firefox.PlacesItemSource "Firefox Places" encountered an error in UpdateItems: System.InvalidCastException: Cannot cast from source type to destination type.       at Mono.Data.Sqlite.SqliteDataReader.VerifyType (Int32 i, DbType typ) [0x00000] in <filename unknown>:0        at Mono.Data.Sqlite.SqliteDataReader.GetString (Int32 i) [0x00000] in <filename unknown>:0        at Firefox.PlacesItemSource+<LoadPlaceItems>c__Iterator3.MoveNext () [0x00000] in <filename unknown>:0        at System.Collections.Generic.List`1[Firefox.PlaceItem].AddEnumerable (IEnumerable`1 enumerable) [0x00000] in <filename unknown>:0        at System.Collections.Generic.List`1[Firefox.PlaceItem]..ctor (IEnumerable`1 collection) [0x00000] in <filename unknown>:0        at System.Linq.Enumerable.ToArray[PlaceItem] (IEnumerable`1 source) [0x00000] in <filename unknown>:0        at Firefox.PlacesItemSource.UpdateItems () [0x00000] in <filename unknown>:0        at Do.Universe.Safe.SafeItemSource.UpdateItems () [0x00000] in <filename unknown>:0 .     Could not locate Tomboy on D-Bus. Perhaps it's not running?     Window manager warning: Log level 8: Source ID 1258 was not found when attempting to remove it     (repeated may times with subsequent IDs)               Firefox.PlacesItemSource "Firefox Places" encountered an error in UpdateItems: System.InvalidCastException: Cannot cast from source type to destination type.       at Mono.Data.Sqlite.SqliteDataReader.VerifyType (Int32 i, DbType typ) [0x00000] in <filename unknown>:0        at Mono.Data.Sqlite.SqliteDataReader.GetString (Int32 i) [0x00000] in <filename unknown>:0        at Firefox.PlacesItemSource+<LoadPlaceItems>c__Iterator3.MoveNext () [0x00000] in <filename unknown>:0        at System.Collections.Generic.List`1[Firefox.PlaceItem].AddEnumerable (IEnumerable`1 enumerable) [0x00000] in <filename unknown>:0        at System.Collections.Generic.List`1[Firefox.PlaceItem]..ctor (IEnumerable`1 collection) [0x00000] in <filename unknown>:0        at System.Linq.Enumerable.ToArray[PlaceItem] (IEnumerable`1 source) [0x00000] in <filename unknown>:0        at Firefox.PlacesItemSource.UpdateItems () [0x00000] in <filename unknown>:0        at Do.Universe.Safe.SafeItemSource.UpdateItems () [0x00000] in <filename unknown>:0 .     Could not locate Tomboy on D-Bus. Perhaps it's not running?     Window manager warning: Log level 8: Source ID 1411 was not found when attempting to remove it     (powtórzone wiele razy)               Firefox.PlacesItemSource "Firefox Places" encountered an error in UpdateItems: System.InvalidCastException: Cannot cast from source type to destination type.       at Mono.Data.Sqlite.SqliteDataReader.VerifyType (Int32 i, DbType typ) [0x00000] in <filename unknown>:0        at Mono.Data.Sqlite.SqliteDataReader.GetString (Int32 i) [0x00000] in <filename unknown>:0        at Firefox.PlacesItemSource+<LoadPlaceItems>c__Iterator3.MoveNext () [0x00000] in <filename unknown>:0        at System.Collections.Generic.List`1[Firefox.PlaceItem].AddEnumerable (IEnumerable`1 enumerable) [0x00000] in <filename unknown>:0        at System.Collections.Generic.List`1[Firefox.PlaceItem]..ctor (IEnumerable`1 collection) [0x00000] in <filename unknown>:0        at System.Linq.Enumerable.ToArray[PlaceItem] (IEnumerable`1 source) [0x00000] in <filename unknown>:0        at Firefox.PlacesItemSource.UpdateItems () [0x00000] in <filename unknown>:0        at Do.Universe.Safe.SafeItemSource.UpdateItems () [0x00000] in <filename unknown>:0 .     Could not locate Tomboy on D-Bus. Perhaps it's not running?     Window manager warning: Log level 8: Source ID 1576 was not found when attempting to remove it     (repeated may times with subsequent IDs)               (Do:7719): GLib-CRITICAL **: Source ID 417 was not found when attempting to remove it     (powtórzone wiele razy)     Window manager warning: Log level 8: Source ID 1588 was not found when attempting to remove it     GLib-GIO-Message: Using the 'memory' GSettings backend.  Your settings will not be saved or shared with other applications.               (gnome-terminal:8489): GLib-GIO-CRITICAL **: g_settings_get: the format string may not contain '&' (key 'monospace-font-name' from schema 'org.gnome.desktop.interface'). This call will probably stop working with a future version of glib.     Window manager warning: Log level 8: Source ID 1590 was not found when attempting to remove it     (repeated may times with subsequent IDs)


title: How to extract URIs from files

text: How can I extract from a certain number of files all the URIs like `magnet:` `file:`? I'd like to have one URI per line as the output. I'd like to use bash to achieve this, but any suggestion is welcome. I'm using debian 7. The input is a bunch of html files with random names. The URIs will all be in `a href` HTML tags like: `<a href='magnet:?xt=something1:something1:somerandomcharacters'>link text</a>`. There isn't a scheme of how the URIs are stored in each file, there may be _n_ URIs per file and they may be wherever in the files. Expected output should be a list with values separated by new line character like:               magnet:?xt.......     magnet:?xt.......     magnet:?xt.......


title: How do I copy a file from multiple servers to my local system?

text: We have multiple deployment of an application on servers such as app00, app01 and so on. I need to copy a single log file from all these servers onto my local mac so I can perform some grepping and cutting. I used csshX for viewing this file but I cannot find an equivalent for scp. I basically want two things:   1. Ability to connect to n numbers of such servers and copy the file   2. Avoid naming conflicts locally perhaps by prefixing the log file with the server hostname How do I do this?


title: Disable ssh banner for specific users or ips

text: I've enabled the banner that appears before the password prompt by setting it it `sshd_config`. However certain users (especially me) really don't need to see the banner (it also screws up a lot of scripting). I want to be able to disable it for certain users or maybe even certain IP addresses. How do I do this? Just to be clear, this is the banner that is normally in `/etc/issue.net`, not the one that can be silenced with `.hushlogin`.


title: How to change file owner in AIX?

text: How can I change a owner of a file in AIX? I created a file using my personal account and then I tried to change user for this file:               chown rootuser myfile.csv     chown: myfile.csv: Operation not permitted.      Then I changed to root user               sudo /usr/bin/su - rootuser      and tried to change the owner of this file               chown rootuser myfile.csv     chown: myfile.csv: Not owner      How can I change the owner of this file?


title: Amazon AWS (Amazon AMI) installing OpenVPN

text: I'm trying to set up OpenVPN on AmazonAWS. I'm pretty new to Linux so I followed a tutorial. I ran `yum -y install openvpn` and I received a message saying it was successfully installed. The next step was to copy the files in `/usr/share/openvpn/easy-rsa/2.0/` to `/etc/openvpn/easy-rsa/`. Much to my surprise, the `/usr/share/openvpn/easy-rsa/` directory was empty. I tried to uninstall and reinstall OpenVPN and the result was the same. I tried to install easy-rsa seperately, but I didn't find it in the yum package list. Can anyone help me install OpenVPN?


title: How can I get X to autodetect monitor specifications again?

text: I'm running fc19 in 64 bit. After going through the horrible process of trying to install kmod-nvidia, akmod-nvidia, and the proprietary nvidia driver, in an attempt to get CUDA working, I have rolled back to the default nouveau driver. However, not only is my fedora boot sequence not graphical anymore, but X is not auto-detecting my monitor's resolution/gamma anymore and xrandr is limited to three low-resolution modes. I know it can be manually defined in xorg.conf, but autodetect was working before just fine. Plus, it is supposed to be deprecated, and I frequently change monitors. Anything I can try? Am I missing a boot flag, or could a necessary file have been messed with? Obviously I can just reinstall fedora and it will work just fine again, but that isn't really solving why this issue would occur.


title: doing an rsync across multiple machines

text: I have the following setup: Machines A, B , C running linux. I have to do a continuous rsync from machine A to machine C and have a script for that. However, the access to machine C from machine A is only through B. So I have to ssh into B and then I can ssh into C. The way to rsync that I have now is that first I rsync from C to B and then rsync from B to A. However, with the additional copy between the machines, this is


title: Clear the screen and show a banner

text: I need a text banner on a screen which is projected all the time. The screen is connected to a PC with tmux on it. Example of text "banners":               figlet $(fortune)      or               toilet "$(cowsay $(fortune))"      You get the idea. Initially we thought this banner would need "regeneration capabilities" in case something went wrong, so we did something like this:               watch --interval 1 --no-title echo Paranoid about crashes, but I should not be      but the thing never crashed in a year! (`uptime` > 1yr) So we are simplifying and deploying somewhere else too. I just want a UNIX command that does the following:   * clear the screen (like `clear`)   * shows a formatted string (like `printf`)   * is modal (like an `ncurses` app) I started to write something like this, pinched off of a web tutorial:               #include <ncurses.h>          int main(int argc, char** argv) {       char* greeting = "Hello, world!";       initscr();       addstr(greeting);       refresh();       getch();       endwin();       return 0;     }      but this is not "modal" (with modal being: disregard all input until CTRL+C) and I may be "rewriting an existing tool". Which UNIX tool would you use in my case?


title: Which desktop environments let you switch to a non-default window manager?

text: I used to use fvwm as the window manager under Gnome 2, but as I understand Gnome 3 can't be used with a non-default window manager, so I'm looking for alternatives. Are there other desktop environments that have the option of switching to a different window manager? What I know so far:   - Mate presumably does, since it's a Gnome 2 fork   - LXDE does (source)   - Razor-qt does (source), but it seems pretty early in development  Information from answers/comments:   - Xfce does   - KDE does   - I may be able to use the Gnome tools I want without running Gnome Shell I'm still not sure about the Gnome3 Fallback mode, and I'm probably missing other options.


title: Installing systemtap 2.3 on ubuntu precise

text: If I install systemtap using `apt-get` on ubuntu precise, I get systemtap 1.6. Building it from source is proving to be complicated as it requires kernel headers. Is there an easy way to install this?


title: Nested KVM - KVM-Guest unable to get DHCP address

text: Morning all I'm currently trying to set-up a Nested CentOS 7.0 KVM host inside a vSphere ESX 5.1.0 hypervisor. I've been following http://virtuallyhyper.com/2012/07/installing-kvm-as-a-virtual-machine-on- esxi5-with-bridged-networking/   I've managed to get the KVM Host installed successfully, and it's configured to support KVM and libvirt. However the issue comes in when I try and pxeboot a KVM Guest against my existing DHCP server.   I can see a DHCPDISCOVER being issued by iPxe, and the DHCP server logs a DHCPOFFER, but it never receives a DHCPREQUEST from iPxe on the kvm-guest. I've setup the KVM host with a bridged network, and disabled the 'default' NAT network:               [root@kvm-test ~]# brctl show     bridge name     bridge id               STP enabled     interfaces     br0             8000.005056970ea0       yes             ens160                                                             vnet0     [root@kvm-test ~]# ifconfig     br0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500             inet 192.168.18.51  netmask 255.255.255.0  broadcast 192.168.18.255             inet6 fe80::250:56ff:fe97:ea0  prefixlen 64  scopeid 0x20<link>             ether 00:50:56:97:0e:a0  txqueuelen 0  (Ethernet)             RX packets 105230  bytes 13897310 (13.2 MiB)             RX errors 0  dropped 11  overruns 0  frame 0             TX packets 105566  bytes 44412894 (42.3 MiB)             TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0          ens160: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500             inet6 fe80::250:56ff:fe97:ea0  prefixlen 64  scopeid 0x20<link>             ether 00:50:56:97:0e:a0  txqueuelen 1000  (Ethernet)             RX packets 105378  bytes 15365254 (14.6 MiB)             RX errors 0  dropped 0  overruns 0  frame 0             TX packets 106773  bytes 44491366 (42.4 MiB)             TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0          lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536             inet 127.0.0.1  netmask 255.0.0.0             inet6 ::1  prefixlen 128  scopeid 0x10<host>             loop  txqueuelen 0  (Local Loopback)             RX packets 217153  bytes 54126840 (51.6 MiB)             RX errors 0  dropped 0  overruns 0  frame 0             TX packets 217153  bytes 54126840 (51.6 MiB)             TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0          vnet0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500             inet6 fe80::fc54:ff:fec1:978  prefixlen 64  scopeid 0x20<link>             ether fe:54:00:c1:09:78  txqueuelen 500  (Ethernet)             RX packets 40  bytes 17480 (17.0 KiB)             RX errors 0  dropped 0  overruns 0  frame 0             TX packets 743  bytes 48921 (47.7 KiB)             TX errors 0  dropped 755 overruns 0  carrier 0  collisions 0      The guest is configured with a 'bridged' interface:               [root@kvm-test ~]# virsh edit 2     <domain type='kvm'>       <name>kvm-guest.test.card.co.uk</name>       <uuid>82c15c03-aec5-4dd9-ad23-67275f742c89</uuid>       ...       <devices>         <interface type='bridge'>           <mac address='52:54:00:c1:09:78'/>           <source bridge='br0'/>           <model type='e1000'/>           <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>         </interface>       </devices>     </domain>      iptables is disabled on the KVM host, and there's no local dhcp server running. Any ideas on what the issue could be? Cheers   Gavin


title: Returning a portion of a line matching a pattern

text: I have a file (file_name) which contains exactly one occurrance of the string "Result: " at the start of a line. I want to print all the characters after the string "Result: " in that line until I encounter a '.' character. Which shell command should I use?


title: Where is the "About Gnome" dialog in gnome-shell?

text: I'm used to Gnome 2 in Debian and Fedora. But recently I've been using Gnome 3 and Gnome-shell (3.0.2). Today I noticed I wasn't able to find the About Gnome dialog. It's been helpful in the past to pull it up to see what version of Gnome I'm running, and see some attribution information. So, questions:   1. Where does the About Gnome dialog live in Gnome 3 / Gnome-shell?   2. If it has been removed, was this a Gnome decision, or my distro (fedora)?   3. Are there relevant software license requirements about attribution that is user-facing?


title: How to remove Apache from CentOS while keeping php 5.3

text: I have a problem with removing Apache from my CentOS install. First of all I installed lighty (lighttpd) and then I tried to install php53 which httpd was included with it. I've configured lighty with php and now I don't need httpd for any reason so I want remove it. When I try to remove httpd from my centos 5.7 server with `yum` it prompts to remove php. So how can I remove httpd while keeping php ?


title: How to compare to floating point number in a shell script

text: I want to compare two floating point numbers in a shell script. The following code is not working:               #!/bin/bash        min=12.45     val=10.35         if (( $val < $min )) ; then           min=$val     fi     echo $min


title: Change the keyboard layout in LightDM

text: I installed LightDM on an Arch Linux system (using pacman) and it runs fine, except, that if I try to type a special character (like "@", "$", ...) in the user or password field it doesn't do anything. I'm using the gtk3 greeter, but it doesn't work with other greeters aswell. I configured the keyboard and the locale like described in the Arch Linux installation guide and it also says in the top right corner of LightDM "de_DE.utf-8".


title: Strange symbols instead of normal icons and sidekiq issue in GitLab

text: After setting the relative url in gitlab:                 # Note that three settings need to be changed for this to work.     # 1) In your application.rb file: config.relative_url_root = "/gitlab"     # 2) In your gitlab.yml file: relative_url_root: /gitlab     # 3) In your unicorn.rb: ENV['RAILS_RELATIVE_URL_ROOT'] = "/gitlab"      I can access my gitlab via dyndns. (like https://my_subdomain.dyndns.com/gitlab).   But... Instead of normal icons I get strange china-styled ones:   ![enter image description here](http://i.stack.imgur.com/rYxm3.png) Sidekiq has problems in displaying, too. I have `nginx` running.   I followed the official guide.


title: How to get JPEG thumbnails quickly

text: My camera is _very_ basic (understatement), but it does have one notable feature: its thumbnail mode is impressively fast; it loads a screenful of 9 thumbnails in less than a quarter of a second. Now, when I select an image, it first instantly loads an extremely blocky, blurry rendition of my picture, then locks up annoyingly (:P) for umpteen seconds while reloading the image at "full" resolution. Clearly, that low-quality "instant" load is what it's using for thumbnail mode. There's no semi-hidden "thumbnails" directory hiding on my SD card; instead, what I think it's doing is exploiting the fact that JPGs can load "progressively" like GIFs can, and I think my camera is running through the first progressive "scan" of each picture, and then immediately stopping and rendering just that data. I roughly estimate the size of each thumbnail at around 90x90, and the first "scan" of a 7MP image scaled down to that size looks just fine. (It's when I select the image and it displays like that for a few seconds that it looks blocky.) Now, using eg "feh" in thumbnail mode, pulling JPGs off my MicroSD card reader is just about as mind-numbingly slow as viewing fullscreen images inside the camera, because feh loads the full image then thumbnails it (which is quite inefficient if you think about it...). What applications exist for Linux which will show "instant" thumbnails, without retrieving and processing the full image, as per how my camera does it?