Two exact copies of folder using FTP and command-line only

I'm looking for any solution that will allow me to emulate functionallity similar to Dropbox/rsync using only FTP protocol and command-line. The general problem is, that I have to run it on a very limited Linux (actually NAS), so I can't install / use to complex solutions (not enough resources to run) and/or GUI utils, as I have no GUI there. SSH also works weak on that NAS and is not present at all on one of destinations. What I need, is to have a command-line (bash) script or program that I will be able to run periodically (via CRON) that will assure that `source` and `destination` are identical:   * all files on both sides copied to both sides,   * if two files of the same name exists, copy newest version of a file to both sides,   * delete on one side all files that are missing on another one. Of course, this solution must support iteration on all subfolders of both source and destination, for this to work succesfully -- there will be a large directory structure on both sides. I've tried many backups solutions, but most of them failed for one of these reasons:   * unable to create exact duplicate copy of both sides and offering incremental backup instead,   * not able to be run directly from command-line, on very limited Linux distro. I was advised to use Unison and give it a good try. This really looks good, but it uses SSH, and I'm unable to establish SSH connection to one of my destinations (not supported) -- i.e. FTP access is the only available way. The perfect solution for me would be anything that I can run (command-line or configuration) like this:               something.sh path/to/local/folder ftp://user:pass@111.11.11.1/path/to/folder      If it does exists at all...


How to set an expired authentication in Apache?

Using a simple virtual host, I've to set a timeout after X minutes (same of set an expired authentication) to force the user to re-insert its credentials.               [...]     <Directory /home/user1/>             Order allow,deny             Allow from All             Options -FollowSymLinks +Indexes +Includes -MultiViews             IndexOptions +IgnoreCase +SuppressDescription +FoldersFirst +NameWidth=40 +SuppressHTMLPreamble +FancyIndexing +IconHeight=16 +IconWidth=16             AllowOverride none             AuthUserFile /etc/apache2/user1.pass             AuthName "server.example.com"             AuthType Digest             require valid-user     </Directory>     [...]


firewall and SElinux disabled for postfix for configuration troubleshooting

Why would you disable your firewall and SElinux for postfix and not re enable after configuration? Also why would I have no conf file in SElinux folder only these `restorecond.conf` `restorecond_user.conf` `semanage.conf` I am trying to test postfix I've already installed and I am getting Connection refused. Would this have something to do with network range because I don't know how to work out what that should be, where do I work out that information?


Is there file format for checksums?

I want to store SHA512 checksum of the file for my application. How to do it in common (popular) way? So this checksum can be used but by third party application too.


Problem with openSUSE 12.3 dual-boot installation (with Windows 7)

I have a current Windows 7 64 bit installation that I'm using and I wish to create an openSUSE 12.3 partition on my HDD (not my SSD Windows drive). I used the Windows Disk Management tool to shrink my HDD and create room for the openSUSE partition. My hard drive and partition setup is as follows:               120GB SSD     (C:) - 120GB SSD with Windows installed     2TB HDD     (E:) - 1.4TB main partition.     (F:) - 300GB games partition.     Unallocated - 100GB taken from E:      (Screenshot 1 shows the setup in Disk Management)    ![ss of disk mgmt](http://i.stack.imgur.com/DKoJi.jpg) I shrunk my E: drive from 1.5TB down to 1.4TB in order to make the 104200MB space that I wanted for my Linux partition. I defragged E: and F: before I tried to install openSUSE. I got an error at the partition setup step of the installation (Screenshot 3).    ![ss of suse installer](http://i.stack.imgur.com/Yy7Vj.jpg) I took a screenshot of the Disk Defragmenter before installation (after I had run the defrag)(Screenshot 2).    ![ss of defrag](http://i.stack.imgur.com/ama4O.png) Original Screenshots here: http://imgur.com/a/USv8f


Slow terminal print out

Just installed (netinstall) debian wheezy on a second machine newer machine however the terminal print out is noticeable slower than on the old machine although the new have faster CPU, RAM and HDD (an SSD). When login in on the new machine with ssh it is as fast as I expect it to be. It is obvious that the out put speed is related to computer/display and not just the computer. For example the `dpkg -l` via virtual console takes 10s to print out and is instant via ssh. X is not installed it is just a fresh installation of Debian Wheezy. I assume this related to KMS but I am not sure where to start.


/dev/shm/ecryptfs-$USER-Private keeps climbing in Kubuntu 12.10 Install

I'm having a problem with an installation of Kubuntu 12.10 with an encrypted home directory. I've been trying to figure it out for several weeks. For transparency, I'll note here that I posted this question on askubuntu.com for a while, but have taken it down from there and posted here, instead, because of a lack of response. I noticed a few weeks ago that when I logged out of my system, my encrypted home directory would not always be re-encrypted -- I was still able to view and access the files within the home directory when I SSHed into the computer from another computer (to be clear, my SSHD requires a shared key -- this might be relevant later). I did some reading, and found out that `ecryptfs` relies on a counter file in `/dev/shm/ecryptfs-$USER-Private` to know when to re-encrypt the home directory: When a user is logged in, the counter is '1', and when the user logs out, the counter hits '0' and triggers encryption. Running `cat /dev/shm/ecryptfs-my_user_name-Private` periodically, I found something odd: the counter file stays at 1 for a while after I log in on the physical machine, and then starts growing. At one point, after leaving the system on for several days, it was (as I remember) at 93! I found a report about the same type of issue at http://www.mail- archive.com/ecryptfs@lists.launchpad.net/msg01705.html. That page stated that different things can cause counter increases, including `ssh` logins and `cron`. Even having read that page, I'm having a lot of trouble figuring out what's causing the issue. Here are some things that I've observed: 1) Although the counter resets to 1 when I restart my computer and then log back in, the counter still begins to increase after several hours once I'm logged in. 2) This happens even when I have no active SSH connections to my computer. 3) This happens even when my computer is on different networks. Thus, I don't think that it has to do with an unauthorized user gaining access to my system. 4) This does not seem to do with using sudo in the terminal (or the equivalent in a GUI). 5) I set up a cron job to record the output of `cat /dev/shm/ecryptfs- my_user_name-Private` every 5 minutes, and couldn't find any correlation between anything that I was doing at the time and the point at which the counter started increasing (to start, from 1 to 3). 6) I've also disabled all of my custom crontab entries other than the script mentioned above that records the counter every five minutes. Increases in the counter do not seem to be correlated with this script running through `cron`. Anacrontab also doesn't have any custom entries. **Results of Logging** I started logging the counter's value every five minutes for several days. On a typical day, here are the results: After a restart of the computer, I logged in through SSH. The counter was at 1 for the duration of my session, which lasted a few hours. I then disabled networking and logged in to the physical machine (using the KDE DE). The counter was at 1 for 50 minutes, and then jumped to 3. I had enabled wifi around that time. An hour later, the number jumped to 420. Five minutes after that, it was at 537, where it stayed until I shut down the machine, at least a half-hour later. `w` showed three lines: One on tty7, one on pts/1 (`kdeinit4: kded4 [kdeinit]`), and one on pts/3 (the terminal that I was using `w` in). Thus, I think that it was not that 537 users were logged into my computer. What could be going on here? Later, I started logging the counter at `/dev/shm/ecryptfs-$USER-Private` every minute, and then looked at the system log in /var/sys/syslog during minutes during which the counter increased. The only thing that I could see that was consistent across minutes during which the counter increased was a steady stream of "[UFW BLOCK]" lines (to be clear, I use `ufw` as a system firewall, and only have one port open, for SSH). Nothing else seems to be consistent from incident to incident, except for my cron job that logs the counter (this cron job is not always associated with an increase in the counter, though, and was not present when the problem started). What should I try next to figure this out? I'll be very grateful for any advice or ideas.


How to limit available virtual memory per process

Occasionally some processes on my GNU/Linux desktop (such as gv and gnash) use up the physical memory and cause thrashing. Since these processes aren't important, I want them to be automatically killed if they use too much memory. I think the /etc/security/limits.conf file and the -v option could be used for this. The question is whether it limits the amount of available memory per process of a particular user, or the sum for all the processes of a user. Also I would like to ask how to make change to that file in effect without rebooting.


installing radeon card under debian

I have this lenovo z575 with radeon HD 6520G. I have installed Crunchbang Linux and want to configure the video card. I installed open drivers (x-server-xorg...) and nothing. I purged them, installed closed drivers (from the repository), restarted - and still nothing. All the time I run in fallback mode. What is wrong? How to install and configure the driver


Debian: No internet connection on reboot

A server I develop on ran out of memory during an overnight job and had to be rebooted. Upon reboot, it no longer has an internet connection. I've exhausted my google-fu abilities trying to troubleshoot, so now I have come to you. More Info:               ifconfig eth0              eth0      Link encap:Ethernet  HWaddr 00:1a:a0:cb:ec:a8                   BROADCAST MULTICAST  MTU:1500  Metric:1                   RX packets:0 errors:0 dropped:0 overruns:0 frame:0                   TX packets:0 errors:0 dropped:0 overruns:0 carrier:0                   collisions:0 txqueuelen:1000                   RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)                   Interrupt:16      /etc/network/interfaces               auto lo     iface lo inet loopback          auth eth0     iface eth0 inet dhcp      Any ideas?


Directory/file naming conventions when storing media collection on Linux

I am building a NAS/HTPC that will operate under Debian (Wheezy, probably). I am trying to design the directory schema for what will be stored on the server so that everything is nice and uniform for whatever media playback software I choose to use (probably XBMC). From what I have read of the FHS, it looks like `/srv/` might be the most appropriate place to store media exports, but I'm not sure. Everyone in the family will have their own `home` directory, which I will use to set up syncing (hence backup) of their Windows 'My Documents' directories. Backup will be provided by software RAID5 with a big LV. Since everyone might want to watch media from their own computer, I want it to look friendly to Windows as well as Linux. I suggest that rules out spaces in directory names at least but what about filenames? So far I have come up with:               /srv/media/TV-Shows/Show Name/Season 1/Some Show.avi     - - - - - /Movies/Movie Title (2012)/Movie File.avi     - - - - - /Music/[various]/ nb. *my music folder is a ludicrous mess*     - - - - - /Photos/Mum/whatever/foo.png      I think Photos and Music might be a different kettle altogether - I wonder if they should store their own pictures in a directory under their `home` path or should use a unified directory of Photos on a share and then a subdir of their own name from then if necessary, or separated by whatever the event was the photos are of (e.g. Holiday 2010). I hope someone knows of something more conventional and this isn't assumed to be too subjective a question to be on topic. Either way let me know. Thanks!


How many users does Linux support being logged in at the same time via SSH?

