title: Difference in output from shell script

text: I am running a simple shell script which has a for loop and kicks off 16 threads in the back ground and waits for each of them to finish before moving on the next commands. ## Here is the shell:               total_threads=16              echo ""          echo "Running Web Exclusive Item updates ... "           echo "Total Number of threads = " $total_threads          for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16          do             echo "Running Thread $i ..  "             ./run_upd_web_excl_items.sh $i $total_threads &          done          wait          echo "Done."                   echo ""           echo "Committing data ... "         output_val=`$ORACLE_HOME/bin/sqlplus -S $UP <<endofsql            whenever sqlerror exit 2            whenever oserror exit 3            SET HEADING  OFF            SET FEEDBACK OFF            SET ECHO     OFF            set serverout on           commit;           /         exit         endofsql`         echo "Done."      As I was running this, the output is coming as follows:               ~> . ./run_upd_web_excl_items_mitctrl.sh          Running Web Exclusive Item updates ...     Total Number of threads =  16     Running Thread 1 ..     Running Thread 2 ..     Running Thread 3 ..     Running Thread 4 ..     Running Thread 5 ..     Running Thread 6 ..     Running Thread 7 ..     Running Thread 8 ..     Running Thread 9 ..     Running Thread 10 ..     Running Thread 11 ..     Running Thread 12 ..     Running Thread 13 ..     Running Thread 14 ..     Running Thread 15 ..     Running Thread 16 ..     Total time for Thread 3 : 0 minute(s), 22.5 second(s).     Total time for Thread 2 : 0 minute(s), 23.3 second(s).     Total time for Thread 12 : 0 minute(s), 24.3 second(s).     Total time for Thread 8 : 0 minute(s), 24.8 second(s).     Total time for Thread 7 : 0 minute(s), 29.9 second(s).     Total time for Thread 1 : 0 minute(s), 30 second(s).     [1]   Done                    ./run_upd_web_excl_items.sh $i $total_threads     [2]   Done                    ./run_upd_web_excl_items.sh $i $total_threads     [3]   Done                    ./run_upd_web_excl_items.sh $i $total_threads     [7]   Done                    ./run_upd_web_excl_items.sh $i $total_threads     [8]   Done                    ./run_upd_web_excl_items.sh $i $total_threads     [12]   Done                    ./run_upd_web_excl_items.sh $i $total_threads     Total time for Thread 16 : 0 minute(s), 32.1 second(s).     Total time for Thread 4 : 0 minute(s), 32.8 second(s).     [4]   Done                    ./run_upd_web_excl_items.sh $i $total_threads     [16]+  Done                    ./run_upd_web_excl_items.sh $i $total_threads     Total time for Thread 10 : 0 minute(s), 33.2 second(s).     Total time for Thread 13 : 0 minute(s), 33.7 second(s).     Total time for Thread 5 : 0 minute(s), 33.8 second(s).     [5]   Done                    ./run_upd_web_excl_items.sh $i $total_threads     [10]   Done                    ./run_upd_web_excl_items.sh $i $total_threads     [13]   Done                    ./run_upd_web_excl_items.sh $i $total_threads     Total time for Thread 14 : 0 minute(s), 35.6 second(s).     Total time for Thread 6 : 0 minute(s), 36.8 second(s).     [6]   Done                    ./run_upd_web_excl_items.sh $i $total_threads     [14]-  Done                    ./run_upd_web_excl_items.sh $i $total_threads     Total time for Thread 11 : 0 minute(s), 37.7 second(s).     Total time for Thread 9 : 0 minute(s), 37.8 second(s).     [9]   Done                    ./run_upd_web_excl_items.sh $i $total_threads     [11]-  Done                    ./run_upd_web_excl_items.sh $i $total_threads     Total time for Thread 15 : 0 minute(s), 38.8 second(s).     [15]+  Done                    ./run_upd_web_excl_items.sh $i $total_threads     Done.          Committing data ...     Done.      Normally, I would have expected an output like this:               ~> ./run_upd_web_excl_items_mitctrl.sh          Running Web Exclusive Item updates ...     Total Number of threads =  16     Running Thread 1 ..     Running Thread 2 ..     Running Thread 3 ..     Running Thread 4 ..     Running Thread 5 ..     Running Thread 6 ..     Running Thread 7 ..     Running Thread 8 ..     Running Thread 9 ..     Running Thread 10 ..     Running Thread 11 ..     Running Thread 12 ..     Running Thread 13 ..     Running Thread 14 ..     Running Thread 15 ..     Running Thread 16 ..     Total time for Thread 1 : 0 minute(s), 26.5 second(s).     Total time for Thread 10 : 0 minute(s), 27.1 second(s).     Total time for Thread 2 : 0 minute(s), 27.5 second(s).     Total time for Thread 6 : 0 minute(s), 27.9 second(s).     Total time for Thread 3 : 0 minute(s), 27.9 second(s).     Total time for Thread 15 : 0 minute(s), 27.9 second(s).     Total time for Thread 9 : 0 minute(s), 28 second(s).     Total time for Thread 5 : 0 minute(s), 28 second(s).     Total time for Thread 16 : 0 minute(s), 28.1 second(s).     Total time for Thread 8 : 0 minute(s), 30.5 second(s).     Total time for Thread 12 : 0 minute(s), 31 second(s).     Total time for Thread 11 : 0 minute(s), 31.5 second(s).     Total time for Thread 7 : 0 minute(s), 31.9 second(s).     Total time for Thread 14 : 0 minute(s), 32 second(s).     Total time for Thread 13 : 0 minute(s), 32.7 second(s).     Total time for Thread 4 : 0 minute(s), 34.8 second(s).     Done.          Committing data ...     Done.      I am not able to figure out why the shell is printing the extra lines like :               [13]   Done                    ./run_upd_web_excl_items.sh $i  $total_threads      Any thoughts?


title: How does Solaris find man pages?

text: Initially, my MANPATH environment variable is not set. Despite this, I can use the `man` command to view most man pages as usual. `man top` can't find that particular man page, but `which man` tells me the command is in /opt/sfw/bin. There are man pages for `top` and other commands in /opt/sfw/man. I set `export MANPATH=/opt/sfw/man` and I can now see the man page with `man top`. However `man` can no longer find pages for `bash`, `cp` or any other standard command. How can I add this one directory to the list used to find man pages? I'm using SunOS 5.10 and bash 3.0.16, if it matters.


title: Solaris 10, Shell Script, Cursor movement

text: > >     #include <signal.h> >     #include <unistd.h> >     #include <stdio.h> >     #include <sys/types.h> >     #include <time.h> >   >   >     void prtime() { >             time_t rawtime; >             struct tm * timeinfo; >             char *s; >   >             signal(SIGALRM, prtime); >   >             time ( &rawtime ); >             timeinfo = localtime ( &rawtime ); >   >             alarm (1) ; //printf("Time\n"); >             printf ( "\033[s\033[6;45H %s \033[u", asctime (timeinfo) ); >     } >   >     int main() >     { >             signal(SIGALRM, prtime); >             alarm(1); >             printf("continue instructions\n"); >             while (1) { >                     pause(); >                     printf("continue instructions\n"); >             } >     } >   I just try to write the clock at a specific position in terminal, but I want to save the cursor position before writing the clock, and then restore that position after writing the clock. but the `\033[s` & `\033[u` doesn't work.


title: Proper way to handle FTP over SSL with restrictive firewall rules?

text: Without SSL, FTP works fine over a stateful Firewall, like netfilter (`iptables`) + the `nf_conntrack_ftp` kernel module like this:               # modprobe nf_conntrack_ftp     # iptables -A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT     # iptables -A INPUT -p tcp --dport 21 -j ACCEPT      The problem is that, when SSL is used, the FTP connection tracking module cannot work because it is unable to spy on the session to discover the session-port chosen for data exchange. It is thus unable to open that port dynamically. **Is there a proper way to make a SSL-enabled FTP server work, without disabling the firewall?** For information, I use `vsftpd` with the `ssl_enable=YES` configuration option.


title: CentOS 5.6 expand ext4 partition , have steps but parted shows as ext3

text: I have a Adaptec 5805 HW RAID card with a 6.3 TB RAID-6 array (partitioned via Parted GPT, all of which is formatted as ext4 on CentOS 5.6). I want to expand this to 7.5GB and from reading these are the steps I've come up with, my question is, do I have the steps right on the linux part, and why is parted showing the partition as ext3 and not as ext4? **NOTE:** I've read that Parted does not support ext4 yet and man Parted states "ext3 resizing does not currently work with Parted". I've been able to backup all 6 TB of data on this drive prior to expanding.   1. Verify with Fix Raid array in Adaptec Storage Manager   2. Expand Raid-6 Array in Adaptec Storage Manager  on Centos 5.6:   3. Unmount target drive/partition   4. Expand partition, keeping the start position the exact same as it is currently - use Sector mode if using parted (but parted says NOT to use Parted for resizing ext3 or ext4)   5. run `resize2fs` (or should I run resize4fs as it's ext4?)   6. remount Hopefully someone who has resized an ext4 drive over 2TB can chime in and state what they did to successfully resize their mount/partition. Every guide I've read says to use Parted , but `man parted` says to use `fdisk` (but `fdisk` doesn't work with partitions over 2 TB that need GPT). So my biggest issues is with the resize partition step of this process as I'm dealing with a 6 TB ext4 partition. `Parted -l` output (when unit set to Sector):                   Model: Adaptec 6tbRD6ada8 (scsi)         Disk /dev/sdb: 6979GB         Sector size (logical/physical): 512B/512B         Partition Table: gpt               Number  Start   End     Size    File system  Name     Flags          1      17.4kB  6979GB  6979GB  ext3         primary      `fdisk -l` of target drive:                   Disk /dev/sdb: 6979.3 GB, 6979309273088 bytes         255 heads, 63 sectors/track, 848519 cylinders         Units = cylinders of 16065 * 512 = 8225280 bytes                  Device Boot      Start         End      Blocks   Id  System          /dev/sdb1               1      267350  2147483647+  ee  EFI GPT      `cfdisk /dev/sdb`:                     cfdisk (util-linux 2.13-pre7)                                                                 Disk Drive: /dev/sdb                                                    Size: 6979309273088 bytes, 6979.3 GB                                           Heads: 255   Sectors per Track: 63   Cylinders: 848519            Name                 Flags               Part Type          FS Type                     [Label]                   Size (MB)       sdb1                 NC                   Primary           EFI GPT                                              2199023.26         *                                                 Pri/Log           Free Space                                           4780283.11         *


title: Read out pulseaudio volume from commandline? (I want: "pactl GET-sink-volume")

text: I want to read out the volume level I can set with               pactl set-sink-volume $SINK $VOLUME      Is there an easy way to do that? As easy as the hypothetical               pactl get-sink-volume $SINK      ? (What I'm trying to do? I use pactl to set volume and it lets me set the volume higher than 100% which is a bad idea (sound quality goes down), so I'm thinking about writing a small script that will not go over 100%. Read it out. Over some threshold? Set to 100%. Below? add 1%. If there is another way to do that, great, tell me! The cleanest solution would probably to tell pulse to just stop at 100%. But the original question remains, there must be some way..) I am on Debian if that makes any difference.


