title: Perf Tool Linux - Not counting cycles-t and cycles-ct

text: am using the Linux Perf tool to monitor certain events for my benchmarking runs. In the event list argument -e, I added cycles-t and cycles-ct since I want to capture them. But both of them always return 0 when I run perf. I am using following command for example:               perf stat -e cycles-ct dd if=/dev/zero of=/dev/numm count=10000      and this is the output               10000+0 records in     10000+0 records out     5120000 bytes (5.1 MB) copied, 0.0318331 s, 161 MB/s           Performance counter stats for 'dd if=/dev/zero of=/dev/numm count=10000':                  31,957,327      cycles-ct                                      0      cpu/cycles-ct/                                                               0.035254063 seconds time elapsed      Any idea on this? I need to get cpu/cycles-ct values. (I am on Fedora 20. Tried updating the perf utility, it did not resolve my problem.) Also if I run this command               perf stat -T -a sleep 1      I get the output as follows:               Performance counter stats for 'system wide':                 8022.927913      task-clock (msec)         #    8.011 CPUs utilized                        104842699      instructions              #    0.87  insns per cycle         [100.00%]              120099715      cycles                    #    0.015 GHz                     [100.00%]                 162615      cpu/cycles-t/             #    0.14% transactional cycles    [100.00%]                    773      cpu/tx-start/             #      210 cycles / transaction    [100.00%]                      0      cpu/el-start/             #    0.000 K/sec                   [100.00%]                 111864      cpu/cycles-ct/            #    0.04% aborted cycles                          1.001474976 seconds time elapsed


title: How does the ports package build system work?

text: I have used yum and apt for package management. The ports system which is in use in *BSD is new to me. I see that some Linux distributions also use it. Like the Gentoo portage and Arch's ABS. I would like to know how they work? A comparison with apt or yum would be good to have.


title: find 2 files with similar names and move them to a new location

text: I have a system with a watch folder where people/companies can upload new files via FTP or SMB. In this watch folder They should ALWAYS upload 2 files: 1 media file with a prefix name of `ABC*.mxf` and always a number for '*'. The other is the same file name, but with the `.xml` extension. example: uploaded files are: ABC0001.mxf, ABC0001.xml if a second file ABC0002.xml is uploaded but the ABC0002.mxf is not yet uploaded, or not complete the ABC0002.xml file should NOT yet be moved. only when both ABC*.mxf and ABC*.xml have matchng names excist and are 5 min or older they should be moved. I need to create a script that finds these 2 identical files (by name not extension) and only moves them if the modification time (mmin) is older than 5 minutes. So only completed files are moved. Also I must say that multiple files can be uploaded at the same time by different suppliers. ABC0001.mxf + .xml by company 1, and ABC0100.mxf + .xml by company 2, and ABC1003.mxf + .xml by company 3. Not all finishing at the same times. I already started with a partial script, but I'm struggling with the matching names part. * * *               SOURCEDIR="/dir/to/source"     DESTDIR="/destination/dir"          for FOUND in `find $SOURCEDIR/AutoIngest -maxdepth 1 \         -type f -name ^ABC* -mmin +5 `;          do              mv "$FOUND" "$DESTDIR/"         done      EDIT: changed the file names from ABC* to ABC*.mxf because the media file always have the .mxf extension. And added a file upload example.


title: How to change the name of localhost to a custom name which is available to other users in LAN

text: I need to use the a custom URL name which is accessible from all devices in a LAN. I know that it can be set in the `/etc/hosts` file               127.0.0.1   myname     127.0.1.1   system09-System-Product-Name          # The following lines are desirable for IPv6 capable hosts     ::1     ip6-localhost ip6-loopback     fe00::0 ip6-localnet     ff00::0 ip6-mcastprefix     ff02::1 ip6-allnodes     ff02::2 ip6-allrouters      While entering the `myname` hosts it is available to access myname/urlpath . It is accessible only for my system. How can I make this available systems in my LAN too?


title: How do I make a vim command run automatically with .vimrc?

text: I run the following `vim` command to change the colour of highlighted columns to something more palatable than the default red: `:highlight ColorColumn ctermbg=235 guibg=#2c2d27` rather than run this manually everytime I start vim, I'd like to automate this. But how? I've tried adding the following to `.vimrc`: `highlight ColorColumn ctermbg=235 guibg=#2c2d27` But that has no effect (no errors, it's just ignored after restart). Am I doing something wrong? I got the command from this Q: http://stackoverflow.com/questions/2447109/showing-a-different-background- colour-in-vim-past-80-characters But it didn't seem to shed light on my particular problem.


title: CentOS memory allocation

text: I was running my VPS with CentOS on 1G memory, but I saw the memory was getting "full" so I had 1G extra installed. This VPS is one I rent at a hosting company. That company did most of the configuration for me on installation of the VPS. They also installed DirectAdmin and handled all domain/DNS issues. I only installed certain user/FTP accounts and uploaded all my production websites. This servers hosts: 5 small static PHP websites, 2 wordpress websites, 1 Magento webshop, a testing evirment for myself and all e-mail accounts for each website. My goal is to enhance the server performance. I looked at various of guides on the internet. I broke allot of things and had to fix them afterwards, so I learned as I was going. I found out that I need to follow some correct guides/tutorials and need to make sure to follow only CentOs related stuff. `ulimit -a` and `free -m` command tell the following:               [root@1332 etc]# ulimit -a     core file size          (blocks, -c) 0     data seg size           (kbytes, -d) unlimited     scheduling priority             (-e) 0     file size               (blocks, -f) unlimited     pending signals                 (-i) 32365     max locked memory       (kbytes, -l) 32     max memory size         (kbytes, -m) unlimited     open files                      (-n) 1024     pipe size            (512 bytes, -p) 8     POSIX message queues     (bytes, -q) 819200     real-time priority              (-r) 0     stack size              (kbytes, -s) 10240     cpu time               (seconds, -t) unlimited     max user processes              (-u) 32365     virtual memory          (kbytes, -v) unlimited     file locks                      (-x) unlimited     [root@1332 etc]# free -m                  total       used       free     shared    buffers     cached     Mem:          2026        990       1036          0        129        620     -/+ buffers/cache:        240       1786     Swap:         2047          0       2047      So I have some extra free memory               top - 14:35:36 up  4:15,  1 user,  load average: 0.57, 0.49, 0.46     Tasks: 169 total,   1 running, 168 sleeping,   0 stopped,   0 zombie     Cpu(s):  0.1%us,  0.0%sy,  0.0%ni, 99.8%id,  0.0%wa,  0.1%hi,  0.0%si,  0.0%st     Mem:   2075000k total,  1016716k used,  1058284k free,   133924k buffers     Swap:  2097144k total,        0k used,  2097144k free,   637168k cached      I did a restart of the server, thats probably why everything is looking great. I changed `my.cnf` settings to the following:               [mysqld]     local-infile=0     skip-locking     query_cache_limit=2M     query_cache_size=64M     query_cache_type=1     max_connections=500     interactive_timeout=100     wait_timeout=120     connect_timeout=10     thread_cache_size=128     key_buffer=384M     join_buffer=8M     max_allowed_packet=16M     table_cache=1024     record_buffer=1M     sort_buffer_size=2M     read_buffer_size=2M     max_connect_errors=10     # Try number of CPU's*2 for thread_concurrency     thread_concurrency=6     myisam_sort_buffer_size=64M     server-id=1          [safe_mysqld]     err-log=/var/log/mysqld.log     open_files_limit=8192          [mysqldump]     quick     max_allowed_packet=16M          [mysql]     no-auto-rehash     #safe-updates          [isamchk]     key_buffer=64M     sort_buffer=64M     read_buffer=16M     write_buffer=16M          [myisamchk]     key_buffer=64M     sort_buffer=64M     read_buffer=16M     write_buffer=16M          [mysqlhotcopy]     interactive-timeout      I noticed that I don't have any `innoDB` settings here. Probably because they aren't installed or because of the presence of DirectAdmin or because my hoster doesn't use that. So, some questions:   1. Are my.cnf settings "correct" for having the best settings? (at this moment)   2. Are there any other settings I need to worry about?   3. Are there any performance tweaks I still need to do for Magento? (I tried installing APC or Xcache, but that didn't do much)   4. I installed REDIS, but is it normal that I don't "feel" anything in performance because of that?


title: Can we install puppet without touching the servers?

text: I heard that puppet need to be installed on server side, not just desktop side, from where we want to launch commands on the servers. **My question:** Are there any other methods for using puppet? I mean we don't want to install it on server side, just run scripts from our Desktop on the servers..


title: Precautions to be taken while make oldconfig

text: If a previous kernel _(assuming it is not from the stone age)_ compiles successfully, does it make sense to assume that old config file if copied to the new kernel, will compile successfully too? What things need to be taken care of?


title: Updating /boot/grub/menu.lst on OpenSuSe 11.3

text: I compiled the latest kernel, and the **menu.lst** is updated as follows.   My aim is to keep the other kernel around, so that if the new one fails we can still boot from the other one. Is this the correct way to achieve that?               # Modified by YaST2. Last modification on Thu Jan 19 17:10:38 IST 2012     # THIS FILE WILL BE PARTIALLY OVERWRITTEN by perl-Bootloader     # Configure custom boot parameters for updated kernels in /etc/sysconfig/bootloader          default 2     timeout 8     ##YaST - generic_mbr     gfxmenu (hd0,1)/boot/message     ##YaST - activate          ###Don't change this comment - YaST2 identifier: Original name: linux###     title Desktop -- openSUSE 11.3 - 3.2.1-12         kernel (hd0,1)/boot/vmlinuz-3.2.1-12-desktop root=/dev/disk/by-id/ata-ST3250310AS_6RYNQEXY-part2 resume=/dev/disk/by-id/ata-ST3250310AS_6RYNQEXY-part1 splash=silent quiet showopts vga=0x31a          ###Don't change this comment - YaST2 identifier: Original name: failsafe###     title Failsafe -- openSUSE 11.3 - 3.2.1-12         kernel (hd0,1)/boot/vmlinuz-3.2.1-12-desktop root=/dev/disk/by-id/ata-ST3250310AS_6RYNQEXY-part2 showopts apm=off noresume edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 nomodeset x11failsafe vga=0x31a               ###Don't change this comment - YaST2 identifier: Original name: linux###     title Desktop -- openSUSE 11.3 - 2.6.34-12         root (hd0,1)         kernel /boot/vmlinuz-2.6.34-12-desktop root=/dev/disk/by-id/ata-ST3250310AS_6RYNQEXY-part2 resume=/dev/disk/by-id/ata-ST3250310AS_6RYNQEXY-part1 splash=silent quiet showopts vga=0x31a         initrd /boot/initrd-2.6.34-12-desktop               ###Don't change this comment - YaST2 identifier: Original name: failsafe###     title Failsafe -- openSUSE 11.3 - 2.6.34-12         root (hd0,1)         kernel /boot/vmlinuz-2.6.34-12-desktop root=/dev/disk/by-id/ata-ST3250310AS_6RYNQEXY-part2 showopts apm=off noresume edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 nomodeset x11failsafe vga=0x31a         initrd /boot/initrd-2.6.34-12-desktop


title: Printing the current date/time with sub-second precision

text: GNU `date(1)` understands the `%N` format spec, which outputs nanoseconds, so:               $ date +%H:%M:%S.%N      outputs 19:10:03.725196000 BSD date doesn't understand %N. How can I print the current time with sub- second precision on OS X?


title: I accidentally chmod -R +x on a directory. How do I restore the correct permissions?

text: Well, to be specific, it was `chmod -R 755`. Now every file is executable, which I don't want. I am thinking that I should look at the first two bytes of each file for the `#!`, but will this cover everything? Should I instead use `file` to look at everything and base my decision on that? Or, more likely, is there an even better way to do this? What is the preferred way to recursively go through a directory and set -x on files that are not 'supposed to be' executable?


title: Hide processes from other users based on groups (under Linux)?

text: Is it possible to configure process hiding for certain user groups under a linux system? For example: Users from group X should not see processes owned by users from group Y in ps/top or under /proc. Is it possible to configure such a setup with SELinux? (I vaguely remember a similar feature in the funny grsecurity patch set - but IIRC, it was more generic - and besides, I want to configure a stock linux distro without having to maintain a custom kernel.) **Edit:** For better illustration, Solaris 10 has a similar feature. The example is not that generic, but one can configure that a user or some users can only see information of their own processes in ps etc.


title: Emacs's <C-l> vim equivalent

text: There's a neat `Control`-`L` hotkey in Emacs that repetitively moves the cursor to the top/middle/bottom of the screen. I'm quite sure there's a vim equivalent for that, but I couldn't find it.


title: How can I monitor the load of a php script on a server?

text: We've got a website on our dedicated server which seems to be causing problems. Recently it has been crashing our dedicated server - it's very annoying. It will crash at random times. The tech support team at the hosting company says that it is because of lack of memory. They have increased apache's maxclients setting, but to no avail. So the last thing it can be (we've moved mysql and images off the server) is that there's a php script somewhere which is using a hell of a lot of memory. It's quite a popular website, not by stack overflow standards of course, but it's relatively popular. Possibly there is a memory leak somewhere or some sort of infinite loop created somewhere or something. How can I pinpoint which scripts are using the most memory?


