Why do deleted files continually reappear?

I've been having a strange issue recently, where I would delete files from a location (i.e. Desktop), and then empty the Trash. However, a day or so later (I'm not sure exactly what triggers it), the files reappear with new permissions (644). How do I either figure out what's causing it, or stop it completely? It's been going on for quite sometime now, and it's rather annoying considering I spent ~1 hour cleaning my home folder, and now it's back to the way it was. P.S. I'm running Linux Mint 15 Olivia The cron jobs, as requested:               # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ luckybackup entries ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     @reboot    sleep 180;    /usr/bin/luckybackup -c --no-questions --skip-critical /root/.luckyBackup/profiles/Jason.profile > /root/.luckyBackup/logs/Jason-LastCronLog.log 2>&1     # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ end of luckybackup entries ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      and               0 21 * * * fwbackups-run -l 'Daily Backup' # autogenerated by fwbackups


What does the "s" mean in the following permission:"-rwsr-x---"

I know about the different permissions and how to change permissions, etc. But I have just seen one of my files has the permissions: > -rwsr-x--- 1 root scott 26974 Dec 8 2010 extjob What does the "s" mean, in the permissions? There is another question on U&L that has a little to do with the same permissions, but doesn't explain what they mean.


generating CSR correctly

When generating a CRS for private purposes (non-comercial) which of the fields are mandatory?                  Country Name (2 letter code) [US]: US        State or Province Name (full name) []: Texas        Locality Name (eg, city) []: Houston        Organization Name (eg, company) []: Your Company Inc        Organizational Unit Name (eg, section) []: Your Department        Common Name (eg, YOUR name) []: secure.yourcompanyname.com        Email Address []:      According to some sources, `Organization Name` is a required filed, but I am not part of any organization. Can I leave this empty?


list the timestamp of the files in "find" command

In bash, if I use `$ find ./ -name "*.sqlite"` , it will list all the sqlite files in current directory. I also want to see the modified time of the files, can anybody give me some help?


What linux kernel is arch linux using?

What is the version of the linux kernel that arch linux is using? Is it 3.0 or lower or higher? I couldn't find the info anywhere, I'm hoping someone else knows.


How to run a process with a specific group?

I have to start an application with my own user rights, but the group must be different. So, instead of:               $ ps -eo "user,group,args" | grep qbittorrent     morfik   morfik      /usr/bin/qbittorrent      it should be for example:               $ ps -eo "user,group,args" | grep qbittorrent     morfik   p2p      /usr/bin/qbittorrent      It also has to be done without asking about password. Is there a way to achieve this?


Return Carriage not working (Screen)

When I execute the command `screen -S myscreen -X stuff $'search add $1 \015'` from a shell it works perfectly. If I put it in a .sh file and run it as `sh /test.sh variablehere` it sends it to screen as `$'search add variablehere'`. Why would it normally work but not from `sh`? Im on Ubuntu Server if it matters.


Why is vlc not syncing audio and video correctly?

max@linux-vwzy:~> vlc --version     VLC media player 1.1.11 The Luggage (revision exported)     VLC version 1.1.11 The Luggage (exported)     Compiled by abuild on messiah (Aug 17 2011 15:23:16)     Compiler: gcc version 4.5.1 20101208 [gcc-4_5-branch revision 167585] (SUSE Linux)      This program comes with NO WARRANTY, to the extent permitted by law.     You may redistribute it under the terms of the GNU General Public License;     see the file named COPYING for details.     Written by the VideoLAN team; see the AUTHORS file.      Every file I seem to play requires me to bring the audio back about 0.4 of a second. I would post if this was for a couple video, but this is my entire video library which was encoded in different ways and created at different times. This only seemed to happen when I switched my window manager from KDE to dwm; it worked fine in vlc before that


What does Grep */* mean in KSH

In `ksh`, what does `grep */*[myPattern]` mean?


Run my own HTTP fast-browsing proxy a la Opera Mini?

Opera Mini is a great browser that works well on feature phones and iPhones. Unlike most browsers, it uses Opera's servers to transcode every page you browse to into a small, easy-to-render chunk that's sent to Opera Mini. What's a simple way for me to set up something similar on a very fast VPS out there so I can browse more comfortably on a 10KBps connection? I have no idea where to start, but I'm most comfortable in the NodeJS world.


Match a simple Regex

I need to match this: (tt\d{1,10}) in a file with the file ending txt. I have tried grep and ack-grep but without results.               ack-grep -G \.txt$ -g "(tt\d{1,10})"


Slacko vs Precise vs Lucid Puppy Linux

On **this site** you will find the 3 flavors of Puppy Linux in the question. I am not looking for an exhaustive list, but just a few differences between the three. This way I can make an informed decision on which to go with, instead of randomly picking or just getting the smallest one.


Where did Redhat derive from?

Where did Redhat derive from? Did it derive directly from Linus Torvaldis linux distro (2 years earlier) or did it have roots in BSD or System-V ?? I am just wondering how to classify Redhat in the Linux world.               1991     Linus Torvalds releases the Linux® kernel.     1993     Bob Young incorporates ACC Corporation, a catalog business      that sells Linux and UNIX software accessories and books,      and distributes a magazine called New York UNIX.     1994     Marc Ewing creates his own distribution of Linux, which he     names Red Hat® Linux. Released in October, it becomes known      as the Halloween release.


Is it normal that Fedora's yum list kernel-* shows two versions of kernel being used?

Is it true that the following shows that two versions of the kernel are being used? (Is the bold face -- the one enclosed in `**` showing what is currently loaded / used). Basically, I just created a VM using VMWare Fusion on a Macbook Pro, downloaded Fedora (the current one, which is 17), installed it and did the upgrade it prompted me to do in a window. (The ones I see are **kernel.x86_64** 3.3.4-5.fc17 and **kernel.x86_64** 3.6.10-2.fc17, so 3.3.4 and 3.6.10 are both running? How come the other kernel parts like `headers`, `modules`, or `tools` don't need to be running?)               $ yum list kernel-*     Loaded plugins: langpacks, presto, refresh-packagekit     (1/2): fedora/primary_db                                 |  14 MB     00:13          (2/2): updates/primary_db                                | 7.3 MB     00:06          Installed Packages     **kernel.x86_64**                       3.3.4-5.fc17    @koji-override-0/$releasever     **kernel.x86_64**                       3.6.10-2.fc17   @updates                         Available Packages     kernel-debug.x86_64                 3.6.10-2.fc17   updates                          kernel-debug-devel.x86_64           3.6.10-2.fc17   updates                          kernel-debug-modules-extra.x86_64   3.6.10-2.fc17   updates                          kernel-devel.x86_64                 3.6.10-2.fc17   updates                          kernel-doc.noarch                   3.6.10-2.fc17   updates                          kernel-headers.x86_64               3.6.10-2.fc17   updates        kernel-modules-extra.x86_64         3.6.10-2.fc17   updates                          kernel-tools.i686                   3.3.4-5.fc17    fedora                           kernel-tools.x86_64                 3.6.10-2.fc17   updates             [...]


Less-than sign after done in a shell script

Should be easy but want to know why the “left arrow” `<` is used instead of right arrow.                  if        fi        done < a.txt      What does it mean by left arrow? I thought since I am done with the condition, the output should be saved in a.txt with right arrow like done > a.txt Why we use left arrow for if-statement?


when is it safe to remove `/dev/.tmp-block-*` files

i'm currently experimenting with temporary lvm-snapshots (that is: create a snapshot of an LV, do something with the snapshot (e.g. run a backup), then destroy the snapshot. something along the lines:               lvcreate --snapshot --name "SNAP" --size 2GB lv01     dobackup /dev/VG1/SNAP     lvremove -f /dev/VG1/SNAP      the new `SNAP` "disk" has been created as with devicenumber `254:10`. now today i discovered, that i got a hidden device-file `/dev/.tmp- block-254:10` in my device-directory. i _assume_ that this is a left-over from the LV creation/removal. i ran `lvdisplay` but the device doesn't show up. also it seems that now process is currently using it (checked with `fuser /dev/.tmp-block-254:10` and `lsof /dev/.tmp-block-254:10`). can i safely remove this file (`rm /dev/.tmp-block-254:10`)?


frequency of occurence

I have a tab-delimited text file, that is around 3K lines long. I want to calculate frequency of data appearing in it, in 10,000 ranges. Input.txt               Price       500         1500        10001        15000       17000       25000       33000       39000       :     :     8000000       Output.txt               Pricerange      pricerangecount       0-10000          2                    10000-20000      3                    20000-30000      1                    30000-40000      2      :     :


PekWM doesn't List Minimized Windows

I recently installed the PekWM. I noticed when I minimize any window,it will be removed from `ATL+TAB` List. In other words "the minimized windows are not listed in `ALT+TAB` menu."   I want to know it is by design or it is a bug. If it is a bug is there any workaround to fix it.


Is there an approach to have feh --thumbnails do not display filename?

I have many pictures which are screen shots created from shutter and downloaded from web. These pictures have long file names. When I create thumbnails on these pictures via `feh -t`, these long file name will prevent `feh` to display many pictures in one row. And I did not find a solution for this on the `feh` man page. What can I do to display many pictures in a row?


Where did /usr/lib64 go and what is /usr/lib/x86_64-linux-gnu?

I have two Ubuntu-x86_64 systems. One is version 10.04, the other 12.04 and there is a difference in the structure of the lib directories. This doesn't surprise me, but I'm curious if anyone knows why. Is there a good™ reason why? **10.04** `2.6.32-38-server #83-Ubuntu SMP Wed Jan 4 11:26:59 UTC 2012 x86_64 GNU/Linux`               /usr/lib     /usr/lib32     /usr/lib64      **12.04** `3.2.0-23-generic #36-Ubuntu SMP Tue Apr 10 20:39:51 UTC 2012 x86_64 GNU/Linux`               /usr/lib     /usr/lib/x86_64-linux-gnu


How to get brightness keys working inside openbox session?

I'm using **Openbox** window manager **without DE**. I'd like to get **`fn + [brightness up/down icon]`** working like it is in GNOME/KDE, but i'm looking for lightweight solution without gnome-power- manager and similar. I know about `xbacklight` console program, but it takes little time to adjust brightness.


Why isn't my application receiving broadcast packets?

