Error when adding phtreads support to PHP while following arch wiki

Willing to add phthreads support to PHP, I read this page and began to follow its instructions : https://wiki.archlinux.org/index.php/PHP_pthreads_extension But while the makepkg -s step, compilation stops with the following message :               checking whether build with IMAP works... no     configure: error: build test failed. Please check the config.log for details.     ==> ERROR: A failure occurred in build().         Aborting...      Looking at the relevant section from config.log :               configure:48953: checking whether build with IMAP works     configure:48997: cc -o conftest -I/usr/include -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4 -fvisibility=hidden -pthread -D_FORTIFY_SO     URCE=2 -D_REENTRANT -L/usr/lib -Wl,-O1,--sort-common,--as-needed,-z,relro conftest.c  -lcrypto -lssl -lcrypto -lc-client -lcrypt -lpam  -lz -lpcre -lrt -lm -ldl -lnsl  -lxml2 -lz     -lm -ldl -lxml2 -lz -lm -ldl >&5     /usr/lib/libc-client.a(osdep.o): In function `ssl_onceonlyinit':     (.text+0xb696): warning: the use of `tmpnam' is dangerous, better use `mkstemp'     /usr/lib/libc-client.a(osdep.o): In function `ssl_open_verify':     (.text+0x1b7): undefined reference to `X509_STORE_CTX_get_error'     /usr/lib/libc-client.a(osdep.o): In function `ssl_open_verify':     (.text+0x1bf): undefined reference to `X509_verify_cert_error_string'     /usr/lib/libc-client.a(osdep.o): In function `ssl_open_verify':     (.text+0x1d1): undefined reference to `X509_STORE_CTX_get_current_cert'     /usr/lib/libc-client.a(osdep.o): In function `ssl_open_verify':     (.text+0x1d9): undefined reference to `X509_get_subject_name'     /usr/lib/libc-client.a(osdep.o): In function `ssl_open_verify':     (.text+0x1e9): undefined reference to `X509_NAME_oneline'     /usr/lib/libc-client.a(osdep.o): In function `ssl_server_input_wait':     (.text+0x1982): undefined reference to `SSL_get_fd'     /usr/lib/libc-client.a(osdep.o): In function `ssl_server_input_wait':     (.text+0x199d): undefined reference to `SSL_pending'     /usr/lib/libc-client.a(osdep.o): In function `ssl_server_input_wait':     (.text+0x19b6): undefined reference to `SSL_read'     /usr/lib/libc-client.a(osdep.o): In function `ssl_abort':     (.text+0x53d5): undefined reference to `SSL_shutdown'     /usr/lib/libc-client.a(osdep.o): In function `ssl_abort':     (.text+0x53de): undefined reference to `SSL_free'     /usr/lib/libc-client.a(osdep.o): In function `ssl_abort':     (.text+0x53f4): undefined reference to `SSL_CTX_free'     /usr/lib/libc-client.a(osdep.o): In function `ssl_sout':     (.text+0x54c6): undefined reference to `SSL_write'     /usr/lib/libc-client.a(osdep.o): In function `ssl_sout':     (.text+0x54e6): undefined reference to `SSL_get_error'     /usr/lib/libc-client.a(osdep.o): In function `ssl_start':     (.text+0x56de): undefined reference to `TLSv1_client_method'     /usr/lib/libc-client.a(osdep.o): In function `ssl_start':     (.text+0x56e6): undefined reference to `SSL_CTX_new'     /usr/lib/libc-client.a(osdep.o): In function `ssl_start':     (.text+0x5704): undefined reference to `SSL_CTX_ctrl'     (...)      It seems that all these missing references belongs to libcrypt.so, but I don't know how to solve this. Can you help me ?


Are there any security risks when mounting as root?

Are there any security related risks when mounting with root privileges compared to mounting with regular users?   I have a script which does some ecryptfs mounting with non-root privileges (by design), but it doesn't work as expected on all required Linux systems, so I'm wondering if switching to mounting as root is a good idea. Any help is greatly appreciated.


How to turn off single user mode on a remote machine?

I have a linux machine that I was accessing remotely and I made the mistake of doing `#init 1` which turned off networking on the machine. What is the easiest way to turn networking back on and/or get the machine out of single user mode? I do have personnel that can access the machine locally if necessary.


wpa_supplicant store password as hash (WPA-EAP with phase2="auth=PAP")

Is there a way to store my password in `/etc/wpa_supplicant/wpa_supplicant.conf` as some hash instead of plaintext? By "password" I refer here to the password used for phase2 authentification. I do **not** refer to the Preshared Key (PSK) which could be hashed using wpa_passphrase. For phase2 MSCHAPv2 or MSCHAP authentification I could store the password as MD4 hash using nt_password_hash (see example wpa_supplicant.conf line 659). Is there any way to store my PAP password as hash? Or: Is there a way to store the password in some sort of external storage? The example wpa_supplicant.conf suggests the use of such an external storage (using ext:????) but I could not find any documentation about it. I am aware that storing the password as hash does not increase wifi security. But as the password MUST be the same as the password for other services (account management, subscriptions, payments ...) I don't want it to be stored as plaintext.


How can I tell whether a package is installed via yum in a bash script?

I am trying to write a script that installs packages, but if it fails at any point later in the script rolls back whatever it installed. Of course if the user has already previously installed a package I don't want to uninstall it out from under them. How can my script tell whether a package has been previously installed via yum?


Is it possible to have an outgoing SMTP server when port 25 is blocked?

I have a Debian machine (actually a Raspberry Pi) that I would like to use as a rudimentary, outgoing-only mail server over a residential connection, just for kicks. Port 25 is blocked. I would like to set it up as a standalone SMTP server, not a relay. Is that possible? Comcast gives the impression I can use port 587 instead. http://customer.comcast.com/help-and-support/internet/email-port-25-no-longer- supported/ So does this guy (and a few others): http://dragos.fedorovici.com/exim- alternate-port-587/ But this answer http://serverfault.com/questions/452653/many-isps-is-block- port-25-how-do-i-choose-an-alternative-port/ sounds like 587 is only for use within local networks. Nothing I have tried works. It would be nice to know if the task is possible. **EDIT:** I didn't explicitly mention this, but I would like typical mail servers to be able to receive mail that I send from my machine.


How to repair an ext3 partition after broken resize operation?

I was using `gparted` to resize a near-terabyte ext3 partition, adding about 40 GB to the left. After nearly 12 hours of moving data (and with 23 more hours estimated to remain) the system hung. Now `fsck` reports too much illegal data in every inode. How do I fix the FS in this case?


Kernel Panic because of RAM stick?

one of my RAM sticks causes a Kernel Panic on my Ubuntu 10.10 (something like "not syncing" with a lot of memory adresses shown on screen). It's definitely this one RAM stick and not its socket because when I put one of the other sticks into the slot of the one RAM stick, everything is ok. How does it come that memtest doesn't find any errors after several cycles but Ubuntu is not able to boot while using this one special RAM stick? Does anybody have an explanation for that?


Light up a LED through USB

Hey, so I'm just playing around with a usb cable and an LED. I plugged in the usb to my computer and connected ground with the LED ground and the last usb pin (+) to the LED. It stays lit bright. I moved the wire from the usb power pin to the D+ pin. Is it possible that I could send a bit stream through usb that would in turn light up this LED? I'm not even a beginner with usb, drivers, etc. I just had the idea that hit me and wanted to see if it was possible as a sort of show off to friends.


Can I install Linux on Ankya 7802L 266MHz 128MB 2GB laptop?

I recently bought this cute little laptop computer (not much memory/HD/CPU): http://www.dinodirect.com/netbook-anyka-7802l-266mhz-128mb-2gb-nand-flash.html Has anyone successfully installed any Linux distro on it? I know Linux works well w/ low-end specs, so my main worry is drivers/etc. The laptop doesn't come w/ a recovery disk: how can I backup the OS it comes with (modified version of Windows?), just in case my Linux install fails. [I am not affiliated w/ DinoDirect, this is just a cool toy I bought myself]


Grub 2 installed on-partition - how to not embed it

My friend installed ArchLinux on a MacBook Pro alongside Mac OSX and Windows to try it. He's power user, so I only needed to help with the bootloader. Arch Linux's described installation of GRUB did not work (grub did not detect the 4th GUID partition it was installed on). I heard that with EFI GRUB 2 works, and it did. The problem is that it required embedding in an ext4 partition that had too little space for it. Is it possible to install GRUB 2 on an ext4 partition without embedding?


Setting processor fan to 100%

How can I set fans speed to 100% or more in linux ?


Would anyone like to help me start a Wikipedia page "List of rolling release Linux Distribustions"?

I can't find a definitive list of rolling distros any where on the web. DistroWatch doesn't have one, though I posted a comment suggesting they add such or label rolling releases and the type of release/dev. cycle generally. Wikipedia have a very small page for "Rolling Release" only which list about five or so merely as examples of rolling releases. I would like to start a Wikipedia page "List of Rolling Release Linux Distributions". I would be happy to help with such as I have been trying to find a good guide to Linux rolling release distros. If you would be willing to help me with the page please post below or email my screen name at gmail if you like the idea or have a better one. I still need to set up a Wikipedia account but thought I'd see if any one was interested in the project first. I would like to collaborate with other in creating the page as I've only used Linux for a year or so & I'm still something of a newbie. I look forward to hearing your thoughts on the proposal. ** Edit in reply to the comments below ** Fist of all I'd like to apologize for posting the question. Sorry: I should have read the guidelines first on what types of question are allowed. Feel free to erase this question entirely as I'm not sure how this is done. My question really should have been: "Does anyone know whether a comprehensive list of rolling-release Linux distros exists anywhere on the Web [before I bother to create a Wikipedia article for such]?". -- Would this be a suitable question to post on this site? If not I'll just leave things as they stand. BTW, many thanks to those who commented below (and Stefan Lasiewski & Maciej Piechotka for closing the question). In future, I'll endeavour to make sure I don't make the same mistake of asking an ambiguous question (or one that's inappropriate given the site's purpose). Many thanks for the clarification. Tuxalot.


Why do two Ubuntu systems in the same network behave differently in DNS resolution?

I have two systems, both running Ubuntu 12.04, which are within the same network (connected by hubs without routing logic). Both systems are configured quite similar, but not identical. In particular, the command `route` gives the identical results on both system. Within the network a windows server is operating by a name `winshared`. One Linux system work resolving the IP:               > nslookup winshared     Server:     127.0.0.1     Address:    127.0.0.1#53          Name:   winshared.somepc.xx     Address: 172.16.0.110      while the other Linux system fails with               > nslookup winshared     ;; connection timed out; no servers could be reached      Why do I see the difference in DNS resolution on both systems? And how to fix it? Additional remarks:   * The content of `/etc/resolv.conf` is identical on both systems with the content:              nameserver 127.0.0.1