title: How to change a file type icon in XFCE (Thunar)?

text: How to change the icon used to depict files of a particular type in Thunar/XFCE.


title: How to Display Hidden Characters While Typing?

text: How can I configure vim to display hidden characters like tabs or spaces ONLY while those characters are typed? I do not want tabs and/or space replaced with special characters like ">" or "_" when the file is written.


title: iSCSI device mapped to different SCSI device

text: I have an iSCSI disk array connected to a server (Ubuntu). When I login with               iscsiadm -m node --login -p 192.168.1.240      the device used to appear as /dev/sdb. I created a volume group with LVM using /dev/sdb, and eventually ext4 partitions on it. After a reboot the device is appearing as /dev/sdd, and I can no longer mount any of the partitions I had created. vgscan can see the VG (called a), but the devices mapped onto the partitions give an error:               vgscan     ...     /dev/dm-9: read failed after 0 of 4096 at 4096: Input/output error     Found volume group "a" using metadata type lvm2      I would have thought that the system would be able to cope by itself with such a change (via the uuid of the devices), but I'm obviously missing something. So my questions are:   * is there a way to force my iSCSI device to go back to /dev/sdb?   * if not, is there a way to point my dev/dm-n devices to use /dev/sdd   * what is a robust way to go about it? I have learned today how to make my iSCSI device appear with the same name (say, /dev/iscsi/array): is this what I should have done? The issue of the iSCSI device not appearing back on the same /dev/sdx device is not mentioned anywhere as far as I can tell, so perhaps I'm missing something else. **Addition** : rebooting the machine has the desired effect. The device reappears at the right place. The questions remain: I'd appreciate it if anybody had any pointers so they can be answered.


title: Does FreeBSD support network virtualization like Crossbow?

text: Does FreeBSD support network virtualization like Solaris Crossbow? I've tried to follow the VImage links from the FreeBSD wiki page, but the links are mostly dead. If VImage is no longer part of FreeBSD, is there an alternative?


title: How can I tell if my system is keeping the system time up to date?

text: How can I tell if my Debian system is keeping the system time accurate by getting NTP updates? Basically I want to turn this on if it is currently off, but I don't know if it is on or off.


title: x-shockwave-flash in Linux

text: What should I install to be able to view videos of type `x-shockwave-flash` in Linux? I found something here with instructions               wget http://fpdownload.macromedia.com/get/flashplayer/curren/install_flash_player_9_linux.tar.gz     tar xvfz install_flash_player_9_linux     cd install_flash_player_9_linux     ./flashplayer-installer      but the file is already not there and when I try to download other file I can only choose between `Windows` and `Mac OS X`.


title: X11 Forwarding Problem Netscape

text: I have the following problem. A working verbose x11 forward request looks like this:               remote server release: Red Hat Linux release 6.2 (Zoot)          sh-4.1$  ssh -1 -vvv -l username -o "ForwardX11 yes" server.name netscape     OpenSSH_5.8p1, OpenSSL 0.9.8r 8 Feb 2011     debug2: ssh_connect: needpriv 0     debug1: Connecting to server.name [192.131.79.70] port 22.     debug1: Connection established.     debug1: identity file /home/username/.ssh/identity type 0     debug1: identity file /home/username/.ssh/identity-cert type -1     debug1: Remote protocol version 1.5, remote software version 1.2.26     debug1: no match: 1.2.26     debug1: Local version string SSH-1.5-OpenSSH_5.8     debug2: fd 3 setting O_NONBLOCK     debug1: Waiting for server public key.     debug1: Received server public key (768 bits) and host key (1024 bits).     debug1: Server host key: RSA1 0d:02:ad:64:5f:af:fa:e1:c6:ae:50:1a:91:7e:ab:f9     debug3: load_hostkeys: loading entries for host "server.name" from file "/home/shayre/.ssh/known_hosts"     debug2: key_type_from_name: unknown key type '1024'     debug3: key_read: missing keytype     debug3: load_hostkeys: found key type RSA1 in file /home/username/.ssh/known_hosts:1     debug3: load_hostkeys: loaded 1 keys     debug3: load_hostkeys: loading entries for host "192.131.79.70" from file "/home/shayre/.ssh/known_hosts"     debug2: key_type_from_name: unknown key type '1024'     debug3: key_read: missing keytype     debug3: load_hostkeys: found key type RSA1 in file /home/username/.ssh/known_hosts:1     debug3: load_hostkeys: loaded 1 keys     debug1: Host 'proxy-bt-2' is known and matches the RSA1 host key.     debug1: Found key in /home/username/.ssh/known_hosts:1     debug1: Encryption type: 3des     debug1: Sent encrypted session key.     debug2: cipher_init: set keylen (16 -> 32)     debug2: cipher_init: set keylen (16 -> 32)     debug1: Installing crc compensation attack detector.     debug1: Received encrypted confirmation.     debug1: Trying RSA authentication with key '/home/username/.ssh/identity'     debug1: Received RSA challenge from server.     Enter passphrase for RSA key '/home/username/.ssh/identity':      debug1: Sending response to host key RSA challenge.     debug1: Remote: RSA authentication accepted.     debug1: RSA authentication accepted by server.     Authenticated to server.name ([192.131.79.70]:22).     debug2: x11_get_proto: /usr/bin/xauth -f /tmp/ssh-aPHVuHic3976/xauthfile generat     Warning: untrusted X11 forwarding setup failed: xauth key data not generated     Warning: No xauth data; using fake authentication data for X11 forwarding.     debug1: Requesting X11 forwarding with authentication spoofing.     debug2: fd 3 setting TCP_NODELAY     debug3: packet_set_tos: set IP_TOS 0x10     debug1: Sending command: netscape     debug1: Entering interactive session.     debug2: fd 0 setting O_NONBLOCK     debug1: fd 0 clearing O_NONBLOCK     debug1: Received X11 open request.     debug2: fd 4 setting O_NONBLOCK     debug3: fd 4 is O_NONBLOCK     debug1: channel 0: new [X11 connection from server.name port 1874]     debug2: client_check_window_change: changed     debug2: client_check_window_change: changed      the non working output is as follows:               Red Hat Linux release 9 (Shrike)               $ ssh -1 -vvv -l username -o "ForwardX11 yes" server.address netscape     OpenSSH_5.8p1, OpenSSL 0.9.8r 8 Feb 2011     debug2: ssh_connect: needpriv 0     debug1: Connecting to server.address [192.65.220.98] port 22.     debug1: Connection established.     debug1: identity file /home/username/.ssh/identity type 0     debug1: identity file /home/username/.ssh/identity-cert type -1     debug1: Remote protocol version 1.99, remote software version OpenSSH_3.7.1p2     debug1: match: OpenSSH_3.7.1p2 pat OpenSSH_3.*     debug1: Local version string SSH-1.5-OpenSSH_5.8     debug2: fd 3 setting O_NONBLOCK     debug1: Waiting for server public key.     debug1: Received server public key (768 bits) and host key (1024 bits).     debug1: Server host key: RSA1 53:40:10:d1:86:92:1e:d5:a1:70:0f:b0:4f:c8:67:eb     debug3: load_hostkeys: loading entries for host "ext-proxy-2.ftel.co.uk" from file "/home/shayre/.ssh/known_hosts"     debug2: key_type_from_name: unknown key type '1024'     debug3: key_read: missing keytype     debug3: load_hostkeys: found key type RSA1 in file /home/username/.ssh/known_hosts:1     debug3: load_hostkeys: loaded 1 keys     debug3: load_hostkeys: loading entries for host "192.65.220.98" from file "/home/shayre/.ssh/known_hosts"     debug2: key_type_from_name: unknown key type '1024'     debug3: key_read: missing keytype     debug3: load_hostkeys: found key type RSA1 in file /home/username/.ssh/known_hosts:1     debug3: load_hostkeys: loaded 1 keys     debug1: Host 'server.address' is known and matches the RSA1 host key.     debug1: Found key in /home/username/.ssh/known_hosts:1     debug1: Encryption type: 3des     debug1: Sent encrypted session key.     debug2: cipher_init: set keylen (16 -> 32)     debug2: cipher_init: set keylen (16 -> 32)     debug1: Installing crc compensation attack detector.     debug1: Received encrypted confirmation.     debug1: Trying RSA authentication with key '/home/username/.ssh/identity'     debug1: Received RSA challenge from server.     Enter passphrase for RSA key '/home/username/.ssh/identity':      debug1: Sending response to host key RSA challenge.     debug1: Remote: RSA authentication accepted.     debug1: RSA authentication accepted by server.     Authenticated to server.address ([192.65.220.98]:22).     debug2: x11_get_proto: /usr/bin/xauth -f /tmp/ssh-kOywxfZB5752/xauthfile generate 127.0.0.1:0.0 MIT-MAGIC-COOKIE-1 untrusted timeout 1200 2>/dev/null     Warning: untrusted X11 forwarding setup failed: xauth key data not generated     Warning: No xauth data; using fake authentication data for X11 forwarding.     debug1: Requesting X11 forwarding with authentication spoofing.     debug2: fd 3 setting TCP_NODELAY     debug3: packet_set_tos: set IP_TOS 0x10     debug1: Sending command: netscape     debug1: Entering interactive session.     debug2: fd 0 setting O_NONBLOCK     debug1: fd 0 clearing O_NONBLOCK     bash: line 1: netscape: command not found     Transferred: sent 1096, received 716 bytes, in 0.0 seconds     Bytes per second: sent 26095.4, received 17047.7     debug1: Exit status 127      I can see my client machine is forwarding x11 traffic and I am able to establish a normal ssh session ok, just when I request the netscape from this particular release it fails? the working release Red Hat Linux release 6.2 (Zoot) gives me:               debug1: Received X11 open request.      the non-working release Red Hat Linux release 9 (Shrike) exits with:               bash: line 1: netscape: command not found      apart from the obvious is there another browser supported on this release, and how can I get this to work?