I have written a Qt application that listens for UDP broadcast packets on the network interface `p2p1`. I have installed the application in Fedora 17 i386 in a VirtualBox VM. For some reason, the application is not receiving any broadcast packets that I am sending. I installed and ran Wireshark and verified that the broadcast packets are indeed arriving on `p2p1`: ![image description](http://i.stack.imgur.com/Y1wOU.png) Does anyone have any idea why the application (which is listening for UDP packets on port `41720`) isn't receiving any of the packets? Some security setting or something?


Is there a standard command that always exits with a failure?

I want to test my script with a command that fails. I could use an existing command with bad arguments. I could also write a simple script that immediately exits with a failure. Both of these are easy to do and work for me, but if there is a standard command for this purpose, I'd like to use that instead.


How can I convert a chroot into a GRUB2 bootable ISO image?

Say I have a chroot containing what will be a working Linux system, and some additional init scripts to mount an overlay filesystem (e.g. AUFS) over it. I've also generated a GRUB2 boot menu. What commands would I use to:   * Install the requisite GRUB2 binary files into $CHROOT/boot, **without modifying the host MBR**   * Generate a bootable ISO from $CHROOT, with GRUB2 as the bootloader Note that I would rather use GRUB2 than syslinux, because syslinux does not automatically detect kernel and initrd versions.


Debian fails to boot after installing xfce 4.10, "lp: driver loaded but no device found" error

I decided to install xfce 4.10 on wheezy. However after rebooting I am getting stuck at some screen beginning with the line"               lp: driver loaded but no device found      Thing is, I can't do anything at this point. Does anyone have an idea on what the problem might be an how to solve it? ![I added a pic if the screen](http://i.stack.imgur.com/6EPxL.jpg)


I installed eclipse 4.4 on Slackware 14.1, but it has a bug in the Eclipse interface, how can I solve?

I downloaded through slackbuilds.org, but the interface is with square buttons and menus. ![Eclipse Luna](http://i.stack.imgur.com/nUQcO.png) I have no idea how to fix this defect, could someone help me?


Is there any media player that can browse Shoutcast streams?

I read that `exaile`, `banshee` (`banshee-extension-liveradio`), and `VLC` previously had tools allowing users to browse from a vast selection of Shoutcast streams for listening. I found some articles suggesting that these features may no longer be available, due to changes with Shoutcast. Are there any media players that are updated to work with Shoutcast, not just allowing playing of the audio, but browsing of the stations?


Is there any way attacker could use mkdir to compromise a system?

I'm setting up a restricted user account for user `ricardo`, a troublesome user on my system. I want to grant him the right to make directories using `sudo`, which he sometimes needs to do. I'm considering this rule in my `/etc/sudoers` file:               ricardo   ALL=(root) NOPASSWD: /bin/mkdir      Using only this rule, is there any way ricardo could intentionally or accidentally compromise the system?


linux boot manager has been blocked [SOLVED]

I've just installed arch linux on a UEFI motherboard. as bootloader I installed "gummiboot". I've got the following problem, when the computer stars I recive the message:               "Linux Boot Manager has been blocked due to current privacy policy."      and then starts Windows 8. I disabled the secure boot from the bios, but still not working. what should I do? SOLUTION: I've found in the settings of my Windows 8 (was installed when I bought the laptop) something that says: "total disable secure boot". I have pressed it and then it worked to boot the arch linux bootloader.


Linux GUI to track connections made from/to this computer

Is there a GUI to track any socket connection sent to this computer and which program that initiates it? Also if possible track any incoming connection sent to this computer and which program that handles it (as a realtime popup indicator if possible) ? For example:               "/bin/x owned by user x tries to connect to x.x.x.x:x"     "x.x.x.x connected to your computer on port 80 handled by /usr/bin/apache"      or at minimum, what should I learn to create this kind of software?


crontab error with (No MTA installed) but I use >/dev/null 2>&1

I'm new on linux user I try to run crontab to backup my database with vagrant user               * * * * * /usr/bin/mysqldump -h localhost -u root -p root mydb | gzip > /var/backup/all/database_`date +%Y-%m-%d`.sql.gz >/dev/null 2>&1      when the crontab runs there is no backup file in the folder (my backup/all has the permission scheme `755`). This is error from `/var/log/syslog`               Aug 16 11:55:01 precise64 CRON[2213]: (vagrant) CMD (/usr/bin/mysqldump -h localhost -u root -p root mydb | gzip > /var/backup/all/database_`date +%Y-%m-%d`.sql.gz >/dev/null 2>&1)     Aug 16 11:55:01 precise64 CRON[2212]: (CRON) info (No MTA installed, discarding output)      So I think   1. it's about crontab can't create backup file because of Permission denied.   2. it's about I'm didn't install MTA but I use `>/dev/null 2>&1` to disable crontab to sent it to email why it error ?


installing synaptic package manager from outside the repos

I have been facing some problems in installing software with ubuntu software center, due to the fact that I have not been able to run no proxy for the whole system, I have tried all methods prescribed in various websites to do the same but i always get `407 Proxy Authentication Required`. So I want to install synaptic package manager through source code or .deb file which can be downloaded from the internet and then installed manually. Please post the link from which the same can downloaded and also steps to install it manually. A little detail would be of great help as I am a beginner and unaware of the nuances. As suggested in one of the answers when i download the .deb package and perform `sudo dpkg -i synaptic_0.81.2_amd64.deb` in the terminal this is what happens... ![enter image description here](http://i.stack.imgur.com/sZePa.png) I am not able to make out where there has been a mistake.


How to parse XML to CSV with a shell script?

What is the ideal way to parse an `.xml` file into a `.csv` file that I could include with my shell scripts. I know bash cant do it but I'm unsure if I should try in `awk` or `sed`. I imagine a language would be the best solution such as python but I do not know python nor have I touched it.


What are all of the SSH Key files?

There are six key files in `/etc/ssh` directory for private and public keys. 4 of them are for DSA and RSA public & private keys. but there are two more files named `ssh_host_key` and `ssh_host_key.pub`, what are these keys?


change root account username

In windows it is possible to change `administrator` username for security reasons. Is it possible to change `root` username in Linux too?


Black Screen after log-in in linux Mint 17 Cinnamon Qiana

Installed Linux Mint 17 Cinnamon Qiana on my Toshiba Satellite M55. Every once in a while I get a Black Screen after I log-in and I all see is the Mouse pointer. I checked and double checked the Driver Manager but all I get is for the modem, nothing else.


Sabayon - mysql (and other services) won't start

It's a fresh install of Sabayon Linux. I installed mysql (equo install dev- db/mysql), configured it (emerge --config ...), but it doesn't start using /etc/init.d script:               # /etc/init.d/mysql start      * WARNING: mysql is already starting     # /etc/init.d/mysql status      * You are attempting to run an openrc service on a      * system which openrc did not boot.      * You may be inside a chroot or you may have used      * another initialization system to boot this system.      * In this situation, you will get unpredictable results!      * If you really want to do this, issue the following command:      * touch /run/openrc/softlevel     # /etc/init.d/mysql stop      * ERROR: mysql stopped by something else      Touching /run/openrc/softlevel causes even more errors. Googling doesn't advise much. I remember recent OpenRC migration on my Gentoo box, but there I'm still using init.d scripts. Anything else changed I didn't notice?


Boot linux on pendrive error: No configuration file found

I created a bootable flash drive using Universal USB Installer. However, the error message appears to start it: `No configuration file found` How to solve this problem? I've got sometimes with this USB and BIOS settings a few months ago and never had this problem. I tried to format it using FAT 64bytes and not solved the problem.


xorg.conf gamma setting gets reset one minute after boot

I set custom gamma on Ubuntu in xorg.conf. It applies at boot. But then after a minute or so, screen colour resets back. I tired googling this, found 2 threads not answered by anyone. There is no error in Xorg log. How do I troubleshoot this?


AWK : Converting Row Formated Data into Columnar

I have a dataset as such:               Name:      Jim Bean     Vice:      Dice     ID:        AFDSDFDSFDSFASFA     LoginTime: 12343314          Name:      Bob Dylon     Vice:      Trumpets     ID:        AFD232SFDSFASFA     LoginTime: 12343314          Name:      Mary Jane     Vice:      Gambling     ID:        EWDSFDSFASFA     LoginTime: 12343314          .....      I need to arrange this into a columnar format. My first thought is to use `awk`. But I'm a bit stuck. The labels will always appear in the same order, also it will always show the same number of label/value pairs in each group (headers aren't important). My question is: How would I do this? I've seen hints that the command `rs` may be able to do something like that, but its not standard on all systems.


Use dd to backup disk image within an OpenVZ container

I want to use `dd` to backup the disk of an OpenVZ VPS in addition to traditional cold tar backups. Because I may need to migrate to a different VPS provider. From end user point of view, OpenVZ containers are **folders** on the host (similar to LXC). If I am not wrong, OpenVZ uses common file system so containers (virtual environments) are just directories (isolated by chroot). Within the container, `/` uses a block device called `/dev/simfs`, I wonder if I can use dd to backup the whole disk image over SSH. Technically I don't see any problem, but I haven't done it myself, just not 100% sure and confident. I have done the same thing for Xen and VMware VMs, it worked fine. For Xen `ssh root@vps "dd if=/dev/xvda " | dd of=~/backup/xen.img` Does it work for OpenVZ, anyone has tried this before? `ssh root@vps "dd if=/dev/simfs" | dd of=~/backup/openvz.img`


file descriptor problem with looping bash script

I've inherited a script that does this in a function:               # IO redirection for logging.     #touch $LOGFILE     exec 6>&1           # Link file descriptor #6 with stdout.                     # Saves stdout.     exec > $LOGFILE     # stdout replaced with file $LOGFILE.          touch $LOGERR     exec 7>&2           # Link file descriptor #7 with stderr.                     # Saves stderr.     exec 2> $LOGERR     # stderr replaced with file $LOGERR.      Later on in the function it does this:               #Clean up IO redirection     exec 1>&6 6>&-      # Restore stdout and close file descriptor #6.     exec 1>&7 7>&-      # Restore stdout and close file descriptor #7.      The problem is if I call this function twice (i.e. in a loop) the second iteration stops at the first set of code above without showing an error. Why would it be doing that?


Terminal Root Command Warning

Is it possible to write a script (or change some file) in order to warn the user that they are using a command that is normally reserved for root? And if so, how? I'm currently the administrator of my machine, but I'd still like a warning that reminds me I'm using a root command.


How to replace m part of Lines with n part of Lines?

I have a file "test" like this:               RewiteEngine On     RewriteCond   %{REMOTE_ADDR}   !^192\.168\.1\.7$  [NC]     RewriteCond   %{REMOTE_ADDR}   !^192\.168\.1\.8$  [NC]     RewriteCond   %{REMOTE_ADDR}   !^192\.168\.1\.9$  [NC]     RewriteCond   %{REMOTE_ADDR}   ^192\.168\.1\.5$  [NC]     </Directory>      I want to replace `\.1\.7`,`\.1\.8` and `\.1\.9` by `\.1\.10` so it will be:               RewiteEngine On     RewriteCond   %{REMOTE_ADDR}   !^192\.168\.1\.10$  [NC]     RewriteCond   %{REMOTE_ADDR}   ^192\.168\.1\.5$  [NC]     </Directory>      it might be replacement of m "IPS" by n "IPS", How can I reach this?


how to java set the PATH of my Debian 7.3 system ?to link the java version I want

If I insert into the terminal:               aryan@localhost:~$ java -version     java version "1.6.0_27"     OpenJDK Runtime Environment (IcedTea6 1.12.5) (6b27-1.12.5-1)     OpenJDK Server VM (build 20.0-b12, mixed mode)


How can I extract/parse a complete URL from a semi random string?

I'd like to have bash parse/extract a full URL (and only the url) from a random short string. Examples:               bob, the address is http://www.google.com      or               https://foo.com/category/example.html is up      or               Error 123 occurred at http://bit.ly/~1223456677878      or               Stats are up: https://foo1234.net/report.jpg      I tried using `cat foo_output | egrep -o "https?://[\w'-\.]*\s"` but that didn't seem to work.


Whats wrong with this code?

#!bin/bash          if [ ! -e $1 ];     then             echo "error... no such file"             exit     else             END=$(wc -l $1 | cut -d" " -f1)             for (( i=1;i<=END;i++));             do             echo -e " $i \n"             echo "$(head -$i $1 |tail -1)"             temp=$(head -$i $1 |tail -1|)             echo "this is temp $temp"                   done          fi      The line that fails is me assigning a value to `temp`. I get a `syntax error near unexpected token `)'` error but I don't understand why


UEFI - Linux Mint Boot from USB Doesn't work

I'm running Linux Mint (only OS other than in VirtualBox) and wanting to remove it. I've created a Live USB of Windows 8 using Windows 7 USB/DVD Download Tool - Yes, I know it says Windows 7 but I've been doing research and I am hearing from everywhere that it also works for Windows 8.   * The ISO was loaded on just fine (AFAIK)   * Computer came with Windows 8 pre-installed   * I have Safe boot and Fast boot disabled in the BIOS Settings   * I have USB as my first boot option   * I have tried both the USB 2.0 and 3.0 ports Yet, Mint is all that will boot up. Anybody have a similar issue???? If it helps, the computer is a Toshiba Satellite S855D Laptop with an AMD APU quad-core processor (3 CPU, 1 GPU)


Match slash in bbe

How can I match a forward slash in `bbe`? If I have this text file called `test.txt`:               foo / bar      I can match it in `sed` like so:               sed -e 's/foo \/ bar/it worked!/' test.txt      However when doing the same thing in `bbe` it doesn't replace it:               bbe -e 's/foo \/ bar/it worked!/' test.txt      I have also tried double escaping and triple escaping the slash, however it doesn't seem to work anyway. What am I doing wrong?


RPM build errors

I am trying to build an RPM but when I use this command to build it: `[root@vmdb SPEC]# rpmbuild -v -bb SPEC/supportScripts.spec` I always get this error:               Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.gG9C7Y     + umask 022     + cd /root/rpmbuild/BUILD     + cd /root/rpmbuild/BUILD     + rm -rf supportScripts-1     + /usr/bin/gzip -dc /root/rpmbuild/SOURCES/supportScripts-1.tar.gz     + /bin/tar -xf -     + STATUS=0     + '[' 0 -ne 0 ']'     + cd supportScripts-1     /var/tmp/rpm-tmp.gG9C7Y: line 34: cd: supportScripts-1: No such file or directory     error: Bad exit status from /var/tmp/rpm-tmp.gG9C7Y (%prep)               RPM build errors:         Bad exit status from /var/tmp/rpm-tmp.gG9C7Y (%prep)      I have looked on the internet as to why this error might occur and it is due to a bad argument with the macro I am using in %prep/%setup. I am not sure what I need in replacement to fix it and it is getting frustrating. This is what my spec file looks like:               Name:           supportScripts     Version:        1     Release:        1     Summary:        All the support scripts bundled into an RPM.     BuildArch:      noarch          Group:          Development/Tools     License:        GPL     URL:            http://localhost     Source0:        supportScripts-1.tar.gz     BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)          %description     These are all the support tools we need for new Hardware Agent builds. This will package all the scripts support uses for new builds.          %prep     %setup -q          %install     mkdir -p "$RPM_BUILD_ROOT/opt"     cp -R * "$RPM_BUILD_ROOT/opt"          %files     /opt/          %clean     rm -rf $RPM_BUILD_ROOT          %post     chown -R support:support /opt/*     chmod -R 775 /opt/      UPDATE: What is weird is that I have found the rpm completely built in `/root/rpmbuild/RPMS/noarch`. I have ran command: `rpm -ivh supportScripts-1-1.noarch.rpm` to unpack all the scripts, and miraculously its there! My next question is: Should I be concerned of any mishaps with the rpmbuild command I have done?


Is there a way to communicate with someone at their desktop?

My wife is sitting at her home desktop, `alpha`, which is running a recent version of Ubuntu. I am on a bus, using ConnectBot on my G1 phone, and can SSH into `alpha` from wherever I am. For complicated reasons, I cannot use IM, email, or the telephone in order to contact her. (E.g. I don't want to wake the baby, my IM client is broken, my email server is down.) My only option is to ssh into `alpha` remotely and try to somehow make something appear on the screen. She's using KDE; how can I make something pop up to get her attention and let her know I'm trying to communicate with her? I thought it was possible to remotely trigger something (like xmessage) to appear on her screen even though my SSH session doesn't have an X display. EDIT: To clarify, my phone is not running any flavor of X, so X-over-ssh is not possible. Would the following work?               $ export DISPLAY=:0     $ xmessage "test"


How can I set the time in Centos so that resetting the OS doesn't revert to its default value?

I have a VPS running on Cent Os 5.8 (x86). There are situations in which we are forced to reset the entire VPS (it hangs and the only way to get it back on is to reset it). When we do so, the time is reset too. We use the following command to set the time (the timezone is configured through kloxo admin panel and is not reset like the time does):               #date +%T%p -s "10:10:10" (as for hour 10 and minutes 10 and seconds 10 )


find: Why is the -a operator not commutative in combination with -print?

Supposing we're using find in current directory with audio files (e. g. MP3) and (important!) also non-mp3 files (e. g. JPEG) present in current directory or somewhere below it.   Additionally to that, we have a directory in there with some other audio files (called **exclude_me** in the example), which should live up to its name by being excluded from the file search:               find . \( -type d -name 'exclude_me' -prune \) -o \( -type f -a -iname '*.mp3' -a -print \)      _(Though not absolutely necessary in this case, I've deliberately set some redundant parentheses, as well as additional`-a` operators for the sake of clarity.)_ Because of the explicit `-print` option (cf. also http://mywiki.wooledge.org/UsingFind), this will indeed omit anything from "exclude_me" directory, and only list the *.mp3 files recursively from current directory. Sometimes (not always) the `alias` command may already be sufficient for a `find` one-liner, but this command will require the argument at the **end** of the line.   Taking notice that the '*.mp3' argument to -iname is _before_ the `-print` in this case, there appears to be no way to solve the problem with an `alias`. But why not pretend as if in mathematics by simply swapping the two options?   Like this:               find . \( -type d -name 'exclude_me' -prune \) -o \( -type f -a -print -a -iname '*.mp3' \)      Remember I set a precondition to have at least one non-mp3 file (e. g. image) in the . directory or its subdirectories. It has been set to give a clearer proof that this does _not_ work as expected under the hood. Without them, things will merely _look_ as working fine. _Having_ them present instead will cause the non-mp3 files to get listed as well despite the distinct `-iname '*.mp3'` specification in the one-liner. So why doesn't the `-a` operator work like in mathematics, where "A + B" is the same as "B + A"? Or, in `find` terms:               \( -type f -a -print -a -iname '*.mp3' \)      ought to be the same as               \( -type f -a -iname '*.mp3' -a -print \)      or not? Is there no way to get the desired result _and_ have the `-iname` argument at the end of the line, not anywhere in between? (except for ugly hackish solutions like `grep -v exclude_me` or the like)


How to move taskbar to different monitor on Linux Mint?

I am using dual monitors on Linux Mint and I can't figure out how to get the bottom taskbar to appear on my left side monitor. Right now it only appears on the right monitor. How can I move it to the left monitor or extend it so it goes across both monitors?


Command substitution grepping ls output causes error

I'm trying to make a tar.tgz file using command substitution There are backups of 17 Aug 2012               -rw-r----- 1 ossec  502 804M Aug 17  2012 BKPMDISINT_i6nir20j.F_bkp     -rw-r----- 1 ossec  502 2.7G Aug 17  2012 BKPSYFINT_i5nir20j.F_bkp     -rw-r----- 1 ossec  502 3.9G Aug 17  2012 BKPMSFFINT_i4nir20j.F_bkp     -rw-r----- 1 ossec  502  28M Aug 17  2012 c-651746692-20120817-00     -rw-r----- 1 ossec  502 2.0G Aug 17  2012 ALG_KLPFINT_ianir576.alg     -rw-r----- 1 ossec  502 1.5G Aug 17  2012 ALG_KLPFINT_i8nir576.alg     -rw-r----- 1 ossec  502  37M Aug 17  2012 ALG_KLPINT_ibnir64h.alg     -rw-r----- 1 ossec  502 2.2G Aug 17  2012 ALG_KLPFINT_i9nir576.alg     -rw-r----- 1 ossec  502  28M Aug 17  2012 c-651746692-20120817-01     -rw-r----- 1 ossec  502  27M Aug 17  2012 ctrl_170803      So i need to tar them. I used this command > tar -zcvf DB-Backup-17082012.tgz $(ls -lrth|grep "Aug 17") But it gave me this error               tar: You may not specify more than one `-Acdtrux' option     Try `tar --help' or `tar --usage' for more information.


expanding boot, moving LUKS root

GPT > Partition2 > LUKS > btrfs      I need some additional space for my boot volume, so far I did:   * Shrink my btrfs volume by 250MB. `btrfs resize -250M /`   * Shrink the LUKS root volume `cryptsetup resize --size sector_calc luks_mapper_desc_root` **How to actually move the whole LUKS container back by 250MB?** (without using a secondary disk, so I guess this excludes `dd`)   * Future steps: Delete GPT Partition 1 and 2 and create the first bigger and the second one with a higher start sector and less spanning sectors.


Unable to start locally-built ntpd from system service script

I built ntpd from source, which process put it in /usr/local/sbin. Of course, the ntp service points to /usr/sbin. So, I thought I could just change the path in the init.d configuration file like this:               ### BEGIN INIT INFO     # Provides:        ntp     # Required-Start:  $network $remote_fs $syslog     # Required-Stop:   $network $remote_fs $syslog     # Default-Start:   2 3 4 5     # Default-Stop:     # Short-Description: Start NTP daemon     ### END INIT INFO          PATH=/sbin:/bin:/usr/sbin:/usr/bin          . /lib/lsb/init-functions          DAEMON=/usr/local/sbin/ntpd     PIDFILE=/var/run/ntpd.pid     ...[etc]      I changed the line starting with "DAEMON" to point to the location of the new binary. However, when I try to restart the service I get the error:               [ ok ] Stopping NTP server: ntpd.     [....] Starting NTP server: ntpd/usr/local/sbin/ntpd: The 'user' option has been disabled. -- built without --enable-clockctl or --enable-linuxcaps or --enable-solarisprivs     ntpd - NTP daemon program - Ver. 4.2.7p475     Usage:  ntpd [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \                     [ <server1> ... <serverN> ]     Try 'ntpd --help' for more information.      failed!      How can I have the service run from /usr/local/sbin instead of /usr/sbin? **Solution (based on accepted answer):** Apparently when building on Linux you need to use the switch `--enable- linuxcaps` when building on Linux. Here are the steps necessary on Debian Wheezy:               cd ~/install/ntp-dev-4.2.7p475     # or wherever you have the source unpacked     make clean                         # clean out the previous build     sudo apt-get install libcap-dev    # this library is required by linuxcaps     ./configure --enable-linuxcaps     # this is the critical switch     make     sudo make install     sudo /etc/init.d/ntp restart       # restart ntp     ntpq -c "rv 0 version"             # make sure you are running the right version      The only line you have change in /etc/init.d/ntp is the DAEMON line, as said above.


Merge three file in to a single master file by excluding the header in 2nd and 3rd files

I have three file with n number of lines as given below sample1.txt               ------------------------------     Date        Time    Name         ------------------------------     2013/10/12  12:09:09    Krish     2013/10/12  13:12:01    Ramb     2013/10/12  15:28:39    Likha     2013/10/12  15:56:12    Mat     .     .     .      Sample2.txt               ------------------------------     Date        Time    Name         ------------------------------     2013/10/12  11:19:21    Jack     2013/10/12  12:11:09    Rob     2013/10/12  15:45:12    Rick     2013/10/12  22:11:10    Phil     .     .     .      Sample3.txt               ------------------------------     Date        Time    Name         ------------------------------     2013/10/12  12:09:09    Eric     2013/10/12  13:12:01    Bob     2013/10/12  15:28:39    Mike     2013/10/12  15:56:12    Nick     .     .     .      I need to merge these three files in a single file(Master.txt) by excluding the headers (First 3 lines) in Sample2.txt and Sample3.txt as given below Desired Output               $cat Master.txt          ------------------------------     Date        Time    Name         ------------------------------     2013/10/12  12:09:09    Krish     2013/10/12  13:12:01    Ramb     2013/10/12  15:28:39    Likha     2013/10/12  15:56:12    Mat     2013/10/12  11:19:21    Jack     2013/10/12  12:11:09    Rob     2013/10/12  15:45:12    Rick     2013/10/12  22:11:10    Phil     2013/10/12  12:09:09    Eric     2013/10/12  13:12:01    Bob     2013/10/12  15:28:39    Mike     2013/10/12  15:56:12    Nick      Note : In AIX machine with Ksh 88


What is the rationale behind using non-numeric package component for the version?

In ubuntu (and not only in ubuntu) default repository you could see a package version like `2.2.14-5ubuntu8.12`. Why do the maintainers give such a weird version in the _central package repository_? What tasks the `2.2.14-42` version wouldn't solve?


mplayer2 playing pictures from mp3

Recently i've switched from mplayer to mplayer2 and there's one pestering thing: when i play an .mp3 file, and there is a picture embedded (here's an excerpt from exiftool output)               Picture Mime Type               : image/jpeg     Picture Type                    : Front Cover     Picture Description             :      Picture                         : (Binary data 26267 bytes, use -b option to extract)      mplayer2 tries to play this picture:               Detected file format: MP2/3 (MPEG audio layer 2/3) (libavformat)     [mp3 @ 0x7f95709a9000]max_analyze_duration 5000000 reached at 5015510     [lavf] stream 0: audio (mp3), -aid 0     [lavf] stream 1: video (mjpeg), -vid 0,      Clip info:      album_artist: Divna Ljubojevic      genre: Contemporary Christian      album: Мелoди      artist: Дивна Љубоjевић и Мелоди      title: Аксион естин      track: 01      date: 2002     Load subtitles in /home/pooh/music/!CHRISTIAN/Дивна Љубоjевић и Мелоди/2002 - Мелoди/     [VO_XV] Could not grab port 63.     [VO_XV] Could not grab port 64.     [ass] auto-open     Selected video codec: MJPEG (Motion JPEG) [libavcodec]     Selected audio codec: MPEG 1.0/2.0/2.5 layers I, II, III [mpg123]     AUDIO: 44100 Hz, 2 ch, s16le, 80.0 kbit/5.67% (ratio: 10000->176400)     AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample)     Starting playback...     VIDEO:  337x337  90000.000 fps    0.0 kbps ( 0.0 kB/s)     VO: [xv] 337x337 => 337x337 Planar YV12  [fs]     [ASPECT] Warning: No suitable new res found!     Colorspace details not fully supported by selected vo.     No pts value from demuxer to use for frame!     Video pts after filters MISSING      How to fight this nuisance? Upd. The problem is not how to mask this behaviour, but rather how to make the right thing. Why in the first place it has an idea of playing embedded album picture? mplayer didn't have this… feature.


Cannot Connect to Internet but can SSH into Solaris x86 (vs. 11)

I am able to connect remotely to the machine using SSH, but I cannot ping `www.google.com` through the machine. I did the following to make sure SSH was enabled (well I know it is, as I am using PuTTy):               # svcs ssh     STATE          STIME    FMRI     online          9:56:08 svc:/network/ssh:default      The machine name is:               # uname -a     SunOS solaris 5.11 11.1 i86pc i386 i86pc      And the precise version is:               # cat /etc/release     Oracle Solaris 11.1 X86     Copyright (c) 1983, 2012, Oracle and/or its affiliates.  All rights reserved.     Assembled 19 September 2012      I am trying to install gcc, but it cannot contact valid package repository:               # pkg install gcc-45     pkg: 0/1 catalogs successfully updated:          Unable to contact valid package repository     Encountered the following error(s):     Unable to contact any configured publishers.     This is likely a network configuration problem.     Framework error: code: 6 reason: Couldn't resolve host 'pkg.oracle.com'     URL: 'http://pkg.oracle.com/solaris/release' (happened 4 times)      I don't understand that SSH can work, but my internet is not open. This is what ifconfig -a returns:               # ifconfig -a     lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1         inet 127.0.0.1 netmask ff000000     net0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2         inet 10.0.11.17 netmask ff000000 broadcast 10.255.255.255         ether 8:0:27:7:ad:7     lo0: flags=2002000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv6,VIRTUAL> mtu 8252 index 1         inet6 ::1/128     net0: flags=20002004841<UP,RUNNING,MULTICAST,DHCP,IPv6> mtu 1500 index 2         inet6 fe80::a00:27ff:fe07:ad07/10         ether 8:0:27:7:ad:7      net0 IPv4 is the correct IP address that I am using for SSH. The only way I could (possibly) get round it, is if I could edit the gateway and the DNS IP addresses. Any help to get this machine to see the internet, would be greatly appreciated.


Why is uniq ignoring Unicode and lines with a single letter?

I'm trying to combine both the American and British dictionaries into one large dictionaries, and I'm trying to remove all the duplicates from the superset, but it seems that uniq is not outputting words like, "épée" or single letters. This is what I've tried using:               LC_COLLATE=en_US.UTF-8 cat american-english british-english |sort|uniq -u > unique_sorted_combined_dict      If I just do this:               LC_COLLATE=en_US.UTF-8 cat american-english british-english |sort > sorted_combined_dict      "épée" and other such words do show up, along with single letters. Is there something I'm missing here with `uniq`? I should note that I'm using uniq from the GNU coreutils on Ubuntu 12.10, if that makes any difference.


Write to a file without redirection?

I am writing a regular compiled application that needs to create a special file and write a magic cookie into it. I can’t write the file directly from the application, the system security model requires me to launch a helper tool with elevated privileges to do the trick. I can supply any number of arguments to the helper tool. Now I would like to pick some very simple system command that would serve as the helper tool and create the file for me. Something like this: `/bin/sh -c "/bin/echo -n 'magic' > /some/where/file"` Simple `touch` does not cut it as I need to write the cookie into the file, a simple `echo` without the shell wrapper does not work as it needs redirection to write the file. I don’t feel comfortable calling the shell with root privileges to do such a trivial task. Is there some really simple, constrained system command that I could call to write the file for me?


breaking from a program running in an interactive session in a screen window

I am launching `R` (an interactive program) in a `screen` window in a remote session:               ssh me@..     screen -S R_ProjectName     R       In the R session, I would like to `break` execution. Normally, this would be via `ctrl`+`c`. However, the command is getting submitted to `screen` instead of to `R`. What is the correct way to break in a program inside a screen window? To clarify, I am not looking to kill the `R` process. Rather, `ctrl`+`c` would be used to manually break out of (eg) a `for` loop. * * * I am working in iTerm2 on a Mac OS X connecting to Ubuntu 13.04


Linux GCC compiler options

I have recently started using Linux as a tool for programing. In my book, I have seen that the GCC is used with 2 options: `-g` and `-o`. Now, I know that `-o` is to set a filename, but what is the purpose of `-g`? I thought it might relate to debugging, but also programs compiled without the `-g` argument are debuggable. So what is it?


Extracting a string, according to a pattern, in a bash script

In bash, suppose that I have a string `strname`:               strname="ph7go04325r"      I would like to extract the characters between the _first_ `"3"` character and the _last_ `"r"` character in `strname`, saving the result in a string `strresult`. In the example above, the resulting `strresult` would be:               strresult="25"      The first `"3"` character is _not_ necessarily at string position 8 in `strname`; likewise, the last `"r"` is _not_ necessarily at string position 11. Thus, both of the following strings `strname` should yield `strresult="25"`:               strname="ph11go04325raa"     strname="325r"     strname="rgo04325raa"      Also, `strname=ph12go04330raa"` should yield `strresult="30"`. I am new to bash scripting, and I don't know where to begin to do string pattern matching like this. Do you have any suggestions?


Multiple Users on a Desktop Environment

This is probably a REALLY stupid question. But anyways, lets pretend we had a *nix rather powerful system... Now Obviously I know you can set up multiple users to login to a system.......but how exactly do you do that? Like....how would all the monitors connect and such, or would you need a smaller computer node that like....reroutes it or something? I know that probably sounds dumb...but how do System Admins and such set up multiple users for a *nix system? across a large building or something?


Make script executable from vi/vim

How can I run `chmod +x` on the script I'm creating in vi/vim so that it is executable? I tried `:r chmod +x %` but it didn't work.


How to wget Youtube horrible URL

I'm going to wget youtube search page where the URL is horrible. This is example when searching `searchkeyword` sorted by upload date:               wget http://www.youtube.com/results?search_type=videos&search_query=searchkeyword&search_sort=video_date_uploaded&suggested_categories=26%2C27%2C22%2C28%2C24      and this one is page 2 of the search result:               wget http://www.youtube.com/results?search_type=videos&search_query=searchkeyword&search_sort=video_date_uploaded&suggested_categories=26%2C27%2C22%2C28%2C24&page=2      The wget give me misleading page for both pages.


Hosts file on server with dynamic DNS?

I am setting up a RHEL-based server that is associated with dynamic DNS from DynDNS, with a domain of, say, "abc.dyndns.org" that is dynamically updated with the server's IP address. I have read that in order to ensure access to your server's services, you need to have at least the following in your /etc/hosts: > 127.0.0.1 localhost.localdomain localhost > > xxx.xxx.xxx.xxx redhatbox.yourcompany.com redhatbox Where "xxx.xxx.xxx.xxx" is whatever IP address your server has, and "redhatbox" would be the name of the computer. So here are my questions: (1) Because my server has an IP that is dynamically assigned by my ISP's DHCP, there is no one IP I can put in place of xxx.xxx.xxx.xxx, what should I do in this case? (2) Should I simply replace "redhatbox.yourcompany.com" with my DynDNS domain "abc.dyndns.org"? And replace the "redhatbox" alias with "abc"? If anyone can explain all this for a novice like me that would be great. Thank you very much for your detailed answers and patience.


Intel Z68 chipset raid5 disappeared

I have this motherboard, it's a gigabyte Intel Z68 chipset. I used the Intel chipset configuration (between BIOS and OS) to configure a 3 disk Raid5 array which I formatted as NTFS (Linux already has a 2 Disk Raid1 ext3 array). One of the nice things about using NTFS is that I had a large raid array that both operating systems could see. This changed today and I still cannot figure out why. I don't think I did any upgrades and all of the dev nodes for the individual drives are still there but my Linux system does not recognize the presence of the array. Does anyone have any suggestions? I'm stumped. System: Archlinux x64 Windows 7 x64 (Still sees raid array just fine) edit: I just rebooted (which I had done 3 or 4 times before already) and now it's back. I'll check dmesg if it happens again. Newbie mistake forgetting to check that.


Play RTMP stream from command-line

I've managed to get flvstreamer to read a radio station's RTMP stream with the options `--live -r [url]`, and it outputs what I guess is the raw audio data + stream info to stdout. Can I make it play the stream through my speakers, from the command-line? Possibly by sending sending the raw audio data to `mplayer` or something else. Thanks. * * * I got it to work with the command `./flvstreamer_x86 --live --quiet -r [url] --buffer 3000 | mplayer -vo null -`, **but it quits after a couple of seconds to a couple of minutes**. I added `--buffer 3000` to imitate what I saw when tracing the original Flash player with Wireshark. These are the last rows of output.               [pulse] working around probably broken pause functionality,             see http://www.pulseaudio.org/ticket/440     AO: [pulse] Init failed: Connection refused     Failed to initialize audio driver 'pulse'     AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample)     Video: no video     Starting playback...     FAAD: Failed to decode frame: Maximum number of bitstream elements exceeded     A:16866.9 ( 4:41:06.9) of 0.0 (unknown)  8.1%          Exiting... (End of file)      This was with flvstreamer 1.81. I couldn't get it to work with any version above, they just output               FLVStreamer v2.1c1     (c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL     Connecting ...     ERROR: rtmp server sent error     Starting Live Stream     FLV☺♣               Metadata:       audiodatarate         48.00       audiosamplerate       44100.00       audiocodecid          10.00     [stripped]      How can I make it play continuously? Thanks.


append string where it belongs in sorted file

Suppose I have a sorted file, named sorted.txt, like this:               beautiful     easy     fast     functional     handy      Now, doing `echo fine-grained >> sorted.txt` will put "fine-grained" at the end of the file, after "handy". Is there a way to insert it in order, between "fast" and "functional", without needing to re-sort the file?


ext4 overrides my commit=100 mount option with commit=0

Here is the relevant line from my /etc/fstab file:               UUID=f51aa298-9ce4-4a19-a323-10df333f34f5 /               ext4    data=writeback,noatime,barrier=0,errors=remount-ro,commit=100,nobh,nouser_xattr       0       1      Here is what happens when I type the command "mount":               /dev/sda1 on / type ext4 (rw,noatime,data=writeback,barrier=0,errors=remount-ro,commit=100,nobh,nouser_xattr,commit=0)      Why does it specify "commit=0" at the end? Does it mean that my commit=100 option is not used? I am using Ubuntu 10.10, 32-bit with the latest updates.


Is there a way to control the delay before shutdown on low battery?

Is there any way to configure shutdown on critically low battery to give me a bit of time before actually shutting down? I've set GNOME Power Manager to shutdown on low battery (hibernating does not work on my netbook). Problem is, I don't get any notification about battery running low, and as soon as battery level reaches the critical threshold, the system quickly kills applications and shuts down without me having any chance to quickly complete some tasks and/or save some data. Of course, I'd increase battery level thresholds to gain some more time to accomplish such tasks. If some other window manager has a more advanced power management facility than GNOME, I'm also willing to switch.


How to change temporarily font size in text console in openSUSE?

I found several answers already but all of them are focused on changing size for good, i.e. at Lilo/Grub level. I don't want this though. So, key issues:   1. changing size on-fly, I would like to increase size, and 5 minutes later, decrease it back   2. it is question about text console, not terminal running in X11 openSUSE 11.4 if this matters. Thank you in advance. _I am only interested in size of the font, not in typeface of it._


can not sftp: returns 128 "is the sftp server running"

I can ssh to my EC2 instance (amazon linux) (same user, from same machine, same certificate) however I can no longer use sftp. Logging in via WinScp (via my windows7 box) for SFTP used to work, but now it gives me "exit code 128, is sftp running" , the error log just shows me 'subsystem request for sftp' How can I get it to work? debugging delivers this:                   debug1: session_open: channel 0     debug1: session_open: session 0: link with channel 0     debug1: server_input_channel_open: confirm session     debug1: server_input_channel_req: channel 0 request simple@putty.projects.tartarus.org reply 0     debug1: session_by_channel: session 0 channel 0     debug1: session_input_channel_req: session 0 req simple@putty.projects.tartarus.org     debug1: server_input_channel_req: channel 0 request auth-agent-req@openssh.com reply 1     debug1: session_by_channel: session 0 channel 0     debug1: session_input_channel_req: session 0 req auth-agent-req@openssh.com     debug1: temporarily_use_uid: 222/500 (e=222/500)     debug1: restore_uid: (unprivileged)     debug2: fd 8 setting O_NONBLOCK     debug1: channel 1: new [auth socket]     debug1: server_input_channel_req: channel 0 request subsystem reply 1     debug1: session_by_channel: session 0 channel 0     debug1: session_input_channel_req: session 0 req subsystem     subsystem request for sftp     debug1: subsystem: exec() /usr/libexec/openssh/sftp-server     debug2: fd 5 setting TCP_NODELAY     debug2: fd 11 setting O_NONBLOCK     debug2: fd 10 setting O_NONBLOCK     debug1: Received SIGCHLD.     debug1: session_by_pid: pid 10940     debug1: session_exit_message: session 0 channel 0 pid 10940     debug2: channel 0: request exit-signal confirm 0     debug1: session_exit_message: release channel 0     debug2: channel 0: write failed     debug2: channel 0: close_write     debug2: channel 0: send eow     debug2: channel 0: output open -> closed     debug2: channel 0: read<=0 rfd 11 len 0     debug2: channel 0: read failed     debug2: channel 0: close_read     debug2: channel 0: input open -> drain     debug2: channel 0: ibuf empty     debug2: channel 0: send eof     debug2: channel 0: input drain -> closed     debug2: channel 0: send close     debug2: notify_done: reading     debug2: channel 0: rcvd close     debug2: channel 0: is dead     debug2: channel 0: gc: notify user     debug1: session_by_channel: session 0 channel 0     debug1: session_close_by_channel: channel 0 child 0     debug1: session_close: session 0 pid 0     debug2: channel 0: gc: user detached     debug2: channel 0: is dead     debug2: channel 0: garbage collecting     debug1: channel 0: free: server-session, nchannels 2     Connection closed by 1.2.3.4     debug1: channel 1: free: auth socket, nchannels 1     debug1: do_cleanup     debug1: temporarily_use_uid: 222/500 (e=222/500)     debug1: restore_uid: (unprivileged)     Transferred: sent 2472, received 2224 bytes     Closing connection to 1.2.3.4 port 42647     debug1: PAM: cleanup     debug1: PAM: closing session     debug1: PAM: deleting credentials      update: problem was I edited my .bashrc which outputted something to stdout. Since sftp starts up a new shell for the user and does not like that.... it fails with a exit code 128.


No eth0 after HD transplant

After moving the hard drive of a makeshift server to another compatible hardware (64-bit, same processor "generation", laptop->desktop) configuration, networking fails to initiate. Specifically:   * `ifconfig` only shows `lo`   * `sudo service networking restart` shows: -               stop: unknown instance:     networking stop/waiting      quite obviously something in the system and/or kernel is misconfigured for the new hardware setup. **How to detect what exactly is wrong and enable`eth0`?** The system in question is an Ubuntu 14.04 Server distro, but I suspect the problem is general.


Unique hardware signatures in BSD?

What unique hardware signatures can you get from, for example, a FreeBSD system? I am right now using the ethernet mac address (getifaddrs(3)) but as we all know this can easily be changed with ifconfig. So what else is there? Anything in sysctl? I am using C to do this so if I can just find out where to look I will most likely find a way to get it.


Several versions of JAVA on one PC

I want to use jre-1_5_0_21 on my Fedora 14 box. Here's whats installed on my PC:               $ update-alternatives --config java          There are 2 programs which provide 'java'.            Selection    Command     -----------------------------------------------     *+ 1           /usr/lib/jvm/jre-1.6.0-openjdk/bin/java        2           /usr/lib/jvm/jre-1.5.0-gcj/bin/java          Enter to keep the current selection[+], or type selection number: 1     failed to create /var/lib/alternatives/java.new: Permission denied     $       rpm -qa               $ rpm -qa | grep -i java     java-1.6.0-openjdk-plugin-1.6.0.0-52.1.9.7.fc14.i686     java-1.6.0-openjdk-1.6.0.0-52.1.9.7.fc14.i686     java-1.5.0-gcj-1.5.0.0-34.fc14.i686     java_cup-0.11a-4.fc13.noarch     tzdata-java-2011d-3.fc14.noarch     $       How can I have several versions of java installed on my PC, and selecting it by: "update-alternatives --config java"?      UPDATE: so like when having several php versions on a webserver, I need to have several versions of JAVA, and it would be a practical thing to switch between the versions with "update-alternatives" then restart the webbrowser -> then the applet, that needs previous version of java [...] would start simply [...]      Thanks!


Why is LPD not enabled by default in Transmission?

Since version **2.00**, Transmission has Local Peer Discovery feature, which seems quite useful. I was surprised that it wasn't enabled by default though, so I became concerned about any potential issues it might have.


What preparations should I make before reinstalling windows?

Since Windows still does not offer means to skip rewriting the MBR, what can I do _before_ reinstalling Windows to get Grub2 back into the MBR as easy as possible? (I'll also appreciate it if the answer then describes _how_ to restore Grub)


How to whitelist an URL in Privoxy (with a little regexp)

how can i whitelist these URLs in Privoxy?                 http://foo.org/user/10000/track?page=1     http://foo.org/user/10000/track?page=2     http://foo.org/user/10000/track?page=3     http://foo.org/user/10000/track?page=4     ...      I don't want to whitelist "foo.org" i just need to whitelist these specific url's.   the "page=NUMBER" where NUMBER=1..99999999 [so it's a big number, i don't know exactly how much]   What do i need to write in the "user.action" file? :\


How to ensure that anonymous FTP has been disabled on a Solaris 10 system?

What line in which configuration files in the `/etc/ftpd` directory do I have to check to ensure that anonymous FTP has been disabled? From my understanding now, to ensure that anonymous FTP is disabled, all the users assigned to the `anonusers` group in `/etc/ftpd/ftpaccess` has to be added to `/etc/ftpd/ftpusers` to deny them access. Is there a simpler way?


Kernel Hacking Environment

I have been working in embedded OS like uCOS, ThreadX. While I have coded apps in Linux, now I’m planning to start learning Linux Kernel. I have few questions regarding the environment.   1. Which is best distro, which has easy to use tools for kernel development? (so far I had used RHEL and Fedora. While I am comfortable with these, it also looks like Ubuntu has in-built scripts for easy kernel compilation like `make_kpkg`, etc)   2. Can you describe the best setup for kernel debugging? While debugging other embedded OSes, I have used serial port to dump progress, JTAG, etc. Which kind of setup does the Linux kernel devs use? (Will my testbed PC with serial port is enough for my needs? If yes, how to configure the kernel to dump to serial port?) I'm planning to redirect kernel messages to serial console which will be read in my laptop.   3. What tool is best for debugging and tracing kernel code? As mentioned earlier, is serial console the only way? Or any IDE/JTAG kind of interface exists for PC?


Is there something like wine to run OSX apps on linux?

This question answers why Linux can't run OSX apps, but is there some application similar to Wine that allows one to do so?


Ctrl-Alt-F1 not working from X

I have a system running Debian 5.0 that doesn't respond to Ctrl-Alt-F# (1-6) Check if Ctrl, Alt, F1 and F2 are intercepted correctly...               $ DISPLAY=:0 xwininfo          xwininfo: Please select the window about which you               would like information by clicking the               mouse in that window.          xwininfo: Window id: 0xe00002 (has no name)     ...          $ xev -display :0 -id 0xe00002     KeyPress event, serial 16, synthetic NO, window 0xe00002,         state 0x10, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,          KeyPress event, serial 16, synthetic NO, window 0xe00002,         state 0x10, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,          KeyPress event, serial 16, synthetic NO, window 0xe00002,         state 0x10, keycode 67 (keysym 0xffbe, F1), same_screen YES,          KeyPress event, serial 16, synthetic NO, window 0xe00002,         state 0x10, keycode 68 (keysym 0xffbf, F2), same_screen YES,      ..They are. However, xev does not report Ctrl-Alt-F1 as one single event. Does that mean, X does not correctly interpret that sequence? Check if X is configured to ignore Ctrl-Alt-F#..               $ grep -i dontvtswitch /etc/X11/xorg.conf      ..It isn't But killing X with Ctrl-Alt-Backspace allows me to switch ttys. The Xorg.0.log at pastebin. How enable tty switching when running X? The root filesystem is mounted as read-only. Can that affect how x setups up keyboard mappings? Tried mounting as read-write but the problem persists. Haven't been able to make the system boot up in read-write (I've set the boot options in the bootloader but something happens during boot that remounts the rootfs as readonly).


How do I find out the device node corresponding to my device in SuSE 8?

I'm forced to work with a bunch of point-of-sale systems running SuSE 8. They are my client's computers. We are stuck dealing with these old systems until they get to upgrade their whole fleet to SLE 11. The problem: the system now has two devices that compete for the ttyUSB* character device nodes. They have different vendor ID and product ID. SuSE 8 doesn't have udev, it has devfs instead. Knowing the device's vendor ID and product ID, and the kernel module responsible for the device (it's the ipaq kernel module), how do I find out what character device node it has been assigned to, in a way that it can be stored in a string (e.g. $DeviceNode) in a POSIX shell script? Right now, I'm doing it in a really really dumb way in my shell script:               DeviceNode=$(dmesg | tac | grep "PocketPC PDA converter now attached to" | set -n 's/.*now attached to \([[:alnum:]]\{1,\}\).*/\1/p')      So I get, for instance               > echo $DeviceNode     ttyUSB1     >      Of course, one of the problems is that the device may have already been unplugged and I wouldn't be able to tell with this naïve method. Is there any better way? EDIT: So I found this article this morning. Can I assume that, in /proc/tty/driver/usbserial, from the 2nd line onward, the first number of each line is the minor number of one of the ttyUSBx? EDIT 2: An alternate (and perhaps better) solution would be to get persistent node association (e.g. always getting a device with a known vendor ID and a known product ID to be associated with ttyUSB1). Is that achievable in devfs?


rm -r * in unix

I am about to enter the command: `rm -r *` in a directory where I would like all files and directories (and their files) removed. My concern is that unix also has the `./` and the `../` directories. `rm -r` should follow all directories: does that mean it will follow `../` and delete stuff in higher up directories? I can't seem to find the answer to this by googling.


How to use `expect` with `zipcloak`?

I create a `zip` file using `zip` which includes several files and directories, named `test.upd`. Now I want to use `expect` to automatically handle the password encryption. Here are two bash scripts, both do not work:               !/bin/bash          MYPWD="mypassword"          expect -c '         spawn zipcloak test.upd         expect {            "*Enter password*" { send "'"$MYPWD"'\r"                                        exp_continue                                       }            "*Verify password*" { send "'"$MYPWD"'\r"                                           exp_continue                                         }         }'      and this file:               !/bin/bash     MYPWD="mypassword"          expect -c '         spawn zipcloak test.upd         expect "*Enter password*"          send "'"$MYPWD"'\r"         expect "*Verify password*"          send "'"$MYPWD"'\r"              }'      I also tried to create an `expect` script directly:               #!/usr/bin/expect -f          spawn zipcloak test.upd     expect "*Enter password*"      send "password\r"     expect "*Verify password*"      send "password\r"      All scripts seem to send correctly the first password request, but it looks like the text for the second password entry is never asked. How can I do it right? Constraints:   * I have to use `zipcloak` (NOT `zip`)   * I want to use `expect` to automatically set the password. Remarks:   * I have used the correct script   * Each time, when using the first script, an empty file starting with `zi` is created in the directory, like `ziSvbYhy` or `zi3gzEQ4`.


How to delete line with Privoxy?

I know how to swap something with something with privoxy, e.g:               s/class="node ad"/class="node ad" style="display:none"/g      But how can I delete a line with privoxy? E.g.: If a line contains:               RANDOM STRING BEFOREOfftopic	RANDOM STRING AFTER      then what should I write in the user.action file to delete the line? I'm searching for this kind of "sed" effect in Privoxy:               echo -e "asdf\nsomething2\nadf" | sed '/thing2/d;'      If I use "/Offtopic/d" in the user.filter file it doesn't works. (And yes, I have other rules in user.filter perfectly working.)


How to compile dcp2icc?

After trying for hours I am unable to compile dcp2icc-0.1 on Linux. With a simple Makefile added to the original code it fails as follows:               g++ -o build/XMP/source/XMPCore/ExpatAdapter.o -c -O2 -iquote- -DUNIX_ENV=1 -D_FILE_OFFSET_BITS=64 -Ifixes/XMP-Toolkit -IXMP-Toolkit-SDK-4.4.2/build -IXMP-Toolkit-SDK-4.4.2/source/common -IXMP-Toolkit-SDK-4.4.2/source/XMPCore -IXMP-Toolkit-SDK-4.4.2/source/XMPFiles -IXMP-Toolkit-SDK-4.4.2/source/XMPFiles/FileHandlers -IXMP-Toolkit-SDK-4.4.2/source/XMPFiles/FormatSupport -IXMP-Toolkit-SDK-4.4.2/third-party/MD5 -IXMP-Toolkit-SDK-4.4.2/public/include XMP-Toolkit-SDK-4.4.2/source/XMPCore/ExpatAdapter.cpp     In file included from XMP-Toolkit-SDK-4.4.2/source/XMPCore/ExpatAdapter.cpp:10:0:     XMP-Toolkit-SDK-4.4.2/source/XMPCore/XMPCore_Impl.hpp: In function 'bool IsPathPrefix(XMP_StringPtr, XMP_StringPtr)':     XMP-Toolkit-SDK-4.4.2/source/XMPCore/XMPCore_Impl.hpp:371:28: error: 'strlen' is not a member of 'std'       XMP_StringLen prefixLen = std::strlen(prefix);                                 ^      This I understand is because some default includes were removed. I tried including everything that the files were missing (`cstdlib`, `inttypes.h`, `limits.h`, `cstring`), but:               g++ -o build/XMP/source/XMPFiles/FileHandlers/ASF_Handler.o -c -O2 -iquote- -DUNIX_ENV=1 -D_FILE_OFFSET_BITS=64 -Ifixes/XMP-Toolkit -IXMP-Toolkit-SDK-4.4.2/build -IXMP-Toolkit-SDK-4.4.2/source/common -IXMP-Toolkit-SDK-4.4.2/source/XMPCore -IXMP-Toolkit-SDK-4.4.2/source/XMPFiles -IXMP-Toolkit-SDK-4.4.2/source/XMPFiles/FileHandlers -IXMP-Toolkit-SDK-4.4.2/source/XMPFiles/FormatSupport -IXMP-Toolkit-SDK-4.4.2/third-party/MD5 -IXMP-Toolkit-SDK-4.4.2/public/include XMP-Toolkit-SDK-4.4.2/source/XMPFiles/FileHandlers/ASF_Handler.cpp     In file included from XMP-Toolkit-SDK-4.4.2/source/XMPFiles/XMPFiles_Impl.hpp:24:0,                      from XMP-Toolkit-SDK-4.4.2/source/XMPFiles/FileHandlers/ASF_Handler.hpp:13,                      from XMP-Toolkit-SDK-4.4.2/source/XMPFiles/FileHandlers/ASF_Handler.cpp:10:     fixes/XMP-Toolkit/LargeFileAccess.hpp:21:13: error: conflicting declaration 'typedef int LFA_FileRef'      typedef int LFA_FileRef;                  ^      I tried forcing the type declaration to `void *` (thanks Howard!):               g++ -o build/XMP/source/common/LargeFileAccess.o -c -O2 -iquote- -DUNIX_ENV=1 -D_FILE_OFFSET_BITS=64 -Ifixes/XMP-Toolkit -IXMP-Toolkit-SDK-4.4.2/build -IXMP-Toolkit-SDK-4.4.2/source/common -IXMP-Toolkit-SDK-4.4.2/source/XMPCore -IXMP-Toolkit-SDK-4.4.2/source/XMPFiles -IXMP-Toolkit-SDK-4.4.2/source/XMPFiles/FileHandlers -IXMP-Toolkit-SDK-4.4.2/source/XMPFiles/FormatSupport -IXMP-Toolkit-SDK-4.4.2/third-party/MD5 -IXMP-Toolkit-SDK-4.4.2/public/include XMP-Toolkit-SDK-4.4.2/source/common/LargeFileAccess.cpp     XMP-Toolkit-SDK-4.4.2/source/common/LargeFileAccess.cpp: In function 'void LFA_Close(LFA_FileRef)':     XMP-Toolkit-SDK-4.4.2/source/common/LargeFileAccess.cpp:575:20: error: cast from 'LFA_FileRef {aka void*}' to 'int' loses precision [-fpermissive]        int descr = (int)file;                         ^      I tried compiling using 32-bit mode:               g++ -o build/XMP/source/XMPCore/XMPCore_Impl.o -c -m32 -O2 -iquote- -DUNIX_ENV=1 -D_FILE_OFFSET_BITS=64 -Ifixes/XMP-Toolkit -IXMP-Toolkit-SDK-4.4.2/build -IXMP-Toolkit-SDK-4.4.2/source/common -IXMP-Toolkit-SDK-4.4.2/source/XMPCore -IXMP-Toolkit-SDK-4.4.2/source/XMPFiles -IXMP-Toolkit-SDK-4.4.2/source/XMPFiles/FileHandlers -IXMP-Toolkit-SDK-4.4.2/source/XMPFiles/FormatSupport -IXMP-Toolkit-SDK-4.4.2/third-party/MD5 -IXMP-Toolkit-SDK-4.4.2/public/include XMP-Toolkit-SDK-4.4.2/source/XMPCore/XMPCore_Impl.cpp     In file included from /usr/include/c++/4.9.1/bits/stl_algo.h:59:0,                      from /usr/include/c++/4.9.1/algorithm:62,                      from XMP-Toolkit-SDK-4.4.2/source/XMPCore/XMPCore_Impl.cpp:16:     /usr/include/c++/4.9.1/cstdlib:178:10: error: expected unqualified-id before '__int128'        inline __int128               ^      What do I need to do to make this compile? Is this approach even sound?


Fedora doesn't boot after migration to new disk

I bought a new larger SSD and copied all data from the old SSD to the new one. On the SSD I have `Ubuntu` and `Fedora`, `Ubuntu` works normally after migration but `Fedora` boots into `Emergency Mode`. I have pasted the contents of my system output when I try to boot into `Fedora` here.


What's the difference between the Partition GUID Code and Partition unique GUID?

I'm just reading up on GUID partition tables, and messing around with `gdisk`, I see these two titles. What is the difference between them? I am referring to the following (emphasis mine) shown when running `gdisk`: > GPT fdisk (gdisk) version 0.8.7 > > Type device filename, or press to exit: /dev/sda   >  Partition table scan:   >  MBR: protective   >  BSD: not present   >  APM: not present   >  GPT: present > > Found valid GPT with protective MBR; using GPT. > > Command (? for help): i   >  Partition number (1-7): 4 > > **Partition GUID code: EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 (Microsoft basic > data)** > > **Partition unique GUID: 85E66D2F-3709-4060-938E-FFE836433CC9**   >  First sector: 2844672 (at 1.4 GiB)   >  Last sector: 651208703 (at 310.5 GiB) Partition size: 648364032 sectors > (309.2 GiB) Attribute flags: 0000000000000000 Partition name: 'Basic data > partition' > > Command (? for help):


Why did yum-builddep not provide the dependencies to install my rpm?

I am trying to rum my rpm package but getting this dependencies error.               [root@localhost ~]# rpm -ivh /root/x86_64/asterisk-1.8.12.2-1.fc15.x86_64.rpm      error: Failed dependencies:             libc.so.6(GLIBC_2.14)(64bit) is needed by asterisk-1.8.12.2-1.fc15.x86_64             libc.so.6(GLIBC_2.7)(64bit) is needed by asterisk-1.8.12.2-1.fc15.x86_64             libc.so.6(GLIBC_2.8)(64bit) is needed by asterisk-1.8.12.2-1.fc15.x86_64             libcap.so.2()(64bit) is needed by asterisk-1.8.12.2-1.fc15.x86_64             libcrypto.so.10()(64bit) is needed by asterisk-1.8.12.2-1.fc15.x86_64             libedit.so.0()(64bit) is needed by asterisk-1.8.12.2-1.fc15.x86_64             libgsm.so.1()(64bit) is needed by asterisk-1.8.12.2-1.fc15.x86_64             libpopt.so.0(LIBPOPT_0)(64bit) is needed by asterisk-1.8.12.2-1.fc15.x86_64             libresample.so.1()(64bit) is needed by asterisk-1.8.12.2-1.fc15.x86_64             libspeexdsp.so.1()(64bit) is needed by asterisk-1.8.12.2-1.fc15.x86_64             libsrtp.so.0()(64bit) is needed by asterisk-1.8.12.2-1.fc15.x86_64             libssl.so.10()(64bit) is needed by asterisk-1.8.12.2-1.fc15.x86_64             libtinfo.so.5()(64bit) is needed by asterisk-1.8.12.2-1.fc15.x86_64             libxml2.so.2(LIBXML2_2.4.30)(64bit) is needed by asterisk-1.8.12.2-1.fc15.x86_64             libxml2.so.2(LIBXML2_2.6.0)(64bit) is needed by asterisk-1.8.12.2-1.fc15.x86_64             rpmlib(FileDigests) <= 4.6.0-1 is needed by asterisk-1.8.12.2-1.fc15.x86_64             rpmlib(PayloadIsXz) <= 5.2-1 is needed by asterisk-1.8.12.2-1.fc15.x86_64      To resolve the dependency error i used following command.               [root@localhost ~]# yum-builddep asterisk-1.8.12.2-1.fc15.src.rpm      Loaded plugins: fastestmirror     Loading mirror speeds from cached hostfile      * base: mirrors.hns.net.in      * extras: mirrors.hns.net.in      * updates: mirrors.hns.net.in     Checking for new repos for mirrors     autoconf-2.59-12.noarch     automake-1.9.6-2.3.el5.noarch     openssl-devel-0.9.8e-22.el5_8.4.x86_64     newt-devel-0.52.2-15.el5.x86_64     ncurses-devel-5.5-24.20060715.x86_64     libcap-devel-1.10-26.x86_64     gtk2-devel-2.10.4-21.el5_7.7.x86_64     Error: No Package found for libsrtp-devel      I am using CentOS 5.6 which is installed in VirtualBox on Fedora-15.


Elantech Mouse Touchpad not working well

I have a dual-boot Ubuntu/Debian (GNOME) machine: My mouse touchpad does not work correctly (right-click not recognized, cannot do 2 finger drag and drop/highlight) on Debian, but it **does work properly in Ubuntu**. I have so far overwritten `.conf` files in Debian with `.conf` files from Ubuntu in `/usr/share/X11/xorg.conf.d/` and restarted X, and rebooted. However I still have this problem. I am unsure as to where to go without having a program configure everything for me. If possible I would like to know how to fix this, and where I am getting my configurations from. **Outputs:** * * * **ORIGINALLY** I did not have a `/etc/dev/X11/xorg.conf` file, or a `/etc/dev/X11/xorg.conf.d/` directory (neither Ubuntu or Debian). I then made this file by doing `X -configure` and copying the `xorg.config.new` file to etc/dev/X11/xorg.conf` Output of `cat /var/log/Xorg.0.log |grep Elantech`: Here # More steps taken: From Ubuntu:   * Opened tty,`Ctrl`+`Alt`+`F1`   * `sudo service lightdm stop` stop lightdm    * `sudo X -configure` grab X configuration   * `sudo start lightdm` re-start lightdm Next steps are to move to Debian, and see if mouse works.   * It does not.  * * * Compared `X -configure` from Debian, and Ubuntu: ## (Debian)               Section "ServerLayout"         Identifier     "X.org Configured"         Screen      0  "Screen0" 0 0         Screen      1  "Screen1" RightOf "Screen0"         Screen      2  "Screen2" RightOf "Screen1"         InputDevice    "Mouse0" "CorePointer"         InputDevice    "Keyboard0" "CoreKeyboard"     EndSection                              Section "Files"         ModulePath   "/usr/lib/xorg/modules"         FontPath     "/usr/share/fonts/X11/misc"         FontPath     "/usr/share/fonts/X11/cyrillic"         FontPath     "/usr/share/fonts/X11/100dpi/:unscaled"         FontPath     "/usr/share/fonts/X11/75dpi/:unscaled"         FontPath     "/usr/share/fonts/X11/Type1"         FontPath     "/usr/share/fonts/X11/100dpi"         FontPath     "/usr/share/fonts/X11/75dpi"         FontPath     "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"         FontPath     "built-ins"     EndSection                              Section "Module"         Load  "extmod"         Load  "dri"         Load  "dbe"         Load  "dri2"         Load  "glx"         Load  "record"     EndSection                              Section "InputDevice"         Identifier  "Keyboard0"         Driver      "kbd"     EndSection                              Section "InputDevice"         Identifier  "Mouse0"         Driver      "mouse"         Option      "Protocol" "auto"         Option      "Device" "/dev/input/mice"         Option      "ZAxisMapping" "4 5 6 7"     EndSection                              Section "Monitor"         Identifier   "Monitor0"         VendorName   "Monitor Vendor"         ModelName    "Monitor Model"     EndSection                              Section "Monitor"         Identifier   "Monitor1"         VendorName   "Monitor Vendor"         ModelName    "Monitor Model"     EndSection                              Section "Monitor"         Identifier   "Monitor2"         VendorName   "Monitor Vendor"         ModelName    "Monitor Model"     EndSection                              Section "Device"             ### Available Driver options are:-             ### Values: : integer, : float, : "True"/"False",             ### : "String", : " Hz/kHz/MHz",             ### : "%"             ### [arg]: arg optional             #Option     "AccelMethod"           #              #Option     "DRI"                   # []             #Option     "ColorKey"              #              #Option     "VideoKey"              #              #Option     "Tiling"                # []             #Option     "LinearFramebuffer"     # []             #Option     "Shadow"                # []             #Option     "SwapbuffersWait"       # []             #Option     "TripleBuffer"          # []             #Option     "XvPreferOverlay"       # []             #Option     "DebugFlushBatches"     # []             #Option     "DebugFlushCaches"      # []             #Option     "DebugWait"             # []             #Option     "HotPlug"               # []             #Option     "RelaxedFencing"        # []             #Option     "Throttle"              # []             #Option     "UseVmap"               # []             #Option     "ZaphodHeads"           #              #Option     "DelayedFlush"          # []             #Option     "FallbackDebug"         # []             #Option     "BufferCache"           # []         Identifier  "Card0"         Driver      "intel"         BusID       "PCI:0:2:0"     EndSection                              Section "Device"             ### Available Driver options are:-             ### Values: : integer, : float, : "True"/"False",             ### : "String", : " Hz/kHz/MHz",             ### : "%"             ### [arg]: arg optional             #Option     "ShadowFB"              # []             #Option     "Rotate"                #              #Option     "fbdev"                 #              #Option     "debug"                 # []         Identifier  "Card1"         Driver      "fbdev"         BusID       "PCI:0:2:0"     EndSection                              Section "Screen"         Identifier "Screen0"         Device     "Card0"         Monitor    "Monitor0"         SubSection "Display"             Viewport   0 0             Depth     1         EndSubSection         SubSection "Display"             Viewport   0 0             Depth     4         EndSubSection         SubSection "Display"             Viewport   0 0             Depth     8         EndSubSection         SubSection "Display"             Viewport   0 0             Depth     15         EndSubSection         SubSection "Display"             Viewport   0 0             Depth     16         EndSubSection         SubSection "Display"             Viewport   0 0             Depth     24         EndSubSection     EndSection                              Section "Screen"         Identifier "Screen1"         Device     "Card1"         Monitor    "Monitor1"         SubSection "Display"             Viewport   0 0             Depth     1         EndSubSection         SubSection "Display"             Viewport   0 0             Depth     4         EndSubSection         SubSection "Display"             Viewport   0 0             Depth     8         EndSubSection         SubSection "Display"             Viewport   0 0             Depth     15         EndSubSection         SubSection "Display"             Viewport   0 0             Depth     16         EndSubSection         SubSection "Display"             Viewport   0 0             Depth     24         EndSubSection     EndSection                              Section "Screen"         Identifier "Screen2"         Device     "Card2"         Monitor    "Monitor2"         SubSection "Display"             Viewport   0 0             Depth     1         EndSubSection         SubSection "Display"             Viewport   0 0             Depth     4         EndSubSection         SubSection "Display"             Viewport   0 0             Depth     8         EndSubSection         SubSection "Display"             Viewport   0 0             Depth     15         EndSubSection         SubSection "Display"             Viewport   0 0             Depth     16         EndSubSection         SubSection "Display"             Viewport   0 0             Depth     24         EndSubSection     EndSection      ` ## (Ubuntu)               Section "ServerLayout"         Identifier     "X.org Configured"         Screen      0  "Screen0" 0 0         InputDevice    "Mouse0" "CorePointer"         InputDevice    "Keyboard0" "CoreKeyboard"     EndSection                              Section "Files"         ModulePath   "/usr/lib/xorg/modules"         FontPath     "/usr/share/fonts/X11/misc"         FontPath     "/usr/share/fonts/X11/cyrillic"         FontPath     "/usr/share/fonts/X11/100dpi/:unscaled"         FontPath     "/usr/share/fonts/X11/75dpi/:unscaled"         FontPath     "/usr/share/fonts/X11/Type1"         FontPath     "/usr/share/fonts/X11/100dpi"         FontPath     "/usr/share/fonts/X11/75dpi"         FontPath     "built-ins"     EndSection                              Section "Module"         Load  "glx"     EndSection                              Section "InputDevice"         Identifier  "Keyboard0"         Driver      "kbd"     EndSection                              Section "InputDevice"         Identifier  "Mouse0"         Driver      "mouse"         Option      "Protocol" "auto"         Option      "Device" "/dev/input/mice"         Option      "ZAxisMapping" "4 5 6 7"     EndSection                              Section "Monitor"         Identifier   "Monitor0"         VendorName   "Monitor Vendor"         ModelName    "Monitor Model"     EndSection                              Section "Device"             ### Available Driver options are:-             ### Values: : integer, : float, : "True"/"False",             ### : "String", : " Hz/kHz/MHz",             ### : "%"             ### [arg]: arg optional             #Option     "NoAccel"               # []             #Option     "AccelMethod"           #              #Option     "Backlight"             #              #Option     "DRI"                   #              #Option     "ColorKey"              #              #Option     "VideoKey"              #              #Option     "Tiling"                # []             #Option     "LinearFramebuffer"     # []             #Option     "VSync"                 # []             #Option     "PageFlip"              # []             #Option     "SwapbuffersWait"       # []             #Option     "TripleBuffer"          # []             #Option     "XvPreferOverlay"       # []             #Option     "HotPlug"               # []             #Option     "ReprobeOutputs"        # []             #Option     "XvMC"                  # []             #Option     "ZaphodHeads"           #              #Option     "VirtualHeads"          #              #Option     "TearFree"              # []             #Option     "PerCrtcPixmaps"        # []             #Option     "FallbackDebug"         # []             #Option     "DebugFlushBatches"     # []             #Option     "DebugFlushCaches"      # []             #Option     "DebugWait"             # []             #Option     "BufferCache"           # []         Identifier  "Card0"         Driver      "intel"         BusID       "PCI:0:2:0"     EndSection                              Section "Screen"         Identifier "Screen0"         Device     "Card0"         Monitor    "Monitor0"         SubSection "Display"             Viewport   0 0             Depth     1         EndSubSection         SubSection "Display"             Viewport   0 0             Depth     4         EndSubSection         SubSection "Display"             Viewport   0 0             Depth     8         EndSubSection         SubSection "Display"             Viewport   0 0             Depth     15         EndSubSection         SubSection "Display"             Viewport   0 0             Depth     16         EndSubSection         SubSection "Display"             Viewport   0 0             Depth     24         EndSubSection     EndSection      ` I do not notice a difference between the pointing devices. Output of `synclient -l`:               Parameter settings:     LeftEdge                = 130     RightEdge               = 3130     TopEdge                 = 96     BottomEdge              = 1697     FingerLow               = 1     FingerHigh              = 1     FingerPress             = 256     MaxTapTime              = 180     MaxTapMove              = 163     MaxDoubleTapTime        = 180     SingleTapTimeout        = 180     ClickTime               = 100     FastTaps                = 0     EmulateMidButtonTime    = 75     EmulateTwoFingerMinZ    = 282     EmulateTwoFingerMinW    = 7     VertScrollDelta         = 74     HorizScrollDelta        = 74     VertEdgeScroll          = 0     HorizEdgeScroll         = 0     CornerCoasting          = 0     VertTwoFingerScroll     = 1     HorizTwoFingerScroll    = 1     MinSpeed                = 1     MaxSpeed                = 1.75     AccelFactor             = 0.0537634     TrackstickSpeed         = 40     EdgeMotionMinZ          = 30     EdgeMotionMaxZ          = 160     EdgeMotionMinSpeed      = 1     EdgeMotionMaxSpeed      = 297     EdgeMotionUseAlways     = 0     TouchpadOff             = 1     LockedDrags             = 0     LockedDragTimeout       = 5000     RTCornerButton          = 0     RBCornerButton          = 0     LTCornerButton          = 0     LBCornerButton          = 0     TapButton1              = 1     TapButton2              = 3     TapButton3              = 2     ClickFinger1            = 1     ClickFinger2            = 1     ClickFinger3            = 1     CircularScrolling       = 0     CircScrollDelta         = 0.1     CircScrollTrigger       = 0     CircularPad             = 0     PalmDetect              = 0     PalmMinWidth            = 10     PalmMinZ                = 200     CoastingSpeed           = 20     CoastingFriction        = 50     PressureMotionMinZ      = 30     PressureMotionMaxZ      = 160     PressureMotionMinFactor = 1     PressureMotionMaxFactor = 1     GrabEventDevice         = 1     TapAndDragGesture       = 1     AreaLeftEdge            = 0     AreaRightEdge           = 0     AreaTopEdge             = 0     AreaBottomEdge          = 0     HorizHysteresis         = 18     VertHysteresis          = 18     ClickPad                = 0


Why don't my arrow keys work in sh?

I recently installed Ubuntu and when I run sh on the Terminal my arrow keys don't work so I can't go through my call history or edit whatever I'm typing. It just comes out as weird characters like `^[[A`. The login shell is bash and it works fine but as soon as I switch to sh, they don't work. How can I fix this?


Dotdeb says PHP 5.3.18 is the latest

I'm using Debian 6 . Now I don't understand why it says PHP 5.3.18 is the latest when 5.3.2 has been around for 2 years? I need at least PHP 5.3.2 for my symfony project. Thanks.


KDE taskbar labels disappear

I'm using Linux Mint 13 KDE. If I open more than 9 windows at once, all the labels on all my taskbar buttons disappear. Each one is left with only the icon, centered in its taskbar button. I found an Ubuntu bug about it ( https://bugs.launchpad.net/ubuntu/+source/kde-workspace/+bug/951553 ), but it's 8 months old and has no comments, which makes it seem like no one has seen it. What I want is for the taskbar buttons to just continue to get smaller and smaller the more windows I open, with the labels more and more aggressively truncated as the buttons get smaller. The labels already _are_ truncated when I open up to 9 windows, but when I open the 10th one it seems to switch to this totally different icon-only display. I don't want that. I just want it to keep showing less and less of the label, gradually. How can I achieve this?


How Can Terminal Emulators Kill Their Children After Recieving a SIGKILL?

From what I understand, SIGKILL cannot be caught. This would imply that a process does not have time to kill it's children before the OS destroys it. This can be demonstrated with a shell script.               #! /bin/bash          trap : SIGTERM SIGINT SIGKILL # SIGKILL is pointless.          mplayer video.avi      Killing it with SIGKILL leaves mplayer running.               $ kill -9 $pid      But when using a terminal emulator (xterm, Terminal, ...) it's children get killed along with it. How is this possible?               $ mplayer      And kill it:               $ kill -9 $terminal_pid      And mplayer goes down with the ship. Are terminal emulators somehow catching SIGKILL or is there another force at work here?


Locking the screen via CLI?

Is there any way that I can lock the screen CLI-style? I'm trying to target as many desktop managers as possible (mostly LightDM, but GDM, KDM, SLiM, XScreensaver, etc. would be great too), but I can only dig things up for GDM and XScreensaver. For GDM, it would be:               gnome-screensaver-command -l      For XScreensaver:               xscreensaver-command -lock      Is there a similar command for KDM and LightDM?


What do you filter / exclude list when doing backup with rsync?

I'm trying to build a comprehensive filter / exclude file, to prevent backuping stuff that doesn't make sense do backup, such as temporary / cache data or easily recreatable files. I would appreciate if you could share (part of) your exclude list for rsync backups. Here is what I have so far:               ## Universal excludes          lost+found     ld.so.cache          # backup text files (e.g. from Emacs)     - *~     - \#*\#          # Commonly distributed Mac OS X cache     - .DS_Store          # Commonly distributed Windows cache     - Thumbs.db          ## Root file system     - /dev/     - /etc/modules.conf     - /media/     - /proc/     - /sys/     - /tmp/     - /usr/portage/     - /usr/src/     - /var/tmp/     - /var/log/          # Of the mounted stuff, whitelist only my two data partitions     - /mnt/     + /mnt/data1     + /mnt/data2          # Common package managers (apt, yum)     - /var/cache/apt/     - /var/cache/yum/          ## Filters for home dirs (assumes /home/<user> dir structure)          # Cache     - /home/*/.cache/          # Downloads     - /home/*/Downloads/     + /home/*/Downloads/src/          # Dropbox     - /home/*/Dropbox          # Temporary files / cache     - /home/*/.local/share/Trash     - /home/*/.cache     - /home/*/.Trash          # X Windows System     - /home/*/.xsession-errors*          # Gnome temp stuff     - /home/*/.compiz*/session     - /home/*/.gksu.lock     - /home/*/.gvfs          # Common Applications          # Adobe Reader     - /home/*/.adobe/**/AssetCache/     - /home/*/.adobe/**/Cache/     - /home/*/.adobe/**/Temp/     - /home/*/.adobe/**/UserCache.bin          # Dropbox temp stuff     - /home/*/.dropbox/     - /home/*/.dropbox-dist/          # Gimp     - /.gimp-*/tmp     - /.gimp-*/swap          # Mozilla Firefox     - /home/*/.mozilla/firefox/*/Cache/     - /home/*/.mozilla/firefox/*/lock     - /home/*/.mozilla/firefox/*/.parentlock          # Mozilla Thunderbird     - /home/*/.mozilla-thunderbird/*/lock     - /home/*/.mozilla-thunderbird/*/.parentlock          # Pidgin (accounts.xml contains passwords in clear text)     - /home/*/.purple/accounts.xml      What else do you think would be useful to add to this filter file, or what do you use and why?


Can I run Linux on N130 Network Terminal Thin Client?

I've found this small device, named **N130 Network Terminal Thin Client** on several webshops. The datasheet says that it is running _"Embedded Eglobal operating firmware"_. I think, there is a good chance on that it is a minimal Linux distribution. So if it is, can I use it as a weak Linux server? Has anyone experience with it? (P.S. I know what a thin client is, and I also know that a "firmware Linux" may have several restrictions.) EDIT: http://www.eglobaltech.cn/ViewDetails67.aspx EDIT2: Confirmed answer should describe that _how_ can I use it as a weak Linux server, or tell _why_ I can't do it. Also, I would be happy with a good datasheet, too.


iptables forwarding and routing

In fact, this question is about openwrt and CoovaAP, but I guess it's the same in other linux distributions. I've two interfaces, a "wan" and a "wlan" interface. Is there by default any filter, which restricts which packets are forwarded from the wlan interface to the wan? Especially if the wlan interface on the router is 192.168.1.1 and someone connected to this interface enters 172.16.1.1 as IP on his machine. Are his packets then forwarded anyway? Is the routing decision only made up by the destination IP or is it influenced by the source? I think the problem would be that answers to the 172.16.1.1 machine wouldn't make their way back. Could the iptables forward rules make the interfaces behave like a switch? If I wanted 172.16.x to be forwarded, I could setup an alias on this physical interface. Is there another way? The default Coova firewall script just says               iptables -A FORWARD -i $WIFI -o $WAN -j ACCEPT      I disabled masquerading. Is it possible to "separate" networks in this way and to rely on this? Is there a way someone could make his packets be forwarded with a not-192.168.1.x address? The reason for this question is, that behind the WAN-interface are machines which should not be reachable for WLAN users. Those machines rely on the source-IP address.


how to solve the problem of network DHCP when I install Debian?

I am trying to install Debian 6, but I have a problem every time I pass through the network part, it says cannot recognize the DHCP and couldnt connect to the network, so, I tried manually to configure, it is connected to a network with a router, so, I assigned the IP and the Gateway but still, doesnt work, cannot connect to internet, the weird part is that I tried in other occasion and it worked, now I want to install it again and does not work! :-s what could it be? Also when I try to install with a swap partition I get an error when formatting, if a create a partition for swap but without installing it it works... I set that as ext3 mount on / set as booteable. Any idea of what these errors could be? thanks.


Thin client that is only allowed to run certain applications

Im thinking about testing out LTSP on a PPC server for a handful of PPC macs. Before I go ahead with testing and building out everything, is it possible to limit what apps are ran on the thin client? Lets say I only want the thin client to be able to run a web browser and adobe reader, is that possible? Almost like an internet café. I'm also open to other suggestions, maybe thin provisioning isn't the right track to head down if I want a really 'locked' down OS.


UID/GID with sshfs of Linux FUSE

mkdir ~/mnt/2letter     echo PASSWORD | sshfs -o password_stdin www-data@localhost:/var/www/sites/2letter ~/mnt/2letter -o sshfs_sync,cache=no,password_stdin After this:               $ ls -ld ~/mnt/2letter/     drwxr-xr-x 1 www-data www-data 4096 Jan 28 21:29 /home/porton/mnt/2letter/ I need to access /home/porton/mnt/2letter/ under my UID (`porton`) not as `www-data`, because I am not allowed by file system permissions to modify `www-data` owner files, but need to edit them. Moreover it seems to have been working with the correct UID with older versions of Linux. Why doesn't it work now?


Creating deb file: hidden files specification by `install` file

I'm creating a deb-file and enumerating the files and paths I need to have in the package using the `install` file. It looks like               dir1/* path1     dir2/* path2     ...      But in a result `deb`-file there are no hidden files from `dir1` and `dir2`. It looks like `*` doesn't match hidden files. How could I match them apart from specifying each one explicitly?