title: kernel panic Hardware Error - what hardware is responsible?

text: I'm having kernel panics every other day. below is a transcript of a photo of the console. How do I determine what hardware is responsible for the problem? (or is it software) Ubuntu 12.04 LTS server               [Hardware Error]: CPU:2   MC0_STATUS[-|UE|-|-|AddrV|UECC]: 0xb400200055000145     [Hardware Error]: MC0_ADDR: 0x0000000164fe77b0     [Hardware Error]: Data Cache Error: Data/Tag DWR error.     [Hardware Error]: cache level: L1, tx: DATA, mem-tx: DWR     [Hardware Error]: CPU:3 MC0_STATUS[-|UE|-|PCC|AddrV|CECC]: 0xb66b400000000135     [Hardware Error]: MC0_ADDR: 0x0000000164fe77b0     [Hardware Error]: Data Cache Error: Data/Tag DWD error.     [Hardware Error]: cache level: L1, tx: DATA, mem-tx: DRD     [Hardware Error]: CPU 3: Machine Check Exception: 4 Bank 0: b66b400000000135     [Hardware Error]: TSC bc02bd350de4 ADDR 164fe7bb0     [Hardware Error]: PROCESSOR 2:100f42 TIME 1378965147 SOCKET 0 APIC 3 microcode 10000c6     [Hardware Error]: CPU:3 MC0_STATUS[-|UE|-|PCC|AddrV|CECC]: 0xb66b400000000135     [Hardware Error]: MC0_ADDR: 0x0000000164fe77b0     [Hardware Error]: Data Cache Error: Data/Tag DWD error.     [Hardware Error]: cache level: L1, tx: DATA, mem-tx: DRD     [Hardware Error]: Machine Check: Invalid     Kernel panic - not syncing: Fatal machine check on current CPU     Shutting down cpus with NMI      Here is some additional logging that I found:               kernel: [58495.948100] ------------[ cut here ]------------     kernel: [58495.948108] WARNING: at /build/buildd/linux-lts-quantal-3.5.0/net/sched/sch_generic.c:255 dev_watchdog+0x272/0x280()     kernel: [58495.948109] Hardware name: MS-7576     kernel: [58495.948110] NETDEV WATCHDOG: eth0 (r8169): transmit queue 0 timed out     kernel: [58495.948111] Modules linked in: nfsd nfs lockd fscache auth_rpcgss nfs_acl sunrpc xfs vesafb radeon ttm drm_kms_helper snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_intel drm snd_hda_codec wmi i2c_algo_bit snd_hwdep snd_pcm snd_timer snd soundcore snd_page_alloc lp shpchp r8169 sp5100_tco i2c_piix4 firewire_ohci parport firewire_core kvm_amd edac_core k10temp edac_mce_amd serio_raw kvm mac_hid microcode crc_itu_t raid10 raid456 async_pq async_xor xor async_memcpy async_raid6_recov raid6_pq async_tx raid1 raid0 multipath linear pata_atiixp     kernel: [58495.948136] Pid: 0, comm: swapper/3 Tainted: G   M         3.5.0-23-generic #35~precise1-Ubuntu     kernel: [58495.948137] Call Trace:     kernel: [58495.948138]  <IRQ>  [<ffffffff81052c9f>] warn_slowpath_common+0x7f/0xc0     kernel: [58495.948144]  [<ffffffff81052d96>] warn_slowpath_fmt+0x46/0x50     kernel: [58495.948146]  [<ffffffff815a05b2>] dev_watchdog+0x272/0x280     kernel: [58495.948149]  [<ffffffff8101be03>] ? native_sched_clock+0x13/0x80     kernel: [58495.948151]  [<ffffffff810702d0>] ? __queue_work+0x330/0x330     kernel: [58495.948153]  [<ffffffff815a0340>] ? pfifo_fast_dequeue+0xe0/0xe0     kernel: [58495.948154]  [<ffffffff815a0340>] ? pfifo_fast_dequeue+0xe0/0xe0     kernel: [58495.948156]  [<ffffffff81062ce6>] call_timer_fn+0x46/0x160     kernel: [58495.948158]  [<ffffffff815a0340>] ? pfifo_fast_dequeue+0xe0/0xe0     kernel: [58495.948159]  [<ffffffff81064632>] run_timer_softirq+0x132/0x2a0     kernel: [58495.948162]  [<ffffffff810a4105>] ? ktime_get+0x65/0xe0     kernel: [58495.948164]  [<ffffffff8105ba88>] __do_softirq+0xa8/0x210     kernel: [58495.948166]  [<ffffffff810ab264>] ? tick_program_event+0x24/0x30     kernel: [58495.948168]  [<ffffffff816a841c>] call_softirq+0x1c/0x30     kernel: [58495.948170]  [<ffffffff81016245>] do_softirq+0x65/0xa0     kernel: [58495.948172]  [<ffffffff8105be6e>] irq_exit+0x8e/0xb0     kernel: [58495.948174]  [<ffffffff816a8d5e>] smp_apic_timer_interrupt+0x6e/0x99     kernel: [58495.948176]  [<ffffffff816a7aca>] apic_timer_interrupt+0x6a/0x70     kernel: [58495.948177]  <EOI>  [<ffffffff8103ff56>] ? native_safe_halt+0x6/0x10     kernel: [58495.948180]  [<ffffffff8101c993>] default_idle+0x53/0x1f0     kernel: [58495.948182]  [<ffffffff8101d8a9>] cpu_idle+0xd9/0x120     kernel: [58495.948184]  [<ffffffff8167b237>] start_secondary+0xc3/0xc5     kernel: [58495.948185] ---[ end trace ef52dc6dad6ceea1 ]---              # dmidecode -t 1 -t 3 -t 4 | egrep '(Manufacturer|Product|Serial|Socket|Version)'     Manufacturer: MICRO-STAR INTERNATIONAL CO.,LTD     Product Name: MS-7576     Version: 1.0     Serial Number: To Be Filled By O.E.M.     Manufacturer: MICRO-STAR INTERNATIONAL CO.,LTD     Version: 1.0     Serial Number: To Be Filled By O.E.M.     Socket Designation: CPU1     Manufacturer: AMD     Version: AMD Phenom(tm) II X4 B50 Processor     Serial Number: To Be Filled By O.E.M.


title: Automount post-unmount script

text: My intention is to spin-down an external USB drive after 20 minutes of not being used. In the normal case I would use hdparm for this but unfortunately this doesn't work on my external USB drive. It gives me errors like this:               hdparm -S240 /dev/sdc          /dev/sdc:      setting standby to 240 (20 minutes)     SG_IO: bad/missing sense data, sb[]:  70 00 05 00 00 00 00 0a 00 00 00 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00      Then I head of sgparm.               sdparm --flexible -C stop /dev/sdc         /dev/sdc: SAMSUNG   HD153WI       It spins down the disk for less than one second and then immediately spins up again. Even if the filesystem is not mounted. Then I found out that               eject /dev/sdc      indeed spins down the disk but also unmounts it. The next idea was to use automount to mount the drive when someone accesses its mount-path in the filesystem. Mounting works but after the drive unmounts, it doesn't spin down. What I want to do is to execute the eject command as above _after_ automount unmounts the drive. Do you have any ideas how to do that? Or even better do you have an easier solution?


title: saving output of another command

text: I need to select certain lines from the log file and also save them to a text file. I tried the following but none of them are working as expected. The file "todel.txt" shows 0 bytes.               tail -f general.log | grep Some_word > >(tee -a todel.txt)          tail -f general.log | grep Some_word ; tee  todel.txt          tail -f general.log | grep Some_word | tee -a todel.txt


title: How to resolve when the IP of a NFS server changes

text: I have a Windows NFS server and several CentOS linux servers which were mounting volumes from it. The Windows server moved to a new network and even though DNS works and the NFS mount was mounted by hostname, it appears the NFS client also makes note of the ipaddr value, which is no longer valid. This causes the typical hanging mounts, df, issues one would expect. How do I resolve this retroactively?


title: bash_completion for initscripts

text: I have writen my own initscript `/etc/init.d/myscript`. I can start and stop my script with the service command               service myscript start     service myscript stop      When I type `service <TAB>`, bash_completion displays all my initscripts from `/etc/init.d/`, including `myscript`. But when I type `service myscript <TAB>` nothing happens. I would like bash_completion to offer me `start`, `stop` as with other initscripts. For example, bash_completion works for `service cups <TAB>`, but I don't know where this is defined. There is no `/usr/share/bash- completion/completions/cups` or `/etc/bash_completion.d/cups`. So where does `service` get the info from? Where should I add my script info?


title: Concatenating fields from lines with different numbers of fields

text: Given input like this:               x y a b c t     p q w w t     a b c d     p q r      I'd like to concatenate fields from field 3 up to but not including the last one. If field 3 is the last field, I'd like to insert a placeholder. So given the input above, this is the preferred output:               x y a_b_c t     p q w_w t     a b c d     p q _ r      The end result is that all lines will have four fields. Is this possible in awk or cut or sed, etc?


title: Pipe Python Shell to source-highlight

text: When I try to make the Python shell get color:               python 2>&1 | source-highlight --failsafe -f esc -s python      the `>>>` prompt seems to be always _delayed_ by 1 command. Why is this happening, and how do I fix this?


title: Wine installation problems in CentOS

text: Every time I use...               yum install wine      I get a message saying the package isn't found. I have used `yum update` but that does not work either. Moreover I accidentally ran `chmod user:user /etc/yum`... The system is 64bit.


title: OpenWRT mount/boot ethernet HDD

text: I'm thinking about buying a cheap router and setting up OpenWRT with apache and ftp on it. My idea is to buy an ethernet enclosure & a HDD and hook it up to OpenWRT to replace flash root filesystem. Will this enclosure work as I expect? Or perhaps I can abuse ethernet port with "etnernet to USB" connector, hook up an USB HDD, boot OpenWRT and mount the HDD as USB HDD?


title: linux with 3.2.x kernel

text: Is there a major Linux distribution that uses 3.2.x kernel?


title: How do you install a GUI like GNOME on a Linux machine via PuTTY?

text: 1. I installed PuTTY on my Windows machine    2. I've been able to do remote login to my Linux machine (it is not local) via PuTTY command prompt With that in mind, how do I install a GUI like GNOME and then log into it remotely?


title: Can I have different desktop directories on different workspaces on Gnome?

text: I am running Linux Mint with "Gnome Classic", I guess it's Gnome 2. I am currently using 3 workspaces, and I have nautilus handling my desktop. The problem is that my desktop is overloaded with files. And I prefer not having to store them in directories, as that would make one more window to open before accessing the file, I already have too many open. Can I change the "Desktop" directory for each workspace? Or maybe extend the desktop on the 3 workspaces, so that I can move each icon on the workspace I need? Do I have to change desktop managers? Or let another file browser than nautilus do the job (how would I do that?) ? Thanks. (and btw I'm new to using linux, if there's a better approach, please do say so) **EDIT:** This is what `env | grep XDG` gave me (nothing about a desktop):               jad@jad-PC ~ $ env | grep XDG     XDG_SESSION_COOKIE=95dcb1ee36841dd22e3633040000000d-1337336042.360588-45732386     XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0     XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0     XDG_CONFIG_DIRS=/etc/xdg/xdg-gnome-classic:/etc/xdg     XDG_DATA_DIRS=/usr/share/gnome-classic:/usr/share/gnome:/usr/local/share/:/usr/share/     XDG_CURRENT_DESKTOP=GNOME      I also tried `env | grep Desktop`, which gave me nothing.


