title: Access VirtualBox Debian Apache Guest on Windows Host

text: I am running Oracle VirtualBox with Debian as guest OS on a Windows 7 host. I have installed Apache and specified the following two network adapters in VM:   1. Bridge   2. Host-only w/ the same IP set as below. My interfaces network settings on the Debian VM are:               auto lo     iface lo inet loopback          allow-hotplug eth0     iface eth0 inet dhcp     auto eth1          iface eth1 inet static         address 192.168.1.110         netmask 255.255.255.0      which all seems to work well enough via `ping` test between guest and host. However, when I try to browse to my guest instance in a web browser `http://192.168.1.110` I keep getting a 404 message. Any help would be appreciated. Thinking that the ifconfig results my help, I will include those also here:               eth0      Link encap:Ethernet  HWaddr 08:00:27:7a:1a:35             inet addr:192.168.1.106  Bcast:192.168.1.255  Mask:255.255.255.0           inet6 addr: fe80::a00:27ff:fe7a:1a35/64 Scope:Link           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1           RX packets:252 errors:0 dropped:0 overruns:0 frame:0           TX packets:19 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:1000            RX bytes:25417 (24.8 KiB)  TX bytes:1765 (1.7 KiB)          eth1      Link encap:Ethernet  HWaddr 08:00:27:56:3d:90             inet addr:192.168.1.110  Bcast:192.168.1.255  Mask:255.255.255.0           inet6 addr: fe80::a00:27ff:fe56:3d90/64 Scope:Link           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1           RX packets:231 errors:0 dropped:0 overruns:0 frame:0           TX packets:7 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:1000            RX bytes:21945 (21.4 KiB)  TX bytes:578 (578.0 B)          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:0 errors:0 dropped:0 overruns:0 frame:0           TX packets:0 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:0            RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)


title: How to change SAMBA default port on centos?

text: I need to change the port numbers of samba. Our ISP is blocking the ports 445 and 139. So I need to run samba in a different port. Please help me to do that.


title: bash log in windows and run cmd command using .sh script?

text: Ip of my Windows machine is 172.16.22.53, and it installed cygwin. I want write a bash script like that:               #!/bin/bash      sshpass -p 'myPassWord' ssh userNmae@172.16.22.53     #and some command to run cmd command in the Windows machine.      Is it possible? That is my try(it log in the Windows machine,and go into cygwin command interface .But don't creat the Catalog(myth) in the Windows machine!):               #!/bin/bash      sshpass -p 'myPassWord' ssh userNmae@myIp|mkdir myth


title: Subtract 1 from all file names (rename them) in a directory.

text: I have a directory which contains image files with names like               image1.jpg      image2.jpg      image3.jpg     ...      Unfortunately, the image names must be zero based, so `image1.jpg` should be `image0.jpg`, `image2.jpg` should be `image1.jpg` and so on. I can write a script to _generate_ mv commands like these, put them in a shell script, and then execute them -               mv image1.jpg image0.jpg     mv image2.jpg image1.jpg     mv image3.jpg image2.jpg     ...      But I suppose there is a neater way to do it in Unix. So what is it?


title: FC15 yum fedora repo recovery

text: I have lost all files under /etc/yum.repos.d/ and need a source or quick method for recovery. kernel version : 2.6.43.8-1.fc15.i686 / Fedora 15 Lovelock yum version : yum-3.2.29-9.fc15.noarch


title: PPTP VPN connected but no internet connection

text: I have followed this guide to setup a pptp VPN server in Ubuntu (which is a VM in a Windows Host, bridged adapters): https://help.ubuntu.com/community/PPTPServer My usage of the VPN is to overcome geoblock as I will be travelling to China. I can connect to the VPN on my Android phone using the 4G connection, and when I type ifconfig in the terminal in Ubuntu it does show `ppp0 Link encap:Point- to-Point Protocol` However as soon as I connect to the VPN I loose internet on my phone. My Ubuntu (and the Windows host) is behind a router, which I have port- forwarded 1723, alongside with ports 8080 for web servers etc.


title: Why is Debian Wheezy not displaying desktop icons?

text: After freshly installing Debian with Gnome 3, I cannot enable desktop icons. I tried to use `dconf-editor`, but all values were locked. I tried `sudo dconf-editor`: The option was changeable but had no effect... I also tried `gnome-tweak-tool` and to no avail. What am I doing wrong?


title: Problem with sed on a array containing strings containing spaces

text: I have a array looking like this:               array=("(1 2 3) (123)" "2 31 (231)" "4 5 1 (451)" "(te)xt (1234)")      This array is a example. It does not look like this but its structure is the same _(the strings have the same structure)_.   If I want to use the single strings in a `select` loop I can do it like this:               select string in "${array[@]}"     do        # do something     done      But the string in the parentheses is not for display. So I used sed to remove them:               echo "${array[@]}" | sed -r 's/ \([0-9]+\)$//g'      This did not work. Only the last parentheses were removed and the strings have been merged together. But how can I achieve the desired result which would be the same as the following example:               array2=("(1 2 3)" "2 31" "4 5 1" "(te)xt")          select string in "${array2[@]}"     do        # do something     done


title: Linux Mint 15 (Ubuntu 13.04) Spontaneously Crashing: Please help me understand the syslog messages

text: I'm running Linux Mint 15, and my machine is spontaneously rebooting. It appears to happen when the computer is under load. Normal use doesn't seem to cause it, but I'm trying to create a windows vm and I can't make it through the install, because the host keeps crashing. This is what my syslog looks like right before/after a crash. Can anyone help me decipher this? FYI Cerebro is the hostname.               Dec 21 23:18:33 Cerebro kernel: [    6.294603] [Hardware Error]: MC4 Error (node 0): Protocol error (link, L3, probe filter).     Dec 21 23:18:33 Cerebro kernel: [    6.294606] [Hardware Error]: Error Status: System Fatal error.     Dec 21 23:18:33 Cerebro kernel: [    6.294608] [Hardware Error]: CPU:0 (15:2:0) MC4_STATUS[Over|UE|MiscV|PCC|-|-|-]: 0xfa000000000b0c0f     Dec 21 23:18:33 Cerebro kernel: [    6.294610] [Hardware Error]: cache level: L3/GEN, mem/io: GEN, mem-tx: GEN, part-proc: OBS (no timeout)     Dec 21 23:23:18 Cerebro kernel: [  301.422760] mce: [Hardware Error]: Machine check events logged


title: Wifi works in local, no internet connection. Debain 7

text: I installed debain on an old PC, the KDE version. I have internet over wired. I can connect to my router, I and can ping it over wifi - ping 192.168.1.1 is successful. I can ssh into other machines, connected to the same network. I cannot access external web sites via wifi though, cannot ping successfully any ip, too i.e ping 8.8.8.8 results in a timeout. Here are               root@debian:/home/deckoff# ifconfig          eth0  Link encap:Ethernet  HWaddr 00:0a:e4:2d:4a:a0             inet addr:192.168.1.124  Bcast:192.168.1.255  Mask:255.255.255.0           inet6 addr: fe80::20a:e4ff:fe2d:4aa0/64 Scope:Link           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1           RX packets:1419 errors:0 dropped:0 overruns:0 frame:0           TX packets:759 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:1000            RX bytes:563318 (550.1 KiB)  TX bytes:179940 (175.7 KiB)          eth1  Link encap:Ethernet  HWaddr 00:0e:35:b4:04:64             inet addr:192.168.1.123  Bcast:192.168.1.255  Mask:255.255.255.0           inet6 addr: fe80::20e:35ff:feb4:464/64 Scope:Link           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1           RX packets:944 errors:1 dropped:1 overruns:0 frame:0           TX packets:52 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:1000            RX bytes:137654 (134.4 KiB)  TX bytes:8203 (8.0 KiB)           Interrupt:21 Base address:0x8000 Memory:d0220000-d0220fff           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:120 errors:0 dropped:0 overruns:0 frame:0           TX packets:120 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:0            RX bytes:9264 (9.0 KiB)  TX bytes:9264 (9.0 KiB)      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      root@debian:/home/deckoff# route -n               Kernel IP routing table     Destination     Gateway         Genmask         Flags Metric Ref    Use Iface     0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 eth1     169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 eth1     192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 eth1      root@debian:/home/deckoff# traceroute 8.8.8.8               traceroute to 8.8.8.8 (8.8.8.8), 30 hops max, 60 byte packets      1  192.168.1.1 (192.168.1.1)  5.144 ms  8.733 ms  10.349 ms      2  * * *      3  * * *          27  * * *     28  * * *     29  * * *     30  * * *      The adapter is eth1. It uses the ipw2200-bss.fw firmware, which I installed during system installation ,if this info is of any help for solving my problem. Yes, the name of the interface is eth1, an it's been that way on every linux distro I installed on this PC?!?!?


title: Is this sar/sysstat cron job formatted correctly?

text: I want it to give me all the sar/sadc options, interrupts,disk,etc.. every 10 seconds starting at noon for the entire hour. On the second line I want to capture the info in /proc/interrupts every minute for the hour of noon in a log file. Please verify the syntax.               * 12 * * *  root /usr/lib64/sa/sa1 -S XALL 10 360     */1 12 * * *  root cat /proc/interrupts >> /root/proc_int.log && date >> /root/proc_int.log


title: How to indent multiple lines in nano

text: Selecting lines in nano can be achieved using `Esc+A`. With multiple lines selected, how do I then indent all those lines at once?


title: Restart does not shutdown first on Debian Squeeze

text: I installed Debian Squeeze from the live DVD. Going to `System`->`Shutdown`->`Restart` does not shutdown the computer in the usual way where the BIOS screen is seen before login. Instead it simply restarts without going through shutdown and BIOS. Why is that so? Can we configure restart behaviour to switch between these two ways of restarting? I have not experienced this on other Linux distributions or Windows.


title: No gnome-power-manager command but it is installed on Arch

text: I'm running latest Arch, have GNOME and Fluxbox and my main windows manager is Fluxbox. I wanted to manage my power settings in Fluxbox and i added gnome- power-manager in startup but is says there isn't a command like that. I checked if gnome-power-manager is installed with pacman and it says it is. Note when i open power settings in GNOME shell environemnt there is no 'close lid' option. **Note : Fixed** My main intention was to use this power manager to manipulate the laptop's state when i close the lid, press the shutdown button etc. I fixed this with instaling xfce4-power-manager.


title: Scientfic Linux slate wiped clean on VM after restart

