title: my wifi Wireless-N 2230 can't connect occassionally

text: My wifi Wireless-N 2230 has quite often connection problems. My system is Fedora 18. Below are some logs from /var/log/messages. I can see that it changes "World regulatory domain" from PL to CZ and back all the time but not sure what that means.               Nov  4 00:21:38 den kernel: [158784.028392] wlan0: disassociating from 00:01:38:fb:84:9d by local choice (reason=3)     Nov  4 00:21:38 den kernel: [158784.033850] cfg80211: Calling CRDA to update world regulatory domain     Nov  4 00:21:38 den kernel: [158784.034732] wlan0: deauthenticating from 00:01:38:fb:84:9d by local choice (reason=3)     Nov  4 00:21:38 den NetworkManager[855]: <info> (wlan0): supplicant interface state: associated -> disconnected     Nov  4 00:21:38 den kernel: [158784.046507] cfg80211: World regulatory domain updated:     Nov  4 00:21:38 den kernel: [158784.046516] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)     Nov  4 00:21:38 den kernel: [158784.046521] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)     Nov  4 00:21:38 den kernel: [158784.046526] cfg80211:   (2457000 KHz - 2482000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)     Nov  4 00:21:38 den kernel: [158784.046529] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)     Nov  4 00:21:38 den kernel: [158784.046533] cfg80211:   (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)     Nov  4 00:21:38 den kernel: [158784.046537] cfg80211:   (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)     Nov  4 00:21:38 den kernel: [158784.046577] cfg80211: Calling CRDA for country: CZ     Nov  4 00:21:38 den kernel: [158784.051348] cfg80211: Regulatory domain changed to country: CZ     Nov  4 00:21:38 den kernel: [158784.051354] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)     Nov  4 00:21:38 den kernel: [158784.051359] cfg80211:   (2400000 KHz - 2483500 KHz @ 40000 KHz), (N/A, 2000 mBm)     Nov  4 00:21:38 den kernel: [158784.051363] cfg80211:   (5150000 KHz - 5250000 KHz @ 40000 KHz), (N/A, 2301 mBm)     Nov  4 00:21:38 den kernel: [158784.051366] cfg80211:   (5250000 KHz - 5350000 KHz @ 40000 KHz), (N/A, 2000 mBm)     Nov  4 00:21:38 den kernel: [158784.051370] cfg80211:   (5470000 KHz - 5725000 KHz @ 40000 KHz), (N/A, 2698 mBm)                                                               Nov  4 00:21:38 den kernel: [158784.051373] cfg80211:   (57240000 KHz - 65880000 KHz @ 2160000 KHz), (N/A, 4000 mBm)                                                           Nov  4 00:21:39 den NetworkManager[855]: <info> (wlan0): supplicant interface state: disconnected -> scanning                                                                  Nov  4 00:21:39 den kernel: [158785.560724] wlan0: authenticate with 00:01:38:fb:84:9d     Nov  4 00:21:39 den kernel: [158785.562341] wlan0: send auth to 00:01:38:fb:84:9d (try 1/3)     Nov  4 00:21:39 den kernel: [158785.564375] wlan0: authenticated     Nov  4 00:21:39 den kernel: [158785.564826] iwlwifi 0000:02:00.0 wlan0: disabling HT/VHT due to WEP/TKIP use     Nov  4 00:21:39 den kernel: [158785.564835] iwlwifi 0000:02:00.0 wlan0: disabling HT as WMM/QoS is not supported by the AP     Nov  4 00:21:39 den kernel: [158785.564840] iwlwifi 0000:02:00.0 wlan0: disabling VHT as WMM/QoS is not supported by the AP     Nov  4 00:21:39 den kernel: [158785.564995] wlan0: associate with 00:01:38:fb:84:9d (try 1/3)     Nov  4 00:21:39 den NetworkManager[855]: <info> (wlan0): supplicant interface state: scanning -> authenticating     Nov  4 00:21:39 den kernel: [158785.567720] wlan0: RX AssocResp from 00:01:38:fb:84:9d (capab=0x431 status=0 aid=3)     Nov  4 00:21:39 den NetworkManager[855]: <info> (wlan0): supplicant interface state: authenticating -> associating     Nov  4 00:21:39 den kernel: [158785.571052] wlan0: associated     Nov  4 00:21:39 den kernel: [158785.571223] cfg80211: Calling CRDA for country: PL     Nov  4 00:21:39 den kernel: [158785.575645] cfg80211: Regulatory domain changed to country: PL     Nov  4 00:21:39 den kernel: [158785.575653] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)     Nov  4 00:21:39 den kernel: [158785.575658] cfg80211:   (2402000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm)     Nov  4 00:21:39 den kernel: [158785.575662] cfg80211:   (5170000 KHz - 5250000 KHz @ 40000 KHz), (N/A, 2000 mBm)     Nov  4 00:21:39 den kernel: [158785.575665] cfg80211:   (5250000 KHz - 5330000 KHz @ 40000 KHz), (N/A, 2000 mBm)     Nov  4 00:21:39 den kernel: [158785.575669] cfg80211:   (5490000 KHz - 5710000 KHz @ 40000 KHz), (N/A, 2700 mBm)     Nov  4 00:21:39 den kernel: [158785.575673] cfg80211:   (57240000 KHz - 65880000 KHz @ 2160000 KHz), (N/A, 4000 mBm)     Nov  4 00:21:39 den NetworkManager[855]: <info> (wlan0): supplicant interface state: associating -> associated     Nov  4 00:21:49 den kernel: [158795.577247] wlan0: disassociating from 00:01:38:fb:84:9d by local choice (reason=3)     Nov  4 00:21:49 den kernel: [158795.584453] cfg80211: Calling CRDA to update world regulatory domain     Nov  4 00:21:49 den kernel: [158795.585791] wlan0: deauthenticating from 00:01:38:fb:84:9d by local choice (reason=3)     Nov  4 00:21:49 den kernel: [158795.591456] cfg80211: World regulatory domain updated:     Nov  4 00:21:49 den kernel: [158795.591465] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)     Nov  4 00:21:49 den kernel: [158795.591470] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)     Nov  4 00:21:49 den kernel: [158795.591475] cfg80211:   (2457000 KHz - 2482000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)     Nov  4 00:21:49 den kernel: [158795.591478] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)     Nov  4 00:21:49 den kernel: [158795.591482] cfg80211:   (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)     Nov  4 00:21:49 den kernel: [158795.591486] cfg80211:   (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)     Nov  4 00:21:49 den kernel: [158795.591517] cfg80211: Calling CRDA for country: CZ     Nov  4 00:21:49 den NetworkManager[855]: <info> (wlan0): supplicant interface state: associated -> disconnected     Nov  4 00:21:49 den kernel: [158795.597174] cfg80211: Regulatory domain changed to country: CZ     Nov  4 00:21:49 den kernel: [158795.597177] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)     Nov  4 00:21:49 den kernel: [158795.597178] cfg80211:   (2400000 KHz - 2483500 KHz @ 40000 KHz), (N/A, 2000 mBm)     Nov  4 00:21:49 den kernel: [158795.597180] cfg80211:   (5150000 KHz - 5250000 KHz @ 40000 KHz), (N/A, 2301 mBm)     Nov  4 00:21:49 den kernel: [158795.597181] cfg80211:   (5250000 KHz - 5350000 KHz @ 40000 KHz), (N/A, 2000 mBm)     Nov  4 00:21:49 den kernel: [158795.597182] cfg80211:   (5470000 KHz - 5725000 KHz @ 40000 KHz), (N/A, 2698 mBm)     Nov  4 00:21:49 den kernel: [158795.597183] cfg80211:   (57240000 KHz - 65880000 KHz @ 2160000 KHz), (N/A, 4000 mBm)     Nov  4 00:21:50 den NetworkManager[855]: <info> (wlan0): supplicant interface state: disconnected -> scanning     Nov  4 00:21:51 den kernel: [158797.086187] wlan0: authenticate with 00:01:38:fb:84:9d     Nov  4 00:21:51 den kernel: [158797.090017] wlan0: send auth to 00:01:38:fb:84:9d (try 1/3)     Nov  4 00:21:51 den NetworkManager[855]: <info> (wlan0): supplicant interface state: scanning -> authenticating     Nov  4 00:21:51 den kernel: [158797.091987] wlan0: authenticated     Nov  4 00:21:51 den kernel: [158797.092377] iwlwifi 0000:02:00.0 wlan0: disabling HT/VHT due to WEP/TKIP use     Nov  4 00:21:51 den kernel: [158797.092390] iwlwifi 0000:02:00.0 wlan0: disabling HT as WMM/QoS is not supported by the AP     Nov  4 00:21:51 den kernel: [158797.092398] iwlwifi 0000:02:00.0 wlan0: disabling VHT as WMM/QoS is not supported by the AP     Nov  4 00:21:51 den kernel: [158797.093302] wlan0: associate with 00:01:38:fb:84:9d (try 1/3)     Nov  4 00:21:51 den kernel: [158797.096083] wlan0: RX AssocResp from 00:01:38:fb:84:9d (capab=0x431 status=0 aid=3)     Nov  4 00:21:51 den NetworkManager[855]: <info> (wlan0): supplicant interface state: authenticating -> associating     Nov  4 00:21:51 den kernel: [158797.099180] wlan0: associated     Nov  4 00:21:51 den kernel: [158797.099395] cfg80211: Calling CRDA for country: PL     Nov  4 00:21:51 den NetworkManager[855]: <info> (wlan0): supplicant interface state: associating -> associated     Nov  4 00:21:51 den kernel: [158797.106784] cfg80211: Regulatory domain changed to country: PL     Nov  4 00:21:51 den kernel: [158797.106793] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)     Nov  4 00:21:51 den kernel: [158797.106798] cfg80211:   (2402000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm)     Nov  4 00:21:51 den kernel: [158797.106802] cfg80211:   (5170000 KHz - 5250000 KHz @ 40000 KHz), (N/A, 2000 mBm)     Nov  4 00:21:51 den kernel: [158797.106805] cfg80211:   (5250000 KHz - 5330000 KHz @ 40000 KHz), (N/A, 2000 mBm)     Nov  4 00:21:51 den kernel: [158797.106809] cfg80211:   (5490000 KHz - 5710000 KHz @ 40000 KHz), (N/A, 2700 mBm)     Nov  4 00:21:51 den kernel: [158797.106812] cfg80211:   (57240000 KHz - 65880000 KHz @ 2160000 KHz), (N/A, 4000 mBm)     Nov  4 00:21:52 den NetworkManager[855]: <warn> Activation (wlan0/wireless): association took too long.     Nov  4 00:21:52 den kernel: [158798.436347] wlan0: deauthenticating from 00:01:38:fb:84:9d by local choice (reason=3)     Nov  4 00:21:52 den NetworkManager[855]: <info> (wlan0): device state change: config -> need-auth (reason 'none') [50 60 0]     Nov  4 00:21:52 den NetworkManager[855]: <warn> Activation (wlan0/wireless): asking for new secrets     Nov  4 00:21:52 den kernel: [158798.440551] cfg80211: Calling CRDA to update world regulatory domain     Nov  4 00:21:52 den NetworkManager[855]: <info> Activation (wlan0) Stage 1 of 5 (Device Prepare) scheduled...     Nov  4 00:21:52 den kernel: [158798.446961] cfg80211: World regulatory domain updated:     Nov  4 00:21:52 den kernel: [158798.446972] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)     Nov  4 00:21:52 den kernel: [158798.446985] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)     Nov  4 00:21:52 den kernel: [158798.446987] cfg80211:   (2457000 KHz - 2482000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)     Nov  4 00:21:52 den kernel: [158798.446989] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)     Nov  4 00:21:52 den kernel: [158798.446990] cfg80211:   (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)     Nov  4 00:21:52 den kernel: [158798.446992] cfg80211:   (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)     Nov  4 00:21:52 den kernel: [158798.447008] cfg80211: Calling CRDA for country: CZ     Nov  4 00:21:52 den NetworkManager[855]: <info> (wlan0): supplicant interface state: associated -> disconnected     Nov  4 00:21:52 den NetworkManager[855]: <warn> Couldn't disconnect supplicant interface: This interface is not connected.     Nov  4 00:21:52 den kernel: [158798.451172] cfg80211: Regulatory domain changed to country: CZ     Nov  4 00:21:52 den kernel: [158798.451176] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)     Nov  4 00:21:52 den kernel: [158798.451178] cfg80211:   (2400000 KHz - 2483500 KHz @ 40000 KHz), (N/A, 2000 mBm)     Nov  4 00:21:52 den kernel: [158798.451180] cfg80211:   (5150000 KHz - 5250000 KHz @ 40000 KHz), (N/A, 2301 mBm)     Nov  4 00:21:52 den kernel: [158798.451182] cfg80211:   (5250000 KHz - 5350000 KHz @ 40000 KHz), (N/A, 2000 mBm)     Nov  4 00:21:52 den kernel: [158798.451184] cfg80211:   (5470000 KHz - 5725000 KHz @ 40000 KHz), (N/A, 2698 mBm)     Nov  4 00:21:52 den kernel: [158798.451186] cfg80211:   (57240000 KHz - 65880000 KHz @ 2160000 KHz), (N/A, 4000 mBm)     Nov  4 00:21:52 den NetworkManager[855]: <info> Activation (wlan0) Stage 1 of 5 (Device Prepare) started...     Nov  4 00:21:52 den NetworkManager[855]: <info> (wlan0): device state change: need-auth -> prepare (reason 'none') [60 40 0]     Nov  4 00:21:52 den NetworkManager[855]: <info> Activation (wlan0) Stage 2 of 5 (Device Configure) scheduled...     Nov  4 00:21:52 den NetworkManager[855]: <info> Activation (wlan0) Stage 1 of 5 (Device Prepare) complete.     Nov  4 00:21:52 den NetworkManager[855]: <info> Activation (wlan0) Stage 2 of 5 (Device Configure) starting...     Nov  4 00:21:52 den NetworkManager[855]: <info> (wlan0): device state change: prepare -> config (reason 'none') [40 50 0]     Nov  4 00:21:52 den NetworkManager[855]: <info> Activation (wlan0/wireless): connection 'Auto Ikarie' has security, and secrets exist.  No new secrets needed.     Nov  4 00:21:52 den NetworkManager[855]: <info> Config: added 'ssid' value 'Ikarie'     Nov  4 00:21:52 den NetworkManager[855]: <info> Config: added 'scan_ssid' value '1'     Nov  4 00:21:52 den NetworkManager[855]: <info> Config: added 'key_mgmt' value 'WPA-PSK'     Nov  4 00:21:52 den NetworkManager[855]: <info> Config: added 'psk' value '<omitted>'     Nov  4 00:21:52 den NetworkManager[855]: <info> Config: added 'proto' value 'WPA RSN'     Nov  4 00:21:52 den NetworkManager[855]: <info> Activation (wlan0) Stage 2 of 5 (Device Configure) complete.     Nov  4 00:21:52 den NetworkManager[855]: <info> (wlan0): supplicant interface state: disconnected -> scanning     Nov  4 00:21:53 den kernel: [158799.070448] wlan0: authenticate with 00:01:38:fb:84:9d     Nov  4 00:21:53 den kernel: [158799.073906] wlan0: send auth to 00:01:38:fb:84:9d (try 1/3)     Nov  4 00:21:53 den kernel: [158799.075947] wlan0: authenticated     Nov  4 00:21:53 den kernel: [158799.076258] iwlwifi 0000:02:00.0 wlan0: disabling HT/VHT due to WEP/TKIP use     Nov  4 00:21:53 den kernel: [158799.076269] iwlwifi 0000:02:00.0 wlan0: disabling HT as WMM/QoS is not supported by the AP     Nov  4 00:21:53 den kernel: [158799.076276] iwlwifi 0000:02:00.0 wlan0: disabling VHT as WMM/QoS is not supported by the AP     Nov  4 00:21:53 den NetworkManager[855]: <info> (wlan0): supplicant interface state: scanning -> authenticating     Nov  4 00:21:53 den kernel: [158799.077217] wlan0: associate with 00:01:38:fb:84:9d (try 1/3)     Nov  4 00:21:53 den kernel: [158799.080030] wlan0: RX AssocResp from 00:01:38:fb:84:9d (capab=0x431 status=0 aid=3)     Nov  4 00:21:53 den NetworkManager[855]: <info> (wlan0): supplicant interface state: authenticating -> associating     Nov  4 00:21:53 den kernel: [158799.083331] wlan0: associated     Nov  4 00:21:53 den kernel: [158799.083503] cfg80211: Calling CRDA for country: PL     Nov  4 00:21:53 den kernel: [158799.088635] cfg80211: Regulatory domain changed to country: PL     Nov  4 00:21:53 den kernel: [158799.088643] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)     Nov  4 00:21:53 den kernel: [158799.088648] cfg80211:   (2402000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm)     Nov  4 00:21:53 den kernel: [158799.088652] cfg80211:   (5170000 KHz - 5250000 KHz @ 40000 KHz), (N/A, 2000 mBm)     Nov  4 00:21:53 den kernel: [158799.088656] cfg80211:   (5250000 KHz - 5330000 KHz @ 40000 KHz), (N/A, 2000 mBm)     Nov  4 00:21:53 den kernel: [158799.088659] cfg80211:   (5490000 KHz - 5710000 KHz @ 40000 KHz), (N/A, 2700 mBm)     Nov  4 00:21:53 den kernel: [158799.088663] cfg80211:   (57240000 KHz - 65880000 KHz @ 2160000 KHz), (N/A, 4000 mBm)     Nov  4 00:21:53 den NetworkManager[855]: <info> (wlan0): supplicant interface state: associating -> associated


