title: What is resolv.conf and why VPN client's hack it?

text: As stated in a previous question I want to connect to 2 VPN servers at the same time and for each connection specify the IPs of computers I want to reach with it. One of this VPN connection is done with `vpnc` and a `default.conf` file, and the other one is done with a Cisco client (I am not able, for now at least to connect with `vpnc` because I don't have the IPSecrete element required to connect). I am ok with the connection done through `vpnc`: I am able to connect configure the targeted IPs to use the created interface as following:               #!/bin/sh          #Get default gateway     DEFGW=`ip route list | grep default | awk -F' ' '{print $3 }'`     DEVICE=`ip route list | grep default | awk -F' ' '{print $5 }'`          echo "Default Gatway is: $DEFGW on device $DEVICE"          echo "Starting vpnc"     sudo vpnc          echo "Adding routes to known computers through VPN network interface"     sudo route add -net 132.181.11.0  netmask 255.255.255.0 dev tun0          echo "Adding all other routes through standard network interface"     sudo route del default     sudo route add default gw $DEFGW dev $DEVICE      Now, before running the two connections simultaneously, I am trying to do the same with the Cisco client but I am facing on problem with `resolv.conf`. This file is modified by the VPN client with a domain value and to DNS servers values. Running the following script result in DNS resolutions errors (reported by chrome)               #!/bin/sh          #Get default gateway     DEFGW=`ip route list | grep default | awk -F' ' '{print $3 }'`     DEVICE=`ip route list | grep default | awk -F' ' '{print $5 }'`          echo "Default Gatway is: $DEFGW on device $DEVICE"          echo "Starting cisco"     sudo /opt/cisco/vpn/bin/vpn connect 134.214.244.203          echo "Adding routes to computers through VPN network interface"     sudo route add -net 132.212.146.156  netmask 255.255.255.255 dev cscotun0          echo "Adding all other routes through standard network interface"     sudo route del default     sudo route add default gw $DEFGW dev $DEVICE      Any help and comments on this, and solve the issue are welcome. Thanks


title: SELinux preventing ssh via public key

text: I have user `$USER` which is a system user account with an authorized users file. When I have SELinux enabled I am unable to ssh into the server using the public key. If I `setenabled 0`, `$USER` can now log in. What SELinux bool/policy should I change to correct this behaviour without disabling SELinux entirely? It's worth noting that `$USER` can login with a password under this default SELinux configuration, I'd appreciate some insight as to what is happening here, and why SELinux isn't blocking that. (I will be disabling password authentication altogether after this is resolved so this question is more nice to know)


title: Is there some kind kind of hosts.additional file for Linux

text: If you have a list of servers all linking to each other by static addresses, is there some kind of hosts.additional you can use as some kind of file based DNS? ie The hosts file contains static information and the hosts.additional contains the address which change regularly.


title: scan and connect to wifi from linux terminal on virtual machine

text: I am trying to scan wifi networks via Linux terminal running on a virtual machine. I am running virtual machine on Mac OS. On MAC terminal, I can see all Wi-Fi networks using (airport) command and can connect to one network. The NetworkAdapter setting for Virtual machine is set to "Share with MAC". On Linux terminal, When I do `ifconfig -a`, I get `eth0` & `lo` However, when I type : `sudo iwlist eth0 scan` , I get error message:               sudo iwlist eth0 scan     eth0      Interface doesn't support scanning.      Can someone explain how I can do that with Linux running on virtual machine? What I am doing wrong?


title: Urxvt draws lines slowly

text: I'm using Arch Linux and Urxvt as terminal emulator. When I scroll up/down, text lines gets rendered so slow I can count by top to bottom ( _heh, 1st line get rendered... ohh, 2nd one! ..._ ). It takes like a full second to get new content rendered in terminal. The worst is reading man pages, looking at Git's log etc.. I have no conf for Urxvt, so it can't me misconfed. The strangest thing is that on both other computers that are also running Arch Linux and Urxvt with almost the same conf everything works. Also, it can't be performance problems — hardware is quite new. Any clue why's that? I even don't know where to start searching for problem!


title: What is symlinking and how can learn I how to to do this?

text: From the Django-Documentation: > The django-admin.py script should be on your system path if you installed > Django via its setup.py utility. If it’s not on your path, you can find it > in site-packages/django/bin within your Python installation. Consider > symlinking it from some place on your path, such as /usr/local/bin.' How do I 'symlink' and how do I know when I need to do it? OS Ubuntu 12.10 32 bit OEM2 GB RAM


title: Rotate console on startup (Debian)

text: I want to rotate my console (not X Server) by 90 degrees (clockwise). The following seems to work for me: `echo 1 > /sys/class/graphics/fbcon/rotate`; however, I'd prefer to use a kernel option in Grub, rather than including the above in the `/etc/rc.local` script. The fbcon documentation outlines the following option that can be passed to the kernel: `fbcon=rotate:<n>`. Unfortunately, when I modify `/etc/default/grub` and modify the `GRUB_CMDLINE_LINUX` line like this:               GRUB_CMDLINE_LINUX="fbcon=rotate_all:1"      ... it doesn't work. I also ran `update-grub` before rebooting. I've also tried this:               GRUB_CMDLINE_LINUX="fbconsole=rotate_all:1"      Still nothing. Any thoughts?


title: redirecting output of /dev/fb0 to /dev/fb2

text: I am using IMX6 Saberauto board on Linux OS. I have 2 displays primary is `HDMI` and secondary is `LVDS`. I want to run 2 applications. One QT on primary display, which I am able to do. Second application is airplay application I want this application to run on seondary display ie `/dev/fb2`. But I am not able to do that. It is coming on primary display only. Please let me know the command to direct airplay output to `/dev/fb2`.


title: How to configure buildroot to add a sound device?

text: I've used a given board configuration to reconfigure it for my individual board. My board has a CS4270 sound device of Cirrus Logic. My uImage is booting successfully on my target hardware, but an `alsactl init` always shows me `no sound card`. I loaded as many sound modules as I can, e.g. `modprobe snd-soc-cs4270`. But I have the feeling there is one module missing because the alsa-project website shows a specific module named `snd-cs4270`. Can I get this module installed by buildroot or do I have to download and integrate it into my target hardware on my own? I've followed this question and ended up with the question, if I must implement the sound device in the board file in `linux/linux- kernel/arch/<my_arch>/mach-<board_arch>/<board>.c`. But this can't give me a `snd-cs4270`module. Has anyone an idea which way I shall go to get this thing done?


title: How to install netbeans on Ubuntu

text: I'm trying to install Netbeans on Ubuntu. I downloaded `netbeans-7.3-javaee- linux.sh`, but when I opened it it didn't work. I tried opening it from a terminal, but it didn't help, and I ran:               # sudo chmod +x /home/amal/netbeans-7.3-javaee-linux.sh      What am I doing wrong?


title: Can I access Nautilus's bookmarks in terminal?

text: I have made a some bookmarks in Nautilus, i.e. shortcut links to some directories. I would like to `cd` to a directory which has been bookmarked in Nautilus. I was wondering if that is possible?


title: Is it possible to whitelist a specific program in iptables?

text: Is it possible to allow all traffic for a specific program in `iptables`? Otherwise using `nmap` and a strict `iptables` configuration at the same time seems impossible.


title: Get the maximum sum for a file on 2 keys

text: I have a file as below.               key1 key2  key3     a1    2    l1     a1    2.5  l2     a2    2    l2     a3    2.5  l3     a3    2.1  l4     a3    2.2  l5      I am trying to find the maximum possible sum of `key2` that satisfies the condition that `key1` and `key3` occur only once. For the above file, I expect the output as,               a1 2     l1     a2 2     l2     a3 2.5   l3      If I use the below command,               sort -nk2 file | perl -ane '$k{$F[$1]}=$_; END{print "$k{$_}" for keys(%k)}'      I get the output as,               a2 2   l2     a1 2.5 l2     a3 2.5 l3       However, I wish to get only one occurrence of `key1` and `key3` in the output as well as getting the maximum sum as I have described in the expected output. **EDIT** I have the input file as below.               a0 11.1    l6     a0 3       l1     a1 14.0    l6     a1 2.5     l2     a2 11.1    l2     a2 2       l2     a3 13.3    l8     a3 2.1     l4     a3 2.5     l7     a4 1.6     l6     a4 1.7     l1      As we can manually see, the maximum weighted output for the above file would be,               a0 11.1 l6     a2 11.1  l2     a3 13.3 l8     a4 1.7  l1      As per Gnouc's `awk` command, I get the output as,               a0 11.1  l6     a1 2.5   l2     a3 13.3  l8     a4 1.7   l1      As per terdon's `perl` command, I get the output as,               a2 2   l2     a4 1.7 l1     a3 13.3 l8      **EDIT 3**               a1 1 l1     a2 3 l2     a1 4 l3     a3 5 l2     a6 4 l5     a7 3 l2      I get the output as,               a3 5 l2     a6 4 l5     a7 3 l2      As we can see, `l2` is repeated twice.


title: Unreferenced inodes on EC2 linux instance

text: I have an Amazon EC2 instance which I am using as a NFS file server. It's using a 5x1TB volume RAID0 array. The system is very I/O intensive and files are being written/copied/deleted through the NFS share all the time. Quite often, I notice that there's a BIG discrepancy between the disk space used and the available free space. (I am checking while the system is idle and no files are being written to the file share/system). My only "Fix" for this is to shutdown the instance and restart it (reboot doesn't work and just hangs the machine). When it restarts, it runs `fsck` and I can see in the system log (many) "unreferenced " Inodes being cleaned up (this is not the entire log):                  25.110924] EXT4-fs (dm-1): ext4_orphan_cleanup: deleting unreferenced inode 122291727     [   25.114687] EXT4-fs (dm-1): ext4_orphan_cleanup: deleting unreferenced inode 122291723     [   25.118610] EXT4-fs (dm-1): ext4_orphan_cleanup: deleting unreferenced inode 122291703     [   25.135184] EXT4-fs (dm-1): ext4_orphan_cleanup: deleting unreferenced inode 122291722     [   25.140005] EXT4-fs (dm-1): ext4_orphan_cleanup: deleting unreferenced inode 122291725     [   25.144013] EXT4-fs (dm-1): ext4_orphan_cleanup: deleting unreferenced inode 122291705     [   25.148008] EXT4-fs (dm-1): 735 orphan inodes deleted     [   25.150286] EXT4-fs (dm-1): recovery complete     [   26.126887] EXT4-fs (dm-1): mounted filesystem with ordered data mode. Opts: (null)     [  OK  ]      I can't find any solution for this anywhere online. Does anyone know what's causing this or how to prevent it? Or maybe fix it without unmounting the drive ? **Some more info:** Version information:               Linux version 3.10.42-52.145.amzn1.x86_64 (mockbuild@gobi-build-64003) (gcc version 4.8.2 20131212 (Red Hat 4.8.2-7) (GCC) ) #1 SMP Tue Jun 10 23:46:43 UTC 2014      RAID0 array mount on `/etc/fstab` as follows:               /dev/vg0/data /data ext4 defaults,auto,noatime,noexec 0 0      /etc/mdadm.conf:               DEVICE /dev/xvdk /dev/xvdj /dev/xvdi /dev/xvdh /dev/xvdg     ARRAY /dev/md0 metadata=1.2 name=ip-172-31-10-215:0 UUID=4c4fb472:e0540788:69a83d01:a75a8a3e      /etc/exports:               /data *(rw,sync)      Clients mount the NFS share as follows:               x.x.x.x:/data  /mnt/fileserver nfs defaults 0  0


title: How do I get NetworkManager to keep the same IP?

text: The DHCP-provided IP on my laptop changes periodically. It runs CentOS 6.5 and uses NetworkManager. My desktop, running Sabayon, on the same network, does not have this problem. How can I get NetworkManager to renew an existing DHCP lease instead of getting a new one?


title: problem with socks in proxychains

text: I'm trying to connect to a socks server using `proxychains`.   My `ProxyList` part of `proxychains.conf` is:               socks5   ip1.sockssrv.org      1080    MYUSER   MYPASS      When I try to use it; for example using this command:               proxychains wget -qO- ifconfig.me/ip      I'm getting this:               ProxyChains-3.1 (http://proxychains.sf.net)     |DNS-request| ifconfig.me      |DNS-response|: ifconfig.me is not exist      By disabling `proxy_dns`; it only prints version and doesn't connect at all:               ProxyChains-3.1 (http://proxychains.sf.net)        Note: The command works without `proxychains` and the socks server is up and works with `proxifier` (Windows application). What is the problem? Thanks


title: See server desktop in tightVNC

text: I installed _tightvncserver_ on one Linux machine and _xtightvncviewer_ on another Linux machine. I can connect from client computer to server computer without problems. There are two problems:   1. The screens are different. On the client computer I can see on desktop all the files from my _$HOME_ folder.   2. I can't see on server computer what is being done from client computer. Cursor movements, opening files, everything. I'm using _Ubuntu 11.04_ with _Xmonad_. Could the problems 1 and 2 be solved and _tightVNC_ will work as _teamviewer_?


title: How do I install hgview on Ubuntu?

text: I'm trying to install `hgview` on Ubuntu, but it's not working.               $ hg version     Mercurial Distributed SCM (version 2.1)     (see http://mercurial.selenic.com for more information)          Copyright (C) 2005-2012 Matt Mackall and others     This is free software; see the source for copying conditions. There is NO     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.          $ sudo apt-get install hgview     Reading package lists... Done     Building dependency tree            Reading state information... Done     Some packages could not be installed. This may mean that you have     requested an impossible situation or if you are using the unstable     distribution that some required packages have not yet been created     or been moved out of Incoming.     The following information may help to resolve the situation:          The following packages have unmet dependencies:       hgview: Depends: mercurial (>= 0.9.3)     E: Broken packages      Mercurial _is_ installed from the Ubuntu repository. As for `dpkg`, I get:               $ dpkg -l mercurial*     Desired=Unknown/Install/Remove/Purge/Hold     | Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend     |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)     ||/ Name                                           Version                                        Description     +++-==============================================-==============================================-============================================================================================================     ii  mercurial                                      2.1-0ppa1~lucid1                               easy-to-use, scalable distributed version control system     ii  mercurial-common                               2.1-0ppa1~lucid1                               easy-to-use, scalable distributed version control system (common files)     ii  mercurial-git                                  0.3.1-1~lucid1                                 Git plugin for Mercurial      What's going wrong?


title: No sound with fresh Kubuntu install

text: I've just taken the plunge and installed Kubuntu as my main desktop env but I can't get the sound to work, and was wondering if anyone would be so kind as to help me work out what the problem is. I don't even know where to start looking to be honest - I'm not a guru, so please be gentle. I saw somewhere that I should supply the below info to give you some idea of what's going on, please comment if you need any more info. Maybe worth noting that I've played about with all the settings in 'Playback Devices' and no combination produced any sound.               martyn@martyn-desktop-kubuntu:~$ cat /proc/asound/cards     0 [Intel          ]: HDA-Intel - HDA Intel                                                                                HDA Intel at 0xfb6f8000 irq 85                                                                                1 [Q9000          ]: USB-Audio - QuickCam Pro 9000                                                                                Logitech, Inc. QuickCam Pro 9000 at usb-0000:00:1a.7-6.1.2, high speed                                                                                2 [Generic        ]: HDA-Intel - HD-Audio Generic                                                                                HD-Audio Generic at 0xfb7fc000 irq 86       The actual devices I have are a 'Cypress HDMI Audio [Radeon HD 5800 Series] Digital Stereo (HDMI)' which I'm not using, and a 'Internal Audio Analogue Surround 5.1' which I do want to use. There's also a 'QuickCam Pro 9000' attached to the computer. also               martyn@martyn-desktop-kubuntu:~$ lspci                                                                                00:00.0 Host bridge: Intel Corporation 5520/5500/X58 I/O Hub to ESI Port (rev 13)                                                                                00:01.0 PCI bridge: Intel Corporation 5520/5500/X58 I/O Hub PCI Express Root Port 1 (rev 13)                                                                                00:03.0 PCI bridge: Intel Corporation 5520/5500/X58 I/O Hub PCI Express Root Port 3 (rev 13)                                                                                00:07.0 PCI bridge: Intel Corporation 5520/5500/X58 I/O Hub PCI Express Root Port 7 (rev 13)                                                                                00:09.0 PCI bridge: Intel Corporation 5520/5500/X58 I/O Hub PCI Express Root Port 9 (rev 13)                                                                                00:14.0 PIC: Intel Corporation 5520/5500/X58 I/O Hub System Management Registers (rev 13)                                                                                00:14.1 PIC: Intel Corporation 5520/5500/X58 I/O Hub GPIO and Scratch Pad Registers (rev 13)     00:14.2 PIC: Intel Corporation 5520/5500/X58 I/O Hub Control Status and RAS Registers (rev 13)                                                                                00:14.3 PIC: Intel Corporation 5520/5500/X58 I/O Hub Throttle Registers (rev 13)                                                                                00:1a.0 USB Controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #4     00:1a.1 USB Controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #5     00:1a.2 USB Controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #6     00:1a.7 USB Controller: Intel Corporation 82801JI (ICH10 Family) USB2 EHCI Controller #2     00:1b.0 Audio device: Intel Corporation 82801JI (ICH10 Family) HD Audio Controller     00:1c.0 PCI bridge: Intel Corporation 82801JI (ICH10 Family) PCI Express Root Port 1     00:1c.2 PCI bridge: Intel Corporation 82801JI (ICH10 Family) PCI Express Root Port 3     00:1c.4 PCI bridge: Intel Corporation 82801JI (ICH10 Family) PCI Express Root Port 5     00:1c.5 PCI bridge: Intel Corporation 82801JI (ICH10 Family) PCI Express Root Port 6     00:1d.0 USB Controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #1     00:1d.1 USB Controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #2     00:1d.2 USB Controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #3     00:1d.7 USB Controller: Intel Corporation 82801JI (ICH10 Family) USB2 EHCI Controller #1     00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 90)     00:1f.0 ISA bridge: Intel Corporation 82801JIR (ICH10R) LPC Interface Controller     00:1f.2 IDE interface: Intel Corporation 82801JI (ICH10 Family) 4 port SATA IDE Controller #1     00:1f.3 SMBus: Intel Corporation 82801JI (ICH10 Family) SMBus Controller     00:1f.5 IDE interface: Intel Corporation 82801JI (ICH10 Family) 2 port SATA IDE Controller #2     02:00.0 VGA compatible controller: ATI Technologies Inc Cypress [Radeon HD 5800 Series]     02:00.1 Audio device: ATI Technologies Inc Cypress HDMI Audio [Radeon HD 5800 Series]     04:00.0 PCI bridge: PLX Technology, Inc. PEX 8613 12-lane, 3-Port PCI Express Gen 2 (5.0 GT/s) Switch (rev ba)     05:01.0 PCI bridge: PLX Technology, Inc. PEX 8613 12-lane, 3-Port PCI Express Gen 2 (5.0 GT/s) Switch (rev ba)     05:02.0 PCI bridge: PLX Technology, Inc. PEX 8613 12-lane, 3-Port PCI Express Gen 2 (5.0 GT/s) Switch (rev ba)     06:00.0 USB Controller: NEC Corporation uPD720200 USB 3.0 Host Controller (rev 03)     07:00.0 SATA controller: Marvell Technology Group Ltd. 88SE9123 PCIe SATA 6.0 Gb/s controller (rev 10)     08:00.0 Ethernet controller: Marvell Technology Group Ltd. 88E8056 PCI-E Gigabit Ethernet Controller (rev 12)     09:00.0 SATA controller: JMicron Technology Corp. JMB362/JMB363 Serial ATA Controller (rev 03)     09:00.1 IDE interface: JMicron Technology Corp. JMB362/JMB363 Serial ATA Controller (rev 03)     0a:00.0 Ethernet controller: Marvell Technology Group Ltd. 88E8056 PCI-E Gigabit Ethernet Controller (rev 12)     0c:02.0 FireWire (IEEE 1394): VIA Technologies, Inc. VT6306/7/8 [Fire II(M)] IEEE 1394 OHCI Controller (rev c0)     ff:00.0 Host bridge: Intel Corporation Xeon 5500/Core i7 QuickPath Architecture Generic Non-Core Registers (rev 05)     ff:00.1 Host bridge: Intel Corporation Xeon 5500/Core i7 QuickPath Architecture System Address Decoder (rev 05)     ff:02.0 Host bridge: Intel Corporation Xeon 5500/Core i7 QPI Link 0 (rev 05)     ff:02.1 Host bridge: Intel Corporation Xeon 5500/Core i7 QPI Physical 0 (rev 05)     ff:03.0 Host bridge: Intel Corporation Xeon 5500/Core i7 Integrated Memory Controller (rev 05)     ff:03.1 Host bridge: Intel Corporation Xeon 5500/Core i7 Integrated Memory Controller Target Address Decoder (rev 05)     ff:03.4 Host bridge: Intel Corporation Xeon 5500/Core i7 Integrated Memory Controller Test Registers (rev 05)     ff:04.0 Host bridge: Intel Corporation Xeon 5500/Core i7 Integrated Memory Controller Channel 0 Control Registers (rev 05)     ff:04.1 Host bridge: Intel Corporation Xeon 5500/Core i7 Integrated Memory Controller Channel 0 Address Registers (rev 05)     ff:04.2 Host bridge: Intel Corporation Xeon 5500/Core i7 Integrated Memory Controller Channel 0 Rank Registers (rev 05)     ff:04.3 Host bridge: Intel Corporation Xeon 5500/Core i7 Integrated Memory Controller Channel 0 Thermal Control Registers (rev 05)     ff:05.0 Host bridge: Intel Corporation Xeon 5500/Core i7 Integrated Memory Controller Channel 1 Control Registers (rev 05)     ff:05.1 Host bridge: Intel Corporation Xeon 5500/Core i7 Integrated Memory Controller Channel 1 Address Registers (rev 05)     ff:05.2 Host bridge: Intel Corporation Xeon 5500/Core i7 Integrated Memory Controller Channel 1 Rank Registers (rev 05)     ff:05.3 Host bridge: Intel Corporation Xeon 5500/Core i7 Integrated Memory Controller Channel 1 Thermal Control Registers (rev 05)     ff:06.0 Host bridge: Intel Corporation Xeon 5500/Core i7 Integrated Memory Controller Channel 2 Control Registers (rev 05)     ff:06.1 Host bridge: Intel Corporation Xeon 5500/Core i7 Integrated Memory Controller Channel 2 Address Registers (rev 05)     ff:06.2 Host bridge: Intel Corporation Xeon 5500/Core i7 Integrated Memory Controller Channel 2 Rank Registers (rev 05)     ff:06.3 Host bridge: Intel Corporation Xeon 5500/Core i7 Integrated Memory Controller Channel 2 Thermal Control Registers (rev 05)


title: Creating a virtual interface to always access a DHCPed interface with the same ip

text: I have an interface that on connect always gets a new IP. So I want to create a virtual interface with a static IP that "relays" everything over the physical interface.   This would be useful to bind applications to the virtual interface that do not support binding to an interface name.   I imagine this being possible with ethernet bridges and/or iptables but I do not really have a clue.      _edit:_ A network alias is not an option because I can only use the provided IP.


title: Awesome: keyboard layout switch

text: I use awesome as a window manager under gnome (debian system) and I made a widget to switch keyboard layout by this code:               -- Keyboard map indicator and changer         kbdcfg = {}         kbdcfg.cmd = "setxkbmap"         kbdcfg.layout = { { "us", "" }, { "ru", "phonetic" } }         kbdcfg.current = 1  -- us is our default layout         kbdcfg.widget = widget({ type = "textbox", align = "right" })         kbdcfg.widget.text = " " .. kbdcfg.layout[kbdcfg.current][1] .. " "         kbdcfg.switch = function ()            kbdcfg.current = kbdcfg.current % #(kbdcfg.layout) + 1            local t = kbdcfg.layout[kbdcfg.current]            kbdcfg.widget.text = " " .. t[1] .. " "            os.execute( kbdcfg.cmd .. " " .. t[1] .. " " .. t[2] )         end              -- Mouse bindings         kbdcfg.widget:buttons(awful.util.table.join(             awful.button({ }, 1, function () kbdcfg.switch() end)         ))     -- Alt + Right Shift switches the current keyboard layout         awful.key({ "Mod1" }, "Shift_R", function () kbdcfg.switch() end),      It works, however there is a serious problem with keyboard behavior. When I switch to ru layout non of my keyboard bindings works. Awesome bindings don't work. For example vim shortcuts don't also work and etc. How I can solve this problem?


title: Ffmpeg problems on centOS 5.8 64 bit

text: I did install ffmpeg with winff, unsuccessfully when I try converting avi to x264, it says I don't have it. When I try to convert mp4 to Xvid I get unknown encoder 'libxvid'. It's like nothing really works except avi Msi compatible using winff, anybody help?


title: "TouchPad lost synchronization" errors in dmesg

text: My openSUSE 11.3 laptop is running slow. `dmesg` shows the following errors:               [  733.162161] psmouse.c: TouchPad at isa0060/serio4/input0 lost synchronization, throwing 5 bytes away.     [  774.230841] psmouse.c: TouchPad at isa0060/serio4/input0 lost synchronization, throwing 2 bytes away.     [  856.344570] psmouse.c: TouchPad at isa0060/serio4/input0 lost synchronization, throwing 1 bytes away.     [  898.451626] psmouse.c: TouchPad at isa0060/serio4/input0 lost synchronization, throwing 1 bytes away.      Is that causing the slowdown? How do I fix it?


title: rsync'ing multiple {src,dest} pairs

text: I have a remote server on which I am deploying code. I am currently using `scp` to upload code, but `scp` is very slow and I'd like to switch to `rsync` (or something else which is more efficient). The bottleneck is in making the `ssh` connection, so I'd like to minimize the number of connections I make to the server. Locally, my build process outputs a directory `out` containing `bin`, `lib` and `etc` subdirectories. I am pushing a subset of the output files to matching positions on the remote server. My `scp` commands look like this:               scp out/bin/$BINFILES remote:/usr/bin     scp out/lib/$LIBFILES remote:/usr/lib     scp out/etc/$ETCFILES remote:/etc      This makes three connections to the remote server, and copies the files in full even if they haven't been modified. This is what I did with `rsync`:               rsync -e ssh -avz out/bin/$BINFILES remote:/usr/bin     rsync -e ssh -avz out/lib/$LIBFILES remote:/usr/lib     rsync -e ssh -avz out/etc/$ETCFILES remote:/etc      which is faster (compression and elimination of duplicates), but still makes three connections to the remote server. Is there a way to achieve these three copies using a single `rsync` command? I'm open to e.g. putting all {src,dest} pairs in a temporary file before copying, if that will work. I'm also open to trying a different tool, but it should be available for OS X (my current development platform), and it should preferably support transfer optimizations like `rsync` does.


title: sudoers conditional/combo command is possible?

text: I want to allow sudo this way:               myuser ALL=NOPASSWD:/usr/bin/pkill -fx "/usr/sbin/nethogs -v 3 -s" || /usr/sbin/nethogs -v 3 -s      so I get only a single running instance of nethogs. visudo accepts it, but I am unable to run these commands without a password... Failed attempts:               sudo '/usr/bin/pkill -fx "/usr/sbin/nethogs -v 3 -s" || /usr/sbin/nethogs -v 3 -s'     sudo /usr/bin/pkill -fx "/usr/sbin/nethogs -v 3 -s" || sudo /usr/sbin/nethogs -v 3 -s      PS.: this version of nethogs is compiled from its cvs on sf.net


title: Out of range error on monitor after installing video card drivers

text: I have a dual boot system with windows xp and a fresh install of linux mint 12 lxde. I installed the video card drivers for my ati radeon (hd5570). After this I get an out of range error on my monitor every time I reboot. The grub menu is still visible though. I don't know if it is related but before installing the drivers I also used xrandr to add the native resolution of my monitor 1280x1024 and saved that in my xprofile. I used the guide from here https://wiki.ubuntu.com/X/Config/Resolution#Adding_undetected_resolutions. I added something similar:               xrandr --newmode "1280x1024_60.00"   38.25  800 832 912 1024  600 603 607 624 -hsync +vsync     xrandr --addmode VGA-0 1280x1024     xrandr --output VGA-0 --mode 1280x1024      BTW: I commented out these lines before installing the video card drivers. I'm just not exactly sure what is the cause of the error. Setting the resolution to 1280x1024 or installing the drivers. How can I solve this problem? How can I uninstall the video card driver from command line? I don't really care about having these drivers or not, there was a popup saying that there are proprietary drivers available and I installed it. I probably won't use this for gaming. Any help is appreciated.


title: Low brightness in a Intel Mobile GM956/GL960

text: I'm installing Debian stable (7.0) on a old Dell Vostro 1500 and I noticed that the brightness is always low. I've searched around and the only thing I've found is adding `nomodeset acpi_backlight=vendor` to the kernel init commands, that only mess up with the graphic card and reduces the maximum resolution. How can I really showoff the real brightness of the screen?


title: How exactly does `if $cmd ; then $cmd ; fi` differ from `$cmd && $cmd`?

text: In an answer to another _very good_ question I made the following assertion: According to my reading of the POSIX specs, the use of one or the other makes no difference from a parsing standpoint. POSIX specifies that `&&||` lists are _compound commands_ which means that the entire list must be read in and parsed before execution of the constituent simple commands. POSIX also specifies a command _shall not be expanded_ if it follows an `||OR` and another command with a 0-exit status. When you consider that a command following an `&&||` reserved word can easily be another grouped `{ command || ( command ; list) ; }` makes each branch of the `&&||` or list its own _compound command_. But POSIX also specifies that each branch of the `if...;then...;else...fi` construct be its own _compound command_ in this way:               if compound-list     then         compound-list     [elif compound-list     then         compound-list] ...     [else         compound-list]     fi      > The `if` _compound-list_ shall be executed; if its `exit` status is zero, > the `then` _compound-list_ shall be executed and the command shall > complete... It is this specification that the string following a `then...` or `else...` reserved words are _compound commands_ in their own right and not merely _simple commands_ that means the shell's parser must denote them with a command and a delimiter in order to operate correctly. So basically, `then ' '` doesn't work for the same reason:               function()     sh: line 2: syntax error: unexpected end of file       ...doesn't - it doesn't make any sense. I know that...               [ -e doesntexist ] && $((i=1)) ; echo $i      ...will short-circuit any side-effects and result in only a `\n`ewline as a result of the spec I noted in my answer. The result of...               if [ -e doesntexist ]          then $((i=1))     fi     echo $i      ...is identical. But I honestly use `if...fi` so seldom that I'm unsure if I've misread something and so when I received a comment indicating my interpretation was incorrect and that if I had further questions on the matter I need only ask I deleted the answer in lieu of this question: how have I got it wrong - how do they differ?


title: Instantaneous Puppet Deployments with MCollective

text: Note: I'm not sure where this question belongs. Perhaps it would belong better on Server Fault, but as I'm primarily asking for hacking and home-networking purposes, I'm asking here. Plus it'd probably get flame-trolled off the site in less than 10-100 seconds, which is why I avoid using Server Fault. I'm looking to setup and start messing around with having a Puppet Master and several Puppet clients to get the feel for working with Puppet with an actual master. By default, Puppet client instances update (as far as I know) every 30 minutes, asking the master for their latest configuration and applying it as it comes down. I've heard that MCollective can make these changes essentially instantly as it uses a message queue and parallelism to push commands in real time to clients. I've been trying to find out how to do this with a Puppet Master and Puppet Clients, but it seems that MCollective is much bigger of a project than just a real-time plugin for a Puppet Master. How do I setup a simple Puppet Master, an MCollective Server (and message queue), and my Puppet Clients to get changes to Puppet configuration in real time? (I understand generally how to `apt-get install redis-server puppetmaster mcollective`, but I'm looking to understand how integrating MCollective with the Puppet Master actually works.)


title: Error while installing wireless-bcm43142-dkms-6.20.55.19: dependency linux-headers is not satisfiable

text: I have to install a .deb file with the firmware for the wifi card (This is the name of the file: wireless-bcm43142-dkms-6.20.55.19_amd64.deb; I've downloaded the file from here: http://www.filewatcher.com/m/wireless- bcm43142-dkms_6.20.55.19-1_amd64.deb.1337086-0.html ). When I try to install the .deb file, I double click on the file but it gives to me this error:               "Failed to install file. Unknown error. Please refer to detailed report and report in your distribution bug tracker.          More details:  This package is uninstallable. Dependency is not satisfiable: linux-headers-generic|linux-headers".      How can I fix it, so that i will be able to install the .deb file? I've already update the system, through the commands `apt-get update` and `apt-get upgrade` and `apt-get dist-upgrade`. Moreover I've also tried to install linux-headers-generic (Don't know if this could be the solution) with the command: apt-get install linux-headers- generic. But it gives this error:               Package linux-headers-generic is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source.     E: Package "linux-headers-generic" has no installation candidate."      This is the output of `dpkg -i wireless-bcm43142-dkms-6.20.55.19_amd64.deb`:                   Selecting previously unselected package wireless-bcm43142-dkms-6.20.55.19_amd64-deb          (Reading database… 347343 files and directories currently installed.)          Unpacking wireless-bcm43142-oneiric-dkms (from wireless-bcm43142-dkms-6.20.55.19_amd64.deb) …          dpkg: dependency problems prevent configuration of wireless-bcm43142-oneiric-dkms:         wireless-bcm43142-oneiric-dkms depends on linux-headers-generic | linux-headers; however:          Package linux-headers-generic is not installed.          Package linux-headers is not installed.          dpkg: error processing wireless-bcm43142-oneiric-dkms (--install):      dependency problems - leaving unconfigured      Errors were encountered while processing:       wireless-bcm43142-oneiric-dkms      Whereas the output of apt-get -f install :               Reading package lists… Done     Building dependency tree     Reading state information… Done     Correcting dependencies… Done     The following extra packages will be installed:      linux-headers-3.2.0-4-common-rt linux-headers-3.2.0.4-rt-amd64 linux-kbuild-3.2     The following NEW packages will be installed:      linux-headers-3.2.0-4-common-rt linux-headers-3.2.0.4-rt-amd64 linux-kbuild-3.2     0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.     1 not fully installed or removed.     Need to get 4,433 kB of archives.     After this operation, 27.9 MB of additional disk space will be used.     Do you want to continue [Y/n]? Y     Get:1 http://security.debian.org/ wheezy/updates/main linux-headers-3.2.0-4-common-rt amd64 3.2.57-3+deb7u1 [3576 kB]     Get:2 http://debian.net/debian/ wheezy/ main linux-kbuild-3.2 amd64 3.2.17-1 [238 kB]     Get:3 http://security.debian.org/ wheezy/ updates/main linux-headers-3.2.0-4-rt-amd64 amd64 3.2.57-3+deb7u1 [618 kB]     Fetched 4,433 kB in 13s (325 kB/s)     Selecting previously unselected package linux-headers-3.2.0-4-common-rt.     (Reading database… 347406 files and directories currently installed.)     Unpacking linux-headers-3.2.0-4-common-rt (from .../linux-headers-3.2.0-4-common-rt_3.2.57-3+deb7u1_amd64.deb) …     Selecting previously unselected package linux-kbuild-3.2.     Unpacking linux-kbuild-3.2 (from .../linux-kbuild-3.2_3.2.17-1_amd64.deb) …     Selecting previously unselected package linux-headers-3.2.0-4-rt-amd64.     Unpacking linux-headers-3.2.0-4-rt-amd64 (from .../linux-headers-3.2.0-4-rt-amd64_3.2.57-3+deb7u1_amd64.deb) …     Setting up linux-headers-3.2.0-4common-rt (3.2.57-3+deb7u1) …     Setting up linux-kbuild-3.2 (3.2.17-1) …     Setting up linux-headers-3.2.0-4-rt-amd64 (3.2.57-3+deb7u1) …     Examining /etc/kernel/header_postinst.d.     run-parts: executing /etc/kernel/header_postinst.d/dkms 3.2.0-4-rt-amd64     Setting up wireless-bcm43142-oneiric-dkms (6.20.55.19~bdcom0602.0400.1000.0400-0somerville1) …     Loading new wireless-bcm43142-oneiric-dkms-6.20.55.19~bdcom0602.0400.1000.0400 DKMS files …     First Installation: checking all kernels…     Building only for 3.12-kalil-amd64     Building for architecture x86_64     Building initial module for 3.12-kalil-amd64     Error! Bad return status for module build on kernel: 3.12-kalil-amd64 (x86_64)     Consult /var/lib/dkms/wireless-bcm43142-oneiric-dkms/6.20.55.19~bdcom0602.0400.1000.0400/build/make.log for more information.     update-initramfs: deferring update (trigger activated)     Processing triggers for initramfs-tools…     update-initramfs: Generating /boot/initrd.img-3.12-kalil-amd64      Here's the make.log :               DKMS make.log for wireless-bcm43142-oneiric-dkms-6.20.55.19~bdcom0602.0400.1000.0400 for kernel 3.12-kali1-amd64 (x86_64)     Wed May 14 10:44:27 PDT 2014     make: Entering directory `/usr/src/linux-headers-3.12-kali1-amd64'     CFG80211 API is prefered for this kernel version     Using CFG80211 API       LD      /var/lib/dkms/wireless-bcm43142-oneiric-dkms/6.20.55.19~bdcom0602.0400.1000.0400/build/built-in.o       CC [M]  /var/lib/dkms/wireless-bcm43142-oneiric-dkms/6.20.55.19~bdcom0602.0400.1000.0400/build/src/shared/linux_osl.o       CC [M]  /var/lib/dkms/wireless-bcm43142-oneiric-dkms/6.20.55.19~bdcom0602.0400.1000.0400/build/src/wl/sys/wl_linux.o     /var/lib/dkms/wireless-bcm43142-oneiric-dkms/6.20.55.19~bdcom0602.0400.1000.0400/build/src/wl/sys/wl_linux.c:50:24: fatal error: asm/system.h: No such file or directory     compilation terminated.     make[3]: *** [/var/lib/dkms/wireless-bcm43142-oneiric-dkms/6.20.55.19~bdcom0602.0400.1000.0400/build/src/wl/sys/wl_linux.o] Error 1     make[2]: *** [_module_/var/lib/dkms/wireless-bcm43142-oneiric-dkms/6.20.55.19~bdcom0602.0400.1000.0400/build] Error 2     make[1]: *** [sub-make] Error 2     make: *** [all] Error 2     make: Leaving directory `/usr/src/linux-headers-3.12-kali1-amd64'


title: Installing Ubuntu-13.0 Desktop in Qemu

text: Following are the details of my system: Fedora Core-18, i686. I am trying to install ubuntu in the qemu. Following are the commands I executed:               qemu-img create ubuntu.img 8G     qemu-system-i386 -hda ubuntu.img -boot d -cdrom ./ubuntu-13.10-desktop-i386.iso -m 512      After executing the second command the window pops up and it shows UBUNTU getting started but after that the window just becomes black with no activity. Not sure how to proceed on the same. Any tips/hints where I am going wrong.


title: qemu emulator for raspberry

text: I am trying to emulate a raspberry pi on ubuntu. I have tried several ways using several tutorials but every time, the emulator logs this:                   scsi: 0:0:0:0 ABORT operation started         scsi: 0:0:0:0 ABORT operation timed-out.         scsi: 0:0:0:0 DEVICE RESET operation started         scsi: 0:0:0:0 DEVICE RESET operation timed-out.         scsi: 0:0:0:0 BUS RESET operation started         scsi: 0:0:0:0 BUS RESET operation timed-out.         scsi: 0:0:0:0 HOST RESET operation started         sym0: SCSI BUS has been reset.         scsi: 0:0:0:0 HOST RESET operation timed-out.         scsi: 0:0:0:0 Device offlined - not ready after error recovery      This list is repeated over and over again.


title: Strange screen ghosting issue with GNOME 3.8.4 on Fedora 19

text: Since migrating to Fedora 19 and GNOME 3.8.4 I've been noticing a strange ghosting of images on my screen, where pieces of popups and parts of GUIs will sometime remain around. Running `xwininfo` doesn't report them as actually there so I'm kind of at a loss as to:   1. what is causing these   2. how to get rid of them   3. curious if anyone else has been experiencing them as well ### Examples Here are 2 screenshots that show these mysterious popup ghosts. _**#1_**                             ![ss of ghost image #1](http://i.stack.imgur.com/Bx10U.png) _**#2_**                              ![ss of ghost image #2](http://i.stack.imgur.com/GieHq.png) ### EDIT #1 _lspci -vv output_               $ sudo lspci -vvv -s 00:02.0     00:02.0 VGA compatible controller: Intel Corporation Core Processor Integrated Graphics Controller (rev 02) (prog-if 00 [VGA controller])         Subsystem: Lenovo Device 215a         Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+         Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-         Latency: 0         Interrupt: pin A routed to IRQ 41         Region 0: Memory at f2000000 (64-bit, non-prefetchable) [size=4M]         Region 2: Memory at d0000000 (64-bit, prefetchable) [size=256M]         Region 4: I/O ports at 1800 [size=8]         Expansion ROM at <unassigned> [disabled]         Capabilities: [90] MSI: Enable+ Count=1/1 Maskable- 64bit-             Address: fee0f00c  Data: 41a1         Capabilities: [d0] Power Management version 2             Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)             Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-         Capabilities: [a4] PCI Advanced Features             AFCap: TP+ FLR+             AFCtrl: FLR-             AFStatus: TP-         Kernel driver in use: i915        * **Video hardware:** Appears to be Intel card, not sure of specific model, I have a ThinkPad T410, Type #: 2516-CTO.   * **Driver:** Appears to be using the i915 Kernel module as a driver.


title: How can I view packages from a specific repository?

text: In my `/etc/apt/sources.list` if I add the path:               deb http://debian.meebey.net/pkg-mono ./      Can I view packages from this specific repository alone?


title: How do I use cut to separate by multiple whitespace?

text: I would like to get the last column of this sample:               [  3]  1.0- 2.0 sec  1.00 MBytes  8.39 Mbits/sec     [  3]  2.0- 3.0 sec   768 KBytes  6.29 Mbits/sec     [  3]  3.0- 4.0 sec   512 KBytes  4.19 Mbits/sec     [  3]  4.0- 5.0 sec   256 KBytes  2.10 Mbits/sec     ...      If I use               cut -d\  -f 13      I get               Mbits/sec     6.29     4.19     2.10      because sometimes there are additional spaces in between.


title: Puppet. Firewall module syntax

text: What mean "->" in puppetlabs examples on this page ![enter image description here](http://i.stack.imgur.com/PLvWW.png)


title: How do I access the Lubuntu menu in Openbox?

text: Is there a way to include the Lubuntu applications menu in an Openbox menu (`~/.config/openbox/menu.xml`) so I can use it within a pure Openbox session?


title: Unable to install ia32-libs in Debian Wheezy

text: I was trying to install ia32-libs in Debian Wheezy. I got the error               The following packages have unmet dependencies:      ia32-libs : Depends: ia32-libs-i386 but it is not installable     E: Unable to correct problems, you have held broken packages.      I am using               # uname -a     Linux debian 3.2.0-4-amd64 #1 SMP Debian 3.2.41-2 x86_64 GNU/Linux      My sources.lst is               # cat /etc/apt/sources.list     #           # deb cdrom:[Debian GNU/Linux 7.0.0 _Wheezy_ - Official amd64 DVD Binary-1 20130504-14:44]/ wheezy contrib main          # deb cdrom:[Debian GNU/Linux 7.0.0 _Wheezy_ - Official amd64 DVD Binary-1 20130504-14:44]/ wheezy contrib main          deb http://security.debian.org/ wheezy/updates main contrib     deb-src ftp://ftp.iitm.ac.in/debian/ wheezy/updates main contrib          # wheezy-updates, previously known as 'volatile'     # A network mirror was not selected during install.  The following entries     # are provided as examples, but you should amend them as appropriate     # for your mirror of choice.     #     deb http://ftp.debian.org/debian/ wheezy-updates main contrib     deb http://http.us.debian.org/debian/ wheezy contrib non-free main     # deb-src http://ftp.debian.org/debian/ wheezy-updates main contrib     deb http://ftp.us.debian.org/debian stable main contrib non-free     deb http://security.debian.org/ wheezy/updates main contrib non-free


title: tmux with iterm2 attach a remote session

text: I'm using the Tmux integrating with ITerm2, which can create a tab in ITerm 2 for each window created by Tmux. But somehow this doesn't make much sense for the usual SSH scenario, where we first SSH to a remote host and work with multiple windows through Tmux. I want to have multiple tabs in ITerm 2, sharing one SSH connection, and in one Tmux sesson. Is it possible?


title: How to open all the files in a directory, using terminal, in emacs?

text: I've 4 java files in a directory, which I want to work with in emacs. How do I open them all with one command?


title: Unable to modify log level in samba

text: `log level` is present and set to three. However I don't see it when I do a `testparm` and I get next to no logs (I can see restarts and about it not being able to connect to `cupsd`) which doesn't seem like `log level` is anywhere close to three, but nothing more shows up regardless of what `log level` is set to in `smb.conf`. This isn't a terribly complicated problem but I can't figure out a way around it.


title: File containing ext filesystem

text: Let's suppose I create a file, map it to `/dev/loop0`, and create a LUKS partition inside               dd if=/dev/zero of=myfile bs=1M count=1000     losetup /dev/loop0 myfile      cryptsetup -c aes-cbc-essiv:sha256 -s 256 -v -y luksFormat /dev/loop0      I then open the encrypted partition               cryptsetup luksOpen /dev/loop0 myfile      Now, I have my encrypted file appear as a disk `/dev/mapper/myfile`. I need to create a filesystem before I can use it. Here is my question. Are there any default options with ext4 filesystem, that I should change to make my setup optimal? My presumption is, that ext4 is expected to be used on HDD which are substantially bigger than my 1GB file. I am therefore wondering whether I should adjust some options Also, I am no sure whether or not it makes sense to use journal inside a file (this file is already stored on a ext4 filesystem with journal) Usually, the default options are:               $ tune2fs -l /dev/mapper/sda5 | grep 'Filesystem features'     Filesystem features:      has_journal ext_attr resize_inode dir_index filetype needs_recovery extent flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize


title: incorrect lines display in ssh console

text: I have problem with my console drawing lines. The problem is when I connect through ssh to server everything draws ok. But when I use up arrow key to show last used commands it often leaves few characters after `$` sign:               user@host:~$ cd /var/www_vhosts/     user@host:/var/www_vhosts$ ls -la instalator-paczek/     razem 16     drwxrwxr-x  3 root        root       4096 02-20 10:48 .     drwxr-xr-x 13 root        root       4096 05-17 11:11 ..     -rwxrw-r--  1 root        developers 3380 05-29 11:03 instalator-paczek.sh     drwxrwxr-x  2 user developers 4096 05-29 11:03 logi     user@host:/var/www_vhosts$ cd instalator-paczek/     user@host:/var/www_vhosts/instalator-paczek$ nano instalator-paczek.sh      user@host:/var/www_vhosts/instalator-paczek$ cp -r inst     user@host:/var/www_vhosts/instalator-paczek$ nano /etc/issue     user@host:/var/www_vhosts/instalator-paczek$ uname     Linux     user@host:/var/www_vhosts/instalator-paczek$ uname -a     Linux host 2.6.32-5-amd64 #1 SMP Sun Sep 23 10:07:46 UTC 2012 x86_64 GNU/Linux     user@host:/var/www_vhosts/instalator-paczek$ cat /etc/issue     Debian GNU/Linux 6.0 \n \l     # here I use up arrow key to display last used commands and everything is ok until it show last: "cp -r in..." command     # "cp -r inst" is shown and next last used commands are shown after those 10 characters. I displays them like:     # $ cp -r instls -la     # $ cp -r instcd directory      # etc.     # I tried using backspace but it clear characters just until "cp -r inst", not even one more     # prompt is shown correctly only after i press enter or ^C     user@host:/var/www_vhosts/instalator-paczek$ cp -r instnano /etc/issue      user@host:/var/www_vhosts/instalator-paczek$ ls     instalator-paczek.sh  logi      What is even more irritating is what happens when I type more characters than console width. Cursor somehow goes back to the beginning of line and overwrites prompt:               /d/asd/as/d/asd/asd/as/d/asd/asdww_vhosts/instalator-paczek$ ls -la asdkasdasdasd/asdasdasd/asdasdasdasdasdas/dasdsdaas/d/asd/as/d/asd/as      I can't use any long commands because it overwrites beginning and I can't see if I typed everything correctly. Long command when pasted inside console works even if display is corrupted. It's like only display is corrupted but command itself is ok. I have ubuntu 12.10 and use `Konsole` as console application. On server there is `Debian GNU Linux 6.0` and xterm.               user@host:/var/www_vhosts/instalator-paczek$ echo $TERM     xterm      It only happens with this server other servers I connect works good with `Konsole`. How to fix this? ### EDIT Is this possible that those errors are occurring because there is no `xterm` installed on server and there is no resize command?               user@host:~$ stty -a     speed 38400 baud; rows 57; columns 151; line = 0;     intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R;     werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;     -parenb -parodd cs8 -hupcl -cstopb cread -clocal -crtscts     -ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon ixoff -iuclc -ixany -imaxbel -iutf8     opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0     isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke     user@host:~$ stty -a     speed 38400 baud; rows 57; columns 172; line = 0;     intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V;     flush = ^O; min = 1; time = 0;     -parenb -parodd cs8 -hupcl -cstopb cread -clocal -crtscts     -ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon ixoff -iuclc -ixany -imaxbel -iutf8     opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0     isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke      It seems like resizing console window also changes `stty`. **EDIT2** I've installed `xterm` package on server. I've logged out and log in again but problem is still the same. Should I restart server after installing `xterm` or something?


title: Solarized color definitions in vimrc file

text: The solarized theme defines some base colors and assigns those to variables, as seen here. I would like to know how I can use these color definitions in my `.vimrc` file. Currently, I use pathogen to load solarized and it is loaded with a simple `syntax enabled` and `colorscheme solarized`, but when I want to reference e.g. `s:base00` in my `.vimrc` file, I get an error:               E421: Color name or number not recognized: ctermfg=s:base00


title: Cannot "resume" music

text: I've had the following issue across multiple music players and multiple distro's. Currently I am experiencing it in Rhythmbox on Arch Linux. Whenever I play music and then pause a track I am unable to resume it, it simply seems to "stay paused". However when I manually skip ahead in a track it works just fine. Similarly my music seems to stop playing slightly before the end of a trakc and then just "stops", I have to manually skip to the next track. My sound is coming through a port in my monitor, which receives the sound via the HDMI cable. However I've also tried the audio jack coming straight from the motherboard with the same results. Any ideas why this might be happening? Edit: additional info as requested: `rhythmbox -d` log: http://pastebin.com/rueUaNMZ (relevant entries appear to start at line 2017, nothing of value that I can see though). I opened Rhythmbox, pressed play, pressed pause, pressed play again (didnt work) then closed Rhythmbox. Hardware info:               **** List of PLAYBACK Hardware Devices ****     card 0: PCH [HDA Intel PCH], device 0: ALC888-VD Analog [ALC888-VD Analog]       Subdevices: 1/1       Subdevice #0: subdevice #0     card 0: PCH [HDA Intel PCH], device 1: ALC888-VD Digital [ALC888-VD Digital]       Subdevices: 1/1       Subdevice #0: subdevice #0     card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]       Subdevices: 1/1       Subdevice #0: subdevice #0      I've tried both `ALC888-VD Analog` and `HDMI 0` It does nothing at all when I press play, nothing happens UI wise or audio wise. Long or short pause does not make any difference. I am using `pulseaudio-alsa` (Arch Linux).


title: How can I configure postfix to send mail from my domain?

text: I currently have a VPS set up with postfix and dovecot, running on a mail server located at `mail.noelforte.com`. The setup works fine for receiving mail, as whenever mail is sent to `@noelforte.com`, the MX records point the mail to my mail server and I can receive it. How can I configure postfix to send mail from `noelforte.com`, and not `mail.noelforte.com`, while still routing mail through the `mail.noelforte.com` server so it can be authenticated via SSL?


title: X Server won't load when I add a 50-synaptics.conf file inside the xorg.conf.d directory

text: I'm using Fedora 18. I'm trying to configure my synaptics touchpad, I need the tapping and the horizontal scrolling inside Awesome Window Manager. I've created a file at `/etc/X11/xorg.conf.d/50-synaptics.conf` with the following contents:               Section "InputDevice"             Identifier "touchpad"             Driver "synaptics"             MatchIsTouchpad "on"             Option "HorizEdgeScroll" "on"     EndSection      But when I start the system, it hangs at different points, one that I saw frequently is :               Failed to start Wait for Plymouth Boot Screen to Quit.     See 'systemctl status plymouth-quit-wait.service' for details.      If you want a log file or something just tell me how to get it.


title: Recommendation on filesystem for embedded device - RAM or USB

text: It's been 4 years since I stopped working on my Linux internet radio box. My Linux box was Ubuntu 6.04 with Ext3 fs. At user-space, everything works perfectly except I occasionally bumped into corrupted fs issue if I disconnect the USB forcefully. I'd love to hear recommendations from experts on which fs would suits my case. I also heard about compress the whole system into a file then uncompress them during bootstrap phase, then again I am clueless and really appreciate if someone could point me to right direction. Many thanks.


title: Why does pulseaudio handle the sound quality connection to a BT device?

text: I'm new to Linux and new to Bluetooth scripting too. What I have discovered so far is the following:   1. Bluez is the default BT stack.    2. BluezTools is a set of utilities you can use to more easily interact with Bluez   3. DBus is the interface Bluez connects to while interacting directly with the hardware.    4. PulseAudio is the subsystem responsible for producing audio on the system.  This makes sense. So let's say I have a set of BlueTooth headphones, what I would expect is (all after pairing and trusting), to be able to issue a command that can connect directly to a certain profile on the BT headphones. The technical path I have in mind would be something like :   1. Turn headphones on.    2. Issue a BluezTools command - such as **bt-audio -c**   3. Wait for the device to connect to the service I am after   4. PulseAudio should now pick up a new output device   5. Issue another command to change the audio from what it was to new output audio (the BT headphones).    6. Enjoy a seamless listening experience.  This all seems logical, but the actual implementation is not like this, and I am looking for the WHY, so I can better understand the problem and try and fix it. This is what actually happens:   1. Turn headphones on.    2. Issue a BluezTools command - such as **bt-audio -c**   3. Wait for the device to connect to the service I am after   4. PulseAudio should now pick up a new output device   5. Issue a PulseAudio command to change the audio profile from telephone quality to high fidelity.  Let me expand on this a bit. The bluetooth headset offers 2 quality modes (telephone and high fidelity). Only 1 is really suitable for listening to music. I would expect that the BT headphones expose each quality mode as a service, is this right? This assumption could be wrong, but I would expect something like **bt-audio -c highFidelityProfile** or **bt-audio -changeProfile highFidelityProfile** Instead it seems that Bluez just handles the RAW connection to the device, and from there you need to issue a : **pacmd set-card-profile $INDEX a2dp** This just seems fundamentally wrong. Why is the quality control in the audio subsystem, hence requiring a different implementation for pulse or alsa, or any other sound sub system out there? What am I missing? Why is it not possible to connect directly to a certain profile using Bluez / BluezTools etc?


title: Debian 6: Can ping default gateway, but not the IP address of any server on the Internet. Routes appear OK

text: I can't connect to the Internet from our server. I'm able to ping the default gateway, LAN connectivity works fine but I can't ping any public IP (say, 4.2.2.1, an open DNS server which I know replies to ping). When I do a traceroute, I don't even see the first hop. The configuration SEEMS to be fine (I'm no Linux expert, I might be missing something). I have the server's IP address set via DHCP, but the MAC address is bound to the IP. I wanted to see if that helped, but no:               root@linux:/home/user# ifconfig     eth0      Link encap:Ethernet  HWaddr b8:ac:6f:95:94:f4                 inet addr:192.168.0.150  Bcast:192.168.0.255  Mask:255.255.255.0               inet6 addr: fe80::baac:6fff:fe95:94f4/64 Scope:Link               UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1               RX packets:1223325 errors:0 dropped:146 overruns:0 frame:0               TX packets:974313 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:1000                RX bytes:983138831 (937.5 MiB)  TX bytes:742552277 (708.1 MiB)               Interrupt:16           lo        Link encap:Local Loopback                 inet addr:127.0.0.1  Mask:255.0.0.0               inet6 addr: ::1/128 Scope:Host               UP LOOPBACK RUNNING  MTU:16436  Metric:1               RX packets:5290 errors:0 dropped:0 overruns:0 frame:0               TX packets:5290 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:0                RX bytes:454378 (443.7 KiB)  TX bytes:454378 (443.7 KiB)      * * *               root@linux:/home/user# cat /etc/network/interfaces     # This file describes the network interfaces available on your system     # and how to activate them. For more information, see interfaces(5).     # The loopback network interface     auto lo     iface lo inet loopback     # The primary network interface     allow-hotplug eth0     auto eth0     iface eth0 inet dhcp      * * *               root@linux:/home/user# cat /etc/resolv.conf      domain REMOVED     search REMOVED     nameserver 4.2.2.1      * * *               root@linux:/home/user# ip route     192.168.0.0/24 dev eth0  proto kernel  scope link  src 192.168.0.150      default via 192.168.0.1 dev eth0


title: Tell fs to free space from deleted files NOW

text: Is there a way to tell the kernel to give back the free disk space now? Like a write to something in /proc/ ? Using Ubuntu 11.10 with ext4. This is probably an old and very repeated theme. After hitting 0 space only noticed when my editor couldn't save source code files I have open, which to my horror now have 0 byte size in the folder listing, I went on a deleting spree. I deleted 100's of MB of large files both from user and from root, and did some hardlinking too. Just before I did `apt-get clean` there was over 900MB in /var/cache/apt/archives, now there is only 108KB:               # du     108 /var/cache/apt/archives      An hour later still no free space and cannot save my precious files opened in the editor, but notice the disparity below:               # sync; df     Filesystem           1K-blocks      Used Available Use% Mounted on     /dev/sda4             13915072  13304004         0 100% /      Any suggestions? I shut off some services/processes but not sure how to check who might be actively eating disk space. More info               # dumpe2fs  /dev/sda4     Filesystem state:         clean     Errors behavior:          Continue     Filesystem OS type:       Linux     Inode count:              884736     Block count:              3534300     Reserved block count:     176715     Free blocks:              422679     Free inodes:              520239     First block:              0     Block size:               4096     Fragment size:            4096


title: Server pinning one core

text: I'm working on a server using Vert.x in Java and I'm noticing some performance problems when running on a dedicated server running Ubuntu 12.04. The server picks up the incoming HTTP requests, does some authentication using HMACs, parses the request bodies, does some text processing, and sends data out to a different server over UDP. There's no disk I/O, and only a relatively small amount of memory usage (nowhere close to swap). I'm doing loadtesting against the server using Grinder and AWS instances, but even with a well- geared server I'm unable to get more than 10k requests per second. What I'm seeing is that one core on the server machine is absolutely pinned, mostly in the kernel, and the other cores are only at ~20-25% utilization. My assumption is that the CPU is being spent on receiving incoming TCP connections. JMX reports most of my time in io.netty.channel.nio.NioEventLoop.select(), which I assume counts time waiting for the kernel, and strace shows a lot of time spent in futex() and epoll_wait(). I've tried playing with kernel settings to increase the throughput of the server, but I haven't had any luck. Profiler run: ![ss of profiler](http://i.stack.imgur.com/6wIZA.png) _original URL:http://i.stack.imgur.com/6wIZA.png_ CPU usage: ![ss of usage](http://i.stack.imgur.com/9mM5u.png) _original URL:http://i.stack.imgur.com/9mM5u.png_ I'm wondering what can be tuned at the kernel level to help with this. I've tried messing with TCP buffer sizes, increasing file handles, turning off TCP features, etc., to no avail. If it helps, this server OS is actually running on Xen, it's 'dedicated' in that it's the only resident.


title: Help understanding an egrep expression

text: I stumbled across the following egrep expression:               egrep '^([^aieou]*[aieou]){5,7}[^aieou]*$' /usr/share/dict/words      on this page: http://matt.might.net/articles/sculpting-text The expression is supposed to find the words that contain between 5 and 7 vowels. I understand the first ^ meaning from the beginning of the line and the second ^ to negate any of the aieou followed by any number of characters and one of the aeiou between 5 and 7 times. But I did not get how the first and last expressions: `[^aieou]` help here?


title: Can GNOME/KDE be turned off?

text: I have installed Debian Wheezy on an old laptop I want to use as a server. However, sometimes I want to use that computer to read webpages and write some code on it. So I want to have a GUI where I can install a web browser. I want to have either KDE or GNOME on it. Is it possible to install a GUI that you can start with a command and stop again? The reason why I want this is to save resources when the server is only used as a server. It's an old laptop and doesn't have very much power.


title: more than 8 outputs detected -- how to solve?

text: I have installed `Ubuntu 12.04.3` LTS on the notebook Lenovo IdeaPad z510. Setup was successful. But when I tried to load Ubuntu it gets an error: " **more than 8 outputs detected** ". When I googled about this error, it says this error is related to the Intel Graphics driver, but I am not sure how to resolve this problem.


title: Command line options of rackup are not shown in ps output or procfs

text: As you know if you wish to get command-line runtime arguments for running command you can parse `ps -e` or `/proc/<pid>/cmdline`. But I have encountered issue when this method returns only command with path but without arguments. For example:               $ rackup private_pub.ru -s thin -E production          Thin web server (v1.5.1 codename Straight Razor)     Maximum connections set to 1024     Listening on 0.0.0.0:9292, CTRL+C to stop          $ ps -e | grep rackup          16226 ttys001    0:02.19 /home/user/.rvm/gems/ruby-1.9.3-p429@gearup/     bin/rackup            $ xargs -0 echo < /proc/16226/cmdline          /home/user/.rvm/gems/ruby-1.9.3-p429@gearup/bin/rackup      There are no `private_pub.ru` and subsequent arguments. Can `rackup` "swallow" options and make them invisible to `ps`? What is reason for this behavior? My main issue is to find certain process with certain argument with `ps` or `procfs`. Output for `strace -rf -e trace=process rackup`               0.000000 execve("/home/user/.rvm/gems/ruby-1.9.3-p385@global/bin/rackup", ["rackup", "private_pub.ru", "-s", "thin", "-E", "production"], [/* 89 vars */]) = 0          0.003323 arch_prctl(ARCH_SET_FS, 0x7f1f1b1b1740) = 0          0.001193 execve("/home/user/.rvm/gems/ruby-1.9.3-p385@gearup/bin/ruby_noexec_wrapper", ["ruby_noexec_wrapper", "/home/user/.rvm/gems/ruby-1.9.3-p"..., "private_pub.ru", "-s", "thin", "-E", "production"], [/* 89 vars */]) = 0          0.002065 arch_prctl(ARCH_SET_FS, 0x7f04829a8740) = 0          0.001028 execve("/home/user/.rvm/gems/ruby-1.9.3-p385@gearup/bin/ruby", ["ruby", "/home/user/.rvm/gems/ruby-1.9.3-p"..., "/home/user/.rvm/gems/ruby-1.9.3-p"..., "private_pub.ru", "-s", "thin", "-E", "production"], [/* 89 vars */]) = -1 ENOENT (No such file or directory)          0.000294 execve("/home/user/.rvm/gems/ruby-1.9.3-p385@global/bin/ruby", ["ruby", "/home/user/.rvm/gems/ruby-1.9.3-p"..., "/home/user/.rvm/gems/ruby-1.9.3-p"..., "private_pub.ru", "-s", "thin", "-E", "production"], [/* 89 vars */]) = -1 ENOENT (No such file or directory)          0.000286 execve("/home/user/.rvm/rubies/ruby-1.9.3-p385/bin/ruby", ["ruby", "/home/user/.rvm/gems/ruby-1.9.3-p"..., "/home/user/.rvm/gems/ruby-1.9.3-p"..., "private_pub.ru", "-s", "thin", "-E", "production"], [/* 89 vars */]) = 0          0.005911 arch_prctl(ARCH_SET_FS, 0x7f4c84595740) = 0          0.013703 clone(Process 9182 attached     child_stack=0x7f4c845c1fb0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7f4c845c29d0, tls=0x7f4c845c2700, child_tidptr=0x7f4c845c29d0) = 9182          >> Thin web server (v1.5.1 codename Straight Razor)     >> Maximum connections set to 1024     >> Listening on 0.0.0.0:9292, CTRL+C to stop


title: Script using CURL to add information to site every month

text: I am very new at bash, so forgive me for the novice question. Here is my curl call:               curl -d 'username=cdaniels&wallclock=391324502' 'https://www-dev.***.***.edu/clusterusage/rest/update.html';      which pulls from a file `~/qacct.monthly` with the format               Total    : OWNER         WALLCLOCK         UTIME         STIME           CPU             MEMORY                 IO                IOW     Total    : ==========================================================================================================================     Total    : cdaniels      391324502         0.195         0.066         0.261              0.000              0.007              0.000     Total    : jlinger               1         0.039         0.056         0.095              0.000              0.000              0.000     Total    : lbsome         18707336  18675574.761     21433.535  18697008.296       10604793.658           5527.986              0.000      The example only pulls one of the users, but I want it to parse through the information and pull all the usernames and wallclock information from all the users on the cluster for that month. I'm wanting to put this into a script so that it executes every month (obviously through a cron job)


title: Applications' tray icons aren't displayed in Linux Mint 17 on Cinnamon

text: I've installed Linux Mint 17 with Cinnamon. I tried to make GNote, Thunderbird and Skype autorun on system startup minimized to tray. I made them autoruned with `Startup application` program. Then I made GNote and Skype minimize into tray with their menu settings. And I had to install a couple of add-ons(`MinimizeToTray revived` and `firetray`. because the former didn't work) on Thinderbird to make it minimizable to tray. After that at first it worked first time but then a strange bug appeared. Every time I minimize one of these programs to tray or they are minimized with startup their tray icons don't appear. They appear to be working in processes list, but no tray icon and no icon on panel as well. So it actually gets to tray but no icon appears on the other hand. Is there any way explain it and repair the tray? Tray worked but then it got broken in that way.


title: on puppy linux, how to manage power settings

text: I'm new to using Puppy Linux, and I'm not able to find a way to manage power settings. The laptop stops working everytime I close and re-open the lid so I want to disable that function from doing anything.


title: How to kill all open windows?

text: I want to close all windows appearing on my desktop. I've thought to do this through `pkill`, but I could only manage to kill them one at a time, which is not what I want. The end goal is to put this into a script to run a kiosk, it will detect if the kiosk software is running (I figured this part out) and if it is not, then it will kill any windows that are open, and restart my kiosk software.


title: Call the script after disconnecting from server

text: I have a script I made for work that will call a function that takes an argument. I use the arguments to `ssh` into our servers. My question is: Is there a way to call the method so that if/when I get disconnected from our servers, It will automatically call the script? So for example, I can `ssh` into one of our servers. We have a `reverse-ssh` tunnel set up so after an hour the connection closes. I want it so that after the disconnection, the script will be called again prompting for a hostname.               #!/bin/bash     echo "Provide hostname: "     read host          createSSHFunction()     {         arg1=$1         ssh $host     }     createSSHFunction $host


title: Differences between XStow and Stow

text: According to the official XStow news, the package was last updated on 2010-07-22. On the other hand, the GNU Stow git repository (mantained by Adam Spiers) had activity just 10 days ago, and the latest stable version came out on Feb. 18, 2012. Most of the information I can find online about the differences between Stow and XStow dates from many years ago, and does not seem to reflect any of the recent changes. With this, what is a modern look at the differences between GNU Stow and XStow?


title: Is there a working H.265 encoder implementation available for Linux?

text: I've read that the new H.265 video encoding algorithm can encode the same video with same quality in about 2 times smaller bitrate. Obviously I'd like to encode all my videos with this algorithm to get more free HDD space. Is this possible already with free tools available for Linux?


title: Does "226 Transfer complete" guarantee the consistency between local and remote files when using ftp?

text: I have some automated scripts which perform FTP uploads among other things. I'm wondering what level of error checking I should conduct once these uploads have finished executing. Could anything go wrong uploading a file when it reports `"226 Transfer complete"` which would warrant extra tests, besides checking for this string in the log, to check if a file was successfully uploaded?


title: snmp/snmptrap support of ipv6

text: I have IPv6 only (not dual stack) system I wondering how to   \- send snmptrap from this system? \- configure snmpd to be able to access it? I mean, is snmp is ready to use in IPv6 only environment?


title: If computers start counting at 0, why does the init process have a pid of 1?

text: Not much to put here in the body, the question is self explanatory.


title: KSH conventions scripting

text: I'm writing scripts in `ksh` atm. I'd like to know if there is any "conventions" as for example, always doing "unset" before using a variable, or using typeset to define a new variable, etc.


title: Check for existence of files prior to acting on them

text: In one of my processes I check for existence of files older than 31 days, and then do stuff with them.               find /my/directory/*txt -mtime +31 -exec ls -l {} \;      All this is well and fine if files are in `/my/directory/`, but when there are no files present I get an error:               find: `/my/directory/*txt': No such file or directory      If I issue:               touch /my/directory/a_new_file.txt      and run the same command again               find /my/directory/*txt -mtime +31 -exec ls -l {} \;      There are no errors. Is there a way to verify that files exist in a directory before attempting any work on them?


title: 3 monitors on 2 separate nvidia cards with compositing and rotation

text: Is this even possible? I've got 3 monitors (#1, #2, and #3) and 2 video cards (A and B). #1 and #2 are connected to video card A, and #3 is connected to B. I want to rotate monitors #2 and #3, and keep #1 between them (so it will look a bit like an H). I'd like to be able to move windows between them freely and I'd like compositing. Is there any way I can do this using xrandr? That seems like what everyone is telling me to use, but I can't get it to work right. What should I do to get this to work? EDIT: Supposedly xrandr 1.4 can do this. I'm going to look into it more.


title: How to get all ldap groups for a user

text: I have no direct access to LDAP, but I am a user in LDAP and can make queries using ldapsearch. How can I query LDAP to get all LDAP groups for a particular user? Also is there an easy way to get LDAP group names from the gid attribute? I am a beginner when it comes to ldapsearch so go easy please!


title: Configuring Real VNC on RHEL 6.3 Command Line

text: I am trying to setup real vnc server on my RHEL via command line. I have done the following steps   1. Downloaded the Real VNC installer from Real VNC for Red Hat 64 bit system   2. Unizipped it to get to rpms VNC-Server-5.0.5-Linux-x64.rpm,VNC-Viewer-5.0.5-Linux-x64.rpm   3. The documentation did not have any command line installation instructions   4. Followed the instructions given in this forum   5. `rpm VNC-Server-5.0.5-Linux-x64.rpm -i`   6. `vnclicense -add <KEY>`   7. `netstat -an | more`              tcp        0      0 0.0.0.0:5901                0.0.0.0:*                   LISTEN     tcp        0      0 0.0.0.0:5902                0.0.0.0:*                   LISTEN     tcp        0      0 0.0.0.0:5903                0.0.0.0:*                   LISTEN        8. On windows 7 I installed RealVNC Viewer and tried connecting to the server, I get an error promt `connect: Connection refused (10061)`


title: What program can I use to search the titlebars of all open windows?

text: I am looking for an application that allows me to search the text of the title bars of all open windows and then foreground the window that most closely matches the text I typed. An application that does this perfectly is Switcher but it is only for windows. Example: Say I have 20 windows open, Terminal, chromium open to google, another chromium window open to evernote, gnucash, etc. and I activate _the program I am looking for_ via keyboard shortcut, then type note and hit enter it should foreground the chromium window that had evernote in the title bar. Does a program exist for linux that does this? I am using Arch Linux with enlightenment as my desktop environment but would be happy to find a tool like this that works in any environment.


title: How can I install only the basics in Debian?

text: I'm new on Debian, I moved from Ubuntu and I need to install a light distro on my laptop. I want to use in text mode. I just want to use `gcc`, `nano`, `ghci`, `javac` and some text browser. But when I installed using the CD, the first installation disk ended up installing many packages that I will not use, and I wanted to leave my computer as light as possible. How can I choose just the essential packages that I need to do the basics?


title: Understanding the structure of an Arch package repository mirror

text: I'm trying to figure out the structure better of a Arch Linux package repository mirror. There's several folders which are pretty easy to understand, such as community, core, extra, multilib, iso, kde-unstable, gnome-unstable, etc. But there are some others also that are slightly more confusing, such as pool, project, etc. For example, this is the structure of the mirror http://mirror.gnomus.de/               ../     community/     community-staging/     community-testing/     core/     extra/     gnome-unstable/     iso/     kde-unstable/     multilib/     multilib-staging/     multilib-testing/     pool/     project/     staging/     testing/     lastsync      lastupdate      Is there a linux mirror tradition I'm missing here, or is this structure unique to Arch? Also, what do the less obvious folders mean? From what I can gather, it seems as though the pool folder contains all of the packages, while the rest categorize them, but I'm not sure if this is right.


title: Is there a way to manipulate lines in logcheck rules before sending?

text: There are a few cases, such as netfilter logs, where it would be great if I could send the report `logcheck` is about to send through a filter. `logcheck(8)` doesn't seem to describe anything like this, nor does the `man` page for `logcheck.conf`.


title: Echo/Printing text in the color of a given hex code (regardless of Xresources/Xdefaults)

text: is there any way to echo/print text in the color of a given hex code (#000000, #FFFFFF, etc.) regardless of one's own `Xresources`/`Xdefaults` color definitions? Like, if Bob had in his `Xresources`/`Xdefaults`:               *color1 : #800000       And Tom had in his `Xresources`/`Xdefaults`:               *color1 : #CC3300      And some oddball had in his `Xresources`/`Xdefaults`:               *color1 : #8080FF      Is there anything they could all three type that would show all three of them something like this? ![screenshot](http://i.imgur.com/rPCaevN.png)


title: How to start tmux with attach if a session exists

text: If I use               tmux attach      I can attach to a running session but if there is no session running, I only get the error               no sessions      How can I automatically start a new session if there is none running? something like               tmux attach-or-create-new-session


title: SSH Agent-Forwarding works, but what about sudo -u username no shell/ permissions? composer

text: Working on a remote server (A) I want to use my local SSH-Keys to access a repository on another server (B) that is not controlled by me. Generally this works like a charm. I log in as myUsername on the remote server (A) and can access the repositories on B just fine. The problem is, that there are some tasks (composer update) that need to be executed by another user on (A). This user is not an admin and the folders where the scripts are executed are his and should only be writable by him and not an entire group, so I can't just chmod all the folders to 777, 775 or something ;) The problem is, that when I want to execute the script with: `sudo -u another_user composer update` sure enough there are no keys found, because they don't get forwarded for this user. Also the "another_user"'s shell is set to bin/false to complicate things even further!!! Is there a solution to this? To sum it all up: I want to access another remote server through my own remote server with my local ssh-keys through `sudo -u another_user ...` Would be great if someone with more experience could enlighten me! **edit** : I also tried this already: http://mybrainhurts.com/blog/2012/05/git-sudo-local-ssh-keys.html But I guess it won't work because the other user has no shell :(


title: Modifying /bin/login or workaround

text: I'd like to modify (or rather create a modified copy of) /bin/login. I want the script to start in all ttys (like ordinary /bin/login) but with different functionality - it should allow user to login _only_ using specified keyword (or password if you wish) - this script will then react with granting user privilegies depending on the keyword and execute other appropriate actions. For example: I have user _newbie_. Tty will prompt for secret keyword, either _standard_ or _conservative_. After entering _standard_ , script will grant _newbie_ 's privilegies and fires X server with .xinitrc-standard, containing usual stuff. On the other hand, after entering _conservative_ and granting privilegies, script should switch from nvidia gpu to integrated intel, change other performance-relative stuff and then fire X with .xinitrc config. I am aware this is a security risk, that this can be handled with alias after loging in and other stuff. I just wonder if this is possible.


title: DNS zone fallback file

text: I have the following DNS zone(bind):               zone "." IN {         type master;         file "named.root";     };      If this zone directive cannot resolve the address, how can I "fallback" to another file for the same directive. Ie something like this:               zone "." IN {         type master;         file "named.root";         // fallback file if named.root doesnt resolve         file "fallback.root";     };


title: Blank lines when executing "grep | xargs" in a "find -exec"

text: I'm trying to list all directories of a web server that are blocked by Apache via a `.htaccess` (containing `deny from all`). I've managed to get the list of blocking `.htaccess` but when I try to extract the directory path using `dirname` I have some errors:   1. List of `.htaccess` files:              find . -type f -name ".htaccess"     ./.htaccess     ./config/.htaccess     ./files/.htaccess     ./plugins/webservices/.htaccess     ./plugins/webservices/scripts/.htaccess     ./install/mysql/.htaccess     ./scripts/.htaccess     ./locales/.htaccess        2. List of blocking `.htaccess` files:              find . -type f -name ".htaccess" -exec sh -c "grep -Eli '^deny from all$' '{}'" \;     ./config/.htaccess     ./files/.htaccess     ./plugins/webservices/scripts/.htaccess     ./install/mysql/.htaccess     ./scripts/.htaccess     ./locales/.htaccess        3. Error come the errors. Same list as in 2. but using `xargs` and `dirname` to get the containing directory:              find . -type f -name ".htaccess" -exec sh -c "grep -Eli '^deny from all$' '{}' | xargs dirname" \;     dirname: missing operand     Try dirname --help' for more information     ./config     ./files     dirname: missing operand     Try dirname --help' for more information     ./plugins/webservices/scripts     ./install/mysql     ./scripts     ./locales        4. Debug attempt of list 3: we can see 2 blank lines where the 2 errors were:              find . -type f -name ".htaccess" -exec sh -c "grep -Eli '^deny from all$' '{}' | xargs echo" \;          ./config/.htaccess     ./files/.htaccess          ./plugins/webservices/scripts/.htaccess     ./install/mysql/.htaccess     ./scripts/.htaccess     ./locales/.htaccess      Theses 2 blank lines obviously matches the 2 `.htaccess` files that were ignore because they don't contains `deny from all`. I don't understand why I get these in lists 3. and 4. but not in 2.


title: Use Rsync with HTTP

text: Is it possible to use `rsync` with an HTML POST request? If so what would the `rsync` command look like? For example let's say using HTML5 I have this (bear with me going back to linux stuff):               <form method="post" enctype="multipart/form-data">         <input type="file" name="files[]" id="files" multiple="" directory="" webkitdirectory="" mozdirectory="">         <input class="button" type="submit" value="Upload" />      This produces a webpage having two buttons with which you can upload a directory of files from the local computer. Could I use `rsync` at this point to only download and update files in the directory which are needed, (i.e., firmware update). I don't want to have to download the whole file system because that's slow.


title: Open program in another terminal window windows-solaris

text: I am running Attachmate Reflection for UNIX and logging into my Solaris system. I then want to open a file with nedit but I get an error: > NEdit: Can't open display So, I type in               xhost +      and I get the following error:               xhost:  unable to open display ""      So I go a head and do:               setenv DISPLAY [Full Windows Computer Name]:0      and then I check my DISPLAY by:               xauth $DISPLAY       and I get back:               xauth: (argv):1:  unknown command "[Full Windows Computer Name]:0"      and at that point when I try to open the that file with nedit again I get:               Xlib: connection to "[Full Windows Computer Name]:0.0" refused by server     Xlib: No protocol specified     NEdit: Can't open display      Where **[Full Windows Computer Name]** is my windows PC computer name. Anyone has any suggestions what I am doing wrong?


title: How to log into database via script securely?

text: I am wondering about whether it is acceptable (security-wise) to have database login credentials (user/pass) set in an environment variable or passed in as a command-line parameter? Both of these methods seem risky to me as perhaps others can read the environment variable or read the running processes/history and credentials would be there in plain-text (Is my understanding correct here?) What would be an acceptable way to do this login? It would be run in a script as part of an automated job/process. Edit: This is an Oracle database (11g) Edit #2: Oracle Wallet was considered at one point, but can't be used yet where I work.


title: What part of the Linux kernel determines the execution order of userland apps?

text: Stripping the source, I can't pinpoint which part of the kernel sets and manages the userland apps, and how it does it. For example, in the Linux main source, is the procedure have options to set boot order, and app load order prior to manual determination?


title: Text-based file navigator with search as you type

text: How do I set up Midnight Commander or other text-based file navigator so that when I start typing it searches the first directory or file matching the typed text?


title: Deploying filesystem images onto a partition of arbitrary size

text: I would like to establish a deployment process for Ubuntu machines based on root FS images. I would like to restore the image onto a simply-formatted hard drive (I can completely erase the disk during deployment). I'd rather keep the config simple and not partition into separate `/` and `/home` So far I've tried using Clonezilla and succeeded in creating an image of the root partition that I can restore. However, using that process leas to the fact that the root partition I restore onto is small, as small as my base image when uncompressed - around 20 gigs. I would like to grow the partition on the actual hard drive to maximum capacity instead, and then restore a filesystem onto it including all symlinks and other bells and whistles. Also I am looking for a process that would reliably install and configure the bootloader and the boot partition on the drive when the partition is restored onto it. Where should I look? It seems that any `dd`-based processes are per block, and you are sort of forced to have your destination partition be of the same size as the image. At the same time I cannot guarantee that all the disks of the machines I am going to be deploying this way are of the same capacity... What would be the approach to take? Maybe I need a higher level imaging solution - one that backs up a filesystem instead of a partition? **UPDATE:** After doing some prodding into the possible configurations my question comes down to this. How do I establish a pipeline where I could do the following in one step:   * boot a machine off a DVD/CD   * format it's hard drive as MBR/root/swap, without any empty space   * make sure that it's bootable   * clone the root partition off a network image So far we've settled on the following workflow:   * make an image of a small disk (70 gigs)   * restore it as a whole   * manually go into gparted and resize the partitions so that the root partition is bigger than it's imaged version but it has us booting two disks in a row, which is very annoying.


title: Shrink /home partition to two partitions

text: I have one hard disk on my server               [root@CentOS dev]# df -h     Filesystem      Size  Used Avail Use% Mounted on     /dev/sda3       4.9G  722M  3.9G  16% /     tmpfs           246M     0  246M   0% /dev/shm     /dev/sda1       194M   28M  157M  15% /boot     /dev/sda2       9.9G  164M  9.2G   2% /home      I want to shrink the home partition to two partitions I found `resize2fs` command               umount /home/     e2fsck -f /dev/sda2     resize2fs /dev/sda2 3G     mount /home/      after executing               /dev/sda3       4.9G  722M  3.9G  16% /     tmpfs           246M     0  246M   0% /dev/shm     /dev/sda1       194M   28M  157M  15% /boot     /dev/sda2       5.0G  160M  4.6G   4% /home      the size of /home reduced 3G but I can't found the name of new partition Any one who can give me an idea to solve this, i'll be grateful.


title: Using trap with ERR: How do I send $?

text: In bash 4.x If I have:               err_handler() {         echo You received error $1|mail -s "script error" MAILTO     }          trap err_handler ERR      how do I send the actual stderr output to the function when the trap is called? I want to avoid having to put logic on every line to redirect stderr, thats the point of a trap I think.


title: Sending the output from 'dd' to awk/sed/grep

text: I'm trying to approximate the computer's write speed using dd:               dd if=/dev/urandom of=/dev/null bs=1K count=10000      which gives the following output               10000+0 records in     10000+0 records out     10240000 bytes (10 MB) copied, 0.746313 s, 13.7 MB/s      How can I get the '13.7 MB/s' into a bash variable? I've tried piping the output from dd to progs like awk, sed and grep to no avail. Ultimately, I'm calling this via `os.system(...)` from within a python script. If anyone knows of a more direct way to get a similar result inside python I'd be interested in that also. I'm trying to predict how long a file copy will take, based on the file size. Any help would be greatly appreciated.


title: rsync parallel vs serial transmissions

text: Using Bash 4 and rsync on RHEL 6, are there any differences between the following methods? If so, which is more efficient, and what are the differences between these 3 methods:               1) rsync -avz /files/* user@remote_server:/remote_files     2) for file in /files/*; do rsync -avz $file user@remote_server:/remote_files;done     3) for file in /files/*; do screen rsync -avz $file user@remote_server:/remote_files;done      I am looking for information pertaining to what will transmit the fastest, given the same server. What if there is a low number of large files, vs a large number of small files? Does that matter?


title: Null input in a text file

text: I have a script that creates users in Linux as well as Oracle, when I create multiple users I use the following:                     cat /path/path/file.txt | while read USER PASS ORAUSER ROLE             do      However I had the misfortune of leaving the role blank and it did some horrible things to my users access. I was wondering how I can check if the text has an empty variable.