G3 Usb Modem Huawei E1550 did not work after unplug (NetworkManager)

I have the following problem: When I boot with plugged in usb modem everything is fine. If I unplug modem and plug it back it can not be used any more. Some logs below. **1. Modem plugged on boot** **lsusb**               Bus 001 Device 003: ID 12d1:1001 Huawei Technologies Co., Ltd. E169/E620/E800 HSDPA Modem       **usb_modeswitch log:**               USB_ModeSwitch log from Sun Apr 08 23:38:27 CEST 2012     Raw args from udev: /1-1.1:1.0     Using global config file: /etc/usb_modeswitch.conf     Using top device dir /sys/bus/usb/devices/1-1.1     ----------------     USB values from sysfs:       manufacturer  HUAWEI Technology       product   HUAWEI Mobile       serial         ----------------     bNumConfigurations is 1 - don't check for active configuration     SCSI attributes not needed, moving on     checking config: /usr/share/usb_modeswitch/12d1:1446     ! matched. Reading config data     config: TargetVendor set to 12d1     config: TargetProductList set to 1001,1406,140b,140c,1412,141b,1433,1436,14ac,1506     Driver module is "option", ID path is /sys/bus/usb-serial/drivers/option1     Command to be run:     usb_modeswitch -I -W -D -s 20 -u -1 -b 1 -g 9 -v 12d1 -p 1446 -f $configBuffer          Verbose debug output of usb_modeswitch and libusb follows     (Note that some USB errors are to be expected in the process)     --------------------------------          Reading long config from command line          * usb_modeswitch: handle USB devices with multiple modes       * Version 1.2.1 (C) Josua Dietze 2011     * Based on libusb0 (0.1.12 and above)          ! PLEASE REPORT NEW CONFIGURATIONS !          DefaultVendor=  0x12d1     DefaultProduct= 0x1446     TargetVendor=   0x12d1     TargetProduct=  not set     TargetClass=    not set     TargetProductList="1001,1406,140b,140c,1412,141b,1433,1436,14ac,1506"          DetachStorageOnly=0     HuaweiMode=0     SierraMode=0     SonyMode=0     QisdaMode=0     GCTMode=0     KobilMode=0     SequansMode=0     MobileActionMode=0     CiscoMode=0     MessageEndpoint=  not set     MessageContent="55534243123456780000000000000011062000000100000000000000000000"     NeedResponse=0     ResponseEndpoint= not set     InquireDevice disabled     Success check enabled, max. wait time 20 seconds     System integration mode enabled     Use given bus/device number: 001/009 ...     Looking for default devices ...      bus/device number matched      searching devices, found USB ID 12d1:1446      found matching vendor ID      found matching product ID      adding device      Found device in default mode, class or configuration (1)      Skipping the check for the current configuration      Using first interface: 0x00      Using endpoints 0x01 (out) and 0x81 (in)      USB description data (for identification)      -------------------------      Manufacturer: HUAWEI Technology          Product: HUAWEI Mobile          Serial No.: not provided      -------------------------     Looking for active driver ...     OK, driver found; name unknown, limitation of libusb1     OK, driver "unkown" detached     Setting up communication with interface 0     Using endpoint 0x01 for message sending ...     Trying to send message 1 to endpoint 0x01 ...     libusb:error [op_clear_halt] clear_halt failed error -1 errno 71     OK, message successfully sent     Resetting response endpoint 0x81     Resetting message endpoint 0x01      Could not reset endpoint (probably harmless): -34      Device is gone, skipping any further commands      Bus/dev search active, referring success check to wrapper. Bye.      ok:busdev      --------------------------------      (end of usb_modeswitch output)     Checking success of mode switch for max. 20 seconds ...      Waiting for device file system (1 sec.) ...      Waiting for device file system (15 sec.) ...     Reading attributes ...     All attributes matched     Mode switching was successful, found 12d1:1001 (HUAWEI Technology: HUAWEI Mobile)     Now checking for newly created ports ...      new ports found, device is known to driver     Checking for AVOID_RESET_QUIRK kernel attribute     AVOID_RESET_QUIRK activated     All done, exiting       **2.Modem unplugged and plugged back** **lsusb** Bus 001 Device 008: ID 12d1:1001 Huawei Technologies Co., Ltd. E169/E620/E800 HSDPA Modem **usb_modeswitch log:**               USB_ModeSwitch log from Sun Apr 08 23:46:12 CEST 2012          Raw args from udev: /1-1.1:1.0          Using global config file: /etc/usb_modeswitch.conf     Using top device dir /sys/bus/usb/devices/1-1.1     ----------------     USB values from sysfs:     manufacturer    HUAWEI Technology     product HUAWEI Mobile     serial       ----------------     bNumConfigurations is 1 - don't check for active configuration     SCSI attributes not needed, moving on     checking config: /usr/share/usb_modeswitch/12d1:1446     ! matched. Reading config data     config: TargetVendor set to 12d1     config: TargetProductList set to 1001,1406,140b,140c,1412,141b,1433,1436,14ac,1506     Driver module is "option", ID path is /sys/bus/usb-serial/drivers/option1     Command to be run:     usb_modeswitch -I -W -D -s 20 -u -1 -b 1 -g 7 -v 12d1 -p 1446 -f $configBuffer     Verbose debug output of usb_modeswitch and libusb follows     (Note that some USB errors are to be expected in the process)     --------------------------------     Reading long config from command line      * usb_modeswitch: handle USB devices with multiple modes      * Version 1.2.1 (C) Josua Dietze 2011      * Based on libusb0 (0.1.12 and above)     ! PLEASE REPORT NEW CONFIGURATIONS !          DefaultVendor=  0x12d1     DefaultProduct= 0x1446     TargetVendor=   0x12d1     TargetProduct=  not set     TargetClass=    not set     TargetProductList="1001,1406,140b,140c,1412,141b,1433,1436,14ac,1506"          DetachStorageOnly=0     HuaweiMode=0     SierraMode=0     SonyMode=0     QisdaMode=0     GCTMode=0     KobilMode=0     SequansMode=0     MobileActionMode=0     CiscoMode=0     MessageEndpoint=  not set     MessageContent="55534243123456780000000000000011062000000100000000000000000000"     NeedResponse=0     ResponseEndpoint= not set          InquireDevice disabled     Success check enabled, max. wait time 20 seconds     System integration mode enabled          Use given bus/device number: 001/007 ...     Looking for default devices ...       bus/device number matched       searching devices, found USB ID 12d1:1446       found matching vendor ID       found matching product ID       adding device      Found device in default mode, class or configuration (1)     Skipping the check for the current configuration     Using first interface: 0x00     Using endpoints 0x01 (out) and 0x81 (in)     USB description data (for identification)     -------------------------     Manufacturer: HUAWEI Technology      Product: HUAWEI Mobile      Serial No.: not provided     -------------------------     Looking for active driver ...     OK, driver found; name unknown, limitation of libusb1     OK, driver "unkown" detached     Setting up communication with interface 0     Using endpoint 0x01 for message sending ...     Trying to send message 1 to endpoint 0x01 ...     libusb:error [op_clear_halt] clear_halt failed error -1 errno 71     OK, message successfully sent     Resetting response endpoint 0x81     Resetting message endpoint 0x01     Could not reset endpoint (probably harmless): -34     Device is gone, skipping any further commands     Bus/dev search active, referring success check to wrapper. Bye.     ok:busdev     --------------------------------     (end of usb_modeswitch output)          Checking success of mode switch for max. 20 seconds ...      Waiting for device file system (1 sec.) ...      Waiting for device file system (15 sec.) ...      Reading attributes ... All attributes matched Mode switching was successful, found 12d1:1001 (HUAWEI Technology: HUAWEI Mobile) Now checking for newly created ports ... new ports found, device is known to driver Checking for AVOID_RESET_QUIRK kernel attribute AVOID_RESET_QUIRK activated All done, exiting **dmesg output:**               [  261.611314] usb 1-1.1: USB disconnect, device number 3     [  283.800711] usb 1-1.1: new high-speed USB device number 7 using ehci_hcd     [  283.899855] scsi11 : usb-storage 1-1.1:1.0     [  283.900156] scsi12 : usb-storage 1-1.1:1.1     [  284.638710] usb 1-1.1: USB disconnect, device number 7     [  300.687875] usb 1-1.1: new high-speed USB device number 8 using ehci_hcd     [  300.787664] usb 1-1.1: GSM modem (1-port) converter now attached to ttyUSB0     [  300.788085] usb 1-1.1: GSM modem (1-port) converter now attached to ttyUSB1     [  300.788450] usb 1-1.1: GSM modem (1-port) converter now attached to ttyUSB2     [  300.789174] scsi16 : usb-storage 1-1.1:1.3     [  300.790242] scsi17 : usb-storage 1-1.1:1.4       P.S. I am using NetworkManager 0.9.2.0, Arch Linux, XFCE **Update: Test on Xubuntu 11.10 Live CD** I have just tested it under Xubuntu.   * After booting I have plugged-in USB modem.      * Modem was immediately recognized by the system and start working   * I have unplugged it and plugged it back.      * Modem was recognized and working. **dmesg output**               [  902.454378] usb 1-1.2: new high speed USB device number 9 using ehci_hcd     [  902.562241] scsi14 : usb-storage 1-1.2:1.0     [  902.562632] scsi15 : usb-storage 1-1.2:1.1     [  903.278564] usb 1-1.2: USB disconnect, device number 9     [  919.341096] usb 1-1.2: new high speed USB device number 10 using ehci_hcd     [  919.450088] option 1-1.2:1.0: GSM modem (1-port) converter detected     [  919.450301] usb 1-1.2: GSM modem (1-port) converter now attached to ttyUSB0     [  919.450597] option 1-1.2:1.1: GSM modem (1-port) converter detected     [  919.450739] usb 1-1.2: GSM modem (1-port) converter now attached to ttyUSB1     [  919.450984] option 1-1.2:1.2: GSM modem (1-port) converter detected     [  919.451123] usb 1-1.2: GSM modem (1-port) converter now attached to ttyUSB2     [  919.454323] scsi19 : usb-storage 1-1.2:1.3     [  919.459118] scsi20 : usb-storage 1-1.2:1.4     [  920.456207] scsi 19:0:0:0: CD-ROM            HUAWEI   Mass Storage     2.31 PQ: 0 ANSI: 2     [  920.460283] scsi 20:0:0:0: Direct-Access     HUAWEI   MMC Storage      2.31 PQ: 0 ANSI: 2     [  920.749708] sr0: scsi-1 drive     [  920.749847] sr 19:0:0:0: Attached scsi CD-ROM sr0     [  920.749937] sr 19:0:0:0: Attached scsi generic sg2 type 5     [  920.752303] sd 20:0:0:0: Attached scsi generic sg3 type 0     [  920.761650] sd 20:0:0:0: [sdc] Attached SCSI removable disk      I would say, that dmesg output from Xbuntu looks similar to one from Arch. Any Ideas?


