title: RAID disk lost in just one machine

text: I have a Blade Center H and a DS4700 SAN. Today we detected one problem in the mail service in one of the blades. It can't see a particular volume available in the SAN. All other blades can see SAN disks from `sdb` to `sdj` , but this one sees only `sdb` to `sdi`. The volume that is `sdd` in all other blades is lost in this one and replaced by the next one. I can mount `sdd1` in every other blade, so `sdd1` is working and has content. All servers are running CentOS 5.8. I'm totally lost here. What thing can hide a disk from that system? **Edit: More info:** The HBAs are Emulex:               > lspci | grep -i emulex     03:05.0 Fibre Channel: Emulex Corporation Helios-X LightPulse Fibre Channel Host Adapter (rev 01)     03:05.1 Fibre Channel: Emulex Corporation Helios-X LightPulse Fibre Channel Host Adapter (rev 01)      The switch is an IBM TotalStorage SAN 16B-2. It was configured by the IBM personnel and it hasn't been touched by me. The multipath is managed by the Linux RDAC multipath drivers for IBM SystemStorage provided by IBM personnel during the original installation.               > lsmod|egrep 'mpp|lpfc'     mppVhba               165888  11      lpfc                  515109  18      scsi_transport_fc      83145  1 lpfc     mppUpper              165532  1 mppVhba     scsi_mod              199001  18         be2iscsi,ib_iser,iscsi_tcp,bnx2i,cxgb3i,libiscsi2,scsi_transport_iscsi2,scsi_dh,mppVhba,usb_storage,lpfc,scsi_transport_fc,mptsas,mptscsih,scsi_transport_sas,mppUpper,sg,sd_mod      This is /proc/scsi               > ls /proc/scsi/     device_info  mpp/  mptsas/  scsi  sg/          > ls /proc/scsi/mpp/     3      In some machines there is a /proc/scsi/lpfc folder too.


title: Does anyone still use MINIX?

text: I was just curious if anyone still use MINIX and for what purposes. I found this article but it doesn't go in detail about who uses it and for what. Thanks


title: How can I take a screenshot in LXDE using scrot and the Print Screen button on my keyboard?

text: I have already installed scrot following the instructions here. The Windows Manager appears to be Openbox.


title: how to ensure stable domain names for newly-provisioned cloud server instances?

text: I've been playing with server configuration management tool Ansible, whose use often depends on reference to a local inventory file containing arbitrary host names. For example,               # file: my_hosts     [webservers]     web1     web2      Using something like the above, I can do a lot: I can spin up new instances and configure them. However, unless I write the ip's of the newly-created instances to /etc/hosts or similar, I cannot reference new instances solely relying on something like `my_hosts`. Is there a way I can supply stable names in `my_hosts` \-- maybe some dynamic DNS service -- such that I can just name my new servers in advance, and subsequently enjoy direct reference to them? In other words, on the assumption that one is indifferent to the public names of servers that may be created or deleted quite often, what's the best way to refer to them while they live?


title: How do you dual boot Debian and FreeBSD using GRUB2?

text: I've been trying to install FreeBSD alongside my Debian installation in a single partition. All examples readily present on the Internet had shortcomings:   1. Some required chainloading the FreeBSD chainloader in ways GRUB2 refused to accept with "invalid signature".   2. Some assume you've installed FreeBSD inside a BSD disklabel.   3. None of the solutions (including loading /boot/loader) boot after changing the order of the devices or moving them from server to server.   4. None of the solutions work on Debian: The naming of the GRUB2 options on Debian seems to be different from e.g. Ubuntu. So how do I dual boot Debian and FreeBSD in the most reliable way?


title: SSH login as root fails, but I'm sure I entered the right password

text: What am I missing? I change the root password on a unix machine, then try to log in with that password. `PasswordAuthentication` is set to `yes` in `sshd_config` and the `sshd` daemon has been restarted. This behavior happens whether I log in remotely or locally:               root@ip-10-0-0-155:~# passwd     Enter new UNIX password:      Retype new UNIX password:      passwd: password updated successfully     root@ip-10-0-0-155:~# ssh root@127.0.0.1     root@127.0.0.1's password:      Permission denied, please try again.     root@127.0.0.1's password:


title: Change the default shell to Python

text: If I changed my default shell from BASH to Python3 or IPython, would my Linux system have issues or produce errors?


title: ANDed conditional using regexp and variables

text: I want to test whether a line, read in from a file, has a specific beginning AND an ending containing a word held in a variable. Here's some code: The input file is:               line one     #; line two     #; line three blah     line four      A minimal script, which fails, is:               declare ENDOFLINE= "blah"     exec 3< "inputfile"          while read LINE <&3     do         if [[ ("$LINE" =~ "^#;") && (( ("$LINE" =~ "${ENDOFLINE%$}") )) ]];          then         echo score!         else echo no score         fi     done      But, if I do:               if [[ ("$LINE" =~ "^#;") && (( ("$LINE" =~ "blah$") )) ]];      it succeeds in identifying the correct line (=> #; line three blah). In other words, I need a compound test condition where the first test is whether the beginning of the line is '#;' and the end of the line is a string contained in the variable $ENDOFLINE . Thanks for any help.


title: Convert csv to HTML table