I know Linux supports multiple users being logged in at the same time. But what's the maximum number of users that can be logged into Linux at the same time? I see there are there are 69 `tty` files (`ttyn` or `ttysn`, where `n` is an integer, such as `tty0`, `tty1`, `tty2`... ) in my `/dev` directory. I assume that these files are the shells. So I am thinking that this Linux system will support only 69 user logged in simultaneously. Is my thinking correct? If my assumption is wrong, please explain the users limit of Linux, including how it's implemented. Also, how do I access the details of already logged in users? I know commands **w** , **who** , but I am looking for sophisticated tools.


vi - search the string you cursor is over?

I looking more for a method that is "built-in" to `vi`, and not something that I could do in my `.vimrc`. Though, solutions for `.vimrc` are appreciated. :-) When I want to search a string, sometimes that string is already typed in and I want to see if it's being used elsewhere on the document. For example: I see a variable, but I want to know where it was initialized, so I'll search that variable's name and keep clicking `n` or `SHIFT+n` til I find it.               int c = 0;     .     . //100s or 1000s of lines of code     .     c = 5;      Is there a shortcut way to search the string that my cursor is hovered over? Not the mouse cursor, but the vi cursor (if that makes sense).


How to enable wifi using keyboard (Dell Inspiron 14r) in suse Linux 11.4

I have installed both Windows and SUSE Linux (11.4) on my Dell Inspiron 14r laptop. Both are working properly. I am facing one strange problem. I went to my Linux OS wifi was working fine and I pressed fn+f2 in-order to disable wifi.   Wifi got disable successfully but when I again pressed fn+f2 it is not enabling wifi. I can see wifi disabled. Instead of that bluetooth icon got enable. Then I switched to Windows and again pressed fn+f2 and wifi got enabled. Then I switched to linux OS and I can see my wifi enabled. Again I pressed fn+f2 and it got disabled and I'm not able to enable it by pressing fn+f2 again. How can I enable wifi on SUSE (11.4)?


Ethernet adapter stuck at 10 Mbit/s

My Ethernet adapter is somehow stuck at 10 Mbit/s. Here's the output of `ethtool eth0`:               Settings for eth0:         Supported ports: [ TP MII ]         Supported link modes:   10baseT/Half 10baseT/Full                                  100baseT/Half 100baseT/Full          Supported pause frame use: No         Supports auto-negotiation: Yes         Advertised link modes:  10baseT/Full          Advertised pause frame use: Symmetric Receive-only         Advertised auto-negotiation: Yes         Link partner advertised link modes:  10baseT/Half 10baseT/Full                                               100baseT/Half 100baseT/Full          Link partner advertised pause frame use: Symmetric         Link partner advertised auto-negotiation: Yes         Speed: 10Mb/s         Duplex: Full         Port: MII         PHYAD: 0         Transceiver: internal         Auto-negotiation: on         Current message level: 0x00000007 (7)                        drv probe link         Link detected: yes      As you can see, my adapter supports 100 Mbit/s, and the "link partner" (my router?) supports 100 Mbit/s. However, if I manually set the mode to 100 Mbit/s using `sudo ethtool -s eth0 speed 100 duplex full` the link immediately disconnects. How can I fix this problem?


FreeBSD based routers

I am looking for a `FreeBSD` based wireless router to hack around it and also use it at home. I saw some listed on www.bsdrouter.org but those seem outdated. Can someone point me to such a product/project which is ongoing? My motive is to learn hacking on this device.


Weird Wi-Fi connection issue on Linux Mint 16