How to properly and easy configure `xdg-open` without any enviroment?

I'm using OpenBox window manager **without any desktop enviroment**. **`xdg-open`** behaves strangely. It opens everything with `firefox`.               $ xdg-settings --list     Known properties:       default-web-browser           Default web browser      I'm looking for simple program. Someting like reading every **`*.desktop`** file in **`/usr/share/applications/`** folder and automatically setting xdg settings.


Protect files from `rm -f`

Much to my immediate chagrin, removing write permission from a file does not seem to protect it from `rm -f`:               touch foo     chmod a-w foo     rm -f foo      How can I protect a file from accidental deletion when `rm` will be called with the `-f` flag? It looks like `chattr +i foo` would work, but it requires root on my system (is that intended?), so I'm looking for a non-root solution.


When running a shell script, is it possible to pass specific positional parameters without having to enter them all in order?

For example, if I have script ./foo that takes 10 parameters, and I only want to pass the 8th parameter. The only way I know how to do this currently is:               ./foo '' '' '' '' '' '' '' 'bar'      Is there an easier/better way?


Extract dates from /etc/shadow

The file `/etc/shadow` has a couple date fields that are expressed as the number of days since Jan 1, 1970. Is there an easy way using to get a list of users and the calendar date of the last password change, and the expiration? Ref: man shadow(5)


Get newest gcc for debian?

I can't build my apps on gcc since I use various c++0x features. I'm on Debian 6 (Lenny) and after upgrade/updating I have gcc version 4.4.5-8. I'm unsure which version is required but mingw 4.6.2 works. gcc 4.7.0 is out. How do I install gcc version 4.6+ on Debian?


Preventing LyX from getting a SIGHUP and closing when the terminal window is closed

I have written a Ruby script to manage my LyX documents. The script has a short CLI interaction with the user(=me), and then it decides the name of the file to open, and opens it via a `lyx` shell command. Now, the problem is, I need a terminal for the CLI interaction, but when I close the terminal, LyX pops a message box that says "SIGHUP signal caught! Bye." and when I click on `OK`, it closes LyX. That problem occurred when I launched the shell via Ruby's `exec` command(that closes the ruby process and starts a new process for the given shell command). When I tried to replace it with a fork, the LyX windows never opened - my guess was that LyX received the `SIGHUP` when the Ruby script finished and the terminal closed - and I confirmed that guess when I added a `gets` command at the end of the Ruby script to prevent it from closing - and then the LyX window was opened, but when I pressed `Enter` to finish the ruby script, LyX received the `SIGHUP` and closed. Now, I can probably solve this by replacing the CLI interaction with a GUI and giving up on the terminal window, but using a GUI for something like that seems like an overkill to me. So, is there a way to prevent LyX from closing when I close the terminal? I'm running OpenSUSE 12.1 64bit with KDE, and the terminal emulator is Konsole.


How to sum a bash array of numbers (some in scientific notation)?

Since the following command using bc does not work for numbers in scientific notation, I was wondering about an alternative, e.g. using awk?               sum=$( IFS="+"; bc <<< "${arrValues[*]}" )


What does this output from xev mean?

I'm interested in remapping some keys on my keyboard. In particular, I want to hold down the Function key, press the F1 key, and have this trigger a script. I know that `xev` is useful for figuring out what keycode is associated with a keypress. For example, when I press the `x` key, I get:               KeyPress event, serial 41, synthetic NO, window 0x2600001,         root 0xae, subw 0x0, time 1597243, (-190,43), root:(910,336),         state 0x0, keycode 53 (keysym 0x78, x), same_screen YES,         XLookupString gives 1 bytes: (78) "x"         XmbLookupString gives 1 bytes: (78) "x"         XFilterEvent returns: False          KeyRelease event, serial 41, synthetic NO, window 0x2600001,         root 0xae, subw 0x0, time 1597363, (-190,43), root:(910,336),         state 0x0, keycode 53 (keysym 0x78, x), same_screen YES,         XLookupString gives 1 bytes: (78) "x"         XFilterEvent returns: False      This makes sense to me. However, when I press Function-F1, I don't understand what happens. **Why does pressing Function-F1 seem to behave as if I've also held the Windows button, and typed the letter`l`?** `xev` output when I press Function-F1:               KeyPress event, serial 41, synthetic NO, window 0x2600001,         root 0xae, subw 0x0, time 1735349, (-157,221), root:(943,514),         state 0x0, keycode 133 (keysym 0xffeb, Super_L), same_screen YES,         XLookupString gives 0 bytes:          XmbLookupString gives 0 bytes:          XFilterEvent returns: False          KeyPress event, serial 41, synthetic NO, window 0x2600001,         root 0xae, subw 0x0, time 1735350, (-157,221), root:(943,514),         state 0x40, keycode 46 (keysym 0x6c, l), same_screen YES,         XLookupString gives 1 bytes: (6c) "l"         XmbLookupString gives 1 bytes: (6c) "l"         XFilterEvent returns: False          MappingNotify event, serial 41, synthetic NO, window 0x0,         request MappingKeyboard, first_keycode 8, count 248          KeyPress event, serial 41, synthetic NO, window 0x2600001,         root 0xae, subw 0x0, time 1735356, (-157,221), root:(943,514),         state 0x40, keycode 160 (keysym 0x1008ff2d, XF86ScreenSaver), same_screen YES,         XLookupString gives 0 bytes:          XmbLookupString gives 0 bytes:          XFilterEvent returns: False          KeyRelease event, serial 41, synthetic NO, window 0x2600001,         root 0xae, subw 0x0, time 1735357, (-157,221), root:(943,514),         state 0x40, keycode 160 (keysym 0x1008ff2d, XF86ScreenSaver), same_screen YES,         XLookupString gives 0 bytes:          XFilterEvent returns: False          MappingNotify event, serial 42, synthetic NO, window 0x0,         request MappingKeyboard, first_keycode 8, count 248          KeyRelease event, serial 42, synthetic NO, window 0x2600001,         root 0xae, subw 0x0, time 1735463, (-157,221), root:(943,514),         state 0x40, keycode 46 (keysym 0x6c, l), same_screen YES,         XLookupString gives 1 bytes: (6c) "l"         XFilterEvent returns: False          KeyRelease event, serial 43, synthetic NO, window 0x2600001,         root 0xae, subw 0x0, time 1735470, (-157,221), root:(943,514),         state 0x40, keycode 133 (keysym 0xffeb, Super_L), same_screen YES,         XLookupString gives 0 bytes:          XFilterEvent returns: False      When I press Function-F1 with a text window focused, it types the letter `l`. Background information: Running Lubuntu 11.10 on a Toshiba r835. Happy to provide any further details that might be helpful. EDIT: For comparison, when I type Function-F12, I get:               KeyPress event, serial 41, synthetic NO, window 0x2200001,         root 0xae, subw 0x0, time 8369184, (-620,473), root:(480,766),         state 0x0, keycode 78 (keysym 0xff14, Scroll_Lock), same_screen YES,         XLookupString gives 0 bytes:          XmbLookupString gives 0 bytes:          XFilterEvent returns: False          KeyRelease event, serial 41, synthetic NO, window 0x2200001,         root 0xae, subw 0x0, time 8369344, (-620,473), root:(480,766),         state 0x0, keycode 78 (keysym 0xff14, Scroll_Lock), same_screen YES,         XLookupString gives 0 bytes:          XFilterEvent returns: False      I wanted to check if there's something special about the F1-F12 keys, but it looks like at least some of them work how I expect.


Shortcuts in Xfce are not working anymore

After few weeks of using Xfce I suddenly ran into following problem - my keyboard shortcuts are not working when I am using two monitors (actually one monitor and notebook itself). When I unplug notebook from docking station, everything is working fine. It used to work correctly and I am not aware of any changes I made to settings so it must be some bad update or something. I am running on Xfce 4.10 and Fedora 18. P.S. It might be related to my another question


Window buttons (minimize, maximaze, close) are not visible in Xfce

Everytime I start my laptop my GUI is "broken" - windows don't have the top border with close, minimize and maximize buttons. I know I can run `xfwm4 --daemon` but it is really bothering to do that on every startup. It used to work without any problems until last week or so. How can this be fixed? P.S. It might be connected with my other question.


How do I attach my LVM RAID's to a new Ubuntu install?

I have an Ubuntu 9 Desktop system that I mainly use as a media server. I have a 2TB RAID5 and a 500GB RAID1, both using LVM. The OS drive is a 4GB CompactFlash card which has finally run out of space. I want to put in a larger CF card and install the latest version of Ubuntu. What do I need to do in order to attach these RAIDs to the new install?


Writing scripts that use different commands in different shells

How can I write a script that is shell independent? I want to be able to run one script which will run in `ksh`, `sh` and `bash`. For example: If I have a line in my script like `whence ls` which will run in `ksh` and not in `sh`, I want to be able to have something like               if (ksh)     then whence ls     if (sh)     then whereis ls      Can I use `$SHELL` value or is there any other way?


ZFS on Linux and Amazon EC2

I have a situation where I need dynamically expandable storage space on a Linux machine running in Amazon EC2, and ZFS came to mind. If I remember properly, ZFS supports a way to dynamically expand a non-redundant JBOD-like array. I have a few requirements for a project I'm working on:   1. I should be able to move the array to another EC2 instance if need be.   2. I should be able to dynamically expand the ZFS array, adding new "drives" to the ZFS volume without any downtime. Is this possible? If ZFS provides the ability to dynamically expand the array, I should be able to run a script which would dynamically create new EBS volumes, attach them to the EC2 instance, and have ZFS add them to its pool, all dynamically without downtime.


eth0: ERROR while getting interface flags: No such device

I set up CentOS yet. it's no network connection. eth0 is not device list. I take a message `network is unreachable` while `ping 192.168.0.1` the screen shot of device list How can I do reachable network?