title: using Set uid to run a root command from non-root user

text: Consider the following two files. `summarize`'s executable UID bit has been set, so that another user belonging to another group can execute the summarize executable that uses the customers.dat file.               -rw-------  steve  sales  customers.dat     -rwsr-xr-x  steve  sales  summarize      Now consider the following two files:               -rwxrwx--- 1 root   root   5974 May 17 13:53 1.out     -rwsrwsrwx 1 root   root   5970 May 17 14:03 a.out      Both are executables, and I want that some other user runs `a.out`, which calls `1.out` within itself using the `system("./1.out");` call. But I am always getting permission denied error               sh: ./1.out: Permission denied      To me, both scenarios look the same. Why do I get the permission denied error? Am I missing something?


title: Suggestions for a Linux distribution for a dedicated SFTP server

text: I have a desktop which has more than 16GB of memory that I want to dedicate as an SFTP server. Many people have suggested that I install Linux, so I have decided to go with Linux. I am puzzled and unable to judge which distribution to install. I have no ideas or exposure to Linux before. Are there any suggestions to help me meet my requirement?


title: Booting Operating System from bootable secondary Hard disk via VirtualBox

text: I have attached a new bootable Hard Disk to my computer. I can boot to an operating system from each one. When I boot into an Ubuntu system in one Hard Disk, is it possible to boot into the other Hard Disk from virtualbox so that I have both operating systems running at the same time?


title: Difference between sudo -s and sudo su -

text: It might be a duplicate and I'm pretty sure I already show an answer to that somewhere, but I wondered what are the difference in term of right and variable and other stuff between `sudo -s` and `sudo su -`.   As far as I'm concern they both open a root shell where I can do whatever I want but I wondered if I could experience some differences one day. Also this question on askUbuntu does not address my concerns


title: Gnome, KDE, XFCE... which is most simple and customizable?

text: This'll be my first Linux install, so I've never had to choose between a desktop environment (I come from OS X) -- forgive me if I'm not fully literate on where exactly the OS ends and the desktop manager begins. My needs are:   * Customizability (I like my work environment to look and function a particular way) -- especially being able to move and organise windows using keyboard commands and shortcuts.   * Simplicity: I like as little real estate to be taken up by graphical widgets and toolbars as possible (as I said, I tend to avoid the mouse). If it were up to me, windows would just show content, not even a scrollbar.    * Performance: I hear Gnome can be slow and bloated. Is this the case? I will be using the environment as an IDE. I was going to go with Arch at first, but being a Linux newb with not that much time on my hands, it looked pretty daunting. Fedora looks like a good choice too.   * Side question: just how much does one's choice of windows manager affect which applications one can run?


title: SSH login to remote machine from another remote machine - How to manage connections?

text: Due to some security policy I had to ssh into a remote machine using another remote machine to which I ssh-ed. Here is the situation. I have access to BSD box at work and the access is only available on wired office network. Apart from this BSD box I have my own RHEL dev box which is wired network and I can access it even from home using VPN. So when am at home I remote ssh to my RHEL dev box and then ssh to my BSD box. There are times when my connection to this RHEL is dropped. What happens to my connection to BSD box when my connection to RHEL is dropped? How can I manage these connections?


title: Are there websites that allow one to search for which package contains a particular file?

text: I want to write some generic instructions on how to find the package that installs a particular file (the exact context is TeX packages: find the package in the Unix distribution that contains a particular TeX package). I might not know the precise path but will know the exact file name. Ubuntu has the package search facility which allows me to do precisely this: search for the packages containing a particular file. Which other Unix distributions have the same online search capability, and where are they? (I found a few related questions, but none seemed to give the answer I'm looking for (though my search skills are distinctly poor, I freely admit). In particular, I couldn't get the method described by What is the Fedora equivalent to the Debian/Ubuntu package search pages? to work for, say, `amsmath.sty` or `latex.ltx`.)


title: Terminate script using zenity progress bar

text: (GNOME2, Ubuntu 10.04 LTS) I've made a nautilus script, so that if I have a directory full of various codecs, then I just need to right click in that folder -> Scripts -> THISSCRIPT.txt, then presto, it recursively converts all the video files (identified by video mimetype) to x.264 codec with 128 Kbit mp3 to avi. So that they will have small size+good quality. This works, great! **QUESTION** : If I press "Cancel" on the Zenity progress bar, then the mencoder doesn't terminates.. How can I do this? I mean I need that If I press "Cancel" on the Zenity progress bar, it would terminate mencoder. How to do this?               #!/bin/bash          which mencoder > /dev/null 2>&1; if [[ $? -ne 0 ]]; then echo -e '\nerror, no mencoder package detected'; exit 1; fi     which zenity > /dev/null 2>&1; if [[ $? -ne 0 ]]; then echo -e '\nerror, no zenity package detected'; exit 1; fi          HOWMANYLEFT=0     find . -type f | xargs -I {} file --mime-type {} | fgrep "video/" | rev | awk 'BEGIN {FS="/oediv :"} { print $NF}' | rev | while read ONELINE         do         if file "$ONELINE" | egrep -qvi "x.264|h.264"             then echo $ONELINE         fi     done | sed 's/^.\///' | tee /tmp/vid-conv-tmp.txt | while read ONELINE         do         HOWMANY=`wc -l /tmp/vid-conv-tmp.txt | cut -d " " -f1`         mencoder "$ONELINE" -o "OK-$ONELINE.avi" -ovc x264 -x264encopts bitrate=750 nr=2000 -oac mp3lame -lameopts cbr:br=128 > /dev/null 2>&1         HOWMANYLEFT=`expr $HOWMANYLEFT + 1`         echo "scale=10;($HOWMANYLEFT / $HOWMANY) * 100" | bc | cut -d "." -f1     done | zenity --progress --text="Processing files ..." --auto-close --percentage=0


title: Daemon not running when started over ssh