title: SSH to Windows 7 with cygwin openSSH freezes when remote conection

text: **When I SSH into Windows 7(Cygwin) from a remote, the session freezes after few seconds or up to two minutes. This can happen while I'm typing and it can happen when idle. This is still happening after cygwin has been re- installed.** I'm SSH'ing to a Windows 7 system from a Fedora 20. Fedora has also been re- intalled. And it is still happening after both Cygwin and Fedora have been re- installed. I need to do= "enter" "~" "." to get my terminal back. What is the cause of this? I'm not at the remote location now, but I can connect with ssh -vvv when I get there to give some debugging. EDIT: I was not able to reproduce the problem, the problem seems to have gone away, changing the config files did not fix the problem before, so I can't understand why the problem is gone? I just did two sessions from different ip's and it didn't freeze. Here are the debug from one of the sessions:               [UserName@HostName ~]$ ssh -X -vvv UserName@HostName -p Port     OpenSSH_6.4, OpenSSL 1.0.1e-fips 11 Feb 2013     debug1: Reading configuration data /home/UserName/.ssh/config     debug1: /home/UserName/.ssh/config line 20: Applying options for *     debug1: /home/UserName/.ssh/config line 54: Applying options for *     debug1: Reading configuration data /etc/ssh/ssh_config     debug1: /etc/ssh/ssh_config line 20: Applying options for *     debug1: /etc/ssh/ssh_config line 54: Applying options for *     debug2: ssh_connect: needpriv 0     debug1: Connecting to HostName [HostName] port Port.     debug2: fd 3 setting O_NONBLOCK     debug1: fd 3 clearing O_NONBLOCK     debug1: Connection established.     debug3: timeout: 499954 ms remain after connect     debug1: identity file /home/UserName/.ssh/id_rsa type -1     debug1: identity file /home/UserName/.ssh/id_rsa-cert type -1     debug1: identity file /home/UserName/.ssh/id_dsa type -1     debug1: identity file /home/UserName/.ssh/id_dsa-cert type -1     debug1: identity file /home/UserName/.ssh/id_ecdsa type -1     debug1: identity file /home/UserName/.ssh/id_ecdsa-cert type -1     debug1: Enabling compatibility mode for protocol 2.0     debug1: Local version string SSH-2.0-OpenSSH_6.4     debug1: Remote protocol version 2.0, remote software version OpenSSH_6.6     debug1: match: OpenSSH_6.6 pat OpenSSH*     debug2: fd 3 setting O_NONBLOCK     debug3: put_host_port: [HostName]:Port     debug3: load_hostkeys: loading entries for host "[HostName]:34500" from file "/home/UserName/.ssh/known_hosts"     debug3: load_hostkeys: found key type ECDSA in file /home/UserName/.ssh/known_hosts:10     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-gcm@openssh.com,aes256-gcm@openssh.com,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-gcm@openssh.com,aes256-gcm@openssh.com,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se     debug2: kex_parse_kexinit: hmac-md5-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-sha1,umac-64@openssh.com,umac-128@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-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-sha1,umac-64@openssh.com,umac-128@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: curve25519-sha256@libssh.org,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,ssh-ed25519     debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,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-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se     debug2: kex_parse_kexinit: hmac-md5-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-sha1,umac-64@openssh.com,umac-128@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-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-sha1,umac-64@openssh.com,umac-128@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     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-etm@openssh.com     debug1: kex: server->client aes128-ctr hmac-md5-etm@openssh.com none     debug2: mac_setup: found hmac-md5-etm@openssh.com     debug1: kex: client->server aes128-ctr hmac-md5-etm@openssh.com none     debug1: sending SSH2_MSG_KEX_ECDH_INIT     debug1: expecting SSH2_MSG_KEX_ECDH_REPLY     debug1: Server host key: ECDSA b5:05:1a:33:1b:44:21:ae:00:37:0f:2b:24:ae:41:26     debug3: put_host_port: [HostName]:Port     debug3: put_host_port: [HostName]:Port     debug3: load_hostkeys: loading entries for host "[HostName]:Port" from file "/home/UserName/.ssh/known_hosts"     debug3: load_hostkeys: found key type ECDSA in file /home/UserName/.ssh/known_hosts:10     debug3: load_hostkeys: loaded 1 keys     debug3: load_hostkeys: loading entries for host "[HostName]:Port" from file "/home/UserName/.ssh/known_hosts"     debug3: load_hostkeys: found key type ECDSA in file /home/UserName/.ssh/known_hosts:10     debug3: load_hostkeys: loaded 1 keys     debug1: Host '[HostName]:Port' is known and matches the ECDSA host key.     debug1: Found key in /home/UserName/.ssh/known_hosts:10     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/UserName/.ssh/id_rsa ((nil)),     debug2: key: /home/UserName/.ssh/id_dsa ((nil)),     debug2: key: /home/UserName/.ssh/id_ecdsa ((nil)),     debug1: Authentications that can continue: publickey,password,keyboard-interactive     debug3: start over, passed a different list publickey,password,keyboard-interactive     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: Trying private key: /home/UserName/.ssh/id_rsa     debug3: no such identity: /home/UserName/.ssh/id_rsa: No such file or directory     debug1: Trying private key: /home/UserName/.ssh/id_dsa     debug3: no such identity: /home/UserName/.ssh/id_dsa: No such file or directory     debug1: Trying private key: /home/UserName/.ssh/id_ecdsa     debug3: no such identity: /home/UserName/.ssh/id_ecdsa: No such file or directory     debug2: we did not send a packet, disable method     debug3: authmethod_lookup keyboard-interactive     debug3: remaining preferred: password     debug3: authmethod_is_enabled keyboard-interactive     debug1: Next authentication method: keyboard-interactive     debug2: userauth_kbdint     debug2: we sent a keyboard-interactive packet, wait for reply     debug1: Authentications that can continue: publickey,password,keyboard-interactive     debug3: userauth_kbdint: disable: no info_req_seen     debug2: we did not send a packet, disable method     debug3: authmethod_lookup password     debug3: remaining preferred:      debug3: authmethod_is_enabled password     debug1: Next authentication method: password     UserName@HostName's password:      debug3: packet_send2: adding 48 (len 66 padlen 14 extra_pad 64)     debug2: we sent a password packet, wait for reply     debug1: Authentications that can continue: publickey,password,keyboard-interactive     Permission denied, please try again.     UserName@HostName's password:      debug3: packet_send2: adding 48 (len 68 padlen 12 extra_pad 64)     debug2: we sent a password packet, wait for reply     debug1: Authentication succeeded (password).     Authenticated to HostName ([HostName]:Port).     debug1: Requesting tun unit 2147483647 in mode 1     debug1: sys_tun_open: failed to configure tunnel (mode 1): Operation not permitted     Tunnel device open failed.     Could not request tunnel forwarding.     debug1: channel 0: new [client-session]     debug3: ssh_session2_open: channel_new: 0     debug2: channel 0: send open     debug1: Requesting no-more-sessions@openssh.com     debug1: Entering interactive session.     debug2: callback start     debug2: x11_get_proto: /usr/bin/xauth  list :0 2>/dev/null     debug1: Requesting X11 forwarding with authentication spoofing.     debug2: channel 0: request x11-req confirm 1     debug2: fd 3 setting TCP_NODELAY     debug3: packet_set_tos: set IP_TOS 0x10     debug2: client_session2_setup: id 0     debug2: channel 0: request pty-req confirm 1     debug1: Sending environment.     debug3: Ignored env XDG_VTNR     debug3: Ignored env DREAL_TECHNO_NAME     debug3: Ignored env MANPATH     debug3: Ignored env VH_PATSFX     debug3: Ignored env SSH_AGENT_PID     debug3: Ignored env KDE_MULTIHEAD     debug3: Ignored env TPD_GLOBAL     debug3: Ignored env XDG_SESSION_ID     debug3: Ignored env DM_CONTROL     debug3: Ignored env HOSTNAME     debug3: Ignored env IMSETTINGS_INTEGRATE_DESKTOP     debug3: Ignored env GPG_AGENT_INFO     debug3: Ignored env MBK_IN_PH     debug3: Ignored env TERM     debug3: Ignored env SHELL     debug3: Ignored env XDG_MENU_PREFIX     debug3: Ignored env XSCH_PARAM_NAME     debug3: Ignored env HISTSIZE     debug3: Ignored env XDM_MANAGED     debug3: Ignored env GTK2_RC_FILES     debug3: Ignored env KONSOLE_DBUS_SERVICE     debug3: Ignored env KONSOLE_PROFILE_NAME     debug3: Ignored env VH_MAXERR     debug3: Ignored env GTK_RC_FILES     debug3: Ignored env GS_LIB     debug3: Ignored env WINDOWID     debug3: Ignored env QTDIR     debug3: Ignored env RDS_OUT     debug3: Ignored env GNOME_KEYRING_CONTROL     debug3: Ignored env QTINC     debug3: Ignored env SHELL_SESSION_ID     debug3: Ignored env XFSM_PARAM_NAME     debug3: Ignored env ALLIANCE_TOP     debug3: Ignored env GRAAL_TECHNO_NAME     debug3: Ignored env KDE_FULL_SESSION     debug3: Ignored env TPD_LOCAL     debug3: Ignored env IMSETTINGS_MODULE     debug3: Ignored env QT_GRAPHICSSYSTEM_CHECKED     debug3: Ignored env USER     debug3: Ignored env LS_COLORS     debug3: Ignored env LD_LIBRARY_PATH     debug3: Ignored env SSH_AUTH_SOCK     debug3: Ignored env SESSION_MANAGER     debug3: Ignored env DESKTOP_SESSION     debug3: Ignored env PATH     debug3: Ignored env MAIL     debug3: Ignored env MBK_SCALE_X     debug3: Ignored env QT_IM_MODULE     debug3: Ignored env MBK_CATAL_NAME     debug3: Ignored env PWD     debug1: Sending env XMODIFIERS = @im=none     debug2: channel 0: request env confirm 0     debug3: Ignored env KONSOLE_DBUS_WINDOW     debug3: Ignored env MBK_OUT_PH     debug1: Sending env LANG = en_US.UTF-8     debug2: channel 0: request env confirm 0     debug3: Ignored env KDE_IS_PRELINKED     debug3: Ignored env GNOME_KEYRING_PID     debug3: Ignored env KDE_SESSION_UID     debug3: Ignored env GENVIEW_TECHNO_NAME     debug3: Ignored env RDS_IN     debug3: Ignored env MBK_SPI_MODEL     debug3: Ignored env KDEDIRS     debug3: Ignored env MBK_OUT_LO     debug3: Ignored env KONSOLE_DBUS_SESSION     debug3: Ignored env MBK_VSS     debug3: Ignored env HISTCONTROL     debug3: Ignored env VH_BEHSFX     debug3: Ignored env SSH_ASKPASS     debug3: Ignored env COLORFGBG     debug3: Ignored env SHLVL     debug3: Ignored env XDG_SEAT     debug3: Ignored env HOME     debug3: Ignored env KDE_SESSION_VERSION     debug1: Sending env LANGUAGE =      debug2: channel 0: request env confirm 0     debug3: Ignored env MBK_C4_LIB     debug3: Ignored env MBK_VDD     debug3: Ignored env MBK_TARGET_LIB     debug3: Ignored env XCURSOR_THEME     debug3: Ignored env RDS_TECHNO_NAME     debug3: Ignored env LOGNAME     debug3: Ignored env VH_DLYSFX     debug3: Ignored env QTLIB     debug3: Ignored env CVS_RSH     debug3: Ignored env DBUS_SESSION_BUS_ADDRESS     debug3: Ignored env XDG_DATA_DIRS     debug3: Ignored env MBK_IN_LO     debug3: Ignored env LESSOPEN     debug3: Ignored env MBK_WORK_LIB     debug3: Ignored env XPAT_PARAM_NAME     debug3: Ignored env WINDOWPATH     debug3: Ignored env PROFILEHOME     debug3: Ignored env XDG_RUNTIME_DIR     debug3: Ignored env DISPLAY     debug3: Ignored env QT_PLUGIN_PATH     debug3: Ignored env XDG_CURRENT_DESKTOP     debug3: Ignored env GTK_IM_MODULE     debug3: Ignored env ELP_TECHNO_NAME     debug3: Ignored env MBK_CATA_LIB     debug3: Ignored env CCACHE_HASHDIR     debug3: Ignored env XAUTHORITY     debug3: Ignored env _     debug2: channel 0: request shell confirm 1     debug2: callback done     debug2: channel 0: open confirm rwindow 0 rmax 32768     debug2: channel_input_status_confirm: type 99 id 0     debug2: X11 forwarding request accepted on channel 0     debug2: channel_input_status_confirm: type 99 id 0     debug2: PTY allocation request accepted on channel 0     debug2: channel 0: rcvd adjust 2097152     debug2: channel_input_status_confirm: type 99 id 0     debug2: shell request accepted on channel 0     Last login: Wed Apr 16 23:58:48 2014 from HostName           ____________________,             ______________________________________        .QQQQQQQQQQQQQQQQQQQQQQQQL_         |                                      |      .gQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ__   |                                      |      gQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ==   |                    _.---.)           |      QQQQQQQQQQQQQQQQQQQQQQQQQQQF=         |          (^--^)_.-"      `;          |      QQQQQQQQQ================!            |          ) ee (           |          |      QQQQQQQQ                              |         (_.__._)         /           |      QQQQQQQQ                              |           `--',        ,'            |      QQQQQQQQ     ~"jjj__,                 |            jgs )_|--')_|             |      QQQQQQQQ       "jjjjjjjjjj___         |                ""'   ""'             |      QQQQQQQQ        ~jjjjjjjjjjjjjjjjj__  |                                      |      QQQQQQQQ        _jjjjjjjjjjjjjj/~~~~  |      The Hippo says: Welcome to      |      QQQQQQQQ      .{jjjjjjj/~~~~~         |                             _        |      QQQQQQQQ     .{/~~~~`                 |  ____  _   _   ____  _ _ _ (_) ____  |      QQQQQQQQ                              | / ___)| | | | / _  || | | || ||  _ \ |      QQQQQQQQ                              |( (___ | |_| |( (_| || | | || || | | ||      QQQQQQQQQL_______________,            | \____) \__  | \___ | \___/ |_||_| |_||      QQQQQQQQQQQQQQQQQQQQQQQQQQQL___       |        (___/  (____|                 |      4QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ___  |                                      |      (=QQQQQQQQQQQQQQQQQQQQQQQQQQQQQ====   |       -.-. -.-- --. .-- .. -.        |        (QQQQQQQQQQQQQQQQQQQQQQQQF=         |______________________________________|               UserName@HostName ~     $ ls          UserName@HostName ~     $ nano thisIsATest          UserName@HostName ~     $ gedit &     [1] 2556          UserName@HostName ~     $ debug1: client_input_channel_open: ctype x11 rchan 3 win 65536 max 16384     debug1: client_request_x11: request from ::1 62165     debug2: fd 7 setting O_NONBLOCK     debug3: fd 7 is O_NONBLOCK     debug1: channel 1: new [x11]     debug1: confirm x11     debug2: channel 1: rcvd eof     debug2: channel 1: output open -> drain     debug2: channel 1: obuf empty     debug2: channel 1: close_write     debug2: channel 1: output drain -> closed     debug1: channel 1: FORCE input drain     debug2: channel 1: ibuf empty     debug2: channel 1: send eof     debug2: channel 1: input drain -> closed     debug2: channel 1: send close     debug3: channel 1: will not send data after close     debug3: channel 1: will not send data after close          ** (gedit:2556): WARNING **: Couldn't connect to accessibility bus: Operating system does not support abstract socket namespace          debug3: channel 1: will not send data after close     debug2: channel 1: rcvd close     debug3: channel 1: will not send data after close     debug2: channel 1: is dead     debug2: channel 1: garbage collecting     debug1: channel 1: free: x11, nchannels 2     debug3: channel 1: status: The following connections are open:       #0 client-session (t4 r0 i0/0 o0/0 fd 4/5 cc -1)       #1 x11 (t4 r3 i3/0 o3/0 fd 7/7 cc -1)          debug1: client_input_channel_open: ctype x11 rchan 3 win 65536 max 16384     debug1: client_request_x11: request from ::1 62167     debug2: fd 7 setting O_NONBLOCK     debug3: fd 7 is O_NONBLOCK     debug1: channel 1: new [x11]     debug1: confirm x11     debug1: client_input_channel_open: ctype x11 rchan 4 win 65536 max 16384     debug1: client_request_x11: request from ::1 62172     debug2: fd 8 setting O_NONBLOCK     debug3: fd 8 is O_NONBLOCK     debug1: channel 2: new [x11]     debug1: confirm x11     debug1: client_input_channel_open: ctype x11 rchan 5 win 65536 max 16384     debug1: client_request_x11: request from ::1 62173     debug2: fd 9 setting O_NONBLOCK     debug3: fd 9 is O_NONBLOCK     debug1: channel 3: new [x11]     debug1: confirm x11     debug2: channel 3: rcvd eof     debug2: channel 3: output open -> drain     debug2: channel 3: obuf empty     debug2: channel 3: close_write     debug2: channel 3: output drain -> closed     debug1: channel 3: FORCE input drain     debug2: channel 3: ibuf empty     debug2: channel 3: send eof     debug2: channel 3: input drain -> closed     debug2: channel 3: send close     debug3: channel 3: will not send data after close     debug2: channel 3: rcvd close     debug3: channel 3: will not send data after close     debug2: channel 3: is dead     debug2: channel 3: garbage collecting     debug1: channel 3: free: x11, nchannels 4     debug3: channel 3: status: The following connections are open:       #0 client-session (t4 r0 i0/0 o0/0 fd 4/5 cc -1)       #1 x11 (t4 r3 i0/0 o0/0 fd 7/7 cc -1)       #2 x11 (t4 r4 i0/0 o0/0 fd 8/8 cc -1)       #3 x11 (t4 r5 i3/0 o3/0 fd 9/9 cc -1)          ^C     [1]+  Done                    gedit          UserName@HostName ~     $ jobs          UserName@HostName ~     $ kill %1 %2 %3 %4     -bash: kill: %1: no such job     -bash: kill: %2: no such job     -bash: kill: %3: no such job     -bash: kill: %4: no such job          UserName@HostName ~     $ firefox     -bash: firefox: command not found          UserName@HostName ~     $ ls     thisIsATest          UserName@HostName ~     $ exit     logout     debug1: client_input_channel_req: channel 0 rtype exit-status reply 0     debug1: client_input_channel_req: channel 0 rtype eow@openssh.com reply 0     debug2: channel 0: rcvd eow     debug2: channel 0: close_read     debug2: channel 0: input open -> closed     debug2: channel 0: rcvd eof     debug2: channel 0: output open -> drain     debug2: channel 0: obuf empty     debug2: channel 0: close_write     debug2: channel 0: output drain -> closed     debug2: channel 0: rcvd close     debug3: channel 0: will not send data after close     debug2: channel 0: almost dead     debug2: channel 0: gc: notify user     debug2: channel 0: gc: user detached     debug2: channel 0: send close     debug2: channel 0: is dead     debug2: channel 0: garbage collecting     debug1: channel 0: free: client-session, nchannels 3     debug3: channel 0: status: The following connections are open:       #0 client-session (t4 r0 i3/0 o3/0 fd -1/-1 cc -1)       #1 x11 (t4 r3 i0/0 o0/0 fd 7/7 cc -1)       #2 x11 (t4 r4 i0/0 o0/0 fd 8/8 cc -1)