How to get previous year and previous month in solaris 8? I have tried below command but none of them is correct:               date +'%m' -d 'last month'     date +'%Y' -d 'last year'


Why root can't open pseudo terminal device? (permission denied)

Using a non-root user, I'm creating a pseudo terminal with socat like this:               socat -d -d PTY,link=$HOME/.wine/dosdevices/com1,raw,echo=0 PTY,link=/tmp/com1-pty,raw,echo=0      and I need a root application to open this `/tmp/com1-pty`. Any attempt to do this results in a permission denied and the following syslog message:               Feb 10 17:21:06 ti0085 kernel: [  590.692819] type=1702 audit(1392060065.998:1004788): op=follow_link action=denied pid=6091 comm="menu" path="/tmp/com1-pty" dev="sda1" ino=48758820      I have tried many things, including setting permissions for both `/tmp/com1-pty` and the device to witch it links to 777. Also I have added root to dialout group - even though I don't believe it would make any difference, for I would expect the root to be able to open anything. What I'm doing wrong?


How to configure Ruby to use the correct gemset or Ruby version on a per-project basis?

I open a terminal and navigate to my project folder (ex: `cd /proj/tickecting_app`). After this I execute this command: `rvm use ruby 1.9.x@gemset` . I want this command to run this every time I open the terminal. Is there a way to run this automatically? And to be more specific I navigate to different projects in separate tabs. For example:   * First tab `cd /proj/tickecting_app` and run `rvm use ruby 1.9.x@gemset`.   * Second tab `cd /proj/rss_feed_app` and run `rvm use ruby 2.1.x@gemset`. I want to run different commands depending upon the project. Is this possible?


All my Chromium extensions are hidden behind a single drop-down

Today I found all my installed Chromium plugin menu have become hidden behind a drop-down style: ![enter image description here](http://i.stack.imgur.com/A06xs.png) Anyone know how to get them back?


Unable to boot from Fedora LiveCD

So I finally decided to move from Windows to Linux. But before that I have wanted to try Fedora distribution from LiveCD. So I downloaded `Fedora 17` .iso file, unpacked it and then burned on my CD. I rebooted the computer and saw message saying "Select proper boot device" (and yes, I change settings right in `BIOS`). So my next step was creating LiveUSB with help of this creator. I still got the same message, even on my friends computer. File structure of the LiveUSB (CD) looks like this   * boot   * EFI   * LiveOS   * syslinux   * GPL (file) Can anybody advice what could possibly be the problem?


how to make my bash script look 100% like a GUI app (so user never sees terminal)

I created a bash script using kdialog (and it runs on Kubuntu 12.04). The GUI is used for every user interaction (after the first one). However, the script still has to be launched from the terminal and the terminal is still visible even though the user never needs to read terminal output or enter anything into the terminal. Is there a simple way to go to the next step and make my bash script look 100% like a KDE Gui application? From the initial answers by slm and Ilya Ananyev below, I see that making a .desktop file can accomplish this. That's pretty amazing to me and it is the kind of simple answer I was looking for. (I wanted a task I can complete on my lunch hour and take my bash script the rest of the way toward looking like a real GUI app.) The .desktop file may be the right answer for other readers of this question too. However, in my specific case, the script is an installer script. So I find myself in a Catch-22. How do I install the .desktop file to launch my installer without the user having to first run another installer for the .desktop file? Furthermore, in my case, the script is used by end users who are **not** computer literate. The end users purchase a computer with Linux preinstalled at my recommendation. My goal is to let them install my software without going to the terminal at all. (Most likely they have never seen a command prompt before -- some of them don't even know how to use a mouse yet!) So, it appears, my solution requires some magical way to get the .desktop file installed so that the user can then click it to launch my installer script. In summary, my main requirements are:   1. a way to launch the script without showing the terminal. **A .desktop file will accomplish this.**   2. a way to keep the terminal hidden during execution (as I rely entirely on kdialog). **A .desktop file will accomplish this with`Terminal=false` set.**   3. optionally, a secure way for the user to enter their sudo password. I know about the kdialog password entry dialog, but the usage examples I've seen are not secure. **kdesudo may be a solution but it reprompts for the password many times, ignoring the usual/default sudo timeout of X minutes. So it isn't working for me atm.**   4. simple enough to implement on my lunch hour. **A .desktop file will accomplish this.**   5. utilizes my existing bash script with kdialog. **A .desktop file will accomplish this.**   6. doesn't require the user to undertake additional setup steps before they can run my script. **It turns out that a KDE user can click a .desktop file which resides at any location. So my users can download the .desktop file into their ~/Downloads folder and launch it from there.**


403 http code appears when I go to a certain website

I wrote a PHP script to a particular site using a home computer for debugging. Script worked properly, when I tested it on a home computer. The script has stopped working when I deploy the script on the server (CentOS). I thought, that I made a mistake when writing the script, and created this issue. **Chuan Ma** suggested that the website administration blocked server IP. I wrote to the admins and they said that they do not block the IP. **My problem is that I can not go to the site using the server.** I tried several tools for getting html of the site.   1. I have tried to use the browser. I deployed on my server this script and went to the site as a real user. When I visit the site using the browser, I get an error (http code 403).   2. I have tried `curl` from the command line.               server:~# curl http://4pda.ru/          <title>403 Forbidden</title>
403 Forbidden

nginx                  3. I tried the utility `wget`.              server:~# wget  http://4pda.ru --quiet -O -     server:~#      I do not know what to do now. I would welcome any advice.


Finding a file which created X minutes back (without GNU/BSD find)

I am using the `find` command to find the files which were created with in 30 minutes.               find . -ctime -30m      But it is giving files from up to 30 days. I have tried `-mmin` too but it is showing that `-mmin` is not a valid option. What is wrong in my `find` command? Output for `uname -rs` is `AIX 2`.


exclude commands from user's sudo permissions

Consider the following line in a `/etc/sudoers` file:               username ALL=(ALL) ALL, !/usr/bin/passwd      as far as I know, this allows user `username` to use sudo, unless he not uses `/usr/bin/passwd`. But apparantly the user is still able to get a root shell using `sudo -s`/`sudo -i` and do whatever he likes. Have I understood this correctly? What would be a better configuration if I indeed want to disallow the user to change any password as root.


Dmenu does not start some programms (e.g., emacs) -- is there a log file?

I'm running dwm with dmenu under Arch Linux. While dmenu is working, it doesn't start some programs, e.g., emacs, although it shows the command with auto-completion. When I start them in the terminal, it works fine. What can I do? Is there an error log file for dmenu?


How to stop redirection in bash

I use :               exec >script.log 2>&1      in my script to redirect all output to a file. At the end of the script I would like to print a message to the screen. How do I stop the redirection?


Why is my /etc/apt/sources.list set to squeeze when I have debian wheezy?

I have set up a few new debian boxes which were installed with debian wheezy (7.1). I set them up and upgraded to the current stable release:               $ cat /etc/debian_version     7.6      If I look at my `etc/apt/sources.list` which I haven't touched at all I get:               $ cat /etc/apt/sources.list     deb http://non-us.debian.org/debian-non-US stable/non-US main contrib non-free     deb http://http.us.debian.org/debian stable main contrib non-free     deb http://security.debian.org/ squeeze/updates main     deb-src http://security.debian.org/ squeeze/updates main      The last two appear to be set to squeeze which I have not had installed on this box at all. I would like to install certain packages from unstable so am looking to add the repos following this guide. I would also like to check I have the correct canonical form of the sources.list before changing it so was wondering whether what I have is correct or whether it should be changed. I have been unable to find a canonical answer to what the default sources.list for debian 7.4 should be (I tend to use arch personally and am quite new to debian). Edit: reading here I am unsure of whether I shoud be using stable or wheezy as the variable. Thanks in advance.


Arrow key/Enter menu

I need help finding out how to possibly create a menu in a shell script that will display 3 options that a user will use the arrows keys to move the highlight cursor and press enter to select one. If anyone could possibly just make a quick example of a menu or point me in the right direction of what I should be researching that would be great. As of right now I am not really sure what I should be even searching google for. Thanks


/dev/null-like automatic trash directory for file moves?

I can (redirect) textual output to `/dev/null` in order to get rid of it. This is quite handy because this way I can easily enable/disable it in my bash code. Now I have a script that processes files, and after it is done with them, moves them to another destination. An simple example would look like this:               source_dir=some/source/path     target_dir=some/target/path     for f in `ls $source_dir`; do echo $f; mv $f $target_dir; done      Now when I decide that I'm no longer interested in moving the files to the target dir, but to delete the files directement, what is the most efficient way to achieve this (in terms of lines of code to edit)? I can think of putting the `mv` command into a variable as well:               process_cmd=echo     finnish_cmd=mv     source_dir=some/source/path     target_dir=some/target/path     for f in `ls $source_dir`; do $process_cmd $f; $finnish_cmd $f $target_dir; done      Then I could later change to something like:               process_cmd=echo     finnish_cmd=rm     source_dir=some/source/path     target_dir=     for f in `ls $source_dir`; do $process_cmd $f; $finnish_cmd $f $target_dir; done      But I thought it would be even simpler, if it was possible to specify a `/dev/null`-like trash target directory that is automatically cleaned up eventually (that is sort of `rm` semantics with the `mv` command):               process_cmd=echo     finnish_cmd=mv     source_dir=some/source/path     target_dir=/dev/null # <--- is there some sort of trash folder for such tasks?     for f in `ls $source_dir`; do $process_cmd $f; $finnish_cmd $f $target_dir; done      Is there a definitive way to go / a general best practice for a case like this?


how to convert multiple txt to CSV with field data separated by blank lines

I have some data in multiple text files where fields are separated by blank lines. There are only 4 fields but in the second field there are more subfields, could be three or more. The first field is always a number, 0 or 1.               0     name_surname     1 yellow 1 brown 2 green      short description      every file is made in the same way. The problem is I could have more or less colours in the third field. Every txt should become a row in a csv file               0 [tab] name_surname [tab] 1 yellow ; 1 brown; 2 green [tab] "description"     1 [tab] name2_surname [tab] 1 brown; 1 blue [tab] "description"      After some reading I've found I should use awk in some way, but this is beyond what I can do.


Wifi-Hardware seems not to be enabled