text:
I have a `Medical.csv` file with rows of following format,                   field: 'participation.type', displayName: 'program_type', type: 'String',path:'participation'         field: 'participation.program', displayName: 'program_name', type: 'String',path:'participation'      I want to write a **bash script** to convert it to HTML table with `field`, `displayName` and `type` as headers dynamically. The `Csv2HtmlConverter.sh` (Inspired by answer at Convert csv to html table using) is                   echo "
" ;         while read INPUT ; do                 echo "
${INPUT//,/	}
" ;         done < Medical.csv ;         echo "
"      The result for above script is as below which is fine to some extent but I want to add `<th>field</th>`, `<th>displayName</th>` dynamically.

field: 'participation.type'	 displayName: 'program_type'	 type: 'String'	path:'participation'

field: 'participation.program'	 displayName: 'program_name'	 type: 'String'	path:'participation'


title: Remove only unused dependencies using Synaptic

text: As all distros, install much unused software, so does PCLinuxOS. But when I am trying to remove this software using Synaptic, it marks the dependencies as "to be removed" too. The problem is that those dependencies are in use from other pieces of software. For example I want to remove KDE's Dragon player and when I mark it for removal, it marks kde-multimedia, too. But this is something used from other applications, like Juk media player. Am I wrong? How to overcome this?


title: Why does the rc.status file set the LC_ALL locale

text: I am currently creating a daemon service and in order to leverage existing service functionality, the startup script sources from /etc/status. This causes a problem with our service because within the first line, the locale is set to POSIX:               # Do _not_ be fooled by non POSIX locale     LC_ALL=POSIX     export LC_ALL      The problem is that the services which gets started from the script inherit this locale setting. The simple fix around this would be to unset the locale prior to starting the child process. However, I do not know the implications of this. What are the consequences of re-setting the LC_ALL variable after sourcing from rc.status?


title: Is floating-point arithmetic distro dependant?

text: I came across an article in Ars Technica about Raspbian that said the primary interest of the developers of it was that they wanted an OS with fully optimized for its floating-point unit, and since Fedora didn't have it they ported Debian to the Raspberry Pi. How can you tell that a distro is suited (or not) for floating-point arithmetic?


title: set command with -- flag

text: I have a file (called text) that contains two fields of strings (separated by space) like what follows:               1.2.3  version1      When I use set command as follows, I have the first field in the $1 and the second field in $2. Can someone explain what this command does? In particular what < does? Is this an input redirection?               set -- $(<text)


title: amixer - How to change recording channel?

text: So fat, I am setting up microphone settings :               $ amixer set 'Rear Mic' 90% mute cap     $ amixer set 'Rear Mic Boost' 80%      But, after some sys. update, my default recoding chanell changed to `'Front Mic'` :               $ amixer sget 'Input Source'     Simple mixer control 'Input Source',0       Capabilities: cenum       Items: 'Front Mic' 'Rear Mic' 'Line' 'CD' 'Mix'       Item0: 'Front Mic'      How to change `'Input Source'` to `'Read Mic'` with amixer ? (Currently I do it manually with alsamixer or kmix - I would love to automatize it on startup).


title: I have installed Linux distribution. Do I need to set root account or the user account is enough?

text: I have these credentials that I am using for logging in with my Linux distribution (Ubuntu 13.04) when starting the computer:               james     myawesomepassword123      I type the password on the login screen and I am in the desktop. Then also when I am installing something from ubuntu center I need to type this password (or when performing something using `sudo` etc. My question is: **Am I giving the program and installation root access by providing my password associated with my account?** I mean if I should set some root name and password to protect my Linux from malware etc.


title: Is it safe to run everything from VirtualBox?

text: E.g. I install Ubuntu as my main system without anything else but VirtualBox and maybe some programs that need to be installed to run VirtualBox. Then I install within VirtualBox Windows 7 (because I need to run a custom program from my comapny that is exclusively for Win) and maybe another Ubuntu or some other Linux distro for my daily stuff (browsing the web, testing some "untrusted" linux apps, downloading stuff via torrents etc.). The question is, am I safe when I run apps/browser within my VirtualBox or do some viruses/malware/spyware exist that can access my main Ubuntu system from Windows 7 or the other linux distro that runs inside VirtualBox?


title: Scientific-Linux: which version has bigger support date?

text: We have several Desktop PCs that have Fedora 14 installed, but we need a Linux distro that doesn't need a reinstall every half year (no, dist-upgrade is not an option). We found Scientific-Linux, and according to the roadmap we have two options:   1. We install 6.1 with GNOME, and use it for desktop purposes, we will have updates until 2017-11-11 -- more then 6 years!   2. We install the "rolling release". I haven't used any "rolling release" based Linux distros, so I don't know what that exactly means. Does it mean that if I install it once, we never need to re-install again because of a version upgrade? For example, Scientific-Linux 7 comes out, and I don't need to do a dist-upgrade?


title: How to dual boot Xubuntu with Windows 7 & 8 from separate drives

text: I had Windows 7 and 8 on a hard drive, then I decided to try Xubuntu, and installed it on a _separate hard drive._ Then I tried using EasyBCD, but Windows doesn't recognize Linux partitions. Additionally I removed the drive with Windows while installing Xubuntu, just in case... So, how can I add it to the boot list?


title: How can I determine which commands are installed by default on Ubuntu, CentOS and Red Hat?

text: I was surprised to discover that curl didn't come bundled as part of Ubuntu. Is there a canonical list of included ~~components~~ Linux commands that I can check for these three operating systems?


title: AIX HMC - how to increase the memory on the fly?

text: How can I increase the memory on the fly with the hardware management console on AIX 5 & 6?


title: I can't figure out how to install Firestarter Fedora

text: I am feeling stupid. I have been searching for 3 hours with no success. I installed Fedora 14 and tried to do `yum install firestarter` but the package was not found. I also tried from a GUI and found nothing. It is at fedoras repository? Maybe I should configure the repository, but all I found are dated. Any help? Thank you.


title: How to know ip camera address

text: I have ip camera with static ip address preset. How can I know it ip using linux? I connect camera direct to my notebook. My system is   `Linux machine 3.5.7-gentoo #2 SMP` `ifconfig eth0   eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500   inet6 fe80::21e:ecff:fe18:854f prefixlen 64 scopeid 0x20<link>   ether 00:1e:ec:18:85:4f txqueuelen 1000 (Ethernet)   RX packets 35839 bytes 2150340 (2.0 MiB)   RX errors 0 dropped 0 overruns 0 frame 0   TX packets 1084 bytes 145354 (141.9 KiB)   TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0`


title: touchpad's click isn't working on Arch installation with Gnome

text: The touchpad's click isn't working(doesn't click when tapped) on my Arch installation with Gnome; I've already installed `xf86-input-synaptics`. Does anyone know how to fix this?


title: Installing php phalcon extension

text: I am unable to install phalcon php extension by folowing these steps. I use 64-bit Linux Mint 14 Nadia. http://docs.phalconphp.com/en/latest/reference/install.html#linux-solaris-mac For the Prerequisite packages I use: http://www.howtogeek.com/howto/ubuntu/installing-php5-and-apache-on-ubuntu/ https://help.ubuntu.com/community/InstallingCompilers Git is working fine. I really follow steps straight forward, once I am finish I edit /etc/php5/cli/php.ini ny adding `extension=phalcon.so` just before module settings section. Then i restart apache with command `sudo service apache2 restart` After installing phalcon dev tools and running command               phalcon create-project proj_name      it reports > phalcon: command not found I have tried the same steps with installing xammp, I did not have luck also. Am I doing something wrong in the process?


title: Kerberos Forwarding in SSSD

text: So, I'm trying to set up forwarding with Kerberos and seem to have some problems. On some of my servers I'm able to forward after receiving a ticket; however, some I'm not. My system setup is a mixture of CentOS 5 and OpenSuSE 13.1. Some of these machines use sssd and some use /etc/krb5.conf. In all of the sshd_confs I've enabled the following options:               # Kerberos options     KerberosAuthentication yes     KerberosOrLocalPasswd yes     KerberosTicketCleanup yes     #KerberosGetAFSToken yes #Not always supported          # GSSAPI options     GSSAPIAuthentication yes     GSSAPICleanupCredentials yes      I think this may be a pam\sssd problem, but let me put the following diagram to try and clear everything up               ----------------   ssh -K  ------------------     | OpenSuSE 13.1 | -------> | CentOS 5       |     | sssd          |          | /etc/krb5.conf |     -----------------\         | kdc server     |                       ssh -K   ------------------                         \            ^  |                          \           |  v                            - > ------------------                                | CentOS 5       |                                | /etc/krb5.conf |                                | kdc server     |                                ------------------      To understand this, if there is an arrow, then that means I can log in without entering another password. So, between the two kdc servers I can log in without a password. From the OpenSuSE box, I have to specify the `-K` option when performing ssh; however, I am not able to get back from CentOS to OpenSuSE, even when at the console. What I want is to be able to go from any machine to any other, using my ticket, and without having to do the `-K` option for SSH. Any ideas?


title: Replacing missing value blank space with zero

text: I have input.txt tab-delimited text file around 30K lines, I would like to check each row (s1..s30K lines) for missing value (i.e blank space) and fill the missing value with zero value.See out.txt input.txt                id  no1  no2  no3  no4      s1  23   34   45   12      s2       4    4            s3  4         8    0      out.txt               id  no1  no2  no3  no4     s1  23   34   45   12     s2  0     4    4    0       s3  4     0    8    0


title: Where do I find the OID descriptions for SNMPv2 in Linux?

text: I was looking at this link here: http://www.debianadmin.com/linux-snmp-oids- for-cpumemory-and-disk-statistics.html and noticed that the OIDs are the same ones I see for the same stats for our appliance. Is this some kind of standard with SNMP maybe an RFC or something? Does anyone know where I can find the list that tells me what each OID describes?


title: Option "X Conformance Test Compatibility" for Hummingbird Exceed also available for Xming?

text: We are using Hummingbird Exceed (Version 11.0.0.21) so that our users can run a proprietary Solaris 10 X-Application (named Shipplan) on their PC. To make that work we have to enable the "X Conformance Test Compatibility" option in Exceed (`XConfig`). Now we want to migrate to `Xming` (Version 7.5.0.17). Does anybody know if there is a similar option in `Xming`? The problem is, that without this option the graphical output is not being refreshed as designated. To enable the `Xtest` extension in `Xming` is not sufficient.


title: *nix whose package manager DOES NOT split Python into multiple packages

text: Is there a *nix whose package manager _doesn't_ split Python into multiple packages (typically something like `python` and `python-devel`). I'd really like to just get the entire standard library when I install it, since that's how it's designed to work. Thanks. UPDATE: Some people are wondering what I mean, so here's an example: https://bugs.launchpad.net/ubuntu/+source/python-defaults/+bug/123755. I realize it's not caused (in this instance) by a `python`/`python-devel` split, but it's the sort of issue I don't want to worry about. I just want to install the entirety of Python—with no weird tweaks of the `ImportError` handler, or std lib modules ripped out (for any reason)—and then let my package manager handle security updates, etc.


title: cannot start network service in Fedora15?

text: I am pretty new to Linux operating system.I googled the error but did not find any solution to my problem. I am using Fedora15. Any pointers would be appreciated.Thanks               service network start          > Starting network (via systemctl): Job failed. See system logs and     > 'systemctl status' for details. [FAILED]          The log says     [root@Fedora15 sysconfig]# tail -f /var/log/messages     Oct 31 09:50:24 Fedora15 kernel: [ 7550.107576] userif-3: sent link up event.     Oct 31 09:50:24 Fedora15 kernel: [ 7550.988110] device p2p1 entered promiscuous mode     Oct 31 09:50:24 Fedora15 kernel: [ 7550.988148] bridge-p2p1: enabled promiscuous mode     Oct 31 09:50:24 Fedora15 vmnetBridge: Started bridge p2p1 to virtual network 0.     Oct 31 09:50:24 Fedora15 NetworkManager[6940]: <info> Policy set 'p2p1' (p2p1) as default for IPv4 routing and DNS.     Oct 31 09:50:24 Fedora15 NetworkManager[6940]: <info> Activation (p2p1) successful, device activated.     Oct 31 09:50:24 Fedora15 NetworkManager[6940]: <info> Activation (p2p1) Stage 5 of 5 (IP Configure Commit) complete.     Oct 31 09:50:24 Fedora15 systemd[1]: network.service: control process exited, code=exited status=1     Oct 31 09:50:24 Fedora15 systemd[1]: Unit network.service entered failed state.     Oct 31 09:50:24 Fedora15 kernel: [ 7551.188136] userif-3: sent link down event.


title: How to change the order of the network cards (eth1 <-> eth0) on linux

text: Is there any way to swap network interfaces ( _eth1_ <-> _eth0_ ) after system installation. My brand new Debian 6.0 install assigned PCI network card as " _eth0_ " and motherboards integrated network device as " _eth1_ " by default. The problem is I want to use the integrated device as default ( _eth0_ ) network interface. I already edited : > **/etc/udev/rules.d/70-persistent-net.rules** to swap the names and everything seems to be ok and network is working but programs are still trying to use the PCI network card (which is now " _eth1_ ") as the default interface. For example _iftop_ now tries to use " _eth1_ " as default device as it used " _eth0_ " before the swap. Is this purely a software problem as the applications are trying to use the first found device as a default device despite their interface naming or is there any way to fix this by configuring OS? * * * _edit:_ I wrote a small app to print out iflist and the PCI device ( _eth1_ ) came up before " _eth0_ ". Any ideas how to swap the device order. * * * _edit:_ I found a **thread** about the same problem and I tried everything they suggested and none of the solutions are working except for swapping the names "virtually".


title: Does free() unmap the memory of a process?

text: I am running a C program on Linux 2.6.16 kernel. I do not think there are memory leaks in my program however the memory consumption for the program remains stable after certain operations and does not decrease. I use the 'ps v ' command to monitor the RSS value of my program. The valgrind massif tool shows a large portion of heap is allocated by mmap in my process. But according to the code those allocations should have been freed after the operations are done. Is it because the freed memory is still mapped and/or still contributes to the RSS value of the process? Any insight will be very appreciated! Below is the snip from the valgrind massif report. Note I have turned on the --pages-as-heap option for the massif tool to measure all memories used by the program.               --------------------------------------------------------------------------------       n        time(i)         total(B)   useful-heap(B) extra-heap(B)    stacks(B)     --------------------------------------------------------------------------------      85 701,483,989,262      173,576,192      173,576,192             0            0      86 704,352,949,469      173,367,296      173,367,296             0            0      87 707,582,275,643      173,367,296      173,367,296             0            0      88 710,536,145,814      173,367,296      173,367,296             0            0     100.00% (173,367,296B) (page allocation syscalls) mmap/mremap/brk, --alloc-fns, etc.     ->53.40% (92,581,888B) 0x649248B: mmap (in /lib64/tls/libc.so.6)     | ->41.13% (71,303,168B) 0x6446D85: _int_malloc (in /lib64/tls/libc.so.6)     | | ->39.31% (68,157,440B) 0x6448D62: calloc (in /lib64/tls/libc.so.6)     ......[my own functions are omitted]     ->35.28% (61,157,376B) 0x400F51B: mmap (in /lib64/ld-2.3.3.so)     | ->28.81% (49,954,816B) 0x4004CE8: _dl_map_object_from_fd (in /lib64/ld-2.3.3.so)     | | ->28.81% (49,954,816B) 0x400636B: _dl_map_object (in /lib64/ld-2.3.3.so)     | |   ->18.89% (32,755,712B) 0x400AB42: openaux (in /lib64/ld-2.3.3.so)     | |   | ->18.89% (32,755,712B) 0x400AF7C: _dl_catch_error (in /lib64/ld-2.3.3.so)     | |   |   ->18.89% (32,755,712B) 0x4009FCF: _dl_map_object_deps (in /lib64/ld-2.3.3.so)     | |   |     ->18.89% (32,755,712B) 0x40021FD: dl_main (in /lib64/ld-2.3.3.so)     | |   |       ->18.89% (32,755,712B) 0x400E7F6: _dl_sysdep_start (in /lib64/ld-2.3.3.so)     | |   |         ->18.89% (32,755,712B) 0x4001477: _dl_start (in /lib64/ld-2.3.3.so)     | |   |           ->18.89% (32,755,712B) 0x4000CF6: ??? (in /lib64/ld-2.3.3.so)     | |   |             ->18.89% (32,755,712B) 0x0: ???     | |   |               ->18.89% (32,755,712B) 0x7FF0003D5: ???     | |   |                 ->18.89% (32,755,712B) 0x7FF0003E4: ???     | |   |     ......


title: What is the GNU/Linux equivalent of BSD's "route get ..."?

text: The BSD `route` command has a feature that will show what route will be selected for a given host. For example:               /Users/mhaase $ route get google.com        route to: iad23s07-in-f8.1e100.net     destination: iad23s07-in-f8.1e100.net         gateway: 10.36.13.1       interface: en0           flags: <UP,GATEWAY,HOST,DONE,WASCLONED,IFSCOPE,IFREF>      recvpipe  sendpipe  ssthresh  rtt,msec    rttvar  hopcount      mtu     expire            0         0         0         0         0         0      1500         0       I occasionally find this useful if I am manually messing with routing tables to make sure that the routing rules are working as expected. The GNU version of route does not have this same "get" subcommand. Is there some equivalent or alternative for GNU/Linux?


title: How can I automatically run a script inside screen if the script is not in $PATH

text: I have a scenario where I need to cd into a directory before running a script:               cd repos; python script.py      But it should be setup such that it automatically runs when screen is started. So in `.screenrc` I have this:               screen -t "cd repos; python script.py"      except this doesn't work because the `cd repos` is wrong. How do I cd into this directory?


title: Saving tab completion possibilities to a file

text: Instead of displaying all possibilities on terminal screen, as in:               $ ls /etc/<TAB>     Display all 230 possibilities? (y or n)      I want to save all possibilities to a file. `ls /etc/ > file.txt` will not always work. apt-get is an example:               $ apt-get <TAB>     autoclean        check            install          update     autoremove       clean            purge            upgrade     build-dep        dist-upgrade     remove                changelog        dselect-upgrade  source                 I'm looking for a command like `tabcompletions 'ls /etc/'` which outputs all possibilities, so that I can run a command like the one below, which compares the tab completion possibilities for two commands:               diff <(tabcompletions 'ls ') <(tabcompletions 'cd ')      Is that possible?


title: What would be the RHEL package corresponding to build-essential in Ubuntu?

text: I know how to list available packages from the repos and so on, but how can I find a list that matches up equivalent meta-packages, such as the `build- essential`. Is there such a thing and if not what would be a sensible approach to find such close/similar matches?


title: Is there a way to execute a command when a user logs off from X?

text: I am trying to execute two commands one on logon and one on logoff. For the log on one, I put my script into `/etc/X11/xinit/xinitrc.d` and this works. I'd like it to be system-wide so I can use any WM.


title: What is keeping Wayland from overthrowing X in Linux?

text: Everyone agrees that Wayland is better than X11 for your usual desktop. Why is X then used by every major distro then? Is it bugs, little compability from apps (is that even an issue?) or something else?


title: Pidgin won't connect to MSN, claims "Invalid response"

text: I'm using Pidgin on Debian Wheezy, Debian's package version 2.10.6-3. A few days ago I started getting sign-in errors on MSN; specifically, Pidgin complains about _Windows Live ID authentication:Invalid response_. Looking at the Pidgin web site, there is a newer version 2.10.7 specifically to fix signin errors with MSN. Unfortunately Debian hasn't packaged such a version for Wheezy yet (it's in Jessie and Sid, though), and I really only need the certificates (the security fixes listed on the front page don't apply in my situation). I tried going into Tools -> Certificates and delete all SSL certificates that had `live`, `passport` or `msn` in their host names, and when I reconnect after that it installs certificates for `local-bay.contacts.msn.com` and `login.live.com`, but I am still getting the exact same error. While waiting and hoping for Debian to package an upgrade, _is it possible to use the certificates packaged with Pidgin 2.10.7 (either the official source code or the Debian package from Jessie or Sid) with the 2.10.6-3 build as distributed in Wheezy? If so, how?_ It is OK if this might break on a reinstall of the Wheezy build of Pidgin, because by the time that comes up hopefully the version that would be installed is fixed anyway. **Edit** I downloaded and installed Pidgin 2.10.7-2 (specifically the pidgin, pidgin-data, libpurple0 and libpurple-bin packages) from Jessie, confirmed that I am running those (through dpkg and Pidgin's About dialog), deleted the Live and MSN certificates and reconnected, but I am still getting the same error.


title: Is there a command for switch to vicmd mode in zsh?

text: I have mapped alt-k and alt-j for browsing history, but I would like to switch vicmd automatically whenever I call up a history entry, because most of the time I need to move the cursor to a certain position and make some changes. Here is my current settings in .zshrc, what should I do to reach the goal mentioned above?                   bindkey '^[k' up-line-or-history         bindkey '^[j' down-line-or-history      Thanks!


title: Mutt new e-mail notifications in tmux window

text: I am on `tmux`, with `mutt` in an inactive window. If IMAP flags change on a message through external means, I see the visual bell and the status bar changes, drawing my attention to the e-mail client. That works well. What I would like to do but still can't get to work is:   * Get a proper notification about incoming e-mail whilst in another tmux window   * Never get notifications later than 5 minutes from their arrival, possibly fine-tuning this interval I use Gmail over IMAPS.


title: Simple python web server doesn't execute CGI scripts

text: I set up a simple python web server by opening a terminal in a directory and doing               python -m CGIHTTPServer      There is a CGI script in the directory but when I type into the browser               localhost:8000/script.cgi      The CGI script is not executed but is downloaded instead. I chmod'ed the script to 755 but still the same. What am I doing wrong?


title: Permissions by path instead of file mode bits

text: I often find that the unix way of handling file permissions is powerful, particularly when combined with ACLs, but rather difficult to handle. Setting file modes, group ownership and extended attributes correctly for every created file can quickly become tedious. **Is there any approach out there which replaces this concept** (probably per mount) **with something simpler, where files inherit permissions from their containing directories by default?** I know this would probably violate a number of POSIX expectations, but on the other hand, thungs like quiet vfat mouts already disregard mode and several permission changes, so that shouldn't prevent new ideas from being developed. To give an example, I'm looking for something where I can be sure that as long as a user drops his file inside a certain directory, it will be writable and deletable by a given group, and readable only by the rest of the world, no matter the user's umask and current group. Reasons why what I know so far doesn't seem sufficient:   * **Permissive file in restrictive dir:** Changing the umask to 0777 and the mode of a directory to 0770, one can grant read-write access within a group and lock out the rest of the world. The dir should also have to have the sgid bit set so its files get the correct group instead of the user's primary group. But an umask of 0777 has a risk of opening large holes in places not restricted in this fashion, and umask doesn't count for much if people start moving stuff around using e.g. mv.   * **ACL defaults:** Using setfacl one can set defaults for newly created files in a given directory. This is better than the above, but it only works for newly created files. Agin this won't work if people start moving files around, and again it won't work for cases where the umask is too restrictive.


title: Out of memory while using sed with multiline expressions on giant file

text: I am currently trying to remove all newlines that are not preceded by a closing parenthesis, so I came up with this expression:               sed -r -i -e ":a;N;$!ba;s/([^\)])\n/\1/g;d" reallyBigFile.log      It does the job on smaller files, but on this large file I am using (`3GB`), it works for a while then returns with an out of memory error:               sed: Couldn't re-allocate memory      Is there any way I could do this job without running into this issue. Using `sed` itself is not mandatory, I just want to get it done.


title: Should a VPN have access to all networks from and on all clients?

text: I have an OpenVPN server and many clients connecting. The VPN settings include               port 443     dev tun     proto tcp      When I add clients to my VPN I have to use apaches proxypass in order to access resources which are local to an individual client, but not to the VPN neetwork. For example: -Server is on 10.8.0.1 -Client is on 10.8.0.4 -Another client is on 10.8.0.7 Client **10.8.0.4** is on a work network aswell which can connect to internal url **10.82.54.11/internal_url** (as one of its network adapters is on subnet 10.82.54.0) . This client has an apache proxypass setup so when they are at home they can connect to **10.82.54.11/internal_url** by opening **10.8.0.4:84**. I have recently been told that ALL clients on a VPN should have access to ALL networks, is this correct (or even possible as would be very useful to me)? So essentially as long as the client **10.8.0.4** is connected to the VPN, from home he can still point a browser to **10.82.54.11/internal_url** . I have tried `dev tap0` for server and all clients (think i may need ethernet bridging on all too) but no joy. Please help


title: What should someone know about using Python scripts in the shell?

text: I'm wondering what should someone generally know about Python(the interpreter) when using it in the shell in Linux? This is what I have on _Gentoo_ :               # ls -al /usr/bin/python*; file /usr/bin/python; /usr/bin/python-wrapper --version     lrwxrwxrwx 1 root root    14 Dec 26 04:49 /usr/bin/python -> python-wrapper     lrwxrwxrwx 1 root root     9 Dec 26 04:51 /usr/bin/python2 -> python2.7     -rwxr-xr-x 1 root root  6144 Jan  8 21:22 /usr/bin/python2.7     -rwxr-xr-x 1 root root  1450 Jan  8 21:22 /usr/bin/python2.7-config     lrwxrwxrwx 1 root root     9 Dec 26 04:49 /usr/bin/python3 -> python3.3     -rwxr-xr-x 1 root root 10304 Jan 19 20:37 /usr/bin/python3.3     -rwxr-xr-x 1 root root  1753 Jan 19 20:37 /usr/bin/python3.3-config     -rwxr-xr-x 1 root root   217 Dec 26 04:49 /usr/bin/python-config     lrwxrwxrwx 1 root root    16 Jan  8 21:22 /usr/bin/python-config-2.7 -> python2.7-config     lrwxrwxrwx 1 root root    16 Jan 19 20:37 /usr/bin/python-config-3.3 -> python3.3-config     -rwxr-xr-x 1 root root 10384 Dec 26 05:24 /usr/bin/python-wrapper     /usr/bin/python: symbolic link to `python-wrapper'     Python 3.3.3      So in my case calling `python` launches version 3.3. On most of the distributions I used, there was more than one version installed. And the latest version isn't backward compatible, and some of its features were backported to the "old" one. I thought the two versions situation was something temporary? Now each time I need to run a Python script I try it with both Python versions just to make sure. Should I know anything else about using Python in the shell i.e. to run scripts; if so, what? Someone who makes a python script and uses `env python` in the first line, does he/she mean it should be compatible with both versions? What is the use for the python-wrapper in all that?


title: Message appears after every command completed

text: I am very new to Linux. Having said this, I had a friend go on my RHEL machine and he somehow added a few random lines in a file, which will post every time I have completed a command. I am not sure what file he added it to, but I'd like to remove these messages, so I don't have to see them any longer, as they appear every stinkin' time I finish a command.


title: cups - broken pipe

text: I just formatted my root partition and installed 12.3 (I kept my home partition as usual). I have a problem with my network printer hp laserjet 4015n. It used to work seemingslessly before. Now cups gives me a: Unable to write print data: broken pipe. I have tried restarting cups, even installing the x86 version, but I can't seem to fix the problem. I have tried different protocols to connect the printer, currently: socks://ip:9100 Any ideas on how to make this work?


title: How to decide what to mention in .spec file 'Requires: ' filed

text: I am new in building rpm package.For Creating RPM for my binary I have following dependancies:               [tejas@target]$ ldd exe         linux-vdso.so.1 =>  (0x00007fff85bff000)         libQtWebKit.so.4 => /opt/QtSDK/Desktop/Qt/4.8.0/gcc/lib/libQtWebKit.so.4 (0x00007f868c4e8000)         libphonon.so.4 => /opt/QtSDK/Desktop/Qt/4.8.0/gcc/lib/libphonon.so.4 (0x00007f868c288000)         libQtScript.so.4 => /opt/QtSDK/Desktop/Qt/4.8.0/gcc/lib/libQtScript.so.4 (0x00007f868bdd3000)         libQt3Support.so.4 => /opt/QtSDK/Desktop/Qt/4.8.0/gcc/lib/libQt3Support.so.4 (0x00007f868b8b5000)         libQtSql.so.4 => /opt/QtSDK/Desktop/Qt/4.8.0/gcc/lib/libQtSql.so.4 (0x00007f868b66f000)         libQtXml.so.4 => /opt/QtSDK/Desktop/Qt/4.8.0/gcc/lib/libQtXml.so.4 (0x00007f868b426000)         libQtGui.so.4 => /opt/QtSDK/Desktop/Qt/4.8.0/gcc/lib/libQtGui.so.4 (0x00007f868a6c7000)         libQtNetwork.so.4 => /opt/QtSDK/Desktop/Qt/4.8.0/gcc/lib/libQtNetwork.so.4 (0x00007f868a369000)         libQtCore.so.4 => /opt/QtSDK/Desktop/Qt/4.8.0/gcc/lib/libQtCore.so.4 (0x00007f8689e72000)         libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003cd2200000)         libqwt.so.6 => /usr/lib64/libqwt.so.6 (0x00007f8689b4e000)         libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x0000003cd8200000)         libm.so.6 => /lib64/libm.so.6 (0x0000003cd1a00000)         libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x0000003cd7e00000)         libc.so.6 => /lib64/libc.so.6 (0x0000003cd1600000)         libdl.so.2 => /lib64/libdl.so.2 (0x0000003cd1e00000)         libXrender.so.1 => /usr/lib64/libXrender.so.1 (0x000000373ba00000)         libgio-2.0.so.0 => /lib64/libgio-2.0.so.0 (0x00000030aa000000)         libgstapp-0.10.so.0 => /usr/lib64/libgstapp-0.10.so.0 (0x00000034f2e00000)         libgstinterfaces-0.10.so.0 => /usr/lib64/libgstinterfaces-0.10.so.0 (0x00000034f0e00000)         libgstpbutils-0.10.so.0 => /usr/lib64/libgstpbutils-0.10.so.0 (0x00000034f1a00000)         libgstvideo-0.10.so.0 => /usr/lib64/libgstvideo-0.10.so.0 (0x00000034f2200000)         libgstbase-0.10.so.0 => /usr/lib64/libgstbase-0.10.so.0 (0x00000034f1e00000)         libgstreamer-0.10.so.0 => /usr/lib64/libgstreamer-0.10.so.0 (0x00000034f1600000)         libgobject-2.0.so.0 => /lib64/libgobject-2.0.so.0 (0x00000030b1200000)         libgmodule-2.0.so.0 => /lib64/libgmodule-2.0.so.0 (0x00000030a9800000)         libxml2.so.2 => /usr/lib64/libxml2.so.2 (0x0000003cdba00000)         libgthread-2.0.so.0 => /lib64/libgthread-2.0.so.0 (0x00000030b4400000)         librt.so.1 => /lib64/librt.so.1 (0x0000003cd2a00000)         libglib-2.0.so.0 => /lib64/libglib-2.0.so.0 (0x00000030b0e00000)         libfontconfig.so.1 => /usr/lib64/libfontconfig.so.1 (0x0000003cd5e00000)         libfreetype.so.6 => /usr/lib64/libfreetype.so.6 (0x0000003cd5a00000)         libXext.so.6 => /usr/lib64/libXext.so.6 (0x000000373b600000)         libX11.so.6 => /usr/lib64/libX11.so.6 (0x0000003e83600000)         libQtDBus.so.4 => /opt/QtSDK/Desktop/Qt/4.8.0/gcc/lib/libQtDBus.so.4 (0x00007f86898c1000)         libpng12.so.0 => /usr/lib64/libpng12.so.0 (0x0000003cd5600000)         libz.so.1 => /lib64/libz.so.1 (0x0000003cd2600000)         libSM.so.6 => /usr/lib64/libSM.so.6 (0x000000373d200000)         libICE.so.6 => /usr/lib64/libICE.so.6 (0x0000003cdb200000)         /lib64/ld-linux-x86-64.so.2 (0x0000003cd1200000)         libQtSvg.so.4 => /opt/QtSDK/Desktop/Qt/4.8.0/gcc/lib/libQtSvg.so.4 (0x00007f8689662000)         libresolv.so.2 => /lib64/libresolv.so.2 (0x0000003cd3600000)         libselinux.so.1 => /lib64/libselinux.so.1 (0x0000003cd2e00000)         libexpat.so.1 => /lib64/libexpat.so.1 (0x0000003cd5200000)         libxcb.so.1 => /usr/lib64/libxcb.so.1 (0x0000003e82600000)         libuuid.so.1 => /lib64/libuuid.so.1 (0x0000003e83200000)         libXau.so.6 => /usr/lib64/libXau.so.6 (0x0000003e81e00000)      So I have checked from which rpm I can get those libraries by `rpm -qf <library path>` command.   eg:               [tejas@target]$ rpm -qf /lib64/libpthread.so.0     glibc-2.12-1.80.el6_3.5.x86_64      I have also checked which minimum version should be available for that library. So, accordingly I made spec file including all those packges. My .spec file is:               [tejas@target]$ cat /home/tejas/rpmbuild/SPECS/ModCMS-gdm.spec     Name:   ModCMS-gdm       Version:1.0      Release:1     Summary:gdm               Group:  ModCMS       License:WESEE        URL:    http://wesee.org         Source0:ModCMS-gdm-1.0.tar.gz             Requires:dbus-libs >= 1.2.24     Requires:expat >= 2.0.1     Requires:fontconfig >= 2.8.0     Requires:freetype >= 2.3.11     Requires:glib2 >= 2.22.5     Requires:glibc >= 2.12     Requires:keyutils-libs >= 1.4     Requires:krb5-libs >= 1.8.2     Requires:libasyncns >= 0.8     Requires:libcom_err >= 1.41.12     Requires:libgcc >= 4.4.4     Requires:libICE >= 1.0.6     Requires:libpng >= 1.2.44     Requires:libqwt6 = 6.0.1     Requires:libselinux >= 2.0.94     Requires:libSM >= 1.1.0     Requires:libsndfile >= 1.0.20     Requires:libstdc++ >= 4.4.4     Requires:libuuid >= 2.17.2     Requires:libXau >= 1.0.5     Requires:libxcb >= 1.5     Requires:libXcursor >= 1.1.10     Requires:libXext >= 1.1     Requires:libXfixes >= 4.0.4     Requires:libXi >= 1.3     Requires:libXinerama >= 1.1     Requires:libXrandr >= 1.3.0     Requires:libXrender >= 0.9.5     Requires:libXtst >= 1.0.99.2     Requires:openssl >= 1.0.1e     Requires:pulseaudio-libs >= 0.9.21     Requires:qt48 >= 4.8.5     Requires:qt48-x11 >= 4.8.5     Requires:qtwebkit >= 2.0     Requires:sqlite >= 3.6.20     Requires:tcp_wrappers-libs >= 7.6     Requires:zlib >= 1.2.3               %description     This is Just to test various files allocation through rpm build          %prep     %setup -q          %install     mkdir -p "$RPM_BUILD_ROOT/root/ModCMS"     cp -r GDM.tar.gz "$RPM_BUILD_ROOT/root/ModCMS/"          %files     /root/ModCMS/GDM.tar.gz          %clean     rm -rf $RPM_BUILD_ROOT          %post     cd /root/ModCMS/     tar xzf GDM.tar.gz      Now my questions are :   * How do I mansion dependency libraries directly instead of rpm?   * Is it necessary to include all those dependencies in Required field?   * How do I minimize them? I have searched, but couldn't find specific solution.