title: .profile in SCO

text: Where can I find the `.profile` in my user's logon in SCO? I am needing to edit it, so I can add a `PATH` to it, so that my `PATH` loads up in start up. I have to add:               echo $PATH      ... as I have already edited the `PATH`. Any help on where to find this `.profile` file would be greatly appreciated.


title: Select lines using ranges in Vim?

text: I would like to select lines visually. Usually I'd `SHIFT-V` and select with `j` and `k` to highlight the lines. How do I do it using a colon-range command? e.g. `:10,12<?>` to select lines 10 - 12 and enter visual mode with that selection. What should I insert for `<?>` here? I'm sure it's easy but I don't know what keywords to web-search/browse help for.


title: what do you mean by interactive shell?

text: UNIX: The Complete Reference, Second Edition by Kenneth H. Rosen et al. > You can start another shell after you log in by using the name of the shell > as a command; for example, to start the Korn shell, you could type ksh at > the command prompt. This type of shell is not a login shell, and you do not > have to log in again to use it, but it is still an interactive shell, > meaning that you interact with the shell by typing in commands (as opposed > to using the shell to run a script, as discussed in Chapter 20). The > instances of the shell that run in a terminal window when you are using a > graphical interface are also interactive non-login shells. When you start a > non-login shell, it does not read your .profile, .bash_profile, or .login > file (or your .logout file), but it will still read the second shell > configuration file (such as .bashrc). This means that you can test changes > to your .bashrc by starting another instance of the shell, but if you are > testing changes to your .profile or .login, you must log out and then back > in to see the results. I was going through above lines and i dont understand what it means by interactive shell. and is it true that .profile is not read if i am using terminal. moreover, what it means when you say that bourne is not is an interactive shell while bash/csh is an interactive shell?


title: localization of man pages on Linux (Ubuntu)