text: I have installed `Scientific Linux` on VirtualBox. After every restart, I get this: ![enter image description here](http://i.stack.imgur.com/zNFdg.png) Which is fine, I suppose. But if I press a button, I get this: ![enter image description here](http://i.stack.imgur.com/Ib5gm.png) I am not sure if that is a common occurrance, I am sure that it should boot right into the OS. But when I got to create a user `useradd sampleUser` and provide it with a password `passwd sampleUser`, it works fine. But when I restart it, it doesn't save the users. I get this for an error:               [liveuser@livecd ~]$ su sampleUser     su: user sampleUser doesn't exist      Is there something I done wrong with this installation? I know that the user shouldn't be liveuser, but I installed this atleast 3 times already and can't seem get past this.


title: Limit program execution to a list of arguments

text: I would like that my Unix users can only run a specific command `insecurecommand` with a controlled list of arguments stored in a file. The only solution I have found at this time is to :   1. Create a new security group called `cmdxg`   2. Limit the execution of the command to this group:              chown root:cmdxg /.../insecurecommand     chmod 750 /.../insecurecommand        3. Create a setgid wrapper, which executes the command:              ls -al /.../mywrapper     -rwxr-sr-x 1 root cmdxg /.../mywrapper      The only problem is that `insecurecommand` is executed with `gid=cmdxd` and not with the users real gid. However, I'd like to avoid running the `insecurecommand` command setgid. If in the wrapper code, I go back to real gid with seteuid(), it can't run the `insecurecommand` anymore because the process lost the `cmdxg` right. Is it a way to run a command that needs privileged gid rights, but with the real gid ? Maybe I need to decompose the program execution ? -> first load the binary with the privileged effective gid -> go back to the real gid -> run the program But how can I do this ? Any ideas ?


title: Standard solution for displaying messages either on shell or with window managers gui

text: Is there a standard solution to display messages from within bash scripts eiter on the commandline if the shell is a login shell or in a new window in the present window manager's GUI? Specifically I am running kde which has the tool `kdialog` to display messages. However I would prefer a solution which is independent of KDE but uses KDE style if it is running. Also it should allow to ask for user input etc.


title: How to make a standalone application appear on the Mint menu?

text: How can I make the executable file of a standalone application appear on the mint menu so that I can execute it from there? What I currently do is to add the application path to the `PATH` variable and execute it from command line like this: `AppName &`. I don't know how I can add the application to the mint menu though. Any advice would be appreciated. I am on `Linux Mint 15 (Mate)`.


title: Gnome 2 desktop shortcut: Run a script having commands changing the environment

text: I want to launch a script (that ultimately launches an editor) with a single click in GNOME 2. To this end I have a script which sources the environment variables first and then ultimately launches the editor. The script looks something like:               #!/bin/sh     source variablesFile     editor $1      From the terminal I can easily launch the editor with:               $ ~/script myFile.txt       Now, what I want to achieve is have an icon in the taskbar/Desktop, from which I can double click and start typing, just like gedit. I tried the following way: ![enter image description here](http://i.stack.imgur.com/4XoSS.png) but it did not work (mostly because the environment variables could not be changed). I also tried: ![enter image description here](http://i.stack.imgur.com/RvCWY.png) but a terminal window flashed and went away. No idea what happened. Any clues?


title: How do I add eclipse to my gnome shell favorites?

text: I run gnome shell 3.6 and Eclipse 4.2. I installed Eclipse manually, in my /opt directory, because the Ubuntu package for Eclipse is very outdated. I've created a .desktop file for it, and placed in in ~/.local/share/applications. It looks like this:               [Desktop Entry]     Type=Application     Name=Eclipse     Comment=Eclipse Integrated Development Environment     Icon=/opt/eclipse-4.2.1/icon.xpm     Exec=/opt/eclipse-4.2.1/eclipse     Terminal=false     Categories=Development;IDE;Java;      I can run Eclipse from the Activities menu; if I hit the super menu and type in "Eclipse" and run it, it starts just fine, and shows up in my launcher/sidebar/dock/whatever it's called. But if I right-click on its icon, there is no "Add to favorites" option. (I notice this is also the case if I run some very old programs, like xeyes and xcalc. it's amazing these are still distributed!) So what is it about a program that determines whether or not the "Add to favorites" option is available? if I knew and understood that, maybe it'd set me on the right path to fixing this Eclipse problem.


title: How to get my own IP address and save it to a variable in a shell script?

text: How can I get my own IP address and save it to a variable in a shell script?


title: How do I set mouse double click speed in Lubuntu

text: I'm using Lubuntu 11.10. The only problem I have that the mouse double click speed is a bit high (it seems to me that it is around 100-200ms) and I would like it to set it to around 500ms. Is there a way to do it? I tried using Openbox Configuration Manager but that only changes the double click speed for window headers. But in PCManFM for example it is still around 200ms.


title: Force fsck at boot time on the root file system (prior to mounting file systems, without Single-User mode)

text: I just wonder if there are any solutions available at all (Googled for 2 hours). How to automatically force fsck disks after crash in `systemd`? - does not mean anything. Setting `fsck_y_enable="YES"` and `background_fsck="NO"` in `/etc/rc.conf` don't do anything. My root file system is not clean and has a lot of errors (due to a power outage - unexpected shutdown, not because hard drive or hardware are bad). `fsck` shows errors:               root@host2:/usr/home/alex # fsck     ** /dev/mirror/gm0p2 (NO WRITE)     ** Last Mounted on /     ** Root file system     ** Phase 1 - Check Blocks and Sizes     ** Phase 2 - Check Pathnames     ** Phase 3 - Check Connectivity     ** Phase 4 - Check Reference Counts     UNREF FILE I=8268305  OWNER=root MODE=140777     SIZE=0 MTIME=Jun  6 21:58 2014     CLEAR? no      [skipped 100+ lines] I don't have physical or KVM access to the server. This is `gmirror`ed drive               FreeBSD host2.domain.tld 9.2-RELEASE FreeBSD 9.2-RELEASE #0 r255898: Thu Sep 26 22:50:31 UTC 2013 root@bake.isc.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64          # Device                Mountpoint      FStype  Options Dump    Pass#     /dev/mirror/gm0p2       /               ufs     rw      1       1     /dev/mirror/gm0p3       none            swap    sw      0       0


title: Deleting ssl.conf a problem in apache set up?

text: In a desperate attempt to stop warnings from a free ssl cert I set up a while back and not knowing how to undo it I ended up deleting my ssl.conf file in the etc/ssl folder but now I am wondering if that comes with apache by default and necessary for running other programs? The problem I was having besides the warnings of untrusted site because have multiple sites running off the one IP , every time https preceded any of the sites they would naturally go to root site instead of individual sites which is something I had to somehow stop but I am sure my methodology is all wrong. At least now https site not found until I can pay for a certificate. What SHOULD I have done?               ca-bundle.crt  ca-bundle.trust.crt  localhost.crt  make-dummy-cert    Makefile     renew-dummy-cert      These are exact certs located in /etc/ssl so I could recreate that folder if I wanted but I won't because I think it was created when I went through process of setting up untrusted ssl cert. I don't even know where I can EDIT those registration details but I would love to know.


title: How to disable Alt-Arrow switching of Virtual Consoles?

text: The following happens on different Linuces: When I'm in a virtual console, hold `Alt` and press `←` or `→`, the virtual ttys cycle. This is really annoying as I'm using fish-shell which also uses this key combo. I _could_ remap fish's short cuts, but I don't want to. Instead I want to disable the linux function or remap it. How can I disable or change the tty-cycling-key-combo?


title: Possible corrupt passwd file

text: I did a recovery of the server and reset the root password to a new one because for some reason, the original was not being recognised. It still is refusing to accept the password in ssh for root. After further research, it appears that it could be a corrupt etc/passwd file. Parallels state that running this command:               cat /etc/passwd | grep ^root | hexdump -c       the end of the file should end with, \n but mine ends with \r \n. This file I checked as a user with /bin/bash privs. Now the problem. I cannot check the passwd file at root. Any ideas? I understand there are 2 etc/passwd locations. 1 for each user allocated on the system and the 2nd is in the etc root area. Thanks


title: archive.ubuntu.com missing raring-updates

text: My Linux Mint 15 install on VirtualBox was working great up until about two days ago, when the updater started throwing a ton of errors and refuses to progress with any `apt-get update`, `apt-get install`, or `apt-get upgrade`. They are 404 errors on the `archive.ubuntu.com` site, under the `/ubuntu/dists/raring-updates` folder. I looked at it, it doesn't exist. Here's a direct link, which shows there is no raring-updates. Where has `raring-updates` gone and what can I do to fix this?


title: Give a user the permission to access files in a directory

text: I have mounted a volume from NAS storage to my Solaris 10 machine using NFS. I want to give read/write permission for a user to the directories and subdirectories and files. I have tried               setfacl  -m user:biptip:rwx,mask:rwx NIADOCS/*     setfacl -R -m d:u:biptip:rw,u:biptip:rwX NIADOCS      but I am not able give the permission.


title: How to grep for a single quote?

text: I am grepping through some VB source files. I use the following query -                    grep -nr "GlobalCommArea\s*=\s*.*\.Transaction" .       Some of the lines, however, are commented and begin with a single line comment. A single line comment in VB starts with a single quote - ' Unfortunately, I cannot simply remove all those lines that have a single quote in them, because some of the lines have a single quote comment after the line of code. So I tried something like this to remove the single quote at the start of the line                    grep -nr "GlobalCommArea\s*=\s*.*\.Transaction" . | grep -v "^\s*'"      However, this did not work. How to do this?


title: Run script when specific users logout

text: I need to run my application in screen when specific users are logged out and kill the screen when someone from my user list logged in. So I am thinking about bash script, which will be called periodically from cron and:   1. Checks if specific users are logged in.   2. If nobody is logged in - spawn screen and save pid to file or do nothing if pid file already exists   3. If someone is logged in - read pid from file and kill screen I am looking for more sophisticated alternatives, which will eliminate periodically running script from cron.


title: Route incoming network requests for a given port to different applications

text: I have an application that listens for connections on a port, but I occasionally take it down for updates and the like. I'd like a way to configure the system such that if that program is running, requests for that port are sent to the application, but if it's not running the requests are directed to some other application (that can return a "temporarily unavailable" message). What's the easiest way to accomplish that? I don't have root access on the target machine, so I'd prefer to avoid things like `iptables`. I've considered a helper application that does nothing but route connections to the other two applications, but I'm hoping there's an easier way


title: Locate enscript reported non-printable chars

text: I'm making a postscript of a bunch of C code, and `enscript` reports I have 2 non-printable chars               [ 91 pages * 1 copy ] left in a.ps     2 non-printable characters     non-printable character codes (decimal):     128 153      However I couldn't find these chars with `grep`               grep -r $'\231' *     grep -r $'\200' *      Is there a way to let `enscript` report which lines contain the non-printable chars?


title: Mount filesystems after boot to avoid fsck delay for sshd

text: I'm trying to optimise the overall downtime and improve availability in case of system failure. I'm specifically concerned about the reboot (e.g. after a kernel panic) taking so long that I don't actually know if the system is or is not doing OK, since I don't have the serial console to a particular server. What would be the proper way to mount all non-essential filesystems immediately after boot in OpenBSD, instead of prior to `sshd`? I have about two dozen filesystems, what I'm thinking is that perhaps only the most essential ones should be `fsck`'ed and mounted first, then `sshd` be started, then all the rest are `fsck`'ed and mounted immediately afterwards. What would be the best practice to do something like that?


title: How to activate reverse tethering on CentOS 5

text: Most examples for reverse tethering are for Ubuntu. They go something along these lines:   1. Attach smartphone   2. Configure usb0   3. Start reverse tethering on the smartphone   4. Use the PC network via USB from your smartphone Now I do not want to use Ubuntu. I want to use CentOS 5. I've got the CentOS 5 Plus XEN Kernel active, so some features should be available there, too. So far I found that I will probably have to:   * Actiate the kernel-module `rndis_host`, that will enable   * `usbnet` and that should make   * `usb0` appear as network device The latter does not happen, `lsusb` shows the correct tags for my attached smartphone. What am I missing here? There has been a similar question, but the question is not that "on the mark" and also doesn't have any answers yet either.


title: User Mode Linux compile fails

text: I am trying to compile User Mode Linux on a 64 bit machine with `defconfig` and getting the following error.               arch/x86/um/user-offsets.c:1: sorry, unimplemented: code model "large" not supported yet      Any idea what this means?


title: Chat application for monitoring with scripts

text: I am looking for a chat application, which would have the ability to interact with a shell script. I need this for a home project. An example of the usage would be: A client sends a chat message to a server. It analyzes the incoming message and takes an action in the form of executing a (`bash`) script. Initially the idea came from this wonderful article. My case is similar, but I will be not using a modem, rather `gnokii` or `Gammu`/`Wammu` with a mobile phone. For the server I am using Debian Wheezy. The clients should be able to use Windows, Linux (Debian in most cases) and Android. Therefore ideally this system would use Skype - both for the chatting and for voice calls. However, Microsoft has decided to drop the support on Skype APIs and that would make the job harder. I am also not very experienced with `Delphi` and `Python`, as there seem to be some APIs and libraries for those languages. I have some background in `C`, `bash` and `Perl`. So, I considered using a bot in Skype like `sevabot`, but have not tried that yet. In addition, it is not very sure for how long Skype will have the existing APIs. Another very nice option seems to be `LinPhone` with all the above features available. I would need to figure out a bit deeper the interaction with `linphonec` and `linphonecsh`, but this software seems to be quite nice. Other ideas that came are using `Pidgin` or any other chat client that could fulfill the above requirements. Another option would be if I could get this idea realized in the form of a webpage. I have an apache webserver on the Debian machine, which is running a small Wordpress site. But I think such a setup will be harder to do and not so efficient. And finally, maybe one of the easiest options would be to use E-mail for such a communication. However, this would be not so streamlined and efficient. I would appreciate all the ideas you may have. Which is the most efficient, fast and long-lasting manner to accomplish this goal?


title: why would curl and wget result in a 403 forbidden?

text: I try to download a file with `wget` and `curl` and it is rejected with a 403 error (forbidden). I can view the file using the web browser on the same machine. I try again with my browser's user agent, obtained by http://www.whatsmyuseragent.com. I do this:               wget -U 'Mozilla/5.0 (X11; Linux x86_64; rv:30.0) Gecko/20100101 Firefox/30.0' http://...      and               curl -A 'Mozilla/5.0 (X11; Linux x86_64; rv:30.0) Gecko/20100101 Firefox/30.0' http://...      but it is still forbidden. What other reasons might there be for the 403, and what ways can I alter the `wget` and `curl` commands to overcome them? (this is not about being able to get the file - I know I can just save it from my browser; it's about understanding why the command-line tools work differently) **update** Thanks to all the excellent answers given to this question. The specific problem I had encountered was that the server was checking the referrer. By adding this to the command-line I could get the file using `curl` and `wget`. The server that checked the referrer bounced through a 302 to another location that performed no checks at all, so a `curl` or `wget` of that site worked cleanly. If anyone is interested, this came about because I was reading this page to learn about embedded CSS and was trying to look at the site's css for an example. The actual URL I was getting trouble with was this and the `curl` I ended up with is               curl -L -H 'Referer: http://css-tricks.com/forums/topic/font-face-in-base64-is-cross-browser-compatible/' http://cloud.typography.com/610186/691184/css/fonts.css      and the wget is                wget --referer='http://css-tricks.com/forums/topic/font-face-in-base64-is-cross-browser-compatible/' http://cloud.typography.com/610186/691184/css/fonts.css      Very interesting.


title: what is the meaning of 1 at the end of awk script

text: I was reading this awk script `awk -F"=" '{OFS="=";gsub(",",";",$2)}1'` I want to know what is the function of `1` at the end of it


title: I cannot succeed in using the fluxbox ResizeTo function

text: I often use a stack of terminals one above the other. And I've notice I do it always the same way, resizing each terminal window so as it occupies circa 1/3rd of the screen. I wanted to have a short key for doing this automatically. Obviously the command exists (cf. fluxbox manual), called ResizeTo. in `~/.fluxbox/keys` I have tried:   * `Shift Mod4 a :ResizeTo -100% -33%`   * `Shift Mod4 a :ResizeTo 100% 33%` I've also launched `Reconfigure` so as to have the new keymapping working. However when pressing `Shift + Windows key + a`, there is nothing happening. Any idea what I'm doing wrong ?


title: Are there any virtualization solutions for OpenBSD that aren't from ports?

text: I'm searching for a virtualization solutions for an OpenBSD host and a CentOS guest. What are my options? I'm searching for one that doesn't use packages from ports. Are there any?


title: Problem with mouse scroll under one user

text: I have three users set up on my system (Debian testing / x64 / Xfce 4.8). For two of them scrolling with the mousewheel works perfectly, but for one user it doesn't work properly in Xfce. The mouse-wheel scrolling will work, but only when the mouse is over a scrollbar (horizontal or vertical) (e.g. in Thunar or when over the workspace-switching applet). This method doesn't work at all in iceweasel. I've tried deleting .gconf* and .config/xfce* but I still can't see why the mouse doesn't scroll. The home partition has survived several linux distro installs, so there may be odd files knocking around, but don't want to lose all settings etc that do work. Keyboard - Cherry Cymotion Master Linux (Num lock on/off makes no difference) Mouse - Logitech MX518 Both autoconfigured at startup (attempts to manually configure by creating an xorg config file actually fails with "Number of created screens does not match number of detected devices. Configuration failed")


title: Linux installation in RAID

text: I am a fairly new systems administrator and I have to configure the RAID on a Linux machine. From my understanding so far, RAID is an array of multiple disks. I have some questions though. **Question 1:** If I have five _500 GB_ HDD, these 5 HDDs together are termed as RAID disk.Is this right? **Question 2:** I presume the machine is brand new with nothing inside it. So, I just have a machine with RAID solid state disk. If I have to install RHEL or Ubuntu or any linux distribution in these hard disks, how should I install? Should I install the OS in any one of the disk and use RAID tool like **Mdadm**? **Question 3:** I believe the RAID disk is being configured for some software. So, is there any particular configuration I need to look out for?


title: Where to create virtual link for chroot?

text: I've tried to pass this step of lfs but when i put:               chroot "$LFS" /tools/bin/env -i      I got:               chroot: failed to run command '/tools/bin/env': No such file or directory      So i search about it and realized that i should check shared library so i did:               $ldd /bin/bash      linux-gate.so.1 =>  (0xb7787000)     libtinfo.so.5 => /lib/i386-linux-gnu/libtinfo.so.5 (0xb7746000)     libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xb7741000)     libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xb7591000)     /lib/ld-linux.so.2 (0xb7788000)      and               $ldd /tools/bin/env     linux-gate.so.1 =>  (0xb76f0000)     libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xb7522000)     /lib/ld-linux.so.2 (0xb76f1000)      And it looks for loader which is there(ld-* files) and i should create some virtual link to solve it,but i don't know where to put it and it should link which to what?


title: Make zsh alt-f behave like emacs alt-f

text: In emacs, `M-f` moves the caret to the end of the next word. In zsh, `M-f` (or rather `alt-f`) moves the caret to the beginning of the next word. For a more consistent experience, I'd like to have zsh `alt-f` mirror emacs behavior. How can I do this?


title: Local DNS Server Refuses to Ask itself for DNS

text: I am running Debian 7 and have set up a DHCP and DNS server. Everything is working nicely, except for the server itself not following the DNS entries in BIND. The problem is that `/etc/resolv.conf` is populated by an upstream gateway as its primary DNS. After manually changing the entry to point to itself instead of the upstream gateway, the DNS server uses the BIND settings before requesting DNS from the gateway. Unfortunately, upon reboot or re-connect of the interface, `/etc/resolv.conf` reverts back to using the gateway, putting me back into the problematic situation. I'd like to keep dynamic IP on that interface, while using a static nameserver. Is this possible?


title: What does it mean to be "sh compatible"?

text: I've seen the phrase "sh compatible" used usually in reference to shells. I'm not sure if it also applies to the programs that might be run from within shells. What does it mean for a shell or other program to be "sh compatible"? What would it mean to be "sh incompatible"? Edit: This question asking the difference between bash and sh is very relevant: http://stackoverflow.com/questions/5725296/difference-between-sh- and-bash I'd still like a direct answer to what it means to be "sh compatible". A reasonable expectation might be that "sh compatible" means "implements the Shell Command Language" but then why are there so many "sh compatible" shells and why are they different?


title: bash/shell pathname expansion for mkdir, touch etc?

text: So doing something like this in `bash` and most other shells won't work to create multiple subdirectories or files within subdirectories...               mkdir */test     touch */hello.txt      There are of course many ways of actually doing this, my preferred one is to use `find` when possible rather than using a `for` loop, for readability mainly. But my question is, why do the above not work?   From what I understand it's because the full destination file/path does not exist but surely that's a good thing if I'm trying to `mkdir` or `touch`. I've always just moved on and never really questioned it.   But does anyone have a decent explanation for this that will help me understand once and for all?


title: What is difference between GTK and QT applications?

text: Many packages available with GTK and QT versions. So, What is difference between them? Is there any difference in performance or working method?


title: Zorin OS: Low disk space message

text: I am frequently getting low disk space error and attached screen displayed. Let me know what to do.


title: Default umask 077 not applied at session start

text: I cannot get the default umask for a session to be `0077`. I have edited `/etc/login.defs` and set the value to `077` there:               UMASK           077      Also I've made sure the following entry exists in `/etc/pam.d/common-session`:               session optional                        pam_umask.so      While this configuration seems to work when the user logs in using `su` it doesn't when the login happens through mdm. Both mdm and su configuration files in pam.d include common-session.               username@hostname ~ $ umask     0022     username@hostname ~ $ su username     Password:     username@hostname ~ $ umask     0077      This problem does not occur when using GDM or LIGHTDM instead of MDM. Any ideas on what could be a possible cause of this?


title: problems installing lcov on Debian 6

text: I have been stuck for a few hours trying to install lcov on a debian 6 box. Any help would be greatly appreciated! What I have tried the following in the command line:               root@damrod-ci:/etc/munin/plugins# apt-get install lcov     Reading package lists... Done Building dependency tree     Reading state information... Done     You might want to run `apt-get -f install' to correct these: The following packages have unmet dependencies:   libpango1.0-0: Breaks:     plymouth (< 0.8.3-19) but 0.8.2-2ubuntu2.2 is to be installed E:     Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).                    root@damrod-ci:/etc/munin/plugins# apt-get -f install     Reading package lists... Done Building dependency tree        Reading     state information... Done Correcting dependencies... Done The     following packages were automatically installed and are no longer     required:   libgnumail-java libts-0.0-0 libcdio10 junit4     libgsf-1-common libarchive1 libntfs10 libgeronimo-jms-1.1-spec-java     libcdio-paranoia0 libcupsimage2   libgphoto2-port0 libmagickcore2     libservlet2.4-java antlr gvfs-backends obex-data-server     libimobiledevice0 libmockobjects-java libgnuinet-java   libasm2-java     libproxy0 libplexus-component-api-java libmagickwand2     libsoup-gnome2.4-1 libdirectfb-1.2-0 libxstream-java     libpango1.0-common   libgnujaf-java radiusclient1 libgsf-1-114 ivy     libopenobex1 lm-sensors libradius1 fancontrol libxpp3-java libgs8     psfontmgr tsconf ghostscript   libcdio-cdda0 libhamcrest-java groovy     libexif12 libpaper-utils libxcb-render-util0 libbluetooth3 libpaper1     libjs-mootools libgphoto2-2 Use 'apt-get autoremove' to remove them.     The following extra packages will be installed:   plymouth The     following packages will be upgraded:   plymouth 1 upgraded, 0 newly     installed, 0 to remove and 278 not upgraded. 179 not fully installed     or removed. Need to get 0B/141kB of archives. After this operation,     69.6kB of additional disk space will be used. Do you want to continue [Y/n]? y WARNING: The following packages cannot be authenticated!       plymouth Install these packages without verification [y/N]? y (Reading     database ... 85730 files and directories currently installed.)     Preparing to replace plymouth 0.8.2-2ubuntu2.2 (using     .../plymouth_0.8.3-20_amd64.deb) ... Unpacking replacement plymouth     ... dpkg: error processing     /var/cache/apt/archives/plymouth_0.8.3-20_amd64.deb (--unpack):      trying to overwrite '/lib/libply-splash-core.so.2.0.0', which is also     in package libplymouth2 0.8.2-2ubuntu2.2 Processing triggers for     initramfs-tools ... update-initramfs: Generating     /boot/initrd.img-2.6.32-33-server Processing triggers for ureadahead     **... Errors were encountered while processing:      /var/cache/apt/archives/plymouth_0.8.3-20_amd64.deb E: Sub-process     /usr/bin/dpkg returned an error code (1)      My sources.list               #############################################################     ################### OFFICIAL DEBIAN REPOS ###################     #############################################################          ###### Debian Main Repos deb http://ftp.nz.debian.org/debian/ squeeze main contrib non-free  deb-src http://ftp.nz.debian.org/debian/     squeeze main contrib non-free           ###### Debian Update Repos deb http://ftp.nz.debian.org/debian/ squeeze-proposed-updates main contrib non-free           ##############################################################     ##################### UNOFFICIAL  REPOS ######################     ##############################################################          ###### 3rd Party Binary Repos          #### Dotdeb - http://www.dotdeb.org deb http://packages.dotdeb.org oldstable all               ####### 3rd Party Source Repos          #### Dotdeb (Source) - http://www.dotdeb.org deb-src http://packages.dotdeb.org oldstable all


title: In Gnome, how do I decide whether to accept a PackageKit software source?

text: When I try to install software in the Gnome environment of Linux (mine is openSUSE) from a repository that I have not used before, PackageKit asks me to respond "Yes" or "Cancel" to a dialog "Software signature is required". How can I as a user or administrator get over the discomforts of this dialog? Or, how can Gnome correct them? I'm not merely complaining. I mean, yes, this dialog makes me want to rant about all the dialogs that say, in effect: "Would you like to daydream instead? [Y] [N]" But I actually want to know how to decide my answer to the dialog so that I can get software that I need from repositories while using my best judgment to authorize particular repositories or not. An important advantage of using repositories is that I'll be notified of updates.   * I can only see that the dialog appears after my request to install software. I doubt that the information in the dialog proves that it relates to my request. If I conclude that the dialog appears _because_ of my request, I may be committing the logical fallacy of _post hoc ergo propter hoc_.   * The facts claimed in the dialog are not attributed to a specific information source. I don't know why those are the facts that I must verify.   * I'm left to suppose that I must go check that the signature (meaning key, I suppose?) in the dialog matches the signature for the software source that I wanted. But nothing really gives me an address for that source that I can check up, or an idea of which of the many kinds of signature I'm looking for and where. The documentation page that I linked above says it's usually a GPG key. What little I know about GPG is that it's primarily used for email and that its method of providing security guarantees seems to require some subtle considerations.   * I'm not actually given a "signature". I'm given:      * a "signature URL" that is (I think) not actually a site where I can learn more;     * a "signature user identifier" that looks like an email address but does not (I think) give me a good way to check whether I want to trust communications from whoever controls that address;     * a "signature identifier" of eight hexadecimal digits which is (I think) not a cryptographic guarantee of anything.


title: How can I have a separate umask for directory or user?

text: I want a separate umask for a directory or a user. How can I do this? Edit: I am using Debian 6. The reason why I want to do this is, I want all my SFTP users to create files with write on group. I am using a SFTP client to test to see if the umask is setting properly.


title: How can I disable UFW logging for a specific event?

text: My router sends out multicast packets in regular intervals that are blocked by UFW's standard policies. These events are harmless but spam my `syslogs` and `ufwlogs`. I can't change the router's behaviour as that would require installing a modified firmware and thus void the warranty. So my question is: Is there any way I can prevent UFW from logging this particular event without changing the blocking policies? And, as a possible follow-up: If I can't define a custom logging policy, would allowing this incoming traffic pose a possible security risk?


title: Debian - Apache 2.2 & mod_php - memory usage

text: I have a memory problem with my servers (Debian 6.0) where is installed Apache httpd 2.2, mod_php and APC. Actually it seems that httpd allocate all available memory (4GB) when is waiting too much for an answer from Mongodb (30 seconds timeout). Ok, I know, 30 seconds timeout is too high. This long wait lead the frontend server to start to swap memory, the load average reach very high values (around 200) until the hw is completely stuck. I suppose the problem is in the current httpd configuration, because `MaxClients` is set to 200 and PHP memory limit to 128MB. In worst case we need only for each PHP engine at least 25GB of RAM, but we have 4GB.   * 128 megabytes * 200 = 25 gigabytes My humble opinion is that: having 4GB, if we shrinking php memory_limit to 96MB, we should support about 48 fork (i.e. `MaxClients` 48). Even because an Apache httpd forks a new child, most of the memory is shared with the parent process.   * Total Memory 4GB = Apache child 96MB * 48 `MaxClients` But how to know exactly how much memory is shared by all httpd children and how much is allocated by each apache httpd process?   And talking about PHP and APC, even in this case, how to know how much memory is shared and how much is allocated by each engine?


title: glade gtk+2 and gtk+3

text: I have Gtk+3 already installed as it was with the distro. I need to use gtk+2 and glade. How do I use glade with gtk+2 and still have both gtk2 and gtk3 installed on my linux box? I have Glade 3.12.2 installed and when I save a project then open it in a text file it shows gtk 3 and need for it to say gtk 2 not gtk 3.


title: How do I set the user of php-fpm to be php-user instead of www-data?

text: I am using php-fpm on debian with nginx for php5 support. I would like to have php-fpm to be under the user&group php-user instead of www-data. I thought the init.d script would have the user mentioned or uses a file which has www-data written in it. Yet I don't see it. How do I spawn this process to be under user php-user:php-user? Here is the php5-fpm init.d script on my server. I tried looking at start-stop-daemon man pages but didn't see it. I'm sure this is simple but I don't know how to do it.               #!/bin/sh     ### BEGIN INIT INFO     # Provides:          php-fpm php5-fpm     # Required-Start:    $remote_fs $network     # Required-Stop:     $remote_fs $network     # Default-Start:     2 3 4 5     # Default-Stop:      0 1 6     # Short-Description: starts php5-fpm     # Description:       Starts PHP5 FastCGI Process Manager Daemon     ### END INIT INFO          # Author: Ondrej Sury <ondrej@debian.org>          PATH=/sbin:/usr/sbin:/bin:/usr/bin     DESC="PHP5 FastCGI Process Manager"     NAME=php5-fpm     DAEMON=/usr/sbin/$NAME     DAEMON_ARGS="--fpm-config /etc/php5/fpm/php-fpm.conf"     PIDFILE=/var/run/php5-fpm.pid     TIMEOUT=30     SCRIPTNAME=/etc/init.d/$NAME          # Exit if the package is not installed     [ -x "$DAEMON" ] || exit 0          # Read configuration variable file if it is present     [ -r /etc/default/$NAME ] && . /etc/default/$NAME          # Load the VERBOSE setting and other rcS variables     . /lib/init/vars.sh          # Define LSB log_* functions.     # Depend on lsb-base (>= 3.0-6) to ensure that this file is present.     . /lib/lsb/init-functions          #     # Function to check the correctness of the config file     #     do_check()     {         [ "$1" != "no" ] && $DAEMON $DAEMON_ARGS -t 2>&1 | grep -v "\[ERROR\]"         FPM_ERROR=$($DAEMON $DAEMON_ARGS -t 2>&1 | grep "\[ERROR\]")              if [ -n "${FPM_ERROR}" ]; then         echo "Please fix your configuration file..."         $DAEMON $DAEMON_ARGS -t 2>&1 | grep "\[ERROR\]"         return 1         fi         return 0     }          #     # Function that starts the daemon/service     #     do_start()     {         # Return         #   0 if daemon has been started         #   1 if daemon was already running         #   2 if daemon could not be started         start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \             || return 1         start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \             $DAEMON_ARGS 2>/dev/null \             || return 2         # Add code here, if necessary, that waits for the process to be ready         # to handle requests from services started subsequently which depend         # on this one.  As a last resort, sleep for some time.     }          #     # Function that stops the daemon/service     #     do_stop()     {         # Return         #   0 if daemon has been stopped         #   1 if daemon was already stopped         #   2 if daemon could not be stopped         #   other if a failure occurred         start-stop-daemon --stop --quiet --retry=TERM/$TIMEOUT/KILL/5 --pidfile $PIDFILE --name $NAME         RETVAL="$?"         [ "$RETVAL" = 2 ] && return 2         # Wait for children to finish too if this is a daemon that forks         # and if the daemon is only ever run from this initscript.         # If the above conditions are not satisfied then add some other code         # that waits for the process to drop all resources that could be         # needed by services started subsequently.  A last resort is to         # sleep for some time.         start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON         [ "$?" = 2 ] && return 2         # Many daemons don't delete their pidfiles when they exit.         rm -f $PIDFILE         return "$RETVAL"     }          #     # Function that sends a SIGHUP to the daemon/service     #     do_reload() {         #         # If the daemon can reload its configuration without         # restarting (for example, when it is sent a SIGHUP),         # then implement that here.         #         start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME         return 0     }          case "$1" in         start)         [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"         do_check $VERBOSE         case "$?" in             0)             do_start             case "$?" in                 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;                 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;             esac             ;;             1) [ "$VERBOSE" != no ] && log_end_msg 1 ;;         esac         ;;         stop)         [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"         do_stop         case "$?" in             0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;             2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;         esac         ;;         status)             status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?             ;;         check)             do_check yes         ;;         reload|force-reload)         log_daemon_msg "Reloading $DESC" "$NAME"         do_reload         log_end_msg $?         ;;         restart)         log_daemon_msg "Restarting $DESC" "$NAME"         do_stop         case "$?" in           0|1)             do_start             case "$?" in                 0) log_end_msg 0 ;;                 1) log_end_msg 1 ;; # Old process is still running                 *) log_end_msg 1 ;; # Failed to start             esac             ;;           *)             # Failed to stop             log_end_msg 1             ;;         esac         ;;         *)         echo "Usage: $SCRIPTNAME {start|stop|status|restart|reload|force-reload}" >&2         exit 1         ;;     esac          :


title: Start the GUI automatically in OpenBSD

text: I can't find the GUI to start up automatically in OpenBSD hppa 5.3. What commands must I use to get this working? I want to use Gnome like in OpenSuse which I am more comfortable with.


title: Why do we use su - and not just su?

text: I don't understand why `su -` is preferred over `su` to login as root.


title: Why would we su without -?

text: When we do `su John` I switch as user John.   When we do `su - John` I switch as user John having user John's environment.   As far as I can see the first option is useless. What is the use of switching to another user and not have that user's environment?   Am I wrong? What is the difference in use cases between these 2 options?


title: Help Parsing `su` Command ... What Does the Hyphen Do?

text: In the command `su - username`, what is the function of the hyphen? It seems to work all the same without the hyphen.


title: Should the mysql user have access to /var/lib/mysql?

text: First, let me say that mysql seems to be working perfectly on the machine. Still, when I `su mysql` and `ls /var/lib/mysql`, I get access denided. When I `sudo ls /var/lib/mysql` I see the data files corresponding to my database tables, so this is definitely the data folder of mysql. Shouldn't the mysql user have access to its own data folder? Is the machine misconfigured somehow? **Some more details:**               $ sudo ls -la /var/lib/ | grep mysql     drwx------  5 mysql     mysql   4096 2011-06-25 08:05 mysql     $ sudo su mysql     $ ls /var/lib/mysql     ls: cannot open directory /var/lib/mysql: Permission denied     $ sudo ls -la /var | grep lib     drwxr-xr-x 42 root root  4096 2011-03-17 12:03 lib     $ sudo ls -la / | grep var     drwxr-xr-x 14 root root  4096 2010-12-02 19:14 var     $


title: pure-ftpd permission denied on external usb drive

text: I have a sheevaplug PC (Debian installed) that I'm trying to setup my personal FTP server with. So far I was able to set up auto mounting and installed pure- ftpd. I currently have autofs setup to mount the external USB drive to the home dir of a user called "xt" (/home/xt/usb1) Here's the mounting options I used:               usb1 -fstype=auto,umask=000,uid=1000,gid=1000,rw,nosuid,nodev,user :/dev/sda1      And the `pure-ftpd` cmd:               pure-ftpd -S 400 -c 30 -B -j -E      With the way it is now, I'm able to browse all dirs fine, I can even upload, rename and delete files outside of the usb drive. However inside the usb drive, I can browse files only (denied access to downloads, uploads, delete, etc...). I did an `ls -l /home/xt/usb1` and all dirs are listed as: `drwxrwxrwx` on the permissions colum so on paper, I should be able to do anything to the drive.


title: Postgresql 9.1 - Kali Linux

text: I start to read this book : http://www.amazon.fr/Metasploit-The-Penetration- Testers-Guide/dp/159327288X And i have some trouble in using `postgresql 9.1` (in Kali Linux). When i start `msfconsole`, i first have this message : > Failed to connect to the database: could not connect to server: Connection > refused Is the server running on host "localhost" (::1) and accepting TCP/IP > connections on port 5432? could not connect to server: Connection refused Is > the server running on host "localhost" (127.0.0.1) and accepting TCP/IP > connections on port 5432? And then `msfconsole` starts normally. After that, I try to connect to `postgresql`, using the credentials I've found in : **/opt/metasploit/apps/pro/ui/config/database.yml** But it doesn't work, because **authentification failed**.


title: [Solved]man crashes on OS X after upgrading bash and its manpages

text: Bash on OS X is always so old that I finally decided to compile a never(4.3.18) one and simply override and replace the old one. Here are the configure flags I used:               ./configure --prefix=/ --datarootdir=/usr/share      After installing this, I made a symlink:               /bin/sh -> bash      Everything worked well, except for man. Other manpages also has such problem.               apple [ ~ ] $ man bash     Error executing formatting or display command.     System command (cd '/usr/share/man' && (echo ".ll 14.0i"; echo ".nr LL 14.0i"; /bin/cat '/usr/share/man/man1/bash.1') | /usr/bin/tbl | /usr/bin/groff -Wall -mtty-char -Tascii -mandoc -c | (/usr/bin/less -is || true)) exited with status 32512.     No manual entry for bash      However everything is fine if I simply execute the command mentioned above:               apple [ ~ ] $ (cd '/usr/share/man' && (echo ".ll 14.0i"; echo ".nr LL 14.0i"; /bin/cat '/usr/share/man/man1/bash.1') | /usr/bin/tbl | /usr/bin/groff -Wall -mtty-char -Tascii -mandoc -c | (/usr/bin/less -is || true)      And I got the regular and correct output, which is the new manpage. * * * Well, All this was caused by the symlink... I don't know why it disappeared. Anyway, Everything went well after I relinked it.


title: Windows 8.1 and Ubuntu 14.04 LTS problem

text: I have one drive which can be accessed from `Ubuntu 14.04 LTS` and `Windows 8.1`. Lets call it Drive D. When I shutdown `Windows 8.1` and start `Ubuntu 14.04 LTS`, I'll not be able to mount Drive D. But when I restart `Windows 8.1` and select `Ubuntu 14.04 LTS` to boot, then after booting, Drive D mounts. Is there any bug in Windows/Ubuntu, or am I missing something?


title: How do I install a device driver provided as a .bin file?

text: I am a new Linux user and am struggling installing a driver for a usb WiFi device I want to use on an embedded system (BeagleBone). When I download the driver for the chipset (Ralink 2070), it is provided as a bin file. I have tried making it executable (`chmod +x`), but using `file` says it is a data file and I cannot execute. How do I use this bin file to install the chipset driver? Do I only need to place this in a folder, and if so, where should it be placed?


title: e2fsck -y /dev/sda changed my 6TB disk into 1.8TB

text: After problems with mount I run `e2fsck -y -b BLOCK /dev/sda` and it was running for 3 days on 6TB raid 0, when it completed this was the output:               /dev/sda: ***** FILE SYSTEM WAS MODIFIED *****          /dev/sda: ********** WARNING: Filesystem still has errors **********          /dev/sda: 1529942/122060800 files (7.5% non-contiguous), 9080905/488243200 blocks      So I mounted this virtual drive and it shows now: Total 1.8TiB, Free 1.8TiB, looks like it shows the space that left on my virtual disk before filesystem ext4 crashed. None of harddisks crashed, only filesystem was corrupted. I did not have disk partitioned, only one single virtual disk. Any way that I could restore files somehow?


title: CentOS 6.5 applications won't minimize on lower panel

text: I believe this question is related to something that happened earlier today. Right now, when I press minimize on any Gnome application, it dissappears, is still running, but I cannot get to it to restore it. Should I reset my Gnome desktop, and how do I do that?


title: Customizing less colors

text: When using less in OS X, how can I customize the colors with with things are displayed? When I run less within an ansi-term in Emacs the colors don't come out nicely.               $ less --version     less 418     Copyright (C) 1984-2007 Mark Nudelman


title: How to interpret the output of safecopy

text: Just as an example, this is one typical output line. > ...........................[12767109](+112394240){X [12792709] > X}[12818309](+209715200) I have gone through the DESCRIPTION OF OUTPUT in safecopy's manpage but I still am not quite sure what exactly it means. For example, if `(+112394240)` is "the number of blocks (or bytes) [which is it?] continuously read successfully up to this point." and if `(+209715200)` is the "number of blocks (or bytes) of recent continuous unreadable data.", then how can the latter be larger than the former? Additionally, what is the meaning of `{X [12792709] X}`, does it mean that only one block (block 12792709) was unreadable? Any clarification would be greatly appreciated.


title: ufw firewall rules for security.debian.org

text: What is a practical way to manage a whitelist of firewall outgoing connection rules for http://security.debian.org (on a server that blocks all outgoing connections by default)? My understanding is that security.debian.org is a CNAME to several mirror IPs, and it is advisable to use only IP addresses (not hostnames) in firewall rules. At the moment I simply add newly resolved IPs to security.debian.org to my firewall (ufw) outbound rules as I discover them. However this is cumbersome and doesn't allow for automated apt-get updates. Can anyone suggest a better way? PS: I found the following page somewhat relevant but it did not provide a solution: http://www.debian.org/doc/manuals/securing-debian-howto/ap-fw- security-update.en.html


title: How to identify error in a particular file while checksum verification (which file having problem while verification) in shell script

text: I have two files on ftp location in csv.gz format and their checksum is in .csv.gz.md5 format. I am copying this file in my local system. I am generating check sum for it through **md5sum**. Now I am comparing it against the copied file. Now I want to identify any **error** in a file if there is one and also which file is having an **error**. Please help me.


title: Redirect home to shared NTFS partition

text: I've installed windows 7 and linux dualboot. My partitions are:               /dev/sda2: UUID="EC328C61328C329E" TYPE="ntfs"      /dev/sda3: UUID="800E88610E8851D8" TYPE="ntfs"      /dev/sda4: UUID="20e7c430-bab0-4aa1-8afe-caa9d97e1de3" TYPE="ext4"      where `sda2` is windows `sda3` is shared partition and `sda4` is linux sd3 has mounting point `/windows` Because `sda2` and `sda4` are small partitions I created directories Music, Documents, etc. and redirected windows libraries in here. I want do the same in linux but editing `~/.config/user- dirs.dirs` to               XDG_DESKTOP_DIR="$HOME/Plocha"     XDG_DOWNLOAD_DIR="$HOME/"     XDG_TEMPLATES_DIR="$HOME/Šablony"     XDG_PUBLICSHARE_DIR="$HOME/Veřejné"     XDG_DOCUMENTS_DIR="/windows/home/Documents"     XDG_MUSIC_DIR="/windows/home/Music"     XDG_PICTURES_DIR="/windows/home/Pictures"     XDG_VIDEOS_DIR="/windows/home/Videos"      has no effect. Folders has icons as it if works but when I click on Music in the file browser it goes to `/home/myUser/Music` not into`/windows/home/Music`. It would be great if it would work for `cd ~/Music` command too :)


title: python3.3 build from source

text: When running make test while doing a build from source for python3.3 I had 25 tests skipped and 14 skips unexpected on linux. OS Debian 7.0 64 bit server. How can I figure out what packages are needed to resolve these skipped tests?


title: How do I get Parallels Plesk to only respond to a specific host, not ANY host?

text: I'm trying to get my Parallels Plesk Admin Panel to _only_ respond to _one_ host, not every host that points to the machine. Can this be done in Parallels Plesk 11.x? I assumed that I'd be able to configure this through the ~~Apache~~ Nginx config files, but I haven't been able to locate where that might be. So to be clear, I want the admin panel accessible on i.e. `admin.domain.com`, whilst unavailable on `www.clientdomain.com`, even though they're both on the same server and the same IP.


title: ssh local tunnel to VM

text: So, can anyone explain why this doesn't work? Everything from remote host (`192.168.1.3`):               ssh -L 9000:192.168.1.2:80 login@192.168.1.2     elinks http:127.0.0.1:9000      and I can see a web page. other host with www (`192.168.1.1`):               ssh -L 9000:192.168.1.3:80 login@192.168.1.2     elinks 127.0.0.1:9000      and I see another web page. BUT when I try to access a Virtual Machine on `192.168.1.2`, then nothing:               ssh -L 9000:172.31.255.29:80 login@192.168.1.2      I was trying to log rejected packages (nothing found), `tcpdump` shows answer from vm to `virbr0` What could be the problem? I have got only one clue, that it might be unix socket related but need advice from somebody who understands that better than me.


title: How can I use "emulate sh" in zsh to work with ". myscript.sh"?

text: I've been using `emulate sh -c ". $HOME/myscript.sh"` and it's working so far. However, if I'm at `~` and try to do `emulate sh -c ". myscript.sh"`, I get `.: no such file or directory: myscript.sh.`. Why?


title: How to really easily save all tagged attachments in mutt?

text: You can save all attachments via   1. tag all attachments via hitting `t`   2. `;`   3. `s`   4. choose destination directory and hit `a` (all) This works but has following severe side effect: you have to hit n-times `enter` for n attachments. That means even if there are no file name collisions in the destination directory. This is also documented in the Mutt FAQ. Very inconvenient. Some mutt users seem to recommend piping messages to munpack (example message linked). Good idea - but how to make Mutt prompt for a destination directory (as part of a `munpack` invoking macro)? How do I construct such a macro? Or are there better solutions to this issue?


title: "This is a 32 bit computer, you can't use 64 bit software on it"

text: anisha@linux-uitj:~> cat /etc/issue && uname -a     Welcome to openSUSE 11.2 "Emerald" - Kernel \r (\l).          Linux linux-uitj 2.6.31.5-0.1-desktop #1 SMP PREEMPT 2009-10-26 15:49:03 +0100 x86_64 x86_64 x86_64 GNU/Linux          anisha@linux-uitj:~>      Doesn't this output show that this is a 64 bit machine? Now when I try to load a `64 bit OpenSUSE 11.3 ISO` on the `VirtualBox`, I get a message as shown in the thread title!               anisha@linux-uitj:~/tarBalls> file opensuse-dvd-x86_64.0702..001.iso     opensuse-dvd-x86_64.0702..001.iso: ISO 9660 CD-ROM filesystem data 'openSUSE-DVD-x86_64.0702..001  ' (bootable)          anisha@linux-uitj:~/tarBalls>


title: How to install emerald package on Mint?

text: How can I install the **Emerald** package on **Mint**? I cannot seem to find and install it in the _Synaptic Package Manager_. I think the repository of this package is missing. But I don't know where it is and how to add it to the current list of repositories.


title: Compiling C/C++ code by way of including preprocessor build instructions in an actual C/C++ source file

text: So here's the thing, and it's really just conceptual so don't let it bug you: I've got reasons for not wanting to rely on a specific build system. I don't mean to dis anybody's favorite, but I really just want to stick to what comes with the compiler. In this case, GCC. Automake has certain compatibility issues, especially with Windows. <3 GNU make is so limited that it often needs to be supplemented with shell scripts. Shell scripts can take many forms, and to make a long story short and probably piss a lot of people off, here is what I want to do -- The main entry point is God. Be it a C or C++ source file, it is the center of the application. Not only do I want the main entry point to be the first thing that is executed, I also want it to be the first thing that is compiled. Let me explain -- There was a time when proprietary and closed-source libraries were common. Thanks to Apple switching to Unix and Microsoft shooting themselves in the foot, that time is over. Any library that needs to be dynamically linked can be included as a supporting file of the application. For that reason, separate build instructions for .SOs (and maybe .DLLs ;]) is all fine and dandy, because they are separate executable files. Any other library should be statically linked. Now, let's talk about static linking -- Static linking is a real bitch. That's what makefiles are for. If the whole project was written in one language (for instance C OR C++), you can #include the libraries as headers. That's just fine. But now, let's consider another scenario -- Let's say you're like me and can't be arsed to figure out C's difficult excuse for strings, so you decide to use C++. But you want to use a C library, like for instance MiniBasic. God help us. If the C library wasn't designed to conform to C++'s syntax, you're screwed. That's when makefiles come in, since you need to compile the C source file with a C compiler and the C++ source file with a C++ compiler. I don't want to use makefiles. Bear with me -- I would hope that there is a way to exploit GCC's preprocessor macros to tell it something like this: ```` Hi, GCC. How are you doing? In case you forgot, this source file you're looking at right now is written in C++. You should of course compile it with G++. There's another file that this file needs, but it's written in C. It's called "lolcats.c". I want you to compile that one with GCC into an object file and I want you to compile this one with G++ into the main object file, then I want you to link them together into an executable file. ```` How might I write such a thing in preprocessor lingo? Does GCC even do that?


title: Need help converting a string from a file into a date

text: I'm trying to read a string from a file and then convert it into a date but for some reason it's failing. I'm actually modifying a GeekTool Geeklet that's not working at the moment. It reads a file locally and pulls out a target date that is then used in a countdown clock. The line of code that is failing is:               TARGET=$(date -j -f %D_%T $1 +%s)      I know that I can hardcode the value in the script using -v but I want to work out why this line isn't working. I can't seem to find any refs to converting a string from a file into a date object. I also can't find refs to -j or -f flags... [edit] Here's the full script:               #!/bin/bash     # Homework countdown     # BETA - I will update this when I get more time     function countdown     {     CURRENT=$(date +%s)     TARGET=$(date -j -f %D_%T $1 +%s)     LEFT=$((TARGET-CURRENT))     WEEKS=$((LEFT/604800))     DAYS=$(( (LEFT%604800)/86400))     HOURS=$(( (LEFT%86400)/3600))     MINS=$(( (LEFT%3600)/60))     SECS=$((LEFT%60))          lblWEEKS="Weeks"     lblDAYS="Days"          if [ $DAYS == 1 ]     then     lblDAYS="Day"     fi          if [ $WEEKS == 1 ]     then     lblWEEKS="Week"     fi          if [ $HOURS -lt 10 ]     then         HOURS=0$HOURS     fi            if [ $MINS -lt 10 ]     then         MINS=0$MINS     fi               if [ $SECS -lt 10 ]     then         SECS=0$SECS     fi          echo $1     echo $TARGET     echo $2 $WEEKS Weeks, $DAYS $lblDAYS $HOURS:$MINS:$SECS     # Optional extra line between timers     echo     }     DATES=( $( cat /Users/Shared/Deadlines.txt ) )     # Even numbered indices are names, odd numbered indices are dates               if [ ${#DATES[@]} == 0 ]     then     echo "No Deadlines!"     return     fi          for (( i = 0 ; i < ${#DATES[@]} ; i+=2 ))     do     countdown ${DATES[i+1]} ${DATES[i]}     done      And the file simply contains: test: 17/05/2011_12:00


title: KDE and LightDM on ArchLiux

text: Is it possible to use LightDM with KDE on Archlinux? Wiki says > Basically there are two ways of starting KDE. Using KDM or xinitrc. I use also awesome WM and XFCE, so I'd like to use LightDM instead.


title: GNOME 2.91 in Ubuntu 10.04 (or 11.04 as it doesn't matter)

text: I found GNOME Panel v2.91 and I would like to try it for testing purposes only. It looks like in this version it was still using the GNOME 2 Layout with the GNOME 3 engine. I would like detailed instructions to deal with the dependencies issues. I would like to try this out to see how it looks and whether it's stable or not. You can find the version here: http://ftp.gnome.org/pub/gnome/sources/gnome-panel/2.91/


title: How to install Debian on Acer Chromebook C720?

text: I did manage to find a set of scripts to install Ubuntu 13.10 onto a Chromebook (see link). However, every hour or so, I get a "System program problem detected" error. This is obviously not very reassuring. How do I install Debian onto a Chromebook? I have heard that it is more stable than Ubuntu.


title: Optimization for an SSD?

text: I am running Fedora 20 on a Laptop ( Lenovo Ideapad Yoga 2 Pro ) with an SSD. My filesystem is LVM with ext4 as the format option. I am now running Fedora as the only OS on the system with Legacy BIOS turned on (the system came configured with Secure Boot) and with the entire hard drive reformatted for Fedora. What optimizations should I institute to ensure long, and trouble free, SSD life?


title: Valley View "Black Screen of Death"

text: I just got an HP 15-d030nr and installed Mint 16 alongside Win 8.1. My problem is that, without using `nomodeset`, immediately after choosing an option in GRUB, random pixels flash along the top quarter or third of the screen, which then goes blank, and the backlight shuts off. I can enter my password and hear the login sound, so it's still booting, just with no display. I've tried a lot of the solutions to this problem listed for older Intel hardware to no avail. Running `lspci | grep -i vga` gives me `00:02.0 VGA compatible controller: Intel Corporation ValleyView Gen7 (rev 0a)` From what I can tell, Valley View ought to be supported by the kernel (3.11), so I'm pretty lost here. One of my dmesg logs is here. Also, I ran into the same issue trying out Fedora, so it's not Just Ubuntu/Mint.


title: A window asking me to enter my ssh passphrase is popping up randomly. Why?

text: I'm on Ubuntu 14.04. For a few weeks now a small window keeps popping up randomly, grabbing my keyboard and asking me to enter the passphrase for my ssh key. The Window's title says "OpenSSH", and it states the path of the private key file it wants to unlock. Of course, I don't do it, because I don't know where this request is coming from. Sometimes, after I hit cancel, a warning window pops up, saying that something might be eavesdropping on my session, because the keyboard could not be grabbed. This sounds very suspicious to me. I can't remember doing anything with ssh that might cause this behavior. How would I go about finding out where these ssh key requests are coming from and how to stop them?


title: Using in/out named pipes for a TCP connection

text: I've been fiddling with getting this to work for a while now, so I suspect some sort of fundamental misunderstanding about how pipes work is the root cause of my troubles. My goal is to initiate a TCP connection to some remote host via `netcat` and have two named pipes on the filesystem: one that processes can read from to get incoming data, and other that processes can write to that serve as outgoing data. I am presently using the following construction:               mkfifo in     mkfifo out     cat out | netcat foo.bar.org 4000 > in &      From here, I would like to permit other processes to read and write to/from this open TCP connection. Should this "just work", or is there a reason why a construct like this can't work? What _seems_ to happen at present is that I can read from `out` without issue, but when I write to `in` I get output mentioning a broken pipe and all subsequent communication appears to be dead. Thoughts? (Related: I originally used:               netcat foo.bar.org 4000 < out > in &      but found it to block waiting for input. I'm curious about this as well, but it's probably better addressed in a separate question.)


title: Collapsing a stream of multiple lines into one line

text: I have a file containing a a large number of lines, each of which contains a bunch of numbers which are separated by spaces. I process this data in a pipe in some way, and then I want to collapse the multiple lines into a single line of all the numbers separated by spaces. Is there a standard command-line utility I can use to do this? It seems like most line-by-line utilities won't mess with the newlines...


title: Grub does not recognize password

text: I'm running Grub .97 with an OpenSuSE 11.2 and Windows XP installation. I configure the grub password in OpenSuSE 11.2 via the `Boot Loader` module. However, when I type in the password in grub, during bootup, I simply get a `Failed` message. I have tried about three or four different passwords. I can boot up, I just can't use the password to edit anything about grub. I have also tried setting the grub password via the command line by typing `grub` to go to the interactive menu, typing `md5crypt`, typing my password, and copying the hashed password to the menu.lst file. Still no luck when I enter the password.


title: Connect to a remote mysql server with bash php or perl

text: What is the best and lowest resource way to connect to a remote mysql server (`server1.example.com`) and execute queries like               INSERT into SERVICES (user, id) ($user, $id)      from `server2.example.com`? Is it better/easier to use PHP or Perl rather than Bash? (I want to be able to easily run it from the terminal.) Anyone know a good template script for it?


title: Cisco router interface connected to PC is up while PC interface is down

text: I have a following topology:               C2801[Fa0/0] <-> [eth0]PC      According to _Cisco 2801_ router, the interface facing the PC is up:               C2801-A#sh int description     Interface                      Status         Protocol Description     Fa0/0                          up             up       -> PC eth0     Fa0/1                          up             up       -> ME-C3750-24TE-MA Fa1/0/1     C2801-A#      I can verify this with `sh int Fa0/0` command in Cisco router. However, in PC, the eth0 interface is down according to `ip link show` and `ethtool` while the NIC "UP" LED is lit. NIC is using _e1000e_ module. I'm running Debian 7(3.2.0-4-686-pae). Am I correct that with certain kernel modules, Linux is not able to physically shutdown NIC port? Has anybody else seen such behavior?


title: A command showing if I have the right to perform writing?

text: I'm searching for a command which only says if the current user has r-rights (read) on the file passed as a parameter. This command could be something like `haveIRights -x <file>` and it has to only return explicitly yes or not. Is there a command like this?


title: Once the system has been started, is there any advantage in using systemd?

text: I'm running Gentoo with the default SysV-style OpenRC init system. The boot time is short enough to not bother me. Is there any reason to try systemd?


title: What does size of a directory mean in output of 'ls -l' command?

text: What does size of a directory mean in output of `ls -l` command?


title: What's the size of a folder entry?

text: > **Possible Duplicate:**   >  What does size of a directory mean in output of 'ls -l' command?               user@~ > ll /tmp/foo     drwxr-xr-x 2 user user 4,0K  1 oct.  15:15 bar      What are those 4,0K ? Is there somewhere an article about them ?


title: ls -ld /dir, Solaris

text: Always when I run `ls -ld /dir` the output give me the size = 512 even if there are files in it or not. but when I run `du -sh` the output give me the actual size of the directory including its content.


title: Can't use my old my.cnf from MySQL 5.5.38 in newer 5.6.19

text: Ok so I have been trying to upgrade MySQL 5.5 to 5.6. I have been given this set my.cnf file (see below). I was able to uninstall the MySQL 5.5 rpms and install the 5.6. When I reload the back up my.cnf file the mysql server does not want to start. Is there something wrong with this file? I have ran `mysql_install_db`. However, I cannot get the server to start up with my `my.cnf` file. I have looked in the error log, but it hasn't been copying anything recent to it. The `my.cnf` works when it is blank. This is what my `my.cnf` file from MySQL 5.5 looks like (see below). I need this my.cnf file to work on the 5.6 version. Anyone have any incite?               # You can copy this to one of:     # - "/etc/mysql/my.cnf" to set global options,     # - "~/.my.cnf" to set user-specific options.     #     # One can use all long options that the program supports.     # Run program with --help to get a list of available options and with     # --print-defaults to see which it would actually understand and use.     #     # For explanations see     # http://dev.mysql.com/doc/mysql/en/server-system-variables.html     # This will be passed to all mysql clients     # It has been reported that passwords should be enclosed with ticks/quotes     # escpecially if they contain "#" chars...     # Remember to edit /etc/mysql/debian.cnf when changing the socket location.     [client]     port            = 3306     socket          = /u02/mysqldata1/mysqld_3306.sock     #     #     [mysqld_safe]     socket          = /u02/mysqldata1/mysqld_3306.sock     nice            = 0     #     #     [mysqld]     #performance_schema=1     user            = mysql     socket          = /u02/mysqldata1/mysqld_3306.sock     port            = 3306     basedir         = /usr     datadir         = /u02/mysqldata1/data/3306     tmpdir          = /u02/mysqldata/tmp     skip-external-locking     character_set_server    = utf8     lower_case_table_names  = 1     #     # Instead of skip-networking the default is now to listen only on     # localhost which is more compatible and is not less secure.     # bind-address            = 0.0.0.0     max_allowed_packet              = 64M     max_connections                 = 500     max_connect_errors              = 100     max_heap_table_size             = 256M     tmp_table_size                  = 256M     net_buffer_length               = 8K     sort_buffer_size                = 4M     read_buffer_size                = 1M     read-rnd-buffer-size    = 2M     table_cache                     = 1024     table-definition-cache  = 512     thread_stack                    = 256K     thread_cache_size               = 256     sql-mode                        = NO_AUTO_CREATE_USER     query_cache_size                = 64M     query_cache_limit               = 4M     #     # MyISAM Configuration     #     key_buffer_size                 = 512M     myisam_sort_buffer_size         = 128M     ft_min_word_len                 = 3     myisam_recover_options          = BACKUP,FORCE     myisam_repair_threads           = 6     myisam_use_mmap                 = 1     #     # General Logging     #     log_error                       = /u02/mysqldata/mysqllog/3306/err/error.log     long_query_time                 = 1     slow_query_log                  = 1     slow_query_log_file             = /u02/mysqldata/mysqllog/3306/slow/mysql_slow.log     general_log                     = 0     general_log_file                = /u02/mysqldata/mysqllog/3306/general/mysql_general.log     #     # Binary Log and Replication Configuration     #     log_bin                        = /u02/mysqldata/mysqllog/3306/bin/mysql-bin.log     log-bin-index         = /u02/mysqldata/mysqllog/3306/bin/mysql_bin.index     binlog-cache-size     = 256K     binlog_format         = ROW     #binlog_do_db           = include_database_name     #binlog_ignore_db       = include_database_name     relay-log               = /u02/mysqldata/mysqllog/3306/relay/mysql_bin.log     relay-log-index         = /u02/mysqldata/mysqllog/3306/relay/mysql_bin.index     expire-logs-days        = 7     max_binlog_size         = 100M     sync_binlog             = 0     #     # Replication     #     server-id=129206     #log-slave-updates     #replicate-ignore-db = mysql     #replicate-ignore-table=     slave_transaction_retries = 20     #slave-skip-errors = 1062     #auto_increment_increment = 3     #auto_increment_offset = 3               #     # InnoDB Configuration     #          innodb_file_format                      = Barracuda     innodb_file_format_max                  = Barracuda          innodb_data_home_dir                    = /u02/mysqldata1/innodb/3306/data     innodb_log_group_home_dir               = /u02/mysqldata1/innodb/3306/log     innodb_file_per_table     innodb_data_file_path                   = ibdata1:10M:autoextend          transaction-isolation                   = READ-COMMITTED          innodb_flush_log_at_trx_commit          = 0     innodb_log_buffer_size                  = 8M     innodb_log_file_size                    = 512M          innodb_buffer_pool_size                 = 500M     innodb_additional_mem_pool_size         = 128M          innodb_flush_method                     = O_DSYNC     innodb_thread_concurrency               = 0     innodb_lock_wait_timeout                = 60     innodb-open-files                       = 500     innodb-support-xa                       = 0               #     #     # For generating SSL certificates I recommend the OpenSSL GUI "tinyca".     #     # ssl-ca=/etc/mysql/cacert.pem     # ssl-cert=/etc/mysql/server-cert.pem     # ssl-key=/etc/mysql/server-key.pem          [mysqldump]     quick     quote-names     max_allowed_packet      = 128M          [mysql]     #no-auto-rehash # faster start of mysql but no tab completition          [isamchk]     key_buffer              = 1G


title: Fedora 18 : install input method

text: I'm using Fedora 18. I choose ibus in input method selector. In ibus, I choose preference to change input method. But I just see english-english method. I cannot choose input method for another language.(there is a dropbox, but all language is blur, but english). So, I don't know how to choose another language. (in my case is japanese and vietnamese). I have tried a command when I google:               yum install scim-lang-japanese      but my terminal notice that this package does not exist. Please teach me, how to add another input method for my language in ibus. thanks :)


title: How to append multiple lines to a file with bash, with "--" in front of string

text: Question very similar to How to append multiple lines to a file with bash but I want to start the file with `\--`, and also append to the file, if possible.               printf "--no-color\n--format-doc\n--no-profile\n" >> ~/.rspec-test      The issue is starting the file with "--" gives me a:               -bash: printf: --: invalid option     printf: usage: printf [-v var] format [arguments]      Is there a way to escape the `\--`? Are there any alternatives? I'm not sure how to do multiple lines using `echo`, and `cat` isn't a good option, I'd like to have it in an automated script.


title: Why are man pages blank for non-root users?

text: . . . And how can I fix that? :-) I'm running RHEL 5 and when I try to view man pages as a regular user, they are blank. I've tried `man man > manman.txt; cat manman.txt` and there is no output, i.e., the file has no length. I try `sudo man man` and I see beautiful man page output. I've looked at the permissions under /usr/share/man and they look okay. The directories are all o+rwx and the files are o+r. I've tried . . .               [me@host01 ~]$ sudo man -w man     /usr/share/man/en/man1/man.1.gz     [me@host01 ~]$ man /usr/share/man/en/man1/man.1.gz      . . . and that's blank also.


title: SSH not landing in the home directory

text: I have recently installed Raspbian into a Raspberry Pi. As part of the installation process I changed the user name and group from the default (`pi`) to my own (let's call it `user`) using `usermod` and `groupmod`. I also moved the home directory (`/home/pi`) to the new user name (`/home/user`) using `usermod`. Everything works fine except that when I login using SSH instead of landing the new user directory (`/home/user`) I end up at the home directory (`/home`). Any idea why this may be happening? Any solution? It's not a big deal but it is confusing me. The directory `/home/user` exists with permissions 755. In addition to that the `/etc/passwd` file contains an entry that looks like the following:               user:x:1000:1000:User:/home/user:/bin/bash      To me everything looks fine, but still when I login from ssh I get a prompt that looks like `user@raspberrypi /home $`.


title: backup list of installed packages

text: I want to reinstall my linux system (specifically linux mint). I have kept important data elsewhere, so I can safely remove everything. However, I want to do the following:   1. save the list of packages I have installed so far    2. after reinstall take the backup list and use it to install packages Are there tools that can assist in doing this. I know I can use `dpkg -l` to get list but perhaps I only want the leafs - packages that no other depend on.


title: Do programs access tools like grep, sed, tr, or sort due to their efficiency?

text: Or it's meaningful only when you are in the command line and want something simple done right away. Are these tools more efficient than a program library?


title: Interactive backup tool

text: I am looking for a backup (or diff) tool where I can select _interactively_ which file I want to copy towards my external hard-disk. Let me explain with further details: I have two computers and an external hard disk. All the disks have (somewhere) the same directory structure and, at some point, the same content. I can modify files/directory structures in any of the two computers. Modify means: - create/delete (on purpose or not)/move new files and dir, - improve or _alter_ some files. So I'm looking for a tool working like `diff`, which shows the differences between two directory trees and _ask_ me what to do (ie, in which direction to copy/remove). `meld` appeared to do it, but its not really efficient with my configuration (~30GB over data), do you have any suggestion?


title: Grub loading slowly with SSD

text: Since yesterday, I added a brand new SSD in my PC, and I am experiencing a very fast boot from grub menu. The problem is before arriving to this menu, I must wait for a long time (~30s in most cases). I installed grub on the SSD. After the BIOS, I sometimes see "Grub loading" immediately, sometimes just a blinking cursor, but the time to reach the menu seems to be the same. I tried adding debug=disk (and even debug=all to my grub.cfg), but logs appear only after the unexplained period of time waiting ends. I have 3 disks: - sda, marked as bootable with a windows boot loader on it - sdb, which is the SSD - sdc, which holds the swap partition and a data partition. It had my previous installation of Fedora 18 until yesterday parted description:               Model: ATA ST3250410AS (scsi)     Disk /dev/sda: 250GB     Sector size (logical/physical): 512B/512B     Partition Table: msdos     Disk Flags:           Number  Start   End    Size   Type     File system  Flags      1      32.3kB  250GB  250GB  primary  ntfs         boot               Model: ATA M4-CT128M4SSD2 (scsi)     Disk /dev/sdb: 128GB     Sector size (logical/physical): 512B/512B     Partition Table: msdos     Disk Flags:           Number  Start   End     Size    Type     File system  Flags      1      1049kB  1075MB  1074MB  primary  ext4         boot      2      1075MB  11.8GB  10.7GB  primary  ext4      3      11.8GB  33.7GB  21.9GB  primary  ext4               Model: ATA ST3160827AS (scsi)     Disk /dev/sdc: 160GB     Sector size (logical/physical): 512B/512B     Partition Table: msdos     Disk Flags:           Number  Start   End     Size    Type     File system     Flags      1      1049kB  2149MB  2147MB  primary  linux-swap(v1)      2      52.4GB  160GB   107GB   primary  fat32           lba      When going under Windows (on sda1), I also have unexplained hanging times when shutting down, but this has occurred first one year ago. **EDIT** Unplugging the 250GB drive makes the latency go away. The HDD LED does not blink during the waiting time. What is going on?


title: Why does the command shuf file > file leave an empty file?

text: I know this is sort of a duplicate of another question (Why this sort command gives me an empty file?) but I wanted to expand on the question in response to the answers given. The command `shuf example.txt > example.txt` Returns a blank file, because the shell truncates the file before shuffling it, leaving only a blank file to shuffle. However, `cat example.txt | shuf > example.txt` will produce a shuffled file as expected. Why does the pipeline method work when the simple redirection doesn't? If the file is truncated before the commands are run, shouldn't the second method also leave an empty file?


title: Is it too early to try LibreSSL?

text: I've been somewhat following the development and recent release of LibreSSL and coincidentally I have a new FreeBSD web server that I've been configuring for my personal/hobbyist projects recently. I'm still fairly n00bish about sysadmin and heavy Unix stuff, though. I see that there's a `security/libressl` port now. If I, a mere sysadmin mortal, were to install it, would I be able to configure Nginx to use it without much more stress than it takes to use OpenSSL (as I've successfully set up a couple of times in the past)? What about other ports which have come to expect OpenSSL? For example, when I go to configure `databases/mariadb55-server`, I get an option to have it use OpenSSL, but not LibreSSL. If I install LibreSSL, will its libraries be seen and used as OpenSSL, or do I have to wait for the MariaDB port to be updated to explicitly support LibreSSL? I guess the broader question is, how interchangeable is LibreSSL with OpenSSL from the perspective of an amateur sysadmin at this point? Should I hold off until LibreSSL is more widely used and expected?


title: gtk-window-decorator takes up too much memory, and is it safe to restart it?

text: I would like to restart the `gtk-window-decorator` process, because it takes up 600MB memory. Will that affect other processes? From my experiences, after killing it, all other programs will lose their window frames, but after I run it again, the other programs will have their window frames back, and the `gtk- window-decorator` process will take much less memory. If I rerun it in a shell session in background, I will kill it if I forget about it and accidentally close the shell session. How can I run it like the OS does? I am running Ubuntu 12.04. Thanks.


title: Software firewall with "zone files"

text: I am using an automatic deployment system for my new Unix deployments. I have a fairly complicated network topology to implement, and I'm looking for firewall software that makes this easy. In particular, I have noticed that software like nginx follows a pattern in which the main configuration file loads a wildcard, which effectively loads all of the files in some directory. So, for example, nginx loads all of the files in /etc/nginx/conf/ and treats them as configuration files. They can be loaded and unloaded independently by adding or removing them (and issuing an nginx command). Are there any trusted software firewall products that let me do something similar?


title: Too big delay with xscreensaver on wrong password in OpenSUSE 12.2

text: There is too big delay when logging in with xscreensaver in OpenSUSE 12.2 --- Actual delay is 10 seconds, but not found anywhere in configs Already done:   * checked pam timeout in _login.defs_ (3 seconds)   * no pam_faildelay.so options in any of `/etc/pam.d/` files   * checked login settings via YaST (uses _login.defs_ so useless)   * played with pam_faildelay.so delay parameter in `/etc/pam.d/login`, `/etc/pam.d/commom-auth-pc` files   * `.xscreensaver` config in `/home/`                   timeout:    0:10:00         cycle:      0:10:00         lock:       True         lockTimeout:    0:00:00         passwdTimeout:  0:00:05         visualID:   default         installColormap:    True         verbose:    False         timestamp:  True         splash:     False         splashDuration: 0:00:05


title: How to mount an encrypted TrueCrypt partition always in the same point?

text: I just formatted my external HD and divided it in two partitions: an ext4 where important information will be, and a ntfs for "compatibility" things (i.e. movies, music, etc). I encrypted the ext4 partition with TrueCrypt but now I'm facing a problem I hadn't before: instead of mounting in `/media/DATA/` it is mounting in `/media/truecryptX`, where X is the number of virtual device selected in TrueCrypt. I know that if I always mount the partition as device 1, the mount point will be always `/media/truecrypt1/`, but I would like to have some other point more "meaningful" like `/media/DATA/`. For example the ntfs partition is always mounted as `/media/DATANTFS/` because it isn't encrypted.


title: DVR software for Linux

text: I think the DVR/CCTV follow some convention, but most of them use activeX for online access. I'm curious if some documentation/specification exist so I could make my own client (Linux), standalone (C, C++, Py, Java) or in-browser (Java). The ports are known - the DVR settings show them - but the format, PTZ channel, and so on are in deep dark. Could someone point to a (open/free) documentation, or an opensource app to use it as a start?


title: Installing linux-3.14.8 un Arch Linux while 3.15 is already in testing

text: I'm currently running kernel 3.14.6 on Arch Linux from Core repo. I would like to install 3.14.8 (which is the latest of 3.14 series) because it contains a fix that is suitable for me. However linux package in Arch Linux core repo is still at 3.14.6 and it has been marked as out-of-date as in testing we already have 3.15. So this tells me that 3.14.8 will never land in arch linux repo... is there a way to get pre compiled 3.14.8 (64 bit) to install in Arch Linux without having to build it from source? Thanks