title: Linux embedded: change time zone

text: I'm working on an embedded system with linux. I'm trying to change the timezone used by the operating system and I'm doing this by copying the timezone file from /usr/share/zoneinfo to /etc/localtime (ie.: #cp /usr/share/zoneinfo/Europe/Rome /etc/localtime). So far so good: the time change accordingly. Anyway there are two weird things:   1. if I print the file /etc/timezone I found "Universal" and not /Europe/Rome as I would expect   2. I tried to simulate the automatic time change when the daylight saving time occurs but it seems that the time still remain at the old value. Any help would be appreciated.


title: Authentication very slow (both with ssh and su)

text: I'm having a problem on one of our production servers where the login attempts become progressively slower as time passes. After roughly 5 days it becomes so slow that some critical processes/cron entries fail to fire correctly. Server information: > Hardware: Dell R720 24 GB Memory 2 x Intel Xeon E502620 v2 Processors (24 > cores total, including HyperThreading) 8 x 300GB 10K SAS Drives > > OS: Red Hat Enterprise Linux 6.5 I experienced issues logging in via SSH and started along a long road of investigating 'red herrings'. Eventually, I noticed that even doing the following took very long:               [someuser#hostname] su -     Password:      When running the the 'su -' command as above, it shouldn't involve SSH in any form, as I am just trying to authenticate on the box itself, right? This has happened 3 weeks in a row on the same box and it's the first time I noticed (and tested I might add) that the local only logins are also slow. When I log in via the console, it looks as follows:               hostname login: user     Password:              # I enter the password and hit [enter]      A long time passes and then...               [user@hostname ~] $      When I log in via SSH, it looks as follows (verbosity on and doing a localhost login):               [user@hostname ~]$ ssh -v root@localhost     OpenSSH_5.3p1, OpenSSL 1.0.0-fips 29 Mar 2010     debug1: Reading configuration data /etc/ssh/ssh_config     debug1: Applying options for *     debug1: Connecting to localhost [127.0.0.1] port 22.     debug1: Connection established.     debug1: identity file /usr/local/user/.ssh/identity type -1     debug1: identity file /usr/local/user/.ssh/identity-cert type -1     debug1: identity file /usr/local/user/.ssh/id_rsa type -1     debug1: identity file /usr/local/user/.ssh/id_rsa-cert type -1     debug1: identity file /usr/local/user/.ssh/id_dsa type -1     debug1: identity file /usr/local/user/.ssh/id_dsa-cert type -1     debug1: Remote protocol version 2.0, remote software version OpenSSH_5.3     debug1: match: OpenSSH_5.3 pat OpenSSH*     debug1: Enabling compatibility mode for protocol 2.0     debug1: Local version string SSH-2.0-OpenSSH_5.3     debug1: SSH2_MSG_KEXINIT sent     debug1: SSH2_MSG_KEXINIT received     debug1: kex: server->client aes128-ctr hmac-md5 none     debug1: kex: client->server aes128-ctr hmac-md5 none     debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent     debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP     debug1: SSH2_MSG_KEX_DH_GEX_INIT sent     debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY     The authenticity of host 'localhost (127.0.0.1)' can't be established.     RSA key fingerprint is 1d:50:5e:a3:e4:63:d6:1d:d8:2c:85:07:95:81:c8:b6.     Are you sure you want to continue connecting (yes/no)? yes     Warning: Permanently added 'localhost' (RSA) to the list of known hosts.     debug1: ssh_rsa_verify: signature correct     debug1: SSH2_MSG_NEWKEYS sent     debug1: expecting SSH2_MSG_NEWKEYS     debug1: SSH2_MSG_NEWKEYS received     debug1: SSH2_MSG_SERVICE_REQUEST sent     debug1: SSH2_MSG_SERVICE_ACCEPT received     debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password     debug1: Next authentication method: gssapi-keyex     debug1: No valid Key exchange context     debug1: Next authentication method: gssapi-with-mic     debug1: Unspecified GSS failure.  Minor code may provide more information     Credentials cache file '/tmp/krb5cc_501' not found          debug1: Unspecified GSS failure.  Minor code may provide more information     Credentials cache file '/tmp/krb5cc_501' not found          debug1: Unspecified GSS failure.  Minor code may provide more information               debug1: Unspecified GSS failure.  Minor code may provide more information     Credentials cache file '/tmp/krb5cc_501' not found          debug1: Next authentication method: publickey     debug1: Trying private key: /usr/local/user/.ssh/identity     debug1: Trying private key: /usr/local/user/.ssh/id_rsa     debug1: Trying private key: /usr/local/user/.ssh/id_dsa     debug1: Next authentication method: password     root@localhost's password:     debug1: Authentication succeeded (password).     debug1: channel 0: new [client-session]     debug1: Requesting no-more-sessions@openssh.com     debug1: Entering interactive session.      At this point it gets stuck, for a long while again, and eventually logs in successfully. Any pointers will be appreciated. This is driving me up the walls. The following also appears in the dmesg output. It repeats for various process names (not only 'cifsd')               cifsd: page allocation failure. order:5, mode:0x20     Pid: 12913, comm: cifsd Not tainted 2.6.32-431.el6.x86_64 #1     Call Trace:      [<ffffffff8112f9e7>] ? __alloc_pages_nodemask+0x757/0x8d0      [<ffffffff8116e482>] ? kmem_getpages+0x62/0x170      [<ffffffff8116f09a>] ? fallback_alloc+0x1ba/0x270      [<ffffffff8116eaef>] ? cache_grow+0x2cf/0x320      [<ffffffff8116ee19>] ? ____cache_alloc_node+0x99/0x160      [<ffffffff8116ffe0>] ? kmem_cache_alloc_node_trace+0x90/0x200      [<ffffffff811701fd>] ? __kmalloc_node+0x4d/0x60      [<ffffffff8144feca>] ? __alloc_skb+0x7a/0x180      [<ffffffff81450fe0>] ? skb_copy+0x40/0xb0      [<ffffffffa014f57c>] ? tg3_start_xmit+0xa8c/0xd80 [tg3]      [<ffffffff81460354>] ? dev_hard_start_xmit+0x224/0x480      [<ffffffff8147bd0a>] ? sch_direct_xmit+0x15a/0x1c0      [<ffffffff81460858>] ? dev_queue_xmit+0x228/0x320      [<ffffffff8149a0d8>] ? ip_finish_output+0x148/0x310      [<ffffffff8149a358>] ? ip_output+0xb8/0xc0      [<ffffffff8105a924>] ? find_busiest_group+0x244/0x9f0      [<ffffffff81499655>] ? ip_local_out+0x25/0x30      [<ffffffff81499b30>] ? ip_queue_xmit+0x190/0x420      [<ffffffff8112ff2f>] ? free_hot_page+0x2f/0x60      [<ffffffff814aee3e>] ? tcp_transmit_skb+0x40e/0x7b0      [<ffffffff814b1380>] ? tcp_write_xmit+0x230/0xa90      [<ffffffff814b1f00>] ? __tcp_push_pending_frames+0x30/0xe0      [<ffffffff814a9663>] ? tcp_data_snd_check+0x33/0x100      [<ffffffff814ad261>] ? tcp_rcv_established+0x381/0x7f0      [<ffffffff8152873a>] ? schedule_timeout+0x19a/0x2e0      [<ffffffff814b5643>] ? tcp_v4_do_rcv+0x2e3/0x490      [<ffffffff814a130a>] ? tcp_prequeue_process+0x7a/0xa0      [<ffffffff814a4a2c>] ? tcp_recvmsg+0xacc/0xe80      [<ffffffff814c58ca>] ? inet_recvmsg+0x5a/0x90      [<ffffffff8105a625>] ? select_idle_sibling+0x95/0x150      [<ffffffff81449ab3>] ? sock_recvmsg+0x133/0x160      [<ffffffff8109b2a0>] ? autoremove_wake_function+0x0/0x40      [<ffffffff81059216>] ? enqueue_task+0x66/0x80      [<ffffffff8105571d>] ? check_preempt_curr+0x6d/0x90      [<ffffffff81065c5e>] ? try_to_wake_up+0x24e/0x3e0      [<ffffffff81065e02>] ? default_wake_function+0x12/0x20      [<ffffffff8109b2b6>] ? autoremove_wake_function+0x16/0x40      [<ffffffff81449b24>] ? kernel_recvmsg+0x44/0x60      [<ffffffffa01fd7c9>] ? cifs_readv_from_socket+0x1a9/0x260 [cifs]      [<ffffffffa020b11d>] ? cifs_add_credits+0x5d/0x70 [cifs]      [<ffffffffa01fd8a7>] ? cifs_read_from_socket+0x27/0x30 [cifs]      [<ffffffffa01fda03>] ? cifs_demultiplex_thread+0x153/0xe10 [cifs]      [<ffffffff81065e02>] ? default_wake_function+0x12/0x20      [<ffffffffa01fd8b0>] ? cifs_demultiplex_thread+0x0/0xe10 [cifs]      [<ffffffff8109aef6>] ? kthread+0x96/0xa0      [<ffffffff8100c20a>] ? child_rip+0xa/0x20      [<ffffffff8109ae60>] ? kthread+0x0/0xa0      [<ffffffff8100c200>] ? child_rip+0x0/0x20