in my MSI Wind-Box DC 110 I have this Wifi Chip: RTL8188CE (says the sticker on the chassis and the vendor told me that they are sure the device is implemented) and I cannot connect to any Wifi - still I don't see even the "Wireless Connections" Overview in the Network Dialog... I am Using Ubuntu 12.04. _I already changed the driver to the right version following this tutorialhttp://unixblogger.wordpress.com/2011/10/18/the-pain-of-an-realtek- rtl8111rtl8168-ethernet-card/ And the r8168 Driver is in use. (which was for the ethernet controller and had nothin todo with my problem :( )_ But no Wifi LED is shining and no Wifi connections are listed. There is no hardware trigger on the device to enable or disable Wifi What can I do? It seems that I cannot detect the device... **UPDATE**               $: iwconfig     eth0      no wireless extensions.          lo        no wireless extensions.      lsusb:               Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub     Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub     Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub     Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub     Bus 001 Device 007: ID 046d:c018 Logitech, Inc. Optical Wheel Mouse     Bus 001 Device 008: ID 05ac:0221 Apple, Inc. Aluminum Keyboard (ISO)     Bus 001 Device 003: ID 0bda:0139 Realtek Semiconductor Corp. //a card reader     Bus 001 Device 004: ID 0409:005a NEC Corp. HighSpeed Hub     Bus 002 Device 003: ID 0781:5571 SanDisk Corp. //a usb stick     Bus 001 Device 005: ID 05ac:1006 Apple, Inc. Hub in Aluminum Keyboard     Bus 001 Device 006: ID 04e8:6881 Samsung Electronics Co., Ltd //a mobile phone      lspci:               00:00.0 Host bridge: Intel Corporation 2nd Generation Core Processor Family DRAM Controller (rev 09)     00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)     00:16.0 Communication controller: Intel Corporation Panther Point MEI Controller #1 (rev 04)     00:1a.0 USB controller: Intel Corporation Panther Point USB Enhanced Host Controller #2 (rev 04)     00:1b.0 Audio device: Intel Corporation Panther Point High Definition Audio Controller (rev 04)     00:1c.0 PCI bridge: Intel Corporation Panther Point PCI Express Root Port 1 (rev c4)     00:1d.0 USB controller: Intel Corporation Panther Point USB Enhanced Host Controller #1 (rev 04)     00:1f.0 ISA bridge: Intel Corporation Panther Point LPC Controller (rev 04)     00:1f.2 SATA controller: Intel Corporation Panther Point 6 port SATA Controller [AHCI mode] (rev 04)     00:1f.3 SMBus: Intel Corporation Panther Point SMBus Controller (rev 04)     00:1f.6 Signal processing controller: Intel Corporation Panther Point Thermal Management Controller (rev 04)     01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 06)


Utility to tag regions of audio files

For example, say I have a recording with lots of noise and people speaking, I'd like to tag areas where people are speaking with a 1, and by default everywhere else is 0. Then save this file separately, one tag per sample. _mhWaveEdit_ has an ideal user interface to do this, but this tagging functionality isn't included and the project seems to be moribund at present.


how to tell hibernate, if battery low

I need to tell to `power-manager` (with `gnome-shell`) , if battery is low,`pm-hibernate` will be run. Now i want to tell via `gsettings commmand`. How can i do it?


Show command executed along with output in log file

Is there a quick and dirty way to not only log the output of a shell file but the commands used inside as well? For example: `whoami > who.dmp` would output a file that contained something like: `my_username` For a longer shell file, what is the most effective way to display the command that caused the result in the log file as well Ex:               log.txt     ###############          echo whoami  <- I want this to show in the file as well     my_username          time   <- I want this to show in the file as well          real    0m0.00s     user    0m0.00s     sys     0m0.00s      Is there a way to do this without hard-coding exporting the command into the output file every single time?


How to copy a file within its original directory, most easily?

What I want to do is basically               cp long/directory/path/file long/directory/path/file-copy      This or similar operations are pretty common. Typing out the whole path twice is obviously awkward, even with auto-completion or copy-paste. There are a couple of simple ways to do it, but none seems ideal:   * First `cd` into the directory, then simply `cp file file-copy`. Least keystrokes, but I end up in the directory, which I didn't really want.   * Wrap the above in a subshell, `sh -c 'cd dir-path; cp file file-copy'`, to make the `cp` local. Fair enough, but that means I have to type the commands in a string literal, which disables auto-completion and isn't overall nice.   * Define the dir as a variable, then just `cp "$dir/file" "$dir/file-copy"`. Can work nicely, but I'm kind of paranoid about namespace pollution...   * `echo dir-path | while read p; do cd "$p"; cp file file-copy; done`. Basically combines subshell-wrapping with variable definition, by emulating a lambda-calculus stype let-binding with `read`. I quite like it, but it's just a bit weird, and involves a lot of extra characters.   * Anything I can come up with that uses `sed 's/file/file-copy/'` needs even more boilerplate around it.   * _Open_ the file with an editor, then save-as. Not well applicable to non-text files, and often resource-costly. Is there a more elegant alternative? Ideally one that works with `mv` as well, analogously.


/long/path/to/{multiple, files} syntax?

> **Possible Duplicate:**   >  Quick way to include a directory path when calling mv? Is there any way in bash to type a path once, and then reference several files at once? Here's what I do now: ` cd /origin/path/   mv file1 file2 ../../destination/path/ ` Here's what I'd rather do: ` mv /origin/path/{file1, file2} /destination/path/ ` possible? Thanks!


Quick way to include a directory path when calling mv?

Often I will work out of the root of a rails directory where I find my self navigating the same path twice every time I would like to move a file:               mv app/views/layouts/application.html.erb app/views/layouts/application.html.haml      The haml is just one of may examples where I need to change the file name without modifying the directory it currently lives in and without changing directory. Is there a way to achieve this?


Rename file in another directory without repeating path

I often need to make a small change to a file nested several directories below my current working directory. Since it's only one file, and globbing/scripting would be overkill, I make the change manually. For example, I need to rename the file `blaz.txt` in ./foo/bar/blee to `foobar.txt`:               .      |--foo       |--bar          | blee            |-- blaz.txt      Normally, I do this by `cd`'ing to `blee` and running `mv blaz.txt foobar.txt` for single files. I know I could type out the full paths (resting on some handy tab completions to speed things up), but I would prefer something quicker. Is there a better way to do this?


Is there a way to refer to multiple files in a directory without retyping the whole path?

In a bash shell, when I have to remove multiple files in the same directory, I currently need to do something like this: `rm /some/path/file1 /some/path/file2` Is there a shorter way to write this so I don't have to retype `/some/path/` without using a variable or changing the working directory? Perhaps something similar to: `rm /some/path/(file1,file2)`


Minimal command to make a copy of a file

I often find myself copy-pasting long path in order to create a copy of a file               cp /path/to/file/file1 /path/to/file/file1.bkp      Is there an alternative utility that will NOT require me to type the path/to/file twice? Something like -               nameOfExecutible /path/to/file/file1 'bkp'      Note: I don't want to do a `cd` to `file1`s parent directory.


Quickest way to rename files, without retyping directory path.

I know how renaming files in Linux :               $ mv ~/folder/subfolder/file.txt ~/folder/subfolder/file.sh               ^------this part-------^    ^------this part-------^      I think it takes too long time to repeat `~/folder/subfolder/file` twice. Is there any fast way ?


find the set of common files between several directories?

I'm looking to compare directories of Drupal themes. A drupal theme is a directory composed of several files, and I'm trying to figure out which ones are essential. For instance, they might all have a file called `template.php` or `page.tpl.php`. How can I find the set of all common files for several directories? In my case, all the 'same' files (those of the same name) are going to be in the same level directory.


Pasting binary data into a Unicode terminal

I need to be able to paste binary data into a terminal. For some reason, every byte outside the ASCII range (`0x80`-`0xff`) is pasted as the same three byte sequence `0xef 0xbf 0xbd`. For example:               $ echo -en "\x80" | xclip     $ hd     <paste><EOF>     00000000  ef bf bd                                       |...|     00000004      It has something to do with the character encoding used by the terminal since if I change it from UTF-8 to ISO 8859 or similar every character in the extended range is translated to `0x3f`. Does anybody have an idea on how to paste arbitrary binary data into the terminal? **Edit:** This seems to be very terminal dependent. The example above is in Konsole. I get the desired behavior in xterm and Gnome Terminal doesn't allow to paste characters in the extended range at all. Any Konsole specific solution would still be appreciated.


SH process is using 50% of CPU, why is that?

I have CRON running every 30 seconds, but that would fall under the `crond` process correct? Why is `sh` command sucking up 50% of my CPU when no one is running a Shell Script?


RHEL6 LDAP client not listing all the groups

Using sssd I have a RHEL6 client configured to login using LDAPS. The login works, but if the user logged in is assigned to more than 1 group at the LDAP level, groups only returns 1 group? Could I be missing a configuration somewhere? The group shown is the default group assigned to the user. In RHEL5 clients, the group command displays all the groups that are assigned to the user.


rsync "Permission denied" despite ownership

I just rsync'd a bunch of files, from a Windows box running cygwin sshd, to a CentOS 6.4 box. I ran `rsync -e sshd...` on CentOS to do this. Then I plugged in a USB drive on the CentOS box, formatted as ext4 using `mkfs.ext4`, and mounted it at /mnt/backup **(with no extra options)**. Then I did `chown` on /mnt/backup, and ran `rsync -vrlptg` to copy the files from the CentOS box to /mnt/backup. A handful of random files (a few dozen of a few hundred thousand, mainly from 4 different directories, but not all of the files in those directories) failed with permissions errors. But when I `ls -l` on the CentOS box, it shows that I own all of them. If I `sudo rsync` instead, it copies everything without complaining. Why does it seem that rsync thinks I don't have permission to copy my own files to my own drive? **Update** : although earlier it said `myuser` owned them, I've since run a `sudo rsync -e sshd` and now most (but not all) files, despite being in a folder in my home drive on the CentOS box (/home/myuser) are now no longer owned by `myuser myuser` but instead are owned by `513` or `dialout`, which I never set up as users.


Finding log file of ntp daemon in Ubuntu 10.04 LTS

My Ubuntu is set to run `ntp` before `dovecot` at startup. (See my earlier question: The rc0.d,rc1.d,... directories in /etc in Ubuntu 10.04 LTS) However, I suspect that `dovecot` may have finished executing before `ntp` finished (even if the `ntp` started executing earlier). What logs should I look at to find out whether this was the case? * * * (In case you're interested: The reason for my suspicion is a message like this in `/var/log/mail.log` when I rebooted my machine (it had been a long time since the last reboot): > dovecot: Fatal: Time just moved backwards by 43 seconds. This might cause a > lot of problems, so I'll just kill myself now. This was fixed by rebooting the machine again, providing further support for my suspicion.)