text: I'm trying to start the rngd daemon by remotely starting it via ssh. Unfortunately it does not seem to run until I log onto the machine. The command I'm using is:               ssh -n -o StrictHostKeyChecking=no -i ... user@host "sudo rngd \            -r /dev/urandom -o /dev/random -t 10"`      When I call `cat /proc/sys/kernel/random/entropy_avail` I get low (150ish) values which makes me think that rngd is not running. However if I log onto the box, wait a few seconds and check, the pool is full (3000s).


title: Granting access to a restricted git shell

text: I tried setting up `git-shell` on our CentOS (6.4) system (after getting this working correctly on Ubuntu 13.10, maybe cross platform hot mess?) my /etc/passwd shows               git:x:500:500:Web Archive VCS:/home/git:/usr/bin/git-shell      and my shell commands are in /home/git/git-shell-commands               [root@domain git]# cd /home/git/git-shell-commands/ && tree     .     ├── addkey     ├── create     ├── drop     ├── help     └── list      But ssh'ing in is still giving me               Last login: Fri Nov 15 12:14:49 2013 from localhost     fatal: What do you think I am? A shell?     Connection to localhost closed.      I am working off of this resource http://planzero.org/blog/2012/10/24/hosting_an_admin- friendly_git_server_with_git-shell There was some confusion that this was licensed GIT commands (push/pull etc) but this is a restricted shell with pre set commands! Please anyone reading this make note ;) Installer script if you want to see steps https://github.com/ehime/bash-tools/blob/master/git-server-setup.sh **EDIT** I still have not been able to resolve this over the weekend, I HAVE added               # add to shells     echo '/usr/bin/git-shell' >> /etc/shells          # Prevent full login for security reasons     chsh -s /usr/bin/git-shell git      And have double checked that GIT Shell actually exists in /usr/bin               [root@domain bin]# ll /usr/bin | grep git     -rwxr-xr-x. 105 root root    1138056 Mar  4  2013 git     -rwxr-xr-x.   1 root root    1138056 Mar  4  2013 git-receive-pack     -rwxr-xr-x.   1 root root     457272 Mar  4  2013 git-shell     -rwxr-xr-x.   1 root root    1138056 Mar  4  2013 git-upload-archive     -rwxr-xr-x.   1 root root     467536 Mar  4  2013 git-upload-pack      This IS a root account that I am dealing with though, could that have something to do with it?


title: Using globbing/wildcards when Opening Files from Terminal

text: I have a folder `A`. Inside the folder, there are some files `a,b,c,d` and there is a subfolder, `B`, containing files `e,f,g`. Suppose I want to open files `a,b,c,d`: then I just type `xdg-open *`. However, this also goes into subfolder `B` and opens `e,f,g` as well. What's the easiest way to open just `a,b,c,d`? EDIT: what I really mean with the question is how to open all files in a folder, but not those contained in any subfolders.


title: Control character STTY issue

text: I am changing control character (e.g- ^C) using               stty intr ^_      under root privileges. It changes successfully. But when I am closing terminal and opening terminal again to check whether same control character is saved or not, its actually not. It shows its default value. How can I solve this issue?


title: How to check what is running in a server?

text: 1. Is there any particular command to find out what servers (like: apache2, mysql-server, backup-server etc) are running inside a dedicated server?   2. If I will reboot my dedicated server will they all start automatically?   3. What is the safe way of reboot a dedicated server with all its applications server running inside it? Note: I am in a dedicated Debian server.


title: XFCE Cursor themes not installing

text: I know this is probably a bit of a newbie question but I'm having a little trouble installing any cursor themes. I extract the archives contents to `/usr/share/themes` but when I go to Menu>Settings>Mouse and touchpad>themes all I see is default. Using Archlinux, XFCE.


title: I want to modify root files while also being able to create non-root files in a single text editor session.

text: Catch 22: If I open my text editor **without** using `sudo`, I don't have permission to save any changes. If I open it **with** root privileges, any files I create are owned by root. I want to be able to create files that are owned by me (non-root user), and also edit files that require root access in the same session. Possible? Is this a Linux thing or a text editor setting? I'm using Sublime Text 2.


title: Book or online article on analysis and tuning Linux system performance

text: I am looking for a good book or online article on analysis and tuning Linux system performance. So far I've found openSUSE 12.2 System Analysis and Tuning Guide which looks promising. Any other recommendations?


title: Why does activation of LVM partition with large snapshot takes long time?

text: After creating large snapshot (I assume it drifted about 30GB from the original) I noticed that `vgchange -ay` took noticeable longer (to the point I thought computer hanged). What does the activation involves any why it takes so much to activate lvm snapshot?


title: X11 on server without forwarding

text: I'm running a java application on my ubuntu server which refuses to open if it cannot open a window (the content of the windows is of no interest for me). Since the server is not connected to any screen I don't want to have a full running x11 environment like openbox. Currently I'm forwarding this window over ssh to my pc but this way the program closes whenever I'm rebooting the pc. What could be a good solution for this? (I'll never need to see the content of the window)


title: Pattern matching exception for shell script

text: So I have the following shell script for batch renaming the episodes of some given TV series:               #!/bin/bash     #script for renaming files of form "*01*.ext" to "Episode 01.ext";     counter=0     for all_files in * ; do       counter=$(( $counter+1  )) #increments $counter by 1;       #creates counter "number" with two digit format (eg: 01):       if [[ 1 = $(( $counter<10 )) ]] ; then         number=0$counter       else         number=$counter       fi       #checks all file names for presence of $number and renames those files:       for numbered_file in *$number* ; do          ext=${numbered_file##*.}         mv "$numbered_file" "Episode $number.$ext"       done     done      I now want to improve the script to account for some quite common exceptions. In particular I don't want the "20" in "720p" to be interpreted as referring to "Episode 20". What I want then, is a way to refine the `*$number*` pattern from the inner for loop. (`number` is a variable assigned to `01`, `02`, `03` and so forth.) How do I achieve something along the lines of: `*` no "7" here `$number` no "0" or "p" here `*` Please feel free to point out anything else about the above script that is awkwardly done. It is my first attempt at a vaguely useful script and as such it is probably full of stylistic monstrosities. ;-)


title: Why does a bash here-string add a trailing newline char?

text: The following examples show that a newline is added to a _here-string_.   Why is this done?               xxd -p <<<'a'       # output: 610a          xxd -p <<<'a     '     # output: 610a0a


title: Change user and load entire environment in shell script

text: I'm having some trouble with an upstart script of ours that changes user and starts up a few ruby daemon processes. In the past i would simply `bash -c "do the business" -l someuser` making sure to use the `-l` flag to emulate a login. This has worked great until now, our ruby process has been throwing the following error: `require: no such file to load -- rubygems (LoadError)` after some investigation I found this error only occurs when I run the script as the root user, i.e. (when I `sudo su` or when being run by upstart). I think this is a PATH issue as when I manually set the path first it resolves the issue. Is there a way to change user and load the **entire** environment? I have also tried `su user -c` and `sudo`. * * * To make it easier to test I'm "rooting up" (`sudo su`) and running `which bundle` (bundle is a ruby thing). Here's what I get:   * `sudo -i -u webuser which bundle` # => no output   * `su -l webuser -c which bundle` # => no output   * `sudo su - webuser -c which bundle` # => no output But ssh'd in as webuser   * `which bundle` # => /opt/ruby/bin/bundle


title: Query USB current

text: How can I obtain information about the amount of current negotiated by a device attached to a USB port? I am looking for information similar to this presented by OS X in terms of current available and current required.


title: How to fix speckled flash videos in Linux Mint 14?

text: I have recently installed Linux Mint 14 and youtube and other flash based videos are displaying lots of yellow and red specks. It doesn't matter which browser is being used either. I've tried turning off hardware acceleration which didn't fix it. Any ideas? Hardware is an old Lenovo Thinkpad X61 Onboard video is using the driver for Intel 965GM ** Update ** I just thought I'd try the HTML5 video trial on youtube. Instead of using flash it instead uses HTML5 to render the video stream. However, the problem remains only the speckles are now all a red colour. ![speckles](http://i.stack.imgur.com/CoB5G.png)


title: Nginx + PHP + FTP - user permission issue

text: I have a wordpress copy installed on /home/username/public_html/site, and now the problem is :   1. Nginx running PHP with "www-data" identity   2. The site folder owner and group are "username", not "www-data"   3. So wordpress had no permission to create folder   4. I changed owner and group of "site" to "www-data", wordpress is working ok   5. But ftp can't create a folder - ftp is login as username/pass Is it possible to have a /home/username/public_html/site, and both working on PHP side and ftp side. Any advice is appreciated!


title: Moving unallocated space from Extended partition to create a Primary partition

text: This is my partition structure : ![Partition List](http://i.stack.imgur.com/oH5TA.png) I want to create another primary partition from that unallocated space. If I shrink sda2 to a size less than what I needed for to create another primary partition, will it move entire extended partition to right or just slices off extended space from it as it is contiguous ?


title: Best way to determine piped command to shell script?

text: Given `tree /some/directory | print.sh` Is there any way for _print.sh_ to know that "tree -f /some/directory" was called, without trying to parse `pid` processes?


title: chainload multiple grub2 bootloaders

text: This is the context: I have a laptop with one hd which contains 4 partitions:   * 2 for windows: (hd0,1), (hd0,2) -> For windows 7   * 2 for linux: (hd0,3), (hd0,4) -> For linux (logical partitions). The current "real" bootloader (in the MBR I mean) is the windows one. Behind, I use grub2win for specific purposes, and I would use it to chainload grub2 which is on (hd0,3). Here is the entry I added in grub.cfg to do this:               menuentry 'Chainloader 3' {        insmod chain        set root=(hd0,3)        chainloader +1     }      Unhappily, when I try to use it, I just have "nothing", a black screen without any error, and I really don't know what to do more. Here is the result of `fdisk -l`:               Disk /dev/sda: 320.1 GB, 320072933376 bytes     255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors     Units = sectors of 1 * 512 = 512 bytes     Sector size (logical/physical): 512 bytes / 4096 bytes     I/O size (minimum/optimal): 4096 bytes / 4096 bytes     Disk identifier: 0xa2c2c4f8          Device Boot      Start         End      Blocks   Id  System     /dev/sda1   *        2048   209717247   104857600    7  HPFS/NTFS/exFAT     /dev/sda2       209717248   420339711   105311232    7  HPFS/NTFS/exFAT     /dev/sda3       420341758   625141759   102400001    5  Extended     Partition 3 does not start on physical sector boundary.     /dev/sda5       420341760   615651327    97654784   83  Linux     /dev/sda6       615653376   625141759     4744192   82  Linux swap / Solaris


title: Writing raw images safely to USB sticks

text: Trying lots of different linux, on all kinds of hardware I find my self typing commands like this quite often:               sudo dd if=xubuntu-13.10-desktop-amd64.iso of=/dev/sdc bs=10240      Needless to say, sooner or later I will mistype the destination and wipe a harddrive instead of the intended USB drive. I would like not to use `sudo` everytime here. On my system, a fairly modern Ubuntu, permissions on `/dev/sdc` are like: (when a stick is present):               $ ls -al /dev/sdc*     brw-rw---- 1 root disk 8, 32 Apr  6 22:10 /dev/sdc      **How do I grant my regular user write access to random USB sticks but not other disks present in my system?**


title: Why are web servers traditionally started as superuser?

text: Thinking about a future web server setup, it struck me that for some reason web servers usually start as root and then drop certain rights (`setuid`) for the worker processes. In addition there is often `chroot` involved, which isn't exactly meant as a security measure. What I was wondering, why can web servers (I have administrated everything from Apache, lighttpd to nginx) not use the capability system (`capabilities(7)`), such as `CAP_NET_BIND_SERVICE`, on Linux and simply start as non-root user? ... this way still listening on a privileged port below 1024. Or better, I think most of them could, but why isn't that common practice? Why not ...   * use `setcap(8)` with `CAP_NET_BIND_SERVICE` on the binary being run?   * set up the log folders to allow the (non-root) user to write there   * ..., if you felt like `chroot` helps at all, use `chroot` or `lxc` to "jail" the web server? There is nothing other than (worker) child process may kill parent that I could come up with that would make this less beneficial than starting outright as `root`. **So why are they traditionally being started as root when afterwards everything is done to get rid of implied security issues that come with it?**


title: Convert a date format

text: I have one problem with my date format. I want to change from one format to the other and vice verse. My date formats are:   * Format1 : 1/24/2014    * Format2 : Jan 24  How can I do this?


title: What can I do if I got locked out by cphulk?

text: Is there any way in Linux to create another user with root rights?   I got locked out by cphulk and I need some other way to log in. Notice many ways to fix this involve logging in to root or whm. CPHulk prevented that. So to fix this I need to loggin into root. To loggin into root I need this fixed first. So chicken and eggs problem.


title: Peer to peer~ish LAN storage

text: I have a distributed application that consists in a main CMS server where "human" users can upload videos, pictures (media content, basically) and a bunch of "players" that play those videos or pictures at certain times. Right now, each and every player connects via HTTP/SFTP to the CMS to grab the content it needs to play (erm... and plays it... if nothing is broken). It won't connect to the CMS again if the player has already downloaded the video it needs to play. I mean... is not that the CMS is streaming the videos or anything fancy like that... the player says " _Oh, I need to play the video Jenna_Jameson_meets_the_plumber.avi_ (to say something) _in 5 minutes. Do I have it already?_ " If yes, just play it when it should. Otherwise, connect to the CMS, download it and play it when it should. The players act more like a "cache" for the media to display. Now, there's a chance that a big number of those players are in the same private LAN, connected among themselves with a fast Ethernet connection (Much faster than the cheapy-weepy DSL connection that they may have with the CMS) So I was considering to implement something so the Players request the content from their neighbors before going to the CMS (both Players and CMS are coded in Python and use Ubuntu as O.S.) but then I thought that maybe there's something like that in place (and I that I could do it using pre-existing tools which I trust way more than anything I could implement myself). Does any of you know something that may work the way I want? One of the issues is that I'm not even too sure how to call that kind of application. I've taken a look to NFS file systems, but then (if I understood correctly) I would need to mount one NFS directory per "other" player, and every time I need one of those educational documentaries I want to play, I would need to traverse all those NFS directories, check if the video is in any of them and if not, go grab it from the CMS... That sounds a bit slow, right? Also, I don't know how to handle very well that the computers in the LAN may not be my players. I don't know how could I handle with a distributed filesystem the discovery of "my" players. If anyone could point me in the right direction, I'd appreciate it. Thank you in advance.


title: openvpn server doesn't NAT the incoming traffic

text: It's couple of days that I'm having hard time figuring out what's wrong with openVPN. Few days ago, I installed and configured openVPN on a Debian server and also on my Ubuntu client. I am facing a weird behavior: OpenVPN server NATs the incoming traffic whenever it wants, but not always! It looks that the **_iptables_** rules on the Debian server get deleted at some specified time every day (I'm not sure though), because **the next day if I re-enter the iptable rules (for NAT & DNS queries forwarding) like following,**               iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE     iptables -t nat -A PREROUTING -i tun+ -p udp --dport 53 -j DNAT --to-destination 8.8.8.8      **and force-reload openvpn daemon and restart openvpn (at both ends), the traffic gets routed as it should.** I've saved iptables rules in the file _/etc/iptables.conf_ and I reload it at boot ( _/etc/rc.local_ ), but nevertheless the problem still persists. Here is the content of my **_/etc/iptables.conf_** :               # Generated by iptables-save v1.4.14 on Tue Apr 15 13:50:46 2014     *security     :INPUT ACCEPT [166249:16762540]     :FORWARD ACCEPT [3659:1318578]     :OUTPUT ACCEPT [165776:17724102]     COMMIT     # Completed on Tue Apr 15 13:50:46 2014     # Generated by iptables-save v1.4.14 on Tue Apr 15 13:50:46 2014     *raw     :PREROUTING ACCEPT [169911:18081298]     :OUTPUT ACCEPT [165776:17724102]     COMMIT     # Completed on Tue Apr 15 13:50:46 2014     # Generated by iptables-save v1.4.14 on Tue Apr 15 13:50:46 2014     *nat     :PREROUTING ACCEPT [42:2524]     :INPUT ACCEPT [1:40]     :OUTPUT ACCEPT [24:1504]     :POSTROUTING ACCEPT [24:1504]     -A PREROUTING -i tun+ -p udp -m udp --dport 53 -j DNAT --to-destination 8.8.8.8     -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE     COMMIT     # Completed on Tue Apr 15 13:50:46 2014     # Generated by iptables-save v1.4.14 on Tue Apr 15 13:50:46 2014     *mangle     :PREROUTING ACCEPT [169911:18081298]     :INPUT ACCEPT [166249:16762540]     :FORWARD ACCEPT [3659:1318578]     :OUTPUT ACCEPT [165776:17724102]     :POSTROUTING ACCEPT [169435:19042680]     COMMIT     # Completed on Tue Apr 15 13:50:46 2014     # Generated by iptables-save v1.4.14 on Tue Apr 15 13:50:46 2014     *filter     :INPUT ACCEPT [166249:16762540]     :FORWARD ACCEPT [3659:1318578]     :OUTPUT ACCEPT [165776:17724102]     COMMIT     # Completed on Tue Apr 15 13:50:46 2014      Here I've posted my config files. The differences in my working client.conf & server.conf with those in that post are as follows:               # client.conf          user nobody     group nogroup         redirect-gateway def1 #bypass-dns bypass-dhcp      server:               # server.conf          ; duplicate-cn #not needed, commented out         user nobody     group nogroup          I'll be deeply grateful if you save me from this chaos!


title: Send text/input to all tabs

text: I'm using the Gnome terminal and am logged into different servers on each tab. Is there a way to send the same text/command to all the tabs at once?


title: Removing configured PROXY in fedora?

text: Some time back I configured proxy for fedora to install packages through yum. I forgot how exactly I did it. Now I don't need proxy any more.How can I reconfigure my proxy settings?


title: Installing AMD Radeon HD 7400M series fedora 20

text: I just installed fedora 20 on my second pc and its running pretty hot, I found a driver on the site http://support.amd.com/en- us/download/desktop?os=Linux%20x86_64. And i unpack it and i try sh sudo sh amd-driver- installer-13.35.1005-x86.x86_64.run and I get this Supported adapter detected. Check if system has the tools required for installation. fglrx installation requires that the system have kernel headers for 3.7 release. /lib/modules/3.11.10-301.fc20.i686+PAE/build/include/generated/uapi/linux/version.h cannot be found on this system. One or more tools required for installation cannot be found on the system. Install the required tools before installing the fglrx driver. Optionally, run the installer with --force option to install without the tools. Forcing install will disable AMD hardware acceleration and may make your system unstable. Not recommended. and I dont know what to do to het this right i have already tried:               yum install kernel-devel kernel-headers gcc -y      http://www.amd.com/US/PRODUCTS/NOTEBOOK/GRAPHICS/7000M/7400M/Pages/radeon-7400m.aspx


title: tmux, Vim and Solarized

text: # Premises Browsing around _tmux_ , _Vim_ and _Solarized_ I can find lots of complains about 256 colours and "user experience". Well, I'm having the opposite "problem", i.e. _Vim_ works well with a full _Solarized_ theme **only** in _tmux_. # Background I've been tweaking and tuning around for a bit now with my _Ubuntu_ terminal's and _Guake_ 's colour scheme and I almost got to the perfection which is reached when I'm using _tmux_ , which in turn means always. I'm trying now to understand **why** this is happening. Here below there are two Terminals, the one on the left is running only _Vim_ (showing the current `.vimrc`) whereas the other is running _Vim_ inside a _tmux_ session. As you can clearly see, only in the _tmux_ session the fonts are bold, which I guess is _correct_ (or not?). ![enter image description here](http://i.stack.imgur.com/MR44w.png) # Question Why does _tmux_ allow for bold font whereas the terminal, where _tmux_ is running, does not? Is it a bug or a feature?


title: Wireless bridged networking in KVM. Why is it so complicated?

text: I've been using VirtualBox (and sometimes VMWare) for years and I've never had any problem with the virtual network adapters, no matter if the physical ones were wired or not. I also played some time ago with KVM in a wired set-up and, although I had to edit some configuration files to get it working, I could also create a bridged adapter without any major problems. Today I decided (wrongly, it seems) to try to use KVM in a laptop running Ubuntu 13.10 and tried to create a virtual machine with bridged networking over a wireless interface. It was extremely painful to set this up. After following all the tutorials I found (for example) and having to reboot my laptop several times to get the connection back I just gave up and went back to my old well-known VirtualBox. And, actually, the first thing I noticed when I looked into the official KVM documentation was that they discourage from trying to bridge a wireless adapter since, according to them: > The here shown method, will not work with most(all?) wireless drivers, as > these do not support bridging. So, my question is:   * How come they say that most wireless adapters do not support bridging if it works in VirtualBox and VMWare just "out-of-the-box"?   * And what's the difference between these hypervisors that makes it so complicated in KVM, if it works at all?


title: Traffic getting routed through Apache

text: for some reason, certain outgoing traffic on my server gets routed to the apache webserver i am running. this problem just started happening. i have the webserver set up to use vhosts, the webserver config hasn't been changed for probably a month. if i try to open a connection to say google.com (note their is no www in the address), the page that shows is the default page for my webserver (meaning the site doesn't have a vhost). if i would have used www.google.com, it would show the expected google homepage. i don't know why this started happening, it is really weird. any help? running centos 6.3 x64 edit: i see the default page for my webserver if i use the webserver as a socks proxy for my computer at home. i just downloaded vnc and firefox on the server and tried navigating on there, it goes to the default webserver page too. if i use wget, it gets the proper page from the real google website. other processes on the server that try to open a connection to google.com (as well as other websites) show up in apache log files as well. from the machine, i can ping google.com and get the proper ip address it maps to.


title: Elementary OS only booting from USB, cannot boot to partitions on SSD (Windows and eOS)

text: I previously had Linux Mint Petra and Windows 7 installed on my Asus UX31a. This worked fine until I ran into some Wi-fi issues after messing around with NetworkManager. I decided since I didn't have too many files I should just re- install Mint, but then decided that eOS looked nicer so I'd try that. So, I used UUI to put eOS on my flash drive, tried the demo first, didn't really do much but everything seemed ok. I then used the full installation option and put it on /dev/sda3 where my old mint installation was (windows on sda1 and windows recovery on sda4 or something). The first time I didn't give it swap space but I tried that later on after trying a couple of other things. After the installation finished, the computer rebooted but would only boot into the USB through grub, and went to the grub rescue menu when I tried to boot without it in. I remember having a similar problem with Mint and resolved it with boot-repair. First I tried re-installing a couple of times, same thing, no luck. Then I got boot-repair again and tried that. However during `apt-get update` I get the warning `Failed to fetch cdrom://elementary OS 0.2 _Luna_ - Stable amd64 (20130810)/dists/precise/restricted/binary-amd64/Packages please use apt-cdrom to make this CD-ROM recognized by APT.` and similar warnings for /binary-i386 and the same two for /main/binary-XXX. I understand that Luna is based on Ubuntu and precise pangolin is a version of Ubuntu, is this the correct version? Also other postings online suggested using update manager to disable the "source" that was the cd I had installed. I didn't see that option in update manager. There weren't any issues adding the boot-repair repo or installing it so that seemed fine. Incidentally while typing this, I tried to install boot-repair again to verify that I had no errors but this type I got the error 'unable to locate package boot-repair' Edit: boot-repair installed after another apt-get update. (Is there no option for strike-through?) Boot-repair opens fine, I can run the standard fix and it gives me "grub-pc purge cancelled". Another thing I noticed about Boot-repair was that the "advanced settings" tabs displayed different things than the default that was listed here https://help.ubuntu.com/community/Boot-Repair in most cases, my options were grayed out or non-existent and sometimes grayed out options differed from what the wiki said. I'm sorry I don't have a screenshot, again I can't get grub- repair back Edit: Under the GRUB options tab the wiki has "Purge GRUB before reinstalling it" de-selected whereas mine is grayed out and selected. Under the MBR options tab, I have nothing. Finally under the Other Options tab, they have "Repair Windows boot files" checked, mine is grayed out and unchecked. I did run the boot-info thing, here is my paste; paste.ubuntu.com/7279707 Next I found a tutorial on re-installing grub from a liveCD. I can't find the tutorial now, but I'd seen it when fixing this with mint, I believe it was on the ubuntu community forums, I'm really sorry I can't locate it. The basic steps however were to mount the other partition, use chroot to uninstall grub and then re-install it. Everything worked fine up until the re-install grub step (the tutorial made me check I had internet so that wasn't it) where apt- get complained that the files/packages `grub-pc, grub-common` didn't exist. It told me that grub2-common did exist so I tried installing that and things seemed to work although I have no idea what it did. Nothing changed the next time I rebooted however and so now I'm back in a live session with no idea what to do. I have access to the school's lab computers so at worst I can give my USB some other distro and try to use that to fix it, but hopefully it won't come to that.


