title: ldd: cannot find library for xl c compiled binary but could for gcc compiled binary on AIX

text: I have compile on AIX two version of proftpd one with `gcc` and one with the `xl c compiler` from IBM.   The command line to compile both version are almost the excat same, but when I do a `ldd` on the `gcc` version, I have no problem while when I try to `ldd` the xl compiled I have for the `libmysqlclient.a` the message :   `Cannot find libmysqlclient.a(libmysqlclient.so.16)`   though I do include the library correct path during the compilation.   So the question is how can I identify the path where the binary look for binary or how can I include this path during compilation ? Feel free to ask for further details, I'll update my question. **Edit 1** ldd result:   for the gcc version I have :               ldd/usr/local/proftpd/sbin/proftpd     /usr/local/proftpd/sbin/proftpd needs:         /usr/lib//libc.a(shr.o)         /opt/freeware/lib/libcrypto.a(libcrypto.so.1.0.1)         /usr/lib//libpam.a(shr.o)         /opt/freeware/lib/libssl.a(libssl.so.1.0.1)         /opt/freeware/lib/mysql/mysql//libmysqlclient.a(libmysqlclient.so.16)         /opt/freeware/lib/libz.a(libz.so.1)         /unix         /usr/lib//libcrypt.a(shr.o)         /usr/lib//libc.a(shr_64.o)         /usr/lib//libpthreads.a(shr_xpg5_64.o)         /usr/lib//libmls.a(shr.o)         /opt/freeware/lib/libgcc_s.a(shr.o)         /usr/lib//libpthread.a(shr_xpg5.o)         /usr/lib//libcrypt.a(shr_64.o)         /usr/lib//libpthreads.a(shr_xpg5.o)         /usr/lib//libmlsenc.a(shr.o)         /usr/lib//libodm.a(shr.o)         /usr/lib//libpthreads.a(shr_comm.o)      For the xl C version I have :               ldd proftpd-1.3.4d/proftpd     proftpd-1.3.4d/proftpd needs:         /usr/lib/libc.a(shr.o)         /opt/freeware/lib/libcrypto.a(libcrypto.so.1.0.1)         /usr/lib/libpam.a(shr.o)         /opt/freeware/lib/libssl.a(libssl.so.1.0.1)         Cannot find libmysqlclient.a(libmysqlclient.so.16)         /opt/freeware/lib/libz.a(libz.so.1)         /unix         /usr/lib/libcrypt.a(shr.o)         /usr/lib/libc.a(shr_64.o)         /usr/lib/libpthreads.a(shr_xpg5_64.o)         /usr/lib/libmls.a(shr.o)         /usr/lib/libcrypt.a(shr_64.o)         /usr/lib/libpthreads.a(shr_xpg5.o)         /usr/lib/libmlsenc.a(shr.o)         /usr/lib/libodm.a(shr.o)         /usr/lib/libpthreads.a(shr_comm.o)      **Edit 2+1** compilation command (with a bit a formatting to make it more readable:   To compile with XL C I use this script               export CONFIG_SHELL=/opt/freeware/bin/bash     export CONFIG_ENV_ARGS=/opt/freeware/bin/bash     export CC=cc     export CFLAGS="-qmaxmem=16384 -DSYSV -D_AIX -D_AIX32 -D_AIX41 -D_AIX43 -D_AIX51 -D_AIX52 -D_AIX53 -D_AIX61 -D_ALL_SOURCE -DFUNCPROTO=15 -O -I/opt/freeware/include"export CXX=xlC     export CXXFLAGS=$CFLAGS     export F77=xlf     export FFLAGS="-qmaxmem=16384 -O -I/opt/freeware/include"     export LD=ld     export LDFLAGS="-L/opt/freeware/lib64 -L/opt/freeware/lib:/opt/freeware/lib/mysql/mysql -Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib -Wl,-bmaxdata:0x80000000"     export PATH=/usr/bin:/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin:/usr/vac/bin:/usr/vacpp/bin:/usr/ccs/bin:/usr/dt/bin:/usr/opt/perl5/bin:/opt/freeware/bin:/opt/freeware/sbin:/usr/local/bin:/usr/lib/instl     make clean     ./configure          --with-modules=mod_tls:mod_sql:mod_sql_mysql:mod_sql_passwd:mod_sftp:mod_sftp_sql          --without-getopt          --enable-openssl          --with-includes=/home/user/include3_mysql/zlib:/home/user/include_mysql/mysql:/opt/freeware/lib/mysql/mysql          #with or without it doesn't work          --with-libraries=/opt/freeware/lib/mysql/mysql            --prefix=/local/proftpd     make      The command line from GCC is a bit longer but without all the export part :               make clean     ./configure          --with-modules=mod_tls:mod_sql:mod_sql_mysql:mod_sql_passwd:mod_sftp:mod_sftp_sql          --without-getopt          --enable-openssl          --with-includes=/opt/freeware/include:/opt/freeware/include/mysql/mysql/:/home/user/libmath_header/          --with-libraries=/usr/lib/libc.a:/opt/freeware/lib/libcrypto.a:/usr/lib/libpam.a:/opt/freeware/lib/libssl.a:/opt/freeware/lib/mysql/mysql//libmysqlclient.a:/opt/freeware/lib/libz.a:/unix:/usr/lib/libcrypt.a:/usr/lib/libc.a:/usr/lib/libpthreads.a:/usr/lib/libmls.a:/opt/freeware/lib/libgcc_s.a:/usr/lib/libpthread.a:/usr/lib/libcrypt.a:/usr/lib/libpthreads.a:/usr/lib/libmlsenc.a:/usr/lib/libodm.a:/usr/lib/libpthreads.a          --prefix=/home/user/proftpd_bin     make      **Edit 4** : Does anybody have any small clue ?


title: Bash Wildcard Partial Match Directory

text: I have this bash script which is trying to find a directory that partially changes on peoples systems.               cd "$HOMEDIR/AppData/Local/GitHub/PortableGit"*"/bin"      Yet this does not seem to work - it just take the string literal. Is there an easy to make it expand correctly? Edit: Okay this is weird it works some of the time. When I do this:               GIT_DIR=$HOMEDIR/AppData/Local/GitHub/PortableGit*/bin     eval GIT_DIR_PASS=$GIT_DIR     echo $GIT_DIR_PASS      I get the correct information out but when I try to assign $GIT_DIR_PASS to another variable I get the string literal version.


title: curl timeout troubleshooting

text: I tried to `curl` popular websites e.g. `curl google.com` or `curl google.com:80` and there is always a timeout error. Some troubleshooting steps performed:   1. Able to `curl localhost` with response   2. Able to `ping google.com` with response   3. Tried change DNS to google DNS but to no avail   4. Tried `wget` and it does not work for external sites either Questions:   1. May I know what is the default port that `curl` is using?    2. Is this related to Firewall blocking? As far as I know port 80 is open for the server I am using.    3. What else can I do to further troubleshoot?


title: debian-installer: report setup progress

text: Can I, using preseed, make the debian installer report its progress to a server? I'd imagine something like calling `wget http://x.tld/stage_finished.php?s=partitioning_completed` to report the progress. Right now, I have to wait until the `late_command` hook to implement a progress report, but that's called just after the setup is finished.


title: How can I remove text on the last line of a file?

text: I am using a Bash shell script to construct a text file that contains a Javascript array. As far as I understand with Javascript, the last item in an array can't have a comma. In my Javascripts, that gives me errors. I have a list of items that is generated with other code, and the result looks something like this:               text0161: "blah",     text0162: "blah blah",     text0163: "blah blah blah",      I need to take the very last line, `text0163: "blah blah blah",` and remove the trailing comma, so it becomes `text0163: "blah blah blah"`. At this point in my processing, there is nothing after `text0163: "blah blah blah"`, so I can just look for the very last line in the file and remove the comma. However, the contents of the line might change, so it won't always be exactly `text0163: "blah blah blah",`. It might become just about anything else, like `text2020: "doobie doobie doo",`. I know I can use sed to delete the comma, like this:               sed -i 's@,@@g' file.txt      But I don't know how to _only_ do that on the last line.


title: How do I append text to the beginning and end of multiple text files in Bash?