title: Zsh - alias -s with parameter

text: In zsh, I can specify default program to open which file extension like `alias -s {mkv,mpg}='mplayer'` . I runs fine but what I really want is to run `mplayer <filename> &` so it won't produce technical stuffs and 'stealing' my current shell session. **How can I make this happen ?** Thanks for reading :)


title: How to use gtalk on fedora linux?

text: I use gmail account for chat, but i want gtalk standalone application just like in windows. can i install standalone gtalk client on linux ?


title: In linux, would it be possible to run a script every day 3 minutes later than the previous day?

text: My first solution to this was to execute `date +%Y%m%d%H%M` and put that format of numbers into a file, and run the script every minute from cron. Then if the date from the file matches the date command, the script would do something. Then it would update that file for the next day plus 3 minutes. Is there a better way to accomplish this? The result would be that the script would run the first day at (for example) 4:00am then the second day it would run at 4:03am and the third day it would run at 4:06am. It would execute every minute, but only run (if block) at the correct time. Is the question and my solution clear?


title: bind mount /var with fstab

text: I'm messing around with having both `/home` and `/var` on a seperate partition which will be mounted in `/myhdd`. Next, I use `mount --bind` to mount `/var` on `/myhdd/var` and `/home` on `/myhdd/home`. With this configuration I am able to successfully install Arch Linux but as soon as I boot to the installed system `/var` and `/home` are not mount although `/myhdd` is. Due to this issue I can't get pacman and more important stuff working. I do get working system if I manually mount all directories, so it looks like fstab problem, so here it is:               # /dev/sda1     UUID=f192b003-abf9-4e1a-87ee-d187d64423ce   /           ext4        rw,relatime,data=ordered    0 1          # /dev/sda2     UUID=b4c5571f-ddb7-440e-b591-759e888b268d   /myhdd      ext4          rw,relatime,data=ordered  0 2          # /mnt/myhdd/home     /mnt/myhdd/home         /home       none        bind    0 0          # /mnt/myhdd/var     /mnt/myhdd/var          /var        none        bind    0 0      Any ideas why fstab doesn't mount my `/var` and `/home` directories?


title: Bash script that automatically kills processes when CPU/memory usage gets too high

text: I have created a script that kills processes if CPU and/or memory usage hits 80%. It creates a list of killed processes when this happens. What can I do to improve it?               while [ 1 ];     do      echo     echo checking for run-away process ...          CPU_USAGE=$(uptime | cut -d"," -f4 | cut -d":" -f2 | cut -d" " -f2 | sed -e "s/\.//g")     CPU_USAGE_THRESHOLD=800     PROCESS=$(ps aux r)     TOPPROCESS=$(ps -eo pid -eo pcpu -eo command | sort -k 2 -r | grep -v PID | head -n 1)          if [ $CPU_USAGE -gt $CPU_USAGE_THRESHOLD] ; then       kill -9 $(ps -eo pid | sort -k 1 -r | grep -v PID | head -n 1) #original       kill -9 $(ps -eo pcpu | sort -k 1 -r | grep -v %CPU | head -n 1)       kill -9 $TOPPROCESS       echo system overloading!       echo Top-most process killed $TOPPROCESS           echo CPU USAGE is at $CPU_LOAD          else         fi         exit 0         sleep 1;         done


title: Developing software on linux

text: What tools or IDEs do I need to start developing software on Linux in C++? Can I work using C#? What are necessary skills in order to know to develop software on Linux? I mean what is required in the firms mostly to work as Software engineer on Linux?


title: Emacs: error when the function is called in a hook

text: I defined a function in my .emacs file, and I want to call it when a major mode is loaded. My function is interactive. If I invoke my function by M-x, everything seems alright. But if I invoke my function from the mode hook, I got below error: > File mode specification error: (void-variable set-color-theme) But actually, the function has been invoked correctly. So, I do not understand why it reports the variable is void.


title: pwd not being set correctly in zsh prompt