Driverless Windows webcam supported by UVC under 3.10 kernel?

There are 'driverless' webcam that plug into Windows 7 and will work directly without driver, in same way as USB finger disk, just plug in and work automatically. Is it true that the mechanism works because the webcam conforms to UVC standard? UVC is new to me but I read some info from http://www.ideasonboard.org/uvc/ http://en.wikipedia.org/wiki/USB_video_device_class Is it true that these UVC webcam will work with Raspbian Debian Wheezy with 3.10 kernel, since UVC and V4L2 are included in kernel since 2.6.26?


Restarting gnome-shell - KDE programs look ugly

I needed to restart my gnome-shell. I did this on the tty1 via `export DISPLAY=:0.0` `gnome-shell --replace` This helps to keep all the open programs, but all KDE program have a different (e.g. ugly) window decorations. Then I tried `kwin --replace` which looked pretty cool for 5 secs and then I found out, this won't work :) Is there a way to get back the former looks? (QT and XUL programs still look fine, firefox and others)


How to do domain filtering in Linux?

Preferably something similar to `iptables`. Basically, I want to do domain filtering/whitelisting/blacklisting like I would with IPs in `iptables`. Are there any recommendations on how to do this?


Can I "drag" a file into a window without a file manager?

(I'm on Arch Linux, using i3 as my wm and xterm as my terminal emulator, though I don't know if any of that is relevant.) Occasionally, a website asks me to drag a file with my mouse from my desktop into the internet browser's window. Almost always, there is an alternative, but recently I found something I want to do that requires the drag and drop. Unfortunately, I don't have a file manager. I navigate my computer's file system solely through bash. Is there a way I can fake the drag and drop action? Can I tell my browser "I just dropped this file onto you" without actually doing it? Worst case scenario, I can download a graphical file manager exclusively to drop files into my web browser, but I'd like to avoid that solution.


How do I get Ctrl + Alt + t to launch ther terminal in Linux Mint 13 MATE?

Pressing `Ctrl` + `Alt` + `t` seems to do nothing on my Linux Mint 13 MATE. How can I set this shortcut to launch a terminal window? As a detail, it seems the terminal is `mate-terminal` rather than `gnome- terminal`.


yum install wireshark-gnome

I tried using command `yum install wireshark-gnome` to install wireshark on RedHat 6.3. And I make sure the network is ok. But it fails cause by below prompt.               Loaded plugins: product-id, security, subscription-manager     Updating certificate-based repositories.     Unable to read consumer identity     Setting up Install Process     No package wireshark-gnome available.     Error: Nothing to do      It looks repository of yum does not work. It should not have wireshark installation package. So I try intall new repository as below.               wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm     wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm     rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm      It still does not work. Could you help me to find a usable repository?


How can I enable URL rewriting on a DD-WRT router?

I would like to be able to add a parameter to certain URL requests that go through my DD-WRT router. Specifically, I'm trying to figure out how to force safe search in Google, which means I have to append `safe=on` to any URL requests that begin with `*google*`. I've read about running a server on the router that acts as a proxy. Then on that server I could use mod_rewrite or something similar. I've also read about firewall rules using iptables. Both of these are way over my head, but I can't seem to find any real guidance on this.


How can I block a specific URL on a DD-WRT router?