title: CentOS yum repository bad Header V4 RSA/SHA1 signature

text: I was coping with many problems to get stuck with this one. I have installed yum repository on server (CentOS 5.6) with:               createrepo -v -s sha yumrepo/      sha is used due to solution to my earlier problem I have found: my reposistory was not accepted. (`[Errno -3] Error performing checksum` ) generated gpg key with:               gpg --gen-key      sign package with (package was not created on server):               rpm --addsign mypackage-1.0-1.i386.rpm        check if was signed properly:               rpm -vv --checksig mypackage-1.0-1.i386.rpm      D: loading keyring from pubkeys in /var/lib/rpm/pubkeys/*.key     D: couldn't find any keys in /var/lib/rpm/pubkeys/*.key     D: loading keyring from rpmdb     D: opening  db index       /var/lib/rpm/Packages rdonly mode=0x0     D: locked   db index       /var/lib/rpm/Packages     D: opening  db index       /var/lib/rpm/Name rdonly mode=0x0     D:  read h#     205 Header sanity check: OK     D: added key gpg-pubkey-c105b9de-4e0fd3a3 to keyring     D:  read h#     313 Header sanity check: OK     D: added key gpg-pubkey-ebb3d90e-4ee5e6e8 to keyring     D: Using legacy gpg-pubkey(s) from rpmdb     D: Expected size:         3126 = lead(96)+sigs(528)+pad(0)+data(2502)     D:   Actual size:         3126     mypackage-1.0-1.i386.rpm:         Header V4 RSA/SHA1 Signature, key ID ebb3d90e: OK         Header SHA1 digest: OK (6d131be3c792fcc99da662f432c33facc86efc56)         V4 RSA/SHA1 Signature, key ID ebb3d90e: OK         MD5 digest: OK (76cfe98c4128d45da894a2b5b970e703)     D: closed   db index       /var/lib/rpm/Name     D: closed   db index       /var/lib/rpm/Packages      and exported my public key with:               gpg --armor --output MY-GPG-KEY --export 'MYNAME'      On client (CentOS 5.6 too) I have created file /etc/yum.repos.d/myrepo.repo with following content:               [myrepo]     name=myrepo     baseurl=https://login:pass@address.to.my.repo     enabled=1     gpgcheck=1     gpgkey=https://login:pass@address.to.my.repo/MY-GPG-KEY     protect=1      than as root I have run:               yum clean all     yum install mypackage      and get an error:               Downloading Packages:     mypackage-0.1-1.noarch.rpm                                | 3.0 kB     00:00          error: rpmts_HdrFromFdno: Header V4 RSA/SHA1 signature: BAD, key ID ebb3d90e      While:               rpm -q gpg-pubkey     gpg-pubkey-e8562897-459f07a4     gpg-pubkey-217521f6-45e8a532     gpg-pubkey-ebb3d90e-4ee5e6e8      What should I do to have my package securely installed ?


title: Music Server for WLAN-Speakers

text: There are several systems with WLAN-Speakers for sale. Most of them consist of several Boxes with WLAN-Recievers and a WLAN-Router/Storage-Device to spread the sound information. The WLAN-Speakers usually cost more than normal speakers with the same quality. That's oke, but I do not intend to buy a expensive router for around 300 €. I would prefer to so a music server on a usual computer like moc or anything comparable because that much more flexible with the hardware and software issues. The WLAN-Speaker systems are usually not that well documented and sold as "Black boxes". Is it possible to stream music via my normal WLAN-Router with a Music Server and for the Speakers to play the music? Are there "open" speakers systems on the market? Any other suggestions?


title: Download content from a certain <div> using wget

text: I'm trying to download all the images from a certain ImageBam gallery. I tried doing this:               wget -P pics -H -nd -r -A '.jpg,.jpeg,.png,.gif,' -erobots=off http://www.imagebam.com/gallery/hwtfu6m7es3gun1emmpy2uheohrcckmt/      But it downloaded the whole website; all I need is the content from a certain `<div>` which includes thumbnails and original images. Is it possible to create a script to download content from one `<div>` and not the whole website?


title: Ownership of etc folder is changed how to restore it using commandline?

text: I have a computer with Ubuntu 13.10 installed. The user (say `Walesa`) has changed the ownership of `etc` folder and all its subfolders from `root` to `Welesa` using a privileged file manager. As `sudo` was disabled, he rebooted hoping it will be re-enabled again. But security does not allow log-in after entering username and password saying "owner of etc/profile is not root". But a commandline login with `I have no name!@Walesa` is possible. Is there a way to restore ownership of `etc` and all its subfolders to `root` using this commandline?


title: Remove extra line break from a variable

text: ![enter image description here](http://i.stack.imgur.com/P6H0S.png)I am an absolute newbie to the *ix ,so if my question is dumb please bear with me. I am writing a script where I am trying to export some variable , and after exporting my variable when I am printing, it is printing an extra line after it. Here I am reading from a csv file containing two columns. This script is present in file script.sh and I am executing that file ./script.sh               #!/bin/bash     while IFS="," read f1 f2     do           echo "Source IP        : $f1"     #it is printing without extra line           echo "Destination IP   : $f2"               #it is printing without extra line                export sourceIP=$f1         export destIP=$f2              ssh -t -t sjain@$f1 <<ENDSSH         #Start copying 33KB File         echo "Destination IP Address: $destIP" # here it is printing an extra line after destIP         startTime=$(($(date '+%s%N')/1000000))         scp KB_33.txt sjain@$destIP:/home/sjain         endTime=$(($(date '+%s%N')/1000000))         printf 'Elapsed time in copying 33KB file: %s\n' $((endTime-startTime))          #Write the stats to the file         echo $sourceIP','$destIP',33KB,'$((endTime-startTime)) >> report.txt         exit         ENDSSH     done < ipaddress.csv      because of the above problem when I am executing               scp KB_33.txt sjain@$destIP:/home/sjain      it is breaking the command into 2 parts , like this ![screen shot](http://i.stack.imgur.com/ePuli.png)               scp KB_33.txt sjain@$X.X.X.X     :/home/sjain      And when I am directly hardcoding the value instead of destIP , it is working fine. How can I fix this? **Input CSV file Data**               10.0.0.1,10.0.0.2


title: rsync all files of remote machine over SSH without root user?

text: I have this command to backup a remote machine. The problem is that I need root rights to read and copy all files. I have no root user enabled for security reasons and use `sudo` the Ubuntu way. Would I need some cool piping or something to do this?               rsync -chavzP --stats user@192.168.1.2:/ .


title: Why does this executable still execute after I deleted it?

text: I deleted the executable, so why is it still running?               root@raspberrypi:/test# ls -la     total 11096     drwxrwxrwx  2 pi pi     4096 Mar 12 18:26 .     drwxrwxr-x 11 pi pi     4096 Feb 28 13:50 ..     -rwxrw-rw-  1 pi pi    12149 Feb 28 13:00 .cproject     -rwxrw-rw-  1 pi pi     3183 Mar 12 18:26 main.cpp     -rwxrw-rw-  1 pi pi     2169 Feb 28 14:28 main.cpp~     -rwxrw-rw-  1 pi pi     1862 Feb 28 13:20 original.cpp     -rwxrw-rw-  1 pi pi      984 Feb 28 13:09 .project     -rwxrw-rw-  1 pi pi 11323309 Jan 28 12:54 teatro.png     root@raspberrypi:/test# ./testedfb      running...      **--update:** Some time later (after I tried to compile again, but there's an error, and the executable was not created) the behavior changed to:               root@raspberrypi:/test# ./testedfb      bash: ./testedfb: No such file or directory      But I'm still curious; why was it was running? **--update (2):** Just happened again, and I did the test:               root@raspberrypi:/test# killall -9 testedfb     testedfb: no process found     root@raspberrypi:/test# ./testedfb      running...      And it still runs... I'm on a Raspberry Pi's Bash. **--update (3):** It just happened the oposite now, the file was there, but it was not found:               root@raspberrypi:/test# ./testedfb      bash: ./testedfb: No such file or directory     root@raspberrypi:/test# ls     main.cpp  main.cpp~  original.cpp  teatro.png  testedfb      (and on the next attempt it did run) Maybe it's the NFS (this folder is mounted) that is too slow to update? (thanks @derobert for asking about the filesystem) - this would answer this second case, not the first one, as I cannot see the executable, but still I can execute it... (and looks like the process is not running too)


title: I can not log into Ubuntu 12.04

text: by ignorance and error I renamed the user_name of the directory /home/, called frank_account (home/frank_account) to sixven(`/home/sixven`) (using gksudo nautilus). Restarting Ubuntu, I get 3 users: frank_account, sixven and guest. However, I can not access to any account with password, only the guest_account and is very limited. entering by tty (`Ctrl`+`Alt`+`F1`), I can log in with the user and pass sixven but I can not do `sudo` as it tells me sixven not in sudoers. And will not let me edit the etc/sudoers file. How I can fix this problem?


title: Sending mail to an external server?

text: I'm currently experimenting with working with Outlook.com for an email server, and have MX records set up to point there and the like. How can I configure systems like postfix to use external servers for mail? When I try to use functions like PHP's `mail()` for example, the server logs return this line, obviously because `user` isn't a user on my system, but rather is on an external mail server.               ABBAB100B92: to=<user@example.com>, relay=local, delay=0.06, delays=0.04/0.01/0/0.01, dsn=5.1.1, status=bounced (unknown user: "user")      Might it be easier to run a mail server right off of the VPS I'm hosting my website on, so that everything stays local? Or is that not a very good idea? System is an Ubuntu 12.04.3 LTS


title: On burning new iso image onto CD (rw type), still the CD reflects the old content!

text: I had got "Windows repair disc" iso burnt on my CD (of RW type but not sure weather its CD +RW or CD -RW). As its `RW`, it means the CD can be written multiple times. So, today I want to burn it with an iso file on my hard disk which contains photos & a video. So, I ran:               sudo wodim test.iso      It had output that _these many_ data written on disk, _this_ was the burning rate, etc. But when I view the contents of the CD by mounting it, I see only the previous data of the "Windows repair disc". No photo or video is there. What may be the reason & what happened actually? > EDIT#1 As per slm's answer, I tried but didn't work. Please see below.               ravbholua@ravbholua-Aspire-5315:~$ wodim -VV dev=/dev/cdrw blank=all >a2.lst 2>a2error.lst      The content of a2error.lst (output shown below is pruned):               wodim: Operation not permitted. Warning: Cannot raise RLIMIT_MEMLOCK limits.          Executing 'test unit ready' command on Bus 0 Target 0, Lun 0 timeout 40s     CDB:  00 00 00 00 00 00     cmd finished after 0.000s timeout 40s     .......     ........     .......... (removed to bring the character size of this Q in limit)     ............     Executing 'blank unit' command on Bus 0 Target 0, Lun 0 timeout 9600s     CDB:  A1 00 00 00 00 00 00 00 00 00 00 00     Errno: 5 (Input/output error), blank unit scsi sendcmd: no error     CDB:  A1 00 00 00 00 00 00 00 00 00 00 00     status: 0x2 (CHECK CONDITION)     Sense Bytes: 70 00 05 00 00 00 00 0E 00 00 00 00 30 05 00 00     Sense Key: 0x5 Illegal Request, Segment 0     Sense Code: 0x30 Qual 0x05 (cannot write medium - incompatible format) Fru 0x0     Sense flags: Blk 0 (not valid)      cmd finished after 0.001s timeout 9600s     wodim: Cannot blank disk, aborting.          Executing 'flush cache' command on Bus 0 Target 0, Lun 0 timeout 120s     CDB:  35 00 00 00 00 00 00 00 00 00     cmd finished after 0.000s timeout 120s          Executing 'test unit ready' command on Bus 0 Target 0, Lun 0 timeout 40s     CDB:  00 00 00 00 00 00     cmd finished after 0.000s timeout 40s     Mode Parameters (un-converted) 00 00 00 08 00 00 00 00 00 00 08 00     Mode Parameters 00 00 00 00 00 00 00 08 00 00 00 00 00 00 08 00          Executing 'mode select g1' command on Bus 0 Target 0, Lun 0 timeout 40s     CDB:  55 10 00 00 00 00 00 00 10 00     Sending 16 (0x10) bytes of data.     Write Data:  00 00 00 00 00 00 00 08 00 00 00 00 00 00 08 00     cmd finished after 0.000s timeout 40s          Executing 'prevent/allow medium removal' command on Bus 0 Target 0, Lun 0 timeout 40s     CDB:  1E 00 00 00 00 00     cmd finished after 0.000s timeout 40s      Please note the line in the above error list "wodim: Cannot blank disk, aborting.". I tried the below also but didn't work:               wodim blank=fast      Below is the last 3 lines of the output:               wodim: Cannot blank disk, aborting.     wodim: Some drives do not support all blank types.     wodim: Try again with wodim blank=all.      > EDIT#2 As per the comment of slm, please see the output of the command below. This also didn't work.               ravbholua@ravbholua-Aspire-5315:~$ cdrecord blank=fast dev=1,0,0     wodim: Operation not permitted. Warning: Cannot raise RLIMIT_MEMLOCK limits.     WARNING: the deprecated pseudo SCSI syntax found as device specification.     Support for that may cease in the future versions of wodim. For now,     the device will be mapped to a block device file where possible.     Run "wodim --devices" for details.     wodim: No such file or directory.      Cannot open SCSI driver!     For possible targets try 'wodim --devices' or 'wodim -scanbus'.     For possible transport specifiers try 'wodim dev=help'.     For IDE/ATAPI devices configuration, see the file README.ATAPI.setup from     the wodim documentation.      When I run 'wodim --devices' or 'wodim -scanbus'; it outputs "no such file or directory; Cannot open SCSI driver!" > EDIT#3 As per the comment, I'm adding below the command & its output.               $ wodim -prcap >s1 2>s2     $ cat s1          Device type    : Removable CD-ROM     Version        : 5     Response Format: 2     Capabilities   :      Vendor_info    : 'PIONEER '     Identification : 'DVD-RW DVRKD08RS'     Revision       : '1.02'     Device seems to be: Generic mmc2 DVD-R/DVD-RW.          Drive capabilities, per MMC-3 page 2A:            Does read CD-R media       Does write CD-R media       Does read CD-RW media       Does write CD-RW media       Does read DVD-ROM media       Does read DVD-R media       Does write DVD-R media       Does read DVD-RAM media       Does write DVD-RAM media       Does support test writing            Does read Mode 2 Form 1 blocks       Does read Mode 2 Form 2 blocks       Does read digital audio blocks       Does restart non-streamed digital audio reads accurately       Does support Buffer-Underrun-Free recording       Does read multi-session CDs       Does read fixed-packet CD media using Method 2       Does not read CD bar code       Does not read R-W subcode information       Does read raw P-W subcode data from lead in       Does return CD media catalog number       Does return CD ISRC information       Does not support C2 error pointers       Does not deliver composite A/V data            Does play audio CDs       Number of volume control levels: 256       Does support individual volume control setting for each channel       Does support independent mute setting for each channel       Does not support digital output on port 1       Does not support digital output on port 2            Loading mechanism type: tray       Does support ejection of CD via START/STOP command       Does not lock media on power up via prevent jumper       Does allow media to be locked in the drive via PREVENT/ALLOW command       Is not currently in a media-locked state       Does not support changing side of disk       Does not have load-empty-slot-in-changer feature       Does not support Individual Disk Present feature            Maximum read  speed:  4233 kB/s (CD  24x, DVD  3x)       Current read  speed:  4233 kB/s (CD  24x, DVD  3x)       Maximum write speed:  4233 kB/s (CD  24x, DVD  3x)       Current write speed:  4233 kB/s (CD  24x, DVD  3x)       Rotational control selected: CLV/PCAV       Buffer size in KB: 2000       Copy management revision supported: 1       Number of supported write speeds: 5       Write speed # 0:  4233 kB/s CLV/PCAV (CD  24x, DVD  3x)       Write speed # 1:  3528 kB/s CLV/PCAV (CD  20x, DVD  2x)       Write speed # 2:  2822 kB/s CLV/PCAV (CD  16x, DVD  2x)       Write speed # 3:  1764 kB/s CLV/PCAV (CD  10x, DVD  1x)       Write speed # 4:   705 kB/s CLV/PCAV (CD   4x, DVD  0x)          Supported CD-RW media types according to MMC-4 feature 0x37:       Does write multi speed       CD-RW media       Does write high  speed       CD-RW media       Does write ultra high speed  CD-RW media       Does write ultra high speed+ CD-RW media          $ cat s2     wodim: Operation not permitted. Warning: Cannot raise RLIMIT_MEMLOCK limits.     Device was not specified. Trying to find an appropriate drive...     Detected CD-R drive: /dev/cdrw     Using /dev/cdrom of unknown capabilities     ravbholua@ravbholua-Aspire-5315:~$


title: OpenBSD and limiting login to local only like in FreeBSD's login.access(5)

text: I am using OpenBSD as my desktop. I don't want to login to my machine remotely, and I don't want anyone else to login remotely. In FreeBSD there is a file called login.access(5) that can be used to prevent remote logins, and limit login to local only. How can I accomplish the same thing in OpenBSD? I've read the man pages for login(1) and login.conf(5) and it's possible I'm missing something, but I don't see the answer there.


title: How can I copy/paste data to and from the Windows clipboard to an OpenSuse clipboard using VNC?

text: I am connecting to a remote OpenSuse computer using VNC from Windows. On other Linuces that I've used over VNC, I can copy text between the remote machine and the local Windows machine using the clipboard. In this case, I can seem to connect the local clipboard to the remote. The VNC server is whatever is set by default on OpenSuse. I don't know which it is. How can I fix copy/paste over VNC?


title: Unable to mount /home/ partition after reinstalling grub after reinstalling windows 7

text: I've reinstall windows 7 on it's asignated partition and, as usually, it override the MBR with it's own stuff and, thus, it was not possible to boot to my ubuntu 12.04 partition. I followed the step int this tutorial and everything went good. When booting on my ubuntu 12.04 system after that, I got an error message telling me that there was an error while mounting /home/. I selected to ignore the error and the boot continue successfully until login screen. When trying to log into my account, nothing happened after I entered my password. I opened a terminal and see a dummy /home/ with nothing inside. Here is what my disk looks like:               # fdisk -l     255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors     Units = sectors of 1 * 512 = 512 bytes     Sector size (logical/physical) : 512 bytes / 512 bytes     I/O size (minimum/optimal) : 512 bytes / 512 bytes     Disk identifier: 0x000913aa             Device Boot      Start         End      Blocks  Id  System     /dev/sda1    *         63   275803919  137901928+  7   HPFS/NTFS/exFat     /dev/sda2       275803290   317797829   20996955   83  Linux     /dev/sda3       317797954  1953520064  817861055+   5  Extended     /dev/sda5      1936716075  1953520064    8401995   82  Linux swap / Solaris          # blkid     /dev/sda1: UUID="4CD32DDF72FB084D" TYPE="ntfs"     /dev/sda2: UUID="dae0bc16-7133-4706-8a40-fdd84e281651" TYPE="ext4"     /dev/sda5: UUID="2daec68e-08b6-452f-8f75-2f59ebf61ba5" TYPE="swap"      Here is what happen when I try to mount it myself               # mount /dev/sda3 /mnt     [ 2680.555298] EXT3-fs (sda3): error: unable to read superblock     [ 2680.564065] EXT4-fs (sda3): unable to read superblock     mout: you must specify the filesystem type          # mount -t ext4 /dev/sda3 /mnt     [ 2863.195328] EXT4-fs (sda3): unable to read superblock     mount: wrong fs type, bad option, bad superblock on /dev/sda3,            missing codepage or helper program, or other error            In some cases useful info is found in syslog - try            dmesg | tail or so          # dmesg | tail     ... other stuff related to my sound card ...     [   21.538194] init: mountall main process (325) terminated with status 2     [ 2680.555298] EXT3-fs (sda3): error: unable to read superblock     [ 2680.564065] EXT4-fs (sda3): unable to read superblock     [ 2863.195328] EXT4-fs (sda3): unable to read superblock      Then, I read somewhere to try               # mke2fs -n /dev/sda3     mke2fs 1.42 (29-Nov-2011)     mk2fs: inode_size (128) * inodes_count (0) too big for a            fylesystem with 0 blocks, specify higher inode_ratio (-i)            or lower inode count (-N).          # fsck.ext4 /dev/sda3     e2fsck 1.42 (29-Nov-2011)     fsck.ext4: Attempt to read block from filesystem resulted in short read                while trying to open /dev/sda3     Could this be a zero-length partition?      Basically, it seems that my partion /dev/sda3 is assumed to have a zero- length. How can I solve this issue?


title: ssh from linux into mac - permission denied

text: I'm running a Oracle Linux VM on a Windows 7 host and I'm trying to ssh into my MacBook. I've already created the private/pub keys in my Mac. I have copied the id_rsa.pub contents into the authorized_keys file in .ssh folder. I have changed the authorized_keys permissions to 600 for the current user. Permissions for ~ and ~/.ssh have been changed to 700. I have also copied the id_rsa.pub contents from the Oracle Linux VM to the authorized_keys file using the: ssh-copy-id command. In my Mac I also have an Oracle Linux VM into which I can ssh perfectly fine from the Oracle Linux VM in the Windows machine. However, I cannot ssh into my Mac using just: ssh macdomain I have to use: ssh username@macdomain to ssh successfully. Without the username it will ask me for a password and eventually result in:               Permission denied (publickey, keyboard-interactive)      This is my sshd_config file:               #   $OpenBSD: sshd_config,v 1.81 2009/10/08 14:03:41 markus Exp $          # This is the sshd server system-wide configuration file.  See     # sshd_config(5) for more information.          # This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin          # The strategy used for options in the default sshd_config shipped with     # OpenSSH is to specify options with their default value where     # possible, but leave them commented.  Uncommented options change a     # default value.          #Port 22     #AddressFamily any     #ListenAddress 0.0.0.0     #ListenAddress ::          # The default requires explicit activation of protocol 1     #Protocol 2          # HostKey for protocol version 1     #HostKey /etc/ssh/ssh_host_key     # HostKeys for protocol version 2     #HostKey /etc/ssh/ssh_host_rsa_key     #HostKey /etc/ssh/ssh_host_dsa_key          # Lifetime and size of ephemeral version 1 server key     #KeyRegenerationInterval 1h     #ServerKeyBits 1024          # Logging     # obsoletes QuietMode and FascistLogging     SyslogFacility AUTHPRIV     #LogLevel INFO          # Authentication:          #LoginGraceTime 2m     #PermitRootLogin yes     #StrictModes no     #MaxAuthTries 6     #MaxSessions 10          #RSAAuthentication yes     PubkeyAuthentication yes     AuthorizedKeysFile  .ssh/authorized_keys     AllowUsers username     # For this to work you will also need host keys in /etc/ssh/ssh_known_hosts     #RhostsRSAAuthentication no     # similar for protocol version 2     #HostbasedAuthentication no     # Change to yes if you don't trust ~/.ssh/known_hosts for     # RhostsRSAAuthentication and HostbasedAuthentication     #IgnoreUserKnownHosts no     # Don't read the user's ~/.rhosts and ~/.shosts files     #IgnoreRhosts yes          # To disable tunneled clear text passwords both PasswordAuthentication and     # ChallengeResponseAuthentication must be set to "no".     #PasswordAuthentication no     #PermitEmptyPasswords no          # Change to no to disable s/key passwords     #ChallengeResponseAuthentication yes          # Kerberos options     #KerberosAuthentication no     #KerberosOrLocalPasswd yes     #KerberosTicketCleanup yes          # GSSAPI options     #GSSAPIAuthentication no     #GSSAPICleanupCredentials yes     #GSSAPIStrictAcceptorCheck yes     #GSSAPIKeyExchange no          # 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'.     # Also, PAM will deny null passwords by default.  If you need to allow     # null passwords, add the " nullok" option to the end of the     # securityserver.so line in /etc/pam.d/sshd.     #UsePAM yes          #AllowAgentForwarding yes     #AllowTcpForwarding yes     #GatewayPorts no     #X11Forwarding no     #X11DisplayOffset 10     #X11UseLocalhost yes     #PrintMotd yes     #PrintLastLog yes     #TCPKeepAlive yes     #UseLogin no     #UsePrivilegeSeparation yes     #PermitUserEnvironment no     #Compression delayed     #ClientAliveInterval 0     #ClientAliveCountMax 3     #UseDNS yes     #PidFile /var/run/sshd.pid     #MaxStartups 10     #PermitTunnel no     #ChrootDirectory none          # pass locale information     AcceptEnv LANG LC_*          # no default banner path     #Banner none          # override default of no subsystems     Subsystem   sftp    /usr/libexec/sftp-server          # Example of overriding settings on a per-user basis     #Match User anoncvs     #   X11Forwarding no     #   AllowTcpForwarding no     #   ForceCommand cvs server          # XAuthLocation added by XQuartz (http://xquartz.macosforge.org)     XAuthLocation /opt/X11/bin/xauth      I've googled and had a look at almost every relevant topic but to no avail. Your help is very much appreciated! Thanks in advance!


title: Libreoffice Writer, how to get read-only a document part

text: I am writing a document with Libreoffice Writer. I would like to set a part of it as read-only, while the rest of the document as non-read-only. Is it possible to do it? How?


title: Some of the users login screen do not display colors

text: In my lab I have Redhat Enterprise Linux 5 server. Users log in through telnet for C programming Some of the users' login screens display colors, while some other users login screen do not displays colors. How to solve this problem?


title: Building Qt: 'make clean' causes everything to get recompiled?

text: (This applies to `Qt` versions >= 4.7.3.) I made an attempt to build `Qt` with custom parameters on my Debian box and it actually took AGES to compile (IIRC more than 6 hours on a single-core CPU). That's why I wanted to make sure I won't make any stupid mistakes in the process. However, I chose to do a `make clean` to get the `*.o` files and other stuff cleaned up after successful linking. It seemed a bad idea! For I did a `make install` just after that, and you won't believe it, the `make clean` attempt caused _everything_ to get recompiled after the cleanup process! Though up to now, I've been thinking that `make clean` does allow a neat installation even with all object files and related stuff removed. Obviously, with `Qt`, things are different. In the official documentation for `Qt 4.7` (cf. http://qt- project.org/doc/qt-4.7/install-x11.html), they did not even mention an _optional_ `make clean` in the sequence of commands. As I know now, for a good reason. All the same, I can't call this "complying with standards" as I've already compiled hundreds of open-source apps, and NEVER did `make clean` trigger any recompilation process nor remove anything that should be kept (unless there was a bug in there)


title: Removing all spaces, tabs, newlines, etc from a variable?

text: This is the error I am getting and it's failing because of a variable whose value is supposed to be 2 (I am getting this using a `select * from tabel`). I am getting spaces in that variable.               + 0 !=               2     ./setjobs[19]: 0:  not found.      How do I remove all those spaces or a newline from that variable? Can `tr`, `sed`, or anything help? This what I am doing:               set_jobs_count=$(echo  "set heading off;           select count(*) from oppar_db           where ( oppar_db_job_name, oppar_db_job_rec ) in ($var) ;" | \       sqlplus -s ${OP_ORA_USER}/${OP_ORA_PASS}@$OPERATIONAL_DB_NAME)      * * * This works as suggested:               | sed 's/[[:space:]]//g'      But I still obtain a value like :                 set_jobs_count=       2


title: GPG key pair generation: What do the plus and minus signs mean?

text: I just generated a new GPG key pair and gpg displays some random plus, minus, greater than, less than and circumflex signs. I was always wondering what they mean. Can you explain it to me?               iblue@nerdpol:~$ gpg --gen-key     [... snip ...]          We need to generate a lot of random bytes. It is a good idea to perform     some other action (type on the keyboard, move the mouse, utilize the     disks) during the prime generation; this gives the random number     generator a better chance to gain enough entropy.     .........+++............<+++++>.+++++...............>..+++++..<     ...+++++............>+++++<.+++++.....................<+++++..>     .................................................+++++^^^^


title: What is a good, small distribution for building an appliance?

text: I am writing a server application (based on Ruby, but not Rails) which I would eventually like to ship as an appliance. What is a good distro to use? My main criterion is that it should be small, so that the appliance has a small download size. I am open to either Linux or BSD. I guess it should preferably be a server-based distro (i.e. no GUI out of the box) to save space. What would you use, and why?


title: AIX multihomed multicast

text: On my AIX machine if I run `netstat -ia` I get:               Name  Mtu   Network     Address           Ipkts Ierrs    Opkts Oerrs  Coll     en0   1500  link#2      1e.18.1.1e.78.2    385229     0  1091655     0     0                             01:00:5e:7f:ff:fd                             01:00:5e:00:00:01     en0   1500  10.22.8     xxxxxxx1           385229     0  1091655     0     0                             239.255.255.253                                 224.0.0.1               en1   1500  link#3      1e.18.1.1e.78.3   1045023     0   420863     0     0                             01:00:5e:00:00:01     en1   1500  10.21.8     xxxxxxx2           1045023     0   420863     0     0                             224.0.0.1               en2   1500  link#4      1e.18.1.1e.78.4     59125     0    58326     0     0                             01:00:5e:00:00:01     en2   1500  10.21.16    xxxxxxx3            59125     0    58326     0     0                             224.0.0.1               lo0   16896 link#1                         778096     0   586450     0     0     lo0   16896 127         loopback           778096     0   586450     0     0                             239.192.0.0                                     224.0.0.1               lo0   16896 ::1%1                          778096     0   586450     0     0                             ff01::1                                       ff02::1:ff00:1        I'm testing a cluster application using multicast for communicating with other peers, anyway it seems to work only if I use as interface address the `lo0`. I cannot understand why....I'm using `239.192.0.0`for multicast. Can anyone give me some explanation?


title: Is there any way to let it snow on my linux mint destkop?

text: I want snow fall on my desktop really badly. Tried Xsnow (with Mate/Marco, Mate/Compiz and KDE/Kwin) but doesn't work.   Snow plugin for Compiz doesn't work anymore either.   Snow feature of KDE was removed. Is there any other way to get the snow?


title: ls to show only directory/filename and size

text: First of all, this is not a duplicate of this: Linux ls to show only filename date and size Because I want to print actual directory name additionally. I was always using this command:               ls -l | awk '{print $5, $9}'      to get the each file size and name. But now, I need to print the file directory additionally. Is that possible?


title: Why can't I copy my DVD with dd?

text: I tried dd, dd_rescue and ddrescue, all failed. I thought these tools bypass the filesystem and make a bitwise copy. dd is fooled, it finishes but just produces a small file and states it's finished. dd_rescuse and ddrescue are complaining about read errors and are intolerably slow. These tools can copy only a few MB in 10 minutes. **Why is this happening, why are these tools failing?** * * * AnyDVD makes the disc copyable in a second on a Win7 host. It says that the UDF filesystem is patched, curiously, it also says that there are no bad sectors. The whole disc can be copied in 10 minutes. * * * **UPDATE:** As for the solution, see my similar question on superuser.


title: Create SSL certificate - Silent

text: I want to create a SSL certificate without get prompt for the data. The normal way to create the certificate would be:               openssl req -x509 -nodes -days 7300 -newkey rsa:2048 -keyout /etc/ssl/private/pure-ftpd.pem -out /etc/ssl/private/pure-ftpd.pem       The way i tried to do it silent:                   openssl genrsa -out server.key 2048         touch openssl.cnf         cat >> openssl.cnf <<EOF     [ req ]     prompt = no     distinguished_name = req_distinguished_name          [ req_distinguished_name ]     C = GB     ST = Test State     L = Test Locality     O = Org Name     OU = Org Unit Name     CN = Common Name     emailAddress = test@email.com     EOF          openssl req -x509 -config openssl.cnf -nodes -days 7300 -signkey server.key -out /etc/ssl/private/pure-ftpd.pem       Unfortunately it does not work. Anything is wrong with the arguments in the last line.


title: chmod 600 fails silently

text: Here is what happens:               $ chmod 600 foobar.txt     $ ls -l     total 1     -rwx------ 0 sampablokuper sampablokuper 13 Feb 19 21:00 foobar.txt      Why is the last line not reading as follows?               -rw------- 0 sampablokuper sampablokuper 13 Feb 19 21:00 foobar.txt      N.B. This is occurring on a server of which I am not the sysadmin. The server is running Linux kernel "3.8.0-33-generic" under the following OS:               $ cat /etc/*-release     DISTRIB_ID=Ubuntu     DISTRIB_RELEASE=12.04     DISTRIB_CODENAME=precise     DISTRIB_DESCRIPTION="Ubuntu 12.04.3 LTS"     MCS Linux 2013/2014 (x86_64)     VERSION = 2013     NAME="Ubuntu"     VERSION="12.04.3 LTS, Precise Pangolin"     ID=ubuntu     ID_LIKE=debian     PRETTY_NAME="Ubuntu precise (12.04.3 LTS)"     VERSION_ID="12.04"


title: What is the state of open-source Poulsbo/GMA 500 drivers?

text: Currently, a causal browse through a number of Linux distros show spotty Poulsbo drivers at best. Has any headway been made recently towards either convincing Intel to coax the driver source out of PowerVR or an acceptable (I can install it without low frame rates, involved steps and without fear that a kernel update will break it) OSS driver solution? I would love to put Linux on my little Acer netbook but I rely on it too much to install a nerfed driver.


title: How to create a dupe of a KVM/libvirt/virt-manager VM?

text: I'm a bit lost with virt-manager / libvirt / KVM. I've got a working KVM VM (Windows XP) which works nicely. The VM is backed by a 4GB file or so (a _.img_ ). Now I want to do something very simple: I want to duplicate my VM. I thought _"OK, no problem, let's copy the 4GB file and copy the XML"_ file. But then the libvirt FAQ states in all uppercase: _"you SHOULD NOT CARE WHERE THE XML IS STORED"_ http://wiki.libvirt.org/page/FAQ OK fine, I shouldn't care. But then how do I duplicate my VM? I want to create a new VM that is a copy of that VM.


title: Sorting by date

text: Original:               Jan 23 2011 10:42 SOMETHING 2007.12.20.avi     Jun 26 2009 SOMETHING 2009.06.25.avi     Feb 12 2010 SOMETHING 2010.02.11.avi     Jan 29 2011 09:17 SOMETHING 2011.01.27.avi     Feb 11 2011 20:06 SOMETHING 2011.02.10.avi     Feb 27 2011 23:05 SOMETHING 2011.02.24.avi      Output:               Feb 27 2011 23:05 SOMETHING 2011.02.24.avi     Feb 11 2011 20:06 SOMETHING 2011.02.10.avi     Jan 29 2011 09:17 SOMETHING 2011.01.27.avi     Jan 23 2011 10:42 SOMETHING 2007.12.20.avi     Feb 12 2010 SOMETHING 2010.02.11.avi     Jun 26 2009 SOMETHING 2009.06.25.avi      How could I get the output where the newest file is at the top?


title: Understand error codes in Linux

text: I am working on Linux (Kernel Version 2.6.32.28) laptop.   After I inserted/did file io/removed a SD combo card, I got following errors:               mmcblk0: error -123 sending status command       mmcblk0: error -123 sending read/write command, response 0x0, card status 0x0       mmcblk0: error -123 sending requesting status       Now, I would like to understand what these errors mean. As I saw few standard error codes are located in arch/powerpc/boot/stdio.h and other scattered at various other places.. Is there any systematic way in Linux to track (& understand) the error codes (in the source) ?


title: How can I redirect `time` output and command output to the same pipe?

text: Suppose I have a binary called `foo`. If I want to redirect the output of `foo` to some other process `bar`, I could write `./foo | bar`. On the other hand, if I wanted to `time` foo, and redirect the output of `time` I could write, `time (./foo) | bar`. My question is, how can I stick the output of `time` to the end of the output of `foo` and pipe it through the _same pipe_? The following solution is **not** what I am looking for, because it starts two separate instances of the process `bar`, while I want a single shared pipe, to a single instance of `bar`.               time (./foo | bar)  | bar      For anyone who is curious, the reason for not wanting to start two instances of `bar` is because `bar` can be a network client and I want the timing information to be sent to the server as part of the same `http POST` message as the process output.


title: Example of usage of Quota netlink daemon

text: I've found that exists the package quota-nld a "Daemon that listens on netlink socket and processes received quota warnings". Please do you now a real-life app that uses it? Is it used for example in some desktop environment to show pop-ups warning to the user when is near to surpass the quota? Thanks in advance!


title: Which is the most precise command to get processes and system information?

text: I'm trying to evaluate performances of some active processes of mine on linux. Searching the internet I found that `ps` and `top` are the only command available for that. More precisely here, it says that `top` is the right command. I need to use `top -b -n 1` beacause I need to parse the output and "grep" only some information from that. However, the `top -b -n 1` output results to be very different with respect to the classic top output. This happens, I think, because the second one compute the average percentage of cpu and ram usage, whereas the first one makes a "snapshot" of the system at the time it has been launched. Am I right? is the `top -b -n 1` output a valid response or a fake one? May I use it to compute some statistics or not? is `top -b -n 1` a valuable command to get information about system and processes? are there any other commands or whatever else to evaluate performances on linux?


title: Can't access Windows drive: “Windows is hibernated, refused to mount”

text: I'm using Fedora 20 along with Windows 8. However, I'm unable to access the contents of the drive in which Windows 8 is installed. It shows:               Error mounting /dev/sda2/     The NTFS partition is in unsafe state     Windows is hibernated, refused to mount      even though I had shutdown the Windows properly.


title: Trying to understand LUKS encryption

text: I decided to encrypt my root partition with LUKS+LVM. My ThinkPad setup:   * Samsung 830 128GB SSD    * 750GB HDD   * Core 2 Duo 2,5 GHz P9500   * 8GB RAM But the more I read, the less I understand about those two following subjects: ### 1a. The cipher I was going to use SHA1 instead of 2/512 (as some suggest), because of that quote from `cryptsetup` FAQ: > **5.20 LUKS is broken! It uses SHA-1!** > > No, it is not. SHA-1 is (academically) broken for finding collisions, but > not for using it in a key-derivation function. And that collision > vulnerability is for non-iterated use only. And you need the hash-value in > verbatim. > > This basically means that if you already have a slot-key, and you have set > the PBKDF2 iteration count to 1 (it is > 10'000 normally), you could (maybe) > derive a different passphrase that gives you the the same slot-key. But if > you have the slot-key, you can already unlock the key-slot and get the > master key, breaking everything. So basically, this SHA-1 vulnerability > allows you to open a LUKS container with high effort when you already have > it open. > > The real problem here is people that do not understand crypto and claim > things are broken just because some mechanism is used that has been broken > for a specific different use. The way the mechanism is used matters very > much. A hash that is broken for one use can be completely secure for other > uses and here it is. Which I read as "there is no point of using anything other than SHA-1". But then some people tell me, that it's not exactly like that. So I no longer know what to think. ### 1b. Also, I could not find any information whether the cipher has any influence on disk read/write/seek performance once the disk is unlocked and system logged into. So does the complexity of the cipher affect only the "performance" on password entering stage, or also during normal use of the system? ### 2. The algorithm I have been reading on this since couple of days, but the more I read, the more confused I get. Everything I read says that AES is the fastest, and Serpent is the slowest. But not according to my laptop:               $ cryptsetup benchmark     Tests are approximate using memory only (no storage IO).     PBKDF2-sha1       344926 iterations per second     PBKDF2-sha256     198593 iterations per second     PBKDF2-sha512     129007 iterations per second     PBKDF2-ripemd160  271933 iterations per second     PBKDF2-whirlpool  134295 iterations per second     #  Algorithm | Key |  Encryption |  Decryption          aes-cbc   128b   149.8 MiB/s   147.9 MiB/s      serpent-cbc   128b    51.0 MiB/s   196.4 MiB/s      twofish-cbc   128b   127.6 MiB/s   152.5 MiB/s          aes-cbc   256b   114.3 MiB/s   113.8 MiB/s      serpent-cbc   256b    51.2 MiB/s   198.9 MiB/s      twofish-cbc   256b   129.8 MiB/s   167.5 MiB/s          aes-xts   256b   153.3 MiB/s   150.6 MiB/s      serpent-xts   256b   176.4 MiB/s   184.1 MiB/s      twofish-xts   256b   160.8 MiB/s   159.8 MiB/s          aes-xts   512b   115.4 MiB/s   112.1 MiB/s      serpent-xts   512b   178.6 MiB/s   184.2 MiB/s      twofish-xts   512b   160.7 MiB/s   158.9 MiB/s      So it appears that Serpent's not only the fastest, but on top of that it is the fastest with the most complex key. Shouldn't it be the other way around? Am I reading it wrong, or something?


title: How to change the default editor for a file type in Mac OSx?

text: The default editor for java files on my Mac seems to have been set to Xcode, but I want to change it to be the basic TextEditor. I've looked in preferences for the association, but it's not there. How do I change the default editor?


title: How to use USB flash drive as part of filesystem for Chromebook running Linux?

text: I want to install Linux on a Chromebook. However, the Chromebook which I'am thinking of purchasing comes with only a 16 GB SSD. This seems to be very little hard drive space to work with. Searching the Internet, I've found two ways to expand the hard drive storage space:   1. Opening the hard drive, removing the existing hard drive and replacing it with a larger hard drive   2. Attaching a USB flash drive (such as a 64 GB drive) Method #2 above seems simpler and is what I want to try. My **question** is how can I make the USB flash drive part of the filesystem, so that if I install additional software packages (e.g. eclipse, LaTeX), these packages are installed to the flash drive rather than to the existing hard drive which is very small?


title: How to know what files got deleted?

text: I'm working on Ubuntu 13.04. yesterday from a Windows 7 partition, I accidentally deleted many files. I deleted by pressing `shift-del`. Is there any way to know the name of the files that got deleted? If I'm able to get the names, I will make out how important the files are? If they are important I will try to recover or else I won't try. With no idea on whether log files can reveal that, I checked `syslog` file generated for that day but I couldn't find any information regarding that.


title: Qlogic HBA issue

text: We have running server with attached SAN storage and everything was fine. However last week we moved our server blade to a new chassis. Everything is same, we just add new WWN in Brocade SAN switch to allow access of storage, but my server isn't able to see the SAN disk in `fdisk` output. I'm seeing the following output just wondering what is wrong?               [root@server1 ~]# dmesg | grep qla     qla2xxx 0000:05:00.0: Found an ISP2532, irq 82, iobase 0xffffc20010082000     qla2xxx 0000:05:00.0: Configuring PCI space...     qla2xxx 0000:05:00.0: Configure NVRAM parameters...     qla2xxx 0000:05:00.0: Verifying loaded RISC code...     qla2xxx 0000:05:00.0: Allocated (64 KB) for EFT...     qla2xxx 0000:05:00.0: Allocated (1414 KB) for firmware dump...     qla2xxx 0000:05:00.0: Unable to read FCP priority data.     scsi1 : qla2xxx     qla2xxx 0000:05:00.0:     qla2xxx 0000:05:00.1: Found an ISP2532, irq 106, iobase 0xffffc20010202000     qla2xxx 0000:05:00.1: Configuring PCI space...     qla2xxx 0000:05:00.1: Configure NVRAM parameters...     qla2xxx 0000:05:00.1: Verifying loaded RISC code...     qla2xxx 0000:05:00.1: Allocated (64 KB) for EFT...     qla2xxx 0000:05:00.1: Allocated (1414 KB) for firmware dump...     qla2xxx 0000:05:00.1: Unable to read FCP priority data.     scsi2 : qla2xxx     qla2xxx 0000:05:00.1:     qla2xxx 0000:05:00.0: LIP reset occured (f8f7).     qla2xxx 0000:05:00.1: LIP reset occured (f7f7).     qla2xxx 0000:05:00.0: LIP occured (f700).     qla2xxx 0000:05:00.0: LIP reset occured (f7f7).     qla2xxx 0000:05:00.0: LOOP UP detected (4 Gbps).     qla2xxx 0000:05:00.1: LOOP UP detected (4 Gbps).      Two LOOPs? Is that OK?                qla2xxx 0000:05:00.0: LOOP UP detected (4 Gbps).      qla2xxx 0000:05:00.1: LOOP UP detected (4 Gbps).      ### EDIT #1: I've added the following WWN in Brocade SAN switch for zoning:               [root@server1 ~]# systool -c fc_host -v | grep port_name         port_name           = "0x2100001b329df4a9"         port_name           = "0x2101001b32bdf4a9"      What is `node_name`?               [root@server1 ~]# systool -c fc_host -v | grep -e port_name -e node_name         node_name           = "0x2000001b329df4a9"         port_name           = "0x2100001b329df4a9"         node_name           = "0x2001001b32bdf4a9"         port_name           = "0x2101001b32bdf4a9"


title: sed / awk / perl / etc: Move lines backward in file

text: Imagine a text file which contains random text and two unique markers               01 text text text     02 text text text     03 __DELETE_THIS_LINE_BEGIN__     04 text text text     05 text text text     06 text text text     07 text text text     08 __DELETE_THIS_LINE_END__     09 four     10 interesting     11 lines     12 follow     13 text text text     14 text text text     15 text text text     16 text text text     17 __DELETE_THIS_LINE_BEGIN__     18 text text text     19 text text text     20 text text text     21 text text text     22 __DELETE_THIS_LINE_END__     23 even     24 more     25 interesting     26 lines      I want a sed/awk/perl/etc expression that moves the four interesting lines after the END marker to the position of the **PREVIOUS** BEGIN marker and also deletes both markers. Which should result in:               01 text text text     02 text text text     09 four     10 interesting     11 lines     12 follow     04 text text text     05 text text text     06 text text text     07 text text text     13 text text text     14 text text text     15 text text text     16 text text text     23 even     24 more     25 interesting     26 lines     18 text text text     19 text text text     20 text text text     21 text text text      The two markers are always a pair and occur multiple times in the file. BEGIN marker always comes before END marker. It doesn't have to be a oneliner, I would also use perl or python scripts. I tried sed with:               sed -e '/__DELETE_THIS_LINE_END__/,+4 {H;d};/__DELETE_THIS_LINE_BEGIN__/ x' <source.txt> > <target.txt>      ...which did not work. The first **DELETE_THIS_LINE_BEGIN** marker was deleted (Nothing in Buffer for replacement) and the first **DELETE_THIS_LINE_END** marker was moved to the position of the second **DELETE_THIS_LINE_BEGIN** marker. Any ideas?


title: Why does a grep reboot the machine?

text: On a RHEL 6.5 Desktop, if I use:               sudo grep -r foo /*      my desktop reboots. **Q:** Why?? How to debug this? It's the third time my Desktop reboots because of this :D


title: How I Determine The latest OpenSSL patch is installed?

text: This post is about applying the latest patch for OpenSSL to protect our port 443 web traffic, not using ssh to log into these systems. I went and obtained the lastest OpenSSL tarball source patch `openssl-1.0.1g.tar.gz` from here for my Linux workstation running CentOS 6.5, and built the patch, including `./config; make; make test; make install # as root` This installed in `/usr/local/ssl`. I wanted to prove the patch out in a safe place, before applying it to our production systems. However, after running everything, I'm stumped. The `./config, make, make test, and make install` steps completed without errors. How do I check that the latest OpenSSL is installed? Here is the result of testing version from various answers:               openssl version -a     OpenSSL 1.0.1e-fips 11 Feb 2013     built on: Tue Apr  8 02:33:43 UTC 2014     platform: linux-elf


title: (nologin) root and id X re-spawning

text: Today I faced a strange issue on one of the test server. Server was set to Runlevel 5. But it didnt work and system changed to runlevel 3. It was showing "init: Id "x" respawning too fast: disabled for 5 minutes" and also on Text Console it was showing (nologin) root : Even though no one changed the password and i insert the correct password still it was not accepting and password and jumped back to prompt. So then i reboot the system to Single user mode but it was just jumping to level 3 and kept asking for password. So I had to reinstall the system. But what might the cause these errors.               1) init: Id "x" respawning too fast: disabled for 5 minutes --- I believe I can solve it     2) (nologin) root --- This is tricky one


title: How to install and configure USB to serial hub (8 serial ports)?

text: I have bought a USB to serial hub (8 serial ports) but I don't know how I can install it on my Debian server. On the box, they wrote 'Linux compatible'. What do I need to do to can use it?


title: High Idle CPU / Low CPU Load average

text: After removing APC (alternative php cache), I noticed that there are less pagination access and less dirty pages but in the same time:   * High idle CPU   * Very low CPU load (relatively to the time before removing APC) If I am not mistaken CPU Idle can be a bad thing. So I checked the "interruptible sleeping process/threads".               while true; do date; ps auxf | awk '{if($8=="D") print $0;}'; sleep 1; done      I noticed that there is no waiting processes. Do you think that this idle can be caused by something else? Removing APC may be the cause to more disk access, because there are no php opcodes(generated by APC) and saved to the memory.


title: /boot/messages in SuSE?

text: I'm reading a SUSE Linux tutorial for creating a **custom installation CD** from host's kernel. As first step it indicates to create a `iso/boot/grub` folder system and perform the files copying indicated below:               cp /boot/vmlinuz boot/     cp /boot/initrd boot/     cp /boot/message boot/     cp /usr/lib/grub/stage2_eltorito boot/grub     cp /boot/grub/menu.lst boot/grub      So, for **`stage2_eltorito`** , it must be copied from **`/usr/share/grub/x86_64-redhat`**. But what about **`/boot/message`**? I used `locate` but got not results. And, what is this needed for so far?


title: How to auto highlight comments in nano?

text: I was wondering how could I make lines commented with a `#` highlighted in a different colour in nano? I saw this question on askubuntu that shows how to syntax highlight for different languages. However this is overkill for just highlighting comments.


title: Install Fedora 20 via USB CD check failed

text: I am trying to run Fedora 20 (`Fedora-Live-Desktop-x86_64-20-1.iso`) from an USB stick on my laptop. Unfortunately I keep running into these warnings:               Warning: dracut: Fatal: CD check failed!     Warning: dracut: Refusing to continue     Warning: /dev/mapper/live-rw does not exist      Then it enters some kind of emergency mode and allows me to use the dracut command line. I have tried both UNetbootin and dd to create the bootable USB from my current Ubuntu 12.04.               sudo dd if=Fedora-Live-Desktop-x86_64-20-1.iso of=/dev/sdb bs=8M && sync      I used both 4M and 8M for the `bs` value. For 8M this results in:               10+1 records in     10+1 records out     87397591 bytes (87 MB) copied, 18.5976 s, 4.7 MB/s      Which seems far too low to me.


title: Find which ports a program access

text: I have a program that tries to connect to a server on start-up on a unknown port. I need to find out which port the program accesses to enable a ssh tunnel. I tried `netstat` but since the connection fails I don't find any useful information.


title: Poppler.h fatal error while installing Slider from git on Tanglu (Debian)

text: People! Trying to install little PDF presentation soft (https://github.com/TrilbyWhite/Slider). When trying to do "make" I get this:               slider.h:9:21: fatal error: poppler.h: No such file or directory      if I go to slider.h and change the `#include<poppler.h>` to `<#include </usr/include/poppler/glib/poppler.h>`, then I get:               /usr/include/poppler/glib/poppler.h:22:25: fatal error: glib-object.h: No such file or directory  #include <glib-object.h>      So maybe could someone help me with this. Is it just unsatisfied dependencies or what?


title: debian dead when copy over 1GB

text: I have a Debian Squeeze system with an AMD64 processor.   When I try copy over 1 GB, the computer dies (no reboot, completely down), and the logs don't contain anything useful. The temperature of the processor is ~42º.


title: Find a user's writable files and directories

text: How can I determine all files and folders that given user can write to? The user is `nobody`. Some script in bash or python, perhaps? I'm using Ubuntu 11.04


title: why new pid is smaller than the old ones?

text: Is there any chance the new process's pid is smaller than the existed ones ? I have a daemon process which will restart when be killed, I recorded the pids, and found that the pid first came smaller, and then go bigger. what's the possible reason ? =============================================================== sorry for asking & thanks for the answers. I think I have found the answer. /proc/sys/kernel/pid_max shows 32768(android os on a phone), in the longtime test, it must have exceeded this，and reallocated. Thanks again.


title: Is there a common launcher for DosBox and ScummVM games?

text: ScummVM comes with a launcher for starting games. After a game is installed, it displays the names in a window that can be run at full-screen and that can be controlled by the keyboard. Other games requiring DosBox, however, cannot be launched from this. Is there a common interface that can be setup to display and launch both ScummVM and DosBox games?


title: GNU stow linking all files instead of only binary

text: What must I do to have `stow` only linking the binaries (and maybe the man pages) correctly? I want to use GNU `stow` to manage local installs on my machine. However, `stow` does not simply symlinks the binary, but all files in the program folder. What I did so far:   * created an extended stow-ignore file   * use a subfolder `src/` where all files except the binary go and manually change the Makefile to create a `bin/` subfolder. Then later delete the linked `local/src/` folder I guess there must be a better way and I am using `stow` wrong. **Example** _Folder structure_               ~home/      |~local/        |+bin/     <-- binarys should go here        |+share/   <-- man page        |~stow/          |-.stowrc          |~dwm-6.0/            |-Makefile            |-dwm.c            |-dwm.h            |-dwm            |-config.mk            |-README          |~hub-1.11/            |~bin/              |-hub            |+etc/            |+feature/            |+githook/            |+lib/            |-Gemfile            |-Rakefile            |-hub.gemspec      From here I would go into the `stow/` folder type               stow dwm-6.0      Then stow links **all** files into the `local/` folder, instead of only the binary `dwm` into the `local/bin/` folder. I can now change the `Makefile` so it creates a `dwm-6.0/bin/` folder and moves the binary in there. Then `stow` at least will link `dwm` to `local/bin/`, but still all other files are linked to `local/` as well. The same goes for `hub`:               [9962]../stow:$stow hub-1.11.1     Loading defaults from .stowrc     stow dir is /home/myusername/local/stow     stow dir path relative to target /home/myusername/local is stow     Planning stow of package hub-1.11.1...     LINK: man => stow/hub-1.11.1/man     LINK: test => stow/hub-1.11.1/test     LINK: hub.gemspec => stow/hub-1.11.1/hub.gemspec     LINK: script => stow/hub-1.11.1/script     LINK: etc => stow/hub-1.11.1/etc     LINK: lib => stow/hub-1.11.1/lib     LINK: hub => stow/hub-1.11.1/hub     LINK: bin/hub => ../stow/hub-1.11.1/bin/hub     LINK: git-hooks => stow/hub-1.11.1/git-hooks     LINK: Rakefile => stow/hub-1.11.1/Rakefile     LINK: Gemfile => stow/hub-1.11.1/Gemfile     LINK: features => stow/hub-1.11.1/features     Planning stow of package hub-1.11.1... done     Processing tasks...     Processing tasks... done      Now `stow` even links the `man` files to a separate folder instead of using `share/` === **.stow-global-ignore**               # Comments and blank lines are allowed.          RCS     .+,v          CVS     \.\#.+       # CVS conflict files / emacs lock files     \.cvsignore          \.svn     _darcs     \.hg          \.git     \.gitignore               .+~          # emacs backup files     \#.*\#       # emacs autosave files     .*\.c        # c src files      .*\.cc       # c++ src files      #.*\.\d       # compile temporary files      #.*\.\d\..*       # compile temporary files      .*\.o        # object files     .*\.h        # include files     .*\.info     .*\.mk       # make configs     .*\.swp      # vim temp buffer file     .*\.lock     # vim temp buffer file     .*\.md       # mark down      .*\.yml      # YAML     #.*\.gemspec  # gem file     #.*\.rb       # ruby file     #.*\.sh       # shell file     #.*\.feature  # shell file     README.*     LICENSE     FAQ     LEGACY     TODO     Makefile      **.stowrc**               --dir=/home/myusername/local/stow     --target=/home/myusername/local


title: Create a partition from a directory

text: I have a Linux system with only one partition `/dev/sda1` on `/dev/sda` disk with `/` mount point. Is it possible to create partitions after installation? e.g. create `/dev/sda2` with the mount point `/home/` How can I achieve it from command line? How is it physically implemented? (If I later remove `/dev/sda1` will it remove my `/home/` directory because it's a subdirectory of `/`? I'd like this partition to survive and I could install new system someday.


title: Remote support software Linux to windows, like teamviewer

text: Hi I am in desperate need for a free as in beer or free as in speech Remote support software. It needs to be painless for the people im supporting. here's the problem, I'm a sys admin / help-desk engineer who supports windows and mac end users. Our company are in the middle of changing over Remote support software from Cisco WebEx to Logmein Rescue. So at the moment we have no proper support software and have all been asked to use Join.me for the cross over period. Join.me only works on pc and mac and Im running opensuse 12.1, my boss is fine with me using linux as long as it doesn't hinder my work, which it hasn't until now as WebEx ran fine. I have been using teamviewer for the last week and its been great although now Teamviewer has blocked me because they suspect that I'm using it commercially and I should pay to do that. If teamviewer was £30 quid I'd pay but its £600 and im not willing to pay that for the month that I will need it. Is their any alternative for Linux, it needs to be easy for the other side ie go to this website download this, click run, whats the ID done im on. I know VNC is free but open up your router config find the port forward section add this port. Is not painless for the people I support. I need an alternative or I may have to install windows again Any help greatly appreciated


title: Suppress duplicate messages in rsyslog?

text: Is there a way to configure rsyslog to suppress identical duplicate messages? In certain situations (often hardware failures) my syslog can grow to 100 MB or more due to repeated messages every quarter-second or so.


title: Filter out HTTP GET request within wireshark?

text: I'm trying to filter out HTTP GET with wireshark, but the string provided on the official page isn't working at all:               port 80 and tcp[((tcp[12:1] & 0xf0) >> 2):4] = 0x47455420      Wireshark on my system can't parse that. What's wrong?


title: /bin/dash syntax

text: I have following bash command               diff <(xzcat file1.xz) <(xzcat file2.xz)      and I need to execute it in `dash`. On my system (Debian Wheezy), `dash` is the default interpreter for cron (`/bin/sh` is a link to `/bin/dash`). When I execute the command in `dash`, I get following error:               Syntax error: "(" unexpected


title: Help for download the android by the Cygwin Terminal

text: I have a problem for download android by Cygwin Terminal in windows. I use this guide for download it:                - 1) Download cygwin from http://cygwin.com/install.html.      - 2) Install cygwin with defaults.In cygwin Select defualt page search          for curl and python and check them to be installed.           - 3) Then start cygwin.exe          go to your preferred directory (mine is D:/Android/sources/4.0/try2 )     cd d:     cd Android/sources/4.0/try2           - 4) Run the below instructions one by one      - i) mkdir bin      - ii) PATH=/cygdrive/d/Android/sources/4.0/try2/bin:$PATH      - iii) curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo >        /cygdrive/e/android-s/bin/repo      - iv) mkdir source      - v) cd source      - vi) repo init -u https://android.googlesource.com/platform/manifest        -b android-4.0.1_r1          give credentials           - vii) repo sync      So, it work fine until 4-ii step but when I try to use of the 4-iii step it gives me this error:               -bash: curl: command not found      What is the problem? How to solve it?


title: Is there a GUI debugger for shell scripts

text: Debugging bash scripts on command line is complicated. Is there a good GUI based debugger available for debugging bash scripts?


title: Can I label a disk device rather than a partition?

text: I know about the e2label and friends program for attaching a label to a disk partition e.g.               e2label /dev/sda1 bla      What I want to do is something different: I want to create a label for a hard drive, that is for /dev/sda, not for a partition. Is that possible and if yes, how? EDIT: Background: In a case with multiple HD bays I would like to put (paper) labels on the physical bay's door and put the same label logically on the disk I have put in there. EDIT2: This is about Ubuntu Linux 12.04 server.


title: Linux - Windows 8 - Samba - Can see dir and contents but not create

text: have the following setup Raspberry pi with samba installed and running Windows 8 machine that can see the samba share, access the proper DIR, see all contents In the smb.conf file, at the base of the file, I created the above dir with this               [AirLock]     comment = AirLock     path = /thepath/     writeable = Yes     create mask = 0777     directory mask = 0777     browseable = Yes     public = Yes     read only = no      With these settings I can see the whole dir that I want but I cant create files, edit files, or create DIRs. I need to do all of this.


title: Checking if passwordless ssh authentication is possible without permission for sshd_config

text: Is it possible to check if ~~authorization~~ authentication with keys is available without permission to read `ssdh_config` ?


title: Are RPMs valid across platforms?

text: I'm a little confused about RPM's in Red Hat and/or Fedora (and/or other distros?). I can certainly accept that 64-bit RPM's are needed for 64-bit OS'es and 32-bit for 32-bit OS'es but... If I have an RPM for ... OpenOffice.org, is that RPM valid for any of my RPM-accepting OS'es or do I need to seek out an RPM specifically tailored to the OS that I'm working with?


title: Correct handling of Python2 and Python3

text: What is the correct way running scripts that depend on python2.x but on a system where python3.x is aliased with python. The solution should take into account the following things :   * Python2 should be used only for that bash run   * every script that is run form subsequently should also use Python2   * The change should be temporary  One solution is temporary making alias and setting the location for Python2 at the beginning of the full PATH. What is the right (*nix) way to handle this ?


title: root user denied access to .gvfs in rsnapshot?

text: I was running `rsnapshot` as root and I got the following error. Why would this happen? what is `.gvfs`?               rsnapshot weekly                                                                    slave-iv     rsync: readlink_stat("/home/griff/.gvfs") failed: Permission denied (13)     IO error encountered -- skipping file deletion     rsync: readlink_stat("/home/xenoterracide/.gvfs") failed: Permission denied (13)     rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1042) [sender=3.0.7]


title: DSL connection not working in Ubuntu 10.04

text: I use a wired PPPoE connection to connect to the Internet. What I need to do on Windows to connect to it is put in static IP address, gateway, subnet mask and DNS servers for my LAN card. Next I have to create a dialer for a PPPoE connection, put in my user name, the service name and the password, and "dial" this connection. And it works fine. On Ubuntu 10.04, however, I have tried setting things up in a similar fashion - put in all static addresses for the "automatic" wired connection, then put in user name, service name, password for a "DSL" connection. It worked for a while, then stopped. I have tried putting in _all_ the details within the DSL configuration dialog, same thing happened--it worked for a while, then stopped. I have tried deleting the ethernet connection and only keeping the DSL one with all the numbers put in place, same thing happened--it worked for a while, then stopped. Each of the times, when it connected, it connected randomly, after trying a few times, and either stopped working within a few minutes, or after I had rebooted. I have deleted and remade the connection dozens of times--even with different names, but nothing seems to be working. I have also tried `pppoeconf` from the terminal, didn't work. Based on Gilles' suggestion, I have checked `/var/log/kern.log`, but nothing changes in the file when I try to connect. I have also checked `/sbin/route`, but gedit can't even open it (says it can't figure the character encoding…). The "connection established" notification pops up from the top right corner, the same way as when the computer is _actually_ connected to a network. Can anyone figure what's wrong and how it can be solved?


title: How can I run Rosetta Stone (on Wine) from the menu in Crunchbang?

text: I added this entry to menu.xml:               <item label="Rosetta">       <action name="Execute">         <command>            wine ~/.wine/drive_c/Program\ Files/Rosetta\ Stone/Rosetta\ Stone\ Version\ 3/RosettaStoneVersion3.exe         <command>     </action>     </item>      But when I click this, Rosetta opens with error 2123. This error, I think, is associated with bad shortcuts. I'm not sure. However, when I go to the folder and click on the exe file, it runs correctly. I tried prepending the command with 'sudo'. Didn't help. The command must be incorrect but I don't know why. What am I doing wrong? **Just to be clear:**   When I click the Rosetta Stone icon, the program runs. When I navigate to the folder in terminal and use "wine RosettaStoneVersion3.exe", it also runs. But when I run "wine ~/.wine/drive_c/Program\ Files/Rosetta\ Stone/Rosetta\ Stone\ Version\ 3/RosettaStoneVersion3.exe", it opens with "error 2123". I can't figure out why this would be.


title: Make failing while trying to install SoX (spectrogram - libpng)

text: I'm trying to install SoX, and get through configure fine, but it fails on make with the following:               /bin/sh ../libtool --silent  --tag=CC  --silent --mode=compile gcc -DHAVE_CONFIG_H     -I.  -DLADSPA_PATH="\"/var/tmp/sox/sox14/lib/ladspa\"" -DPKGLIBDIR="\"/var/tmp/sox     /sox14/lib/sox\""    -Wconversion    -g -O2 -D_FORTIFY_SOURCE=2 -Wall -W -Wmissing-     prototypes -Wstrict-prototypes -pedantic -MT libsox_la-spectrogram.lo -MD -MP -MF      .deps/libsox_la-spectrogram.Tpo -c -o libsox_la-spectrogram.lo `test -f      'spectrogram.c' || echo './'`spectrogram.c     spectrogram.c: In function `stop':     spectrogram.c:593: warning: implicit declaration of function `png_set_rows'     spectrogram.c:594: warning: implicit declaration of function `png_write_png'     spectrogram.c:594: `PNG_TRANSFORM_IDENTITY' undeclared (first use in this function)     spectrogram.c:594: (Each undeclared identifier is reported only once     spectrogram.c:594: for each function it appears in.)     make[1]: *** [libsox_la-spectrogram.lo] Error 1     make[1]: Leaving directory `/var/tmp/sox/sox-14.3.1/src'     make: *** [all-recursive] Error 1      I'm guessing this is more of a linker/pointer error than anything else because this is the beginning of spectrogram.c               #include "sox_i.h"     #include "fft4g.h"     #include "sgetopt.h"     #include <assert.h>     #include <math.h>     #include <png.h>      png.h is included, which is where PNG_TRANSFORM_IDENTITY is supposed to come from. Am I missing something?


title: Encrypted file system on external storage

text: I use archlinux and manjaro. I recently bought an external 2TB toshiba stor.E canvio, and I planned to use it as back up. I used gpt layout and partitioned it with luks and ext4. Dolphin reports 6% full, whilst only 20kb are used. why is it so?   I decided to use encrypted zfs/btrfs on it, but I don't know any of it's basis and jargon. what's the easiest way to do so.


title: How do I use wget to download all links from my site and save to a text file?

text: I am trying to download all the links from aligajani.com. There are 7 of them, excluding the domain facebook.com which I wan't to ignore. Yes, so that means, I don't want to download links that start with facebook.com domain. Also, I would want them saved in a .txt file, line by line. So there would be 7 lines. Here's what I've tried so far. This just downloads everything. Don't want that.               wget -r -l 1 http://aligajani.com


title: (CentOS) default FTP (SFTP) Log File?

text: I'm on `CentOS v6.4` and using its native FTP Server, which i suppose is `sftp`. _(Am i right?)_ Now i can use FTP well. But i need to log the actions taken by Users. Logs for the actions, such us, who logged in, who modified which files, who deleted which files .. etc the basically important actions, you know. So my simple questions would be:   * Where & how can i access/check the FTP Logs from Server, please?   * Can it even be done with default `SFTP`? _(Do i need`vsftpd`?)_ In short words, what is the best & simplest way to get the FTP Logging, please?


title: Grow LVM RAID10?

text: RHEL LVM has supported RAID4/5/6 as of 6.3 and RAID10 as of 6.4. It's well- known that mdadm won't let you `\--grow` raid10, my question is whether this is a limitation of LVM RAID10 too? If it is possible, what are the downsides of LVM RAID10 versus LVM on top of md RAID10?