text: If I type this in my PROMPT in my `.zshrc` file:               PROMPT="`pwd` >"      I expect that it will print the current working directory. However, `pwd` always prints `/Users/kevin`. Why doesn't it show my current working directory? (I know that there is a function called `%~` that will set it for you. I'm curious why this doesn't work though, this is a simpler case of something more advanced that I'm trying to do).


title: sed extract with multiple options in end pattern

text: I get some output from a command, I have to extract text between two patterns from the output. Start pattern is fixed. But the end format can be one of two (lets say word2-1 and word2-2). Is there any way I can specify that in a single `sed` command? I tried               sed -n "/Word1/,/(word2-1|word2-2)/p"     sed -n "/Word1/,/word2-1|word2-2/p"     sed -n "/Word1/,/word2-1\|word2-2/p"     sed -n "/Word1/,/[word2-1|word2-2]/p"


title: Why aren't the Fedora GPG keys signed?

text: Fedora uses GPG-keys for signing RPM packages and ISO checksum files. They list the keys in use (including fingerprints) on a web page. The web page is delivered via https. For example the checksum file for `Fedora-16-i386-DVD.iso` is signed with key `A82BA4B7`. Checking who signed the public key results in a disappointing listing:               Type bits/keyID    cr. time   exp time   key expir          pub  4096R/A82BA4B7 2011-07-25                      uid Fedora (16)      sig  sig3  A82BA4B7 2011-07-25 __________ __________ [selfsig]      It seems that nobody from the Fedora community has signed these important keys! Why? ;) (Why doesn't Fedora use a web of trust?) Or am I missing something? Compare this e.g. with Debian - their current automatic ftp signing key `473041FA` is signed by 7 developers. **Edit:** Why does this stuff matter? Having such an important key signed by real people (currently it is not signed by anyone!) established a certain level of confidence that it is the real key and not one created by an attacker just uploaded 5 minutes ago to the web- server. This level of confidence or trust requires that you can trace signing relations in a web of trust (to people you are already trusting). And the probability you are being able to do so is increasing when different people sign it (currently the probability is zero). You can compare this trust thing with surfing to `https://mybank.example.net` and getting a certification verification warning - would you then still enter your transaction details or would you think 'wait a minute!', stop and investigate the issue?


title: LPIC-1 for non-professional experienced user

text: I am interested in trying out the LPIC-1 certification however I am slightly worried that I may not have the needed professional experience to pass. I am still studying hard and running a lab with a server and a couple of clients, watching CBT nuggets reading man pages and waiting for LPIC-1: Linux Professional Institute Certification Study Guide: (Exams 101 and 102) by Roderick W. Smith to come in the mail. I would appreciate some words of wisdom from the gurus and novices on study methods and experiences that may help.


title: How to power-on embedded flash memory after eject

text: On a _Wheezy-ed_ Qnap TS-269L NAS I sent the embedded 512M DOM flash memory (`/dev/sdc`) to sleep using `eject /dev/sdc` after creating a new partition table on it. Previously it contained `/boot/efi`, meaning that now the kernel wouldn't be able to assemble and boot raid volumes on next reboot. _My intention was to get rid of fat32 partition on`/dev/sdc1` and replace it with ext4, because fat32 doesn't shrink to less than 512MB._ So, how to power-on a UDMII Plus-C Flash Disk Module in Linux? It doesn't come back up when invoking dd as some HDD's do in sleep mode.               $hdparm -C /dev/sdc          /dev/sdc:     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     drive state is:  standby      Sub-note. It's not the end of the world though, because from a rescue mode it is possible to               $dd if=sdc.backup of=/dev/sdc       but this would require reboot.


title: New Mail Arrived notification Kmail + Jovie Speech customizing

text: When a new message arrives, Kmail has ability to speak! Which is great but not enough: I don't want to listen to a standard text but have a proper functionality: When a new message arrives, Jovie should say > New Message arrived from Linus Torvalds (if Linus Torvalds is in the Address Book, falling back to email@domain without the TLD `.com`) Or: > Email about `%MSG_SUBJECT` Is that possible?


title: What is the best distro for Toshiba Satellite L10-205(old hardware) used mostly for development?

text: I'm new to the Linux world, but I would love to switch from windows. I'm developer, mostly in web server based technologies, but sometimes I love to thinker with C++ and other languages. As I'm student I can't afford powerful hardware so I have: http://i.stack.imgur.com/msXaK.jpg (Can't post images) It's Toshiba Satellite L10-205 (Laptop) P.S. Don't blame me for my old hardware. Whats the best distro of Linux for my pc to run fast and for my needs?


title: Series of question on ebuild scripting. Given original passage from devrel & questions

text: Scope Whenever an ebuild is sourced, the functions and variables within it are loaded into memory by the script interpreter. However, only variables and instructions that are not part of a function are interpreted - functions such as src_compile() are only executed by Portage when the ebuild has reached the compile stage. The code within these functions are considered in "local scope" while everything outside of the functions is in the "global scope" meaning they are executed every time the ebuild is sourced. An external application (such as grep, sed or awk) should never be called in global scope for performance reasons, and alternatives such as using built-in bash replacement should be used instead. Useful alternatives can be found in the Advanced Bash Scripting Guide. Additionally, any external application that may be called in global scope can not be guaranteed to exist on the system. If the command is placed in local scope (for example, in the `pkg_setup()` function), we can guarantee its presence by placing it in the ebuild's `${DEPEND}`.   1. What it means to ebuild to be sourced? Can it be the source command (btw I don't understand it, it was from and book and it doesn't have "man source".   2. Okay, variables - how they can be interpreted? I somehow understand how functions can. Functions probably are of some type of programming. It is compiled one or interpreted one. And if ebuild language is scripting (may be it is bash) - like pearl or python that is widely used in Gentoo Portage, how ebuild can contain compilation functions (I remember some from pascal from school).   3. And thus what is `src_compile()` function - it was not mentioned in revdel.   4. "compile stage" - what is this terminology is telling? Which are those ebuild stages, or stages of ebuild?   5. The same is about local/global scope. I completely don't understand, together with some internal applications - couldn't catch the thought also the opposite (awk..) are mentioned.   6. `pkg_setup()` function, `$DEPEND` - are those only example or imply implicit meanings?


title: confuse about User:Group what is the best for /var/www, and Crontab user?

text: I'm new on linux server. I have 2 question that I'm confuse about this. 1 1. user:group now I chown my /var/www/html like this. my `nginx.conf` is set `server{ user www-data }` and in terminal I set ` chown -R root:www-data /var/www/html find /var/www/html -type d -exec chmod 775 {} + find /var/www/html -type f -exec chmod 664 {} + find /var/www/html/uploads/images -type d -exec chmod 775 {} + ` Is I'm do the right thing ? or it need to set to www-data:www-data ? 2 2. about crontab it a lot of TUT but it is not clear about user who ran crontab. The question is If I login with `adam` user and my server is own by `root:www-data` or `www- data:www-data` how can I give the crontab to that user not `adam` user ? because it need perm to write the files like backup.


title: Minimal gui for Eclipse Indigo on Ubuntu

text: I'd like to install Eclipse I could use via VNC on a minimal Ubuntu 10.04 installation, but without the unnecessary bells and whistles that come with gnome-desktop. All I really need to do in an X-environment is access Eclipse via VNC. The rest will be done in terminal. How can it be best accomplished? Is Gnome the only gui option for Eclipse? Short explaination (as maybe there are other, simpler options, than what I'm asking about): I've got a single board computer with minimal Ubuntu 10.04 installed. The SBC is connected to an Arduino based embedded system collecting data. After the data acquisition I process them with the SBC. I'd like to be able to do programming directly on the SBC to speed up and simplify development.


title: How to install ubuntu ultimate edition using Wubi?

text: I had some trouble installing Ultimate Edition 2.9 on my friend's computer using Wubi. Wubi just doesn't accept installation and gives only 2 options - 'Demo & Install' and 'Learn more'. Tried searching the internet for a solution but couldn't find anything. Is it Wubi's fault or is it not designed to give support for UE? If latter, what is the alternative to it (without actually giving UE a seperate partition).


Why is there no critical section in the pipe? For example, as in shared memory. In pipe have general data, which in common use in joint processes, but in the shared memory also have general data, which in common use in joint processes.


title: Problem with samba shares Ubuntu server 12.04

text: I'm having a problem with setting up samba share permissions on Ubuntu Server LTS. I've got two shares set up in the `smb.conf` file. The entries look like this:               [share]     comment = Ubuntu File Server Share     path = "insert real path name here"     browsable = yes     guest ok = no     read only = no     create mask = 0700     group = group1          [media]     comment = Ubuntu File Server Share     path = "insert real path name here"     hide unreadable = yes     browsable = yes     guest ok = no     read only = no     group = group2     create mask = 0700      In the file system I am the owner of all directories related to both of these shares. The `[media]` share is group-owned by `group2`, and the `[share]` is group-owned by `group1`. For both directories I have file permissions set at 771, where owner and group both have read, write, and execute, but guests have only execute. I have 3 users in the system: myself, my wife, and my mother. I belong to `group1` and `group2`, as does my wife. My mother belongs only to `group2`. When I log into the server from my Windows desktop, my credentials work as expected. But if I use my wife's or my mother's, nothing works. They can log into the server, but when they click on one of the shared folders another log in screen is displayed asking for another username / password. This always fails and they are not allowed access to the folders. I would like for my wife and I to have access to both of these folders while restricting access to other users. What am I missing here? I've tried fixing this for quite some time and I can't seem to get it figured out.


title: Output of 'watch' command as a list

text: I want to do some simple computation of the number of lines per minute added to a log file. I want also to store the count for each second. What I need is the output of the following command as a list which will be updated every second:               watch -n1 'wc -l my.log'      How to output the 'update' of the 'watch' command as a list?


title: How can I disable TCP/IP for an Ethernet adapter?

text: I have CentOS 6.3 running in a (virtual) machine with two Ethernet adapters. I have eth0 connected to a TCP/IP LAN and eth1 connected to a DSL modem. The system is intended as a dedicated router/firewall, and has iptables set up to do SNAT, DNAT, and the desired filtering. This was working great but I changed DSL modems and unfortunately the new (faster) one is idiotproofed and so automatically does NAT and will not allow me to pass my public IP along to eth1. I can't tolerate double NAT so I did some research and read that this modem can be 'tricked' into giving my computer a public IP by doing the PPPoE on the computer. I therefore set up pppd to use eth1, creating the ppp0 connection which I then substitute for eth1 in my custom iptables config script. This seems to work to a degree but I had to open up the firewall to get it to work, and it's flaky. Partly to help in troubleshooting, I want to totally rule out the possibility of any TCP/IP traffic being directly routed to eth1 where my 'friendly' modem will happily NAT it. To the best of my knowledge, PPPoE sits below, not above IP - on the physical interface it deals directly in Ethernet frames. Therefore I should not even have to have IP networking configured on eth1 at all in order for pppd to work, and IP networking running on eth1 therefore is just complicating matters needlessly. Here's where I discover, silly me, I don't know how to disable the TCP/IP stack on Linux! I know on a Windows box you can just uncheck the TCP/IP protocol in the adapter properties, but here I am running a text-only CentOS and I have no idea how to do it. Apparently it's not a very common desire, because I've been searching the Internet to no avail. It seems like a hard-wired assumption that an Ethernet adapter _is_ a TCP/IP connection. Well, usually... Thanks for any help! Kevin