text: I have a directory full of text files. My goal is to append text to the beginning and end of all of them. The text that goes at the beginning and end is the same for each file. Based on code I got from the web, this is the code for appending to the beginning of the file:               echo -e 'var language = {\n$(cat $BASEDIR/Translations/Javascript/*.txt)' > $BASEDIR/Translations/Javascript/*.txt      This is the code for appending to the end of the file. The goal is to add the text `};` at the end of each file:               echo "};" >> $BASEDIR/Translations/Javascript/*.txt      The examples I drew from were for acting on individual files. I thought I'd try acting on multiple files using the wildcard, `*.txt`. I might be making other mistakes as well. In any case, how do I append text to the beginning and end of multiple files?


title: Shell scripting enthusiast

text: This may sound generic and non technical to many but i can use some quality advice here. I am an technical support engineer who happens to be interested in shell scripting. My job does not need me to code and i need some advice on how i can develop my self as a shell scripting resource as i would like to make scripting / programing as one of the competency for future roles. I am already working on simple scrips using cent os and VMware. Any advice will be appreciated!


title: How can a permission a directory so that a user can list the contents, but cannot read them

text: I am setting up a vstpd FTP server where people can upload files to be processed. I want them to be able to write and see the list of files, but not actually download them. I'm using virtual users which handles this via linux permissioning.


title: Problem setting up iptables (LDAP traffic blocked)

text: My application server is on a network protected by a organization wide firewall, and my server is also using `fail2ban`. That said, I'd like to set up an additional layer of protection with `iptables`. I'm having a little trouble with my configuration. ### Requirements:   1. Deny access to everyone, then allow to a specific IP range (4.3.4.0/16)    2. Continued LDAP functionality in application (using`ldap_connect` in PHP)    3. Ability to retrieve external content via URL ### Knowns:   * The application server IP is 1.2.3.4   * The LDAP server resolves to 1.2.100.200 and uses port 636   * My laptop's static IP is 4.3.2.1 ### What I've tried: Starting with a vanilla `iptables` config that allows traffic over ports 22, 80 and 443, I added the following.               # explicitly allow ssh access from my laptop     iptables -A INPUT -s 4.3.2.1 -d 1.2.3.4 -p tcp --dport 22 -j ACCEPT          # deny all traffic     iptables --policy INPUT DROP          # allow traffic from a specific IP range     iptables -A INPUT -s 4.3.4.0/24 -j ACCEPT          # allow traffic from LDAP server IP     iptables -A INPUT -s 1.2.100.200 -j ACCEPT     iptables -A INPUT -p tcp --dport 636 -j ACCEPT      I save that config using `service iptables save`, then restart the service. ### Problems: If I'm already logged in, I can browse and use the application (except for one thing, below). If I'm not logged in, LDAP authentication hangs. The second issue is that I'm unable to access external content with the new config. I retrieve data from another machine using HTTPS. Is this just a matter of adding a rule to allow outbound traffic to the external machine's IP?


title: Problem with pipes. Pipe terminates when reader done

text: I am on OSX, using bash, trying to make sense of pipes. I wish to let a program communicate in two directions with a bash shell. I want to set this up in such a way that this is always the same shell, so that I can cd to some directory and bash will remember (rather than using a new bash shell all the time). What I have tried so far is this. From a new terminal (A), do               mkdir /tmp/IOdir     cd /tmp/IOdir     mkfifo pToB     mkfifo bToP     tail -f -1 pToB | bash >> bToP      Then, to test this connection, I can do, from a new terminal (B)               cd /tmp/IOdir     echo echo hello > pToB      and from a third terminal (C)               cd /tmp/IOdir     (read myline &&  echo $myline) < bToP      This behaves how I want. The same bash shell stays active, and the output comes through on the other side. Call this state of affairs X, so that I can refer later to it. **Onward from state X** However, now, from this state X, we cannot do the same thing again. That is, if we do from terminal (B)               echo echo hello > pToB      and then from terminal C               (read myline &&  echo $myline) < bToP      Then nothing comes through in terminal C. Moreover, if we again do, from terminal B               echo echo hello > pToB      The bash shell closes. What I could have done in state X was first do, from terminal C               (read myline &&  echo $myline) < bToP      and then from terminal B               echo echo hello > pToB      In this case hello comes through at terminal C, and it seems like we are in state X again. So we can basically repeat this forever. Now this might seem sufficient for two way communication, but my program is such that if it requests a new line like this               (read myline &&  echo $myline)      and there is no new line, it will "hang" (just like bash, in fact I mean to use a call to bash in the program). It is therefore not able to send input to pToB after that and there is nothing I can do. **Questions** Is there a way to set this up without doing too much programming in C? Is there a way to do this more elegantly without using two named pipes? What is causing the pipe to close in one scenario, and not in the other? **Edits** From this page on wikipedia, we have > Full-duplex (two-way) communication normally requires two anonymous pipes. On one hand, it seems at least I have the right number of pipes. On the other, I am using named pipes, not anonymous ones. So maybe this will be hard/impossible. Furthermore mkfifo gnu/linux source is likely defined in terms of mknod gnu/linux source, which is also a unix command. But I'm not sure if much can be learned from that. Here is an introduction to pipes in C, including the linux source of pipe. Maybe that can tell us why a pipe gets closed, if that is indeed what happens. Here is a related question about preventing that fifos get closed. I tried tying the pipes to background sleeping processes as was done in an answer tere but that didn't help.


title: iptables prevents connection via ssh after port change despite ACCEPT rule

text: I have two machines hooked up to a router, one Windows with PuTTY, and one CentOS 6.4 with sshd and with the default SELinux still enabled. They can both ping each other successfully. I installed the policycore-python package so I could use `semanage`, then followed these directions. Step 4 looked like it's the new default, since it was already set up that way. Step 5 worked and I assume the stuff about `~/.ssh/config` is for setting up your ssh client on another machine, so it doesn't apply (I can do something similar in PuTTY.) Step 6 I figured the shortest and most applicable thing was the third option, so I ran:               iptables -A INPUT -p tcp --dport 2345 --syn -m limit --limit 1/m --limit-burst 3 -j ACCEPT     iptables -A INPUT -p tcp --dport 2345 --syn -j DROP     service iptables save     service iptables restart      At this point, I can do `ssh -p 2345 localhost` and also `ssh -p 2345 192.168.1.4` on the CentOS box and log into itself fine, but I can no longer PuTTY into the CentOS box. I put the right IP and port 2345 in the connection window, but upon attempting to connect, I get a black screen with a solid green cursor, which, after a few seconds, gives a GUI popup saying `Network error: Connection timed out`. If I stop the iptables service, I can log in using PuTTY the same way. So it seems the problem is definitely with `iptables` and not `sshd` (nor `semanage`?). What's wrong with my `iptables`?               $ sudo iptables -L     Chain INPUT (policy ACCEPT)     target     prot opt source               destination     ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED     ACCEPT     icmp --  anywhere             anywhere     ACCEPT     all  --  anywhere             anywhere     ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:ssh     REJECT     all  --  anywhere             anywhere            reject-with icmp-host-prohibited     ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:2345 flags:FIN,SYN,RST,ACK/SYN limit: avg 1/min burst 3     DROP       tcp  --  anywhere             anywhere            tcp dpt:2345 flags:FIN,SYN,RST,ACK/SYN          Chain FORWARD (policy ACCEPT)     target     prot opt source               destination     REJECT     all  --  anywhere             anywhere            reject-with icmp-host-prohibited          Chain OUTPUT (policy ACCEPT)     target     prot opt source               destination


title: Installing Samba 4.0.7 on CentOS 6.4

text: CentOS 6.4's yum repo has only 4.0.0. I see some major security and stability patches since then. So I signed up for SerNet, and followed their directions to install their GPG key. Then I did:               sudo yum -y install sernet-samba*      The output ends with:               > Transaction Summary     > ================================================================================================================================ Install      34 Package(s)     >      > Total size: 36 M Installed size: 157 M Downloading Packages: Running     > rpm_check_debug Running Transaction Test     >      >      > Transaction Check Error:   file     > /usr/lib/python2.6/site-packages/tdb.so from install of     > sernet-samba-ad-4.0.7-2.el6.i686 conflicts with file from package     > python-tdb-1.2.10-1.el6.i686   file     > /usr/lib/python2.6/site-packages/talloc.so from install of     > sernet-samba-ad-4.0.7-2.el6.i686 conflicts with file from package     > pytalloc-2.0.7-2.el6.i686   file     > /usr/lib/python2.6/site-packages/ldb.so from install of     > sernet-samba-ad-4.0.7-2.el6.i686 conflicts with file from package     > pyldb-1.1.13-3.el6.i686   file     > /usr/lib/python2.6/site-packages/_tevent.so from install of     > sernet-samba-ad-4.0.7-2.el6.i686 conflicts with file from package     > python-tevent-0.9.17-1.el6.i686   file     > /usr/lib/python2.6/site-packages/tevent.pyc from install of     > sernet-samba-ad-4.0.7-2.el6.i686 conflicts with file from package     > python-tevent-0.9.17-1.el6.i686   file     > /usr/lib/python2.6/site-packages/tevent.pyo from install of     > sernet-samba-ad-4.0.7-2.el6.i686 conflicts with file from package     > python-tevent-0.9.17-1.el6.i686     >      > Error Summary     > -------------      ...and then back to prompt. Does this mean I need to upgrade python or something? I have installed:               Python 2.6.6 (r266:84292, Feb 21 2013, 23:54:59)     [GCC 4.4.7 20120313 (Red Hat 4.4.7-3)] on linux2      Not new enough? Also               $ rpm -qi python-tevent     Name        : python-tevent                Relocations: (not relocatable)     Version     : 0.9.17                            Vendor: CentOS     Release     : 1.el6                         Build Date: Fri 22 Feb 2013 01:47:57 AM EST     Install Date: Thu 04 Jul 2013 09:56:11 AM EDT      Build Host: c6b8.bsys.dev.centos.org     Group       : Development/Libraries         Source RPM: libtevent-0.9.17-1.el6.src.rpm     Size        : 16963                            License: LGPLv3+     Signature   : RSA/SHA1, Sat 23 Feb 2013 12:52:51 PM EST, Key ID 0946fca2c105b9de     Packager    : CentOS BuildSystem <http://bugs.centos.org>     URL         : http://tevent.samba.org/     Summary     : Python bindings for the Tevent library     Description :     Python bindings for libtevent


title: How to increase the size of / with unallocated hdd space

text: So, I had run out of space on `/` (which was initially 9.3 GB). So I had some un-allocated space on my hdd (`/dev/sda`) that I wanted to assign to the `/` partition, which is also: `/dev/sda1`. For reference this is how my HDD is laid out:               → sudo fdisk -l          Disk /dev/sda: 320.1 GB, 320072933376 bytes     255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors     Units = sectors of 1 * 512 = 512 bytes     Sector size (logical/physical): 512 bytes / 512 bytes     I/O size (minimum/optimal): 512 bytes / 512 bytes     Disk identifier: 0x00081f45             Device Boot      Start         End      Blocks   Id  System     /dev/sda1   *        2048    19531775     9764864   83  Linux     /dev/sda2        19533822   625141759   302803969    5  Extended     /dev/sda5        19533824    34172927     7319552   82  Linux swap / Solaris     /dev/sda6        34174976   443774975   204800000   83  Linux               → sudo sfdisk -l          Disk /dev/sda: 38913 cylinders, 255 heads, 63 sectors/track     Warning: extended partition does not start at a cylinder boundary.     DOS and Linux will interpret the contents differently.     Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0             Device Boot Start     End   #cyls    #blocks   Id  System     /dev/sda1   *      0+   1215-   1216-   9764864   83  Linux     /dev/sda2       1215+  38913-  37698- 302803969    5  Extended     /dev/sda3          0       -       0          0    0  Empty     /dev/sda4          0       -       0          0    0  Empty     /dev/sda5       1215+   2127-    912-   7319552   82  Linux swap / Solaris     /dev/sda6       2127+  27623-  25497- 204800000   83  Linux      There is approximately 85~90 GB that is available to be allocated to my `/` partition. **Edit:** I have gone for option two, and created a partition: `/dev/sda7`               → sudo sfdisk -d /dev/sda     Warning: extended partition does not start at a cylinder boundary.     DOS and Linux will interpret the contents differently.     # partition table of /dev/sda     unit: sectors          /dev/sda1 : start=     2048, size= 19529728, Id=83, bootable     /dev/sda2 : start= 19533822, size=605607938, Id= 5     /dev/sda3 : start=        0, size=        0, Id= 0     /dev/sda4 : start=        0, size=        0, Id= 0     /dev/sda5 : start= 19533824, size= 14639104, Id=82     /dev/sda6 : start= 34174976, size=409600000, Id=83     /dev/sda7 : start=443777024, size=181364736, Id=83


title: The shell's "delete word" shortcut deletes too many characters

text: Under Bash some behavior of Alt+d has been driving me crazy since years and I figured out that maybe it could be fixed with a setting. If I'm at a terminal and issue a command like this:               ...$   cat >> ~/notesSuperLongFilename.txt      and then if I want, say, to issue :               ...$ scp ~/notesSuperLongFilename.txt      I'd like to get back the "cat >> ~/notesSuperLongFilename.txt" using Ctrl+p (previous line) and then do Ctrl+a and then Alt+d and Alt+d again so I'd have:               ...$  ~/notesSuperLongFilename.txt      and then I'd be able to simply enter "scp" and then do a Ctrl+m (or hit Enter / Return). However it doesn't work because after the first Alt+d I get:               ...$ >> ~/notesSuperLongFilename.txt      (so far so good) but after the second Alt+d I get:               ...$ .txt      So for some reason Alt+d deletes _">> ~/notesSuperLongFilename"_ at once instead of just deleting _">> "_. This has to be the single biggest time-waster that is driving me crazy with Linux / Bash since literally years. So how can I fix this (arguably broken) behavior of Alt+d? P.S: I don't know who's "responsible" for that Alt+d behavior: I don't know if it's the terminal or if it's the shell (Bash in my case).


title: How can I change the error messages for 'touch'?

text: Lets just have some typical usage of touch as expected:               $ touch this     $ sudo chown root this     $ touch this     touch: this: Permission denied      Now what I want to do is change `touch: this: Permission denied` to say `Can't touch this.` Is there a way I can do that?


title: Equivalent of scp -l bandwidth_cap for .ssh/config?

text: **Short form:** You can limit the bandwidth the `scp` uses with the `-l` switch, you pass a number that's in kbits/sec. I'd rather set this in my `.ssh/config` file for certain names machines. What's the equivalent named setting for `-l`? I haven't been able to find it. _Followup question:_ Generally, not sure how to map back and forth between ssh command line options and config names, short of doing Google searches or manually comparing man pages on a case by case basis. Is there a table that directly equates the two? **Longer form of first question, with context:** I've started using ssh config quite a bit, especially now that I need to go through a proxy and do lots of port mappings. I even define the same machine more than once depending on what type of tunneling I need. However, when uploading a large file, it's difficult to do anything else on my machine. Even though I have more download bandwidth than up, I think that `scp` saturates the link so even my small requests can't reach the Internet. There's a fix for this, using the `-l` bandwidth command line switch for `scp`.               scp -l 1000 bigfile.zip titan:      I'd like to use this in my config instead, so I'd create an additional named entry called "titan-upload" and I'd use that as the target whenever I upload. So instead of:               scp bigfile.zip titan:      I'd say:               scp bigfile.zip titan-upload:      Or even set different caps depending on where I am:               scp bigfile.zip titan-upload-from-work:       vs.     scp bigfile.zip titan-upload-from-home:      I'm generally on Mac and Linux.


title: controlling module loading order using a shell script or systemd(fedora) service?

text: Using Ubuntu 12.04 with systemd(default). I have a broadcom 4312 wireless card which needs "wl" driver and broadcom NIC which uses "b44" "ssb" modules. now, the problem is, at boot the wireless card is not functioning. for that, I have to remove all related modules viz. wl,b44,ssb etc. later, If I modprobe wl;modprobe b44 - both the devices(Wireless and NIC) works fine. So, How can I modify the kernel module loading sequence such that "wl" loads first followed by "b44"? Is it worth using /etc/modprobe.d/aliases.conf adding aliases to the modules? **or** run a shell script that essentially runs **at the end of startup** running commands:               modprobe -r wl b44 ssb     wait 5 (to complete)     modprobe wl      wait 2     modprobe b44       I have no idea to write a systemd or autostart script. if a script works, that is the best option.


title: Webalizer: website/stats doesn't show index.html but directory listing

text: I'm working with Linux and want to provide my users with up-to-date statistics of their website. ex: user1 has a website on my Linux DNS server: `user1.be` but when he surfs to `user1.be/stats` he has to see the stats of his website. Now I installed `webalizer` and did:               webalizer -n hostname -o /path/to/webalizer/output /path/to/logfile.log      which works great but when the user surfs to user1.be/stats he sees the directory listing (`index.html`, `usage.png`, `daily_usage.png`, ...) _But_ I want him to directly see `index.html` when surfing to `user1.be/stats`. Also in my `/etc/httpd/conf/httpd.conf` I got the following listed:               DirectoryIndex index.html index.html.var homepage.html index.php      How can this be accomplished, cause I can't figure it out...


title: No Video Output with DVI to VGA converter

text: Here's a weird one... so X definitely grabbed all the EDID info from my second monitor, as nothing seems amiss in any output or log. The system responds correctly to enabling output, i.e. xrandr displays all the correct info, emits no errors when enabling or disabling output to the DVI connection, and even lets my mouse fly to the left when I create a Xinerama screen. However, all I actually get on my second monitor (connected with a DVI to VGA converter) is a black screen. Any idea how I can even begin troubleshooting that one? (it works fine on with winblows)...


title: What would be the best way to work around this glibc problem?

text: I administer a Gentoo Hardened box that uses file capabilities to eliminate most of the need for setuid-root binaries (e.g. `/bin/ping` has CAP_NET_RAW, etc). Infact, the only binary I have left is this one:               abraxas ~ # find / -xdev -type f -perm -u=s     /usr/lib64/misc/glibc/pt_chown     abraxas ~ #       If I remove the setuid bit, or remount my root filesystem `nosuid`, sshd and GNU Screen stop working, because they call `grantpt(3)` on their master pesudoterminals and glibc apparently executes this program to chown and chmod the slave pseudoterminal under `/dev/pts/`, and GNU Screen cares about when this function fails. The problem is, the manpage for `grantpt(3)` explicitly states that under Linux, with the `devpts` filesystem mounted, no such helper binary is required; the kernel will automatically set the UID & GID of the slave to the real UID & GID of the process that opened `/dev/ptmx` (by calling `getpt(3)`). I have written a small example program to demonstrate this:               #include <string.h>     #include <sys/types.h>     #include <sys/stat.h>     #include <stdlib.h>     #include <stdio.h>     #include <unistd.h>     int main(void)     {         int master;         char slave[16];         struct stat slavestat;         if ((master = getpt()) < 0) {             fprintf(stderr, "getpt: %m\n");             return 1;         }         printf("Opened a UNIX98 master terminal, fd = %d\n", master);         /* I am not going to call grantpt() because I am trying to          * demonstrate that it is not necessary with devpts mounted,          * the owners and mode will be set automatically by the kernel.          */         if (unlockpt(master) < 0) {             fprintf(stderr, "unlockpt: %m\n");             return 2;         }         memset(slave, 0, sizeof(slave));         if (ptsname_r(master, slave, sizeof(slave)) < 0) {             fprintf(stderr, "ptsname: %m\n");             return 2;         }         printf("Device name of slave pseudoterminal: %s\n", slave);         if (stat(slave, &slavestat) < 0) {             fprintf(stderr, "stat: %m\n");             return 3;         }         printf("Information for device %s:\n", slave);         printf("    Owner UID:  %d\n", slavestat.st_uid);         printf("    Owner GID:  %d\n", slavestat.st_gid);         printf("    Octal mode: %04o\n", slavestat.st_mode & 00007777);         return 0;     }      Observe it in action with the setuid bit on the aforementioned program removed:               aaron@abraxas ~ $ id     uid=1000(aaron) gid=100(users) groups=100(users)     aaron@abraxas ~ $ ./ptytest      Opened a UNIX98 master terminal, fd = 3     Device name of slave pseudoterminal: /dev/pts/17     Information for device /dev/pts/17:         Owner UID:  1000         Owner GID:  100         Octal mode: 0620      I have only a few ideas as to how to work around this problem: 1) Replace the program with a skeleton that simply returns 0. 2) Patch grantpt() in my libc to do nothing. I can automate both of these, but does anyone have a recommendation for one over the other, or recommendations for how else to solve this? Once this is solved, I can finally `mount -o remount,nosuid /`.