title: Small company Linux server maintenance update practices

text: What is a secure update plan for web-facing servers when the person tasked with administration cannot allocate significant time to testing each updated package for breakage? Of course I want to update the LAMP stack regularly for security reasons, but I don't need the latest Java patch breaking Solr, or the latest PHP patch breaking a script in a non-obvious way. I do know to be wary of PHP point releases but with Java I am less confident. Right now our servers are Debian-based (Ubuntu Server LTS) but I am considering switching to Red-hat based (CentOS) because of Yum's rollback feature. Are my concerns unwarranted? Note that this is a small firm, we just hired our fourth employee. So in addition to my duties as a software developer, I am tasked with maintain a growing list of hardware including public webservers. No sensitive data is on the webservers, the worst that could happen from an exploit is that someone would deface our website, which is also our product (SaaS through a public API).


title: how are directories implemented in UNIX filesystem?

text: This question is extension to How are directories implemented in Unix filesystems? I'm aiming to implement basic filesystem: After reading inode number and name we come to know Name of file and hence we can list directory contents but we can't determine type of entry: whether it's another directory or a file. If there are 1000 entries in directory then reading 1000 inodes just to determine whether it is file or directory looks too silly. Am I missing something here or it is this way only?


title: External disk - how to ensure readable by all without needing root perms?