I've been looking everywhere for this. Does anyone know how to block a specific URL on a DD-WRT router? For example, I want to block `website.com/whatever` but not `website.com`, `blah.website.com`, or `website.com/blah`. Is there a way to do this, or can you only block the whole domain? I tried adding the URL in question under Access Restrictions in the DD-WRT configuration but it doesn't seem to have any effect. Here are my settings: ![enter image description here](http://i.stack.imgur.com/mPIcR.png) and here is the list of clients: ![enter image description here](http://i.stack.imgur.com/SwQGx.png) I can still easily browse to google.com/imghp and google.com/images (which redirects to google.com/imghp) on my main PC with IP address 192.168.1.146. On this page of the DD-WRT wiki, it says "Under Website Blocking by URL Address, enter in the domain name(s) you wish to block (if any)." This, in addition to posts on the DD-WRT forums, gives me the impression that you can only block domains under Access Restrictions in the DD-WRT setup. I'm starting to wonder if this problem must be solved using iptables, or possibly by installing a proxy server on the router itself. # EDIT User goli on the DD-WRT forums had this to say on the matter (link): > There's a Privoxy version that runs on DD-WRT quite well. I just installed > it. > > Privoxy has a parameter "accept-intercepted-requests 1" that allows to use > it as a transparent proxy. > > I added a single iptables rule that passes some web traffic requests to the > proxy instead of directly routing it: >   >   >     iptables -t nat -A PREROUTING -i br0 -p tcp --dport 80 -s > 192.168.0.128/255.255.255.224 -j DNAT --to 192.168.0.1:8118 >   > > Privoxy has so called "actionfiles." Those define what to do when a request > URL matches a given regular expression. One of the possible actions is > "block." Since then, I've been working on figuring out how to install Privoxy on the router. It's rather complicated, especially since I don't have enough spare flash memory to install it via SSH using ipkg. (See this question on Super User.) My second approach is to use the Firmware Modification Kit, which you can read about here. I've had some difficulty flashing a custom build, but once I get it all sorted out I'll post my results here.


Querying display power status on Linux (Xorg) on command line

Is there a way to query the power status of an Xorg/X11 display from command line? I want to know if my laptop LCD is powered on after the screen saver-- apparently the backlight is still on. This is despite my gnome-screensaver- preferences setting that after 5 minutes of idling, the display is supposed to go to sleep. I am using Debian 6 and whatever x server comes with it. I see that `upower` utility has some nifty switches, but they are not documented.


Is there a light HTTP proxy I can run without root privileges?

I am on a network where outgoing port 8080 is blocked on most machines (i.e. I cannot access services on port 8080). Some of the machines on the network however do not have this restriction. I would like to run a proxy on an unrestricted machine and forward outgoing requests to 8080 via that proxy. I do not have root access on any of these machines. I have looked at squid, which compiles fine on the machine I want to run the proxy on, but as it is a service I do not think I can run it effectively without root access. I have also experimented with ssh port forwarding, but as there is no service running on the unrestricted machine I don't think ssh will solve my problem. If there is some other way to achieve this objective I am open to that too.


Allowing user to read only parts of NTFS filesystem

After installing ntfs-3g I have an option in nautilus to mount a Windows directory but I need to give root password. While I have no objection to giving root password I would prefer to be restricted to permission of corresponding Windows user (i.e. disallowing modification of system files). Is is easily achievable or do I need to post feature request?


"No protocol specified" when running vim with sudo

Recently I start to get "No protocol specified" when using `sudo vim`. It's just a warning I guess, because everything was working normally (I can open, edit and save files). The message doesn't appear if I use `sudo -E vim` so I think I did something wrong when editing `/etc/profile` recently, but I'm not sure. How can I fix this?


Curl and grep html text

Is there a way to grep html text from a curl request and output grab the value that is between two html tags? More specifically the input value of a form?


Can I easily remount an external USB drive without unplugging it?

Sometimes, a USB drive (or equivalent) that I have plugged in to my machine gets unmounted. Now, I know I could unplug it and plug it back in to remount it, but is it possible to **easily** do it from within the system? For me, "easily" means "without using sudo" and without having to set up any special files, permissions, groups, or directories. It happens infrequently enough that things like that would be overkill. But somehow having to unplug and replug the drive in seems ... not quite right, somehow. I'm using Debian Squeeze with Gnome, in case that makes a difference.


how to make PKG_CONFIG_PATH variable to refer an installed library?

I am in the process of installing the required libraries for FireFox 3.6 on a Redhat Linux Nash 4.x system. I already have successfully installed the glib2.12.0 library, but When I ./configure the atk 1.9.0 library I get the following error.               checking for pkg-config... /usr/bin/pkg-config     checking for GLIB - version >= 2.5.7... no     *** Could not run GLIB test program, checking why...     *** The test program failed to compile or link. See the file config.log for the     *** exact error that occured. This usually means GLIB is incorrectly installed.     configure: error:     *** GLIB 2.5.7 or better is required. The latest version of     *** GLIB is always available from ftp://ftp.gtk.org/. If GLIB is installed     *** but not in the same location as pkg-config add the location of the file     *** glib-2.0.pc to the environment variable PKG_CONFIG_PATH.      How can I add the path to the Environment variable?


Any program like `sudo` to gain root by having two users enter a password?

I run a server which is used by a group of individuals for e-mail, mailing lists, personal web homes etc. I thought about ways to provide root access for other members to allow them handling problems on the server. But I don't like to give full root privileges to everyone. What about the idea that **two** users must enter the password in `sudo` style to open a root shell? This would prevent a single user from hijacking the whole server. To increase security any number of needed user passwords above 1 could be used. As I see now this could be a nice way to provide root access within a group of people who know each other quite well and live nearby.   * Do you know such a program?   * what do you think about the concept in general?


Prevent GNU Screen from closing

Is there any way to make GNU Screen not close if I end all its subprocesses? Ideally, it would create a new window running a shell if I accidentally closed the last window.


Why is `tac file | grep foo' (piping) faster than `grep foo < <(tac file)' (process substitution)?

_This question was motivated by "Reverse grepping", about grepping a huge file from bottom up._ @chaos said: > >     tac file | grep whatever >   > > Or a bit more effective: >   >   >     grep whatever < <(tac file) >   @vinc17 said: > The `< <(tac filename)` should be as fast as a pipe There are also many interesting comments from other users. My questions:   * What is the difference between `|` and `< <()`?   * Why is one faster than other?   * And which is really faster?   * Why did no one suggest `xargs`?


How can I hide messages of udev?

When I plug in a usbhub (7 sticks in) udev displays a lot of messages in console. Can I hide these messages or send them to /dev/null?


Kernel modesetting hangs my boot, but the ATI driver requires it

I have a late 2011 MacBook Pro. It has an integrated Intel video card and a discrete ATI video card. Ideally, I'd like my Xorg to use the ATI card with the free driver (no Catalyst). Here's the problem: kernel modesetting hangs my boot (verified by adding `nomodeset` to kernel parameters), and I can't figure out why. However, the ATI driver _requires_ KMS, as does the Intel driver. What are my options for getting graphics with the desired setup as described above? I'm on kernel 3.13.8, Arch GNU/Linux. I've also tried it with kernel 3.10.35, AKA the LTS kernel. No luck. As suggested in comments, I've tried to ping the affected machine after it locks up. I can't tell for sure, but it appears that it's completely frozen, not just the display. I've also tried booting into Mac OS X and using gfxCardStatus to force using the Intel card. This did nothing. In order to try to get more information, I've booted the MacBook with the following kernel parameters appended to my normal kernel line (the regular kernel, not the LTS kernel, and with `quiet` removed), and with gfxCardStatus set to on-the-fly switching (this seemed to revert automatically on a reboot of OS X):               rootwait ignore_loglevel debug debug_locks_verbose=1 sched_debug initcall_debug mminit_loglevel=4 udev.log_priority=8 loglevel=8 earlyprintk=vga,keep log_buf_len=10M print_fatal_signals=1 apm.debug=Y i8042.debug=Y drm.debug=1 scsi_logging_level=1 usbserial.debug=Y option.debug=Y pl2303.debug=Y firewire_ohci.debug=1 hid.debug=1 pci_hotplug.debug=Y pci_hotplug.debug_acpi=Y shpchp.shpchp_debug=Y apic=debug show_lapic=all hpet=verbose lmb=debug pause_on_oops=5 panic=10 sysrq_always_enabled      ![Very end of boot process log](http://i.stack.imgur.com/JoIsh.jpg) ![Entire end of boot log](http://i.stack.imgur.com/joFZ8.jpg) When I try to start GDM using either the ATI or Intel drivers, booted without KMS, Xorg fails with a message about not finding a suitable driver (expected, since the Intel/AMD drivers need KMS). I've also tried using the `xf86-video- vesa` package, but that fails with a message about having a suitable driver but not having a suitable configuration - something about the BIOS not being right. I've tried using PRIME, but since I can't get Xorg to come up even without acceleration or anything fancy, `xrandr` doesn't work and I can't even get past the first step. I've thought about using vgaswitcheroo or something related, but I don't think that will do anything due to the fact that the underlying issue is, I believe, the fact that KMS is hanging. The final thing I've tried is using the proprietary Catalyst driver, due to the fact that it has it's own KMS implementation, but I couldn't get it to install due to an Xorg server version mismatch. And honestly, I have less than zero desire to use a proprietary driver if I can help it, so I didn't try very hard. I've sent the Linux Kernel Mailing List an email about this, and hopefully someone will get back to me. Is it possible that I've run into a kernel bug or an Xorg bug worth reporting? I've Googled, but nothing helpful's come up.


Increasing Command Line Resolution Centos 6.4 VirtualBox

I running CentOS 6.4 in just CLI mode. However, I have a 1080 monitor and the resolution from the CLI interface is horrible. Do I still have to install Guest Additions in order to increase display resolution.


Change and save pdf annotation setting in Okular?

In Okular,   1. I add inline notes to a pdf file. I change the default settings for inline notes:     * from default font "Ubuntu 13" to "Ubuntu 6", and      * from default opacity 100% to opacity 0%.  But I have to change the settings for every inline note. I wonder if it is possible to change the settings and save the change for the following inline notes?   2. Also how can I create a inline note without the box-line boundary?   3. How can I move a existing inline note to another place? Thanks!


Need help installing NVIDIA graphics driver for Optimus configuration

I have followed the following steps to get Optimus/Bumblebee configuration running on Fedora 20 (fresh basic installation) on my brand new laptop (based on msi barebone MS-16GC). I have listed all steps, very similar to this link The end result has x not booting, I can boot to a terminal. I feel I am stuck at the last step, please help: These are the steps I have taken 1) My BIOS does not support switching on/off the nvidia card 2) Fedora 20 was installed from live cd - kernel/software updated - kernel-devel and kernel- headers are installed, along with gcc-c++ and lshw. NVIDIA display driver version 331.20 is downloaded, but not installed yet. 3) Subsequent current kernel: 3.11.10-301.fc20.x86_64 4) lspci gives two devices of intrest               00:02.0 VGA compatible controller: Intel Corporation 4th Gen Core Processor Integrated Graphics Controller (rev 06)     01:00.0 3D controller: NVIDIA Corporation GK106M [GeForce GTX 765M] (rev a1)      lshw shows that the NVIDIA card uses nouveau                *-display                  description: 3D controller             product: GK106M [GeForce GTX 765M]             vendor: NVIDIA Corporation             physical id: 0             bus info: pci@0000:01:00.0             version: a1             width: 64 bits             clock: 33MHz             capabilities: bus_master cap_list rom             configuration: driver=nouveau latency=0             resources: irq:16 memory:f6000000-f6ffffff memory:c0000000-cfffffff memory:d0000000-d1ffffff ioport:e000(size=128) memory:f7000000-f707ffff          *-display          description: VGA compatible controller          product: 4th Gen Core Processor Integrated Graphics Controller          vendor: Intel Corporation          physical id: 2          bus info: pci@0000:00:02.0          version: 06          width: 64 bits          clock: 33MHz          capabilities: vga_controller bus_master cap_list rom          configuration: driver=i915 latency=0          resources: irq:43 memory:f7400000-f77fffff memory:b0000000-bfffffff ioport:f000(size=64)      In preperation of driver NVIDIA driver install 5) blacklist nouveau, by creating a file blacklist.conf in /etc/modprobe.d/ with the line `               blacklist nouveau      Reboot               mv /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r)-nouveau.img     dracut /boot/initramfs-$(uname -r).img $(uname -r)      Reboot And in /etc/default/grub I added rdblacklist=nouveau to GRUB_CMDLINE_LINUX Followed by the grub2-mkconfig > /boot/grub2/grub.cfg command Reboot the computer (just to be sure) lshw now outputs the following - no sign of nouveau is disabled - device is UNCLAIMED.                *-display UNCLAIMED                     description: 3D controller                     product: GK106M [GeForce GTX 765M]                     vendor: NVIDIA Corporation                     physical id: 0                     bus info: pci@0000:01:00.0                     version: a1                     width: 64 bits                     clock: 33MHz                     capabilities: bus_master cap_list                     configuration: latency=0                     resources: memory:f6000000-f6ffffff memory:c0000000-cfffffff memory:d0000000-d1ffffff ioport:e000(size=128) memory:f7000000-f707ffff      *-display                  description: VGA compatible controller                  product: 4th Gen Core Processor Integrated Graphics Controller                  vendor: Intel Corporation                  physical id: 2                  bus info: pci@0000:00:02.0                  version: 06                  width: 64 bits                  clock: 33MHz                  capabilities: vga_controller bus_master cap_list rom                  configuration: driver=i915 latency=0                  resources: irq:43 memory:f7400000-f77fffff memory:b0000000-bfffffff ioport:f000(size=64)      6) Next I create a file in my home directory called .xinitrc containing following lines               xrandr --setprovideroutputsource modesetting NVIDIA-0     xrandr --auto     exec gnome-session      7) Then I create a file in /etc/X11 called xorg.conf2 containing following data               Section "ServerLayout"         Identifier "layout"         Screen 0 "nvidia"         Inactive "intel"     EndSection          Section "Device"         Identifier "intel"         Driver "intel"     EndSection          Section "Screen"         Identifier "intel"         Device "intel"     EndSection          Section "Device"         Option "ConstrainCursor" "no"         Identifier "nvidia"         Driver "nvidia"         BusID "PCI:1:0:0"     EndSection          Section "Screen"         Identifier "nvidia"         Device "nvidia"     #Comment to output using hdmi cable        Option "UseDisplayDevice" "none"     EndSection      8) Time to install the drivers /* I get stuck here */ Type chmod +x NVIDIA* And then ./NVIDIA* Next I move xorg.conf2 to xorg.conf This installs fine, but when rebooting all I get is a black screen, I can log in to ttyl when I type startx from command line same problem, just black screen. Please help!


Does OpenBSD have a limit to the number of file descriptors?

What's the maximum number of file descriptors that a process can get on OpenBSD successfully? For example, there is an **`openfiles`** limit in **login.conf(5)** in OpenBSD. If I want to have as many file descriptors as possible, but still don't let a runaway process to bog down the system, what would be a sensible value to set? E.g. if I specify, say, `20000`, will the kernel be capable of giving my application all of these 20000 FDs? What if I'm running multiple instances of a given application (e.g. multiple worker processes)?


Programmatically get folders last edit time

How can I programmatically get a folders latest edit? I have already written the following script:               #!/usr/bin/perl     my @ls_command_result=qx(ls -l);     my @the_folder=grep /folder_i_want/, @ls_command_result;     print STDOUT "@the_folder";      Using this script i can get the latest edit date of the folder, but the problem is that I just get it as a string, but i will be needing to compare this outcome to other dates and therefore it would be vastly better to have it in the format of say, epoch second. How would it be best to go about getting this information?


How to forward one port to another (on the same machine)?

A machine (M) is behind a NAT. Port X is forwarded through, and available to the internet. My application wants to connect to port Y. How to I configure M to forward incoming data on port X to port Y?


Some UTF-8 characters not being recognized by grep or sed

Trying to determine all characters in a file. The file `sample` consists of:               a eɪ     abandon əˈbændən     ability əˈbɪləti     able ˈeɪbəl     able ˈeɪbl     abortion əˈbɔrʃən     abortion əˈbɔrʃn     about əˈbaʊt     above əˈbʌv     abroad əˈbrɔd      Confirmed locale is correct:               $ echo $LANG          en_US.UTF-8      A command to take the second field, split by character, then count how many:               $ cat sample | awk '{print $2}' | grep -o . | sort | uniq -c | sort -n            1 a       1 æ       1 i       1 v       2 d       2 t       3 e       3 l       3 ɔ       3 r       4 n       9 b      11 ə      17 ɪ      Where is `ʃ` and `ˈ`? They aren't combining characters or anything special. Note that other UTF-8 characters are pulled out: `ɔ`, `ə` and `ɪ`, for example. BTW using `sed 's/\\(.\\)/\1\n/g'` has nearly the same results as `grep -o .`, except it adds a line for '\n'. Is there something I'm missing? Does grep have a hidden UTF-8 option? In case it matters I'm using `Ubuntu 12.04.2 LTS`.


Remotely compile and run program using ssh and screen

I'm trying to compile and run a program remotely. However, I'd like to this within a screen and also I'd like to run this using grid engine on another node after I ssh. Currently I have:               ssh me@server screen -R session 'qlogin; cd path; mvn options program'      This basically works, but I get a message saying that I must be connected to a terminal. I read about this and added the -t option to ssh. With that, my command breaks: it seems like I ssh over, screen starts, then doesn't know about the "mvn" command and terminates my session. I'm wondering why this is happening and how to correctly launch jobs from my local machine, within a screen, on a remote node while using grid engine.


How to find out whether a shell script is written in bash or sh

How can I find out whether a script is written in `bash` or `sh`? The first line of the script is not helpful here, since on Linux, bash scripts have this line: `#!bin/sh` Actually, there are many distribution where `/bin/sh` is bash (maybe `/bin/sh` is a link to `/bin/bash` in those distributions), and not Bourne Shell. So if I try to run a script that is written in bash in, for example, FreeBSD, the result is not defined, since `/bin/sh` in FreeBSD is Bourne Shell, and not bash. Is there are easy way to identify if a script is bash or sh? Are there some distinctive things in syntax?