title: What are the world writable directories by default?

text: In a standard Linux filesystem, which of these common directories are world- writable **by default**?                /tmp       /etc      /var       /proc       /bin       /boot      /....      ....      Why are they world-writable? Does that pose a security risk?


title: Using exec in find over ssh from shell script

text: So, I am attempting to execute the following from within a shell script;               ssh -q $CUR_HOST "cd $LOGS_DIR; echo cd $LOGS_DIR; find . -name *.log -mmin +1440 -exec gzip {} \; exit"      When this runs, it generates the following error;               find: paths must precede expression     Usage: find [-H] [-L] [-P] [path...] [expression]      I've tried numerous variations based on things found on Google, but none seem to resolve this problem. Could anyone tell me what is wrong with this? _As a side note, when I manually login to the target host and run the same find command there, it works just fine. So, I'm led to think that it's something to do with the command being embedded in the double quotes of the ssh command._


title: How to create a file with the name specified in ASCII encoding?

text: I want to create a file that is called ascii 007, which is the bell symbol, which is not printable. I tried `nano $'\007'`, but that just created a file called ?; `cat ?` print the test content, that I placed in the file. So how do I create a file, with a name set by the ascii encoding and not plainly spelled out?


title: How to auto log on with root user in Fedora?

text: I'm a newbie in Linux, and I want to enable auto log on with root user for specific purpose. It's so bored when every time I power on my PC to study and I have to input user and password.


title: why won't x11 display work through ssh login?

text: I have logged in to a remote server and am trying to display an x application(e.g. firefox). but an error message appears. the below are my attempts to open firefox               Black@Black-PC ~     $ ssh -X kwagjj@$labserver -p 122     [kwagjj@James5 ~]$ firefox     Error: no display specified     [kwagjj@James5 ~]$ exit     logout     Connection to 143.248.146.204 closed.          Black@Black-PC ~     $ ssh -Y kwagjj@$labserver -p 122     [kwagjj@James5 ~]$ firefox     Error: no display specified     [kwagjj@James5 ~]$       I used -X, -Y because I read somewhere that these two options are related with credentials regarding X11 and these switches will do the job for me. Even without the -X, -Y switches, my attempt failed. What does the 'no display speicified' error mean? P.S. The weird thing is that if I connect to the remote server through my PUTTY and repeat the command 'firefox' it works?!?!(firefox is displayed on local computer) P.S. my local computer is Windows 7 so I have Xming running on background in order to allow X11 display. As for the attempt written on the upper part, the commands were typed in at Cygwin terminal.