text: Is there an option to output a manual page in a different language? I don't want to change the computer language completely, but only specific manual pages. For example               $ man -English man     Man is a manual program     …     $ man -Russian man     Инструцтия для Unix, BSD и Linux.     …


title: Can I get my iTerm key-combos working in tmux?

text: I have some shortcut keys defined in iTerm, and I use them for key-mappings in Vim. For example, I map `Ctrl-Enter` to send a `^[O2P` escape code, which I then use to define a `Ctrl-Enter` key-mapping in my Vim: ![enter image description here](http://i.stack.imgur.com/rUC1H.png)               set       <F13>=O2P     map       <F13> <C-CR>     inoremap <C-CR> <C-O>o      It works in a regular iTerm session, and in a screen session, but it _not_ in a tmux session. How can I fix this to work with tmux? I'm transitioning away from screen and really enjoying tmux aside from this hangup.


title: Unable to view mounted directories in a chroot

text: Here is a quick description of what I have done: I have a chrooted user (username: clientdev) which I have jailed inside their home directory. This chroot directory is /home/clientdev/ which is owned by root. Now I need this clientdev user to be able access the tomcat web application folder which is residing under /mnt/datadrive/tomcat/webapps. What I have done is :   1. chroot the user with a public key of their own to the home directory.   2. Create a folder under /home/clientdev called tomcat_ROOT and gave the ownership to clientdev. Now when I run the command :               mount --bind /mnt/datadrive/tomcat/webapps /home/clientdev/tomcat_ROOT      The folder disappears from the directory listing inside `/home/clientdev` if I login with clientdev. My root user can see it but not the desired user. Output of `ls -l /home/clientdev/tomcat_ROOT`:               drwxr-xr-x.  6 root   root    4096 Apr 11 15:07 .        drwxrwxr-x. 12 root   root    4096 Apr 11 15:07 ..      drwxr-xr-x.  3 root   root    4096 Apr  9 22:10 webapp1      drwxr-xr-x.  4 root   root    4096 Mar 18 18:43 webapp2      drwxr-xr-x.  3 root   root    4096 Apr  9 22:11 webapp3      drwxrwxr-x. 10 root   root    4096 Apr 11 15:20 ROOT      Output of `ls -l /home/clientdev/`:               drwx------. 4 clientdev clientdev 4096 Apr 10 21:36 .      drwxr-xr-x. 7 root      root      4096 Apr 10 22:07 ..      -rw-------. 1 clientdev clientdev  664 Apr 10 21:43 .bash_history      -rw-r--r--. 1 clientdev clientdev   18 Apr 23  2012 .bash_logout      -rw-r--r--. 1 clientdev clientdev  176 Apr 23  2012 .bash_profile      -rw-r--r--. 1 clientdev clientdev  124 Apr 23  2012 .bashrc      drwx------. 2 clientdev clientdev 4096 Apr 10 19:20 .ssh     drwxr-xr-x. 2 clientdev clientdev 4096 Apr 10 21:34 tomcat_ROOT      **_The issue I am having is that when the jailed user uses winscp to connect the the server, they are not able to view the mounted folders._**


title: Path issues with a source install

text: I hope my title isn't confusing. I've got a CentOS 5 machine and I had Ruby 1.8.7 installed on here. So in order to upgrade my Ruby installation and gems/rails I   * **Uninstalled Ruby:** sudo yum remove ruby   * **Downloaded the latest stable release of ruby and untared it:** wget... && tar -zxf ....   * **Went through the usual installation:**     * ./configure --prefix=$HOME     * make      * sudo make install   * **Downloaded rubygems:** wget....   * **ran the setup file** : ruby setup.rb Now my issue is that if I try to install rails, which I do by typing: **gem install rails** , I get the following message: _"-bash: /usr/local/bin/gem: /usr/local/bin/ruby: bad interpreter: Permission denied"_ So the next logical move (for me) was to type: **sudo gem install rails** , but that returns _"sudo: gem: command not found"_ , which means I've screwed up something royally. Just to add some more information **whereis ruby** : _ruby: /usr/lib/ruby /usr/lib64/ruby /usr/local/bin/ruby /usr/local/lib/ruby_ **which ruby:** _~/bin/ruby_ I'm thinking that by installing ruby manually from source I've screwed up something, perhaps the --prefix=$HOME is the culprit here?


title: Monitoring USB traffic

text: Kernel version: 2.6.31-22 I wish to monitor the USB traffic to and from a device. I've searched, but different sites seem to give different information and I'm confused.   1. Some sites suggest that I need to recompile the kernel, while others suggest that all I need to do is install the latest wireshark. Do I need to recompile?   2. Can someone suggest a website describing the most recent approach to USB sniffing?


title: How do I execute a program in gnome and make it use another gtk theme other than the default one?

text: I use a dark theme and the program that I am trying to run hard-codes some color values that make it unusable with the dark theme settings. I want to run this program without the dark theme being applied. Is this possible? The application that I'm trying to retheme is the ActiveState Komodo IDE.


title: How to change the background color of curses applications?

text: I hate that blue background which is everywhere in ncurses applications like: irssi, mc, tig, … I want to change that color, how can I do it? I know that midnight commander has themes, but what about global settings for all CLI programs? I found that there's `setterm` in Linux and `vidcontrol` in FreeBSD, but `vidcontrol` doesn't work for me, and I think it's not that what I need because it's for VESA stuff. I'm working over ssh here.


title: script to switch users keep running?

text: > **Possible Duplicate:**   >  Switching to superuser while shell script is running I need to switch users in a script and keep executing commands. I thought `-c` would help but i don't know how to use it properly nor any idea how to do this. I wrote               bash -c "su user && command arg1 arg2"      It tried to execute the command after i typed in exit. I tried setting UID and executing it but the app seems to know what user i am (root) and does things which i can not access as the user i am targeting so it looks like i really do need to figure out how to switch users and continue to execute bash code.


title: The "cp p2 &2 &" command makes Konsole to disappear, is it a bug?

text: The goal is start a background process that copies the data from the pipe p2 to the STDOUT as p2 is feed with data by some other process. I guess the command is incorrect. Nevertheless, the Konsole application window should not just disappear immediately after hitting the enter. I should get an error message or a submit crash report window or whatever. Why is this happing, is it a bug? How can I fix the command to get what I want? (Later I may want to copy the data to somewhere else than the STDOUT.)


title: Trouble installing or booting into Ubuntu or Fedora using a live USB or DVD on a new Lenovo E31

text: I've tried a live USB with Ubuntu 12.04.1 (both i386 and AMD 64-bit) as well as 11.10, as well as Ubuntu 10.04 on a DVD and Fedora 17 on a live USB. In all cases, selecting the option to boot into Ubuntu or install Ubuntu causes the machine to lock up in various places (for example, in a couple of cases the screen just blanks out after I select to try Ubuntu, and in another case a checklist that has some items like SATA 0:0:0:0 shows up and freezes before it would successfully boot to the home screen). The machine does successfully boot into Windows (I've tried this on two separate E31's, one of which was straight out the box, and I still haven't gone through the out of box experience with). I've verified at least a few of these options on my older laptop to check that I correctly created the live boot media. The closest to success I came was using the overnight build of Ubuntu, which successfully came up, but with severely mangled graphics. Do I have any remaining options to try to install linux on an E31?


title: Apply folder settings globally in KDE4

text: Im running opensuse 12.1 with KDE 4.8.4.   I've made settings changes to the Konquerer shell in a specific folder (e.g. changed my view from compact to details). How do I persist these settings that I change in one folder and make it apply to all folders?   Windows has such a button on the folder options->View tab.


title: Getting error 2006 MySQL server has gone away on CentOS

text: I need to import a database into a freshly created CentOS 5 virtual machine. However, whenever I run the import command on the console, it stops working in about a minute and I get the error message: > ERROR 2006 (HY00) at line 818: MySQL server has gone away The only place that MySQL looks for `my.cnf` (as far as I can tell) is `/etc`, and I changed the timeout in that configuration, but it doesn't seem to have had any effect. Yet if I make a syntax error, it seems that MySQL is sensitive to that. My feeling is that there must be a some other `.cnf` file that is being used after the one that I am modifying, but I can't seem to find it. Does anyone have any ideas of what else I can do to try to solve this problem?


title: How to properly align partitions?

text: I'm trying to understand what are the rules for creating correctly aligned partitions. For the moment I'm playing with `parted` on a virtual machine, but I'm planning to move to a real hard disk when I feel more confident. I bought my laptop in 2008 so it doesn't have 4 KiB sectors, but 512 B ones. I'm going to use the EXT4 filesystem with 4 KiB blocks, so I suppose I need to align to 4 KiB anyway. As far as I know, sectors are numbered from zero and the first one is reserved for the MBR. So I conclude that I need to leave 7 sectors unused (4096 B / 512 B - 512 B) after the MBR, and the first partition could start at sector 8. The end of this partition could be any sector number that is one less than a number divisible by 8. For example 15, for an extremely small partition with just one EXT4 block. The problem is that `parted` says me that "The resulting partition is not properly aligned for best performance", but doesn't tell me what's wrong exactly. If I try to use `fdisk` instead, I cannot even use a sector less than 2048 (1 MiB) for the start of the first partition. I searched for a rationale behind this, but I found nothing. In the future I could be interested in partitioning rules that also take in consideration LVM, RAID and encryption, but this is not really important for the moment. I need to understand the basics first.


title: Script to Read Videos and output information