What documentation shows the associated numbers for linux signals like SIGTERM and SIGKILL?

I can look around the internet and find that the associated number for SIGKILL is 9, but is there linux documentation (such as, a man page) showing the complete list of signals and their numbers?


ImportError when running WSGI app in Apache: undefined symbol: PyUnicodeUCS2_DecodeUTF8

I'm trying to run MoinMoin under Apache on SLES 11P1. I'm getting the following error in my Apache log when somebody tries to access the site:               mod_wsgi (pid=20772): Target WSGI script '/srv/www/wiki/moin.wsgi' cannot be loaded as Python module.     mod_wsgi (pid=20772): Exception occurred processing WSGI script '/srv/www/wiki/moin.     wsgi'.     Traceback (most recent call last):       File "/srv/www/wiki/moin.wsgi", line 44, in <module>         from MoinMoin.web.serving import make_application       File "/usr/local/lib64/python2.6/site-packages/MoinMoin/web/serving.py", line 14, in <module>         from MoinMoin import version, log       File "/usr/local/lib64/python2.6/site-packages/MoinMoin/log.py", line 92, in <module>         import logging.config       File "/usr/lib/python2.6/logging/config.py", line 30, in <module>         import sys, logging, logging.handlers, string, socket, struct, os, traceback, types       File "/usr/lib/python2.6/logging/handlers.py", line 27, in <module>         import logging, socket, types, os, string, cPickle, struct, time, re     ImportError: /usr/lib64/python2.6/lib-dynload/cPickle.so: undefined symbol: PyUnicodeUCS2_DecodeUTF8      However, I have no problem if I execute the failing statement manually from a Python interpreter:               $ python     'import site' failed; use -v for traceback     Python 2.6.6 (r266:84292, Feb 17 2011, 08:36:48)      [GCC 4.3.4 [gcc-4_3-branch revision 152973]] on linux2     Type "help", "copyright", "credits" or "license" for more information.     >>> import logging, socket, types, os, string, cPickle, struct, time, re     >>>      What could cause that error when running under Apache, but not when running Python at the command-line? Edit: It looks like they are hitting different shared libraries. Apache is hitting `/usr/lib64/python2.6/lib-dynload/cPickle.so` and the Python interpreter that I invoke at the command-line is hitting `/usr/lib/python2.6/lib-dynload/cPickle.so`               $ python -v      ...     >>> import cPickle     dlopen("/usr/lib/python2.6/lib-dynload/cPickle.so", 2);     dlopen("/usr/lib/python2.6/lib-dynload/cStringIO.so", 2);


Linking ".." do somewhere other than parent directory and other strange fs beharviors

Can the entry ".." become linked to someplace other than the parent directory? Is it possible to cause "tar" to create this weird behavior? Scenario: I have a pre-built compiler to a embeded system, distributed as tar.gz files, which works perfectly in Ubuntu 10.04. When testing an upgrade to Ubuntu 12.04 in a VirtualBox VM, it failed to find out some header files. Exploring the files for the cause of the problem, I noticed it became lost following "/a/somewhat/convoluted/../../path/../full/of/up/../references/". Exploring a bit more, I found some strange behavior:   * "ls /that/strange/../../path" shows me the files as expected.   * typing "ls /that/strange/../../path" in bash for a list of files inside "/that/strange/../../path" (ie, triggering the filename completion without running "ls") shows me a DIFFERENT list of files.   * when I fix the path interpreting the ".." by hand, both outputs are the same. I suppose "ls" and the filename globbing differ in the way they find the files (opendir/readdir, glob, etc.) and one of these operations steps in a filesystem error. Running fsck in the VM resulted in nothing unusual. Same result for installing the compiler again in a new VM. "tar" returned no error. Do somebody got this kind of problem?


Mouse sensitivity confusion

In my few years of using Linux from using Windows for so long, there have been many new concepts for me to grasp. One of the more obvious seeming mysteries to me is how the mouse is configured in Linux. As a life-long Windows gamer, I've always seen mouse acceleration as my nemesis, as I would expect many gamers. I can remember being baffled when I first started (using Fedora 9) and finding that I had no mouse acceleration when the acceleration level was in the _middle_ , not when it was turned right down. From then until Fedora 14 it was all dandy set like that, but when I recently moved to Fedora 17, these settings don't feel right. The only time I don't have acceleration is when the acceleration is turned right down, except then the mouse is very insensitive and the sensitivity level makes _no difference_ at all. I read recently about a command called `xset` which lets you have control over the actual values of the variables 'acceleration' and 'threshold' (the number of 'dots' travelled at which point the cursor should accelerate), and someone suggested that perhaps the way to have no acceleration is to set threshold to 1 and use the acceleration value as the sensitivity. However, this doesn't work, even with the threshold set to 1. I can still clearly detect acceleration. I know I'm using vague words, but you'll have to take my word for it when I say it "feels" like it has acceleration, no matter what I set it to. Even now, as I'm clicking in this text box to correct typos, I'm not hitting the right spot as I would do on Windows with my normal mouse motion because of it. I should mention that I don't use a fancy mouse or anything; it's just a Microsoft IntelliMouse Optical that you might find in an office (yes, not the favourite mouse for gamers). Have I missed something obvious, or is it really a complicated thing to change? * * * EDIT: this post: > (Some settings to remove mouse acceleration.) ... So now we have no > acceleration, but is that what we want? The mouse is a bit slow now. Sadly > that's how it is. With acceleration disabled you get a 1:1 relationship > between the mouse and the display. You move the mouse left one dot and the > mouse pointer moves one pixel left. If there were a way to multiply the > input movement (say by 2) then every other pixel on each axis would be > inacessible to the mouse. That would make accurate positioning of the mouse > pretty difficult. The 'sensitivity' setting in some GUI mouse control panels > actually does the opposite of what you would expect - the most sensitive is > a 1:1 ratio - it's the acceleration which makes it seem so much faster. I find this a bit hard to believe, or at least that sensitivity does move a number of dots on screen per dot moved by the mouse.


Simple example of using Fedora alternatives to install old version of make

Can anyone help me using the Fedora alternatives system in order to install an old version of make? I know the actual program is irrelevant, but I need it so I'll use it as my example. I currently have `make-3.82` installed on my Fedora 14 box, but I need to have 3.81 installed to build the android kernel. I already downloaded the 3.81 source and built it, but now I want to install it alongside 3.82 and be able to switch between them using Fedora alternatives. Now I installed `make-3.81` from source into `/usr/local`, how would I use alternatives to achieve my goal? I know I must use the alternatives command, but so far my attempts have failed and I would like a concrete example.


Difference of folders and files

I have two folders which have different folders inside. Those folders also contains different files. I am looking for the command that would give me the difference between those two parent folders. Not just difference of files that are contained in one folder and not in the other, but also difference in files contents. I have done this so far: `diff -rq fold1 fold2` .. But that doesn't give me the difference between the files. What command could I run?


Nemo Filemanager suddenly looks different

Today I started Nemo and noticed it's new (ugly) look which looks like some kind of fallback mode: ![](http://i.stack.imgur.com/xTFJF.png) When looking at the package history, I only see recent updates of phonon packages and the installation of wireshark and minitube. The current version is 2.0.8, downgrading to version 1.8.4-1 didn't help.


Can libnotify be used to execute a script?

Can `libnotify` be used to execute a script? I want to use a script to play a sound, or even run more complicated programs via the `notify-send` in bash files and other programs. Is that possible? It seems to use only popups?


Binutils documentation compilation problem

I'm trying to compile and install binutils+GCC for my machine on my own. I have compiled lastest binutils sources without getting any error, but installation seems to have some problems with `gas` documentation. Here is my installation log:               make[2]: Leaving directory '/src/binutils-2.23.51-1/build/etc'     make[2]: Entering directory '/src/binutils-2.23.51-1/build/gas'     Making install in doc     make[3]: Entering directory '/src/binutils-2.23.51-1/build/gas/doc'     make[4]: Entering directory '/src/binutils-2.23.51-1/build/gas/doc'     make[4]: Nothing to be done for 'install-exec-am'.     ../../../gas/doc/c-arc.texi:223: command @bullet not accepting argument in brace should not be on @table line     ../../../gas/doc/c-arm.texi:393: command @bullet not accepting argument in brace should not be on @table line     ../../../gas/doc/c-arm.texi:394: warning: @item missing argument     ...     ../../../gas/doc/c-cr16.texi:65: warning: @item missing argument     ../../../gas/doc/c-tic54x.texi:113: @code expected brace     ...     ../../../gas/doc/c-i386.texi:979: warning: node prev `i386-Bugs' in menu `i386-Arch' and in sectioning `i386-16bit' differ     ...     ../../../gas/doc/c-xtensa.texi:9: warning: node `Z80-Dependent' is next for `Xtensa-Dependent' in menu but not in sectioning     Makefile:397: recipe for target 'as.info' failed     make[4]: *** [as.info] Error 1     make[4]: Leaving directory '/src/binutils-2.23.51-1/build/gas/doc'     Makefile:592: recipe for target 'install-am' failed     make[3]: *** [install-am] Error 2     make[3]: Leaving directory '/src/binutils-2.23.51-1/build/gas/doc'     Makefile:2182: recipe for target 'install-recursive' failed     make[2]: *** [install-recursive] Error 1     make[2]: Leaving directory '/src/binutils-2.23.51-1/build/gas'     Makefile:4761: recipe for target 'install-gas' failed     make[1]: *** [install-gas] Error 2     make[1]: Leaving directory '/src/binutils-2.23.51-1/build'     Makefile:2141: recipe for target 'install' failed     make: *** [install] Error 2      The output is very large and some of the warnings are repeating (they just occur on different lines). It looks like the problem is caused by `as.info` file, and I guess I'm using old version of some tool for `.texi` files. I don't know what to do now. Does anybody have any idea what can I do for running the installation successfully?