title: Is it *really* possible to directly steal a private key if it uses no passphrase?

text: I've read in various places, such as in this question that using an ssh key pair without a passphrase allows attackers to steal your private key if they gain access to your account. I assumed that by "steal" it meant they could fairly easily do a brute-force attack to try every possible private key until they found one that matched the public key stored in your account. But the accepted answer on the question above assumes that the private keys are essentially stored in plain text somewhere. This is contrary to what I've always understood to be the case: that since (normally) you wouldn't store your private key on the server--only your public key--the main security risk posed by not using a passphrase is that someone could steal the private key off of your local machine and then use it without needing to also know the passphrase. Which view is correct? Are private keys somehow easily lifted from a server on which you only placed your public key?


title: Extract a sub-string out of a variable's value

text: I have a string in the form of `segment_78787` which is stored in a variable called `$ID` in my shell script. I need to get the second part "78787" and assign it to another variable. I tried like               batchname=`ID|cut -d_ -f1`      It didn't gave me any result.


title: How to backup KVM images? Is it possible to backup whole VM?

text: I need to backup all (9 VMs) my KVM VMs. I would like to backup them in the night for example once a week. For example VMware server and VMware server 2 used to have possibility to create live backups using creating images with backups. Let me give you a following questions: 1) Is there any good possibility how to live migrate and backup virtual machines on KVM? I found some tutorials, but they were not working with debian squeeze. 2) Could you recommend live backup (at night) of KVM VM, or should I rather backup INSIDE of VMs ? 3) VMware can also do Image backup, when VM is freezed, backed up and UNfreezed back again to work properly. Is it possible to do something like that with KVM VM? Thank you for answers and opinions


title: Debian + KVM: Which version to use? Stable or "new"?

text: I have Debian 6.0.4 (Squeeze) x64. Nowadays I use KVM stable package from apt- get. Could you recommend me using a compiled newest or newer version instead of using the old one KVM package from Debian repository? My opinion is, that more secure option is to use older "stable" versions from apt-get repo, instead of any newer versions. What do you think about this?


title: Why can't I resize or maximize Firefox 17 under Sawfish?

text: I just upgraded from Firefox 16 to Firefox 17.0.1, and my Firefox windows lost their maximize button. The `maximize-window` command does nothing either. Switching to full screen mode in Firefox makes its menus and toolbars disappear, but the window decorations remain and the window remains the same size. Also, I can't resize the window to anything other than 18x108. All of this worked with Firefox 16. I'm running Debian squeeze, with Firefox binaries from http://mozilla.org. My window manager is Sawfish 1.3.5. If I run an X session with Fvwm, I can maximize Firefox, so Firefox 17 is doing something that Sawfish doesn't like, but what?


title: Send copy of a script's output to a file

text: Say I have a Zsh script and that I would like to let it print output to `STDOUT`, but also copy (dump) its output to a file in disk. Moreover, the script starts with the following option               set -o xtrace      which forces it to be verbose and print what commands it runs. I would like to capture this output as well in a file in disk. My understanding is that if I do               ./my_script.sh > log.txt      it will just send `STDOUT` to `log.txt`, but what if I want to also be able to see the output in the terminal? I have read about `tee` and the `MULTIOS` option in Zsh, but am not sure how to use them. When I do:               ./my_script | tee log.txt      I can see the output on the terminal, but the file `log.txt` doesn'tseem to be capturing everything (in fact it captures barely anything).


title: Undervolting in Linux

text: Could you recommend me something different like Linux-PHC for undervolting in Linux? I would like to undervolt my AMD Phenom 9850 CPU. I am using Debian squeeze x64. For underclocking I use cpufrequtils, it is great CLI utility for lowering power consumption when you don't need power and want to insure yourself, that computer won't take more than XYWatts. Is there anything better? I prefer more CLI utility.


title: Virtual file made out of smaller ones (for mac-like sparse bundle solution)

text: I'd like to recreate a feature of Mac OS X called  sparse bundles (disk images made out of smaller files, making them easy to backup after a small change). For that I'm looking for a way to 'virtually' create a single file made by concatenation of smaller ones (big.file shouldn't use all this space, just _link_ to .files):               4096 0.file     4096 1.file     4096 2.file     4096 3.file     4096 4.file     20480 big.file      so that I'd be able to mount big.file using loop device, format as btrfs and upon writing to this disk, data should be written only to certain .files, allowing me to backup easily. Any suggestions how I could accomplish that? Perhaps something FUSE-related?


title: Mysql LOG only specific users

text: I need to set up some logging on my debian squeeze x64 mysql 5.1 Server: 1) logging when users logged in and logged off 2) logging only specific users commands set up logging which will not slow down performance of mysql server or harddrives. Is it possible to set logging only last month? Is it possible to set up logging only in specific hours in a day? I don't want gigabytes of useless logs, just logs of specific users in one file.


title: Which Fedora CPU architecture should I choose? i386 or i686?

text: I have an old Thinkpad X32 which has an `Intel(R) Pentium(R) M processor 1.80GHz` based on the result of `cat /proc/cpuinfo` and I was wondering which is better to use on it, the `i386` or the `i686` version of the Fedora ISO found here. Basically, I don't know how to determine if my CPU is an `i386` or an `i686`. If you could also tell me how I can get this data, please let me know.


title: Forcing font size based on language in .fonts.conf

text: I can specify the default font family used to display a particular language in X by editing `.fonts.conf` in my user directory (or editing the global `/etc/fonts/fonts.conf`). However, I've not been able to force a particular font size in the same way. For example, the following forces the Russian language to be displayed in Linux Libertine:               <fontconfig>         <match>             <test name="lang">                 <string>rus</string>             </test>              <edit mode="prepend" name="family">                 <string>Linux Libertine</string>             </edit>         </match>     </fontconfig>      I have tried adding the following XML tag, but it does not work:                        <edit mode="assign" name="size">                  <int>18</int>              </edit>


title: how to check for disk in use on rhel

text: How to check if a disk is in use? If in use, How to check free, used space before I can start using it? I'm trying this in Perl and Any help is appreciated.


title: backup kmail in command prompt

text: How to take kmail backup mails from command mode as GUI mode got crashed in fedora12? Found the location of mails, But how to take backup to another system to configure?


title: Force users to change email password every six months

text: I'm going to build an experimental mail server with Postfix + Dovecot and Mysql for user accounts. The server will offer SMTP + POP3 + IMAP. Is there a way to force users to change their mail account passwords every six months?


title: Xen Domain0 cannot access internet while DomainU can