text: I am working on a script that reads all folders inside a Movie folder and outputs the information for each video in a file. The current one I have is this:               movies=0     rm movielist     for dir in Movies/*     do       (cd "$dir" && pwd|cut -d \/ -f5|tr -s '\n' ', ' >> ../../movielist &&       >> ../../movielist )     echo "Movie $movies - $dir ADDED!"     let movies=movies+1     done          rm moviefinal     cat movielist | while read MovieName;     do          echo "$MovieName" | cut -d ',' -f2 | cut -d 'x' -f2 | sort | uniq | while read MovieRes;         do             case $MovieRes in             [461-660]*)                 echo "$MovieName,480p" >> moviefinal             ;;             [661-890]*)                 echo "$MovieName,720p" >> moviefinal             ;;             [891-1200]*)                 echo "$MovieName,1080p" >> moviefinal             ;;             *)                 echo "$MovieName,DVD" >> moviefinal             ;;             esac         done         done      Which reads from the **Movies** folder each movie (eg: Movies/The Matrix/Matrix.mkv) and sends it to a file called moviex inside the Movies folder. The info inside the file is something like this:               The Matrix, 1920x1080, MKV     The Matrix 2, 1280x720, AVI     ....      What I want to add now is a way to read the Height and Width (Which are the SourceImageHeight and SourceImageWidth with exiftool) and do a CASE or IF where, if the height is X and width is Z then add to the output file another variable which is the quality (ie: 720p, 1080p, DVD...). The above would look something like this:               The Matrix, 1920x1080, MKV, 1080p     The Matrix 2, 1280x720, AVI, 720p      UPDATE - The script is now showing the Quality (720p, 1080p) but the CASE part is wrong. It sometimes grabs for example a 720 video and gives it a DVD quaility, when in fact, in the script I explicitly said 720.


title: Straightforward system and file backup/restore for Linux?

text: After using an Ubuntu virtual machine for a while, I think I am ready to get a real, physical machine and use Ubuntu on it. Since I am still relatively new to the Linux world, is there a reliable solution for making regular backups of files and settings for my system (maybe similar to Apple's Time Machine?) that I can rely upon when, e.g. my hard drive fails, or something bad happens?


title: Sending audio through network

text: This is a rather crazy idea. I am planing to set up a configuration that would send audio being played on my laptop to my home server via **local** network so that the sound is played on the server connected to a hi-fi with good speakers. It's supposed to serve the purpose of watching movies on the laptop with sound on the speakers without rearanging cables. I suppose it can be done similarly to writing text to a file mounted via sftp, but with the /dev/audio or /dev/mixer But I have no idea how to intercept the audio output. Looking forward to tips from Pros ;)


title: Unable to Boot into F17

text: I was currently running Win8 and F17 as a dual boot on my home desktop with an i5 chip and Asus UEFI BIOS. Unfortunately, while I was in Win8 I accidentally removed the partition that held my F17 OS. Now whenever I boot I'm prompted with `error: no such partiton. Entering rescue mode...` and then the single prompt `grub rescue>`. Now I've been searching the web for a solution to this problem, but I haven't found an answer yet. These are some of the methods that I've tried so far:   1. Burned a Windows 8 Recovery DVD; wasn't recognized    2. Tried creating a liveusb with F17 i686 desktop version   3. Followed several different tutorials, using commands like `insmod` and `makeactive` but neither are recognized Currently, I've found a a page in the Fedora Docs about editing the /etc/grub.d/10_linux file. Is this what I have to do in order to fix this gigantic headache? If so, how do I go about doing this? I know that people have had this problem before; I've just been unable to find the solution myself. Any help is greatly appreciated. Edit1: When I tried to boot with the liveUSB, it wasn't recognized. Even though I set my boot priority to be USB first. I was still taken directly to the `grub rescure>` prompt.


title: kinit returns error salt type 3 unsupported on FreeBSD 9.1-RELEASE install

text: When attempting to run kinit to log into a Kerberos V5 realm I get the following error on a default install FreeBSD 9.1-RELEASE kinit: krb5_get_init_creds: salt type 3 not supported Any ideas?


title: VPN: access subnet of client

text: i have VPN setup which is like this:               ########### internet  ############## internet  ############   LAN   ############     # macbook # --------> # VPN server #----------># PC A     # -------># PC B     #     #10.8.0.6 #           # 10.8.0.1   #           # 10.8.0.7 #         # 192.168..#     ###########           ##############           ############         ############      and now i want to access the PC B in the local LAN of PC A ( A is in VPN net ) with my macbook, I can access PC A with my macbook, so VPN works, i just need some way to route the traffic from the macbook over PC A ( i guess ) to reach PC B in the LAN of PC A, i cant add PC B to the vpn net because i dont have (physical) access to it. ( i hope this is not too confusing ) how can i do this? VPN Server and PC A are running Debian, any advice is greatly appreciated :), and sorry for my bad english


title: how to detect a laptop hibernate/resume(close lid,open) in osx from a bash script

text: This is a follow on question to how to trap a suspend a resume from a bash script How do you a trap the event that occurs when you close the lid and later reopen it from a bash script?


title: How do get an html file to open in preferred html application from cmdline on linux?

text: How do get an html file to open in preferred html application from cmdline on linux ? To claridy I have an xterm window open and an html file I want to do something like               open test.html      and that will start my preferred browser with the `test.html` file loaded. (I'm looking for a solution that will work for any Linux desktop machine without me needing to know hat browser app they have installed.)


title: Disown won't take -h option

text: I'm running a command that I now realize I'd like to leave running after I close my SSH session. I didn't start it with a `&` argument, but I have put it in the background (`CTRL`-`z`, `bg`). Now I'm trying to make it keep going after I disconnect. That's what `disown -h` is for, right? I've tried `disown -h` and `disown -h 1` (`jobs` shows my job as #1), and I get               disown: job not found: -h      Why is `disown` taking "-h" as a jobspec rather than an argument? I'm in `zsh`, if that matters.


title: Openstack for home cloud hosting

text: I am experimenting with a couple of technologies that I soon may have to use at work. So for now, I was thinking about duplicating the environment which I may have to create for my office at home so that I can save sometime. We're thinking of hosting our websites on our own little datacentre at work. While this is still under discussion, I think this provides an excellent opportunity for me to learn some cloud/virtualization technologies. So, I have 2 assembled PCs (2nd gen i5 processor, 4GB RAM each, 80GB HDD each) on which I plan to learn on. I'd like to recreate a hosting environment wherein I'd like to be able to host websites, have backups taken, incorporate Load balancing (if necessary). I was thinking along the lines of Openstack. The host OS that I was thinking of using was CentOS or Fedora. My questions are:   1. Is it better to install Openstack on top of one of the afore mentioned OS or first have Virtualize the environment with ESxi/Xen and then install Openstack? (I am going to be using all of these technologies for the first time)   2. Say there is a website which has a MySQL db, in a virtual environment, is it possible to have one VM as the frontend and another VM as the DB server? Does this affect the performance in anyway? I've downloaded all the necessary documentation from the websites and some tutorials as well and I also have the hardware ready. I'm waiting for some input from this community which might be helpful along the way or some advice from people who've tried this before. There're a list of lists I've found concerning building your own environment but by far, I found this to be the most interesting.


title: Open Source Politics: How is it produced? Decisions, power and gender

text: I hope this is the right forum to ask that question! I think that computer skills and programming knowledge will be THE decisive factor for the generations to come. I think each and every child everywhere in the world should learn how to code and master a computer. As I am very interested in the political implications of that, I am looking for articles, scientific publications and blog entries on the politics of the open source community (especially concerning Linux and programming languages, but open to Wikipedia and other common effort projects). My questions are: - How many people are really involved and how are actions and decisions distributed (my guess: 1% do 95% of the work)? - How are the productive networks distributed locally? How much is decided and programmed in the US and Europe, how much elsewhere? - How are women involved? Do they contribute differently and what initiatives are working for getting more women into computing? Cheers!


title: Fastest, most consistent booting

text: I am running an i3 laptop, assembled by Asus. I am running Ubuntu with grub2 and burg boot loader. I would love to have a consistent graphical boot process as with Mac OS X. I don't want the user to see any text during bootup, but only graphics. What would be the fastest and most consistent option(meaning also, being able to sync it with a LightDM theme)? Cheers!


title: How to use SOCKS proxy with yum?

text: The man page to yum.conf describes several proxy related variables: > >               proxy URL to the proxy server that yum should use. >               proxy_username username to use for proxy >               proxy_password password for this proxy >   But how to specify a SOCKS proxy? I assume that the above is just for normal HTTP proxies ...


title: Solaris SMF vs Linux Upstart

text: I'm in the process of learning Upstart after first having learned SMF. Naturally I'm assuming that they fulfill the same purpose but I'm aware that this is where I'm wrong. Ideally I was hoping that someone had written a comparison so that I wouldn't have to dig for features in Upstart that just isn't there. Solaris has something called the Contract Subsystem which is build into the kernel and this is actually what enables most of the features in SMF. I'm aware that there's potentially no equivalent in Linux and this may be the reason why I cannot figure out what I can expect from Upstart in terms of service stop and also on service monitoring and restart-on-failure. To be more specific about the things I cannot truly figure out in Upstart:   1. **Stopping**. With SMF I'm pretty much used to letting SMF do the stop process. I never really write specific kill scripts, I do not have to keep track of PIDs and I do not need to know how many times a process spawns, etc. This seems more of a DIY process in Upstart. Correct ?   2. **Restart-on-failure**. I don't really understand if this is a feature of Upstart or not. I see Linux people coupling Upstart with some type of userland process monitoring mechanism. Perhaps that is what I should be doing?   3. **Viewing**. I'm fond of the SMF `svcs -p <servicename>` command which allows me to see all the processes that are (currently) part of the service. In Upstart it seems to me that "a service " = "a process" meaning that in Upstart the `initctl status <jobname>` command will always only show a single process. What if I have a service that from the OS's point of view is two separate processes ?   4. **Guaranteed-only-one-instance**. For most daemons you really want to make sure that there's only ever one started instance. For some services even an attempt to start a second instance may be fatal. I would like to tell Upstart this and have Upstart guarantee me this. So, even if the operator executes `service xyz start` and `xyz` is already running it shouldn't cause an attempt to start another instance of `xyz` nor should it cause an attempt to restart `xyz`. Can I do that?   5. **Delegation**. With SMF I delegate responsibility to certain services to non-privileged users. For example I have a small group of non-privileged users who has been granted the right to start/stop their own port-80 webserver. I do this by assigning the right to this service to be able to bind to a privileged port (portno<1024) _without_ assigning any other root-like privilege to the service. Then I delegate the start/stop privilege on that service to a group of users, through a role. I'm assuming that in Upstart I would have to do some sudo scripting to achieve the same ? When looking more closely at it seems to me that Upstart is almost intended even as a replacement for `cron`. It has the concept of short-running jobs or repeated tasks which SMF doesn't. SMF is - as the name suggests - purely focused on _services_ , i.e. long-running processes. This may be what confuses me. But right now I'm only focused on how to configure those long-running processes. I'm looking for a way to describe my service to the OS (e.g preconditions, how to start, stop, delegation, privileges, etc) and then have the OS take care of it from thereon. UPDATE 1: Learned some more: This is for sure not unified across Linux, i.e. there's no consensus in Linux community over this matter ... to put it mildly. This means that I have to let you guys know the distro: CentOS and sometimes a bit of RedHat (both in version 6 series). UPDATE 2: I've found that - at least some people say - that RedHat (and thus CentOS) will in next major release be ditching Upstart in favor of something called `systemd`. This just leaves me even more confused. What to do if I want to build reliable services on CentOS/RH today?


title: Why env variable are not visible while starting a service

text: I am wondering why during service start up environment variables are not visible. To be more precise: I created service startup scrip according to LSB spec which starts some java process. For this purpose JAVA_HOME env variable is checked first. This env variable is set in /etc/profile.d/java.sh. That is probably not executed while starting the service. I would like uderstand the process and what is the correct solution in such case?


title: What's in the /etc/pki/nssdb database?

text: So, these files aren't empty...               [ root@localhost ] # ls -l     total 248     -rw-r--r--. 1 root root 65536 Jan 12  2010 cert8.db     -rw-r--r--. 1 root root 65536 Dec 23  2013 cert8.db.orig     -rw-r--r--. 1 root root  9216 Jan 12  2010 cert9.db     -rw-r--r--. 1 root root  9216 Dec 23  2013 cert9.db.orig     -rw-r--r--. 1 root root 16384 Jan 12  2010 key3.db     -rw-r--r--. 1 root root 16384 Dec 23  2013 key3.db.orig     -rw-r--r--. 1 root root 11264 Jan 12  2010 key4.db     -rw-r--r--. 1 root root 11264 Dec 23  2013 key4.db.orig     -rw-r--r--. 1 root root   451 Jul  8 10:10 pkcs11.txt     -rw-r--r--. 1 root root   451 Dec 23  2013 pkcs11.txt.orig     -rw-r--r--. 1 root root 16384 Jan 12  2010 secmod.db     -rw-r--r--. 1 root root 16384 Dec 23  2013 secmod.db.orig      However, certutil doesn't tell me anything:               [ root@localhost ] # certutil -L -d /etc/pki/nssdb          Certificate Nickname                                         Trust Attributes                                                                  SSL,S/MIME,JAR/XPI               [ root@localhost ] # certutil -K -d /etc/pki/nssdb     certutil: Checking token "NSS Certificate DB" in slot "NSS User Private Key and Certificate Services"     certutil: no keys found      I'm working on setting up RHDS9 to run under SSL. Should I try to use the /etc/pki/nssdb database, or create my own? I can't really answer that without knowing what's already there... (And, if you say "roll your own," I still want to know what's in there, and why I see file sizes of 2^14 and 2^16 exactly.)


title: What could cause a run time remounting of my /var partition to be read only?

text: I have a buildroot generated embedded linux system (x-86 geode processor) using an initramfs but with `/var` and `/etc` mounted onto a compact flash device using the default mount options specified in `fstab`. My filesystems are ext3. I run a controller application on this system which generates some custom activity logging from time to time to files created on the `/var` partition. Recently one of my embedded devices was reporting that it could not open the log file as the /var partition was a read only partition. I verified with using `mount`. My question is how on earth could this happen? My controller application certainly does not do this, but are there any other processes that run on a linux system that could request a remount of /var as read only? My devices do run in noisy industrial environments so is it possible that this could be come kind of system corruption due to EM interference? This has never happened before over several hundred hours of testing but it is a critical error that I need to find a cause for so any suggestions as to what could have caused this or how to ascertain what caused it are very welcome. **EDIT** In light of the criticism this question has received, I include the relevant line of fstab for mounting the /var partition:               /dev/sda3   /var   ext3   defaults 0  3      and the line within the `inittab` function responsible for mounting               null::sysinit:/bin/mount -a      also here is the output line from `/proc/mounts` relevant to `/var`               /dev/sda3 /var ext3 rw,relatime,errors=continue,user_xattr,scl,barrier=1,data=writeback 0 0      I should probably also mention that the system uses `busybox` init system.


title: Bad SIP URI in To header field

text: We are creating Asterisk<->Lync trunk. The Asterisk is under providers control. I am in charge of Lync. I'm slightly familiar with Asterisk. We created trunk. Everything was fine until provider restarted their Asterisk server. Now the Asterisk sends strangre SIP INVITES with sip:XXX.XXX.XXX.XXX:5068 (where XXX.XXX.XXX.XXX is the IP address of the Lync Server) in To header field. Before restart it was something like sip:username@XXX.XXX.XXX.XXX. Provider doesn't know what to do. We are close to deadline with the project. What do you think should we do to make to SIP URI be like that sip:username@XXX.XXX.XXX.XXX? P.S.: user recreation didn't help. Changing extension didn't help too.


title: How do I update lsof port on FreeBSD 9.2?

text: It threw errors about kernel sources missing. So, I looked and sure enough this box doesn't have them. The documentation I have says to install them via sysinstall. That failed both automatically and manually configured server references. I then found elsewhere that sysinstall is no longer supported and that sources should be pulled with Subversion. I pulled the sources into /usr/src with subversion. Lsof still pukes on compile. The Makefile dependency that it is missing appears to be `/usr/src/sys/kern/kern_lockf.c`. I've got a `/usr/src/sys/kern` with several files, but no `kern_lockf.c` anywhere to be found. Supposedly I have the current sources and the current ports. What's going on?


title: Send big data with dsmigratedata command

text: I want send data to remote server using this command but I dont know what is the syntax is that I can use for this command... I'm using the command:               $ dsmigratedate -s user@remoteip -p 22 password      But it's not working. Can someone help me?


title: Rings and run levels

text: The question stated below might not be technically correct(misconception) so it would be appreciable if misconception is also addressed. Which ring level do the different *nix run levels operate in? _Ring tag not available._


title: Security of xhost (local) and sudo xauthority forwarding

text: Context: launch a GUI application as a linux service. I considered making a headless daemon with a GUI front-end but there is too much code involved to do it now. This service must start on user login, it should be started in the user shell (file rights are important here). No interaction of root should be necessary (auto-install from a RPM). Plus the system (root) must be able to start and stop this service to perform maintenance tasks called by cron. I manage to do it so far, but I have security question about it : does the following break some X server security once the user 'username' in logged ?   1. .xinitrc created in '/home/username', calling xhost before starting the windows manager              xhost + local:username     exec $WINDOWMANAGER        2. '/etc/sudoers' modified with a custom editor to add those lines              username localhost = NOPASSWD: /etc/init.d/my-daemon     Defaults env_keep += "DISPLAY XAUTHORITY"        3. service script '/etc/init.d/my-daemon'              #!/bin/bash     DISPLAY=${DISPLAY:-:0.0}     export DISPLAY=$DISPLAY     gnomesu -u username -c 'my-gui-app-bin with-some-arguments'        4. my-daemon service don't start on any level (DISPLAY not ready even on level 5)              chkconfig --del my-daemon        5. autostart of the deamon via a .desktop file in '/etc/xdg/autostart/' and the following script              #!/bin/bash     sudo /etc/init.d/my-daemon start


title: Shell Script to move folders containing a specific word

text: I'm searching for an simple shell script to `mv` all folders in `/var/www/uploads/` that containing **Math** or **Physics** in the name to `/mnt/Backup/`. I've never done something like that before, due to the fact I am new to shell scripting. Searched across the web and unfortunately I only found scripts for moving specific files. Is there anyone who may help?


title: What is the proper solution to a web server trying to write to a directory?

text: So, I have a box with a "deploy" user. This deploy user owns a code repository and wordpress is running on this box... When wordpress attempts to do something like upload a plugin, it is using the user "www-data" to write to "wp-content/plugins".. Apparently it is uploading a zipfile, unarchiving, and then removing the zipfile. I kept running into problems where wordpress was unable to do these things.. Since my entire code repository was set to be the owner and group: "deploy:deploy", obviously www-data is not able to access this. So, my first attempt was to add www-data to the deploy group.               usermod -a -G deploy www-data      Immediately after issuing this command, I found that I could no longer ssh into the box.. Totally confused as to why-- can anyone fill me in on that? So I ended up doing:               chmod -R go-w ~      And then could ssh in again... doing "groups www-data" showed deploy as one of the options, so I thought hooray... I went and made sure the wp-content and plugin directories all had write access for the group, and they did... Double horray, it should work perfectly! However, no... Failure upon trying to upload a plugin. After much annoyance, I just went into the apache config and changed the APACHE_RUN_USER & GROUP to "deploy" Problem solved... Sort of. Except the idea of apache running as the main user, I think is awful. Anyway, so after making this change, uploading a plugin was successful and I saw:               drwxr-xr-x 8 deploy deploy 4096 Oct 22 21:28 wp-crm      So, the group has no write access-- I thought maybe this is a hint to why this was failing... But then, the fact that it's writing with deploy, means that's not really a hint... Because that's just due to how deploy's umask is set to.. I assume... So... I am just lost as to what the solution is... Should my wp-content group be www-data instead? Or am I missing something else here?


title: proftpd does not change default group for new files

text: I am Trying to configure ProFTPd to change group for newly created files/directories. In my config I have this:               <Directory /home/*>       GroupOwner www     </Directory>      Which does not seem to work. All users are added to www group.   Debug shows nothing regarding to a group change. I'm using FREEBSD 9.0-release. **EDIT:** I'm willing to try any other FTP server that makes this easier.


title: FlashPlayer on OpenBSD?

text: What are my choices in 2011? Or it's better to download the flash videos? (but there aren't any solutions to download every type of videos, only youtube..). Or are there any "linux-emulations" for OBSD?


title: HTML5 on OpenBSD?

text: What do I need to install/configure to make an HTML5 such as Youtube's alternate player page work? Install a browser that's supporting it by default, or I have to do other things to?


title: How do I remove carriage returns from directory names?

text: I created a file in Excel and ftp'd the file over to my Linux machine. In the file were a bunch of `mkdir` commands. Now all of the newly created directories have a carriage return at the end of them. I can find the directories using this command:               find . -type d -name *$'\r'      but when I attempt to remove them using this command:               find . -type d -name *$'\r' | xargs rm-rf      it doesn't work - nothing gets removed. The directories are still there and they still have carriage returns on them. Can you help me create a command that will remove those pesky '\r's? Thanks. P.S. I'm using RHEL 5.3


title: How can I get an alert when my battery is about to die in Linux Mint?

text: This happens to me more than I'd like to admit, but sometimes I don't notice the power getting low since it only shows up in my status bar, then the computer just quits. I'd like a big alert that warns me before this happens. Is there any way for it to alert me? Ubuntu has a nice popup that tells you it's getting low.


title: generate Token for OAuth (Twitter)

text: I am writing a simple bash script to download stream from Twitter:               curl -H "Authorization: ${TOKEN}" "$URL"      and I am looking for a way to generate the `$TOKEN`. I have all the input necessary (CONSUMER_KEY, ...), but where can I get the program `oauth_sign` that will generate the token from the input data?               TOKEN=$(oauth_sign $CONSUMER_KEY $CONSUMER_SECRET $ACCESS_TOKEN $ACCESS_SECRET GET $URL)


title: vsFTPd Browser no Listing

text: I'm trying to access my ftp server through the browser but I am facing an issue. If I access it using Filezilla, I can see the directories fine. However using a browser I get no directory listing as you can see in here: http://www.imageurlhost.com/images/2ki5heahncml7517tcbg.png I have added this entry to iptables hoping to solve the problem but it didn't change:               -A INPUT -m state --state NEW -m tcp -p tcp --dport 21 -j ACCEPT      Can anybody help me diagnose this problem?


title: Firefox: use system proxy settings, but where are these?

text: Running Ubuntu 13.10, Firefox is configured to use the system proxy settings, but it seems it fails to pick them up. The computer is connected to the network, and it's possible to establish a connection with other browsers with the same username/password (so the problem is not here). I'd like to manually configure the proxy setting in Firefox, so want to know in what file they are.


title: Hugepages in linux - how to make sure that java process will start using hugepages

text: I'm running java server on Red Hat Enterprise Linux Server release 5.9. Recently I started to use HugePages as it has some advantages I would like to use. System was configured correctly (as many sites and blog states) and 40G of RAM was set for hugepages to use. > HugePages_Total: 20480 > > HugePages_Free: 20480 > > HugePages_Rsvd: 0 > > Hugepagesize: 2048 kB Total RAM on server: 128G. After setting hugePages machine was rebooted and server process started in hugePages with Heap size of 29G. All went smooth. Lately I did some changes in jvm parameters and increased Heap size to 30G. When jvm process was restarted it did not used hugepages. Error in log showed up: Java HotSpot(TM) Server VM warning: Failed to reserve shared memory (errno = 22) I did some testing to make sure that other changes in java parameters did not caused this and conclusion was that increasing heap size was the reason. Now I don't get it. System shows no hugePages used at all, so 40G of space left and still java can't reserve 30G of it. Can anybody explain why this is happening? More important is there any way to make sure that it won't happen in the future? This is production system so if I create final configuration it won't be able to run java process outside hugePages as there will be no space left. Final config will be 96G of hugePages with one 32GB java process working constantly and with reserve resources to run two more such processes in case of emergency. I have to make sure that when such emergency happens java processes will be able to use hugePages. Any help would be great.


title: Replacing libpng-devel (1.5.3) with libpng12-devel RPMs on CentOS

text: I have a CentOS 6.4 box with a lot of other RPMs. I want to replace libpng-devel with libpng12.devel. If I do an `rpm -e libpng- devel` I get the following:               error: Failed dependencies:         pkgconfig(libpng) is needed by (installed) cairo-devel-1.10.2-7.el6.x86_64         pkgconfig(libpng15) is needed by (installed) gdk-pixbuf2-devel-2.26.1-1.el6.x86_64         libpng-devel is needed by (installed) cairo-devel-1.10.2-7.el6.x86_64         libpng-devel is needed by (installed) gtk2-devel-2.24.10-1.el6.x86_64         libpng-devel(x86-64) = 2:1.5.13-2.el6 is needed by (installed) libpng-static-2:1.5.13-2.el6.x86_64      Deleting those takes me down a rabbit hole. I tried yum downgrade and got the following:               [mono@localhost ~]$ sudo yum downgrade libpng     Loaded plugins: fastestmirror     Setting up Downgrade Process     Loading mirror speeds from cached hostfile      * base: mirror.net.cen.ct.gov      * extras: mirror.dattobackup.com      * rpmforge: repoforge.mirror.constant.com      * updates: mirror.umd.edu     Resolving Dependencies     --> Running transaction check     ---> Package libpng.x86_64 2:1.2.49-1.el6_2 will be a downgrade     ---> Package libpng.x86_64 2:1.5.13-2.el6 will be erased     --> Finished Dependency Resolution     Error: Package: gdk-pixbuf2-devel-2.26.1-1.el6.x86_64 (installed)                Requires: libpng15.so.15()(64bit)                Removing: 2:libpng-1.5.13-2.el6.x86_64 (installed)                    libpng15.so.15()(64bit)                Downgraded By: 2:libpng-1.2.49-1.el6_2.x86_64 (base)                    Not found     Error: Package: 2:libpng-devel-1.5.13-2.el6.x86_64 (installed)                Requires: libpng(x86-64) = 2:1.5.13-2.el6                Removing: 2:libpng-1.5.13-2.el6.x86_64 (installed)                    libpng(x86-64) = 2:1.5.13-2.el6                Downgraded By: 2:libpng-1.2.49-1.el6_2.x86_64 (base)                    libpng(x86-64) = 2:1.2.49-1.el6_2     Error: Package: 2:libpng-devel-1.5.13-2.el6.x86_64 (installed)                Requires: libpng15.so.15()(64bit)                Removing: 2:libpng-1.5.13-2.el6.x86_64 (installed)                    libpng15.so.15()(64bit)                Downgraded By: 2:libpng-1.2.49-1.el6_2.x86_64 (base)                    Not found      You could try using --skip-broken to work around the problem      You could try running: rpm -Va --nofiles --nodigest     [mono@localhost ~]$      Downgrading the others took me down a similar rabbithole. I tried localinstall/localupdate and they did not seem to work either:               [mono@localhost ~]$ sudo yum --nogpgcheck localinstall ~/rpmbuild/RPMS/x86_64/libpng12-devel-1.2.50-3.el6.x86_64.rpm     Loaded plugins: fastestmirror     Setting up Local Package Process     Examining /home/mono/rpmbuild/RPMS/x86_64/libpng12-devel-1.2.50-3.el6.x86_64.rpm: libpng12-devel-1.2.50-3.el6.x86_64     Marking /home/mono/rpmbuild/RPMS/x86_64/libpng12-devel-1.2.50-3.el6.x86_64.rpm to be installed     Loading mirror speeds from cached hostfile      * base: mirror.net.cen.ct.gov      * extras: mirror.dattobackup.com      * rpmforge: repoforge.mirror.constant.com      * updates: mirror.umd.edu     Resolving Dependencies     --> Running transaction check     ---> Package libpng12-devel.x86_64 0:1.2.50-3.el6 will be installed     --> Processing Conflict: libpng12-devel-1.2.50-3.el6.x86_64 conflicts libpng-devel     No package matched to upgrade: libpng12-devel     --> Finished Dependency Resolution     Error: libpng12-devel conflicts with 2:libpng-devel-1.5.13-2.el6.x86_64      You could try using --skip-broken to work around the problem      You could try running: rpm -Va --nofiles --nodigest     [mono@localhost ~]$ sudo yum --nogpgcheck localupdate ~/rpmbuild/RPMS/x86_64/libpng12-devel-1.2.50-3.el6.x86_64.rpm     Loaded plugins: fastestmirror     Setting up Local Package Process     Examining /home/mono/rpmbuild/RPMS/x86_64/libpng12-devel-1.2.50-3.el6.x86_64.rpm: libpng12-devel-1.2.50-3.el6.x86_64     Package libpng12-devel not installed, cannot update it. Run yum install to install it instead.     Nothing to do     [mono@localhost ~]$      Is there any way I can delete one rpm and add another in the same command? Is there a multi-command RPM transaction? RPM transactions seem to be for historical auditing, so I think I'm googling for the wrong word. I need to swap out these RPMs a lot on my system, so if there is a way to link them by modifying the rpm spec and rebuilding it that's acceptable too.


title: Where should I install manual pages in user directory?

text: I'm trying to create a Makefile for a small Perl utility I wrote, And I'm struggling to find out a way to find where to install my man page when `make` is run as a **non-root** user. I'm currently parsing the output of `manpath` to find out the first path in the `$HOME` directory… and it _almost_ work fine. Paths I've found are `~/man` and `~/share/man` The only problem is that if those directories don't exist in the first place, `manpath` doesn't output any of them. ### Questions   * Is there a portable way to find out where I should install the man pages in the user's $HOME directory?    * If not, which one of them should be preferred?


title: I messed up my system clock in Arch Linux

text: I installed Arch a couple of days ago. Just realized the date/time were off by a day and one hour. I changed it using `timedatectl set-time`. Then used `hwclock --systohc` to set the hardware clock. After that I was not able to enter some sites like Gmail because of https certificate errors. I tried changing the time back but it did not work. I rebooted and then had problems because the partitions had mounted on a different time so I used `fsck /dev/sda` on my partitions and I was able to boot up. Right now the clock is not a problem but I really need to check my mail. I had to use Facebook to log in to stackexchange _cringe_. Help? This is what Gmail's error page say: > The server's security certificate is not yet valid! You attempted to reach > gmail.com, but the server presented a certificate that is not yet valid. No > information is available to indicate whether that certificate can be > trusted. Chromium cannot reliably guarantee that you are communicating with > gmail.com and not an attacker. Your computer's clock is currently set to > Tuesday, January 10, 2012 12:14:47 PM. Does that look right? If not, you > should correct your system's clock and then refresh this page. > > You cannot proceed because the website operator has requested heightened > security for this domain.


title: List all files / binaries in current PATH

text: Is there an "easy" way of running an "ls -la" style command for listing all files / executable binaries in the current PATH? (I intend to pipe the output into grep, for looking for commands with unknown prefixes but basically known "names", the kind of case when the auto- completion / tabbing in bash is essentially useless. So some sort of an "inverse auto-complete feature" ...)


title: How to connect two Linux computers with bluetooth?

text: I have 2 computers, both have Ubuntu 10.10 desktop edition installed. Both have bluetooth dangle, but the manufacturers are different. I want to connect the two computers and share the Internet connection. On computer A, I set the bluetooth to 'visible'; and on computer B, I started the 'setup new device' process. On computer B, it can find A, but when it pops up a dialog and ask me to enter the PIN code on A, I cannot see anywhere on A that I can enter the code. I also tried from the other direction, but no luck.


title: Run command on startup for one user

text: I made a new user on my server. The user is not logged into the bash shell on startup. To do this I can run `/bin/bash --login` and it works. Where do I place this command so that it runs automatically? I tried `~/.bashlogin'`, `~/.profile` and `~/.bashrc`. When I go back to login I see the user logging in, but the shell does looks like a shell without login. E.g., > user@computer:~/path$   > $   > $   > $ instead of > user@computer:~/path   > user@computer:~/path   > user@computer:~/path   > How to run the command `/bin/bash --login` without doing it yourself?


title: Using gparted, deleted partition of memory card, then formated to fat 16; now its not working; error: no partition table present

text: I connected my Sony cyber-shot camera via cable to my laptop having Ubuntu 13.04. I wanted to make the memory card of the camera fresh to re-use. I opened GUI gparted. I did the below: 1) I selected the partition `/dev/sdb1` and set the option to delete. (There only this partition was present. So the complete space was unallocated.) 2) Then I selected the unallocated space for formatting with fat 16. It asked me for space allocation. I selected the default which was : free space before = 1 ; free space after = 0 3) Then I clicked on the menu "Apply all operations". Then I got message " 2 of 2 operations operated successfully ". Now the issue is that the memory card of 2GB isn't working. When I clicked to create partition in gparted, it says " no partition table present. You need to create it 1st ". So, I went to menu on GUI gparted: device -> create partition table. But it failed with message "Input/output error during read on /dev/sdb". I can't use my camera. Please suggest how to resolve at the earliest as I'm in dire need of the camera today after 3 hrs. > EDIT#1 I spoke to the customer care os Sony Camera & found that the memory card got corrupted & permanently damaged. I've already ordered for a new memory card. What the customer care told was that the camera memory card is not SD card. It's known as `memory stick pro duo`. this type of card has no partition. It should be formatted only by camera. (I did the mistake by formatting by gparted in computer). Though I've ordered for a new one, still I would like if someone has a way to make it working!


title: Failover with Syslog-ng?

text: Is it possible to set up a failover mechanism with Syslog-NG opensource edition? I want that the syslog-ng Daemon logs to a remote Loghost and switches to an other server if the first would go down for some reason...


title: Strange network problem (ssh) after hardware switch - packet loss?

text: My machine crashed (would not start) and so I pulled my harddrives and memory (which was not stock) and brought to another identical Dell optiplex 755 which I found in the office. Now everything seems to work fine except for sporadic network behavior when connecting through ssh either to or from the new machine. After around a minute or so I get a broken pipe. If I run with strace all I get is "reset by peer". Now, although I am completely new to debugging tcp issues, with the help of this post my thinking is that it could have something to do with dropped tcp packets. When I run               > netstat -s -p      I find that the "segments retransmitted" counter increased with 4 at the point where I got the broken pipe. Before finding the above post I did the below tests suspecting it had something to do with the changed hardware itself: 1. ethtool eth0 (shows nothing weird, have full duplex) 2. ethtool -t eth0 (PASS) 3. dig (says NOERROR) Any suggestions on what the problem could be and how/if I might be able to fix it?


title: Restricting grep's --color option to the interactive shell

text: I have the following variable I want to set to make grep behave a certain way:               GREP_OPTIONS=--color=always      The problem is, I only want this environment variable to be set on the command line. I don't want this variable to be set when I run shell scripts. I have to export it (using 'export GREP_OPTIONS' in zsh) in order for grep to see it. However, that means that shell scripts will also 'inherit' this variable, which I don't want. How do I handle this situation? Using an alias has the same problem (the shell script executes the alias).


title: Is there a generic approach to automatically make some sysfs controls ch{own,mod} user-accessible?

text: My current primary question motivator:               $ ls -l /sys/devices/platform/samsung     total 0     -rw-r--r-- 1 root root 4096 27. jaan  14:17 battery_life_extender     drwxr-xr-x 3 root root    0 19. jaan  18:40 leds     -r--r--r-- 1 root root 4096 26. jaan  23:37 modalias     -rw-r--r-- 1 root root 4096 27. jaan  12:57 performance_level     drwxr-xr-x 2 root root    0 24. jaan  00:35 power     drwxr-xr-x 4 root root    0 19. jaan  18:40 rfkill     lrwxrwxrwx 1 root root    0 27. jaan  13:03 subsystem -> ../../../bus/platform     -rw-r--r-- 1 root root 4096 27. jaan  13:03 uevent     -rw-r--r-- 1 root root 4096 26. jaan  23:37 usb_charge      I'd like to modify these without sudo. During a desktop session that. Privileged startup script is perfectly OK. It's feeling like the solution is to have some sort of generic insmod parameters?


title: How to correctly set up the right GRUB 2 default menu entry?

text: I'm running GRUB 2.00 on a Gentoo Linux system. I compile my own kernels manually, and then I install them in `/boot` with `make install`. I have the following kernels in `/boot` at the moment:               # ls -1 /boot/vmlinuz*     /boot/vmlinuz-3.7.4-gentoo-5     /boot/vmlinuz-3.7.4-gentoo-first     /boot/vmlinuz-3.7.4-gentoo-fourth     /boot/vmlinuz-3.7.4-gentoo-third      Running `grub2-mkconfig` results in the following output:               # grub2-mkconfig -o /boot/grub2/grub.cfg     Generating grub.cfg ...     Found linux image: /boot/vmlinuz-3.7.4-gentoo-third     Found linux image: /boot/vmlinuz-3.7.4-gentoo-fourth     Found linux image: /boot/vmlinuz-3.7.4-gentoo-first     Found linux image: /boot/vmlinuz-3.7.4-gentoo-5     done      If I now read the resulting `/boot/grub2/grub.cfg` file, I notice that the following entries have been created:   * A main default entry which starts `vmlinuz-3.7.4-gentoo-third`   * A submenu with the all the other entries (including recovery ones), in the same order as the `grub2-mkconfig` command The problem is that at boot time I'd like to load by default the fifth revision of my kernel (`vmlinuz-3.7.4-gentoo-5`), not the third one (`vmlinuz-3.7.4-gentoo-third`). I also prefer not to access the submenu for choosing the right kernel to load. How can I change this behaviour? How can I tell GRUB that I want to run the fifth revision of my kernel by default and not the older third revision? In general, how can I change the default entry line to match the kernel I want and not a seemingly random one picked by GRUB? I also tried putting the following lines in `/etc/default/grub`:               GRUB_DEFAULT=saved     GRUB_SAVEDEFAULT=true      This doesn't fix the problem the way I desire. But at least GRUB seems to remembers the latest kernel I booted from and automatically selects it from the submenu. It's just that I don't like to access the submenu.


title: Evolution: Scroll to bottom of inbox per default

text: I run Debian Wheezy with a Gnome 3 desktop. I migrated from Thunderbird to Evolution to manage my e-mails. I have my inbox configured to show the newest mails on the bottom. However, when Evolution starts it always shows me the top of the inbox (where my oldest e-mails are). How can I change this behavior so that Evolution automatically scrolls to the bottom of my inbox? P.S.: I wouldn't mind to "flip" the inbox, so that the newest mails are on top. However with "stacked conversations" this is very confusing in Evolution, as the newest mail of each stack is on the bottom of the stack, but newer stacks are above older stacks...


title: Reinstall software without re-downloading from software center?

text: Forgive me if this is an extremely noob question, I am new to Linux. I have installed FlightGear, a flight simulator. Some of the game's main files have been tampered with by a third-party app and the game no longer works. It's a very big download and as I'm on a very limited bandwidth connection, I would like to know if there is a way to re-install the game from the installation files that Elementary OS's Software Center originally downloaded - instead of having to uninstall it and then re-download and re-install it all over again?


title: creating virtual interface for remote network interface

text: I have to create virtual interface for control plane algorithms for layer 2 protocol algos..... Scenarios is somewhat like this.... Control plane will be executing on Centralised card executing Control Plane logic..... Data plane will be part of line cards executing fast path switching and routing....... My requirement is I have to create virtual interfaces at Control plane which should map to actual interface on Line cards. Can I use TAP for this..........??


title: Libre Coreboot payloads?

text: If one wishes to build an x86 server or workstation that is as de-blobbed and libre as possible, then the best one can do at this time is to use one of the fully free GNU/Linux distributions (gNewSense, Trisquel, etc) for the operating system and Coreboot for the BIOS firmware. Or so I thought until I read this remark: > At this point, the Google Chromebooks are the only commercially available > computers shipping Coreboot by default (although blobbed, because Intel > doesn't want to release source code for their microcodes). This is not > ideal, I know, but there isn't better alternative if you want to use recent > hardware (maybe we should crowdfund a Coreboot-libre spin off, that will > focus primarily on providing fully libre BIOS images for Chromebook devices, > like Replicant). So apparently, just as there are non-fully free GNU/Linux distributions, there apparently are non-fully free Coreboot payloads. I should at this point admit that my understanding of Coreboot is minimal. I would like to know:   1. When choosing a motherboard, how can I find out which payload(s) are compatible (or vice versa)?   2. Having done this, how can I tell which payloads are entirely libre?   3. Have I have got hold of the wrong end of a stick anywhere in the foregoing?


title: How to create a function to fill the region to a certain width?

text: Sometimes I justify text in emacs using `C-u 70 M-x fill-region`. I would like to have a function in my `.emacs` file that has a parameter so that I can use a shortcut to call the function instead of having to do `C-u 70 fill-region`. I would have 2 shortcuts, one uses the default 70 and another asks for a parameter. I'm very new to emacs programming but I've been using emacs for a while now. If there is a solution for this, could you please explain how to do it?


title: Cyborg RAT mouse with xserver

text: I got a cyborg RAT3 mouse. This mouse got some problem to work on linux. I'm under lubuntu 12.10. I have searched some solutions on google. I have done this : I created /etc/X11/Xmodmap file, and I put this line on the file.               pointer = 1 2 3 4 5 6 7 8 9 10 11 12 0 0 0 0 0 0 0 0 0      Its actually kind of working. I just have a problem. When I boot my computer, its not working, I have to reload XServer, and then, my mouse works really fine. So I got two questions. 1- How can I do to avoid reload XServer on every boot ? 2- The shortcut Alt + Print Screen Sys + K does'nt work. How can I activate this shortcut ? Thank you,


title: monitor running services and ports

text: What is the best way to monitor running services and ports on a system with `systemd`? My intent is to alert me, when a service stops running or if a new service is listening on a new port (possibly a security breach). Currently, I have a script that uses `netstat` to see the open ports and compares it with what is expected.   * Is there some sort of utility I should be using?   * Also, can `systemd` alert me or again, should I just my my script that will be executed via cron? I have `munin` installed and it does monitor things, but as for alerts, I don't see it having the capability as I describe.


title: dansguardian not using syslog

text: I configured dansguardian to use `syslog`, but I still see files in `/var/log/dansguardian` getting populated. I saw there was a bug for Fedora 12, I am using Fedora 20. Is this a known issue or is it a configuration issue? I have `syslog = on` in my configuration file.


title: Can rsync resume after being interrupted?

text: I used `rsync` to copy a large number of files, but my OS (Ubuntu) restarted unexpectedly. After reboot, I ran `rsync` again, but from the output on the terminal, I found that `rsync` still copied those already copied before. But I heard that `rsync` is able to find differences between source and destination, and therefore to just copy the differences. So I wonder in my case if `rsync` can resume what was left last time?


title: Why does to order of the parameters affect the files found by `find`?

text: I found this weird behavior in `find`. Depending on the order of the parameters to `find` it finds different files. For example, I have a directory tree with the following content.               .     ├── configure.ac     ├── Makefile.am     └── src         ├── hello.c         └── Makefile.am      if I run               find -name '*.cpp' -o -name '*.[chS]' -print0 | xargs -0 echo      It lists               ./src/hello.c      And if I run               find -name '*.[chS]' -o -name '*.cpp' -print0 | xargs -0 echo      It doesn't list anything. Notice that the only thing I changed is the order of the file name. Can anyone explain why the second command doesn't list any files?


title: Why isn't this crontab job running

text: I have a cron job that runs every minute on an Ubuntu 12.04 box               $sudo crontab -e     * * * * * mylogin /pathto/file.sh > /log/filelog      If I run `file.sh`, the bash script does some stuff and echos out `runs`:               $ ./file.sh      runs      If I check the log of cron tab it shows that the job is running:               Jul 10 12:41:01 localhost CRON[1811]: (root) CMD (mylogin /pathto/file.sh > /log/filelog)     Jul 10 12:41:01 localhost CRON[1810]: (CRON) info (No MTA installed, discarding output)     Jul 10 12:42:01 localhost CRON[1813]: (root) CMD (mylogin /pathto/file.sh > /log/filelog)      However, the script is not running. It is not doing it's work and not echoing `runs` to `/log/filelog`.               $cat /log/filelog  #shows nothing      What other steps can I take to debug this problem?


title: remove unallocated space from a partition image

text: I have just created an image of an sd card using dd and the image is compressing down less than expected. I suspect this is because the card had not been zeroed out before I started to make the image. Is there a way to clear out "junk" stored on an image without having to start from scratch?