title: Check a range of IP addresses to see if a host is active

text: I need to write a bash shell script that will check a range of IP addresses to see if a host is “alive” at that address.I also need to list the IP numbers of those that are “alive”, and provide a summary showing the number of “alive” and “not alive” IP addresses. The range of addresses will all be in a “Class C” network. I'm having problems figuring out how to pass through each arg and get it pinging each individual address within the range. Below is a sample run of the script I intend to create.               $ programName 192.168.42 18 22           Checking: 192.168.42.18 19 20 21 22           Live hosts:       192.168.42.21       192.168.42.22           There were:       2 alive hosts       3 not alive hosts       found through the use of 'ping'.


title: cinnamon-screensaver and lock settings not visible in settings panel

text: A rather peculiar problem: After updating a fresh installation of Linux Mint Debian Edition, I lost the ability to change the screensaver and lock settings, here's a screenshot of the relevant settings page, completely missing the actual setting options: ![Screensaver and Lock Settings](http://i.stack.imgur.com/OBPqC.png) According to the release notes of the Update Pack 7, the `cinnamon- screensaver` package replaces and removes `gnome-screensaver`, which sounds like the root of the problem. The problem persists even after removing and re- installing `cinnamon-screensaver`, though. Any suggestions?


title: can't connect to samba drive in centos 6.3

text: #smbclient //ballzdeep/torrents     Server not using user level security and no password supplied     tree connect failed: NT_STATUS_BAD_NETWORK_NAME      Does this mean i need to require username and password for my drive? Windows,Ubuntu connect to it with their GUI's but i can't get CentOS 6.3 to also.


title: If I open the same file twice in Okular, switch to the existing window

text: I have always been confused why the file manager in Linux cannot stop applications from opening a single file twice at the same time? Specifically, I want to stop the PDF file reader Okular from opening the file `A.pdf` again when I have already opened it. I need to get an warning or just show me the opened copy of the file `A.pdf`. More generally, I would like this to happen with any application, not just Okular. I want to make the document management behavior in Linux the same as in Windows.


title: Script is stuck saying 1 response with 2 available: Math related

text: I have a script that tells the user the square footage of 2 rooms based on user input. I think I have that part done right. The problem I have is that I need to have the script say which room is bigger and no matter how I try to rebuild the end of the script I get both responses, 1 of the responses which is wrong unless the user is lucky, or I get no response. How do I change this part of the script to get the correct output? I'll have the rest of the script as a reply to this for those that want to skip over the working part along with the question I've been given. Also this is a homework assignment from my Intro to Unix class that I've spent way to much time on trying to figure out so the correction has to be somewhat beginner-ish.                   if [ $R1z -ge $R2z]         then         echo Room 1 is bigger         else         echo Room 2 is bigger         fi      All of the code:                   echo Enter the length of room 1         read R1x         echo Enter the width of room 1         read R1y         echo Enter the length of room 1         read R2x         echo Enter the width of room 2         read R2y         expr $R1x \* $R1y         read R1z         expr $R2x \* $R2y         read R2z              if [ $R1z -ge $R2z]         then         echo Room 1 is bigger         else         echo Room 2 is bigger         fi


title: Are there any pitfalls to overriding ls?

text: Is there anything to watch out for if you wanted to override `ls`? Is there a more reliable way of getting pagination out of `ls`? For example:               function ls() { command ls -hp $@ | more; }


title: add members of wheel group, sudo access

text: On Fedora15, following this wiki, I added a user to wheel group, which is already in the sudoer config file. but still I get not-a-sudoer error prompt. Should I specifically name every member of a group in sudoer file to be able to sudo with that user?


title: Can I execute commands from a midnight commander ssh connection?

text: When I connect to a VPS via a Shell link in MC, the location of the command prompt remains at my local box. I would like to be able to execute commands (e.g. mkdir, tar/untar) directly from the location of the left or right panel. I could ssh into the VPS separately, but this is not as handy as how I can use SFTP in Total Commander under Windows: e.g. type a command on my local machine in the left panel, switch to the right panel (remote location) using tab and directly type a command that is executed at the remote location. Is this possible with Midnight Commander?


title: Can't get lm-sensors to ouput correctly or load ATI Radeon temp and fan