title: Visually displaying keyboard layouts of X.org? / Also: where do X.org keyboard layouts came from?

text: I'd like to visually see how some of the keyboard layouts in X.org look like, as an example in Windows I can see them with a program called Microsoft Keyboard Layout Creator or even on Wikipedia. Additionally, from where the layouts to X.org came from? some of them (namely: US International) are very different from their Windows counterparts. Edit: I would like to see all the possibilities with Ctrl, Shift, AltGr, etc., like in [Wikipedia's Keyboard layout page](insert link who has more reputation): (insert image of US International layout who has more reputation)


title: X windowing system remote desktop procedure? (No VNC, no XN)

text: I want to display the desktop of my raspberry pi on my laptop. On the rPI runs Raspbian with LXDE. I am on Ubuntu 12.04/awesome. Is it possible to display the complete rPi-desktop on my laptops Xserver? I dont want to see just windows with the `ssh -X ...` way. I want to have the complete desktop. As I read VNC sends just picture over the net. And what exactly NX does, i did not understand really :D. Some compression on top of X11... What is the real raw X windowing system remote desktop procedure?


title: auto reconnect VPN on waking up

text: When I wake up my computer, the internet automatically reconnects, however the VPN does not.   Is it possible to make it automatically reconnect (using the network manager on KDE, or at least in a way that the network manager is aware if it being connected via VPN) ?


title: A bunch of files have 777 permissions

text: I have been learning Python and Bash scripting, and I up to now I have given my scripts 777 permissions. Having learned more about how to set permissions, and knowing this is a bad idea, I ran the following command (On Mac OSX, v10.6.8):               find / -type f -perm 0777      I was expecting to only get a small list of files that I had assigned 777 permissions, but instead I got a huge list. (1,503 to be exact.) These include my small number of scripts, as well as all of my image files, html and css files, example code that came with ebooks, as well as files related to applications such as Adobe Flash Catalyst, Smith Micro Anime Studio, something called Microsoft Play Ready (I assume this is part of Silverlight), and others. I'm kind of new at this, but isn't this a problem? Should any files have 777 permissions?


title: viewing variable values in a KSH script

text: I am using a KSH script that creates numerous variables from fairly complex code. What command can I place in the script to view the value of these variables as they are created? Would ECHO be the correct command, in a line like **echo variable is $variable_name**?


title: Ant error after installing NetBeans 7.3 in Lubuntu

text: I have NetBeans 7.01 from Debian repository - all works. But I have a problem with NetBeans 7.3 from the official site (installed on the same machine) - I can't compile anything: > **ERROR - Ant is misconfigured and cannot be run.** > java.lang.ClassNotFoundException: > org.apache.tools.ant.module.bridge.impl.BridgeImpl at > java.net.URLClassLoader$1.run(URLClassLoader.java:366) at > java.net.URLClassLoader$1.run(URLClassLoader.java:355) at > java.security.AccessController.doPrivileged(Native Method) at > java.net.URLClassLoader.findClass(URLClassLoader.java:354) at > org.apache.tools.ant.module.bridge.AntBridge$MainClassLoader.findClass(AntBridge.java:647) > at java.lang.ClassLoader.loadClass(ClassLoader.java:423) at > java.lang.ClassLoader.loadClass(ClassLoader.java:356) at > org.apache.tools.ant.module.bridge.AntBridge.createAntInstance(AntBridge.java:299) > at > org.apache.tools.ant.module.bridge.AntBridge.getAntInstance(AntBridge.java:279) > at > org.apache.tools.ant.module.bridge.AntBridge.getInterface(AntBridge.java:268) > at > org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:541) > at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153) Lubuntu x32, all updates. Nimbus plugin. In **Options -> Java -> Ant -> ant Home** I can't choose a valid folder. I tried `/usr/share/ant`, but I get the above error with that even though I have `ant.jar` in that directory.


title: "Live" Processor hang under Ubuntu 11.10, how to diagnose/fix?

text: We recently upgraded to Ubuntu 11.10 on a virtual server. Since the upgrade, the server will periodically "hang" with processor use at zero (according to monitoring). Monit is still running and sending out notifications, cron will restart Apache etc., but we cannot ssh into the box and http does not start. Can anyone give pointers to where to start? Thanks!


title: Prevent Iceweasel from allowing sites to override default shortcuts

text: For example, I use Ctrl-L to mark the URL field. On some sites, this is overridden to do something else. How do I make this never happen?


title: Unix sort out of memory

text: I'm sorting a 25 GB file containing 200M lines on Fedora 18 using: sort -S 10G -T /bigdisk bigfile and I am getting process killed due to no memory. The process isn't maxing out my RAM before death (12 GB free) and disk space is ok. Any suggestions as to the cause appreciated. I'm sure sort can manage this due to its partitioning and merge. More info from dmesg               [87278.935572] Out of memory: Kill process 1971 (sort) score 258 or sacrifice child     [87278.935574] Killed process 1971 (sort) total-vm:4512168kB, anon-rss:4237040kB, file-rss:584kB


title: Why have a fake LR-WPAN driver?

text: In the Linux kernel configuration, a fake LR-WPAN driver can be enabled and added to the kernel that will be compiled. Why would someone want a fake LR- WPAN driver? I assume it would be for debugging, but I do not want to only assume. The documentation and Google do not appear to have an answer.


title: Grep files excluding few files names

text: I have a folder who have files names according to date for one month i.e. AP_20140101.gz, AP_20140102.gz, ... for each day. Here 2014 is year, 01 is month and 01 is date (AP_YYYYMMDD.gz is general format ) For selecting files for date 10 to 19 I can do this :               ls | grep *2014011*      But I am unable to grep from 15 to 31. Any suggestions?


title: Concatenate files in multiple matching subdirectories