We have a LG-R590 laptop and an AirTies 5343 WLAN router at home. When the router broadcasts the SSID of the wireless home network I cannot connect to the network automatically, I have to connect to the network as if its SSID were hidden. When I set the router to hide the SSID of the home network the wireless network browser in Mint MATE is able to see and connect to the network. However, in this case the SSID is hidden in Windows as expected and leads to undesired effort to get connected to the internet on other computers, and I am concerned about this since my parents are not that much tech-savvy. I have provided a screenshot of the modem settings (saved) when the computer is able to locate and connect to the network on Linux Mint 16 MATE. How can I restore default behaviour on this computer so that it sees and is able to connect to the network when SSID is broadcasted? **Details:** Linux Mint Mate 16 32-bit LG R590 Notebook **Output of lspci** 02:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8191SEvB Wireless LAN Controller (rev 10) 03:00.0 Ethernet controller: Qualcomm Atheros AR8131 Gigabit Ethernet (rev c0) ![enter image description here](http://i.stack.imgur.com/wCTMn.png) Thanks in advance


More concise methods for wrapping a file than using sed

**Introduction** _script:_               sed -i '1i <?xml version=\"1.0\" encoding=\"utf-8\"?>' $1     sed -i '/<?xml version=\"1.0\" encoding=\"utf-8\"?>/a<hello>\n\t<world>' $1     sed -i "\$a\\\t<\/hello>\n<\/world>" $1      _input:_               <city id="city01">       <name>utrecht</author>       <population>328.577</population>       <districts>10</districts>       <country>netherlands</country>     </city>      _output:_               <?xml version="1.0" encoding="utf-8"?>     <hello>       <world>         <city id="city01">           <name>utrecht</author>           <population>328.577</population>           <districts>10</districts>           <country>netherlands</country>         </city>       </hello>     </world>      **Question** What are more concise methods for wrapping a file than using sed?


Dynamic linker "no version information available"

When I copy over a program and a few libraries it needs to another machine I get the "no version information available" when I run LDD on the program. I know why this is happening, I just want to know if its a big deal. Can I just ignore it? The program seems to execute and exhibits expected behavior. Could this come back to screw me in the future?


What are dyld_shared_cache_xxx files and how do I extract object files from them?

I have a `dyld_shared_cache_armv7` file and I'm assuming that they hold various object files for a specific architecture. How do I extract the object files from it?


How to get details of RAID devices both soft and hard?

I want to check if my server has RAID configured both soft and hard. I tried some commands on my server (Suse Enterprise Edition 11):               **ms:~ #  cat /proc/mdstat     Personalities :     unused devices: <none>     ms:~ #**      I tried to execute `raiddev /dev/md0` but there is no raiddev command available. Is there any other command that will let me check the raid level of the server?


Checking if one of 4 variables starts with string &red in ksh

I'm trying to check if one of 4 variables starts with the string "&red" and I'm struggling to get the match to work. At the moment I've got this,               if [[ $filemsgCICS = "&red"* || $filemsgCICSU1 = "&red"* || $snufmsgCICS = "&red"* || $snufmsgCICSU1 = "&red"* ]];then      but that doesn't work. I can't seem to find a solution that will work. I've tried '&red'* and I've tried \&red* but none of them work.


Find command: Searching for executable files

What type of parameter/flag can I use with the unix _find_ command so that I search executables? (if this question is better suited for another stackexchange forum, I welcome you telling me so) p.s. If you know of one, I've been looking for a detailed (non-beginner) tutorial/screencast about grep and/or find.


How do I make ls sort underscore characters first?

I like being able to name files and directories with an underscore prefix if it's something I want to keep separate from other files and directories at the same level. On Windows and Mac, for example, prefixing a file with an underscore sorts it to the top, in front of files starting with an alphanumeric character. My googling has turned up that it has to do with the LC_COLLATE and my current locale (en_US). That's fine, though I really don't understand why en_US doesn't sort as expected. Based on the ICU Collate demonstration site setting locale to en_US_POSIX certainly appears to have the sort order I'm looking for (you have to edit the sample data and add some underscores to test it out). But I don't really see how to apply this in my Linux shell. Ideally, I'd like to be able to set up something in my bash config so that ls always sorts underscores first. How would I go about doing this?


Bootable image with jffs2 file system

I have the following images: zImage around 1.1 MB image.ub: 1.1MB rootfs.jffs2 4.3 MB u-boot (this is the bootloader I am using) I understand that the image.ub is not including file system,and may be that is the reason the size is so small. In fact if I put image.ub in flash and boot,it is hanging and is unable to mount file system. This verifies my understanding. Now what I want is to get a single file having OS and file system, i.e some how combine image.ub and file system (rootfs.jffs2) in a single file. How do we do this? In fact when I chose initramfs instead of jffs2 in kernel configuration, I get a single image.ub of size about 4MB,which certainly has file system included.Because when I put this single large image in flash, it boots perfectly fine and unlike the case of jffs2 do not complain. It means initramfs is embedded into image ub , but jffs2 is not embedding in image.ub- at least by default. I am looking for a way to embedded my jffs2 file in the image.ub. How do I do this ?


Rename files with random characters from sha1sum. Does it unique?

I'm using this command to rename files with random characters from `sha1sum` and move all files from subdirectories to current directory:               for fname in `find . -type f`; do mv "$fname" $(echo "$fname" | sha1sum | cut -f1 -d' ').html; done        1. But the question is: Does it unique? I'm worried if the generated name from sha1sum will is not unique (generated twice or more).   2. If I run above command, and then run another one in another directory, will it generate unique file name for each files?


gcc can't link to pthread?

I have recently installed XUbuntu 11.10 64bit, but I am having problem compiling the most simple pthread example. Here is the code `pthread_simple.c`:               #include <stdio.h>     #include <pthread.h>      main()  {       pthread_t f2_thread, f1_thread;        void *f2(), *f1();       int i1,i2;       i1 = 1;       i2 = 2;       pthread_create(&f1_thread,NULL,f1,&i1);       pthread_create(&f2_thread,NULL,f2,&i2);       pthread_join(f1_thread,NULL);       pthread_join(f2_thread,NULL);     }     void *f1(int *x){       int i;       i = *x;       sleep(1);       printf("f1: %d",i);       pthread_exit(0);      }     void *f2(int *x){       int i;       i = *x;       sleep(1);       printf("f2: %d",i);       pthread_exit(0);      }      And here is the compile command               gcc -lpthread pthread_simple.c      The results:               lptang@tlp-linux:~/test/test-pthread$ gcc -lpthread pthread_simple.c      /tmp/ccmV0LdM.o: In function `main':     pthread_simple.c:(.text+0x2c): undefined reference to `pthread_create'     pthread_simple.c:(.text+0x46): undefined reference to `pthread_create'     pthread_simple.c:(.text+0x57): undefined reference to `pthread_join'     pthread_simple.c:(.text+0x68): undefined reference to `pthread_join'     collect2: ld returned 1 exit status      Does anyone know what's causing the problem?


CPU and core usage stats

I'm running some programs on a server and I would like to know how much % cpu I'm taking up and how many cores are being utilised by my process. To clarify, the server has 16 CPUs, all quad-core. I know about the top command, but that just continually reports CPU% between 80% and 100.2%. I also tried `mpstat -P ALL` but I'm really not sure how to read this table.


How to fix diacritics in PDF forms in Evince?

I happen to live in Czech Republic and we have such letters like `ě`, `š`, `č`, `ť`, etc in the alphabet and use them everywhere, including addresses. Today I was filling a PDF form in Evince and noticed that some of these letters either disappear or make the following letter disappear in view/print mode (everything is ok when I am editing the field). Any ideas why can this happen and how to fix this? XUbuntu 12.04, Evince 3.4.0. Update: I have installed the Adobe brand Acrobat Reader (9.5.1) and it has no problems with the letters.


Print tab character in fish

In bash I could either do `echo -e "a\tb"` or `echo a$'\t'b`. How do you do this in fish?


Printable guide for ArchLinux setup

I want to install Arch Linux on my computer, but I only have one computer, so I will be unable to access online documentation for a significant portion of the process (everything up until I get a web browser installed). Is there some type of printable guide or manual that I can get that has everything I would likely need up to that point? After that, I can just use online stuff, but as I said, I won't be able to use it until I can access it _from the computer I am installing on_. I intend to install it to use for general-purpose desktop stuff, like browsing the internet, multimedia stuff, and some games, if that makes a difference to what I'd need. I'm going with a gnome environment, and am planning to install chromium.


See extended attributes with coreutils ls on Mac

I have coreutils installed via MacPorts on my Mac running OS X 10.8.4. I have `ls` set to use the coreutils version of `ls` [`(GNU coreutils) 8.21`] when available:               if [ -e /opt/local/libexec/gnubin ]; then         alias ls='/opt/local/libexec/gnubin/ls --color=auto'     else         alias ls='/bin/ls -G'     fi      When I run `ls -l` in a directory with files know to have extended attributes (xattrs), I expect to see an `@` sign after the permissions in those listings. However, I see no `@` sign. If I run `/bin/ls -l`, I get the `@` sign. File listing from `/bin/ls -l`:               -rw-r--r--@  1 zev.eisenberg  staff  132887 Jul 19 16:24 flowchart.graffle      File listing from `ls -l` (using coreutils):               -rw-r--r--  1 zev.eisenberg staff 132887 Jul 19 16:24 flowchart.graffle      How can I get the coreutils version of `ls` to show me the `@` sign when xattrs are present?


Vim script check running platform

" Get running OS     let os = ""     if has("win32")       let os="win"     else       if has("unix")         let s:uname = system("uname")         if s:uname == "Darwin"           let os="mac"         else           let os="unix"         endif       endif     endif          " Brackets expanding     let preBracket="`"     if os=="mac"       let preBracket="$"     endif          exe 'vnoremap' . preBracket . '1 <esc>`>a)<esc>`<i(<esc>'     exe 'vnoremap' . preBracket . '2 <esc>`>a]<esc>`<i[<esc>'     exe 'vnoremap' . preBracket . '3 <esc>`>a}<esc>`<i{<esc>'     exe 'vnoremap' . preBracket . '$ <esc>`>a"<esc>`<i"<esc>'     exe 'vnoremap' . preBracket . 'q <esc>`>a''<esc>`<i''<esc>'     exe 'vnoremap' . preBracket . 'e <esc>`>a"<esc>`<i"<esc>'     " Map auto complete of (, ", ', [     exe 'inoremap ' . preBracket . '1 ()<esc>i'     exe 'inoremap ' . preBracket . '2 []<esc>i'     exe 'inoremap ' . preBracket . '3 {}<esc>i'     exe 'inoremap ' . preBracket . '4 {<esc>o}<esc>O'     exe 'inoremap ' . preBracket . 'q ''''<esc>i'     exe 'inoremap ' . preBracket . 'e ""<esc>i'      As vimscript above I want to map the shortcut to key expand bracket depend on vim's platform. Actually my macbook use different layout but I love the ease of using ``` character in keyboard so I map to $ which stays at the same place on mac pro keyboard (da layout). But it seems that the script works fine on linux but doesn't work on mac. Did I miss something or I need to add something to make this script work on Mac OSX ?


omxplayer playlist without black between videos at 1920x1080

I'm reading lot of posts/people using Raspberry and omxplayer (with some Python or script helper program) to allow playlist management without gaps between files (launching one file and pausing it, and then launching a second file and unpause first just when second one reaches the end). This is great, but in my case it doesn't work at 1080p resolution (even with gpu mem at 320MB). Only work for 720p. Has anyone been able to make it work with 1080p videos?


using "-vvv" with "-w FILENAME" with tcpdump makes better output?

Does it makes a more detailed output if I use               tcpdump -vvv -w FILENAME      vs. if I use:               tcpdump -w FILENAME      or it doesn't makes any sense if I use the "-vvv" when I'm using "-w FILENAME"?


Ubuntu Precise -- suspend wedges GDM -- help!

I've been a very happy Ubuntu user for many years, and worked my way past any number of problems, but I've never seen anything like this. Recently I got a new machine and installed 12.04 Precise on it, and after some fiddling, it looked like everything was working fine. I just tried the suspend function for the first time, and on wakeup, GDM was seriously wedged -- a window popped up saying "System Error" and gave a bunch of details. I took screenshots -- I think it was a segfault thrown by simple-slave : ![enter image description here](http://i.stack.imgur.com/jHmaM.png) ![enter image description here](http://i.stack.imgur.com/k6iPU.png) Now a reboot gets me to a low-res startup screen, saying "Ubuntu 12.04" and four dots that change from white to orange and back again, nothing more. I can use ctl-alt-F1 to get a command line, log in there, and run "startx" and I get the X display (including TwinView on my two monitors), the cursor works, but there's no desktop manager, no Dash, no way to go further that I can see. I've rebooted several times and this behavior isn't changing. From the command line, I've tried using apt-get to remove and reinstall gdm, no difference. I've tried removing gdm and telling it to use lightdm instead, no difference. I have no idea what's going on. Can anyone help?


extensions.gnome.org is not working on fedora 17

Using fedora 17, when I click an extension to install from gnome shell extensions site, it wont install! How to know what the problem is?


Need libca.so (Needed to install epics)

I need to install epics on my Ubuntu system, but when I try to it returns a warning saying it cannot find the dynamic library (libca.so or libCom.so). I tried to locate them, but it appears that they do not exist on my system. How can I get them on there? I thought they should automatically be there? This is really the symptom of a larger problem I'm having when I try to run the program I am working with. That gives me the following error: > >     OSError: /dls_sw/epics/R3.14.8.2/base/lib/linux-x86/libca.so: cannot > open shared object file: No such file or directory >   I figured I got this because I need to install epics, but I can't do that because libca.so doesn't exist on my system... I'm fairly new to all this so hopefully this all makes sense.


File name encoding wrong in KDE, but correct in GTK/tty1/

I'm on a new Linux (installed yesterday). When I access files from old partitions their file names have incorrect encoding (Ã¤ instead of ä, same for other umlauts) inside KDE apps like dolphin and konsole. All characters look correct when I display them in tty and GTK apps. (And they obviously also did so on the old system.) How can I make KDE4 show the file names correctly? * * * Edit: So now I «fixed» this by re-installing the system. No idea what the problem was. **To get the keyboard right** everywhere (tty, KDM login screen, KDE) I had to run               dpkg-reconfigure locales       # Kept only (de_CH|en_US|ru_RU).UTF-8                                    # Selected de_CH.UTF-8 as default     dpkg-reconfigure console-data  # Selected German (Switzerland)      dpkg-reconfigure keyboard-configuration                                     # Selected my 105-key Cherry CyMotion Xpert                                     # AltGr on right Alt, no Compose key      Running keyboard-configuration first does not work since those settings are specific to the default keyboard selected in locales; for en_* e.g. there is no AltGr and no compose key. (Debian based system.)


How/Why does cat write a bootable ISO to a device

I recently discovered that I can create a bootable USB key from an ISO file by simply using `cat` (or `dd`). I can't find any information on how this works. Why would:               cat my.iso > /dev/sdb && sync      take that file and write all the files it contains, in bootable format, to a device?


Local disks detected as multipath device

My local partitions are detected as multipath device               $multipath -l          mpathb (360014380125d90420000a000003e0000) dm-9 HP,HSV450     size=200G features='1 queue_if_no_path' hwhandler='0' wp=rw     `-+- policy='round-robin 0' prio=0 status=active     `- 3:0:0:1 sdb 8:16 active undef running     mpatha (3600508b1001c02143bc59c6862d97353) dm-0 HP,LOGICAL VOLUME     size=137G features='1 queue_if_no_path' hwhandler='0' wp=rw     `-+- policy='round-robin 0' prio=0 status=active     `- 0:0:0:1 sda 8:0  active undef running      I added the following lines in multipath.conf so that local partitions are not detected as multipath device               blacklist {        wwid 3600508b1001c02143bc59c6862d97353     }      Executed the following commands after that .               #service multipathd reload          # multipath -F     Oct 22 12:10:42 | mpathb: map in use     Oct 22 12:10:42 | mpatha: map in use      Is reboot of the server will resolve the issue ? It is a production server , so I have to take downtime before going ahead with reboot.


Recover Linux ext4 partition formatted to hfs+

I have a Linux partition formatted to ext4 and I accidentally formatted it with Mac OS X Disk Utility to HFS+ (Mac OS X Extended Journaled). I tried to recover it with http://www.r-studio.com/ on Windows but I can't get any files except few from trash or temporary browser files. Now I'm trying another software on OS X: http://www.stellarinfo.com/mac-data- recovery.htm, however it takes some time to scan partitions. Any ideas how to recover that partition? Should I recover it on Linux or Mac?


How can I tell why a process is waiting?

I'm trying to run a command on OSX Mavericks and it seems to be hanging. I found out that `Control + T` is a Unix command to show the status of a foreground job. Pressing it several times over the course of **several minutes** gives me:               $ bin/rake                                                                                load: 3.68  cmd: ruby 55761 waiting 0.12u 0.02s     load: 3.47  cmd: ruby 55761 waiting 0.12u 0.02s     load: 3.47  cmd: ruby 55761 waiting 0.12u 0.02s     load: 3.09  cmd: ruby 55761 waiting 0.12u 0.02s     load: 2.41  cmd: ruby 55761 waiting 0.12u 0.02s     load: 4.38  cmd: ruby 55761 waiting 0.12u 0.02s      I understand this to mean that the status is "waiting", it has spent .12 seconds of user time and only 0.02 seconds of CPU time executing. I want to find out why it's stuck waiting. **How can I determine why a process is waiting**?


squid 3.1.11-1 - POST issues

I have an issue with my squid on the website : http://www.draw.io I have one schema and I am not able to export it as a PNG (I got a white page on the web browser like the website didn't answer.) Without using squid export is working fine. I look at the logs and here is what I found : When not working I got : 1376985774.106 0 127.0.0.1 TCP_DENIED/407 4366 POST http://exp.draw.io/ImageExport2/export \- NONE/- text/html When I delete some stuff on my design it works : TCP_MISS/200 76269 POST http://exp.draw.io/ImageExport2/export hugo @domain.LOCAL DIRECT/199.38.86.62 application/x-unknown For me it seems related to the post size. Should I modify something in my squid configuration ? (which is pretty basic).


How do font managers work in Fedora?

I am looking to do some font management on my Fedora system. I have installed both Font Manager and Fontmatrix. My goal was to be able to have more fonts installed than I wanted displayed, and to be able to enable/disable fonts (or groups thereof) whenever I wanted to. Both programs claim to enable or disable fonts. I can't seem to get Fontmatrix to do anything other than be a comprehensive font information source (glyphs, etc.) The enable/disable doesn't appear to work, and the documentation is less than helpful. I am able to disable/enable fonts in Font Manager. I had to recreate my Gnome settings, though, because I accidentally disabled all fonts, and even re- enabling them did not fix my panel fonts. There wasn't anything I could do, short of removing my local configuration and logging out/in, that would get those fonts back. So. What exactly do these programs **do** when they disable a font? And what trashed my panel fonts? I know Monospace was still installed/enabled, and nothing I could do would change the panel information. Thanks in advance!


recovering /home folder from faulty drive

I was going to try ddrescue to recover data from a faulty (beeping) laptop drive and a primary ext4 partition. Reducing the number of reads from the disk should reduce the recovery time and increase the chances of successful recovery, so I would like to only recover /home, and exclude all the non-critical subfolders, like /tmp or /home/guest/Downloads. I can`t find any option to only recover subfolders in the ddrescue manual, though. Maybe there are other better suited tools for selective data recovery which could maybe display the file system structure, and let me check/uncheck what to recover before starting? I had used a similar tool in the MSDOS era, so I`m not sure about the best tool for ext4 nowadays. Open source tools for Linux would be preferred, if possible.


Disabling lid-closure sleep while on battery in Debian Squeeze

How do you disable lid-closure sleep at the GDM screen (not logged in) on Squeeze?


How to monitor incoming http requests

How can I monitor incoming `HTTP` requests to port `80`? I have set up web hosting on my local machine using `DynDNS` and `Nginx`. **I wanted to know how many request are made on my server every day.** Currently I'm using this command:               netstat -an | grep 80


Repeat the nth last command in vim

I've noticed vim can be pretty intuitive, but I'm having trouble finding a way to repeat the second-to-last command (or third-to-last, fourth-to-last, etc.). By typing `.` in normal mode it will repeat the last command. Pressing `3.` will repeat the last command three times. Let's say I type `oHello<Esc>` then `A, World!<Esc>`. I now get               Hello, World!      on the screen. Now, say I want to get               Hello, World!     Hello     Hello     Hello      without typing Hello. Does vim store the history beyond one command, so I could type something like `3,2.` (i.e. repeat the second-to-last command three times)?


How to use the pipe command to open a directory after find?

Is there a way to opend found directories (via `find`) all in one command? One of the things I tried to study several times and never been able to really get, is the effective use of pipe: is it maybe useful for this? I tried things like:               find . -type d -name ".dir-name" | open      but it doesn't work. `open` is the OSX command to open a file in the associated application (Finder for directories).


Specifying full range of printable ASCII characters in a glob pattern

I want to use a globbing pattern to match only printable (including space) ASCII characters `0x20` through to `0x7e`. This is being used inside a `super` `super.tab` database. I've arrived at the pattern: `[[ -~]]` This appears to work and does indeed restrict non-printing characters from being passed as arguments. Have I over looked anything, or is this the correct way to specify this range of characters? **Edit:** Based on _mikeserv_ 's suggestion to use `[[:print:]]`, I tried and it doesn't seem to work. Here's what the entry in my `super.tab` looks like:               dosuperthing  /system/dosuperthing.pl $Users  uid=0 arg1="[[:print:]]"      If I try `[[:print:]]`, `[:print:]` or `:print:` as globbing patterns for `arg1` it results in (respectively) the following being logged by `super` where I pass `abcdef` as my first argument: > `super: (admin) Your argument #1 <abcdef> must match pattern <[[:print:]]>` > > `super: (admin) Your argument #1 <abcdef> must match pattern <[:print:]>` > > `super: (admin) Your argument #1 <abcdef> must match pattern <:print:>` This is old legacy production code and I'm not able to tinker with it beyond tuning the acceptable `arg1-99` patterns inside `super.tab`.


I reset my password and now I can login, but without nautilus or program menu

I recently powered on some old notebook with Linux Mint 11 (Katya) installed, and I thought I remembered my user password, but turns out I didn't. So I reset that password using the instructions here. After doing that, I could login successfully with my new password, but right after that I got a series of error messages and was left with the plain Mint desktop: no program menu, no nautilus, no context menu; all I could do was restart or shutdown. Here are the errors, in order of appearance: > Could not update ICEAuthority file /home/my_user/.ICEauthority > > There is a problem with the configuration server. > (/usr/lib/libgconf2-4/gconf-sanity-check-2 exited with code 256) > > The panel encountered a problem while loading "OAFIID:GNOME_mintMenu". Do > you want to delete the applet from your configuration? Of course, I always answered "Don't delete". > Nautilus could not create the following required folders: > /home/my_user/Desktop, /home/my_user/.nautilus. Before running Nautilus, > please create these folders or set permissiones such that Nautilus can > create them. When I restarted, I selected recovery mode from the GRUB menu and managed to login into a terminal and navigate to my home folder. When I ran `ls` there, all my files were gone, and in their place were a `.desktop` file and a README. It seems Mint realized I changed my password and took it as an attempt to hack into the system, so it encrypted the files in my home folder... Kudos to Linux security schemes, but... what can I do now? Don't wanna reinstall, I need those old files. **UPDATE** : I tried running `ecryptfs-mount-private` like the README suggests, but it asked me for a passphrase, and the new one doesn't work. Figures, it needs the old one.


How to disable the beep sound system-wide

If I want to disable beep sounds from stuff like **`bash`** , I add this line to " **/etc/inputrc** ":               set bell-style none      Sadly, this doesn't work for some other events like GDM start-up and shut down. I thought that adding this line to " **/etc/modprobe.d/blacklist.conf** " would help:               blacklist pcspkr      That makes me wonder and doubt where the sound actually comes from.


Why is piped input okay to zenity, but <file malfunctions?

My question is as simple as what the `zenity --text` args say in the example... but what is causing this 100% CPU grab by the redirection?   ...(and by the way, is this particular usage of `<` actually called `redirection`. It seems like it is creating a direction, rather than _re_ -directing )..               echo "Peacocks talking of the colour grey."> test     cat test | zenity --text='This does NOT hog the CPU'   --list --column='#' --width=450      <test      zenity --text='This hogs 100% of CPU usage' --list --column='#' --width=450            I'm quite happy to use `cat test |` (because it isn't useless in this case; it works and < and `|` are somehow different, but I haven't been able to track it down again... To be clear: `<test` and `cat test |` both work. The zenity dialog appears and is fully functional in both cases, but for as long as the `<test` version of the dialog is kept open, it uses 100% CPU (of one core)... 94% on the single "core" VMs...


How to prevent Windows partition to access(read) Linux partition files?

How to prevent Windows partition to access(read) Linux partition files within one physical hard disc? Right now a couple of programs can do that. E.g. Linux Reader I want to prevent that? What are my possibilities? I am currently running Windows 7 and would like to install as a dual boot Linux Mint 15.


Regex and piped commands with sed

I'm finding really hard to use `sed` command, plus I can't seem to find well written tutorials. Let me say that I worked with regular expression in other languages (Python, JavaScript, Java), so that _shouldn't_ be the problem. So, here are my questions (a "theoretical" one and a more practical one):   1. are regular expressions used in `sed` exactly the same as the ones used by Python/JS/Java? I read about BREs and EREs, but how much are they different? Shouldn't ERE be an _extension_ of BRE?   2. if I want to, say, just extract something from a piped output, what's the `sed` syntax to do that? Details about the second question: say I have the output of `uptime` piped with sed:               uptime | sed ...      Given an example output from `uptime`: `18:13 up 5:12, 2 users, load averages: 0,45 0,37 0,40`, I want to parse the single uptime in the form of two separated numbers (hours and minutes), and then I want to display them in the form of `xxhyym` (`xx` are the hours, `yy` the minutes). And to finish, here's what I'd do in Python:               hh, mm = re.match(r'\s+ up \s+(\d{1,2}):(\d{1,2})').groups()     print '%sh%sm' % (hh, mm)


Can I avoid screen from creating inner screens?

I just started using screen and "screen inception" makes learning screen even more confusing. Can I avoid screen from creating screens when I'm already inside a screen? ![enter image description here](http://i.stack.imgur.com/hvfXo.png) I'm using fish as my shell if that matters.


Is it possible to install RHEV on el6 clustered computer

Is it possible to use Linux (el6) clustered computer can be used as a hypervisor for RHEV 3.3/Ovirt 3.3?   * Cause, we can not combine RAM/CPU from two or more hypervisores to be considered as a one source of resource while creating a huge guest on RHEV. I know it support Baloonig and 150% for server and 200% for Desktop RAM aloocation but if I want to allocate RAM even more than that just to a one guest then? Any input for such situation!


restore duplicity backup from amazon s3 in debian

I have applied the script provided here to backup my stuff in debian etch and it works, I tried to reverse the `SOURCE` and `DEST`, but I can't do the restoration. What happened?


How to change the hash-spec and iter-time of an existing dm-crypt LUKS device?

How can I change the hash-spec and iter-time of an **existing** dm-crypt LUKS device? Clearly I can pass the options if I create a _new_ device, for example something like this:                sudo cryptsetup luksFormat --cipher aes-cbc-essiv:sha256 --key-size 256 --iter-time 2100 --hash sha512 /dev/loop0      But if the device already exists, how can I change for example `sha256` to `sha1` or change the iteration time without "destroying" the device. (Clearly you would have to retype your password since a new hash will be generated.)


I am reading a 550MB file into /dev/null and I am getting               dd: writing '/dev/null': No space left on device      I was surprised. I thought /dev/null is a black hole where you can send as much as you want ( because its a virtual fs). Yes my disk is almost full when I get this error. What can I do other than deleting content from the disk?                ls -l /dev/null      -rw-r--r--    1 root     root             0 July 7 21:58 /dev/null      Instead of                crw-rw-rw-    1 root     root        1,   3 July 7 02:58 /dev/null      Command I am using:               time sh -c "dd if=$filename of=/dev/null"


Should I run fsck on boot for an amazon ec2 image?

I have an Ubuntu micro instance running on amazon EC2. Recently after logging in I was alerted:               *** /dev/xvda1 will be checked for errors at next reboot ***      I've rebooted a couple times using `init 6`, however when I log on I am still getting the same notice, so apparently `fsck` is not running at startup. I read this blog post which mentions that if the /etc/fstab `<pass>` column is set to `0` then a disk check will be skipped during reboot. Here is my `fstab` file:               <file system>           <mount point><type><options><dump><pass>     LABEL=cloudimg-rootfs   /            ext4  defaults 0     0     /dev/xvdh               /vol         xfs   noatime  0     0      This is the default configuration for an ec2 image from`ubuntu`.   * Is it normal for `<pass`> to be set to `0` here?   * Why would it be set to `0`?   * What is the best way to run `fsck` \- should I change this value or only run it manually when alerted?


Running a program to output in Dutch

I'm running KDE Arch linux and trying to update my system using pacman and have it output in Dutch. I've tried the following               sudo LANG=nl_NL.UTF-8 pacman -Syy     sudo KDE_LANG=nl_NL.UTF-8 pacman -Syy      But neither of them worked. I've also tried editing my `/etc/locale.gen` file and running `locale-gen` but that didn't work either. I know pacman supports localization, but I can't seem to get it to output in any of the major languages.


Bash/Korn shell script edited on Windows throws error '...^M: not found'

_**Some background on the issue:_** I am new to scripting and wrote a simple Bash script in Windows using Notepad++. **cxStopAllServicesOnSERVER.sh**               #!/usr/bin/bash     cd "/some/path"     echo "Hi. Logs can be found at "`pwd`"/cxStartStopLogger.log"     echo "["`date`"]*** STOPPING ALL SERVICES ON SERVER ***" >> "cxStartStopLogger.log"     exit      Now after uploading it and setting the required file permissions, I tried executing it as follows:               bash-3.00$ cat cxStopAllServicesOnSERVER.sh #Let's have a look at the code.     #!/usr/bin/bash     cd "/some/path/"     echo "Hi. Logs can be found at "`pwd`"/cxStartStopLogger.log"     echo "["`date`"]*** STOPPING ALL SERVICES ON SERVER ***" >> "cxStartStopLogger.log"          bash-3.00$ # Code and hashbang 'looks' correct,      bash-3.00$ # if there is any issue with the format (EOL characters and such)      bash-3.00$ # we cannot see it using cat.     bash-3.00$      bash-3.00$ sh cxStopAllServicesOnSERVER.sh     cxStopAllServicesOnSERVER.sh[2]: /some/path^M:  not found     Hi. Logs can be found at /some/path/cxStartStopLogger.log     bash-3.00$ # Note that ^M appears at the end of the line.          bash-3.00$ bash -x cxStopAllServicesOnSERVER.sh     + cd $'/some/path\r'     : No such file or directory1.sh: line 2: cd: /some/path     ++ pwd     ' echo 'Hi. Logs can be found at /some/path/cxStartStopLogger.log     Hi. Logs can be found at /some/path/cxStartStopLogger.log     ++ date     + echo '[Sun' Nov 18 00:28:17 EST '2012]*** STOPPING ALL SERVICES ON SERVER ***'     bash-3.00$ # Note that '\r' return character appears at the end of the line.      _**Problem:_** When I change the code to korn shell I face the same issue. Appears that an incorrect character is getting added at the end of the line. _**NOTE:_** I found the solution and have posted the same as an answer. Feel free to update or improve it to help other beginners that may face the same issue. Thanks!


What does "The following packages have been kept back" mean?

When doing an `apt-get upgrade` I sometimes get a message saying "The following packages have been kept back". For example:               $ sudo apt-get upgrade                                                                                Reading package lists... Done                                                                                Building dependency tree                                                                                Reading state information... Done                                                                                The following packages have been kept back:                                                                                linux-headers-server linux-image-server linux-server                                                                                0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.      What does this mean exactly? Obviously the packages have been held back and not installed, but why? The follow-on question would be: how does one upgrade these kept back packages?


Apple Magic Trackpad resets settings after session

I was able to get the Apple Magic Trackpad working on Fedora 15 KDE 4.6. (I previously got it working on Linux Mint.) However, the settings -- particularly activating the single-finger left click and double-finger right click -- seem to reset after each user session. Does anybody know how to retain these settings between sessions? EDIT: When I turn on the computer and then activate the trackpad, then the settings do not load. However, when I logout and login, the settings load. That suggests to me that, since the trackpad is already active before login, its settings are successfully modified upon login. But when the trackpad is not active before login, then the default settings are meaningless because there is no trackpad to set. Therefore, is there a way to register the settings _after_ the trackpad is recognized by Bluetooth?


CentOS 6.4 Kickstart bootloader problem

I am installing CentOS 6.4 via a kick start file that looks like this in my build:               # install the bootloader (GRUB)     bootloader --location=mbr --driveorder=sda --append="crashkernel=auto"      After the installation I see this in /root/anaconda-ks.cfg               bootloader --location=mbr --driveorder=sda --append="crashkernel=auto rhgb quiet"      The problem is I do not want 'quiet' appended the the kernel parms. quiet gives the moving progress bar during the installation instead of the detail. I want to see the details. Why does the installation add quiet to the bootloader when I never specified it?? How do I prevent CentOS 6.4 from adding this automatically during installation??? **UPDATE:** **My initial post was wrong.. rhgb kernel parm enables graphical progress bar during boot. So, in my case I needed to get rid of both rhgb and quiet.** **Updated my ks.cfg file and added suggested editing in the %post section. Works great now!!!**


What are special prompt symbols for busybox's sh support?

I want to setup a time prompt on PS1. But, there is no document about what are symbols the busybox support. Is there any one know? Here are all which I knew.               PS1='\u@\h: \w \$'


Mapping keyboard: at most primitive level

When I was using a comfort curve keyboard which had media keys, those keys worked as media keys in X ( with different users), in single-user mode and in multiuser-mode without X. Then I switched to an RK-9000, which is a quite excellent keyboard but has no media keys. ;...( But there are a few keys I never use. Scroll lock comes to mind as well as pause. So things like scrl-lck-cursor-up can be mapped to media on/off. I'm vaguely aware of a technique using xev/xmodmap but my understanding is that that technique is done at the X level, and is assigned to a particular user. I would like a more primitive way of redefining keys. Two things that occur to me are: 1) The way tty's are mapped to ALT-CTL-Fn ( in my distro, LMDE, I believe this is true of Fedora as well but might vary with distros ). This way works whether or not X is started. 2) When installing a distro, you are generally asked to choose a keyboard. Once you make the choice, it is my understanding that some keymapping is assigned. Uniformly at all levels and will will in multiuser X-less modes and single user modes. So how do I achieve this?


How do I get most of my standard Linux utilities and commands on Android 3.1?

By standard, I mean just what users often get by default with one of the popular distros. For example, `uname`, `finger`, `vim`, `tmux`, etc. I have a Galaxy Tab 10.1 (Android version 3.1, already rooted) Also, I read somewhere about setting up a `chroot` on Android to run full- fledged Linux distros, such as Debian.   Is that possible?


How is bc different from dc?

What are the differences between `dc` and `bc` calculators? When should I use `dc` and when `bc`?


How to debug a buggy running GUI application?

Suppose the GUI applications are not given names in its GUI, so you don't know what to check in 'ps -A', i.e. the nameless applications in the task bar. How do I know which GUI application belong to what process and start debugging its errors (i.e. GUI frozen, program crash...)? With CLI applications, I can use attach the process to GDB and start investigating it.


Debian 7 on Macbook

I have just installed Debian 7.1 on my Macbook Pro 9,2. I'm trying to get the keyboard backlight to work properly. I can press the F5/F6 keys to get an OSD to show up on the screen, but the backlight doesn't change. The other buttons seem to work properly though, such as sound and backlight. It looks like this is a GNOME setting, as I was messing around with the shortcuts and set a new shortcut to be the KbdBrightnessUp key, and of course that means that I don't get an OSD anymore. I installed pommed, but that didn't do anything. Questions:   1. Where is the shortcut for the keyboard backlight brightness?   2. Is there some setting that I need to change in order to get the keyboard backlight to work?


Should I update my Fedora or not?

Here is my problem. My laptop has an NVidia Geforce 310 M graphic card. And since kernel 2.6 I had problems with the display. I had to use nomodeset option in the grub, if not my screen will be off when the xorg starts even though my computer is running. Fortunately, this problem was fixed in early 3.0 kernels. It was fine until kernel 3.4.x in which the problem was back. So I've been using the old kernel(3.3.x) from my grub list, and reported a bug at bugzilla. But they never replied to my questions about the bug on bugzilla. Now, the real problem is the update manager says there are software updates and it want to remove the old kernel and install some 3.4.x kernel which I'm not sure if they fixed the problem. If I don't get display, I lost my fedora I should re-install some other OS or OS with kernel 3.3.x What should I do?


Error while starting slapd

In my CentOS 6.5 machine I just made a new import with the `slapadd` command to load a new LDIF (from another server). The `dc` values are exactly the same and it was working with a previous load. Between two loads I clean the database with `rm -f /var/lib/ldap/*` But now when I try to start the slapd service with `service slapd start` I get this error:               Starting slapd:         [FAILED]      I checked if there is an error log somewhere but cannot find it:   * Nothing lokking like `*ldap*` or `*slapd*` in `/var/log` folder   * The `log.000000xxx` files in /var/lib/ldap are looking binaries Is there any way to find what is the cause why slapd does not start properly?


What difference is between ARM Debian for Raspberry PI and Ordinary debian x32/X64 for desktop?

I would like to know, how big is difference between ARM debian for Raspbery PI and x32/x64 debian for desktop. I would like to buy in future some ARM mini pc like raspbery PI and use it as for example cheap IPv6 router, machine to connect remotely from the internet and to control whatever I will need. It will be something better than only router, it will be small server with low TDP. Is there any problem with packaging system? Is there enough packages for ordinary use? What about RAM consumption?


External screen shaking with Fedora

I have a really weird problem with my laptop ASUS K53SV. It has two graphics card (Intel + Nvidia) and nvidia optimus, but I'm actually using just the intel one. My operating system is Fedora 16. When I connect my external screen, a Samsung 2033HD, I have problems with it. It's shaking, like it had some refresh rate problems. The actual resolution is 1600x900, refresh rate 60Hz. I tried to change the VGA cable, but the problem is still the same. The point is that the same monitor works without any problem at the same resolution with my netbook (an ASUS 1215P with Fedora as well and an intel graphic card), and the same laptop doesn't have any problem if I connect it to a different screen (samsung 24 inch 1920x1080). I just tried to boot with two different distributions: with Fuduntu I have the same problem (I suppose because it's based on Fedora), while with Ubuntu the screen is working fine at 1600x900. The following is my `xrandr` output. I already tried without success to change the refresh rate.               Screen 0: minimum 320 x 200, current 2966 x 900, maximum 8192 x 8192     LVDS1 connected 1366x768+0+0 (normal left inverted right x axis y axis) 344mm x 193mm        1366x768       60.0*+        1024x768       60.0          800x600        60.3     56.2          640x480        59.9       VGA1 connected 1600x900+1366+0 (normal left inverted right x axis y axis) 443mm x 249mm        1600x900       60.0*+        1280x1024      75.0          1440x900       59.9          1280x800       74.9     59.8          1152x864       75.0          1024x768       75.1     70.1     60.0          832x624        74.6          800x600        72.2     75.0     60.3     56.2          640x480        72.8     75.0     66.7     60.0          720x400        70.1       HDMI1 disconnected (normal left inverted right x axis y axis)     DP1 disconnected (normal left inverted right x axis y axis)      I can't believe it, what should I do/try?


passwordless ssh is not working in CentOS 6.4?

I am setting up passwordless login from this link but I can't get it to work. When I do `ssh localhost` it always asks for a password. I have also referred to this question: ssh password less authentication doesn't work               [impadmin@pearl ~]$ ssh localhost     The authenticity of host 'localhost (::1)' can't be established.     RSA key fingerprint is 6c:d3:3b:cc:05:7f:10:e8:17:cc:4c:14:be:01:bb:f7.     Are you sure you want to continue connecting (yes/no)? yes     Warning: Permanently added 'localhost' (RSA) to the list of known hosts.     impadmin@localhost's password:     Permission denied, please try again.     impadmin@localhost's password:     Permission denied, please try again.     impadmin@localhost's password:     Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).      **Update**               ls .ssh/ -l     total 16     -rw-------. 1 impadmin impadmin  396 Apr  9 17:04 authorized_keys     -rw-------. 1 impadmin impadmin 1675 Apr  9 17:03 id_rsa     -rw-r--r--. 1 impadmin impadmin  396 Apr  9 17:03 id_rsa.pub     -rw-r--r--. 1 impadmin impadmin  391 Apr  9 17:05 known_hosts      I am trying to achieve password less login on same machine for user impadmin to install Hadoop.


How Debian PTS finds that there's a new upstream version?

For example, the package aisleriot says: > A new upstream version is available: 3.12.1, you should consider packaging > it. How does the Package Tracking System knows?


indirect variable expansion in POSIX as done in bash?

Is it possible, or is there some elegant hack to do indirect variable expansion in POSIX as can be done in Bash? For context, I'm trying to do the following:               for key in ${!map_*}     do         # do something     done      EDIT: To clarify, I'd like to access shell variables that begin with `map_`.


How can I setup group permission for different user on multiple Linux installations?

I have two Linux installations on my computer, with `/home` on a different partition but shared for the two installs. And each install has a different username to avoid conflicts. The thing is, I'm a developer, I don't want mix users, but I want to setup permissions for a shared folder. Example,   * Ubuntu, main user: `raul`, home folder: `/home/raul`   * Fedora, main user: `ricardo`, home folder: `/home/ricardo`   * I want a `/home/shared` where `raul` & `ricardo` have permissions over this folder, maybe `www-data` and `root`, but any other user on any Linux distro. I hope you got my problem. EDIT: This seems to be more complex than expect. This note is the best I can explain, with my actual English level, so please be nice. On the same computer, I have distros A and B installed. Distros A and B are sharing `/home` in another partition but have different users... so I have `/home/a` for user `A` in distro A, `/home/b` and you know... So I like to have a folder for example `/home/shared` where users `A` and `B` can both read and write to the folder, like part of the same group, BUT user `A` doesn't exist on distro B and vice versa. Then how do I tell each distro to make me a group with a user from another distro?


Installing PHP 5.3.3-24 on CentOS 6.5 (Final)

I require a slightly older version of PHP for my server because I need to be able to exploit a CVE (CVE-2006-7243) that was patched in the newer versions. **NOTE:** This is a legitimate use case where we're setting up a web based penetration testing system for Computer Science students at my University. PHP 5.3.3-24 would be perfect. The current one that `yum` tries to install is 5.3.3-27. I've tried sourcing old RPM's and found a lot here: http://www.atomicorp.com/channels/atomic/centos/6/x86_64/RPMS/ but none of them being the version I would like. How should I tackle installing this version of PHP?


Mode_switch + Shift not the same as Shift + Mode_Switch?

I've this in my `~/.Xmodmap`:               keycode  47 = Mode_switch NoSymbol Mode_switch     keycode  25 = w W backslash bar      `Shift`+`Mode_switch`+`W` produces bar, which is what's intended. However `Mode_switch`+`Shift`+`W` produces W. Why is this? As I was writing this question, I've made this replacement:               keycode  47 = Mode_switch Mode_switch Mode_switch      and now the problem disappeared. However I've seen `Mode_switch NoSymbol Mode_switch` used many times. Can someone explain why the change fixes the problem? Any pitfalls to this method?


linux x.org alternative

We have so many options for window managers, shells, desktop environments, distros, and kernel architectures under Linux, but why after (maybe) 20 years do we only have X.org server (including its predecessor) as the bottom layer of GUI? I know about XFree86, and Y, but most of them are stuck. Is it so hard to create a new (i.e modern) one? Or is there any other reason we are stuck on X.org?


display login window as list of users

How do you display the login window as a list of users instead of having to type the username? I have Debian XFCE on a Powerbook G4. ![screenshot](http://i.stack.imgur.com/KDXnn.png)


AltGr key released when rappidlby pressing other keys

I have a Norwegian Lenovo USB keyboard. When I hold AltGr and press v and b rapidly, it produces `“bvbv` instead of `“”“”“”`. I get the latter, expected, result when pressing v and b slowly. Never letting go of AltGr. `xev` shows that the AltGr key is released when pressing b for the first time when doing this rapidly. (Output.) Any idea what could be causing this? Updated Debian Jessie with GNOME desktop.


Linking failure [ld cannot find library]

I am trying to configure Linux kernel [Angstrom distribution] via `make menuconfig`, but I get these errors.               make: Warning: File `/usr/src/linux-2.6.32.61/arch/arm/Makefile' has modification time 11511 s in the future     make[1]: Warning: File `scripts/Makefile.host' has modification time 11393 s in the future       HOSTCC  scripts/basic/fixdep     /usr/lib/gcc/arm-angstrom-linux-gnueabi/4.3.3/../../../../arm-angstrom-linux-gnueabi/bin/ld: cannot find -lgcc_s     collect2: ld returned 1 exit status     make[1]: *** [scripts/basic/fixdep] Error 1     make: *** [scripts_basic] Error 2      The same occurs when I tried to compile Hello_world.c program.               /usr/lib/gcc/arm-angstrom-linux-gnueabi/4.3.3/../../../../arm-angstrom-linux-gnueabi/bin/ld: cannot find -lgcc_s     collect2: ld returned 1 exit status      I noticed that libgcc_s.so is missing. How can i fix this? Any help would really be appreciated.


Linux VPS host with graphical interface using RDP (not VNC)

Our CEO's latest brain-waive is "More people will use our software product if it were all accessible from the web". He wants to dump a lot of (but not enough) resources in to taking a complex Linux-based GUI product we already have and re-writing it as a web application. I hope to head off this this disaster by demoing how we could just expose our existing software to the web using something like Guacamole \+ X11rdp. Problem is I really don't have time to set such a demo up. So I was wondering anyone could recommend me an existing VPS service which offers a purely JavaScript + HTML5 GUI interface (no Java Applets/Flash etc.). **Most importantly this must not use VNC as the video transport protocol as its performance sucks**. Anything that has an existing RDP based set-up would be great. Even an X11 protocol implemented in pure JavaScript would be better for our application. As I say this is just for a demo so it doesn't have to be beautiful/scalable. I assume any such existing feature will be aimed at system administrators and might have a bunch of other irrelevant admin tools; this doesn't matter. I just need to show that without installing any software on say an OS X or Windows machine it is technically possible to provide a usable experience with our Linux-based GUI product from a web-browser.


Keeping xterm terminal alive on crunchbang linux debian wheezy

I like to keep a number of terminals open at different locations on my development VM. For this I use `terminator` because I got a big screen and I can divide the terminals anyway I want. But after some time these terminals close one after another. I don't use ssh so any keepalive options would not work. Is there any place where I can configure the terminal so that it does not timeout or close? I am using `GNU bash, version 4.2.37` as shell and `terminator` on 'xterm`


How to implement a rotation scheme with rsync

I have an ever growing remote directory of files that I'd like to sort and filter before I `rsync` them, with the goal of always keeping only the latest N files in my destination directory (i.e. a rotation scheme, more or less). Since `rsync` doesn't seem to have options for this, I've been using the technique of "inserting an arbitrary remote command", described here: http://stackoverflow.com/q/950062/787842 with which I came up with this command, that I execute as a cron on the destination host:               rsync -vrzO --delete \         -e ssh <remote_host>:'$(cd <remote_dir> && ls -t $PWD/* | head -n 25)' \         <destination_dir>      This works well the first time (i.e. when the dest dir is empty): only the 25 freshest files get copied. But then when the window "slides forward" (i.e. when the arrival of a newer file should push an older one out, locally), the problem is that the `--delete` option doesn't work as I'd expect. My guess is that since the filtered out remote files still exist (i.e. they're just being temporarily hidden by the inserted `'$(..)'` command), then `rsync` simply cannot filter them out locally. Is my understanding correct, and is there a better way?


Converting an if-else statement into a switch statement

I'm having trouble turning this program from an if-else statement into a switch statement. Any help would be appreciated.               #!/bin/bash          for x in $@     do      array[$i]=$x      i=$((i+1))     done               # initial state     state=S0          for((i=0;i<${#array[@]};i++))     do          if [ $state == S0 ]        then        if [ ${array[$i]} == I0 ]        then          state=S1          output[$i]=O1        elif [ ${array[$i]} ==  I1 ]        then          state=S0          output[$i]=O0        fi          elif [ $state == S1 ]       then       if [ ${array[$i]} == I0 ]        then         state=S1         output[$i]=O1       elif [ ${array[$i]} == I1 ]        then         state=S0         output[$i]=O0       fi          fi          done     echo "final state="$state     echo "output="${output[@]}


Why does printf ignore the IFS when printing out the result of my script?

This is a follow up to a question posted on SO. I've written a script called `except` which should print all filenames / directories except the ones given like so.               $ ls     a b c d     $ rm $(except b d)     $ ls     b d      The script I've written so far looks like this               shopt -s extglob     shopt -s nullglob          old_ifs=$IFS     IFS='|'     matches="!($*)"     IFS=' '          printf '%s' $matches     IFS=$old_ifs      This works more or less but the main problem is that printf doesn't seem to respect `IFS` set to `` (blank). It just prints them without a space between. If I instead use echo, it works (except for the added newline). But for compatibility reasons I want to use printf for this task. How can I achieve this? What am I doing wrong? I also tried using the `%q` modifier which also didn't result in the desired output.               printf '%q' $matches


what is OS hardening in linux or unix?

The term **OS hardening** itself is misleading/vague to me as i am reading to understand it online here. It seems to me that its something related to making linux/unix box more secure.


Use PSF font in X11 terminal emulator

I want to use a specific console font (`/usr/share/consolefonts/Uni3-Fixed16.psf.gz`) in a X11 terminal emulator (for example Terminator or gnome-terminal).   * I've stumbled over similar questions, but nothing about PSF, just PCF. How can I install a PSF font, or convert it to something that can be used?   * If this does not work for whatever reason, is there a font that comes close to the font mentioned? I've tried out many and this is the best I've found.   * Of course I have also scanned with Google, finding some good compilations. For me Unifont looks closest.


How to group grep results?

I have a file that contains results grouped into categories. For example:               checking results for $var     here are some results1 for $var status ok     here are some results2 for $var status ok     here are some results3 for $var status ok          checking results for $var2     here are some results1 for $var2 status ok          checking results for $var3     here are some results1 for $var3 status ok     here are some results2 for $var3 status ok     here are some results3 for $var3 status critical     here are some results4 for $var3 status ok      I need to check if any of the lines in a given category had status "critical", and display it if so. For example:               Status $var -- OK     Status $var2 -- OK     Status $var3 -- Critical          Note : Critial at $result3 for $var3      Using `grep -A` would not help much because the number of results under a particular variable varies.


Randomly logging out

My Xubuntu 10.04 system logs me out seemingly at random. How can I diagnose why this is happening and correct it?


Unable to boot into archlinux -> try hd0 skip ms

I was using Archlinux and Windows 7 together for more than 6 months. But today after I rebooted Archlinux it stuck in the boot screen. When I choose archlinux it will hang and display               try hd0 skip ms     try hd1 EXT2      I was using http://neosmart.net/EasyBCD/ to create the bootloader. I am still able to boot to Windows7.


Make vimdiff display different lines as different lines (not partially different)

vimdiff has an annoying habit of displaying two almost-completely-different lines as the same partially-different line just because they share a character in common at the beginning or end. For example: `foo.txt` contains: `The quick brown fox jumps over the lazy dog`. `bar.txt` contains: `This is a completely different line`. `vimdiff foo.txt bar.txt` displays these two lines side-by-side with everything but the `Th` at the beginning highlighted. Is there a way to disable this behaviour and just display different lines as being different lines?


Using shell script to select static IPv4 configuration according to router address

I have Linux Mint 15, I live in a university where the hostel and lab have separate static IP settings. Is there a way to set up the connection mechanism so that my laptop will automatically select the correct configuration according to which router is serving it? EDIT: My question is actually case specific to wired connection, but would be interested to know about both.


Can not change to a static IP in Fedora 19

I'm having a bit of a weird situation. I've installed Fedora Linux 19 onto a virtual machine with no GUI. Initially eth0 does not show up when I perform `ifconfig`.   When I run `dmesg | grep eth`, I see the adapter but it says it changed names to p2p1. Once I perform the `ifconfig p2p1 up` command it shows up. Now when I try to edit the `/etc/sysconfig/network-scripts/ifcfg-p2p1`, it does not exist. The only scripts that are there lo and enp0s3. If I try to create the `ifcfg-p2p1` file with the correct settings, I cannot restart the network service. I tried editing the `enp0s3` file, but that did not work. I'm fairly new to linux and not sure what else to put in here. So if you need any more information just let me know and I'll put it in here.


Backing up hard links (rsync)?

My question begins with: Do I actually have hard links on my disk at all (except for "." and ".." of course)? I'm not sure how I would find that out? If no, the question is already answered. If yes, I'd like to adjust my backup routine (currently using `rsync -a`) to preserve my hard links. I've seen the option `-H`, but the man page worries me with a few statements, e.g.:               -a, --archive         ...         Note that  -a  does not preserve hardlinks, because finding          multiply-linked files is expensive...          -H, --hard-links          ...         It does NOT currently endeavor to break already existing hard links          on the destination that do not exist between the source files. ...              Note that rsync can only detect hard links between files that are          inside the transfer set...      So what should I do, if I have hard links on my disk?


Forcing GNU make to run commands in order

With the following Makefile, GNU make runs the two commands in parallel. Since the first one takes time to finish, `rm *.log` is run before the `log` file is created, and fails.               dummy.pdf: dummy.tex         tex dummy.tex &> /dev/null;         rm *.log      The file `dummy.tex` one line: `\bye` (a short empty file for TeX). Replacing `tex dummy.tex` by any other command shows the same behaviour. Removing `&> /dev/null` would of course solve the problem, but it is not a very good option in my case, since the Makefile is provided by a third party. Is it possible to prevent GNU make from doing anything in parallel? (the flag `-j 1` does not help). EDIT: output to the terminal:               bruno@bruno-laptop:~/LaTeX/make-experiment$ make     tex dummy.tex &> /dev/null;     rm *.log     rm: cannot remove `*.log': No such file or directory     make: *** [dummy.pdf] Error 1     bruno@bruno-laptop:~/LaTeX/make-experiment$ This is TeX, Version 3.1415926 (TeX Live 2009/Debian)     (./dummy.tex )     No pages of output.     Transcript written on dummy.log.


How can I show the number of positions lines have moved in diff output?

## top1               1,facebook.com     2,google.com     3,youtube.com     4,yahoo.com     5,wikipedia.org     6,baidu.com     7,live.com     8,amazon.com     9,qq.com     10,twitter.com      ## top2               1,facebook.com     2,google.com     3,youtube.com     4,yahoo.com     5,baidu.com     6,wikipedia.org     7,live.com     8,qq.com     9,amazon.com     10,twitter.com          diff -u  /Users/stofke/Desktop/top2a.csv /Users/stofke/Desktop/top1a.csv |       sed -n '1,2d;/^[-+]/p' |       sort --field-separator=',' --key=2           +9,amazon.com     -8,amazon.com     +5,baidu.com     -6,baidu.com     +8,qq.com     -9,qq.com     +6,wikipedia.org     -5,wikipedia.org      But I actually need this:                +1, amazon.com      -1  baidu.com      -1  qq.com      +1  wikipedia.org      I don't know how to do that last step (I would also need to calculate the % wise decline or raise) Adding `| paste -d, - -` gets me this               +9,amazon.com,-8,amazon.com     +5,baidu.com,-6,baidu.com     +8,qq.com,-9,qq.com     +6,wikipedia.org,-5,wikipedia.org


Unable to mount usb drive, but computer sees that it's there.. PNY (MIPS Lemote)

The computer being used is a Lemote Yeeloong, and the OS is currently Debian Wheezy (mipsel) with no X windows system. So the computer can only be operated with unix commands right now (until I configure an X system).   I plug in the USB, which is formatted with a FAT32 filesystem, and the syslog says to after a few nanoseconds:               [sdc] No caching page mode present     [sdc] Assuming drive cache: write through      Then I type `mount /dev/sdc` and press ENTER but the computer tells me that it cannot find such a `/dev/sdc` in `/etc/fstab` or `/etc/mtab`.   After which I type `df` to see if the drive shows up anywhere mounted already or represented in /dev somewhere. But I see nothing. What should I do? Ultimately I am going to put a new filesystem on this thing so that I can use it to netboot. But I am stuck in this place where I am unable to even mount the device.


Applications running under SELinux that access NonPosix drives

I am looking to use either AppArmor or SELinux. Of what I've seen so far I think I prefer SELinux, but there is one thing that does concern me, that is accessing NonPosix partitions. Let us look at a specific exmple: Suppose I want okular to read and write ( and only to read and write ) from an sdcard which is likely formatted in FAT32. Is there some work around or some policy that will allow me to do that?


Shell script to list locked packages in FreeBSD

I'm trying to make a oneliner to be able to list all locked (forbidden to upgrade) packages in FreeBSD. Normally, you issue this command:               pkg info -ak      It outputs list of all packages in system including locked and unlocked which isn't working for me as I only want locked ones. If I grep 'yes' it does exactly what I want:               pkg info -ak | grep yes      It outputs following:               nginx-devel-1.5.10             yes     php5-extensions-1.7            yes     php55-5.5.8                    yes      Now, what I want is to be able to edit that output a little bit by changing string 'yes' for following ( _adding package name w/ version omitted_ ):               nginx-devel-1.5.10             locked, run: sudo pkg unlock nginx-devel     php5-extensions-1.7            locked, run: sudo pkg unlock php5-extensions     php55-5.5.8                    locked, run: sudo pkg unlock php55      I tried following unsuccessfully ( _newb here_ ):               pkg info -ak | grep yes | sed s/yes/"locked - run: sudo pkg unlock $(pkg info -ak | grep yes | cut -d - f1-2)"/      While what I've tried isn't working I posted it just for you to get the idea what I'm trying to achieve.


How do I customize the bash prompt on centos?

I've altered the `/etc/bashrc` file. I commented out the previous definition and inserted my own:               PS1="--bash: (\u@\h:\w) $"      This is not having any affect. When I make this change at the command prompt, it works great, but then it's not permanent.


Highlight the three last updated files in ls output

Is there any way to overload or wrap the `ls` command so that it will highlight / underline / otherwise make obvious the last three modified files? I know that I can simply `ls -rtl` to order by reverse modification time, but I usually do need an _alphabetical_ list of files despite the fact that I would like to quickly identify the last file that myself or another dev modified.


I want to expose "easy" URL's for machines on a home network. Is custom DNS/BIND the answer?

I recently convinced my room mates to cut the cord and go cable free, and they've found it pretty great so far. I'm in the process of setting up a pretty sweet, mostly automated home theater setup that revolves around an Apple TV, and part of this automation uses stuff like Sick Beard, Couch Potato, and the Transmission daemon. I've got everything mostly working, including the web interfaces for all of the above services, but I'd like to make the URL's more friendly than `<ip address>:<port number>` so that my room mates, who are _not_ technical in the slightest, can access these services (especially Couch Potato and Sick Beard). I'd like for them to be able to go to a url like `movies.home` or `tv.home` (I know that collides with a proposed TLD, if you have suggestions on this front as well I'm open) and be able to add shows to Sick Beard or put a movie on Couch Potato's watch list since those UI's are fairly straight forward to use. I'd like for this name resolution to be done at a network wide level, so that all of our phones and laptops and whatnot can get to the web interfaces without much work or me having to go around and editing everybody's hosts file. I don't care about accessing the stuff from outside of the home network, I only want it usable from our internal network. I'm not completely sure where to start, and I wanted to make sure I wasn't missing a simpler solution before pursuing a custom DNS server with `BIND` since I've never used it before and I wasn't sure if it would do what I want it to do; I was thinking that I'd set up BIND on a box somewhere in the house and then have my wireless router point to that local box as its DNS server then figure out some way to have the BIND box forward all non-home-media related requests to OpenDNS or something. Can BIND even do resolution based on different ports instead of different logical addresses? Anyway. Help is greatly appreciated.


is free command displaying all physical memory or there is some RAM reserved and hidden?

I am supposed to have 512MB of ram on my VM, however I see 495mb of total ram when I do free command. I would like to know if in case my system really had "precisely" 512MB of physical ram, if in free I would see 512MB as well, or if kernel takes some ram and reserves it for itself, therefore it looks like the system has less actual memory. I am aware that if my memory was over ~3.5 GB I would need to use PAE on 32bit kernel, but this is not the case. The reason why I am asking is that I am paying for this VM to have 512MB and even if 17MB of ram doesn't seem to be much, I would like to get what I pay for... (it shouldn't be problem to increase ram of virtual machine by 17mb even if it require reboot).


Execution order with multiple commands

I'm relatively new to Linux and I'm working on a CronTab for scheduled backups. I figured out how to do multiple sequential jobs with `;` and `&&`, but I'm unsure how the dependency affects the sequence. My cron job looks like this:               # Every day at 0:00 (reboot server and do the hourly backup procedure).     0 0 * * * sh shutdown.sh && sh backup.sh ; sh nas.sh ; sh ftp.sh ; sh startup.sh              What I want to happen is to run shutdown.sh and continue the sequence if it's successful, but cancel it if it fails. My fear is it will only skip `sh backup.sh` but then continue the sequence. Will it work as intended? If not, would something like `shutdown && (backup ; nas ; ftp ; startup)` be possible?


Installing as 'root' is not currently supported - what should I do?

I finally got root access to one of the nodes which incredibly helped me to get most of my software installed. But now, for the first time, I got into issues for actually being root :-))               We recommend running this script as a designated SMRT Analysis user     (e.g. smrtanalysis) who will own all smrtpipe jobs and daemon      processes.            Current user is 'root' (primary group: root)          Installing as 'root' is not currently supported     Switch to the desired user and restart the install.     Aborting installation...      I therefore tried to create new user, but I don't have enough privileges to do that:               /usr/local/bin$ sudo adduser smrtanalysis     Adding user `smrtanalysis' ...     Adding new group `smrtanalysis' (1001) ...     Adding new user `smrtanalysis' (1001) with group `smrtanalysis' ...     Creating home directory `/home/smrtanalysis' ...     Stopped: Couldn't create home directory `/home/smrtanalysis': Permission denied.          Removing directory `/home/smrtanalysis' ...     Removing user `smrtanalysis' ...     Removing group `smrtanalysis' ...     groupdel: group 'smrtanalysis' does not exist     adduser: `groupdel smrtanalysis' returned error code 6. Exiting.      Can I somehow use my own user - which is root - to install this software? How?


Command to re-enable decoration on windows

I'm running openbox, I have accidentally undecorated a window (By clicking on `Un/Decorate`) Now is it possible to restore the decoration? Since the title is "invisible" now, I have no where to click on. Perhaps there's a Xorg command to do so?


How to alias cp with cp -i by default

Is there a good way to alias the command `cp file1 file2` to `cp -i file1 file2`? Apologies if this is a dumb question, I'm a Unix novice.


How do I fix Global Shortcuts when they stop working in KDE?

I recently had Global Shortcuts stop working in KDE 4. I asked around on forums and chat rooms for solutions. Some people mentioned kded. I tried reinstalling. After about a week I upgraded all my packages were back to normal. However, I still don't know what runs and causes Global Shortcuts to work and would like this to be clarified if anyone knows. Thanks.


How do I profile the kernel?

I'm having issues with a kworker process during system boot and I'd like to get such a nice call graph like Linus Torvalds posted here. How would I do this?


The most *robust* remote file copy?

How would I go about to copy files over a very unstable internet connection? Sometimes, the connection is lost, other times the IP of one machine or the other machine is changed, sometimes both, though dynamic DNS will catch it. Which tool or command would you suggest? I've heard that `rsync` is pretty nifty in copying only the diff, but that means a lot of work either restarting it again and again or putting it into a while or cronjob. I was hoping for something easier and foolproof. # Addendum: It's about copying every now and then a couple of directories with a few very large files >5GB in them from one site to the other. After the copy, both are moved locally to different locations. I can't do anything on the networking level, I wouldn't have the knowledge to do so. I'd rather not set up a web server in order to use wget. That is not secure and seems like a circuitous route. I have already established an SSH connection and could now rsync, as rsync is already installed on both machines (I wouldn't be able to get an rsync daemon up and running). Any hints on how I could make an **intelligent rsync over ssh** so that it tries to continue when the line is temporarily cut? But rsync won't be the problem when the ssh connection dies. So something like this (http://serverfault.com/questions/98745/) probably won't work:               while ! rsync -a .... ; do sleep 5 ; done      Any ideas? Thanks a lot! Gary


Create WiFi AP with LXDE

Using the network manager that comes with LXDE, is it possible to create a Wireless Access Point/Hotspot? That is, instead of the laptop connecting to an AP, it creates the AP so other devices can connect to it? I tried with "Create new wireless network...", I create one and then "connect" to it from the laptop, but my phone doesn't detect it as an AP, even though it's very close to the laptop. What is the correct way to do it? My OS is Debian Wheezy.


econf fails when installing pth

I'm just starting out with Gentoo and I'm getting a bit stuck installing programs with Portage. It's wonderful and automatic except when it isn't. Many of the programs I try to install (git, gedit, chrome, nautilus) eventually depend on pth, whatever that is. But it fails with an econf error:                  ERROR: dev-libs/pth-2.0.7-r3::gentoo failed (configure phase):          econf failed             Call stack:                 ebuild.sh, line   93:  Called src_configure               environment, line 2881:  Called econf '--disable-static'          phase-helpers.sh, line  577:  Called die        The specific snippet of code:                     die "econf failed"             If you need support, post the output of `emerge --info '=dev-libs/pth-2.0.7-r3::gentoo'`,        the complete build log and the output of `emerge -pqv '=dev-libs/pth-2.0.7-r3::gentoo'`.        The complete build log is located at '/var/tmp/portage/dev-libs/pth-2.0.7-r3/temp/build.log'.        The ebuild environment file is located at '/var/tmp/portage/dev-libs/pth-2.0.7-r3/temp/environment'.        Working directory: '/var/tmp/portage/dev-libs/pth-2.0.7-r3/work/pth-2.0.7'      Here is the ebuild line               [ebuild  N    ] dev-libs/pth-2.0.7-r3  USE="-debug -static-libs"      and the emerge info I put on pastebin because of its length. Buildlog:                * Package:    dev-libs/pth-2.0.7-r3      * Repository: gentoo      * Maintainer: crypto@gentoo.org      * USE:        abi_x86_64 amd64 elibc_glibc kernel_linux multilib userland_GNU      * FEATURES:   preserve-libs sandbox userpriv usersandbox     >>> Unpacking source...     >>> Unpacking pth-2.0.7.tar.gz to /var/tmp/portage/dev-libs/pth-2.0.7-r3/work     >>> Source unpacked in /var/tmp/portage/dev-libs/pth-2.0.7-r3/work     >>> Preparing source in /var/tmp/portage/dev-libs/pth-2.0.7-r3/work/pth-2.0.7 ...      * Applying pth-2.0.5-parallelfix.patch ...                              [ ok ]      * Applying pth-2.0.6-ldflags.patch ...                                  [ ok ]      * Applying pth-2.0.6-sigstack.patch ...                                 [ ok ]      * Applying pth-2.0.7-parallel-install.patch ...                         [ ok ]      * Applying pth-2.0.7-ia64.patch ...                                     [ ok ]      * Applying pth-2.0.7-kernel-3.patch ...                                 [ ok ]      * Replacing obsolete head/tail with POSIX compliant ones      *  - fixed aclocal.m4      *  - fixed configure      * Running elibtoolize in: pth-2.0.7/      *   Applying portage/1.5.10 patch ...      *   Applying max_cmd_len/1.5.20 patch ...      *   Applying sed/1.5.6 patch ...      *   Applying as-needed/1.5 patch ...      *   Applying target-nm/2.4.2 patch ...     >>> Source prepared.     >>> Configuring source in /var/tmp/portage/dev-libs/pth-2.0.7-r3/work/pth-2.0.7 ...      * econf: updating pth-2.0.7/config.sub with /usr/share/gnuconfig/config.sub      * econf: updating pth-2.0.7/config.guess with /usr/share/gnuconfig/config.guess     ./configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --libdir=/usr/lib64 --disable-static     ./configure: line 286: /tmp/autoconf.25970: Permission denied     ./configure: line 297: /tmp/autoconf.25970: Permission denied     ./configure: line 310: /tmp/autoconf.25970: No such file or directory      * ERROR: dev-libs/pth-2.0.7-r3::gentoo failed (configure phase):      *   econf failed      *       * Call stack:      *          ebuild.sh, line   93:  Called src_configure      *        environment, line 2887:  Called econf '--disable-static'      *   phase-helpers.sh, line  577:  Called die      * The specific snippet of code:      *              die "econf failed"      *       * If you need support, post the output of `emerge --info '=dev-libs/pth-2.0.7-r3::gentoo'`,      * the complete build log and the output of `emerge -pqv '=dev-libs/pth-2.0.7-r3::gentoo'`.      * The complete build log is located at '/var/tmp/portage/dev-libs/pth-2.0.7-r3/temp/build.log'.      * The ebuild environment file is located at '/var/tmp/portage/dev-libs/pth-2.0.7-r3/temp/environment'.      * Working directory: '/var/tmp/portage/dev-libs/pth-2.0.7-r3/work/pth-2.0.7'      * S: '/var/tmp/portage/dev-libs/pth-2.0.7-r3/work/pth-2.0.7'      What is going wrong here, and how do fix it?