text: I am new to Linux and having minor issues. I followed this guide initially, but did not receive the proper output, and it did not show my ATI Radeon HD 5000 temperature or fan speed. Then I used this guide, and the same problems were exhibited. I had no issues installing it and no errors. I think it's not reading `i2c` for some reason. The proprietary driver is installed and functioning correctly according to `fglrxinfo`. I can use `aticonfig` commands and view both the temperature and fan. Thoughts? Any ideas on how to get it working under `sensors`? When I run `sudo sensors-detect` this is my output               # sensors-detect revision 5984 (2011-07-10 21:22:53 +0200)     # System: LENOVO IdeaPad Y560 (laptop)     # Board: Lenovo KL3          This program will help you determine which kernel modules you need     to load to use lm_sensors most effectively. It is generally safe     and recommended to accept the default answers to all questions,     unless you know what you're doing.          Some south bridges, CPUs or memory controllers contain embedded sensors.     Do you want to scan for them? This is totally safe. (YES/no): y     Silicon Integrated Systems SIS5595...                       No     VIA VT82C686 Integrated Sensors...                          No     VIA VT8231 Integrated Sensors...                            No     AMD K8 thermal sensors...                                   No     AMD Family 10h thermal sensors...                           No     AMD Family 11h thermal sensors...                           No     AMD Family 12h and 14h thermal sensors...                   No     AMD Family 15h thermal sensors...                           No     AMD Family 15h power sensors...                             No     Intel digital thermal sensor...                             Success!         (driver `coretemp')     Intel AMB FB-DIMM thermal sensor...                         No     VIA C7 thermal sensor...                                    No     VIA Nano thermal sensor...                                  No          Some Super I/O chips contain embedded sensors. We have to write to     standard I/O ports to probe them. This is usually safe.     Do you want to scan for Super I/O sensors? (YES/no): y     Probing for Super-I/O at 0x2e/0x2f     Trying family `National Semiconductor/ITE'...               Yes     Found unknown chip with ID 0x8502     Probing for Super-I/O at 0x4e/0x4f     Trying family `National Semiconductor/ITE'...               No     Trying family `SMSC'...                                     No     Trying family `VIA/Winbond/Nuvoton/Fintek'...               No     Trying family `ITE'...                                      No          Some hardware monitoring chips are accessible through the ISA I/O ports.     We have to write to arbitrary I/O ports to probe them. This is usually     safe though. Yes, you do have ISA I/O ports even if you do not have any     ISA slots! Do you want to scan the ISA I/O ports? (YES/no): y     Probing for `National Semiconductor LM78' at 0x290...       No     Probing for `National Semiconductor LM79' at 0x290...       No     Probing for `Winbond W83781D' at 0x290...                   No     Probing for `Winbond W83782D' at 0x290...                   No          Lastly, we can probe the I2C/SMBus adapters for connected hardware     monitoring devices. This is the most risky part, and while it works     reasonably well on most systems, it has been reported to cause trouble     on some systems.     Do you want to probe the I2C/SMBus adapters now? (YES/no): y     Using driver `i2c-i801' for device 0000:00:1f.3: Intel 3400/5 Series (PCH)          Now follows a summary of the probes I have just done.     Just press ENTER to continue:           Driver `coretemp':       * Chip `Intel digital thermal sensor' (confidence: 9)          To load everything that is needed, add this to /etc/modules:     #----cut here----     # Chip drivers     coretemp     #----cut here----     If you have some drivers built into your kernel, the list above will     contain too many modules. Skip the appropriate ones!          Do you want to add these lines automatically to /etc/modules? (yes/NO) My output for `sensors` is:               acpitz-virtual-0     Adapter: Virtual device     temp1:        +58.0°C  (crit = +100.0°C)          coretemp-isa-0000     Adapter: ISA adapter     Core 0:       +56.0°C  (high = +84.0°C, crit = +100.0°C)     Core 1:       +57.0°C  (high = +84.0°C, crit = +100.0°C)     Core 2:       +58.0°C  (high = +84.0°C, crit = +100.0°C)     Core 3:       +57.0°C  (high = +84.0°C, crit = +100.0°C)      and my `/etc/modules` is:               # /etc/modules: kernel modules to load at boot time.     #     # This file contains the names of kernel modules that should be loaded     # at boot time, one per line. Lines beginning with "#" are ignored.          lp     rtc          # Generated by sensors-detect on Fri Nov 30 23:24:31 2012     # Chip drivers     coretemp


title: Downsampling a video with avconv / ffmpeg

text: I know really little about encoding and using avconv / ffmpeg. I am trying to downsample a video as follows:               avconv -i blah_in.avi -s 640x360 -pass 1 blah.avi     avconv -i blah_in.avi -s 640x360 -pass 2 blah.avi      I am aware that this is very simplistic, yet I can't figure out what the problem is. Here is the error message from pass 1:               avconv version 0.8.3-4:0.8.3-0ubuntu0.12.04.1, Copyright (c) 2000-2012 the Libav developers       built on Jun 12 2012 16:37:58 with gcc 4.6.3     [avi @ 0x9fdd240] non-interleaved AVI     Input #0, avi, from 'blah_in.avi':       Metadata:         encoder         : MEncoder svn r34540 (Ubuntu), built with gcc-4.6       Duration: 01:21:59.24, start: 0.000000, bitrate: 8996 kb/s         Stream #0.0: Video: mpeg4 (Advanced Simple Profile), yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 23.98 tbr, 23.98 tbn, 23.98 tbc         Stream #0.1: Audio: mp3, 44100 Hz, stereo, s16, 128 kb/s     File 'blah.avi' already exists. Overwrite ? [y/N] y     [buffer @ 0x9fe1e00] w:1920 h:1080 pixfmt:yuv420p     [scale @ 0x9fdcfa0] w:1920 h:1080 fmt:yuv420p -> w:640 h:360 fmt:yuv420p flags:0x4     Incompatible sample format 's16' for codec 'ac3', auto-selecting format 'flt'     [ac3 @ 0x9fdc740] invalid bit rate     Output #0, avi, to 'blah.avi':       Metadata:         encoder         : MEncoder svn r34540 (Ubuntu), built with gcc-4.6         Stream #0.0: Video: mpeg4, yuv420p, 640x360 [PAR 1:1 DAR 16:9], q=2-31, pass 1, 200 kb/s, 90k tbn, 23.98 tbc         Stream #0.1: Audio: ac3, 44100 Hz, stereo, flt, 200 kb/s     Stream mapping:       Stream #0:0 -> #0:0 (mpeg4 -> mpeg4)       Stream #0:1 -> #0:1 (mp3 -> ac3)     Error while opening encoder for output stream #0:1 - maybe incorrect parameters such as bit_rate, rate, width or height      I have tried a number of things, but either they end up with a similar error message, or the quality is extremely poor; not so much due to low resolution, but full of compression artifacts. Now, what I would like to achieve is the same resolution / encoding as the following avi file, which plays fine on my kids video device:               Stream #0.0: Video: mpeg4 (Advanced Simple Profile), yuv420p, 624x352 [PAR 1:1 DAR 39:22], 25 fps, 25 tbr, 25 tbn, 25 tbc     Stream #0.1: Audio: mp3, 48000 Hz, stereo, s16, 128 kb/s


title: How to sed only that lines that contains given string?

text: INPUT:               Select ASDF 325 sdfg sdflk lk     Select TRG 46sdg rasdftz fsgs 45     Select ASDF 6ffg sdfg 4456 sdrg      OUTPUT:               Select ASDF 325 XXXX sdflk lk     Select TRG 46sdg rasdftz fsgs 45     Select ASDF 6ffg XXXX 4456 sdrg      So in short I need to "sed" "sdfg" to "XXXX".      BUT: only in lines that contains the "Select ASDF" string.. How can I do this? (sed, awk, etc. :\ )


title: Reusing pipe data for different commands

text: I would like to use the same pipe for different applications, like in:               cat my_file | {       cmd1       cmd2       cmd3     }      Cmd1 should consume part of the input. Cmd2 should consume another part and so on. However, each cmd eats more of the input then it read really needs due buffering. For example:               yes | nl | {        head -n 10 > /dev/null       cat      } | head -n 10      Outputs from line 912 instead of line 11. Tee is not a good option, because each command is supposed to consume part of the stdin. Is there a simple way to get this working?


title: Can I create a symlink that will ignore subdirectories?

text: I'm trying to get dropbox symlinked to the relevant folders in `/home`. I'd like to symlink them like this: `~/Dropbox/Pictures --> ~/Pictures` `~/Dropbox/Camera Uploads --> ~/Pictures/Camera Uploads` If I do that it will work but I'll have two copies of my pictures and videos stored on Dropbox. I don't want to waste space. Any ideas on how to solve this problem?


title: Gnome clock on UTC, not local

text: My OS is Gentoo. My Hardware Clock is set to UTC. The `date` command returns the correct time and timezone (EDT). However, my GNOME clock is set to UTC. I have 2 clocks, one at Internet Time, and one set (the format string) to "24-hour". I have NTP and NTPD installed and running. My timezone/location in the menu that shows up when I click is correct. Even the analog clock right next to it is correct. However, the time that shows up whenever I send emails, whenever I access the internet, is off by 4 hours. Any advice would be welcome.


title: How to download all html files from a URL's directory with wget?

text: I'd like to use `wget` to download a tutorial in a website, but this tutorial is in a specific directory. Suppose the URL is the tutorial main page `http://www.abc.com/aaa/bbb/ccc/index.html`. But the as it contain "continuations" there are other pages I'd like to be interconected that are in directories such as:               http://www.abc.com/aaa/bbb/ccc/ddd/index.html          http://www.abc.com/aaa/bbb/ccc/eee/index.html          http://www.abc.com/aaa/bbb/ccc/fff/ggg/index.html      So, basically I need to download recursively the directories after ccc, but not before, and then convert the links to be used offline. There is any argument to be used with `wget` that would perform such task?


title: AWK: wrap lines to 72 characters

text: $ awk 'length > 72' {HOW TO PRINT THE LINEs IN PCS?} msg      ie I want it to add `\n` after 72 chars and continue, so initially you may need to remove all single `\n`s and the add them. It may be easier be easier with other tool but let's give a try to awk. **[Update]** _Williamson provided the right answer but some help needed to read it. I break the problem into parts with simpler examples, below._   1. Why does the code below print `\t` in both cases, `gsub` should substitute things? x is a dummy-file, some odd 0 at the end.   2. Attacking the line `line = $0 \n more = getline \n gsub("\t"," ")` in Williamson's reply, `line` apparently gets whole stdout while `more` gets popped value of `$0`, right? **Code to part 1**               $ gawk '{ hallo="tjena\t tjena2"; gsub("\t"," "); }; END {print hallo; gsub("\t", ""); hallo=hallo gsub("\t",""); print hallo }' x     tjena  tjena2     tjena  tjena20


title: PF and types of NAT(Network Address Translation)

text: As you know, at least 3 types of `NAT` are used. Of course i need to two types of them.`DNAT` and `SNAT`. `DNAT` : hiding server behind `NAT`, `SNAT` : hiding your client behind `NAT`. **Question:** I read a quick tutorial of `PF filrewall`, but didn't   distinguish `DNAT` and `SNAT` in `PF Firewall`. How can i define ruleset as `DNAT` and `SNAT`?


title: Can I alter my Fedora LVM LV to install a new distro as a dual-boot?

text: My question is _almost_ a duplicate of this question, but not quite because that one is about `ext3` and I am already using LVM. I have an older HP Pavilion laptop running Fedora 11. I chose Fedora because it was semi- compatible with the hardware and it ran VMware well... but since I no longer need VMware I am looking to test out other distros and find one that's more compatible. (Specifically looking for software suspend support and maybe something more lightweight) I'd like to try out a few new distros without hosing the existing (working) Fedora setup. Since I am using LVM, is it possible to reduce the size of my LVM LV and then install new distros into the volgroup, without the new distros destroying the Fedora setup? Here's how my LVM is set up now:               [root@token ~]# /sbin/lvm lvdisplay       --- Logical volume ---       LV Name                /dev/vg_token/lv_root       VG Name                vg_token       LV UUID                JPCDlb-HHW7-fMDy-h8p2-Itbp-hwfK-3CwN97       LV Write Access        read/write       LV Status              available       # open                 1       LV Size                91.96 GB       Current LE             23542       Segments               1       Allocation             inherit       Read ahead sectors     auto       - currently set to     256       Block device           253:0            --- Logical volume ---       LV Name                /dev/vg_token/lv_swap       VG Name                vg_token       LV UUID                3JMF4u-3jXx-Xy6H-saNt-Aljh-6Idw-73O4IS       LV Write Access        read/write       LV Status              available       # open                 1       LV Size                1.00 GB       Current LE             256       Segments               1       Allocation             inherit       Read ahead sectors     auto       - currently set to     256       Block device           253:1          [root@token ~]# df -h /     Filesystem            Size  Used Avail Use% Mounted on     /dev/mapper/vg_token-lv_root                            91G   68G   24G  75% /      Are there distros which will allow me to install into a new logical volume without destroying the existing one? If so, which ones, and how would I go about making room for the new LV?


title: TightVNC not running gnome-session

text: I have a Debian Lenny box with Gnome desktop. I've installed Tightvnc server on it and would like to see a Gnome session when connecting from another computer using VNC viewer. But for some reason it opens the "X Desktop" with only a terminal window visible. What could be wrong? I used these instructions for editing the configuration (~/.vnc/xstartup). So looks like it's not recognizing _gnome-session &_ and is falling back to generic session instead. Why?


title: how to form a sed expression containing escaped characters

text: Given a sed expression (and GNU sed 4.2.2 on ArchLinux)               /match/i\tline1\n\tline2      which should insert two tab-indented lines above the match, I find that the escaping of the first character (in the example, `\t`) is ignored but all other escaped characters are treated correctly. Testing this like this:               echo match | sed -e '/match/i\tline1\n\tline2'      results in               tline1         line2     match      It doesn't matter what the initial escaped character is (e.g. tab or newline) the result is the same. What is the correct way to consrtuct the expression so that the first character is treated correctly?


title: Calculate md5sum of a CD/DVD

text: I have an ISO file, which I burned to a CD. Now how can I check if the CD is correctly created? I would like a command that calculate the hash sum that I can use to check with the hash sum I calculate on the ISO file. Ideally the command should:   * Work regardless of the ISO file: that is, I don't want to keep a list of hash sum for each file in the disc, or remember the number of blocks whatever   * Be relatively short: a one-line command is great, a chain of commands which is two line long is OK, a script that span one page is not   * Be fairly efficient: for example, `dd` the disc back to a file then run `md5sum` on the file is unacceptable If there is no answer that cannot satisfy all I will appreciate the nearest match too. Even better if you can tell me why it is not so straight-forward.


title: Wireless multi function scanner / printer

text: Can someone recommend me a wireless multi function scanner / printer that will work with Ubuntu? If something like this exists at all..


title: renaming a fat16 volume

text: What's the easiest way to rename (change the volume label of) a fat16 volume (e.g. on a USB drive) from linux? It seems like `mlabel` from the `mtools` package is meant to do this, but the documentation is not geared to rapid assimilation.


title: Configure routes to access WAN and LAN through diffrent interfaces

text: In my organization. Some useful technical websites are blocked by the firewall. In my machine i got three interfaces **eth0, wlan0, wwlan0**               eth0      Link encap:Ethernet  HWaddr 00:9c:02:93:b1:b4                 inet addr:10.0.69.63  Bcast:10.0.71.255  Mask:255.255.252.0             ...               RX bytes:551526655 (551.5 MB)  TX bytes:71851444 (71.8 MB)               Interrupt:20 Memory:d4700000-d4720000           wlan0     Link encap:Ethernet  HWaddr ac:81:12:d2:57:d4                 inet addr:192.168.1.13  Bcast:192.168.1.255 Mask:255.255.255.0             ...          wwan0     Link encap:Ethernet  HWaddr 32:ab:e4:44:7c:3d                 inet addr:105.152.231.158  Bcast:105.152.231.159  Mask:255.255.255.252             ...               RX bytes:288643752 (288.6 MB)  TX bytes:28286606 (28.2 MB)      When I disable eth0 i can access the WAN through wwan0 but of course i loose access to the organization LAN. How can i configure my routing table to : **1.** Access all LAN destinations (10. * . * . *) through **eth0**   **2.** Access all WAN destinations through **wwlan0**   **3.** Access all WAN destinations through **eth0** when **wwlan0** is disabled   **4.** disable **1.** , **2.** and **3.** rules whenever i activate **wlan0**


title: Is it possible to run KVM over a qemu emulated powerpc architecture

text: I understand that qemu uses binary translation to emulate machines, so irrespective of the underlying architecture, it can provide emulation.   And, KVM uses Hardware Virtualization technique to make this process faster. Thus, KVM requires VT support from underlying architectures (which x86 processor provides). I have emulated powerpc architecture with qemu over x86 architecture. My question is whether it is possible to run KVM over this powerpc architecture.


title: Diffing two big text files

text: I have two big files (6GB each). They are unsorted, with linefeeds (`\n`) as separators. How can I diff them? It should take under 24h.


title: Why does the local::lib shell code use eval and $()

text: using local::lib requires you to add a line to your `~/.shellrc`               eval $(perl -I$HOME/perl5/lib/perl5 -Mlocal::lib)      I don't understand what the point of using `eval`, and encasing the statement in `$()` is. I also notices that `csh` doesn't require you to use those. So I'm wondering what the difference is, and whether or not I should use this for generic bourne shell, or `zsh`.


title: Is there a utility like dspcat on Linux?

text: I use the following `dspcat` command on _AIX_ and can dump message catalogs created with the `gencat` command:               dspcat –g  /u/is/bin/I18N/l/lib/libca/libcalifornia.117.cat >> /tmp/message.smc      I have spent a good solid hour looking for hints on how to dump one of these catalogs on Linux but this command does not seem to be available. Any help would be appreciated.


title: How do I test to see if an application exists in $PATH?

text: I'm trying to write all of my `sh` startup/env scripts to work with as much _DRY_ and as much: "works on every *nix I clone it to", as possible. This means making sure that if I try to run code that's not there, that the code fails gracefully. To that end I need to be able to test if programs exist. I know how to test if a file exists, but I'm not sure how to test to see if an application is executable within the path. I'd rather use the $PATH, as some of these need to work on arch, ubuntu, and centos. Some might be installed in my homedir, on systems where I don't have root, others might not be installed, and others yet my be installed in system paths.


title: Swap to RAM, or not

text: Having a 32-bit system with 4G RAM and 7G swap. Linux 3.5.0-49-generic i686. From time to time the memory bank is filled up and everything lags down. In 99% of the cases it is Chrome using vast amounts of RAM and swap. Some times it helps to close down some windows, but often not. As an example for last time:               Mem: 4G in use     Swp: 3G in use      Chrome: 4 windows, 17 tabs. Closing Chrome and after a while I sit with               Mem: 450M in use     Swp: 220M in use      This is a rather typical scenario. The pages are "normal" web-pages like Stack Exchange sites, some articles and perhaps a news-site or two. * * * One thing I notice is that it takes some time for the system to normalize after I shut Chrome down. This is long after last process has died according to `htop` / `top`. It keeps lagging etc. Guess this is due to the swap. My question is if it is advisable to use some technique to flush the swap (push it to RAM so to speak), and how. And, is there some other technique to help in this particular predicament? * * * Edit: As for extensions I only use   * _Vimium_ , which usually does not consume much.   * _Session Buddy_ , (so that I can save my tabs when I need to do a Chrome boot), but this one also use (relatively) little memory. Even so I usually have it disabled and only enables it before I do a shut down and when I want to restore some of the tabs from a previous session.   * _Flashcontrol_ I have also tried longer periods with no extensions, not that it helped. When it comes to extensions/plugins the worst culprit is flash. Using _Flashcontrol_ this helps somewhat, but all over the issue persist. I usually check this using Chrome's own _Task Manager_ , `Shift+Esc`


title: Replacement of using terminal

text: Is there a way I can use Putty and connect it to my machine in replacement of terminal on my laptop? I am currently using ubuntu but I like some of the features that putty has over using the terminal.


title: kdump doesn't produce core dump after buggy module is loaded

text: I am running kernel 3.14.4 on Fedora 18. I am experimenting with a kernel module I am making. The module has a bug (at least one) and crashes the kernel. Sometimes I see a stack trace on my frozen screen (if I am lucky) by tailing the kernel log (`tail -f /var/log/messages`). From what I see, it's a NULL pointer dereference. Since luck does not provide for productivity I configured kdump, enabled it on boot, and tested that in fact it does create a kernel dump upon a sample panic (`echo c > /proc/sysrq-trigger`), which I can see after it reboots through the crash utility. But when I test my module the kernel crashes and no dump is generated. What can I do better?


title: Give read-only access to specific folders?

text: I would like to give read-only access to a user but I want him/her to see only the exact folders I give access. for example he/she shouldn't travel around all the server and browse to all users folders etc. even if he/she only goes up, up, up I want him/her to go to only these specific folders I allow. So firstly how can I let a specific user have access to a specific folder and then would putting symbolic links to his/her home folder would help? So they can go directly to necessary folders but not up or down?


title: Read file and do below command

text: From the 2 different web page the output goes to a single file called "traffic" From one page it always has a string "sqr" and from the other page it does not have the sqr string but "attach" I need help with something below:- read file traffic if it contains "sqr" then do the below 3 piece of code or if it contains "attach" do the below 4 piece of code Thanks for your help


title: What makes a good network planner software on Linux?

text: I need to design a VoIP network topology for a customer and I need a software that can do as that famous Windows one, don't remember the name.


title: Internet access via server

text: We have proxy-server and I run Linux Mint 15 Mate. I've set up network connection and Firefox prompts for login/pass and then connects to Internet. When trying to look for updates/new software, system does not prompt for login/pass and cannot connect to Internet. What should be done to have system accessing Internet and getting updates/installing new software?


title: Numbering the output of grep

text: When we're filtering the output with grep, is there any way we can get line numbered output, like we get with `cat -n`? I'm not asking for the `grep -n` option which shows the line number of the match in the file. The scenario I want to use it in is that when I download multiple files using aria2, I usually filter the output with keyword NOTICE which gives me some output every time a file download is completed. But I have actually no way of knowing how many files have been downloaded.


title: Print a text file from a line number to another after searching for the lines

text: I want to print a text file from `X` line number to `Y` line number The value of `X` & `Y` is determined by searching for a specific line in the text file(in this case the page number) I search for the line by the following command               echo -n |grep -nr "Page # 2" FileName.txt |cut -f1 -d: ; echo -n |grep -nr "Page # 3" FileName.txt |cut -f1 -d:      for which I get an out put > 67 > > 128 I want to feed this output to the command below               sed -n 'X,Yp' FileName.txt      But I get them as two different lines how can i feed it to the `sed` command There after I want to feed the result of the above command to the `lp` command something like this...               sed -n 'X,Yp' FileName.txt | lp -dmyprinter      Can this be done without creating a file?


title: How does rpm resolve library dependencies?

text: I try to make a package of a program which is linked to such library (output from ldd): > libwx_baseu-2.8.so.0 => /usr/lib64/wx-2.8-wxcontainer/libwx_baseu-2.8.so.0 Pretty straightforward, right? But when I make a package of this program (with rpmbuild) and then try to install it, rpm complains about missing library (this one above): > error: Failed dependencies: >   >   >         libwx_baseu-2.8.so.0()(64bit) >         libwx_baseu-2.8.so.0(WXU_2.8)(64bit) >   My guess is, rpmbuild set the dependency for the main lib directory, i.e. /usr/lib64. **Question** -- how to fix this issue (ok, one would be forced install, but I would like to avoid it)? I.e. how to build rpm so the dependencies would set for the wx-2.8-wxcontainer subdirectory (for this library)? openSUSE 11.4, if this matters. ## Edit I can install such package with --nodeps which forces installation, and after that install program works perfectly. So clearly, rpm or rpmbuild has issues, not the system itself.


title: returning strings corresponding to shell glob matching

text: Suppose I have a subdirectory called `sub`. Then I want to operate on all files in that directory with the extension "txt". I want something like               for f in sub/*.txt     do         enscript -b "" -o {$f basename excluding .txt}.ps sub/{$f basename excluding .txt}.txt                                                                                ps2pdf {$f basename excluding .txt}.ps {$f basename excluding .txt}.pdf     done      So if there was just one file in the `sub` directory of the form `*.txt`, say `sub/foo.txt`, the script should expand to               enscript -b "" -o foo.ps sub/foo.txt                                                                                ps2pdf foo.ps foo.pdf      I generally prefer portable solutions, but it is always interesting to learn about different ways of doing things. So non-portable is Ok, please just mention whether your solution is portable or non-portable. Also, the title is probably not the best possible, so feel free to modify. EDIT: I realized the example as written did not quite make sense, since `foo.txt` was in the `sub` directory, and therefore `sub/foo.txt` would need to be passed to `enscript`. I also changed the -p `enscript` option to the more standard `-o` option.


title: Questions on using command mount

text: When using command mount for a device, I was wondering about the following questions:   1. Since device file is a parameter to mount, how does one know what the device file for a device is in general?   2. Do I have to create in advance the directory to which the device is mounted to, if it does not exist yet? I saw this was said to be required, but my CD with name "mycd" is automatically mounted to /media/mycd, which doesn't exist beforehand.   3. can a device be mounted to several places, without unmounting? Thanks and regards!


title: Extract multiple lines with secondary keyword search

text: I have a text file with multiple log data, I would like to search for 'Keyword-1' in a line, and when it finds the line, to search within that line for another keyword such as 'engine-1'. Then extract the section from the start of 'engine-1' until it reaches a different engine such as 'engine-2'. I would like all 'engine-1' section extracted, that includes all lines between the start and end of 'engine-1'. The end of 'engine-1' is defined by reaching any other number such as 'engine-2' or 'engine-xx'. Note, not all lines contain the word engine, but I still want to extract the 'Data' between 'engine-1' start and 'engine-1' end. Then moved on to the next section in the file and repeat the process by searching for keyword-1 first and finding out engine it uses, and extracted the start/end section of the new different engine. The link between all sections would be 'keyword-1' The text file looks like this:                Data engine-1      Data engine-1      Data      Data      Data engine-1 **keyword-1**      Data engine-1                Data engine-2      Data engine-2      Data      Data      Data engine-2      Data engine-2           Data engine-3      Data engine-3       Data      Data      Data engine-3 **keyword-1**      Data engine-3           Data engine-1      Data engine-1       Data      Data      Data engine-1      Result should look like this after extraction:                Data engine-1      Data engine-1      Data      Data      Data engine-1 **keyword-1**      Data engine-1           Data engine-3      Data engine-3       Data      Data      Data engine-3 **keyword-1**      Data engine-3


title: How to run SSD trim fstrim on btrfs when mounted multiple subvolumes?

text: I am using btrfs and have mounted several subvolumes (but not btrfs root). It resides on SSD partition, so I would like to use `fstrim`. Should I call `fstrim` on each mountpoint (corresponding with different subvolume each) ? Or do I need to have btrfs root mounted and run `fstrim` on this mountpoint?


title: Confused about the purpose of MESA with proprietary nVidia drivers

text: Since a MESA upgrade today (10.2.5-1 -> 10.2.6-1 in Debian Sid, which is _unbearable_ lately, keep away), I noticed 3D-dependant applications complaining about missing the software rasterizer `swraster` - `compiz` (standalone) won't even start any any more, glxgears is extremely choppy etc. Aside from the usual "fun" fixing this that I'm already in the middle of (pointers welcome, downgrading didn't work), this demonstrated me once again that I don't understand how 3D rendering works on Linux. So, my question is: Why is MESA even interacting with this - and why do I even need it installed? Isn't it a free implementation of the same things the proprietary nVidia drivers provide as well? Shouldn't any 3D use by X11 go directly to the proprietary drivers' APIs? On the project's site itself, they specify that they either interact with open source drivers (`nouveau` in this case, which doesn't support my card), or do things in software, which I obviously do not want. My nVidia drivers were installed through sgfxi, i. e. not from Debian's packaging system, but I don't think this would make a difference - for instance, libcairo2 rigidly specifies it needs MESA, period. (And also, why do I need to ask these question to simply run a 3D application...) If this is what's happening, it would explain why my performance in 3D games is so absolutely frustrating, but I somehow can't believe that things are _this_ counterintuitive...


title: How do I make the CLI run on dedicated graphics?

text: I just finished my Gentoo minimal install and the first thing I wonder is why I get no picture. I did have signal on the live CD, so that was pretty odd. I plugged the monitor into the Intel HD Graphics HDMI output instead, and there was my picture. There's just this issue, I have 3 monitors. I need the AMD drivers, so I go ahead and install the proprietary ones, because I have the best experience with those. In order to do that, I had to recompile the kernel with some settings off and on to enable the AMD KMS. I have no idea what it is, but it worked fine following this guide (for my Sapphire Radeon HD 7970). I'm aiming to install XFCE 4, so I also had Xorg installed.               emerge xorg-server ati-drivers      I ran `startx` and got the picture I expected on the monitor plugged into the Intel HD port. Now I stopped the x-server again and ran `aticonfig --initial` and rebooted. I already know that aticonfig only updates xorg.conf and when I started x again it appeared on the correct monitor. The only thing bothering me now is that the CLI before starting x is STILL on the integrated graphics monitor. How do I get this sent to the dedicated graphics card as well?


title: How can I find the amount of memory consumed by a process?

text: How can I find the amount of main memory consumed by a process using `ps aux`? I have a process which runs for half an hour. Is it possible to find the maximum amount of main memory consumed by it using `ps aux`? I tried to run `ps aux` but it only gives me the amount of memory consumed at the time I ran it. I do not see how I can find the maximum amount of main memory consumed by the process. One option is to run `ps` again and again and to keep looking at the output. I do not find that option feasible enough. Is there any other way out in Linux?


title: unable to change window name openbox

text: I am using openbox and usually, I have a lot of windows on the screen. One window for the browser and a couple of windows to run a few terminals. The problem is that, when they are minimized, I am not able to figure out what I was doing in which terminal and having to open each terminal to check and see what I was doing is too cumbersome and time consuming. Not to mention, it also disrupts the flow of work. I mostly spend my time programming. So I thought, it would make sense to change the name of the window in the title bar so that I can see what I was doing in it even when it is minimized. But unfortunately, openbox does not provide an option to change the name in the title bar of the window or maybe it does and I don't know. I've googled and I couldn't find anything that could help me. I would like to know if there is a way to change the title of a window in its title bar so that I can see what I was doing in it, even when it is minimized. Thank you.


title: understanding "mount" as a concept in the OS

text: I want to understand what _mounting_ is. It is used in different contexts and situations and I can't find resources which:   1. Describe the **mount** concept   2. Explain the actions taken by the computer/OS/utility when a **mount** is performed   3. How and in which situations **mount** is used   4. Which features in the Linux **mount** command are of frequent use and some examples ( I hear **mount** applied to diverse entities directories, flash drives, network card, etc )


title: What is the preferred way to install new versions of software?

text: I have installed Ubuntu Server 10.10 and now I want to install some software like PostgreSQL, Nginx and PHP. But what is the preferred way to get the latest stable version of the software? E.g I tried with `sudo apt-get install postgresql` but that installed version 8.4 of PostgreSQL but 9.0.1 is the latest version. I have had this issue before with NginX. The solution was then to download the sourcefiles and compile the latest version which took some time. Later a friend told me that wasn't a preferred way to install software. Any recommendations?


title: Why some gnome-terminal tabs look depressed

text: On my Ubuntu 12.04 Linux 3.2.0-43-generic system with AMD Athlon 64 X2 5000+ cpu, with Unity desktop, ubuntu-2d desktop-session, and Metacity window manager, some of the tabs on a GNOME Terminal 3.4.1.1 display look like depressed buttons, while others don't. The appearances when I click a tab and then click in the pane are illustrated below (in five pictures, for five tabs left to right). ![tab 1021](http://i.stack.imgur.com/bmcVq.jpg) ![tab sp](http://i.stack.imgur.com/zFgdw.jpg) ![tab bc](http://i.stack.imgur.com/oW5sf.jpg) ![tab py](http://i.stack.imgur.com/x6Zq0.jpg) ![tab ipy --pylab](http://i.stack.imgur.com/utG6N.jpg) When the pane for tab 1021 is in use (first picture), the sp tab looks like a depressed (or perhaps selected) button. When the pane for tab sp is in use (second picture), other tabs properly look unselected. When the pane for tab py is in use(fourth picture), the ipy --pylab tab looks selected, and vice versa. Question: Why are some tabs displaying differently than the others? Note, for reference the picture below shows the appearance after the sequence of clicking the ip --pylab tab and then the 1021 tab (without clicks in panes). ![enter image description here](http://i.stack.imgur.com/lWVN9.jpg)


title: the use for echo without argument in shell scripting

text: I have a following bash script I encountered on the web that prints the power set of a given lines of elements.               p() { [ $# -eq 0 ] && echo || (shift; p "$@") |             while read r ; do echo -e "$1 $r\n$r"; done }      after the first `&&` there is `echo` that does not have any argument. Here is the code to test it:               p $(echo -e "1\n2\n3")


title: How to echo output of multiple commands into md5sum?

text: Okay so I have a somewhat large file (~200 meg) that I need to regularly hash to see if it has changed. The catch is that there are two small fields in this file which must be ignored as they may change. Each of these fields has a known and fixed offset and size. I have got this working using three cmp commands, however because this needs to be done regularly I'd like to do it in the most efficient way possible. Also it is problematic to have to store a backup copy of the file, and would be much better to just store a hash to compare against. So far the closest I've got is something like this: dd read from start of file up to offset of first field | md5sum dd read from end of first field up to start of second field | md5sum dd read from end of second field to end of file | md5sum Is there any way I can redirect the output of all three of those dd commands into one md5sum instance so I can get a single hash out? I'd rather not have the three dd commands write into a temp file and then hash that as it would be a lot of I/O. I'd like to do it as efficiently as possible. Any suggestions would be greatly appreciated!!


title: When should I use input redirection?

text: I used the following two commands to produce the same results:-               [root@localhost ~]# grep line comments     The line should start with a single quote to comment in VB scripting.     Double slashes in the beginning of the line for single line comment in C.     [root@localhost ~]#          [root@localhost ~]# grep line <comments     The line should start with a single quote to comment in VB scripting.     Double slashes in the beginning of the line for single line comment in C.     [root@localhost ~]#      Could any please explain to me any pros/cons if any of these 2 approaches over each other.


title: Drivers for GMA 4500MHD

text: ~$ lsmod | grep ^i915 ## i915 296139 3 2:2.15.0~maverick~ppa1 **(xserver-xorg-video-intel)** ## from https://launchpad.net/~glasen/+archive/intel- driver?field.series_filter=maverick ~$ vainfo libva: libva version 0.31.0 libva: va_getDriverName() returns 0 libva: Trying to open /usr/lib/dri/i965_drv_video.so libva: va_openDriver() returns -1 ## vaInitialize failed with error code -1 (unknown libva error),exit libva1 1.0.1-3 ~$ glxinfo | grep OpenGL OpenGL vendor string: Tungsten Graphics, Inc OpenGL renderer string: Mesa DRI Mobile Intel® GM45 Express Chipset GEM 20100330 DEVELOPMENT x86/MMX/SSE2 OpenGL version string: 2.1 Mesa 7.9-devel OpenGL shading language version string: 1.20 OpenGL extensions: ## ~$ lspci -ks `lspci|grep VGA|awk '{print $1}'` 00:02.0 VGA compatible controller: Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller (rev 07) Subsystem: Dell Device 02aa Kernel driver in use: i915 Kernel modules: i915 grep Matched /var/log/Xorg.0.log [ 21.151] (==) Matched intel as autoconfigured driver 0 [ 21.151] (==) Matched vesa as autoconfigured driver 1 [ 21.151] (==) Matched fbdev as autoconfigured driver * * * i965-va-driver 1.0.1-3 (libva-driver-i965) - IS NO INSTALLED is driver with support for hardware acceleration YES ? Can I install this driver, if it is for i965? I use _lsmod | grep ^i915 i915_ If I want to install the driver with support for hardware acceleration, should I remove xserver-xorg-video-intel driver ? libva1 - is not driver ?


title: Why does TZ=UTC-8 produce dates that are UTC+8?

text: The current time in Los Angeles is 18:05. But when I run `TZ=UTC-8 date --iso=ns`, I get:               2013-12-07T10:05:37,788173835+0800      The date utility tells me that the time is 10:05, and even says that it's reporting it as UTC+8. Why?


title: Generating server and client certificates with multiple hostnames

text: When starting up my Puppet Master for the first time, it automatically generates its own server certificate, which is awesome. My server's hostname is `kungfumaster` and the Puppet Master generates a certificate with the common name being:               kungfumaster.mynetwork.com      It also adds the following as subject alternative DNS names:               X509v3 Subject Alternative Name:         DNS:kungfumaster.mynetwork.com, DNS:puppet, DNS:puppet.mynetwork.com      I don't exactly know how it found out that this domain lives in `mynetwork.com`, though it does, as `hostname` doesn't reveal the FQDN with any parameter configuration. However, the one name it seems to have missed is the unqualified host name `kungfumaster`. Interestingly enough, it did append a domain for `puppet` and `puppet.mynetwork.com`, but it conveniently skipped `kungfumaster`. In my startup script for Puppet Master, how do I generate the server's certificate properly, ie: with all of the required DNS names?


title: Looking for a simple X Window panel/dock with icon "pinning" feature from Windows 7

text: I am using OpenBox WM and I am looking for some simple dock application (that could be used along with OpenBox) that has this icon "pinning" feature. It can also be a panel. So far I have found this:   * Docky - it's fine but it needs compositing manager   * wbar - compiles but isn't working for me (does not appear), and I am not sure if it has the "pin" feature Any other tools that can do this?


title: Why can't my Debian received much wifi-signal

text: My wireless connection is always broken, and it can't receive good signal. I am not sure if the wireless driver caused it.   Is my wireless driver too old? Or there are some other reasons?   My mobile can receive great signal, and my hardware is good too.   Can anyone help me? ## System version   * Distributor ID: Debian   * Description: Debian GNU/Linux 7.4 (wheezy)   * Release: 7.4   * Codename: wheezy   * 64bit ## ifconfig               eth0             Link encap:Ethernet HWaddr a0:b3:cc:17:3a:26 inet6 addr: fe80::a2b3:ccff:fe17:3a26/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500      Metric:1 RX packets:754884 errors:0 dropped:1 overruns:0 frame:0 TX packets:653093 errors:0 dropped:0 overruns:0 carrier:0 collisions:0      txqueuelen:1000 RX bytes:1076885286 (1.0 GiB) TX bytes:69749589 (66.5 MiB) Interrupt:41 Base address:0x2000          lo             Link encap:Local Loopback     inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436      Metric:1 RX packets:30743 errors:0 dropped:0 overruns:0 frame:0 TX packets:30743 errors:0 dropped:0 overruns:0 carrier:0 collisions:0      txqueuelen:0 RX bytes:19489860 (18.5 MiB) TX bytes:19489860 (18.5 MiB)          ppp0             Link encap:Point-to-Point Protocol inet addr:39.64.129.250 P-t-P:39.64.128.1 Mask:255.255.255.255 UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1492      Metric:1 RX packets:754106 errors:0 dropped:0 overruns:0 frame:0 TX packets:652283 errors:0 dropped:0 overruns:0 carrier:0 collisions:0      txqueuelen:3 RX bytes:1060248214 (1011.1 MiB) TX bytes:55370661 (52.8 MiB)          wlan0              Link encap:Ethernet HWaddr 08:ed:b9:5b:a2:fc     inet addr:10.201.139.226 Bcast:10.201.159.255 Mask:255.255.224.0 inet6 addr: fe80::aed:b9ff:fe5b:a2fc/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500      Metric:1 RX packets:28 errors:0 dropped:0 overruns:0 frame:0 TX packets:155 errors:0 dropped:0 overruns:0 carrier:0 collisions:0      txqueuelen:1000 RX bytes:2269 (2.2 KiB) TX bytes:29331 (28.6 KiB)      ## iwconfig               wlan0        IEEE 802.11bgn ESSID:"CMCC"     Mode:Managed Frequency:2.462 GHz Access Point: E4:68:A3:78:8C:30     Bit Rate=1 Mb/s Tx-Power=19 dBm     Retry long limit:7 RTS thr:off Fragment thr:off Encryption key:off Power Management:off Link Quality=21/70 Signal level=-89 dBm     Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0 Tx excessive retries:9 Invalid misc:1 Missed beacon:0          eth0             no wireless extensions.      ## Device dirver check & report               PCI ID             14e44727     works?             Yes     vendor             Broadcom Corporation     device             BCM4313 802.11b/g/n Wireless LAN Controller     driver             brcmsmac     Kernel     v2.6.38-


title: Single CD install of a RHEL-like distribution?

text: Can someone suggest a RHEL-like distribution that can install from a single CD? I am looking for a distribution where services are started from `/etc/init.d`, environment variables are set from scripts in `/etc/profile.d` and so-on (meaning that Ubuntu doesn't do the job). A network installer isn't an option... I think in terms of the OS's behaviour, CentOS would do the trick, except I can't find a single CD installation. Any suggestions?


title: What is a sure fire way to find all files and/or path that contains 2 keywords?

text: I was doing a               find . -iname '*sitesearch*' | grep demo      because I know the file should be `some/path/SiteSearch/demo/SiteSearch.html`, but it turned out a person put the file in as `some/path/SiteSearch/demo/index.html`, so the file cannot be found. Is there a better way to do the search? Such as for this case, if I do               find . -iname '*demo*' | grep -i sitesearch      it would have found it. But I don't want to always THINK what possibility it is and figure out what pattern to use. I just want a way that whenever the file and path have both of these 2 keywords, then print it out. For example, if there is a way to `ls` all files will the full path on each line, then we can do               ls --some-flags | grep -i demo | grep -i sitesearch      or maybe another way / better way.


title: Use HERE file and redirect output of command

text: I have the following code in a batch script:               mpirun -np 6 ./laplace <<END     100     100     100     0.01     100     3     2     1     END     | tail -n 1 > output      But it isn't working. What I want it to do is to use the HERE file as input to the mpirun command, and then pipe the output to the tail command. However, I think the HERE file and tail output things are getting confused. How should I write this so that it does what I want?


title: Why doesn't my new cygwin .bashrc interactive check work?

text: I just updated Cygwin and the new `.bashrc` contains this line right at the top:               echo "BEFORE TEST"     # If not running interactively, don't do anything     [[ "$-" != *i* ]] && return     echo "AFTER TEST"      I understand if not running interactive, you don't need to do anything, but my problem is that if I `ssh` with a command:               ssh localhost pwd      I see this:               BEFORE TEST      So, obviously, it fails the `[[ "$-" != *i* ]]` test and returns. Obviously `ssh localhost pwd` is a trivial example, but I expect `.bashrc` to be run all the way through if running a command through `ssh`. My actual automation runs commands remotely against this cygwin instance and is failing because the path (which is set by my `.bashrc`) is not getting set correctly. Furthermore, can anyone explain what that test is actually doing? What is `i`? What is `$-` supposed to represent?


title: Arch Linux: "error: failed to commit transaction (conflicting files)"

text: I'm trying to install an Arch system, and every time I run `pacstrap /mnt base base-devel` I get               error: failed to commit transaction (conflicting files)     filesystem: /mnt/lib exists in filesystem     ==> ERROR: Failed to install packages to new root      I checked the beginner's guide on the ArchWiki and as far as I'm concerned I'm not doing anything wrong, but I do have 7 GPT partitions, one of them mounted to `/mnt/lib`


title: How frequently are updates sent to a VNC client?

text: I am trying to understand how the VNC mechanism works. The RFB protocol 3.8 specifications say : > The update protocol is demand-driven by the client. That is, an update is > only sent from the server to the client in response to an explicit request > from the client. This gives the protocol an adaptive quality. The slower the > client and the network are, the lower the rate of updates becomes. With > typical applications, changes to the same area of the framebuffer tend to > happen soon after one another. With a slow client and/or network, transient > states of the framebuffer can be ignored, resulting in less network trafﬁc > and less drawing for the client. It seems that this implies that the server will only ever send a `FramebufferUpdate` if the client sends a `FramebufferUpdateRequest`. Then the client must be sending these packets at a regular interval. However, when I analyzed through wireshark, I observed that this was not the case. When there was no screen or pointer activity, I did not see any packets from the client to the server. When I created some screen activity on the screen without involving the client, (I ran `xclock` by setting display to that value) the first message was from the server to the client and not a request from the client. So my question is: **Is it indeed true that the server will only send updates if the client requests them and not every time there is screen activity?** What is the frequency of updates in either case?


title: DD-WRT: dhcp6c not fetching new address for ppp0

text: I'm currently trying to configure my DD-WRT-based router to do IPv6. Now I'm at a point where it works fine - until the line is disconnected and reconnects (which happens at least every 24h... for a country renowned for its engineering, Germany is still surprisingly backwater when it comes to internet). Not giving out static IP addresses, my provider requires me to fetch the configuration using DHCPv6, which I then propagate into to my localnet. But when `ppp0` is disconnected and reconnected, `dhcp6c` does not fetch a new address and subsequently `radvd` does not advertise the change. I created a script `/jffs/etc/config/ipv6.ipup` which restarts all the associated services and it works when I invoke it manually. So even though the documentation says that all `*.ipup` scripts in that directory should be automatically invoked when the configuration state of the WAN interface changes, it's apparently not happening. Preferably I'd have `dhcp6c` and `radvd` notice the change automatically without completely restarting them, but if you know how any way to solve this configuration, I'd be grateful for any tips.


title: Where to find acpi mailing list?

text: Was this mailing list dead: Acpi-devel -- Defunct ACPI Development Discussion List What other source can I utilize , just want to find the developers of `acpid`


title: vmlinuz and initrd not found after building the kernel?

text: After configuring and building the kernel using make, why don't I have `vmlinuz-<version>-default.img` and `initrd-<version>.img`, but only got a huge `vmlinux` binary (~150MB)?


title: change boot order

text: I have 2 partitions `sda1` XP and `sda2` CENTOS. I have reinstalled `grub` on `/dev/sda` but on rebooting, I experienced: `error : 22 no such parition` for Centos; while Windows boots charmingly on the other. `fdisk -l` gives `sda1` as boot, is there a possibility that I can change it to `sda2` on `shell`, since I am on rescue mode.


title: How can I setup a wifi access point to only allow users if they accept an EULA?

text: I need to setup an access point to only allow users through if they first accept an EULA. To make things slightly simpler, I'm looking into doing this with a unix machine that shares the connection from ethernet to people on wifi. What would be the best way to approach this ? I was thinking at   * redirecting all new http connections to the EULA page and once the user clicks ACCEPT, adding ip+mac in a table and filtering everything else   * Redirecting with dnsmasq (though I have no idea how to make it stop redirecting once the user clicks accept) Any advices ?


title: Maximum password length

text: Is there a maximum password length on unix systems? If so, what is that limit and is it distribution dependent?


title: 24 hour crash course in ZFS... some final questions

text: Due to various circumstances I've given myself a crash course on the ZFS file sytem. I need some help getting comfortable with the unknowns. Whatever those are. Data:   * Running www.zfsonlinux.org on CentOS 6.2    * I have an array with 12x2TB sata disks.    * I created a raidz2 pool and a couple zfs file systems inside that.    * Performance is better than I expected. (How often do you get to say that?) Some questions:   * What type of maintenance should I schedule? I have read that doing a "zpool scrub" is advised. At what interval would you run this? Is there anything else to do?   * Is there any performance monitoring other than "zpool iostat" - snmp?    * I need to be alerted by email or similar about disk failures, etc.... What are my options?


title: Autodetect modem in Linux?

text: Is there a way to autodetect modem devices in Linux and then symlink them to `/dev/modem` using a udev rule? Currently, I wrote a program that probes each serial port, sending `AT` and waiting for `OK`. I have a udev script that runs this for every ttyS and ttyUSB device. However, I've now been informed that there's other devices, such as OBD-II diagnostic bridges, that also speak with AT commands.


title: How to recover NTFS drive formatted in ext4?

text: I just installed Linux Mint 17 and when it asked me where to install it I selected the option to overwrite the old Mint 14. Previously I had also windows with NTFS partition of 900GB. Not it is all formatted into ext4 and all the information of almost 800GB is lost. Please advise what I can do in this situation. It was light format so there should be a way to recover some of the info I have lost. Is it a good idea to format back to NTFS and try some recovery programes or something like HIREN CD?


title: How to check and block processes connecting to internet directly?

text: Is there a way to find which processes in my system are getting connected to net automatically. Is there a way to select and block net access of some processes permanently? I use mint 11. I use a USB datacard.