text: I am Using all this setup on VirtualBox VM with network interface NATing with original Windows machine. I have installed Xen on Ubuntu 12.04. From Dom0, I could access internet before I installed DomU Ubuntu 12.04. Both machines have single eth0 interface each with dhcp enabled. **Ifconfig output of Dom0** : ![enter image description here](http://i.stack.imgur.com/Q3uMI.png) Domain0 can't even ping gateway 10.0.2.2, which is strange :( And **ifconfig output for DomU** : ![enter image description here](http://i.stack.imgur.com/BWJ4f.png) Multiple Mac addresses is not a problem from my ISP, I can access internet from my Windows, virtualbox host machine. Is Virtualbox in anyway responsible for it or its something I need to change in xen config?


title: How can I change the screen resolution of Slax?

text: Slax uses X.org for managing its GUI. However, when I boot Slax (specifically in a VM), the resolution gets capped at 1024x768. How can I increase the resolution to more fully utilize the screen estate available on my display? I have already attempted to follow the old advice from the following sources:   * http://old.slax.org/forum.php?action=view&parentID=25516   * http://www.linuxquestions.org/questions/mandriva-30/changing-screen-resolution-552768   * http://slaxlive.blogspot.com/2005/07/slax-linux-step-by-step-first-step.html


title: Choose kernel version in OpenEmbedded

text: I want to build Angstrom kernel on _Ubuntu 13.04 host machine_ using OpenEmbedded.               git clone git://github.com/Angstrom-distribution/setup-scripts.git     cd setup-scripts     MACHINE=beagleboard./oebb.sh config beagleboard     MACHINE=beagleboard./oebb.sh update     MACHINE=beagleboard./oebb.sh bitbake virtual/kernel      The reason of building kernel is to be able to cross-compile a kernel driver on host machine, targeting on Angstrom distribution _(BeagleBoard)_. Beagleboard runs a prebuilt image of 2.6.32. As I know, the cross-compile must target not only the Angstrom distribution, but the same kernel version that BeagleBoard runs. How does OE choose "preferred" version? Is there any way I can choose the kernel version that BitBake will build?


title: Symbol that will show up first in output of `ls`?

text: I want a folder called `DELETED` to be first in my output of `ls`. Is there a symbol I can add to the front that can cause this? I've tried `^` and `-` and neither works.


title: Changing gui for particular user in ubuntu 13.10

text: I want to change the gui for particular user in ubuntu. Even if I change the session menu in login screen, I dont get ubuntu classic gui and it remains same for all the options. However, it happens for partiular user. For other user, I have ubuntu classic gui. How can I solve this issue?


title: Split a line into columns with some of the columns right-justified?

text: Is there an easy way to split comma-delimited lines of text into columns with some of the columns right-justified? As a bonus, it would be nice to format numbers, but this probably isn't too hard with sed.


title: Keeping config files synced across multiple pc's

text: I have a few different linux machines and a lot of **config** files _(and folders)_ on each. For example:               ~/.ssh/config     ~/.config/openbox/rc.xml     ~/.config/openbox/autostart.sh     ~/.scripts/ ( folder )     ~/.bashrc     ...etc      Is there a simple and elegant method to keep these files synced between my machines _( one has no internet access )_? Also, some files will need a more advanced syncing process, as they will have to differ slightly... for example: My desktop keybaord has a range of hotkeys, where my laptop has almost none. I use **XF86Mail** to open thunderbird on my desktop, but **Meta+M** on my laptop. My Home Desktop and Work Desktop are both more "multiple user" orientated, where my Laptop is just for me. So on my laptop, I tend to keep the 'rc.xml' file for openbox at `/etc/xdg/openbox/rc.xml` but on the desktops at `~/.config/openbox/rc.xml`


title: Linux boot with broken partition

text: I have two ext partition on my linux   * One for `/`   * And one for `/home` I wanted to reduce (with this method) the home partition (which was only something like 10% filled) to create a new partition for Windows. Unfortunately it failed and when I wanted to reboot, linux went in rescue mode, which could have been helpfull unless this rescue mode was not working (It showed two password prompt, and then was working like there was two command prompt at the same time [I had to double every letter to make a command like : `ccwwdd //eettcc`], so not really doable). My question is : Can I boot to this linux anyway without going in rescue mode? Like for example disabling this partition (`/etc/fstab`?). Also is it possible to repair this partition ? (When I try to mount it with Ext2Fs it says `RAW` in partition type) Here is the parted info :               Model: ATA ST9640320AS (scsi)     Disk /dev/sda: 640GB     Sector size (logical/physical): 512B/512B     Partition Table: msdos          Number  Start   End    Size    Type      File system     Flags      1      1049kB  100GB  100GB   primary   ext4      2      100GB   420GB  320GB   extended      5      100GB   110GB  9999MB  logical   linux-swap(v1)      6      110GB   420GB  310GB   logical      3      420GB   420GB  367MB   primary   ntfs            boot      4      420GB   640GB  220GB   primary   ntfs      I think the `/home` partition is `/dev/sda6` Fsck output :               ubuntu@ubuntu:~$ sudo fsck.ext4 /dev/sda6     e2fsck 1.42.9 (4-Feb-2014)     ext2fs_open2: Bad magic number in super-block     fsck.ext4: Superblock invalid, trying backup blocks...     fsck.ext4: Bad magic number in super-block while trying to open /dev/sda6          The superblock could not be read or does not describe a valid ext2/ext3/ext4     filesystem.  If the device is valid and it really contains an ext2/ext3/ext4     filesystem (and not swap or ufs or something else), then the superblock     is corrupt, and you might try running e2fsck with an alternate superblock:         e2fsck -b 8193 <device>      or         e2fsck -b 32768 <device>      Command output :               ubuntu@ubuntu:~$ findmnt;lsblk -f;sudo partx -svb /dev/sda -oNR,START,END,SECTORS,NAME,FLAGS,SCHEMETARGET                           SOURCE     FSTYPE          OPTIONS     /                                /cow       overlayfs       rw,relatime,lowerdir=//filesystem.squashfs,upperdir=/cow     ├─/sys                           sysfs      sysfs           rw,nosuid,nodev,noexec,relatime     │ ├─/sys/fs/cgroup                          tmpfs           rw,relatime,size=4k,mode=755     │ │ └─/sys/fs/cgroup/systemd     systemd    cgroup          rw,nosuid,nodev,noexec,relatime,name=systemd     │ ├─/sys/fs/fuse/connections                fusectl         rw,relatime     │ ├─/sys/kernel/debug                       debugfs         rw,relatime     │ ├─/sys/kernel/security                    securityfs      rw,relatime     │ └─/sys/fs/pstore                          pstore          rw,relatime     ├─/proc                          proc       proc            rw,nosuid,nodev,noexec,relatime     ├─/dev                           udev       devtmpfs        rw,relatime,size=1977152k,nr_inodes=207544,mode=755     │ └─/dev/pts                     devpts     devpts          rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000     ├─/run                           tmpfs      tmpfs           rw,nosuid,noexec,relatime,size=397492k,mode=755     │ ├─/run/lock                               tmpfs           rw,nosuid,nodev,noexec,relatime,size=5120k     │ ├─/run/shm                                tmpfs           rw,nosuid,nodev,relatime     │ └─/run/user                               tmpfs           rw,nosuid,nodev,noexec,relatime,size=102400k,mode=755     │   └─/run/user/999/gvfs         gvfsd-fuse fuse.gvfsd-fuse rw,nosuid,nodev,relatime,user_id=999,group_id=999     ├─/cdrom                         /dev/sdb1  vfat            ro,noatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro     ├─/rofs                          /dev/loop0 squashfs        ro,noatime     ├─/tmp                           tmpfs      tmpfs           rw,nosuid,nodev,relatime     └─/media/ubuntu/04A874F6A874E796 /dev/sda4  fuseblk         rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096     NAME   FSTYPE LABEL MOUNTPOINT     sda                      ├─sda1                   ├─sda2                   ├─sda3                   ├─sda4              /media/ubuntu/04A874F6A874E796     ├─sda5              [SWAP]     └─sda6                   sdb                      └─sdb1              /cdrom     sr0                      loop0               /rofs     partition: none, disk: /dev/sda, lower: 0, upper: 0     /dev/sda: partition table type 'dos' detected     NR     START        END   SECTORS NAME FLAGS SCHEME      1      2048  195311615 195309568      0x0   dos      2 195313662  820317176 625003515      0x0   dos      3 820318208  821035007    716800      0x80  dos      4 821035008 1250260991 429225984      0x0   dos      5 195313664  214843391  19529728      0x0   dos      6 214843455  820317176 605473722      0x0   dos


title: /etc/hosts for Debian

text: I was trying to get a perl script that contacts a PostgreSQL database to work on a server. This script was mysteriously failing. I then realised that `localhost` was not in the `/etc/hosts` file. The file for this machine (currently running Debian lenny) currently looks like               127.0.0.1       machinename.domain   machinename     xxx.xx.x.xxx    machinename.domain   machinename      The `xxx.xx.x.xxx` is the IP address. The file for my current home machine, which is a slightly older installation (currently running Debian squeeze) is               127.0.0.1       machinename          localhost     127.0.1.1       machinename.domain   machinename      My home machine sits behind a router and is not directly exposed to the internet. In any case, I'm on DSL and have no static IP address. I've kept `/etc` under version control for my machines (using etckeeper) for some time, and I see that for this server, the following change was made by some mastermind (possibly myself) on Dec 17th 2009.               -127.0.0.1      localhost     +127.0.0.1      machinename.domain  machinename      I've wondered before why this file is set up the way this is, but the answer is not obvious. Some questions:   1. Why `127.0.1.1`? This might be a Debian-specific bit of history. I did a bit of searching on the net, and found some vague mutterings about Gnome, but little of any substance.   2. Where in Debian is the template this file is set from?   3. Is there currently considered to be a correct/best form for this file?   4. Is the order of the names in the line significant? I hope not. More generally, what is the explanation of why these two lines are structured the way they are? For now, I think I'll change the server `/etc/hosts` to               127.0.0.1       machinename.domain  machinename localhost     xxx.xx.x.xxx    machinename.domain  machinename      Comments?


title: Attempts to unify Linux and other free Unix?

text: It's such a pain when you don't know what distribution to choose. It's such a waste of time and effort for developers to port stuff from one distribution to another. It makes Linux/Unix more complicated (and scary) than it should be. While I know there are certain reasons why the situation became the way it is now, I wonder if anyone has ever thought of reunifying the worlds of Linux and other (free) Unix? **This is still a question** : Have there been any (failed) attempts to unify Linux/Unix?


title: filename and pathname of a file

text: It is said that the filename of a file is a pointer pointing to the inode of the file. Before knowing that, I thought it was the pathname of a file that does that job. I am not sure how a pathname and a filename are defined in Unix. For example, is it correct that `/home/tim/tim.pdf` is the pathname of the file with file name `tim.pdf`. I wonder what the difference between the filename and the pathname of a file? Thanks.


title: How to copy every 4th file in a folder

text: I have a lot of files in a folder, named like `00802_Bla_Aquarium_XXXXX.jpg`. Now I need to copy every **4th** file to a subfolder, saying in `selected/`.               00802_Bla_Aquarium_00020.jpg <= this one     00802_Bla_Aquarium_00021.jpg     00802_Bla_Aquarium_00022.jpg     00802_Bla_Aquarium_00023.jpg     00802_Bla_Aquarium_00024.jpg <= this one     00802_Bla_Aquarium_00025.jpg     00802_Bla_Aquarium_00026.jpg     00802_Bla_Aquarium_00027.jpg     00802_Bla_Aquarium_00028.jpg <= this one     00802_Bla_Aquarium_00029.jpg      How do I do this?


title: How to stop GUI apps spam the terminal?

text: I start a gui app from a konsole window and it writes out totally useless information. I do not need that. Is there a way to stop this, once and for all? I tried disown, doesnt help. I guess 2>&1 >/dev/null might help but that's rather tedious :( Edit: OK, let's get creative. One half of the answer is to use preexec (I use zsh but the net is full of bash preexec tricks) and use `ldd` to detect libX11 (and what else?). Then http://stackoverflow.com/a/9188571/308851 shows how to create redirects to /dev/null. How can we expand this solution to work with programs having a shell script wrapper?


title: Missing menu on Mint host using RDP unless logged in on host console

text: Using Remote Desktop from a Windows 7 PC to connect to a Mint 17 VM with MATE, the Show Desktop icon displays, but the Menu button does not. However, if I go to the Linux machine and log in, leave the session logged in, RDP works and the menu displays correctly. It seems like logging in on the Mint machine starts something that X11RDP does not. Is there something that I need to configure or add to .xsession so I don't need to be logged into the physical machine to connect via RDP? Setup: PC 1: Windows 7 PC using Remote Desktop PC 2: Ubuntu 14.04 LTS running LXDE and VirtualBox as the VM host. Mint 17 VM guest running X11RDP (from X11RDP-o-Matic). .xsession contains only one line: mate-session


title: Compile mkvtoolnix for router with customized firmware

text: I am using my router (asus-rt66u with customized firmware (tomato) as a media server. To get the tools I need, I have been using the optware package manager which has has bunch of cross-compiled applications available. Now I need the mkvtoolnix tool, which is unfortunately not in the package list. The router is using the mipsel architecture. Probably a stupid question but do I need to build `mkvtoolnix` on my own on the router or is it possible to use a pre/cross-compiled package like this one (Debian package)? If I need to compile on my own, how do I proceed with that?


title: Can't use QWERTY layout after make IBus work with Dvorak layout after reboot

text: To keep my Input Method (Bogo or Unikey) of IBus working with Dvorak keyboard layout after reboot, I use `sudo dpkg-reconfigure keyboard-configuration` to set keyboard as Dvorak, and go to tab Advance in IBus Preferences to check Use system keyboard layout. The problem is, sometimes my friends want to borrow my laptop and I can not easily switch to Qwerty layout because any Input Method will use Dvorak. The English - English (US) is the same as English - English (Dvorak) one. Any idea? Info: I'm use IBus 1.5.3 and it says this is the newest version. So do Cinnamon.


title: Limits on the number of file descriptors

text: I'm trying to install `389-ds`, And it gives me this warning :               WARNING: There are only 1024 file descriptors (hard limit) available, which     limit the number of simultaneous connections.      I understand about file descriptors, but i don't understand about soft and hard limits. When i do                cat /proc/sys/fs/file-max      I get : `590432` That means, i can open up to 590432 files, meaning i can have up to 590432 file descriptors. Right ? But what does that men ?               ulimit      Gives me : `unlimited` And               ulimit -Hn       Gives : `4096` I guess the hard limit is 4096, but what does hard limit mean ? The               ulimit -Sn      Gives : `1024` That means the soft limit is 1024 but what does soft limit mean too ?


title: How to limit aria2 connections to one server but enable concurrent connections to multiple servers?

text: I have a long list urls to download with aria2 from a variety of servers, with some urls from the same server. Here's a snippet of urls.txt:               ftp://93.190.206.160/public/c/camaro/%E1%D7%D4%CF%CC%C5%C7%C5%CE%C4%D9/net.ods     ftp://93.190.206.160/public/3/389743v/%E6%CC%C5%DB%CB%C1/%D5%DE%C5%C2%C1/Oktyabr2013.xlsx     ftp://93.190.206.160/public/m/modesti/=))/%E7%E0%E4%E0%F7%E0%203.ods     ftp://93.190.206.160/public/c/camaro/%E1%D7%D4%CF%CC%C5%C7%C5%CE%C4%D9/net.ods      I need to be able to limit the number of connections to any individual server to 1, but allow concurrent connections to different servers. Here's how I would expect to do that:               aria2c -iurls.txt -x1 -s1      However, at least one of the four urls above fails to download because of too many concurrent connections. I can download all files successfully by adding a -k1 flag, but that will prevent concurrent downloads on other servers.


title: how do I get the response ouput from the url .download it in file,not download the code

text: My file like this with some number or id                404000847307897      404000857827460      404001044194601      404000835511595      404000338418501      404000338654003      404000290144612      404000344175621      404000290144612      404000844713523      this my url                url= http://203.90.117.109/wds_cdma/wds.aspx?min=       now by using this url get the response from url and download output of the url. not the code. example take the url and add the `min = file id` number at end of the url.               (http://203.90.117.109/wds_cdma/wds.aspx?min=404000847307897)     (http://203.90.117.109/wds_cdma/wds.aspx?min=404000857827460)      this url hit the server get the response of the url ouput below                404000847307897|-101| Requested MIN not found.      404000857827460|9225534526|2|Prepaid|2       finally this output store in one file. can you do this `curl` with `awk` or `wget`?


title: How to reduce ncurses terminfo size

text: I notice that ncurses's terminfo database on `/usr/share/terminfo` is about 7MB (I compiled it myself). This is too large if I want to deploy it on an embedded Linux of 64MB disk space. Is there a way to reduce its size by deleting unneeded entries and keep the most-used ones? And what's is this actually for? **EDIT** : Is there any info or reference for commonly used terminfo for regular PCs or SSH clients?


title: How can I use ffmpeg to split MPEG video into 10 minute chunks for YouTube upload?

text: There is often a need in the open source or active developer community to publish large video segments online. (Meet-up videos, campouts, tech talks...) Being that I am a developer and not a videographer I have no desire to fork out the extra scratch on a premium Vimeo account. How then do I take a 12.5 GB (1:20:00) MPEG tech talk video and slice it into 00:10:00 segments for easy uploading to YouTube?


title: sed whitespace matching confusion

text: echo ' 1 2     3  '|sed 's/[[:space:]]*/_/g'      I want to see `_1_2_____3__` as the output. Instead, I am seeing `_1_2_3_` as the output. What am I doing wrong?? **EDIT**   The other thing confusing me, which I forgot to put in the above example, is why this:               echo ' test1 test2  ' | sed 's/[[:space:]]*/_/g'      shows this:               _t_e_s_t_1_t_e_s_t_2_      How can `[[:space:]]` match between `t` and `e` and `s`...?


title: Remove all files/directories except for one file

text: I have a directory containing a large number of files. I want to delete all files except for file.txt . How do I do this? There are too many files to remove the unwanted ones individually and their names are too diverse to use * to remove them all except this one file. Someone suggested using               rm !(file.txt)      But it doesn't work. It returns:               Badly placed ()'s       My OS is Scientific Linux 6. Any ideas?


title: Linux distribution with remote desktop?

text: I have a old computer, where I want to install Linux. It will be server but I want to use as normal operating system. But I have problem, because I don't have display for this computer, because this display is for another computer. I will have monitor only during installation time. For configurating and using Linux I want to have remote desktop. For example "FreeNAS" have this option; I type 192.168.xxx.xxx and I can config server. But I want full Linux, not only NAS server - for example Ubuntu. Is there a Linux Distribution with remote desktop by default?


title: Is there a convenient way to wrap a bash command list into rlwrap?

text: Thanks to a question on superuser.com, I found out about this utterly convenient `rlwrap` tool. It satisfies my needs (i.e. add command history to another cmdline tool), but I was wondering how I can use it to add command history to a 'compound' shell command, like the prototypical               $> while read line; do echo "i read $line"; done     hi     i read hi     ^D      When I put the `while` loop inside a shell script, and execute it like `rlwrap ./whilereadline.sh`, it's ok. But I'm wondering how I can do this _without_ the need for an additional file, somewhat like               $> rlwrap (while read line; do echo "line: $line"; done)     bash: syntax error near unexpected token `while'      Any ideas?


title: Why are my two virtual machines getting the same IP address?

text: I have two virtual machines both running on a Linux host (Fedora 16). I set both adapters as attached to NAT. When I boot them up they both have their default gateway set to `10.0.2.2`. They also both have the same IP address `(10.0.2.15)`. They are both on the same adapter (adapter 1). I don't know why they are getting assigned the same IP address, and shouldn't the default gateway be `10.0.2.1` since the subnet address is `10.0.2.0` and the netmask is 255.255.255.0. Is there something I am missing, has this happened to anyone before? How do I get the VirtualBox DHCP working properly?


title: Is there a more elegant way to unlink two tmux clients sharing a session from inside tmux?

text: This is almost a code-review question, but very *nixy and more about configuration than code. For years since I switched to `tmux` from `screen` I've had a couple of nagging issues that I could not make work the way I wanted them to. Since I setup my shell to exec into a tmux session I finally decided it was time to fix this one. By default when you attach two tmux clients to the same session, they are locked together. Switch panes in one and both switch in sync. This is different from screen where the default behavior was a shared set of panes but the client itself was independent. What I've wanted was a way to un-bind two tmux clients attached to the same session. This is easy enough to do if you are outside of tmux and launching a new client. Just start a new session with a reference to the parent one:               tmux new-session -t original_session -s new_session      However try do do this _after_ you are in a client and want to unlink it from whatever other client is sharing that session and things get more complicated. I tried dozens of ways and never hit on one that worked well. The closest I got was using `bind <key> prompt-command ...` to prompt for both the old and new session names. **For whatever reason tmux does not expand the`#{session_name}` variable inside arguments for a `new-session` or `prompt- command`.** It does in arguments to many other commands (e.g. I use it in `run` below) but without that expansion this particular task becomes suddenly complicated. Even with manually entering the values, it only ever sorta worked. Today I finally got it to work. The result, however, is uglier that I would have liked. It requires a shell function to do most of the magic. In order to contain this to just the config file without involving external scripts (for dotfile portability) I'm using a hack. The config, if you crop off the first two columns, is actually executable as a shell script. With everything wrapped in functions, you can call just the part of the script you need from any keybinding. The shell script bits are comments in the config, while in shell script made the config bit is discarded with a here-doc. Todays solution came out something like this (my full `.tmux.conf` file):               # : << ENDOFCONF          # Clear the default binding     unbind C-c     # Pass the name of the current session to a function to clone it     bind C-c run "cut -c3- ~/.tmux.conf | sh -s clone #S"          # ENDOFCONF     # clone () {     #   orig=${1%-*}     #   copy="$orig-$(($( tmux list-sessions -F '#S' | sed -nE "/^${orig}-[0-9]+$/{s/[^0-9]//g;p}" | tail -n1 )+1))"     #   TMUX= tmux new-session -d -t $orig -s $copy     #   tmux switch-client -t $copy     #   tmux set -q -t $copy destroy-unattached on     # }     # $@      Mind you this works. From a running tmux client, `Ctrl`+`B` `Ctrl`+`C` creates a new session with a number appended to the name of the current one, uses the current one as a target for the panes, and switches to it. I'm happy with this except for the nagging idea that I've just made something simple much more complex than it needs to be. Is there a simpler way to achieve this?


title: How to install Vinux on a mac?

text: I have no experience with Linux, nor with installing any OS in any other way then just putting a CD-ROM in a computer and following instructions. To get some more insight into how operating systems work, I'm planning to install a Linux distro. Vinux seamed the best option for visually impaired people so that's the one I chose. The problem I'm having is that on the vinux site they only mention installing on windows. How would I install vinux on a mac? I would prefer it if it would be possible to just install it on a partition on my hard drive, or even better, on an external hard drive, so I can use it on multiple computers, but again, I have no idea if this is possible.


title: Mouse + network turned off after suspend

text: (After upgrade from Debian Wheezy to Jessie), my mouse is not turning on again, when I wake up my computer. I don't know if my computer hibernating or suspended to ram. Is there something that I can add to /etc/pm/... ? gnome-control-center and gnome-tweak-tool have no options. Also my network is turned off, but this is also so case when booting, so might be a different problem.


title: openSuse, not running the cron job

text: I have created a cron job in the `/etc/cron.d/dispatchingEmail_I` the permissions of `dispatchingEmail_I` are the following:               -rw-r--r--   1 root root    84 Sep 11 19:52 dispatchingEmail_I      content of the `dispatchingEmail_I` is:               54 19 * * * root /home/harbir/project/L_ocalRepository/smallworks/maildispatcher.sh      when I check `/var/log/messages` I can see an entry               2014-09-11T19:54:01.761269+10:00 linux-gn77-PC /USR/SBIN/CRON[4109]: (root) CMD (/home/harbir/project/L_ocalRepository/smallworks/maildispatcher.sh)      which tells me that the command has run, but no email has been received. where as when I run the script by itself, the email is received. the permissions of the file `maildispatcher.sh` are the following:               -rwxrwx---  1 harbir users      621 Sep 10 06:33 maildispatcher.sh      how can I achieve to run maildispatcher.sh with the cronjob. Contents of the `maildispatcher.sh` are the following:               java -cp ./build/classes/:./WebContent/WEB-INF/lib/commons-email-1.2.jar:./WebContent/WEB-INF/lib/mail-1.4.jar:./WebContent/WEB-INF/lib/hibernate-core-3.3.1.GA.jar:./WebContent/WEB-INF/lib/dom4j-1.6.1.jar:./WebContent/WEB-INF/lib/slf4j-api-1.5.10.jar:./WebContent/WEB-INF/lib/slf4j-jdk14-1.5.8.jar:./WebContent/WEB-INF/lib/mysql-connector-java-5.1.14.jar:./WebContent/WEB-INF/lib/commons-collections-3.2.jar:./WebContent/WEB-INF/lib/javassist-3.4.GA.jar:./WebContent/WEB-INF/lib/log4j-1.2.15.jar:./WebContent/WEB-INF/lib/transaction-api-1.1.jar:./WebContent/WEB-INF/lib/antlr-2.7.6.jar  com.smallworks.mail.MailProcessor      when I run a simple command with the cronjob it works, when the contents of the cronjob file is               50 05 * * * root echo checking >>/tmp/try2.log       I think its having trouble running the script as follows.               54 19 * * * root /home/harbir/project/L_ocalRepository/smallworks/maildispatcher.sh      can anyone suggest some changes that can be tried.


title: Why will the C++ Library not disable, GCC

text: I've been up all night trying to get this to work. I got the second to latest gcc and latest binutils and am attempting to create a cross compiler on a debian system. For some reason, GCC won't compile which is something i've never had to deal with before. I get this error:               make[2]: Leaving directory `/home/dylan/Documents/cross/gcc-build/fixincludes'     Configuring in ./gmp     configure: error: invalid feature name: libstdc++-v3     make[1]: *** [configure-gmp] Error 1     make[1]: Leaving directory `/home/dylan/Documents/cross/gcc-build'     make: *** [all] Error 2      with this configuration: ../gcc-4.9.0/configure \ \--target=$TARGET \ \--prefix=$PREFIX \ \--with- sysroot=/mnt \ \--with-newlib \ \--without-headers \ \--with-local- prefix=/tools \ \--with-native-system-header-dir=/tools/include \ \--disable- nls \ \--disable-shared \ \--disable-multilib \ \--disable-decimal-float \ \--disable-threads \ \--disable-libatomic \ \--disable-libgomp \ \--disable- libitm \ \--disable-libquadmath \ \--disable-libsanitizer \ \--disable-libssp \ \--disable-libvtv \ \--disable-libcilkrts \ \--disable-libstdc++-v3 \ \--enable-languages=c,c++ I ran linux from scratches version check and got this:               bash, version 4.2.37(1)-release     /bin/sh -> /bin/bash     Binutils: (GNU Binutils for Debian) 2.22     bison (GNU Bison) 2.5     /usr/bin/yacc -> /usr/bin/bison.yacc     bzip2,  Version 1.0.6, 6-Sept-2010.     Coreutils:  8.13     diff (GNU diffutils) 3.2     find (GNU findutils) 4.4.2     GNU Awk 4.0.1     /usr/bin/awk -> /usr/bin/gawk     gcc (Debian 4.7.2-5) 4.7.2     GNU C Library (Debian EGLIBC 2.13-38+deb7u4) stable release version 2.13     grep (GNU grep) 2.12     gzip 1.5     Linux version 3.2.0-4-amd64 (debian-kernel@lists.debian.org) (gcc version 4.6.3 (Debian 4.6.3-14) ) #1 SMP Debian 3.2.60-1+deb7u3     m4 (GNU M4) 1.4.16     GNU Make 3.81     patch 2.6.1     Perl version='5.14.2';     GNU sed version 4.2.1     tar (GNU tar) 1.26     Texinfo: makeinfo (GNU texinfo) 4.13     xz (XZ Utils) 5.1.0alpha     Compilation OK      I don't think this is a bug as I see it on google, however all of these fixes and hints I see are not my problem. It seems as though the C++ library will not disable.


title: Copy/Paste with keyboard in rxvt

text: I know that I can copy and paste text in `rxvt` by using the middle mouse button, but I was wondering if there was a way to define keyboard-shortcuts in the `.Xdefaults` for copy and pasting text. Moreover it would be really awesome if it would be possible to select the text with the keyboard as well. **EDIT:** Trying to use urxvt-perls does not seem to work (maybe because of the zsh-VI- bindings?). When I try running the script from the command line I also get the following errors:               % perl keyboard-select      Bareword "urxvt::ControlMask" not allowed while "strict subs" in use at keyboard-select line 137.     Bareword "urxvt::ControlMask" not allowed while "strict subs" in use at keyboard-select line 151.     Execution of keyboard-select aborted due to compilation errors.      Unfortunately I know nothing about a perl and have no idea if this is anyhow related to it not working in urxvt itself. **strong text**


title: Setting up Kolab Mail Server on Cent OS. The port number '389' is not available for use error?

text: I use: `setup-kolab` and all goes well , except an error is returned:               The port number '389' is not avaialble for use.      This may be due to an invalid port number, or port already being in use by another program.      So I use:               netstat -lntp | grep :389      It returns:               tcp        0      0 :::389           :::*            LISTEN      15697.ns-slapd      What now? Should I exit the program, or specific a different port for Kolab (I tried this but there were no arguments to set it)


title: Manually adding static ip not resolved after a while

text: Hi Unix/Linux community, I have a small problem with a device I am connecting to my laptop, running Debian Linux. While connected to a router on my `wlan1` interface (using wicd, if that matters), I am adding a static ip to my `eth0` interface using something like `ip addr add 192.168.0.2/24 dev eth0`. The address and routes are registered correct, but I cannot contact the device until a later point in time. If I try to ping it, I get a number of 'destination host not reachable'. Eventually the device answers and I am able to communicate with it - but not after waiting for this seemingly arbitrary period. Do you have any ideas what could be causing this? Why can't it just resolve the device immediately? Thanks for your help!


title: Linux / Windows 8.1 : Installation on raid0

text: I need to install a linux distribution on my laptop (an Asus UX302LA). I tried again and again but I couldn't even begin the installation. To explain you my problem, I know that Windows 8 is installed on UEFI mode. Furthermore, I have discovered that I have a raid0, probably a software one, in my laptop. I tried to install the latest version of Ubuntu and Mint, both 64bits. I find some tutorials on the internet but I'm so afraid about formating all my datas (and also the recovery partitions). Can someone help me by giving me a good tutorial or by explaining all I have to do ? Thank you for your help !


title: Files that do not exist, prevent me from deleting them, corrupted filesystem

text: Well... It's about on an OS X system (hfs+), but that's unix after all to. :p system has become unbootable, due to a filesystem error... fsck.hfsplus fails because ....                   ...         ** Checking Catalog file.            Illegal name                 illegal name is 0xB1 03 0D 03 BB 03 BF 03 B3 03 BF 03 2F 00 C3 03 B5 03 BB 03 2E 00 33 00 37 00 2E 00 74 00 69 00 66 00                 replacement name is 0xB1 03 01 03 BB 03 BF 03 B3 03 BF 03 2F 00 C3 03 B5 03 BB 03 2E 00 33 00 37 00 2E 00 74 00 69 00 66 00         ....         ** Repairing volume.                 replacement name already exists                 duplicate name is 0xB1 03 01 03 BB 03 BF 03 B3 03 BF 03 2F 00 C3 03 B5 03 BB 03 2E 00 33 00 37 00 2E 00 74 00 69 00 66 00                 FixIllegalNames - repair failed for type 0x23B 571         ** The volume Macintosh HD could not be repaired.         ...      using find -mtime I managed to locate some problematic files, that.... do not actually exist....                   # ls -lhai         ls: cannot access USB 프린터 공유: No such file or directory         ls: cannot access 시동 디스크: No such file or directory         ls: cannot access 애플 메뉴 선택사항: No such file or directory         ls: cannot access 인터넷: No such file or directory         ls: cannot access 파일 관리자: No such file or directory         total 0         152704 drwxr-xr-x 1 root root  7 Apr 23 16:49 .         152677 drwxr-xr-x 1 root root 18 Apr 23 14:55 ..              ? -????????? ? ?    ?     ?            ? 애플 메뉴 선택사항              ? -????????? ? ?    ?     ?            ? 시동 디스크              ? -????????? ? ?    ?     ?            ? 파일 관리자              ? -????????? ? ?    ?     ?            ? 인터넷              ? -????????? ? ?    ?     ?            ? USB 프린터 공유      rm -r on them simply does not have any result or error. rmdir and rm -rf on the parent directory do not do the trick, because "the directory is not empty". Tried to touch those files and                   # ls -lhai         ls: cannot access USB 프린터 공유: No such file or directory         ls: cannot access 시동 디스크: No such file or directory         ls: cannot access 애플 메뉴 선택사항: No such file or directory         ls: cannot access 인터넷: No such file or directory         ls: cannot access 파일 관리자: No such file or directory         total 0         152704 drwxr-xr-x 1 root root  7 Apr 23 16:52 .         152677 drwxr-xr-x 1 root root 18 Apr 23 14:55 ..              ? -????????? ? ?    ?     ?            ? 애플 메뉴 선택사항              ? -????????? ? ?    ?     ?            ? 시동 디스크              ? -????????? ? ?    ?     ?            ? 파일 관리자              ? -????????? ? ?    ?     ?            ? 인터넷              ? -????????? ? ?    ?     ?            ? USB 프린터 공유         # touch USB\ 프린터\ 공유          # ls -lhai         ls: cannot access 시동 디스크: No such file or directory         ls: cannot access 애플 메뉴 선택사항: No such file or directory         ls: cannot access 인터넷: No such file or directory         ls: cannot access 파일 관리자: No such file or directory         total 0          152704 drwxr-xr-x 1 root root  8 Apr 23 17:09 .          152677 drwxr-xr-x 1 root root 18 Apr 23 14:55 ..               ? -????????? ? ?    ?     ?            ? 애플 메뉴 선택사항               ? -????????? ? ?    ?     ?            ? 시동 디스크               ? -????????? ? ?    ?     ?            ? 파일 관리자               ? -????????? ? ?    ?     ?            ? 인터넷         4641964 -rw-r--r-- 1 root root  0 Apr 23 17:09 USB 프린터 공유         4641964 -rw-r--r-- 1 root root  0 Apr 23 17:09 USB 프린터 공유      dual entries with the same inode...                   # rm -f U*      but that also brings me to the initial situation                   # ls -lhai         ls: cannot access USB 프린터 공유: No such file or directory         ls: cannot access 시동 디스크: No such file or directory         ls: cannot access 애플 메뉴 선택사항: No such file or directory         ls: cannot access 인터넷: No such file or directory         ls: cannot access 파일 관리자: No such file or directory         total 0         152704 drwxr-xr-x 1 root root  7 Apr 23 16:52 .         152677 drwxr-xr-x 1 root root 18 Apr 23 14:55 ..              ? -????????? ? ?    ?     ?            ? 애플 메뉴 선택사항              ? -????????? ? ?    ?     ?            ? 시동 디스크              ? -????????? ? ?    ?     ?            ? 파일 관리자              ? -????????? ? ?    ?     ?            ? 인터넷              ? -????????? ? ?    ?     ?            ? USB 프린터 공유      any ideas of anything I could try????


title: Does sudo a command temporarily change $PATH to be the root's?

text: 1. When running `sudo <command>` under a user login session, will that change `$PATH` to be the root's `$PATH` during the running of `sudo <command>`?   2. If `<command>` relies on the user's `$PATH`, not the root's `$PATH`, how can the user run `sudo <command>` successfully?     * One way is to `sudo su` to be the root, change the root's `$PATH` to be the user's, and run `<command>` directly. This is how I solved my problem of How to specify a higher ruby version for installing a gem?.     * Any way simpler?     * Can it be done without switching to the root from the user? Thanks!


title: Kali tools on Ubuntu

text: Okay, So I am new to UBUNTU, and have little experience with Kali and Backtrack! so I wanted to install **ALL** the Kali Linux tools in UBUNTU, not one by one, or just transform the Kali Linux into Ubuntu does anyone have the answer, I couldn't find any related questions asked before :\ ## if u don't know about all the tools, so no problem But I need these tools :D : >   1. AirCrack > >   2. Burp Suite > >   3. Hydra > >   4. John the Ripper > >   5. Maltego > >   6. Metasploit Framework > >   7. Armitage > >   8. Zed Attack Proxy > >   9. Sqlmap > >   10. Wireshark > >   11. address6 > >   12. Deblaze > >   13. Tnscmd10g > >   14. BBQSQL > >   15. Blueranger > >   16. Lynis > >   17. DotDotPwn > >   18. Netgear-telnetable > >   19. Terminator > >   20. Htexploit > >   21. Jboss-autopwn > >   22. Websploit > >   23. Bluepot > >   24. Spooftooph > >   25. Smartphone-Pentest-Framework > >   26. Fern-Wifi-cracker > >   27. Wi-fihoney > >   28. Wifite > >   29. Creddump > >   30. Johnny > >   31. Manglefizz > >   32. Ophcrack > >   33. Phrasendresher > >   34. Rainbowcrack > > > > 35.Acccheck > > 36.Smbexec


title: How do I validate a settings(ini) file for the values expected using bash?

text: After I check if the ini file exists where it is expected to be, which I've learned how to do, I would like to check the file for proper formatting. I'd like to validate any number of "site" entries in the file and check that each entry adheres to the pattern below including the new line.                1| [site1]      2| shortcut=x1      3| site=example1.com      4| theme=alpha      5|      6| [site2]      7| shortcut=x2      8| site=example2.com      9| theme=beta     10|        I've got the individual values being validated as they are being read. I just want to make sure the pattern is correct before processing the file echoing the line number where the pattern breaks if it isn't.