text: I need to concatenate files based upon the name of the subdirectory they are in. The subdirectories sometimes have duplicates and sometimes don't. The file structure looks like this:   1. RootDir      * 633        * 633_S1_L001_R1_001.fastq       * 633_S1_L001_R2_001.fastq     * 739        * 739_S1_L001_R1_001.fastq       * 739_S1_L001_R2_001.fastq     * 739(1)        * 739_S1_L001_R1_001.fastq       * 739_S1_L001_R2_001.fastq     * 739(2)        * 739_S1_L001_R1_001.fastq       * 739_S1_L001_R2_001.fastq     * 834        * 834_S3_L001_R1_001.fastq       * 834_S3_L001_R2_001.fastq     * 834(1)        * 834_S7_L001_R1_001.fastq       * 834_S7_L001_R2_001.fastq It is the 3 number prefix and the R-number that matters, and the concat should be done on matching R#'s, with the S-number being variable.   1. No concatenation would need to be done to files in dir 633   2. All 3 R1 files in the 739 dirs would need to be concatenated in order (739 first, 739(1)...)   3. The output would need to go into a subdir of the subdir (/RootDir/739/739/*)   4. In the end, each final output dir would have an concatenated R1 file and an R2 file. I would greatly appreciate any help in the right direction. Also note that .fastq files are simply ASCII txt files. edit: I saw this somewhat related post, but have had no success in using the code there due to the multiple matching folders issue. edit2: Neither of these solutions are working for me. I am slowly combining ideas both have given me and will post my eventual solution here.


title: Anyone gotten the switch '-segment_times' working with ffmpeg?

text: While searching through U&L I noticed a fair amount of questions asking how to script the generation of `ffmpeg` command lines like these:               ffmpeg -i video.mp4 -ss 00:00:00 -t 00:10:00 -c copy 01.mp4     ffmpeg -i video.mp4 -ss 00:10:00 -t 00:10:00 -c copy 02.mp4     ffmpeg -i video.mp4 -ss 00:20:00 -t 00:10:00 -c copy 03.mp4      In researching solutions for this I stumbled across this ticket in the `ffmpeg` issue tracker, titled: Split an input video into multiple output video chunks. This ticket highlights a patch that would allow you to finally be able to provide a list of time points to cut a video into smaller sections with a single command line like this:               $ ffmpeg -i input.avi -f segment -segment_times 10,20,40,50,90,120,180 \           -vcodec copy output02%d.avi      The patch appears to have been released in this revision of the code repository:               commit 2058b52cf8a4eea9bf046f72b98e89fe9b36d3e3     Author: Stefano Sabatini <stefasab@gmail.com>     Date:   Sat Jan 28 22:36:38 2012 +0100              lavf/segment: add -segment_times option              Address trac ticket #1504.      I downloaded this statically built version of `ffmpeg`, ffmpeg.static.64bit.2013-10-05.tar.gz from the ffmpeg site, but it apparently didn't include that switch.               $ ./ffmpeg --help |& grep segment     $      Has anyone been able to get this new switch working?


title: When would I use FBDEV vs DRM vs DSS?

text: I'm new to Linux graphics, and I'm interested in developing a graphics driver. I see that Linux supports three methods for writing graphics to the display device   * FBDEV   * DRM   * DSS2 When would I use one versus the other?


title: Open source os for dlink dsl-2640u hw: c2

text: Can anybody tell me which wireless router firmware projects already supports dsl-2640u hw: c2? OpenWRT works as a router, but the WiFi does not. However I'd like to be able to use the wireless adapter. Any suggestions on which projects might support this?


title: sudo: don't ask password when logged in with ssh key

text: I'd like to setup `sudo` in such a way that it doesn't prompt me for a password when I authenticate to `sshd` with a key; but do otherwise. I don't want an answer of "it doesn't work like that" because obviously that's the reason why I asked the question in the first place. I don't want the suggestion of creating two users for this. Consider that for my personal servers I use Fedora, maybe there might be a hack with a temporal SELinux role based on authentication method, which can be then used in the sudoers file?


title: Installing pfSense firewall on an SSD

text: I was looking at creating a home firewall running pfSense (as I could not get IPCop to boot properly on my hardware). Doing a little research, however, I have some concerns with installing it onto an SSD. I would like to use an SSD as the drive for this home firewall machine for the reduced noise level and less mechanical/moving parts (it's also a fanless build, so essentially there are none!). With normal firewall logging enabled there will be too many writes to the SSD and it will reduce the life of the drive significantly, which is not something I wish to do. I looked through some various other forums and read somewhere that the pfSense NanoBSD install is perfect for CF or SSD installs as it essentially removes disk writes (with the exception of needed writes) and has everything run from RAM. Has anyone used pfSense NanoBSD on an SSD, and would it be a viable option? Would this build still reduce the life factor of my SSD greatly? Also, if this is a viable option, is there a way I can get the .gz file to write to a USB drive and boot/install it from that to the SSD (I have no disk drive on this machine). Finally, if this installation does work, is there a way to get logging to store to a separate drive if I wanted to (such as a USB attached 320GB WD MyPassport drive)?


title: get list of months using dseq from dateutils

text: how'd I get a listing of the months in the year (abbreviated) using `dseq` from dateutils? **NOTE**   simply running:               dseq 'jan' 'dec' -i '%b' -f '%b'      returns a humongous list of months: piping the output to `uniq` reveals an out of order list of months:               Dec     Jan     Feb     Mar     Apr     May     Jun     Jul     Aug     Sep     Oct     Nov      Any ideas on how to correct the order of the list of months using `sed` or just by passing a certain parameter to `dseq`?


title: How can I turn off the realtime display of unix command "top"?

text: I want `top` to just give me the results when I call it and then exit. How can this be done? `top`'s manpage does not list any flag for this purpose. Also, I do not want to use `ps -eLf` for the purpose.


title: Why isn't Red Hat Enterprise Linux Desktop free?

text: Why isn't `Red Hat Enterprise Linux Desktop` free? Isn't it a `Linux` OS? If it is, so why is not free? http://www.redhat.com/products/enterprise-linux/desktop/


title: How to set Oracle Java's JAVA_HOME in Fedora 19

text: I just installed Fedora 19 and managed to get `FedoraUtils` installed. So I chose `java oracle`. after installation I could see in the `FedoraUtils` list that `oracle java (installed)` but I can't see the Oracle Java anywhere. As an Ubuntu user I would run the `update-java-alternatives -l` command but it didn't work. Below is the output of `alternatives --list`:               mta                      auto    /usr/sbin/sendmail.sendmail     javac                    auto    /usr/java/latest/bin/javac     jre_1.7.0_openjdk        auto    /usr/lib/jvm/jre-1.7.0-openjdk-1.7.0.60-2.4.2.0.fc19.x86_64     mkisofs                  auto    /usr/bin/genisoimage     ld                       auto    /usr/bin/ld.bfd     java                     auto    /usr/java/latest/bin/java     jre_1.7.0                manual  /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.60-2.4.2.0.fc19.x86_64/jre     pax                      auto    /usr/bin/spax     print                    auto    /usr/bin/lpr.cups     jre_openjdk              manual  /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.60-2.4.2.0.fc19.x86_64/jre     libnssckbi.so.x86_64     auto    /usr/lib64/pkcs11/p11-kit-trust.so     libjavaplugin.so.x86_64  auto    /usr/java/default/jre/lib/amd64/libnpjp2.so     fakeroot                 auto    /usr/bin/fakeroot-tcp     unrar                    auto    /usr/bin/unrar-nonfree     xinputrc                 auto    /etc/X11/xinit/xinput.d/ibus.conf     cifs-idmap-plugin        auto    /usr/lib64/cifs-utils/idmapwb.so      I don't remember typing openJDK but apparently it's installed. I would really like to find out where's `oracle-java`. I don't mind having the 2. When I check for the version in order to get the default `java`:               [joseph@localhost ~]$ java -version     java version "1.7.0_40"     Java(TM) SE Runtime Environment (build 1.7.0_40-b43)     Java HotSpot(TM) 64-Bit Server VM (build 24.0-b56, mixed mode)        * _Question 1_ : Where is oracle java installed    * _Question 2_ : How to check default java in fedora    * _Question 3_ :I will like to set up system environment for JAVA_HOME, how does it work in `/etc/environment`? **EDIT** all the commands suggested by @sim my screen looks this way: ![fedoraulits additional software screen](http://i.stack.imgur.com/ucV31.png)               #type java      java is /bin/java          #rpm -aq | grep jdk     jdk-1.7.0_40-fcs.x86_64  // is this one oracle java?     java-1.7.0-openjdk-1.7.0.60-2.4.2.0.fc19.x86_64               #alternatives --display java |grep best     Current `best' version is /usr/java/latest/bin/java.          #type -a /usr/java/default/bin/java     /usr/java/default/bin/java is /usr/java/default/bin/java          #rpm -qf /usr/java/default/bin/java     jdk-1.7.0_40-fcs.x86_64 // I assume this one is oracle java.       Is `/usr/java/default/bin/java` the home for oracle java?


title: Create sub-directories and organize files by date from file name

text: I have been using the following script to organize my photos into "Date' Directories:               for x in *.JPG; do       d=$(date -r "$x" +%Y-%m-%d)       mkdir -p "$d"       mv -- "$x" "$d/"     done      This script works great. My photo files follow the same naming convention 'IMG_20131125_090000.JPG' ie date and time photo taken. Is there a way to change the script above so that it categorizes into date directories still but using the date in the file name rather than use the date the file was modified?


title: What is the smallest possible Linux implementation?

text: What are the bare minimum components for a Linux OS to be functional, and that I can use as a base to expand and improve as I learn Linux and my understanding and needs grow?


title: How to redirect output of wget as input to unzip?

text: I have to download a file from this link. The file download is a zip file which I will have to unzip in the current folder. Normally, I would download it first, then run the unzip command.               $ wget http://www.vim.org/scripts/download_script.php?src_id=11834 -O temp.zip     $ unzip temp.zip      But in this way, I need to execute two commands, wait for the completion of first one to execute the next one, also, I must know the name of the file `temp.zip` to give it to `unzip`. Is it possible to redirect output of wget to unzip? Something like               $ unzip < `wget http://www.vim.org/scripts/download_script.php?src_id=11834`      But it didn't work. > bash: `wget http://www.vim.org/scripts/download_script.php?src_id=11834 -O > temp.zip`: ambiguous redirect Also, wget got executed twice, and downloaded the file twice. Thanks


title: How to know CentOS version?

text: How to know version of a CentOS server without access to any graphical interface? I've tried several commands:               # cat /proc/version     Linux version 2.6.18-128.el5 (mockbuild@hs20-bc1-7.build.redhat.com)     (gcc version 4.1.2 20080704 (Red Hat 4.1.2-44)) #1 SMP Wed Dec 17 11:41:38 EST 2008          # cat /etc/issue     Red Hat Enterprise Linux Server release 5.3 (Tikanga)      but which one is correct: 4.1.2-4 from `/proc/version` or 5.3 from `/etc/issue`?


title: EOG does not open focused

text: Something wrong started few days ago. I'm using Ubuntu 10.04 with Gnome. When I double click on a image file, the Eye of Gnome (EOG) opens and shows the image. But the problem is that the focus remains on the Nautilus' window so that if I press `Alt+F4` the image remains opened but Nautilus is closed.


title: How to find transmission speed?

text: Two host machine's one as a client and other as a server, i am testing udp load-test in these two machines.Machine Ethernet speed is 100 Mbps but i want to send 30000 packets each of 512 bytes at 1 Mbps speed how to do? Is their any Linux command to set Ethernet speed at 1 Mbps?


title: Gnome 3 on OpenSUSE 12.2 Proxy Porblem

text: Recently I've switched from Fedora 17 to OpenSUSE 12.2. I used to add my proxy from Network Settings>Network Proxy>Manual Method>Socks Hosts. But it doesn't work on openSUSE. I get the following error in Chrome:               Error 120 (net::ERR_SOCKS_CONNECTION_FAILED): Unknown error.      Further more proxy setting at Gnome Config Editor is not applied at all. I know that I can use proxy at software level (like firefox) but then I have to set the proxy for all of my application and some application doesn't support that.


title: Example of submitting dns change to dns0matic?

text: My ISP has been changing my IP regularly so I'm trying to use `dns-o-matic` to keep things straight. I do have an account and I've read their API docs and even talked with their tech people. However, I still cannot get the DNS changes submitted. Can someone please provide an example of what they are sending to `dnsomatic` for a dns change to be successful? Any language will be fine as I am using Ubuntu 13.10 Server.


title: Disable SSH Tunnel with KVM VNC Server

text: Here at work we've set up a KVM server that hosts a couple guest machines. The KVM itself is headless and we remote into whenever needed, but we would like to be able to VNC into the guests. I have set up all the VNC options during the guest creation and everything works great for me on OS X with Chicken VNC viewer. However, my coworker cannot simply VNC into the guest from his Windows 7 machine with TightVNC (also tried other VNC clients). It seems that the reason for this is that the KVM requires the SSH tunnel for VNC. My Chicken VNC allows that, but none of the Windows options do. Can anyone help us either disable the requirement for ssh tunnels, or suggest a VNC client for Windows that does use ssh tunnels, or provide a work around?


title: Fully seperate two accounts without installing seperate operating systems?

text: Our class is finally installing Mint Linux on our machines. The problem is our teacher is scared that we'll play war games against the two classes that use the computers. His solution is to install two separate operating systems due to that fact that we will need sudo ability but he doesn't want us to be able to break the OS for the other person (by either playing war games or by making mistakes) his solution is to install two separate operating systems yet I dislike this idea for a couple of reasons. First we have MBR so that limits the number of partitions and second it's just annoying because since they are both Mint Linux we'll choose the wrong one a good deal of the time. Anyone know of a way of separating the two operating systems so one person can't screw it up for the other. I'm less worried that we'll play war games because we could do this with the separate partitions and because it's less important. Anyone have any ideas? I was thinking of limiting the power a user has while still allowing them to use root however this could cause problems later on. The teacher wants to control the root account of course.


title: SSH Agent does not work with pkcs8 private key

text: I did encrypt my private key using `openssl pkcs8 -topk8 -in id_rsa -out id_rsa_new -v2 des3` (http://martin.kleppmann.com/2013/05/24/improving- security-of-ssh-private-keys.html) But now, ssh-agent won't work anymore. When I try to connect to a machine using ssh:               OpenSSH_6.1p1 Debian-4, OpenSSL 1.0.1c 10 May 2012     debug1: Reading configuration data /etc/ssh/ssh_config     debug1: /etc/ssh/ssh_config line 19: Applying options for *     debug2: ssh_connect: needpriv 0     debug1: Connecting to 192.168.178.38 [192.168.178.38] port 22.     debug1: Connection established.     debug3: Incorrect RSA1 identifier     debug3: Could not load "/home/damon/.ssh/id_rsa" as a RSA1 public key     debug1: identity file /home/damon/.ssh/id_rsa type 1     debug1: Checking blacklist file /usr/share/ssh/blacklist.RSA-2048     debug1: Checking blacklist file /etc/ssh/blacklist.RSA-2048     debug1: identity file /home/damon/.ssh/id_rsa-cert type -1     debug1: identity file /home/damon/.ssh/id_dsa type -1     debug1: identity file /home/damon/.ssh/id_dsa-cert type -1     debug1: identity file /home/damon/.ssh/id_ecdsa type -1     debug1: identity file /home/damon/.ssh/id_ecdsa-cert type -1     debug1: Remote protocol version 2.0, remote software version OpenSSH_6.0p1 Debian-3ubuntu1     debug1: match: OpenSSH_6.0p1 Debian-3ubuntu1 pat OpenSSH*     debug1: Enabling compatibility mode for protocol 2.0     debug1: Local version string SSH-2.0-OpenSSH_6.1p1 Debian-4     debug2: fd 3 setting O_NONBLOCK     debug3: load_hostkeys: loading entries for host "192.168.178.38" from file "/home/damon/.ssh/known_hosts"     debug3: load_hostkeys: found key type ECDSA in file /home/damon/.ssh/known_hosts:1     debug3: load_hostkeys: loaded 1 keys     debug3: order_hostkeyalgs: prefer hostkeyalgs: ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521     debug1: SSH2_MSG_KEXINIT sent     debug1: SSH2_MSG_KEXINIT received     debug2: kex_parse_kexinit: ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1     debug2: kex_parse_kexinit: ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-rsa-cert-v01@openssh.com,ssh-dss-cert-v01@openssh.com,ssh-rsa-cert-v00@openssh.com,ssh-dss-cert-v00@openssh.com,ssh-rsa,ssh-dss     debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se     debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se     debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96     debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96     debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib     debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib     debug2: kex_parse_kexinit:      debug2: kex_parse_kexinit:      debug2: kex_parse_kexinit: first_kex_follows 0      debug2: kex_parse_kexinit: reserved 0      debug2: kex_parse_kexinit: ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1     debug2: kex_parse_kexinit: ssh-rsa,ssh-dss,ecdsa-sha2-nistp256     debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se     debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se     debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-sha2-256,hmac-sha2-256-96,hmac-sha2-512,hmac-sha2-512-96,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96     debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-sha2-256,hmac-sha2-256-96,hmac-sha2-512,hmac-sha2-512-96,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96     debug2: kex_parse_kexinit: none,zlib@openssh.com     debug2: kex_parse_kexinit: none,zlib@openssh.com     debug2: kex_parse_kexinit:      debug2: kex_parse_kexinit:      debug2: kex_parse_kexinit: first_kex_follows 0      debug2: kex_parse_kexinit: reserved 0      debug2: mac_setup: found hmac-md5     debug1: kex: server->client aes128-ctr hmac-md5 none     debug2: mac_setup: found hmac-md5     debug1: kex: client->server aes128-ctr hmac-md5 none     debug1: sending SSH2_MSG_KEX_ECDH_INIT     debug1: expecting SSH2_MSG_KEX_ECDH_REPLY     debug1: Server host key: ECDSA d0:42:c3:a4:bb:2e:f0:cd:38:c1:32:d5:a5:ac:4c:d5     debug3: load_hostkeys: loading entries for host "192.168.178.38" from file "/home/damon/.ssh/known_hosts"     debug3: load_hostkeys: found key type ECDSA in file /home/damon/.ssh/known_hosts:1     debug3: load_hostkeys: loaded 1 keys     debug1: Host '192.168.178.38' is known and matches the ECDSA host key.     debug1: Found key in /home/damon/.ssh/known_hosts:1     debug1: ssh_ecdsa_verify: signature correct     debug2: kex_derive_keys     debug2: set_newkeys: mode 1     debug1: SSH2_MSG_NEWKEYS sent     debug1: expecting SSH2_MSG_NEWKEYS     debug2: set_newkeys: mode 0     debug1: SSH2_MSG_NEWKEYS received     debug1: Roaming not allowed by server     debug1: SSH2_MSG_SERVICE_REQUEST sent     debug2: service_accept: ssh-userauth     debug1: SSH2_MSG_SERVICE_ACCEPT received     debug2: key: /home/damon/.ssh/id_rsa (0x7f15643f1e30)     debug2: key: /home/damon/.ssh/id_dsa ((nil))     debug2: key: /home/damon/.ssh/id_ecdsa ((nil))     debug1: Authentications that can continue: publickey     debug3: start over, passed a different list publickey     debug3: preferred gssapi-keyex,gssapi-with-mic,publickey,keyboard-interactive,password     debug3: authmethod_lookup publickey     debug3: remaining preferred: keyboard-interactive,password     debug3: authmethod_is_enabled publickey     debug1: Next authentication method: publickey     debug1: Offering RSA public key: /home/damon/.ssh/id_rsa     debug3: send_pubkey_test     debug2: we sent a publickey packet, wait for reply     debug1: Server accepts key: pkalg ssh-rsa blen 279     debug2: input_userauth_pk_ok: fp ee:e0:8c:60:ee:9f:05:4c:cd:0e:45:85:e2:91:64:95     debug3: sign_and_send_pubkey: RSA ee:e0:8c:60:ee:9f:05:4c:cd:0e:45:85:e2:91:64:95     Agent admitted failure to sign using the key.     debug1: Trying private key: /home/damon/.ssh/id_dsa     debug3: no such identity: /home/damon/.ssh/id_dsa     debug1: Trying private key: /home/damon/.ssh/id_ecdsa     debug3: no such identity: /home/damon/.ssh/id_ecdsa     debug2: we did not send a packet, disable method     debug1: No more authentication methods to try.     Permission denied (publickey).      I ran this on a freshly installed Linux Mint 15 x64 VM and on several other Linux Mint installations, all fail to connect. Here is an example of a pkcs8 encrypted private key (I generated only to share, don't worry):               damon@DamonVirtual ~/.ssh $ ssh-keygen     Generating public/private rsa key pair.     Enter file in which to save the key (/home/damon/.ssh/id_rsa): id_rsa_test     Enter passphrase (empty for no passphrase):      Enter same passphrase again:      Your identification has been saved in id_rsa_test.     Your public key has been saved in id_rsa_test.pub.     The key fingerprint is:     f6:58:aa:43:c4:08:51:54:34:e5:5a:76:ae:ed:bd:30 damon@DamonVirtual     The key's randomart image is:     +--[ RSA 2048]----+     |  .+oo+..        |     |  .    o         |     |   . o  + .      |     |    . o+ o       |     |     .. S o      |     |      .. B       |     |     .  + E      |     |      .. . +     |     damon@DamonVirtual ~/.ssh $ openssl pkcs8 -topk8 -in id_rsa_test -out id_rsa_test_enc -v2 des3     Enter Encryption Password:     Verifying - Enter Encryption Password:     damon@DamonVirtual ~/.ssh $ chmod id_rsa_test_enc 600     chmod: Ungültiger Modus: »id_rsa_test_enc“     „chmod --help“ liefert weitere Informationen.     damon@DamonVirtual ~/.ssh $ chmod 600 id_rsa_test_enc     damon@DamonVirtual ~/.ssh $ cat id_rsa_test_enc     -----BEGIN ENCRYPTED PRIVATE KEY-----     MIIFDjBABgkqhkiG9w0BBQ0wMzAbBgkqhkiG9w0BBQwwDgQIsRD8OicdxA0CAggA     MBQGCCqGSIb3DQMHBAhpBxvnSmEyaQSCBMj1vvjrx3KiEa++l1xtDDimOPXDqrh6     AAQBZGBBgDNX7OqmqDK6gvbliZUsYEBdbxA8g53tQe168tmXw6RbpDUqwRT0N8MU     an5pBJkOd1nT9TGFivhvBVRLeoCko9jmrcia38/Cc4D088rirYbTOdi47qB88zin     WVxNVCXTAB2IXAvgSVuYlbzRku++OCZAY4YI+4Q8diY1pnY5rMVNc1eTknMp2Gyc     s+37nVpc2Xz3kI1T/2yiJEkOucyyNxbvKfDdmkhxYnflghjQAIFZXhALgGwTAeD+     SkuCpHCyQ6Rw+X/lSvsyj9RNpioF51iTMazy1NbDSyv8FaB+cF8QLC9wz9hHZ3yV     xiNVy38yVwMDr4OudXB+qjc8nDSjQdK5Ade8OWQZS7KXiT0K0wdGYn6NSGuoJTU3     UI9m+Glwv5JI5WE9nUm2GyZzUTujhH7lzJKw/20/IhosrS78/TVWUJ5MW5jNrDz+     raKG9jTLjEirhQFvCowh2oYJUxq0Fmh5d2Iskq19rVdL8iDMyZMJxfsiKTxd6TcK     uGtFkX+IS80Is6r2ZnDsQwlMiKw1pZ223JAQvLHX6baBvoDGr7vSeb4m91G4DYOK     gzdAICHuX0bIXbPhNxfkpstakdvrR2Fz1QNpInTO8K4fQ9dqnCyeiferbzpEkhVD     BVVNRcBVynGPWs6SwBTkRW7D5tWNdFA/ngVkqDDnYaw+/xiaKPF3T/gtOzjEvkgA     CYxBrO+Y1Y6eVA4wD+U9f/6mfA55xf95P+BQ31GT8NoGv0F+3fuY/NGdTkWP0bg7     yhihlRshdt7it+AycDj+cKATjqOcFJpP5nDu0wSciSWAaHAakZl1aK6+qaCUnzGy     9nYZUrTyYk2dLSBP7XI5aVvmk4tzT5Rq9XxV/6Gi48lfe+uqGi2Q46IMxLqxaC1Q     pwNEMlDAiK3zMrxvhQ6YXbTROFEgjeZArzoYwDkbwv9ra8nOslmkXcAz2pYQQQJc     Jv49rtL4kS+L44/koekIk22GMajbSpTdskkieKewQVYhrPbgaBXZfyYvobshCGI9     3qwNEg3ZWhkvAtypMcXX3oflVm54NYXnQ8INk8MPqABrTZtM4VGrKunNa0rCOo8e     ULxgAcsBcZMbe6iI1lB3v+fP7hq8ceQW7oi0/8LS3inz2f3iz7SDKF0c1B1obr0l     u9dJcv6ijXU9Vvv0kejo/C1jx7vsl9q7lp0GLDer003htYNOqrc9GHc7laCh7JlB     R9Lf9IlZjEFTGD6UOJw+2L14j3QTKyLoXwQS+hTXVI7GBBaJq1SuPcCxieSjK5d4     HlkrkO7/iMKEDCwPv8Wp6ZPUowywrP5j4IH51Nk9vuN+DhmCONMjHlJLZLgCJWtm     cfpSlwRI9E86zQlZR2vrlKeHChXtm1kOGp3mkpvRwmu4gZLAQZhNo8TRCNWfQZuj     YhoYdewQJnoemHGk0bKoDA6IqQZMhlfKP2KcnmDWwLQn/rb1VudbbnHSNMF1vCt0     X/lXverUxO8PlNnmhY/D6omah53laGloGHZo/7NHnaa468rNEZyIPYw14XbZaI5A     RlNo9uT2IhJOtSKWqiBioD4YZtjciSkvmUYfC8x4cVqVWd69VuzfxaKpEjp3OzlG     bQw=     -----END ENCRYPTED PRIVATE KEY-----     damon@DamonVirtual ~/.ssh $ cat id_rsa_test.pub     ssh-rsa  AAAAB3NzaC1yc2EAAAADAQABAAABAQDNms5/HhVr903+uIFM1BTQwOz8lYWyKQsnttkyvxtrfdnJe3EEwBjKjXlipTMYgLl2gi5Lt63f3esHYT0IBwN4DPz9BdYkb3vqsPSdouV2N45/S7w6dwwx2BJ/yP35r2G91ckOiHQSioDWFDbWQMYNrHrbAAtk6QbZthwMyKFK59iGCRltAxyq2/EPU6dkoyq8AWDZao+i65AQjIfDQ5vqHhPPZo80j5q8XNWP6E8oVx+hwUiYZ/hEHLR5KWMZyG0MVzDZICs9qMruIDA9YASl9DTNc72+5L5b1Ct5rTYGeq+5bMue9w7GVCFu/6ahPUwyNI17SW8Fsu6hF/HxbgnR damon@DamonVirtual      Encryption pass for this one is 123456789. Can anybody spot mistakes I did while generating and encrypting the key? (Once again, this is not my personal private key, I just generated this one for test purposes, this isn't in any of my authorized_keys files, the debug output came from usage with another key generated the same way) Is it me failing, or ssh-agent? I don't get a password prompt, so ssh-agent doesn't seem to recognize the key is encrypted... But I can add it to the agent using `ssh-add id_rsa`, there I'm prompted for the password, there it works... **edit** **_I think I found out what happens:_** ssh-agent tries to automatically add ssh-keys to it. When doing so, it horribly fails. This failure is indicated by unremovable identities. Try `ssh-add -D && ssh-add -l`. If this returns any remaining identities, ssh-agent did something wrong: _I assume that ssh-agent screws up decryption when auto-adding keys._ My solution to prevent this:   * Move all private keys out ot `~/.ssh`   * **reboot**   * Generate ssh-keypair, **don't store in`~/.ssh`!**   * Encrypt private key using openssl, "as usual"   * Move encrypted private key to `~/.ssh`   * `ssh-add /path/to/file` your private key You should now be prompted to type in the encryption password. **IMPORTANT** :   * Don't use filenames of keys that were already in the ssh-agent. It seems to try auto-adding known filenames again and again, causing this horrible fail.   * Don't use private keys with known fingerprint. ssh-agent somehow also auto- added those...   * Make sure there are absolutely NO private keys in `~/.ssh` before doing these steps   * Make sure there are absolutely NO private keys cached by ssh-agent If there are any keys left in ~/.ssh or the ssh-agent, it will fail. Once the key has been correctly added with ssh-add, being prompted for your encrpytion password, having no other keys in ~/.ssh or the ssh-agent, it seems to be fine to add other keys. Sometimes I just HATE linux, for some special (sometimes legacy) packets doing this kind of stuff :(


title: Iptables port forwarding to qemu vm

text: Is it possible to create an IPtables rule that forwards all incoming traffic on port 80 on the host to port 80 of the qemu VM? Is such a scenario possible with qemu?


title: udevd eats too many CPU cycles

text: It sits at around 64% CPU usage, but only because **`rsyslog`** is taking pretty much the rest of it (struggling to keep up). I am getting these sorts of messages on `/var/log/syslog`:               Jun  5 23:59:38 vab rsyslogd-2177: imuxsock begins to drop messages from pid 1187 due to rate-limiting     Jun  5 23:59:44 vab rsyslogd-2177: imuxsock lost 62566 messages from pid 1187 due to rate-limiting     Jun  5 23:59:44 vab udevd[1187]: unable to receive ctrl connection: Function not implemented     Jun  5 23:59:44  udevd[1187]: last message repeated 199 times     Jun  5 23:59:44 vab rsyslogd-2177: imuxsock begins to drop messages from pid 1187 due to rate-limiting     Jun  5 23:59:50 vab rsyslogd-2177: imuxsock lost 62568 messages from pid 1187 due to rate-limiting     Jun  5 23:59:50 vab udevd[1187]: unable to receive ctrl connection: Function not implemented     Jun  5 23:59:50  udevd[1187]: last message repeated 199 times      I also noticed that a whole bunch of them get started:               $ pidof udevd      1891 1890 1887 1885 1884 1881 1879 1877 1875 1873 1871 1869 1868 1865 1864 1861 1860 1857 1746 1744 1742 1740 1738 1736 1734 1732 1413 1318 1304 1209 1205 1202 1187      Only the last one, process `1187`, is the greedy one. Also, I get a whole bunch of the following messages:               $ strace -p 1187     SYS_366(0x3, 0, 0, 0x80800, 0x80800)    = -1 ENOSYS (Function not implemented)     gettimeofday({1370469763, 718315}, NULL) = 0     send(11, "<27>Jun  6 00:02:43 udevd[1187]:"..., 93, MSG_NOSIGNAL) = 93     epoll_wait(0xa, 0x7eb99ed0, 0x8, 0xbb8) = 1     SYS_366(0x3, 0, 0, 0x80800, 0x80800)    = -1 ENOSYS (Function not implemented)     gettimeofday({1370469763, 719617}, NULL) = 0     send(11, "<27>Jun  6 00:02:43 udevd[1187]:"..., 93, MSG_NOSIGNAL) = 93     epoll_wait(0xa, 0x7eb99ed0, 0x8, 0xbb8) = 1      This problem is solved when I run `sudo service udev restart`, but that command must then be run after each reboot. * * * This is an up-to-date Ubuntu 12.04 ( **`udev`** is at **175-0ubuntu9.3** ), but running **2.6.35** custom kernel (don't ask).


title: Unix beginner installing

text: I'm a Unix beginner but I want to change that. I'm already familiar with Ubuntu, a bit with some other distros for linux, windows and a little bit with mac. So the first thing I did was searching how to install unix and found something called FreeBSD. Is that the only free unix? So where can I start?


title: How can I build fdupes from source on Ubuntu?

text: I would like to make a few changes to the fdupes code. I know I can grab the source code from the website - but is there a better way on Ubuntu / Debian?   * After getting the source this way where is it stored?   * If one wanted to make changes to the code and recompile / install - how is that done?   * Is there a good way to mange changes when updates come out?


title: Free or non-free, what is the question?

text: I often read that some distributions contain non-free components while some other are "free". As an end-user, I don't understand very well the difference between free and non-free distributions. What are the limitations of one compared to the other ? When should I not use non-free distributions ? As a reseller, can I sell an equipment with non-free software ? Can I sell an equipement with free software ? Does it depend on local laws ? Edit: I don't ask this question to receive any general opinion. My question is asked to know how one should choose a license or type of distribution, **not** from   * political nor    * philosophical criterion but from:   * technical or   * legal or    * user experience concerns.


title: Reassign users to a single group

text: Right now one of our server is setup such that all users are in their own group. Is it possible to reassign them to a single group and then allow each user READ only access to other user's directories? Any quick commands to do this for many users?


title: Very slow response from localhost when pinging

text: Networking is working fine on my gentoo machine. One connection is made, everything works fine with normal speed. But it is slow to wake-up : starting up connection is taking time. Even pinging local-host takes ages (approx 5 seconds). Any ideas how to make this fast. UPDATE : Output of some commands.               ifconfig      eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500         inet 10.107.105.13  netmask 255.255.240.0  broadcast 10.107.111.255         inet6 fe80::e269:95ff:fe24:8d3a  prefixlen 64  scopeid 0x20<link>         ether e0:69:95:24:8d:3a  txqueuelen 1000  (Ethernet)         RX packets 1071380  bytes 978317595 (932.9 MiB)         RX errors 0  dropped 1979  overruns 0  frame 0         TX packets 310432  bytes 30846997 (29.4 MiB)         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0         device interrupt 20  memory 0xfe400000-fe420000            ping -c 5 localhost     PING localhost (127.0.0.1) 56(84) bytes of data.     64 bytes from Calvin (127.0.0.1): icmp_seq=1 ttl=64 time=0.017 ms     64 bytes from Calvin (127.0.0.1): icmp_seq=2 ttl=64 time=0.029 ms     64 bytes from Calvin (127.0.0.1): icmp_seq=3 ttl=64 time=0.031 ms     64 bytes from Calvin (127.0.0.1): icmp_seq=4 ttl=64 time=0.030 ms     64 bytes from Calvin (127.0.0.1): icmp_seq=5 ttl=64 time=0.033 ms          --- localhost ping statistics ---     5 packets transmitted, 5 received, 0% packet loss, time 3999ms     rtt min/avg/max/mdev = 0.017/0.028/0.033/0.005 ms          ping -c 5 127.0.0.1     PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data.     64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.018 ms     64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.021 ms     64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.034 ms     64 bytes from 127.0.0.1: icmp_seq=4 ttl=64 time=0.031 ms     64 bytes from 127.0.0.1: icmp_seq=5 ttl=64 time=0.033 ms          --- 127.0.0.1 ping statistics ---     5 packets transmitted, 5 received, 0% packet loss, time 3998ms     rtt min/avg/max/mdev = 0.018/0.027/0.034/0.008 ms


title: Use of /etc/sysconfig/network-scripts/ifcfg-eth* files

text: What's the use of `/etc/sysconfig/network-scripts/ifcfg-eth*` files ? In some cases ifconfig lists the interface `eth0` but I don't find the corresponding `ifcfg-eth0` file whereas in other instances if I create the `ifcfg-eth1` file and restart the network like `service network restart` - this interface is not listed in `ifconfig` ??


title: How to share the internet connection?

text: An ordinally network topology in picture:      ![enter image description here](http://i.stack.imgur.com/sJIle.png)      In words:   - "server" (e.g.: an Ubuntu 10.04 LTS) is connected to the "internet" through pppoe connection      - "server" is using it's wireless card in AP mode, so it could share the internet connection through wireless to the clients (WPA2/AES/63 char pass)      - The "server" has two ethernet ports: 1-is for the internet(using pppoe); 2-is connected to a gbit switch, were the clients also are connected      - The "server" (10.0.0.1) has a dhcp server (10.0.0.0/8), so the clients automagically got IP addresses, DNS server addresses and gateway addresses      - The "server" has a dns server (10.0.0.1), so the dns queries are cached, (better "network speed feeling")      - Extra: on the "server", there is an OpenVPN server, so the clients can OpenVPN to the server (even if not in the subnet, e.g.: from a netcafe)      - ExtraExtra: the "server" can be configured in two modes: 1-no internet forwarding to any client, just only after it's connects through OpenVPN; 2-internet forwarding to any client and optionally they could use OpenVPN to have a secure/authenticated tunnel      **Question:** How I need to configure the "server" to make this work (permanently, I mean no manual interaction is required after the server reboots, e.g.: the dhcp server starts automatically, internet forwarding is ok, openvpn is started, wifi is working, pppoe connection to the ISP is up, DNS server is working)?      Or does anyone has any exact howtos regarding this setup? Or at least part of them?


title: How can I prevent iptables from counting bytes and packets on empty chains?

text: ## Background I occasionally have firewall rules that I need to use for maintenance windows, but don't want active (and therefore consuming CPU cycles or slowing the network interface) the rest of the time. I add the rules when I need them, and then want to wipe the slate clean _and stop iptables from counting packets and bytes flowing through the filter chains_. ## Problem: Filter Table Keeps Counting Anyway The first time I check iptables in verbose mode, packet and byte counts are always zero. For example:               $ sudo iptables -L -n -v     Chain INPUT (policy ACCEPT 0 packets, 0 bytes)      pkts bytes target     prot opt in     out     source               destination          Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)      pkts bytes target     prot opt in     out     source               destination          Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)      pkts bytes target     prot opt in     out     source               destination      However, once the filter table has been initialized, flushing the table or resetting the counters doesn't stop the table from continuing to count packets and bytes. For example:               $ sudo iptables -F; sleep 5; sudo iptables -L -n -v     Chain INPUT (policy ACCEPT 395 packets, 577K bytes)      pkts bytes target     prot opt in     out     source               destination          Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)      pkts bytes target     prot opt in     out     source               destination          Chain OUTPUT (policy ACCEPT 199 packets, 11135 bytes)      pkts bytes target     prot opt in     out     source               destination      ## Current Solution While I suspect that the actual CPU usage isn't all that high for an empty table, it seems wasteful to have the kernel inspect packets or count bytes that I don't care about. In order to prevent the filter table from consuming CPU cycles when there are no active rules, I've been doing the following:               $ sudo iptables -F; sudo iptables -X; sudo modprobe -r iptable_filter      This removes the rules and the filter table, allowing the iptables filter module to be removed from the running kernel. Once I do that, then counters remain zeroed until I once again initialize the table. ## The Actual Question My two-part question is:   1. Whether the counters for empty chains even _have_ a measurable impact on performance. Intuitively, it seems like they would on a busy network interface, but I have no idea how to measure whether the impact exists.   2. Assuming there _is_ an impact, whether there's a more elegant way to stop iptables from counting bytes/packets on empty chains than unloading the related kernel modules.


title: Debian - Boot from USB

text: I currently have Debian 7.0 installed on my laptop (HP Pavilion dv9700). I would now like to install Arch instead. I wrote the Arch ISO to a USB drive, but when I start up my computer, it automatically loads to Debian. I tried changing the boot order in the BIOS, but that didn't help, and there doesn't seem to be an option in the BIOS (PhoenixBIOS Setup Utility) to simply choose media to boot from. When setting USB Disk or USB diskette on key as the highest priority for booting, get the message "Remove disks or other media. Press any key to restart", which brings me to the GRUB loader when I remove the usb and press any key. I found this which is for booting Xubuntu while having Ubuntu installed, but I don't know how I'd apply that to Arch and Debian. How would I go about booting from the USB?


title: skype cannot connect, what I should do?

text: I have an error in Skype that says that Skype cannot connect. I tried reinstalling Skype but it did not work. I used following commands:               rm -rf .Skype     sudo apt-get remove skype     sudo apt-get autoremove     sudo apt-get install skype


title: "trap 'killall $$ ; rm -f $folder2;exit ' 18 20 24

text: What is wrong with this command?               $ trap 'killall $$ ; rm -f $folder2;exit ' 18 20 24      That command is in a `for` loop, and while that `for` is executing, if I press `CTRL`-`Z` I want it to stop the process and delete all the files that were created (inside `folder2`) and `folder2` itself. But when i press `CTRL`-`Z` in the terminal it stops but I can't do anything else afterwards, not even `CTRL`-`C` is not working.


title: Exit status on core dump

text: When a process dumps core, does it set any particular exit code? Alternatively, is there a way to detect if core was dumped in a shell script. I have shell script that fires a job which occasionally dumps the core. If my job dumps the core, I would like to modify the shell script so that next lines can check status and inform others interested that the job dumped core. We save core dumps and do analyse it. This right now is done by simple find command. If I can check if one of the lines in my shell script caused core dump, I can diagnose the problems much faster. On ubuntu 12.04.


title: Is it possible to make a standard user that can gain NO access to root?

text: I'm a very new beginner learning how to use Linux. I have very little experience so far in different distros. I've set Kali Linux as the OS on a remote PC. Users will be connecting to it via SSH and I want to prevent them from gaining root access or using `su` or `sudo` command. I'd like to disable a variety of commands. Can I create standard users on Kali Linux who are boxed in from doing serious damage? A few administrators have the root password but we do not want anyone else but that team to have power on the system. > -Any and all help is both helpful and appreciated > > -Will provide more information if I have not provided enough


title: View fontconfig settings

text: Is there a way I can see what settings fontconfig is currently using? I'm trying to figure out why fonts look better in an XFCE session as opposed to when I start a bare X session (no window manager, no Xsettings daemon, just a terminal).


title: gcc too old in red hat?

text: I use Red Hat Enterprise in my school and I want to compile some c++11 code but the gcc --version is 4.4.7 which is not compatible. Is that one the latest version in the red hat repositories? is there any compiler that can be installed quickly using yum and that supports c++11?


title: Different behavior of sed with respect to an array and a string in the presence of backslashes

text: Let the file `foo.txt` contain               foo\\ bar baz      xx      Why does the following correctly change "foo\\ bar" to "someotherstuff" in `foo.txt`?               sed -i 's/foo\\\\ bar/someotherstuff/gI' foo.txt      while this does not?               a=("foo\\\\ bar")      b=(someotherstuff)           for ((i=0;i<${#a[@]};++i)); do          sed -i "s/${a[i]}/${b[i]}/gI" foo.txt      done      They are supposed to be the same.


title: Extremely slow CD-ROM burning

text: When I try to burn a CD-ROM using K3B, the burner slows down from 10x to 0.12x after writing exactly 71MB. Consequently, burning a 142MB live CD takes more than a hour. Why is this happening? The CD-ROM burner is a OPTIARC DVD RW AD-5690H (firmware revision 4AH5) and the CD-ROM burning tool that K3B uses, is cdrecord 3.0. **Update: Here is a log from the last burning operation**               Devices     -----------------------     OPTIARC DVD RW AD-5690H 4AH5 (/dev/sr0, Cd-r, CD-RW, Cd-rom, Dvd-rom, DVD-R, DVD-RW, DVD-R DL, DVD+R, DVD+RW, DVD+R DL) [Dvd-rom, DVD-R sekventiel, DVD-R dobbeltlag, sekvensielt, DVD-R dobbeltlag og hop-mulighed, DVD-RW begrænset overbrænding, DVD-RW sekventiel, DVD+RW, DVD+R, DVD+R dobbeltlag, Cd-rom, Cd-r, CD-RW] [SAO, TAO, RAW, SAO/R96R, RAW/R16, RAW/R96P, RAW/R96R, Begrænset overbrænding, Lag-hop] [%7]          System     -----------------------     K3b Version: 2.0.2     KDE Version: 4.8.4 (4.8.4)     QT Version:  4.8.2     Kernel:      3.13.6          Used versions     -----------------------     cdrecord: 3.0          cdrecord     -----------------------     scsidev: '/dev/sr0'     devname: '/dev/sr0'     scsibus: -2 target: -2 lun: -2     Warning: Open by 'devname' is unintentional and not supported.     Linux sg driver version: 3.5.27     SCSI buffer size: 64512     /opt/schily/bin/cdrecord: Warning: Cannot read drive buffer.     /opt/schily/bin/cdrecord: Warning: The DMA speed test has been skipped.     Cdrecord-ProDVD-ProBD-Clone 3.00 (x86_64-unknown-linux-gnu) Copyright (C) 1995-2010 J�rg Schilling     TOC Type: 1 = CD-ROM     Using libscg version 'schily-0.9'.     Driveropts: 'burnfree'     atapi: 1     Device type    : Removable CD-ROM     Version        : 5     Response Format: 2     Capabilities   :      Vendor_info    : 'OPTIARC '     Identifikation : 'DVD RW AD-5690H '     Revision       : '4AH5'     Device seems to be: Generic mmc2 DVD-R/DVD-RW/DVD-RAM.     Current: CD-R     Profile: DVD+R/DL      Profile: DVD+R      Profile: DVD+RW      Profile: DVD-R/DL layer jump recording      Profile: DVD-R/DL sequential recording      Profile: DVD-RW sequential recording      Profile: DVD-RW restricted overwrite      Profile: DVD-R sequential recording      Profile: DVD-ROM      Profile: CD-RW      Profile: CD-R (current)     Profile: CD-ROM (current)     Using generic SCSI-3/mmc   CD-R/CD-RW driver (mmc_cdr).     Driver flags   : MMC-3 SWABAUDIO BURNFREE      Supported modes: TAO PACKET SAO SAO/R96R RAW/R16 RAW/R96P RAW/R96R     Drive buf size : 1273856 = 1244 KB     FIFO size      : 4194304 = 4096 KB     Track 01: data   142 MB             Total size:      163 MB (16:09.38) = 72704 sectors     Lout start:      163 MB (16:11/29) = 72704 sectors     Current Secsize: 2048     ATIP info from disk:     Indicated writing power: 6     Disk Is not unrestricted     Disk Is not erasable     Disk sub type: Medium Type C, low Beta category (C-) (6)     ATIP start of lead in:  -11231 (97:32/19)     ATIP start of lead out: 359846 (79:59/71)     Disk type:    Short strategy type (Phthalocyanine or similar)     Manuf. index: 27     Manufacturer: Prodisc Technology Inc.         Capacity  Blklen/Sparesz.  Format-type  Type             0             2048         0x00  No Media Present or Unknown Capacity     Blocks total: 359846 Blocks current: 359846 Blocks remaining: 287142     Starting to write CD/DVD/BD at speed 24 in real SAO mode for single session.     Last chance to quit, starting real write in 3 seconds.     2 seconds.     1 seconds.     0 seconds. Operation starts.     Waiting for reader process to fill input buffer ... input buffer ready.     BURN-Free is OFF.     Turning BURN-Free on     Performing OPC...     Sending CUE sheet...     /opt/schily/bin/cdrecord: WARNING: Drive returns wrong startsec (0) using -150     Writing pregap for track 1 at -150     Starting new track at sector: 0     Track 01:    0 of  142 MB written.     Track 01:    1 of  142 MB written (fifo 100%)   0.5x.     Track 01:    2 of  142 MB written (fifo 100%) [buf 100%]   1.6x.     Track 01:    3 of  142 MB written (fifo 100%) [buf 100%]  11.9x.     Track 01:    4 of  142 MB written (fifo 100%) [buf 100%]  11.6x.     Track 01:    5 of  142 MB written (fifo 100%) [buf 100%]  12.0x.     Track 01:    6 of  142 MB written (fifo 100%) [buf 100%]  11.6x.     Track 01:    7 of  142 MB written (fifo 100%) [buf 100%]  12.0x.     Track 01:    8 of  142 MB written (fifo 100%) [buf 100%]  11.7x.     Track 01:    9 of  142 MB written (fifo 100%) [buf 100%]  12.1x.     Track 01:   10 of  142 MB written (fifo 100%) [buf 100%]  11.7x.     Track 01:   11 of  142 MB written (fifo 100%) [buf 100%]  12.1x.     Track 01:   12 of  142 MB written (fifo 100%) [buf 100%]  11.8x.     Track 01:   13 of  142 MB written (fifo 100%) [buf 100%]  12.2x.     Track 01:   14 of  142 MB written (fifo 100%) [buf 100%]  11.8x.     Track 01:   15 of  142 MB written (fifo 100%) [buf 100%]  12.2x.     Track 01:   16 of  142 MB written (fifo 100%) [buf 100%]  11.9x.     Track 01:   17 of  142 MB written (fifo 100%) [buf 100%]  12.3x.     Track 01:   18 of  142 MB written (fifo 100%) [buf 100%]  11.9x.     Track 01:   19 of  142 MB written (fifo 100%) [buf 100%]  12.3x.     Track 01:   20 of  142 MB written (fifo 100%) [buf 100%]  12.0x.     Track 01:   21 of  142 MB written (fifo 100%) [buf 100%]  12.4x.     Track 01:   22 of  142 MB written (fifo 100%) [buf 100%]  12.0x.     Track 01:   23 of  142 MB written (fifo 100%) [buf 100%]  12.4x.     Track 01:   24 of  142 MB written (fifo 100%) [buf 100%]  12.0x.     Track 01:   25 of  142 MB written (fifo 100%) [buf 100%]  12.5x.     Track 01:   26 of  142 MB written (fifo 100%) [buf 100%]  12.1x.     Track 01:   27 of  142 MB written (fifo 100%) [buf 100%]  12.5x.     Track 01:   28 of  142 MB written (fifo 100%) [buf 100%]  12.1x.     Track 01:   29 of  142 MB written (fifo 100%) [buf 100%]  12.5x.     Track 01:   30 of  142 MB written (fifo 100%) [buf 100%]  12.2x.     Track 01:   31 of  142 MB written (fifo 100%) [buf 100%]  12.6x.     Track 01:   32 of  142 MB written (fifo 100%) [buf 100%]  12.2x.     Track 01:   33 of  142 MB written (fifo 100%) [buf 100%]  12.6x.     Track 01:   34 of  142 MB written (fifo 100%) [buf 100%]  13.0x.     Track 01:   35 of  142 MB written (fifo 100%) [buf 100%]  12.6x.     Track 01:   36 of  142 MB written (fifo 100%) [buf 100%]  13.1x.     Track 01:   37 of  142 MB written (fifo 100%) [buf 100%]  12.7x.     Track 01:   38 of  142 MB written (fifo 100%) [buf 100%]  13.1x.     Track 01:   39 of  142 MB written (fifo 100%) [buf 100%]  12.7x.     Track 01:   40 of  142 MB written (fifo 100%) [buf 100%]  13.2x.     Track 01:   41 of  142 MB written (fifo 100%) [buf 100%]  12.8x.     Track 01:   42 of  142 MB written (fifo 100%) [buf 100%]  13.2x.     Track 01:   43 of  142 MB written (fifo 100%) [buf 100%]  12.8x.     Track 01:   44 of  142 MB written (fifo 100%) [buf 100%]  13.2x.     Track 01:   45 of  142 MB written (fifo 100%) [buf 100%]  12.8x.     Track 01:   46 of  142 MB written (fifo 100%) [buf 100%]  13.3x.     Track 01:   47 of  142 MB written (fifo 100%) [buf 100%]  12.9x.     Track 01:   48 of  142 MB written (fifo 100%) [buf 100%]  13.3x.     Track 01:   49 of  142 MB written (fifo 100%) [buf 100%]  12.9x.     Track 01:   50 of  142 MB written (fifo 100%) [buf 100%]  13.4x.     Track 01:   51 of  142 MB written (fifo 100%) [buf 100%]  13.0x.     Track 01:   52 of  142 MB written (fifo 100%) [buf 100%]  13.4x.     Track 01:   53 of  142 MB written (fifo 100%) [buf 100%]  13.0x.     Track 01:   54 of  142 MB written (fifo 100%) [buf 100%]  13.4x.     Track 01:   55 of  142 MB written (fifo 100%) [buf 100%]  13.0x.     Track 01:   56 of  142 MB written (fifo 100%) [buf 100%]  13.5x.     Track 01:   57 of  142 MB written (fifo 100%) [buf 100%]  13.1x.     Track 01:   58 of  142 MB written (fifo 100%) [buf 100%]  13.5x.     Track 01:   59 of  142 MB written (fifo 100%) [buf 100%]  13.1x.     Track 01:   60 of  142 MB written (fifo 100%) [buf 100%]  13.5x.     Track 01:   61 of  142 MB written (fifo 100%) [buf 100%]  13.2x.     Track 01:   62 of  142 MB written (fifo 100%) [buf 100%]  13.6x.     Track 01:   63 of  142 MB written (fifo 100%) [buf 100%]  13.2x.     Track 01:   64 of  142 MB written (fifo 100%) [buf 100%]  13.6x.     Track 01:   65 of  142 MB written (fifo 100%) [buf 100%]  14.0x.     Track 01:   66 of  142 MB written (fifo 100%) [buf 100%]  13.6x.     Track 01:   67 of  142 MB written (fifo 100%) [buf 100%]  14.1x.     Track 01:   68 of  142 MB written (fifo 100%) [buf 100%]  13.7x.     Track 01:   69 of  142 MB written (fifo 100%) [buf 100%]  14.1x.     Track 01:   70 of  142 MB written (fifo 100%) [buf 100%]  13.7x.     Track 01:   71 of  142 MB written (fifo 100%) [buf 100%]  14.2x.     Track 01:   72 of  142 MB written (fifo 100%) [buf 100%]   0.2x.     Track 01:   73 of  142 MB written (fifo 100%) [buf 100%]   0.1x.     Track 01:   74 of  142 MB written (fifo 100%) [buf 100%]   0.1x.     Track 01:   75 of  142 MB written (fifo 100%) [buf 100%]   0.2x.     Track 01:   76 of  142 MB written (fifo 100%) [buf 100%]   0.1x.     Track 01:   77 of  142 MB written (fifo 100%) [buf 100%]   0.2x.     Track 01:   78 of  142 MB written (fifo 100%) [buf 100%]   0.1x.     Track 01:   79 of  142 MB written (fifo 100%) [buf 100%]   0.2x.     Track 01:   80 of  142 MB written (fifo 100%) [buf 100%]   0.1x.     Track 01:   81 of  142 MB written (fifo 100%) [buf 100%]   0.2x.     Track 01:   82 of  142 MB written (fifo 100%) [buf 100%]   0.1x.     Track 01:   83 of  142 MB written (fifo 100%) [buf 100%]   0.2x.     Track 01:   84 of  142 MB written (fifo 100%) [buf 100%]   0.1x.     Track 01:   85 of  142 MB written (fifo 100%) [buf 100%]   0.2x.     Track 01:   86 of  142 MB written (fifo 100%) [buf 100%]   0.2x.     Track 01:   87 of  142 MB written (fifo 100%) [buf 100%]   0.2x.     Track 01:   88 of  142 MB written (fifo 100%) [buf 100%]   0.2x.     Track 01:   89 of  142 MB written (fifo 100%) [buf 100%]   0.2x.     Track 01:   90 of  142 MB written (fifo 100%) [buf 100%]   0.2x.     Track 01:   91 of  142 MB written (fifo 100%) [buf 100%]   0.2x.     Track 01:   92 of  142 MB written (fifo 100%) [buf 100%]   0.1x.     Track 01:   93 of  142 MB written (fifo 100%) [buf 100%]   0.2x.     Track 01:   94 of  142 MB written (fifo 100%) [buf 100%]   0.2x.     Track 01:   95 of  142 MB written (fifo 100%) [buf 100%]   0.2x.     Track 01:   96 of  142 MB written (fifo 100%) [buf 100%]   0.2x.     Track 01:   97 of  142 MB written (fifo 100%) [buf 100%]   0.2x.     Track 01:   98 of  142 MB written (fifo 100%) [buf 100%]   0.2x.     Track 01:   99 of  142 MB written (fifo 100%) [buf 100%]   0.2x.     Track 01:  100 of  142 MB written (fifo 100%) [buf 100%]   0.2x.     Track 01:  101 of  142 MB written (fifo 100%) [buf 100%]   0.2x.     Track 01:  102 of  142 MB written (fifo 100%) [buf 100%]   0.2x.     Track 01:  103 of  142 MB written (fifo 100%) [buf 100%]   0.2x.     Track 01:  104 of  142 MB written (fifo 100%) [buf 100%]   0.2x.     Track 01:  105 of  142 MB written (fifo 100%) [buf 100%]   0.2x.     Track 01:  106 of  142 MB written (fifo 100%) [buf 100%]   0.2x.     Track 01:  107 of  142 MB written (fifo 100%) [buf 100%]   0.2x.     Track 01:  108 of  142 MB written (fifo 100%) [buf 100%]   0.2x.     Track 01:  109 of  142 MB written (fifo 100%) [buf 100%]   0.2x.     Track 01:  110 of  142 MB written (fifo 100%) [buf 100%]   0.2x.     Track 01:  111 of  142 MB written (fifo 100%) [buf 100%]   0.2x.     Track 01:  112 of  142 MB written (fifo 100%) [buf 100%]   0.2x.     Track 01:  113 of  142 MB written (fifo 100%) [buf 100%]   0.2x.     Track 01:  114 of  142 MB written (fifo 100%) [buf 100%]   0.2x.     Track 01:  115 of  142 MB written (fifo 100%) [buf 100%]   0.2x.     Track 01:  116 of  142 MB written (fifo 100%) [buf 100%]   0.2x.     Track 01:  117 of  142 MB written (fifo 100%) [buf 100%]   0.2x.     Track 01:  118 of  142 MB written (fifo 100%) [buf 100%]   0.2x.     Track 01:  119 of  142 MB written (fifo 100%) [buf 100%]   0.2x.     Track 01:  120 of  142 MB written (fifo 100%) [buf 100%]   0.2x.     Track 01:  121 of  142 MB written (fifo 100%) [buf 100%]   0.2x.     Track 01:  122 of  142 MB written (fifo 100%) [buf 100%]   0.2x.     Track 01:  123 of  142 MB written (fifo 100%) [buf 100%]   0.2x.     Track 01:  124 of  142 MB written (fifo 100%) [buf 100%]   0.2x.     Track 01:  125 of  142 MB written (fifo 100%) [buf 100%]   0.2x.     Track 01:  126 of  142 MB written (fifo 100%) [buf 100%]   0.2x.     Track 01:  127 of  142 MB written (fifo 100%) [buf 100%]   0.2x.     Track 01:  128 of  142 MB written (fifo 100%) [buf 100%]   0.2x.     Track 01:  129 of  142 MB written (fifo 100%) [buf 100%]   0.2x.     Track 01:  130 of  142 MB written (fifo 100%) [buf 100%]   0.2x.     Track 01:  131 of  142 MB written (fifo 100%) [buf 100%]   0.2x.     Track 01:  132 of  142 MB written (fifo 100%) [buf 100%]   0.2x.     Track 01:  133 of  142 MB written (fifo 100%) [buf 100%]   0.2x.     Track 01:  134 of  142 MB written (fifo 100%) [buf 100%]   0.2x.     Track 01:  135 of  142 MB written (fifo 100%) [buf 100%]   0.2x.     Track 01:  136 of  142 MB written (fifo 100%) [buf 100%]   0.2x.     Track 01:  137 of  142 MB written (fifo 100%) [buf 100%]   0.2x.     Track 01:  138 of  142 MB written (fifo 100%) [buf 100%]   0.2x.     Track 01:  139 of  142 MB written (fifo 100%) [buf 100%]   0.2x.     Track 01:  140 of  142 MB written (fifo 100%) [buf 100%]   0.2x.     Track 01:  141 of  142 MB written (fifo 100%) [buf 100%]   0.2x.     Track 01:  142 of  142 MB written (fifo 100%) [buf 100%]   0.2x.     Track 01: Total bytes read/written: 148897792/148897792 (72704 sectors).     Writing  time: 3133.095s     Average write speed   0.3x.     Min drive buffer fill was 100%     Fixating...     Fixating time:   17.058s     /opt/schily/bin/cdrecord: fifo had 2346 puts and 2346 gets.     /opt/schily/bin/cdrecord: fifo was 0 times empty and 2267 times full, min fill was 84%.     BURN-Free was never needed.          cdrecord command:     -----------------------     /opt/schily/bin/cdrecord -v gracetime=2 dev=/dev/sr0 speed=24 -sao driveropts=burnfree -data -tsize=72704s -


title: Can't start presentation on remote computer console session from an SSH session

text: Basically I am executing this script remotely via an SSH session. It works fine on Linux Mint, but not on Debian (7.5). It looks like the export display or nohup command isn't working, but I'm not sure what to try to test this. Can anyone see anything wrong with this?               #!/usr/bin/env bash     mount -t cifs //10.50.18.114/Presentation -o 'username=Administrator,password=***,sec=ntlm' /mnt/share     pkill soffice.bin     cp -v /mnt/share/Pres.ppt /home/kyle/Documents     chmod 777 /home/kyle/Documents/Pres.ppt     export DISPLAY=":0"     nohup libreoffice --norestore --nolockcheck --show /home/kyle/Documents/Pres.ppt &     sessionid="$(pidof -s sshd)"     kill $sessionid     exit      EDIT: This is not the same issue as shown in the 'duplicate' link provided, I've used the information in that thread and it didn't work. To answer the comments: I have 2 separate machines. The presentation PC has the above script saved locally. I am executing this script remotely over SSH, I put echo commands in between each stage and it looks as if it executes all the way to the end (I actually commented out the kill sessionid), but the presentation doesn't display on the presentation PC. The script works if I execute locally as root (it needs root to use the mount command). The only error I see is: > (soffice:3747): GConf-WARNING **: Client failed to connect to the D-BUS > daemon: Did not receive a reply. Possible causes include: the remote > application did not send a reply, the message bus security policy blocked > the reply, the reply timeout expired, or the network connection was broken. > GConf Error: No D-BUS daemon running However, I get this error whether I run locally or over SSH, so I don't think this is the issue. I still believe it is something with the EXPORT and nohup command, but I don't know enough to troubleshoot effectively. EDIT 2: It actually works when I SSH with my 'kyle' account, it seems connecting via SSH with root isn't able to connect to 'kyle's local display because it is a different username. I will work on finding a solution to this.


title: What is the exact function of this malicious bash one-liner?

text: I can't figure out what this is trying to do. The part between backticks looks like a plain old forkbomb, but the base64 doesn't seem to decode to anything sensible. Can you help? Don't run it, obviously :)               eval $(echo "a2Vrf4xvcml\ZW%3t`r()(r{,54}|r{,});r`26a2VrZQo=" | base64 -d)


title: subversion not working with pycharm

text: In pycharm, there is an option to upload changes to a remote svn repository. However, it does not ask for password. How do I provide it?


title: Header function with increasing number in bash

text: I would like to have a function in bash that I can use in some install scripts to announce that the next paragraph is starting. A simple solution (with colors) would be               headline(){       echo -e "\e[1;34m###########################################"       echo -e "##########  \e[1;37m$*"       echo -e "\e[1;34m###########################################\e[0m"     }      But How do I add an increasing number in it?