text: I have an external HDD. It's portable, so I plug it in all over the place. Needless to say, these different places have different passwd files and uids. The files are mine and I need to access them everywhere. Currently, every time I plug it in somewhere I have to               sudo find . -type f -exec chmod a+rw \{\} \+     sudo find . -type d -exec chmod a+rwx \{\} \+      Which assumes I have root access, of course. I could run this command (without `sudo`) at the _end_ of a session instead, but either way it's a faff and takes a lot of time (it's a ½TB drive). One option is to use a FS that does not understand permissions, exFAT, for example. However I'm using BTRFS because I use the snapshot facility. Is there a way at the FS level I can disable permissions - leave everything wide open? Or if you have another way, how do _you_ do this?


title: How to view Silverlight videos without Moonlight from Linux?

text: Like as people can view flash videos under Linux with ex.:               https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/     https://userscripts.org/scripts/show/87011      are there any similar solutions for Silverlight? UPDATE: moonlight is not such a great solution because it has been deprecated AFAIK.


title: Elegantly get list of children processes

text: I would like to get a list of all the processes whose parent is $pid. This is the simplest way I've come up with: `pstree -p $pid | tr "\n" " " |sed "s/[^0-9]/ /g" |sed "s/\s\s*/ /g"` Is there any command, or any simpler way to get the list of children processes? Thanks!


title: How to safely put user typed password into a file?

text: Is there any way to put the password typed by user into a file (either in Unix or in expect).               read -s -p "enter password" input      echo $input > file      Is the above code safe? I want to use that file as an input for password in my expect script Because I have tried this and I could see the password shown on the screen just for a sec with this expect code.               set timeout 30     stty -echo     send_user -- "Password for $username :"     expect_user -re "(.*)\n"     set timeout .000000001     set timeout 30     send_user "\n"     set timeout 30     set password $expect_out(1,string)     send -- "$password\r"


title: Life with empty about:plugins (so without flash)

text: I use Firefox as it is stated in the $subject. Nevertheless there are still too many contents (I'm talking about mostly videos) on the web that needs flash. This is what I use for it:   * https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/   * https://userscripts.org/scripts/show/87011 So in this way I can download/view with VLC ex.: youtube videos. But aren't there a better way to do this? To get the life without flash easier? And no, enabling html5 on youtube... doesn't help, because it looks like very- very-very low percentage of the youtube videos are viewable in html5.. UPDATE: so I don't want to run videos inside my browser. They will be always slower compared to a video natively played in ex.: VLC. Also AFAIK it's much safer to have empty about:plugins and play the needed videos in VLC.


title: AIX UNIX 64 bit connecting to Microsoft SQL server 2008R2 Server

text: I am having AIX 64 bit Unix machine and I need to connect to Microsoft SQL SERVER 2008 R2 database. I dont have any Drivers and TDS installed in my machine. What all tools I need to install including any dependencies?


title: How to copy the whole MySQL DB between two servers?

text: There is a very good connection between the two machines (MySQL 5.5.28):               mysqldump -u root -p'password' --all-databases | ssh root@SERVERNAME mysql -u root -p'password' --all-databases      So AFAIK this oneliner is like taking a MySQL dump on server#A then copy the dump to server#B then "import it on server#B. **Q1** : nothing else gets in the DB? This is the fastest way of doing this? :) or are there any faster? Can anything go wrong when this is going? **Q2** : how can I test that the sending was fully successful on server#B? How to check that the two DB's are "bit-by-bit" the same?


title: why 'echo --help' doesn't give me help page of echo?

text: I tried 'man echo' in Bash and it told me that 'echo --help' will display help then exit, and similarly, that 'echo --version' will output version and exit. But why it doesn't work ? 'echo --help' just simply prints '--help' literally.


title: using sudo on GUI applications

text: When I was using kubuntu, I could always open X applications with sudo, `sudo kate` for example. Now that I've switched to arch that doesn't work. I know I've always been told to use kdesu, but what setting is there in kubuntu that lets me use sudo on X apps that prevents me from doing it on arch? **Edit** :   Sorry, I did myself what I hate so much >_< This is what I'm trying to do:               [falmarri@falmarri-z-arch Downloads]$ sudo kate     Password:      No protocol specified     kate: cannot connect to X server :0.0      Note this is just a regular terminal session using konsole, I'm not using SSH **/etc/sudoers** :               ## sudoers file.     ##     ## This file MUST be edited with the 'visudo' command as root.     ## Failure to use 'visudo' may result in syntax or file permission errors     ## that prevent sudo from running.     ##     ## See the sudoers man page for the details on how to write a sudoers file.     ##          ##     ## Host alias specification     ##     ## Groups of machines. These may include host names (optionally with wildcards),     ## IP addresses, network numbers or netgroups.     # Host_Alias    WEBSERVERS = www1, www2, www3          ##     ## User alias specification     ##     ## Groups of users.  These may consist of user names, uids, Unix groups,     ## or netgroups.     # User_Alias    ADMINS = millert, dowdy, mikef          ##     ## Cmnd alias specification     ##     ## Groups of commands.  Often used to group related commands together.                                                                    # Cmnd_Alias    PROCESSES = /usr/bin/nice, /bin/kill, /usr/bin/renice, \                                                                  #                           /usr/bin/pkill, /usr/bin/top                                                                                ##                                                                                ## Defaults specification                                                                                ##                                                                                ## You may wish to keep some of the following environment variables                                                                       ## when running commands via sudo.                                                                                ##                                                                                ## Locale settings                                                                                # Defaults env_keep += "LANG LANGUAGE LINGUAS LC_* _XKB_CHARSET"                                                                          ##                                                                                ## Run X applications through sudo; HOME is used to find the                                                                              ## .Xauthority file.  Note that other programs use HOME to find                                                                           ## configuration files and this may lead to privilege escalation!                                                                          Defaults env_keep += "HOME"                                                                                ##                                                                                ## X11 resource path settings                                                                                Defaults env_keep += "XAPPLRESDIR XFILESEARCHPATH XUSERFILESEARCHPATH"                                                                   ##                                                                                ## Desktop path settings                                                                                Defaults env_keep += "QTDIR KDEDIR"                                                                                ##                                                                                ## Allow sudo-run commands to inherit the callers' ConsoleKit session     # Defaults env_keep += "XDG_SESSION_COOKIE"     ##     ## Uncomment to enable special input methods.  Care should be taken as     ## this may allow users to subvert the command being run via sudo.      Defaults env_keep += "XMODIFIERS GTK_IM_MODULE QT_IM_MODULE QT_IM_SWITCHER"     ##     ## Uncomment to enable logging of a command's output, except for     ## sudoreplay and reboot.  Use sudoreplay to play back logged sessions.     # Defaults log_output     # Defaults!/usr/bin/sudoreplay !log_output     # Defaults!/usr/local/bin/sudoreplay !log_output     # Defaults!/sbin/reboot !log_output          ##     ## Runas alias specification     ##               Defaults:falmarri timestamp_timeout=10          ##     ## User privilege specification     ##     root ALL=(ALL) ALL          ## Uncomment to allow members of group wheel to execute any command     %wheel ALL=(ALL) ALL          ## Same thing without a password     # %wheel ALL=(ALL) NOPASSWD: ALL          ## Uncomment to allow members of group sudo to execute any command     # %sudo ALL=(ALL) ALL          ## Uncomment to allow any user to run sudo if they know the password     ## of the user they are running the command as (root by default).     # Defaults targetpw  # Ask for the password of the target user     # ALL ALL=(ALL) ALL  # WARNING: only use this together with 'Defaults targetpw'          ## Read drop-in files from /etc/sudoers.d     ## (the '#' here does not indicate a comment)     #includedir /etc/sudoers.d


title: LS_COLORS settings for specific types of files

text: I'm trying to set up my color scheme for ls, and I'm having trouble finding information about exactly what parameters I have to work with, or where those come from. And especially setting colors for types of files instead of based on filetype. For example, this is my current color scheme:   `LS_COLORS='di=34;01:fi=0:ln=96;1:pi=36;1:so=31;1:bd=5:cd=5:or=31:mi=0:ex=35'` I found those parameters (di, fi, etc) from a website tutorial. But where do those come from? Can I set custom ones? I know I can set colors like `*.jpg=0` and such. But is there a way to do it based on types of files? I specifically want to set compressed file types, but if I have to do it by recognizing filetypes, I feel there's a better way.


title: Calculate difference between two non-linear data sets

text: I would like to calculate the difference between two data sets at any given moment in time. The problem is that the "timestamps" at which both data sets were taken differ. For example consider these data sets               time-1   state-1    time-2    state-2     6.164012 1          6.164015  1     6.290051 2          6.290055  2     6.454675 3          6.454678  3     7.006175 4          7.006178  4     7.080418 5          7.016555  5     7.193570 6          7.016595  4     7.351850 7          7.016595  3     7.465638 8          7.016595  2     7.492480 9          7.080421  3     7.524426 10         7.193572  4     8.006629 11         7.203975  5      It would be even sufficient to have the difference between state-1 and state-2 calculated at each 0.000001 seconds (brute force). Does anybody know how to solve this issue? EDIT: To clearify my question: the first data set contains a time stamp (time-1) and a corresponding value (state-1); the second data set contains also a time stamp (time-2) and a corresponding value (state-2). I would like to compare the "state" variables at every moment in time to find the maximum difference between both. However, since the time stamps are not synchronized between both data sets I cannot simply compare line 1 with line 1 etc. The data sets can be read as follows: data set 1 has 1 state at time 6.164012 seconds and after 2 states after 6.290051 seconds. Data set 2 has 1 state after 6.164015 seconds and 2 states after 6.290055 seconds. EDIT2: You can think of both data sets as step functions (x-axis is the time, y-axis the state variable). Then you end up with something like this:               ^     |    +---------+     |    |         | +---+     | +--+   +---+ | |   |     | |      |   | +-+   + ... f1     |--------+   +-------- ... f2     +------------------------------->      And I want to know at which time (x value) the difference between f1 and f2 (y_1 - y_2) is at its peak. In this case I don't have "functions" but two data sets belonging to the same experiment being run with different parameters.


title: What's the best way to configure shared filesystem directories? (beyond standard unix perms)

text: I have multiple users on my system. I'd like to have shared directories like music, video. pictures etc. The problems is that I want users to be able to write any new files to any directory, but not be able to delete or modify any files they don't own. With standard unix perms if you can add a file to a directory you can also delete others. I'd also like to make sure all the files in these directories are always readable by the user group. Can I do this with POSIX ACL's? or do I need something more advanced like SELinux (or other security framework). example of what I don't want to work.               su - root     mkdir /home/music     chmod 775 /home/music     chgrp users /home/music     su - user1 /home/music     touch /home/music/testfile     ll /home/music/testfile     su - user2     rm /home/music/testfile     ll /home/music


title: List files created on Sundays

text: How do I list/find all the files created on Sundays or Mondays? How do I use the date parameter to display them? Something like :               ls -f date + %a      or               find -type f | date +%A      or               find -type f -mtime -6


title: How does searching a file (locate) or autocompletion work?

text: I am a Windows user and coming from Windows with all the indexing and eternal wait times when searching for files, I find it surprising how fast does _locate_ work or the autocompletion (that I know) work in linux. Is there any indexing being done in the background or how is this achieved? I still have a pretty clean installation, so maybe this goes bad with time, but in Windows the moment you want to search on a folder which is not indexed you have to wait for some seconds. Thanks


title: rm option to fail on nonexistent files

text: The `man` page of `rm` in GNU coreutils 8.12.197-032bb describes the `-f` or `--force` option as "ignore nonexistent files, never prompt". Without this option, it will remove any existing files, never prompt, and return a non-zero exit code if any of the specified files did not exist. I'd like to **preserve the files if _any_ of the specified files do not exist**. What is the easiest way to do this? The use case is _safety_ : If I'm trying to remove a file which doesn't exist, it could be because there's an invalid expectation (or plain bug) in the command. For example the famous `rm -rf /usr /lib/nvidia-current/xorg/xorg` could have been averted in many ways, one of them being such an option (obviously unless the user by some incredible coincidence had a `/lib/nvidia- current/xorg/xorg` directory), and another being to Use More Quotes™. However, quotes aren't always enough. For example, consider `ssh host '/bin/rm some paths; /bin/bash foo.sh'` \- If I had forgotten the semicolon or inserted pretty much any other symbol like colon or comma, it would have tried to remove `/bin/bash` and `~/foo.sh`.


title: Creating a ram disk on Linux

text: I have a machine with 62GB of RAM, and a trunk that's only 7GB, so I thought I would create a RAM disk and compile there. I am not a Linux expert. I found instructions on the internet to create the RAM disk:               mkfs -q /dev/ram1 8192      but I changed the 8192 to 16777216 in an attempt to allocate 16GB of ram disk. I got the following error:               mkfs.ext2: Filesystem larger than apparent device size.     Proceed anyway? (y,n)       At which point I got spooked and bailed.               sudo dmidecode --type 17 | grep Size      shows               8x8192MB + 2048MB = 67584 MB      but `du` on `/dev` gives `804K`. Is that the problem? Can I overcome that `/dev` size?


title: NVIDIA Proprietary Driver on Debian Jessie Problems

text: I have dabbled in running a Debian server before, but this is my first time using its graphical interface for my main pc. I have been trying to install the nvidia proprietary drivers. I have SLI gtx 460s 1GB. I am running Debian "Jessie" (if it turns out my issues are due to me running the testing build, please let me know). So far, I have tried following the exact directions on the Debian wiki. Upon reboot, my primary monitor remains completely blank once the desktop environment launches (I never even see the login screen), though it is still receiving some sort of video signal because the monitor doesn't complain about no signal. This contrasts my secondary monitor which is given no signal whatsoever. Oddly, when I hook up my monitor via HDMI to my motherboard's integrated graphics, I see a black screen with a cursor blinking at the top left corner. I am able to alt+ctrl+F1 to login to the terminal, purge my system of nvidia packages, delete the xorg config file, and reboot; this returns my system to a usable state using nouveau, dual monitors and everything. I have tried slightly different methods such as installing the 'nvidia-driver' metapackage. Still, I get the same result. Digging through the Xorg log, I found this segment:               [     7.605] (II) LoadModule: "glx"     [     7.605] (II) Loading /usr/lib/xorg/modules/linux/libglx.so     [     7.642] (II) Module glx: vendor="NVIDIA Corporation"     [     7.642]    compiled for 4.0.2, module version = 1.0.0     [     7.642]    Module class: X.Org Server Extension     [     7.642] (II) NVIDIA GLX Module  331.67  Fri Apr  4 11:43:47 PDT 2014     [     7.642] Loading extension GLX     [     7.642] (II) LoadModule: "nvidia"     [     7.642] (II) Loading /usr/lib/xorg/modules/drivers/nvidia_drv.so     [     7.649] (II) Module nvidia: vendor="NVIDIA Corporation"     [     7.649]    compiled for 4.0.2, module version = 1.0.0     [     7.649]    Module class: X.Org Video Driver     [     7.650] (II) NVIDIA dlloader X Driver  331.67  Fri Apr  4 11:24:40 PDT 2014     [     7.650] (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs     [     7.650] (++) using VT number 7      Any help would be greatly appreciated. I'll gladly provide any more information that's required. Thanks.


title: Copying and expanding partitions

text: I currently have the following setup:   1. 2TB HDD `/dev/sda`:     * `/dev/sda1`: (NTFS) Windows 7 Boot Partition: 100GB   2. 1TB HDD `/dev/sdb`:     * `/dev/sdb1`: (EXT4) Linux General/Backup Partition - 1TB   3. 256GB SSD `/dev/sdc`:     * `/dev/sdc1`: (FAT) Windows 7 Loader Partition - 100MB     * `/dev/sdc5`: (EXT4) Main Linux Boot Partition - 255.9GB Here's what I'm going to do. `/dev/sdc`, the SSD, will be combined with other SSDs in a RAID-0 configuration. `/dev/sda` will be combined with other drives into a RAID-6 configuration. `/dev/sdb` will most likely become entirely NTFS for Windows space. Is there a way that I can copy `/dev/sda1`, `/dev/sdc1`, and `/dev/sdc5` to files on a filesystem in order to then create partitions out of them? After configuring the arrays and setting up GPT on each virtual drive, is there a utility I can use to create the partitions from backup files? Better yet, is there a way to compress down these partitions on the FS so that empty blocks are not copied so I only have to store what's actually there? Essentially, what I'd like to do is to make an optimized backup of these partitions, then install them where they need to go, then expand them as need be to fill the disks. I know how to expand partitions, but is there a relatively easy way to back them up and flash them back?


title: Why does "kill -9 0" end my console session?

text: I just wonder why `kill -9 0` ends my tty console session? What exactly is PID 0, it is not listed on a `ps aux`?


title: Monitor hundreds of hosts for basic parameters

text: We have several hundred Linux VMs on EC2 and Google compute engine. We want to monitor basic things like disk free space and memory consumption, in the easiest and lightest way possible. Expectedly, VMs come and go pretty often, as load changes, etc. Currently we use simple scripts that pull such information via SNMP. We don't need fancy app-specific monitoring since it is already being provided by app- specific means. We tried Zenoss, and found it hard to use, and its documentation lacking. We considered Nagios and its forks. We considered Sensu (but my boss is not a fan of RabbitMQ) and Ganglia, but all of them seem a bit too complicated for our very basic needs. SaaS solutions like Circonus would be too expensive with the number of hosts we have. Am I missing some obvious _easy_ solution here? What would you recommend [against]?


title: Running a daemon as a non-privileged user

text: I am trying to set up a Thin Ruby application server on my Ubuntu VPS. I have created a specific account, installed rbenv under it along with all gems. I am looking for a convenient way to obtain the following objectives:   1. Run my Thin Rack application under my non-privileged user account.   2. Make the application run as a daemon   3. Have the daemon run automatically whenever the system boots   4. Make the daemon restartable   5. Make the application accessible to Nginx through a unix domain socket. Objective two and three are the trickiest. Is it possible to define scripts for a user to be run as that user whenever the system boots?


title: is there any reason to avoid editing /etc/group directly

text: I find it much easier to edit files directly rather than remember commands like useradd -g, usermod, groupmod, etc. Is there anything wrong with just editing /etc/group directly?


title: Why can't I run programs extracted from an archive?

text: Having downloaded archives of Sage, ~~Firefox, and Thunderbird~~ from their respective websites on Trisquel 6.0, neither clicking the appropriate shell script nor executing a command to run the programs will open them. Looking at the files' permissions, they are indeed executable. **Edit** : Firefox and Thunderbird have now mysteriously started working; Sage, however, remains inoperable. Having downloaded it from the first link on this page, extracted it to my desktop (where Firefox and Thunderbird run just fine), opened the folder in the terminal and run the command "sage" (as there is an executable by that name in the folder) I receive the error: `bash: sage: command not found`. Yet `ls -l` shows that the files are known to exist and be executable. **Edit #2** : I only thought Firefox and Thunderbird were working. I was actually running the versions I already have installed. Running Firefox and/or Thunderbird with `./[executable]` gives the error `libxul.so: cannot open shared object file: No such file or directory Couldn't load XPCOM.`


title: NFS permission denied

text: When I configure NFS and create a file on the client NFS shared dir, I get the following message: **permission denied**. My configuration: ### configuration nfs server http://www.server-world.info/en/note?os=CentOS_6&p=nfs&f=1 ![ss of server setup](http://i.stack.imgur.com/N366y.png) ### configuration nfs client http://www.server-world.info/en/note?os=CentOS_6&p=nfs&f=2 ![ss of client setup](http://i.stack.imgur.com/vTRwK.png) where is the problem?


title: Safe Linux dual-boot partitioning?

text: I'm about to get a Linux laptop with Ubuntu preinstalled. Among my first tasks will be a dual-boot installation of Linux Mint. From what I can tell, the following seems like an okay partition structure:   * Partition 1: / [ Root partition for Ubuntu ]   * Partition 2: / [ Root partition for Mint ]   * Partition 3: Swap [ Shared between the systems ]   * Partition 4: Other shared data The root partitions would contain the standard directory hierarchies. Partition 4 would be used for /tmp and Dropbox data, plus whatever other data might be convenient to share among an arbitrary number of distros. Is this a reasonable plan? (Sorry if this is a dup. I'm not finding anything quite like it here.)


title: Get monitor make and model and other info in human readable form

text: I have extracted the shorthand version of the current monitor attached to the computer.   Here is an example: `vendor "VSC", prod id "18500"` In Ubuntu's Monitor Preferences, it is identified as `Viewsonic Corporation 16"`. How can I extract this human readable form? ... and also, how can I determine if a monitor is a `CRT` or an `LCD`? (this is actually what got me started on this quest) The EDID format can be found on Wikipedia: _Extended display identification data_   Here is the code used to get the EDID `Vendor` and `Product id`               edid=$(xrandr -q --verbose |               sed -n '/^[[:space:]]\+00ffffffffffff00/,/[^a-fA-F0-9[:space:]]/{                                                       /[^a-fA-F0-9[:space:]]/d                                                       s/[[:space:]]\+//g; p}')     nibble=({0..1}{0..1}{0..1}{0..1})     vend=$(for i in {16..19} ;do                 printf "%s" ${nibble[$((16#${edid:$i:1}))]}            done)     vend="$(for i in 1 6 11 ;do                 printf \\x$(printf %x $((2#${vend:$i:5} +64)))             done)"     prod=$((16#${edid:22:2}${edid:20:2}))     printf "monitor: vendor \"%s\", prod id \"%s\"\n" "${vend}" "$prod"      * * * Edit: Here are the leading lines of `xrandr -q verbose` outpt ... up to the end of the EDID hex dump               Screen 0: minimum 320 x 200, current 1280 x 960, maximum 8192 x 8192     VGA1 connected 1280x960+0+0 (0x47) normal (normal left inverted right x axis y axis) 320mm x 240mm             Identifier: 0x41             Timestamp:  26386             Subpixel:   unknown             Clones:                 CRTC:       0             CRTCs:      0 1             Transform:  1.000000 0.000000 0.000000                         0.000000 1.000000 0.000000                         0.000000 0.000000 1.000000                        filter:              EDID:                     00ffffffffffff005a63444809000000                     15090101682018b1e84f22a157479925                     0f484ffffe00315945596159714f8140                     818001010101000000ff004848393231                     30303030390a2020000000fd0032781e                     46ff000a202020202020000000fc0056                     696577536f6e696320453737000000fc                     00312d320a2020202020202020200084       1280x1024 (0x46)  108.0MHz +HSync +VSync             h: width  1280 start 1328 end 1440 total 1688 skew    0 clock   64.0KHz             v: height 1024 start 1025 end 1028 total 1066           clock   60.0Hz       1280x960 (0x47)  ....               ...             ... etc


title: Insert bookmark in .pdf file for print

text: I have searched many solutions on what is the best way to search a `.pdf`, and if a page named spec_out is located in the `.pdf` it will insert the first bookmark before other bookmarks as Spec Out. I'm trying to do it within the terminal of Ubuntu. More than likely I'll make a shell script of it. I reviewed PDFtk, pdfWriteBookmarks, LaTeX, pdfpages, and pdfmark, but I am not seeing a solid solution. I did see someone donated some `.py` script per another thread but I haven't tried my hand at python yet.


title: How does GDM authenticate to the X Server?

text: Given that you usually have to authenticate to the X Server by way of a "magic cookie" stored in the `.xauthority` file in the user's home directory: How does GDM (like most login processes, running as root, I would assume) connect to the X Server in order to draw the login display? Does it use any .xauthority files stored in the root user's home directory or does it bypass authentication altogether?


title: Changing one character in keyboard layout

text: I edited the file `/usr/share/X11/xkb/symbols/us` and added a definition with my new layout as follows               partial alphanumeric_keys modifier_keys     xkb_symbols "us_pl" {         include "us(basic)"         name[Group1]= "English (with Polish characters)";         key <AD06> { [ z, Z, zabovedot, Zabovedot ] };     };      I commented the line 27 (for xkb_symbols "basic")               // key <AD06> { [   y,  Y   ] };      Then I compiled the changed layouts               $ xkbcomp -xkm -m basic us     $ xkbcomp -xkm -m us_pl us      I set the new layout               $ setxkbmap 'us(us_pl)'          $ setxkbmap -query     rules:      evdev     model:      pc105     layout:     us(us_pl)      Now, I'd like to test my newly defined character but nothing changed. Where am I doing a fault? Note, that I'd like to change more characters later, so I'd like this example to work. OS: Ubuntu 12.04


title: Debian won't boot: udevd fails to load device sda and sdb

text: I **can't boot my Debian** system, I got this error during boot up:               Driver 'pcspkr' is already registered, aborting.      I have solved this by adding `blacklist snd-pscp` to **/etc/modprobe.d/blacklist.conf** (inspired by this Now I can't see this error during boot up, but **my computer prints this and stops** (shell not running, I can type text and it displays on screen, but I can't run any command (nothing happens on enter))               [10.175214] [drm] nouveau 0000:01:00.0: Setting dpms mode 0 on vga encoder (output 0)     [10.175223] [drm] nouveau 0000:01:00.0: Output VGA-1 is running on CRTC 0 using output 0     [10.181152] Console: switching to colour frame buffer device 240x67     [10.188268] registered panic notifier     [10.188302] [drm] Initialized nouveau 0.0.15 20090420 for 0000:01:00.0 on minor 0      After few times of inactivity, this lines show up too:               udevadm settle - timeout of 180 seconds reached, the event queue contains:     /sys/devices/pci0000:00/0000:00:1f.1/host0/target0:0:1/0:0:1:0/block/sda (718)     /sys/devices/pci0000:00/0000:00:1f.1/host0/target0:0:1/0:0:1:0/block/sda/sda1 (719)     /sys/devices/pci0000:00/0000:00:1f.1/host0/target0:0:1/0:0:1:0/block/sda/sda2 (720)     /sys/devices/pci0000:00/0000:00:1f.1/host0/target0:0:1/0:0:1:0/block/sda/sda5 (721)     /sys/devices/pci0000:00/0000:00:1f.1/host0/target0:0:1/0:0:1:0/block/sda/sda6 (722)     /sys/devices/pci0000:00/0000:00:1f.1/host1/target1:0:0/1:0:0:0/block/sdb (731)     /sys/devices/pci0000:00/0000:00:1f.1/host1/target1:0:0/1:0:0:0/block/sdb1 (732)     done (timeout).     udevd[294]: worker [327] unexpectedly returned with status 0x0100          udevd[294]: worker [327] failed while loading '/devices/pci0000:00/0000:00:1f.1/host0/target0:0:1/0:0:1:0/block/sda'          udevd[294]: worker [317] unexpectedly returned with status 0x0100          udevd[294]: worker [317] failed while loading '/devices/pci0000:00/0000:00:1f.1/host0/target0:0:1/0:0:1:0/block/sdb'      What can I do to fix this? * * * **UPDATE** ~~I have downloaded`/var/log/messages` from that computer~~ (It was bad file from live linux, not from the one installed on my computer, there isn't seems to be any related info/errors in the right "messages" file, I'm not sure it could help) **UPDATE2:** I have run `e2fsck` on both of my ext partitions (sda), but **exit code was 0** (no error) **UPDATE3:** I just tried to "repair" filesystem using alternate superblock, I was successful but nothing changed :(. What more can I try?


title: How to place big file on two disks without splitting?

text: I have a file 100gb in size and a server with two 72gb disk's. The server runs Ubuntu Linux, with ext4 on the disks, and without LVM. How I can put the 100gb file on the server with 72+72gb disk's? I can't change the filesystem and I can't split the file; the file must be readable.


title: How to mount Windows shared folder on Redhat

text: Case:: I have to mount the windows shared folder on redhat directory /mnt or anywhere elese. This is the Windows shared folder Path **D:\Analytics\Data\DownLoad** This path will be mounted on Redhat so database team can access it. Please give advice how to do this.


title: How do you get descriptions of the available `shopt` options?

text: What is the canonical way for accessing the **local** documentation on any available Shell Options builtin with `shopt`? I'm using Ubuntu 12.04 and can run `help shopt` to get a description of what `shopt` does:               shopt: shopt [-pqsu] [-o] [optname ...]         Set and unset shell options.         ...      I can list the various Shell Options and their values (`shopt` or `shopt -p`). But how do I find out what each one actually does without leaving the comfort of my Linux box? I'm not looking for the descriptions online. Is there a `man` page or something I'm missing?


title: What network interface does Linux route traffic through by default?

text: I have a VPS with 4 IP addresses. I am changing the IP address of `eth0` on daily basis. `eht0:1` has its own IP address.               eth0 (192.168.1.3, 192.168.1.4, 192.168.1.5)     eth0:1 (192.168.2.1)      I have my custom written Python scripts those are continuously uploading data to remote database and other processes. I want to know which interface my scripts will use? Because I am changing the `eth0` IP address daily, I want that my script will use only `eth0`. And I want to use `eth0:1` for ping and http apache server.


title: automate gnuplot plotting with bash

text: I have 6 files which need to be plotted as line graphs with error margins and output them to different png files. The file format is as follows. > seconds mean-average min max How would I go about plotting these graphs automatically? So I run a file called bash.sh and it will get the 6 files and output the graphs to different `.png` files. Titles and axis labels are also required.


title: proper way to overwrite debian kernel modules

text: I just downloaded and compiled `tg3.ko` kernel module. Where should I put it on a Debian system? There is one in `/lib/modules/2.6.32-5-xen- amd64/kernel/drivers/net/tg3.ko` already. Ideally, I would like to leave the original one where it is, and "bump the priority" for mine. So if mine doesn't get loaded or disappears, the original is still there as a fallback. The only way I know to do it is `dpkg-divert`, but I feel a slight shiver in my stomach when I use it. It is especially scary to do it on a server, with the network module. :)


title: On Linux, is there an rc.local equivalent for shutdown?

text: I've got a few commands that I run in `rc.local` so they are run last in the startup sequence. I would like to know if there is a similar facility for undoing the results of those commands at shutdown, like an `rc.shutdown`. Ideally, it would be run before any of the other `/etc/init.d` scripts.


title: Use `cut` to extract a list from /etc/passwd

text: How could I use the `cut` command to extract a list of usernames and login shells from the `/etc/passwd` file, where the resulting usernames and login shells are separated by a single space? Sort the resulting list in ascending alphabetical order, using the login shell as the primary key, and the username as a secondary key. Store the result in the newly created file `~/usershells.txt`. This is the command I attempted:               cut -d /etc/passwd -k7 -k1 | sort > ~/usershells.txt


title: Doubts about creating a .Xresources file.

text: I want to customize the look and feel of my `xterm` and have read that the way to do it is creating a `.Xresources` file and saving there the desired configuration. I've also learned that this file can control so much more than just the look of `xterm`, for example the screensaver and the mouse, among other things. My question would then be: if I create a `.Xresources` file and just write the settings for `xterm`, what happens to my screensaver, mouse and other stuff controled by `.Xresources`?


title: qtcreator debugger shows <unavailable synchronous data> when trying to view the contents of std::map

text: I'm running QtCreator 4.8.0 on a Ubuntu 12.04 (64bit) machine. `apt-cache policy qtcreator` shows:               qtcreator:       Installed: 2.4.1-0ubuntu2       Candidate: 2.4.1-0ubuntu2       Version table:      *** 2.4.1-0ubuntu2 0             500 http://ca.archive.ubuntu.com/ubuntu/ precise/universe amd64 Packages             100 /var/lib/dpkg/status      My `gdb` version info is:               GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2.1) 7.4-2012.04      Whenever I try to view the contents of a `std::map` using Qt debug mode I get > >     <unavailable synchronous data> >   However, I can view the contents of other STL data structures such as vectors or lists. Why is it that I can't view the contents of `std::map`? To reproduce the problem:   1. write a program that initializes and inserts some elements into a std::map   2. set a break point right after the elements are inserted into the map   3. run qtcreator in debug mode (F5)   4. attempt to view the contents of your map variable in the "Locals and Expressions view" Here is a screenshot that also shows the debugger log at the top:     ![qtcreator in debug mode](http://i.stack.imgur.com/22asj.png)


title: How to deliberately fragment a file

text: I am looking for a way to fragment an existing file in order to evaluate the performance of some tools. I found a solution for NTFS file system called MyFragmenter as described in this thread. However I can't find anything for ext2/3/4... I guest I can develop my own file fragmenter but due to time constraint I would like to find a faster solution. I found some tool like HJ- Split which split a file in smaller bits but I doubt this will simulate file fragmentation. Is their any solution available for my problem?


title: uninstalling iceweasel with apt-get autoremove

text: When I try to uninstall iceweasel it wants to uninstall dependencies like 'gnome' and 'gnome-core', which of course I don't want. I tried to follow several instructions in apt-get - autoremove wants to uninstall Gnome ... but to no avail. A clue would maybe be that something messed up when I installed kde to give it a try ( now I am back on gnome2 ). If someone has already been in my case ...


title: Clear / erase a mistyped invisible password on a shell / terminal in Linux

text: One thing that annoys me using Linux's terminal is when I have to type a invisble password, like when you run **ssh**. Sometimes I mistype one or more letters and then I have to press backspace key a few times to make sure that I erased everything to start again. I know this is not a big deal but since on the other day I found out that pressing CTRL+L "clears" the terminal I was wondering if there's a way to clear/erase the invisible password without relying on backspace or pressing enter key to try again.


title: The simplest method to count lines matching specific patterns, including '0' if line is not found?

text: I have very big logs (several gigabytes per day), that can (but do not need to) contain specific lines. **I have to count the number of occurences of every one of these lines on a daily basis.** I have a file `patterns.in`, that contains the desired lines. For example:               aaaa     bbbb     cccc     dddd     eeee     ffff      The log files can look like this:               asd     dfg     aaaa     aaaa     sa     sdf     dddd     dddd     dddd     dddd     ghj     bbbb     cccc     cccc     cccc     fgg     fgh     hjk      The first (and perhaps most obvious approach) is to use `grep`, `sort` and `uniq` in the following way:               grep -f patterns.in logfile.txt | sort | uniq -c      which gives the following result:                  2 aaaa        1 bbbb        3 cccc        4 dddd      It is close to what I want to achieve, but my desired result is:                  2 aaaa        1 bbbb        3 cccc        4 dddd        0 eeee        0 ffff      So the **problem** is: how to print '0' if a line from `pattern.in` file is not matched? It needs to be done in a simplest possible way, as all I have available is the _cygwin_ environment.


title: ls command: how to ignore case without globbing

text: I use the `shopt -s nocaseglob` command to ignore case, but it seems like it doesn't work if I use a string without glob. ![enter image description here](http://i.stack.imgur.com/3lnmT.png) Just a question out of curiosity, is it possible to ignore case without globbing? i.e. `ls a` would output both **a** and **A**


title: Using Awk To Parse Individual Lines

text: Here is the output from qacct -o               Total : OWNER WALLCLOCK UTIME STIME CPU MEMORY IO IOW         =========================================================================================================================      Total : adeluca 1947 45.550 8.325 53.875 3.079 17.268 0.000      Total : athardin 1 0.039 0.056 0.095 0.000 0.000 0.000      Total : axelsone 35398815 34902115.362 37631.812 34939747.173 33441742.534 11432.294 0.000      Total : bfinley 1875 6654.039 108.112 6762.151 2867.369 33.136 0.000      Total : bihe 12018070 6479035.116 1168497.282 7647532.398 4463769.624 478955.800 0.000      Total : brogers 108710282 108181275.073 46824.068 108228099.141 1741423.539 2.129 0.000      Total : ckbui 10 0.006 0.006 0.012 0.000 0.000 0.000      Total : ctokheim 114192 15177.837 460.056 15898.657 11150.583 208.076 0.000      Total : dliang 6483476 8023175.362 80187.624 13133457.012 12167904.607 472.620 0.000      Total : gaolong 3395364 3382687.178 5792.021 3388479.200 6904718.986 11.328 0.000      Total : htrn 1 0.016 0.006 0.022 0.000 0.000 0.000       Right now I have               qacct - o | awk 'NR>2 print {$1}'      The purpose of this is to pull the individual user names like so:               adeluca     athardin     axelsone     bfinley     bihe     brogers     ckbui     ctokheim     dliang     gaolong     htrn      What I want is to be able to parse through the list and for each user be able to pull out each individual user to put into another file that requires their username. For Example. ~/qacct.monthly adeluca So What I want ultimately is to be able to parse through qacct -o, get the individual users and be able to call something like ~/qacct.monthly $users So that I don't have to manually put the individual users in every time.


title: Filesystem type on Solaris 5.10

text: How can I get the file system type for each device on Solaris 5.10? I tried `mount` with no args but that only listed each mount point, similar to `df`. Also, how can I find where a specific directory is mounted to, directly, without which of the mounting points is its superdirectory or grep? Thanks


title: stderr redirection not working in csh

text: I run the following command:               pkg_add emacs-23.4,2.tbz 2> output.log      The output still displays in the terminal. When I press `↑`, I get               pkg_add emacs-23.4,2.tbz 2 > output.log      **with a space before the`2`**. I did not originally put this. I try               pkg_add emacs-23.4,2.tbz > output.log 2>&1      Again, when I press `↑`, **spaces have been added**. Why is this happening to me? I am running csh on FreeBSD.


title: Command completion does not complete the files in the current directory

text: Something is wrong with my tab completion. Let's say I do this:               cd test // works fine, go into test directory     ls // works fine, displays all of the files      Let's assume I have the following files:               abc.txt     ada.txt     afg.txt      If I type `a` and then `TAB` for auto complete, it displays something different like:               a2p     a2x     ... // bunch more      I feel like it thinks I'm in a different directory?